@g4rcez/components 2.0.29 → 2.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/core/slot.d.ts +16 -0
- package/dist/components/core/slot.d.ts.map +1 -0
- package/dist/components/core/slot.js +160 -0
- package/dist/components/display/notifications.d.ts +4 -4
- package/dist/components/display/notifications.d.ts.map +1 -1
- package/dist/components/display/notifications.js +36 -33
- package/dist/components/display/progress.js +2 -2
- package/dist/components/floating/dropdown.d.ts +2 -2
- package/dist/components/floating/dropdown.d.ts.map +1 -1
- package/dist/components/floating/dropdown.js +1 -1
- package/dist/components/floating/menu.d.ts +2 -2
- package/dist/components/floating/menu.js +2 -2
- package/dist/components/floating/modal.d.ts +2 -2
- package/dist/components/floating/modal.d.ts.map +1 -1
- package/dist/components/floating/modal.js +33 -34
- package/dist/components/form/autocomplete.d.ts.map +1 -1
- package/dist/components/form/autocomplete.js +5 -5
- package/dist/components/form/multi-select.d.ts.map +1 -1
- package/dist/components/form/multi-select.js +6 -6
- package/dist/components/form/slider.d.ts +2 -2
- package/dist/components/form/slider.d.ts.map +1 -1
- package/dist/components/form/slider.js +5 -3
- package/dist/index.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18689 -17739
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +17 -20
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -3
package/dist/index.umd.js
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
(function(ae,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],T):(ae=typeof globalThis<"u"?globalThis:ae||self,T(ae.components={},ae.React,ae["react/jsx-runtime"],ae.ReactDOM))})(this,(function(ae,T,v,Po){"use strict";function bm(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=bm(T),yr=bm(Po);function xm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=xm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wm(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=xm(e))&&(r&&(r+=" "),r+=t);return r}const Sm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Em=wm,Ao=(e,t)=>n=>{var r;if(t?.variants==null)return Em(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=Sm(u)||Sm(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(g=>{let[m,h]=g;return Array.isArray(h)?h.includes({...i,...a}[m]):{...i,...a}[m]===h})?[...c,d,f]:c},[]);return Em(e,s,l,n?.class,n?.className)};var Tm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zk(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Mc,km;function Oo(){return km||(km=1,Mc=TypeError),Mc}const Bk=zk(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Nc,Im;function ca(){if(Im)return Nc;Im=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=o&&i&&typeof i.get=="function"?i.get:null,a=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,g=Boolean.prototype.valueOf,m=Object.prototype.toString,h=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,E=String.prototype.toUpperCase,S=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,C=Array.prototype.join,A=Array.prototype.slice,O=Math.floor,N=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_=typeof Symbol=="function"&&typeof Symbol.iterator=="object",F=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(K){return K.__proto__}:null);function P(K,Z){if(K===1/0||K===-1/0||K!==K||K&&K>-1e3&&K<1e3||I.call(/e/,Z))return Z;var Re=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof K=="number"){var rt=K<0?-O(-K):O(K);if(rt!==K){var ct=String(rt),Fe=b.call(Z,ct.length+1);return x.call(ct,Re,"$&_")+"."+x.call(x.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(Z,Re,"$&_")}var R=Bk,V=R.custom,G=Q(V)?V:null,U={__proto__:null,double:'"',single:"'"},B={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Nc=function K(Z,Re,rt,ct){var Fe=Re||{};if(te(Fe,"quoteStyle")&&!te(U,Fe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(te(Fe,"maxStringLength")&&(typeof Fe.maxStringLength=="number"?Fe.maxStringLength<0&&Fe.maxStringLength!==1/0:Fe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ur=te(Fe,"customInspect")?Fe.customInspect:!0;if(typeof Ur!="boolean"&&Ur!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(te(Fe,"indent")&&Fe.indent!==null&&Fe.indent!==" "&&!(parseInt(Fe.indent,10)===Fe.indent&&Fe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(te(Fe,"numericSeparator")&&typeof Fe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Io=Fe.numericSeparator;if(typeof Z>"u")return"undefined";if(Z===null)return"null";if(typeof Z=="boolean")return Z?"true":"false";if(typeof Z=="string")return Ce(Z,Fe);if(typeof Z=="number"){if(Z===0)return 1/0/Z>0?"0":"-0";var gn=String(Z);return Io?P(Z,gn):gn}if(typeof Z=="bigint"){var Gr=String(Z)+"n";return Io?P(Z,Gr):Gr}var dm=typeof Fe.depth>"u"?5:Fe.depth;if(typeof rt>"u"&&(rt=0),rt>=dm&&dm>0&&typeof Z=="object")return oe(Z)?"[Array]":"[Object]";var Ri=cr(Fe,rt);if(typeof ct>"u")ct=[];else if(he(ct,Z)>=0)return"[Circular]";function Bn(ji,Dc,X9){if(Dc&&(ct=A.call(ct),ct.push(Dc)),X9){var jk={depth:Fe.depth};return te(Fe,"quoteStyle")&&(jk.quoteStyle=Fe.quoteStyle),K(ji,jk,rt+1,ct)}return K(ji,Fe,rt+1,ct)}if(typeof Z=="function"&&!q(Z)){var Mk=ve(Z),Nk=zn(Z,Bn);return"[Function"+(Mk?": "+Mk:" (anonymous)")+"]"+(Nk.length>0?" { "+C.call(Nk,", ")+" }":"")}if(Q(Z)){var Fk=_?x.call(String(Z),/^(Symbol\(.*\))_[^)]*$/,"$1"):j.call(Z);return typeof Z=="object"&&!_?Ne(Fk):Fk}if(me(Z)){for(var la="<"+S.call(String(Z.nodeName)),fm=Z.attributes||[],_c=0;_c<fm.length;_c++)la+=" "+fm[_c].name+"="+Y(ne(fm[_c].value),"double",Fe);return la+=">",Z.childNodes&&Z.childNodes.length&&(la+="..."),la+="</"+S.call(String(Z.nodeName))+">",la}if(oe(Z)){if(Z.length===0)return"[]";var pm=zn(Z,Bn);return Ri&&!en(pm)?"["+jn(pm,Ri)+"]":"[ "+C.call(pm,", ")+" ]"}if(X(Z)){var hm=zn(Z,Bn);return!("cause"in Error.prototype)&&"cause"in Z&&!z.call(Z,"cause")?"{ ["+String(Z)+"] "+C.call(w.call("[cause]: "+Bn(Z.cause),hm),", ")+" }":hm.length===0?"["+String(Z)+"]":"{ ["+String(Z)+"] "+C.call(hm,", ")+" }"}if(typeof Z=="object"&&Ur){if(G&&typeof Z[G]=="function"&&R)return R(Z,{depth:dm-rt});if(Ur!=="symbol"&&typeof Z.inspect=="function")return Z.inspect()}if(ge(Z)){var Lk=[];return r&&r.call(Z,function(ji,Dc){Lk.push(Bn(Dc,Z,!0)+" => "+Bn(ji,Z))}),ft("Map",n.call(Z),Lk,Ri)}if($(Z)){var $k=[];return a&&a.call(Z,function(ji){$k.push(Bn(ji,Z))}),ft("Set",s.call(Z),$k,Ri)}if(ie(Z))return bt("WeakMap");if(re(Z))return bt("WeakSet");if(H(Z))return bt("WeakRef");if(D(Z))return Ne(Bn(Number(Z)));if(fe(Z))return Ne(Bn(N.call(Z)));if(ee(Z))return Ne(g.call(Z));if(ue(Z))return Ne(Bn(String(Z)));if(typeof window<"u"&&Z===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Z===globalThis||typeof Tm<"u"&&Z===Tm)return"{ [object globalThis] }";if(!W(Z)&&!q(Z)){var mm=zn(Z,Bn),Vk=M?M(Z)===Object.prototype:Z instanceof Object||Z.constructor===Object,gm=Z instanceof Object?"":"null prototype",Rk=!Vk&&F&&Object(Z)===Z&&F in Z?b.call(ce(Z),8,-1):gm?"Object":"",Z9=Vk||typeof Z.constructor!="function"?"":Z.constructor.name?Z.constructor.name+" ":"",vm=Z9+(Rk||gm?"["+C.call(w.call([],Rk||[],gm||[]),": ")+"] ":"");return mm.length===0?vm+"{}":Ri?vm+"{"+jn(mm,Ri)+"}":vm+"{ "+C.call(mm,", ")+" }"}return String(Z)};function Y(K,Z,Re){var rt=Re.quoteStyle||Z,ct=U[rt];return ct+K+ct}function ne(K){return x.call(String(K),/"/g,""")}function se(K){return!F||!(typeof K=="object"&&(F in K||typeof K[F]<"u"))}function oe(K){return ce(K)==="[object Array]"&&se(K)}function W(K){return ce(K)==="[object Date]"&&se(K)}function q(K){return ce(K)==="[object RegExp]"&&se(K)}function X(K){return ce(K)==="[object Error]"&&se(K)}function ue(K){return ce(K)==="[object String]"&&se(K)}function D(K){return ce(K)==="[object Number]"&&se(K)}function ee(K){return ce(K)==="[object Boolean]"&&se(K)}function Q(K){if(_)return K&&typeof K=="object"&&K instanceof Symbol;if(typeof K=="symbol")return!0;if(!K||typeof K!="object"||!j)return!1;try{return j.call(K),!0}catch{}return!1}function fe(K){if(!K||typeof K!="object"||!N)return!1;try{return N.call(K),!0}catch{}return!1}var J=Object.prototype.hasOwnProperty||function(K){return K in this};function te(K,Z){return J.call(K,Z)}function ce(K){return m.call(K)}function ve(K){if(K.name)return K.name;var Z=y.call(h.call(K),/^function\s*([\w$]+)/);return Z?Z[1]:null}function he(K,Z){if(K.indexOf)return K.indexOf(Z);for(var Re=0,rt=K.length;Re<rt;Re++)if(K[Re]===Z)return Re;return-1}function ge(K){if(!n||!K||typeof K!="object")return!1;try{n.call(K);try{s.call(K)}catch{return!0}return K instanceof Map}catch{}return!1}function ie(K){if(!c||!K||typeof K!="object")return!1;try{c.call(K,c);try{d.call(K,d)}catch{return!0}return K instanceof WeakMap}catch{}return!1}function H(K){if(!p||!K||typeof K!="object")return!1;try{return p.call(K),!0}catch{}return!1}function $(K){if(!s||!K||typeof K!="object")return!1;try{s.call(K);try{n.call(K)}catch{return!0}return K instanceof Set}catch{}return!1}function re(K){if(!d||!K||typeof K!="object")return!1;try{d.call(K,d);try{c.call(K,c)}catch{return!0}return K instanceof WeakSet}catch{}return!1}function me(K){return!K||typeof K!="object"?!1:typeof HTMLElement<"u"&&K instanceof HTMLElement?!0:typeof K.nodeName=="string"&&typeof K.getAttribute=="function"}function Ce(K,Z){if(K.length>Z.maxStringLength){var Re=K.length-Z.maxStringLength,rt="... "+Re+" more character"+(Re>1?"s":"");return Ce(b.call(K,0,Z.maxStringLength),Z)+rt}var ct=B[Z.quoteStyle||"single"];ct.lastIndex=0;var Fe=x.call(x.call(K,ct,"\\$1"),/[\x00-\x1f]/g,Me);return Y(Fe,"single",Z)}function Me(K){var Z=K.charCodeAt(0),Re={8:"b",9:"t",10:"n",12:"f",13:"r"}[Z];return Re?"\\"+Re:"\\x"+(Z<16?"0":"")+E.call(Z.toString(16))}function Ne(K){return"Object("+K+")"}function bt(K){return K+" { ? }"}function ft(K,Z,Re,rt){var ct=rt?jn(Re,rt):C.call(Re,", ");return K+" ("+Z+") {"+ct+"}"}function en(K){for(var Z=0;Z<K.length;Z++)if(he(K[Z],`
|
|
2
|
-
`)>=0)return!1;return!0}function
|
|
3
|
-
`+
|
|
4
|
-
`+Z.prev}function zn(K,Z){var Re=oe(K),rt=[];if(Re){rt.length=K.length;for(var ct=0;ct<K.length;ct++)rt[ct]=te(K,ct)?Z(K[ct],K):""}var Fe=typeof L=="function"?L(K):[],Ur;if(_){Ur={};for(var Io=0;Io<Fe.length;Io++)Ur["$"+Fe[Io]]=Fe[Io]}for(var gn in K)te(K,gn)&&(Re&&String(Number(gn))===gn&&gn<K.length||_&&Ur["$"+gn]instanceof Symbol||(I.call(/[^\w$]/,gn)?rt.push(Z(gn,K)+": "+Z(K[gn],K)):rt.push(gn+": "+Z(K[gn],K))));if(typeof L=="function")for(var Gr=0;Gr<Fe.length;Gr++)z.call(K,Fe[Gr])&&rt.push("["+Z(Fe[Gr])+"]: "+Z(K[Fe[Gr]],K));return rt}return Nc}var Fc,Pm;function Hk(){if(Pm)return Fc;Pm=1;var e=ca(),t=Oo(),n=function(a,l,c){for(var u=a,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=a.next,a.next=d),d},r=function(a,l){if(a){var c=n(a,l);return c&&c.value}},o=function(a,l,c){var u=n(a,l);u?u.value=c:a.next={key:l,next:a.next,value:c}},i=function(a,l){return a?!!n(a,l):!1},s=function(a,l){if(a)return n(a,l,!0)};return Fc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=s(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Fc}var Lc,Am;function Om(){return Am||(Am=1,Lc=Object),Lc}var $c,_m;function Wk(){return _m||(_m=1,$c=Error),$c}var Vc,Dm;function qk(){return Dm||(Dm=1,Vc=EvalError),Vc}var Rc,Mm;function Uk(){return Mm||(Mm=1,Rc=RangeError),Rc}var jc,Nm;function Gk(){return Nm||(Nm=1,jc=ReferenceError),jc}var zc,Fm;function Kk(){return Fm||(Fm=1,zc=SyntaxError),zc}var Bc,Lm;function Yk(){return Lm||(Lm=1,Bc=URIError),Bc}var Hc,$m;function Zk(){return $m||($m=1,Hc=Math.abs),Hc}var Wc,Vm;function Xk(){return Vm||(Vm=1,Wc=Math.floor),Wc}var qc,Rm;function Qk(){return Rm||(Rm=1,qc=Math.max),qc}var Uc,jm;function Jk(){return jm||(jm=1,Uc=Math.min),Uc}var Gc,zm;function eI(){return zm||(zm=1,Gc=Math.pow),Gc}var Kc,Bm;function tI(){return Bm||(Bm=1,Kc=Math.round),Kc}var Yc,Hm;function nI(){return Hm||(Hm=1,Yc=Number.isNaN||function(t){return t!==t}),Yc}var Zc,Wm;function rI(){if(Wm)return Zc;Wm=1;var e=nI();return Zc=function(n){return e(n)||n===0?n:n<0?-1:1},Zc}var Xc,qm;function oI(){return qm||(qm=1,Xc=Object.getOwnPropertyDescriptor),Xc}var Qc,Um;function Gm(){if(Um)return Qc;Um=1;var e=oI();if(e)try{e([],"length")}catch{e=null}return Qc=e,Qc}var Jc,Km;function iI(){if(Km)return Jc;Km=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Jc=e,Jc}var eu,Ym;function sI(){return Ym||(Ym=1,eu=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),eu}var tu,Zm;function aI(){if(Zm)return tu;Zm=1;var e=typeof Symbol<"u"&&Symbol,t=sI();return tu=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},tu}var nu,Xm;function Qm(){return Xm||(Xm=1,nu=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),nu}var ru,Jm;function eg(){if(Jm)return ru;Jm=1;var e=Om();return ru=e.getPrototypeOf||null,ru}var ou,tg;function lI(){if(tg)return ou;tg=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},s=function(a,l){for(var c="",u=0;u<a.length;u+=1)c+=a[u],u+1<a.length&&(c+=l);return c};return ou=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),g=[],m=0;m<p;m++)g[m]="$"+m;if(d=Function("binder","return function ("+s(g,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},ou}var iu,ng;function ua(){if(ng)return iu;ng=1;var e=lI();return iu=Function.prototype.bind||e,iu}var su,rg;function au(){return rg||(rg=1,su=Function.prototype.call),su}var lu,og;function ig(){return og||(og=1,lu=Function.prototype.apply),lu}var cu,sg;function cI(){return sg||(sg=1,cu=typeof Reflect<"u"&&Reflect&&Reflect.apply),cu}var uu,ag;function uI(){if(ag)return uu;ag=1;var e=ua(),t=ig(),n=au(),r=cI();return uu=r||e.call(n,t),uu}var du,lg;function cg(){if(lg)return du;lg=1;var e=ua(),t=Oo(),n=au(),r=uI();return du=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},du}var fu,ug;function dI(){if(ug)return fu;ug=1;var e=cg(),t=Gm(),n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return fu=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,fu}var pu,dg;function fI(){if(dg)return pu;dg=1;var e=Qm(),t=eg(),n=dI();return pu=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,pu}var hu,fg;function pI(){if(fg)return hu;fg=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=ua();return hu=n.call(e,t),hu}var mu,pg;function gu(){if(pg)return mu;pg=1;var e,t=Om(),n=Wk(),r=qk(),o=Uk(),i=Gk(),s=Kk(),a=Oo(),l=Yk(),c=Zk(),u=Xk(),d=Qk(),f=Jk(),p=eI(),g=tI(),m=rI(),h=Function,y=function(q){try{return h('"use strict"; return ('+q+").constructor;")()}catch{}},b=Gm(),x=iI(),E=function(){throw new a},S=b?(function(){try{return arguments.callee,E}catch{try{return b(arguments,"callee").get}catch{return E}}})():E,I=aI()(),w=fI(),C=eg(),A=Qm(),O=ig(),N=au(),L={},j=typeof Uint8Array>"u"||!w?e:w(Uint8Array),_={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":S,"%TypedArray%":j,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":N,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":g,"%Math.sign%":m,"%Reflect.getPrototypeOf%":A};if(w)try{null.error}catch(q){var F=w(w(q));_["%Error.prototype%"]=F}var z=function q(X){var ue;if(X==="%AsyncFunction%")ue=y("async function () {}");else if(X==="%GeneratorFunction%")ue=y("function* () {}");else if(X==="%AsyncGeneratorFunction%")ue=y("async function* () {}");else if(X==="%AsyncGenerator%"){var D=q("%AsyncGeneratorFunction%");D&&(ue=D.prototype)}else if(X==="%AsyncIteratorPrototype%"){var ee=q("%AsyncGenerator%");ee&&w&&(ue=w(ee.prototype))}return _[X]=ue,ue},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=ua(),R=pI(),V=P.call(N,Array.prototype.concat),G=P.call(O,Array.prototype.splice),U=P.call(N,String.prototype.replace),B=P.call(N,String.prototype.slice),Y=P.call(N,RegExp.prototype.exec),ne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,se=/\\(\\)?/g,oe=function(X){var ue=B(X,0,1),D=B(X,-1);if(ue==="%"&&D!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(D==="%"&&ue!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ee=[];return U(X,ne,function(Q,fe,J,te){ee[ee.length]=J?U(te,se,"$1"):fe||Q}),ee},W=function(X,ue){var D=X,ee;if(R(M,D)&&(ee=M[D],D="%"+ee[0]+"%"),R(_,D)){var Q=_[D];if(Q===L&&(Q=z(D)),typeof Q>"u"&&!ue)throw new a("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:ee,name:D,value:Q}}throw new s("intrinsic "+X+" does not exist!")};return mu=function(X,ue){if(typeof X!="string"||X.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ue!="boolean")throw new a('"allowMissing" argument must be a boolean');if(Y(/^%?[^%]*%?$/,X)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var D=oe(X),ee=D.length>0?D[0]:"",Q=W("%"+ee+"%",ue),fe=Q.name,J=Q.value,te=!1,ce=Q.alias;ce&&(ee=ce[0],G(D,V([0,1],ce)));for(var ve=1,he=!0;ve<D.length;ve+=1){var ge=D[ve],ie=B(ge,0,1),H=B(ge,-1);if((ie==='"'||ie==="'"||ie==="`"||H==='"'||H==="'"||H==="`")&&ie!==H)throw new s("property names with quotes must have matching quotes");if((ge==="constructor"||!he)&&(te=!0),ee+="."+ge,fe="%"+ee+"%",R(_,fe))J=_[fe];else if(J!=null){if(!(ge in J)){if(!ue)throw new a("base intrinsic for "+X+" exists, but the property is not available.");return}if(b&&ve+1>=D.length){var $=b(J,ge);he=!!$,he&&"get"in $&&!("originalValue"in $.get)?J=$.get:J=J[ge]}else he=R(J,ge),J=J[ge];he&&!te&&(_[fe]=J)}}return J},mu}var vu,hg;function mg(){if(hg)return vu;hg=1;var e=gu(),t=cg(),n=t([e("%String.prototype.indexOf%")]);return vu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},vu}var yu,gg;function vg(){if(gg)return yu;gg=1;var e=gu(),t=mg(),n=ca(),r=Oo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),a=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return yu=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var g=l(d,p);return c(d)===0&&(d=void 0),g}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?a(d,p):!1},set:function(p,g){d||(d=new o),s(d,p,g)}};return f},yu}var bu,yg;function hI(){if(yg)return bu;yg=1;var e=gu(),t=mg(),n=ca(),r=vg(),o=Oo(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return bu=i?function(){var d,f,p={assert:function(g){if(!p.has(g))throw new o("Side channel does not contain "+n(g))},delete:function(g){if(i&&g&&(typeof g=="object"||typeof g=="function")){if(d)return c(d,g)}else if(r&&f)return f.delete(g);return!1},get:function(g){return i&&g&&(typeof g=="object"||typeof g=="function")&&d?s(d,g):f&&f.get(g)},has:function(g){return i&&g&&(typeof g=="object"||typeof g=="function")&&d?l(d,g):!!f&&f.has(g)},set:function(g,m){i&&g&&(typeof g=="object"||typeof g=="function")?(d||(d=new i),a(d,g,m)):r&&(f||(f=r()),f.set(g,m))}};return p}:r,bu}var xu,bg;function xg(){if(bg)return xu;bg=1;var e=Oo(),t=ca(),n=Hk(),r=vg(),o=hI(),i=o||r||n;return xu=function(){var a,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,u){a||(a=i()),a.set(c,u)}};return l},xu}var wg=e=>Array.isArray(e),wu=e=>e===void 0,Su=e=>e===null,mI=Function.bind.call(Function.call,Object.prototype.toString),gI=e=>!!e&&mI(e)==="[object Error]"||e instanceof Error,Sg=(e,t)=>e instanceof t,vI=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},yI=e=>Object.prototype.toString.call(e)==="[object Date]"&&Sg(e,Date),ze={array:wg,date:yI,empty:e=>Su(e)||wu(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Sg,isError:gI,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Su(e)||wu(e),null:Su,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!wg(e)&&typeof e=="object",primitive:vI,string:e=>typeof e=="string",undefined:wu},bI=e=>Object.keys(e),Hn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,s)=>i&&i[s],e);return o===void 0?n:o},xI=e=>e.replace(/[^0-9]/g,"");const wI=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},SI=(e,t)=>({classGroupId:e,validator:t}),Eg=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),da="-",Tg=[],EI="arbitrary..",TI=e=>{const t=kI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return CI(s);const a=s.split(da),l=a[0]===""&&a.length>1?1:0;return Cg(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?wI(c,l):l:c||Tg}return n[s]||Tg}}},Cg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Cg(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(da):e.slice(t).join(da),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},CI=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?EI+r:void 0})(),kI=e=>{const{theme:t,classGroups:n}=e;return II(n,t)},II=(e,t)=>{const n=Eg();for(const r in e){const o=e[r];Eu(o,n,r,t)}return n},Eu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];PI(s,t,n,r)}},PI=(e,t,n,r)=>{if(typeof e=="string"){AI(e,t,n);return}if(typeof e=="function"){OI(e,t,n,r);return}_I(e,t,n,r)},AI=(e,t,n)=>{const r=e===""?t:kg(t,e);r.classGroupId=n},OI=(e,t,n,r)=>{if(DI(e)){Eu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(SI(n,e))},_I=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Eu(l,kg(t,a),n,r)}},kg=(e,t)=>{let n=e;const r=t.split(da),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=Eg(),n.nextPart.set(s,a)),n=a}return n},DI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,MI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Tu="!",Ig=":",NI=[],Pg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),FI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let m=0;m<u;m++){const h=o[m];if(s===0&&a===0){if(h===Ig){i.push(o.slice(l,m)),l=m+1;continue}if(h==="/"){c=m;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(Tu)?(f=d.slice(0,-1),p=!0):d.startsWith(Tu)&&(f=d.slice(1),p=!0);const g=c&&c>l?c-l:void 0;return Pg(i,p,f,g)};if(t){const o=t+Ig,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Pg(NI,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},LI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},$I=e=>({cache:MI(e.cacheSize),parseClassName:FI(e),sortModifiers:LI(e),...TI(e)}),VI=/\s+/,RI=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(VI);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!m,y=r(h?g.substring(0,m):g);if(!y){if(!h){l=u+(l.length>0?" "+l:l);continue}if(y=r(g),!y){l=u+(l.length>0?" "+l:l);continue}h=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+Tu:b,E=x+y;if(s.indexOf(E)>-1)continue;s.push(E);const S=o(y,h);for(let I=0;I<S.length;++I){const w=S[I];s.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},jI=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Ag(n))&&(o&&(o+=" "),o+=r);return o},Ag=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ag(e[r]))&&(n&&(n+=" "),n+=t);return n},zI=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=$I(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=RI(l,n);return o(l,u),u};return i=s,(...l)=>i(jI(...l))},BI=[],Mt=e=>{const t=n=>n[e]||BI;return t.isThemeGetter=!0,t},Og=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_g=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HI=/^\d+\/\d+$/,WI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,UI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_o=e=>HI.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),br=e=>!!e&&Number.isInteger(Number(e)),Cu=e=>e.endsWith("%")&&je(e.slice(0,-1)),ur=e=>WI.test(e),YI=()=>!0,ZI=e=>qI.test(e)&&!UI.test(e),Dg=()=>!1,XI=e=>GI.test(e),QI=e=>KI.test(e),JI=e=>!xe(e)&&!we(e),eP=e=>Do(e,$g,Dg),xe=e=>Og.test(e),Kr=e=>Do(e,Vg,ZI),ku=e=>Do(e,iP,je),Mg=e=>Do(e,Fg,Dg),tP=e=>Do(e,Lg,QI),fa=e=>Do(e,Rg,XI),we=e=>_g.test(e),zi=e=>Mo(e,Vg),nP=e=>Mo(e,sP),Ng=e=>Mo(e,Fg),rP=e=>Mo(e,$g),oP=e=>Mo(e,Lg),pa=e=>Mo(e,Rg,!0),Do=(e,t,n)=>{const r=Og.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mo=(e,t,n=!1)=>{const r=_g.exec(e);return r?r[1]?t(r[1]):n:!1},Fg=e=>e==="position"||e==="percentage",Lg=e=>e==="image"||e==="url",$g=e=>e==="length"||e==="size"||e==="bg-size",Vg=e=>e==="length",iP=e=>e==="number",sP=e=>e==="family-name",Rg=e=>e==="shadow",aP=zI(()=>{const e=Mt("color"),t=Mt("font"),n=Mt("text"),r=Mt("font-weight"),o=Mt("tracking"),i=Mt("leading"),s=Mt("breakpoint"),a=Mt("container"),l=Mt("spacing"),c=Mt("radius"),u=Mt("shadow"),d=Mt("inset-shadow"),f=Mt("text-shadow"),p=Mt("drop-shadow"),g=Mt("blur"),m=Mt("perspective"),h=Mt("aspect"),y=Mt("ease"),b=Mt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...E(),we,xe],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],C=()=>[we,xe,l],A=()=>[_o,"full","auto",...C()],O=()=>[br,"none","subgrid",we,xe],N=()=>["auto",{span:["full",br,we,xe]},br,we,xe],L=()=>[br,"auto",we,xe],j=()=>["auto","min","max","fr",we,xe],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...C()],M=()=>[_o,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],P=()=>[e,we,xe],R=()=>[...E(),Ng,Mg,{position:[we,xe]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",rP,eP,{size:[we,xe]}],U=()=>[Cu,zi,Kr],B=()=>["","none","full",c,we,xe],Y=()=>["",je,zi,Kr],ne=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[je,Cu,Ng,Mg],W=()=>["","none",g,we,xe],q=()=>["none",je,we,xe],X=()=>["none",je,we,xe],ue=()=>[je,we,xe],D=()=>[_o,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ur],breakpoint:[ur],color:[YI],container:[ur],"drop-shadow":[ur],ease:["in","out","in-out"],font:[JI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ur],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ur],shadow:[ur],spacing:["px",je],text:[ur],"text-shadow":[ur],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_o,xe,we,h]}],container:["container"],columns:[{columns:[je,xe,we,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[br,"auto",we,xe]}],basis:[{basis:[_o,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,_o,"auto","initial","none",xe]}],grow:[{grow:["",je,we,xe]}],shrink:[{shrink:["",je,we,xe]}],order:[{order:[br,"first","last","none",we,xe]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[a,"screen",...M()]}],"min-w":[{"min-w":[a,"screen","none",...M()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,zi,Kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,we,ku]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cu,xe]}],"font-family":[{font:[nP,xe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,we,xe]}],"line-clamp":[{"line-clamp":[je,"none",we,ku]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",we,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",we,Kr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[je,"auto",we,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},br,we,xe],radial:["",we,xe],conic:[br,we,xe]},oP,tP]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,we,xe]}],"outline-w":[{outline:["",je,zi,Kr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,pa,fa]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,pa,fa]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[je,Kr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",f,pa,fa]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[je,we,xe]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[we,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,xe]}],filter:[{filter:["","none",we,xe]}],blur:[{blur:W()}],brightness:[{brightness:[je,we,xe]}],contrast:[{contrast:[je,we,xe]}],"drop-shadow":[{"drop-shadow":["","none",p,pa,fa]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",je,we,xe]}],"hue-rotate":[{"hue-rotate":[je,we,xe]}],invert:[{invert:["",je,we,xe]}],saturate:[{saturate:[je,we,xe]}],sepia:[{sepia:["",je,we,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",we,xe]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[je,we,xe]}],"backdrop-contrast":[{"backdrop-contrast":[je,we,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,we,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,we,xe]}],"backdrop-invert":[{"backdrop-invert":["",je,we,xe]}],"backdrop-opacity":[{"backdrop-opacity":[je,we,xe]}],"backdrop-saturate":[{"backdrop-saturate":[je,we,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",je,we,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",we,xe]}],ease:[{ease:["linear","initial",y,we,xe]}],delay:[{delay:[je,we,xe]}],animate:[{animate:["none",b,we,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,we,xe]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[we,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:D()}],"translate-x":[{"translate-x":D()}],"translate-y":[{"translate-y":D()}],"translate-z":[{"translate-z":D()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,xe]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[je,zi,Kr,ku]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),dr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},lP=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Iu=e=>ze.function(e),Ie=(...e)=>aP(wm(e)),jg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Bi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},zg=e=>e.scrollHeight>e.clientHeight,Hi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},cP=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},an=T.forwardRef(function(t,n){const r=t.as||"span";return v.jsx(r,{ref:n,...t,as:void 0})}),uP={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},dP=Ao("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),fP=Ao("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:uP,defaultVariants:{theme:"primary",size:"default"}}),ha=T.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return v.jsxs(an,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Ie(fP({size:s,theme:o?"loading":i}),t),children:[n?v.jsx("span",{"aria-hidden":"true",className:dP({theme:n})}):null,r,a.children]})}),pP=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return v.jsx("form",{...e,onSubmit:t})};var Ct=function(){return Ct=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ct.apply(this,arguments)};function Pu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Au(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Wi=function(e){return e.replace(new RegExp(" ","g")," ")},Bg=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},hP=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Hg=function(e,t,n){var r=e.length-2,o=hP(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Wg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ma=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},mP=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ou=function(e){var t=T.useRef(e);return T.useEffect(function(){t.current=e},[e]),t},gP=function(e){return e==="money"||e==="currency"},vP=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Ct(Ct({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ga=function(e,t){var n=Bg(Wg(e),t.fraction.length),r="".concat(t.currency).concat(Hg(n,t.group,t.decimal));return Wi(r)},yP=T.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Pu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=T.useRef(null);T.useImperativeHandle(t,function(){return u.current});var d=T.useMemo(function(){var g=vP(r,i,a);return g.currency=Wi("".concat(g.currency.trim()," ")),g.literal=Wi(g.literal.trim()),g},[r,i]),f=function(g){var m=ga(g.target.value,d),h=ma(m);g.target.value=m,g.target.setAttribute("data-number",h.toString()),l?.(g),h!==0&&(u.current.selectionEnd=m.length)};T.useEffect(function(){if(u.current!==null){var g=u.current.value;if(g!==""){var m=ga(g,d),h=ma(m);u.current.value=m,u.current.setAttribute("data-number",h.toString());var y=new InputEvent("change",{});l?.(Ct(Ct({},y),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=m.length)}}},[d]);var p=c.defaultValue?ga(c.defaultValue,d):void 0;return T.createElement("input",Ct({},c,{value:typeof c.value=="string"?ga(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),bP=1,xP=function(e){return e==="percentage"||e==="percent"||e==="percentual"},wP=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Ct(Ct({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},va=function(e,t){var n=Bg(Wg(e),t.fraction.length),r="".concat(Hg(n,t.group,t.decimal)," ").concat(t.percentSign);return Wi(r)},SP=T.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Pu(e,["locale","mask","onChange","onKeyUp"]),a=T.useRef(null),l=Au(T.useState(function(){var y,b;return(b=(y=s.value)===null||y===void 0?void 0:y.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];T.useImperativeHandle(t,function(){return a.current}),T.useEffect(function(){var y,b=Number.parseFloat("".concat((y=s.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(va(b,d))},[s.value]);var d=T.useMemo(function(){var y=wP(r);return y.percentSign=Wi("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-bP,p=function(y){var b,x=a.current;x&&(x.setSelectionRange(f,f),y&&((b=s.onFocus)===null||b===void 0||b.call(s,y)))},g=function(y){var b=y.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,E=b.selectionEnd,S=x!==E,I=f<x;!S&&I&&p()}i?.(y)},m=function(y){var b=va(y.target.value,d),x=ma(b);u(b),y.target.value=b,y.target.setAttribute("data-number",x.toString()),o?.(y)};T.useEffect(function(){if(a.current!==null){var y=a.current.value;if(y!==""){var b=va(y,d),x=ma(b);u(b),a.current.value=b,a.current.setAttribute("data-number",x.toString());var E=new InputEvent("change",{});o?.(Ct(Ct({},E),{target:a.current,currentTarget:a.current}))}}},[]),T.useEffect(function(){return p()},[c]);var h=s.defaultValue?va(s.defaultValue,d):void 0;return T.createElement("input",Ct({},s,{defaultValue:h,inputMode:"decimal",onChange:m,onFocus:p,onKeyUp:g,ref:a,type:"text"}))}),qi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},EP=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=ya[i];s===void 0?r.push(i.replace(qi.dots,"\\.").replace(qi.openParenthesis,"\\(").replace(qi.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(qi.leadingBars,"\\")},Ui=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return _u(o,n);var i=EP(o);return n?"^".concat(i,"$"):i},TP=function(e){return e.replace(qi.escape,"\\$&")},_u=function(e,t){var n=e.map(function(r){return typeof r=="string"?TP(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ya={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},CP=/\d/,qg="(dd) 9dddd-dddd",Ug="(dd) dddd-dddd",Gg="ddd.ddd.ddd-dd",Kg="dd.ddd.ddd/dddd-dd",ba=function(e){return e.replace(/\D/g,"")},kP=["2",/[0-3]/,":",/[0-5]/,/\d/],IP=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],tn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Gg,isoDate:"dddd-dd-dd",cnpj:Kg,telephone:Ug,cellphone:qg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ba(e).length<=11?Gg:Kg},int:function(e){return e===void 0&&(e=""),CP.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=ba(e);return t.length<11?Ug:qg},time:function(e){var t=ba(e),n=t[0];return n==="2"?kP:IP}},nn=function(e,t,n){var r;return n===void 0&&(n={}),Ct({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Ui(e,"",!0),infinity:n.infinity},n)},Gt={cellTelephone:nn(tn.cellTelephone,"tel"),cellphone:nn(tn.cellphone,"tel"),cep:nn(tn.cep,"decimal"),cnpj:nn(tn.cnpj,"decimal"),color:nn(tn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:nn(tn.cpf,"decimal"),cpfCnpj:nn(tn.cpfCnpj,"decimal",{transform:ba}),creditCard:nn(tn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:nn(tn.date,"decimal"),int:nn(tn.int,"decimal",{pattern:"[0-9]+"}),isoDate:nn(tn.isoDate,"decimal"),telephone:nn(tn.telephone,"tel"),time:nn(tn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:nn(tn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Yg(e,t,n,r){var o,i;r===void 0&&(r=ya);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(a+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Zg=function(e){return e},PP=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ui(e,n,t));return r.test(n)};function AP(e){var t=T.useRef(e);return T.useEffect(function(){t.current=e},[e]),t.current}var OP=T.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=Pu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),g=T.useRef(null);T.useImperativeHandle(t,function(){return g.current});var m=Ou(a),h=Ou(d),y=Ou(u),b=T.useRef(PP(u,i,p.value||p.defaultValue)),x=f??"input",E=Au(T.useState(""),2),S=E[0],I=E[1],w=AP(S),C=T.useCallback(function(F,z){var M,P,R=(M=F??z)!==null&&M!==void 0?M:"";if(u===void 0)return R;var V=(P=R?.toString())!==null&&P!==void 0?P:"";return Yg(V,typeof u=="function"?u(V):u,s??Zg,c??ya)},[s,u,c]),A=Au(T.useState(function(){return C(p.value,p.defaultValue)}),2),O=A[0],N=A[1],L=C(p.defaultValue,p.defaultValue),j=T.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var F=u(O);return Array.isArray(F)?_u(F,i):Ui(u,O,i)}return typeof u=="string"?Ui(u,O,i):_u(u,i)},[l,O,i,u]);T.useEffect(function(){if(p.value!==void 0){var F=C(p.value,p.defaultValue);N(F),g.current!==null&&(g.current.value=F)}},[p.value,u,s,p.defaultValue]);var _=function(F){var z,M,P,R,V,G=F.currentTarget,U=F.target.value;if(y.current===void 0)return N(U),(z=h.current)===null||z===void 0||z.call(h,U),(M=m.current)===null||M===void 0||M.call(m,F),d?.(U);var B=new RegExp(Ui(y.current,U,i)),Y=(P=G.selectionEnd)!==null&&P!==void 0?P:0,ne=function(X,ue,D){if(X.type!=="number")return X.setSelectionRange(ue,D)};if(r&&b.current&&U.length>=O.length)return G.value=O,ne(G,Y-1,Y-1);var se=!1;U.length<w.length&&(b.current=!1,se=!0),B.test(U)&&(b.current=!0);var oe=Y,W=U[oe-1],q=Yg(U,typeof y.current=="function"?y.current(U):y.current,s??Zg,c??ya);for(G.value=q,N(q);oe<q.length&&q.charAt(oe-1)!==W;)oe+=1;se?ne(G,Y,Y):ne(G,oe,oe),F.target.value=q,I(q),(R=h.current)===null||R===void 0||R.call(h,q),(V=m.current)===null||V===void 0||V.call(m,F)};return T.createElement(x,Ct({},p,{ref:g,pattern:j,onChange:_,defaultValue:Xg(p.defaultValue)?L:void 0,value:Xg(p.value)?C(p.value,p.value):p.value}))}),Xg=function(e){return typeof e=="string"},Qg=T.forwardRef(function(e,t){return gP(e.mask)?T.createElement(yP,Ct({},e,{mask:void 0,ref:t})):xP(e.mask)?T.createElement(SP,Ct({},e,{mask:void 0,ref:t})):T.createElement(OP,Ct({},e,{ref:t}))}),rn=function(e){return function(t){return T.createElement(Qg,Ct({},e,t))}};rn(Gt.cellTelephone),rn(Gt.cellphone),rn(Gt.cep),rn(Gt.cnpj),rn(Gt.color),rn(Gt.cpf),rn(Gt.cpfCnpj),rn(Gt.creditCard),rn(Gt.date),rn(Gt.int),rn(Gt.isoDate),rn(Gt.telephone),rn(Gt.time),rn(Gt.uuid);var Jg=T.forwardRef(function(t,n){var r=T.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&mP(Gt,t.mask)?Gt[t.mask]:{mask:t.mask}},[t.mask]),o=Ct(Ct({},t),r);return T.createElement(Qg,Ct({},o,{ref:n}))});const _P=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),DP=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ev=e=>{const t=DP(e);return t.charAt(0).toUpperCase()+t.slice(1)},tv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),MP=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var NP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const FP=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>T.createElement("svg",{ref:l,...NP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:tv("lucide",o),...!i&&!MP(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>T.createElement(c,u)),...Array.isArray(i)?i:[i]]));const Je=(e,t)=>{const n=T.forwardRef(({className:r,...o},i)=>T.createElement(FP,{ref:i,iconNode:t,className:tv(`lucide-${_P(ev(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ev(e),n};const LP=Je("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const $P=Je("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const nv=Je("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const VP=Je("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const RP=Je("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Du=Je("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const jP=Je("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Mu=Je("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const rv=Je("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const zP=Je("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const BP=Je("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const HP=Je("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const ov=Je("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const iv=Je("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const sv=Je("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const WP=Je("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const qP=Je("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const av=Je("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const UP=Je("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Nu=Je("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const GP=Je("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const KP=Je("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const Fu=Je("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const YP=Je("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const ZP=Je("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Lu=Je("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const xa=Je("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const XP=Je("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const QP=Je("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const No=Je("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wa={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},xr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(xr(s,t,n,a))},[]),lv=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:lv(s,t,n,a)}},{}),cv={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Sa=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},JP={default:e=>Sa(e,{result:cv.default}),dark:e=>Sa(e,{result:cv.dark})},Fo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},eA=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),$u=(e,t)=>{const n=xr(e.colors,Fo(t?.colors)),r=xr(e.spacing,Fo(t?.spacing)),o=xr(e.rounded,Fo(t?.rounded)),i=xr(e.shadow,Fo(t?.rounded)),s=xr(e.zIndex,Fo(t?.zIndex??eA)),a=e.custom?xr(e.custom,Fo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},tA=(e,t)=>Sa($u(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),nA=(e,t)=>$u(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),rA=(e,t)=>Sa($u(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),Ea={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>v.jsxs(T.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},Ta={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Lo=T.createContext({tweaks:Ta,parser:wa.hsla,map:Ea,locale:void 0}),kt=()=>{const e=T.useContext(Lo);return e?e.map:Ea},Vu=()=>{const e=T.useContext(Lo);return e?e.tweaks:Ta};function Ca(){return typeof window<"u"}function Wn(e){return ka(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qn(e){var t;return(t=(ka(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ka(e){return Ca()?e instanceof Node||e instanceof Nt(e).Node:!1}function qe(e){return Ca()?e instanceof Element||e instanceof Nt(e).Element:!1}function ot(e){return Ca()?e instanceof HTMLElement||e instanceof Nt(e).HTMLElement:!1}function Gi(e){return!Ca()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}const oA=new Set(["inline","contents"]);function Yr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!oA.has(o)}const iA=new Set(["table","td","th"]);function sA(e){return iA.has(Wn(e))}const aA=[":popover-open",":modal"];function Ia(e){return aA.some(t=>{try{return e.matches(t)}catch{return!1}})}const lA=["transform","translate","scale","rotate","perspective"],cA=["transform","translate","scale","rotate","perspective","filter"],uA=["paint","layout","strict","content"];function Ru(e){const t=Ki(),n=qe(e)?Zt(e):e;return lA.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||cA.some(r=>(n.willChange||"").includes(r))||uA.some(r=>(n.contain||"").includes(r))}function dA(e){let t=Un(e);for(;ot(t)&&!vn(t);){if(Ru(t))return t;if(Ia(t))return null;t=Un(t)}return null}function Ki(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fA=new Set(["html","body","#document"]);function vn(e){return fA.has(Wn(e))}function Zt(e){return Nt(e).getComputedStyle(e)}function Pa(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(Wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gi(e)&&e.host||qn(e);return Gi(t)?t.host:t}function uv(e){const t=Un(e);return vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ot(t)&&Yr(t)?t:uv(t)}function kn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=uv(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Nt(o);if(i){const a=ju(s);return t.concat(s,s.visualViewport||[],Yr(o)?o:[],a&&n?kn(a):[])}return t.concat(o,kn(o,[],n))}function ju(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const pA=["top","right","bottom","left"],dv=["start","end"],fv=pA.reduce((e,t)=>e.concat(t,t+"-"+dv[0],t+"-"+dv[1]),[]),wr=Math.min,ln=Math.max,Aa=Math.round,$o=Math.floor,Gn=e=>({x:e,y:e}),hA={left:"right",right:"left",bottom:"top",top:"bottom"},mA={start:"end",end:"start"};function zu(e,t,n){return ln(e,wr(t,n))}function Zr(e,t){return typeof e=="function"?e(t):e}function Kn(e){return e.split("-")[0]}function In(e){return e.split("-")[1]}function pv(e){return e==="x"?"y":"x"}function Bu(e){return e==="y"?"height":"width"}const gA=new Set(["top","bottom"]);function fr(e){return gA.has(Kn(e))?"y":"x"}function Hu(e){return pv(fr(e))}function hv(e,t,n){n===void 0&&(n=!1);const r=In(e),o=Hu(e),i=Bu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=_a(s)),[s,_a(s)]}function vA(e){const t=_a(e);return[Oa(e),t,Oa(t)]}function Oa(e){return e.replace(/start|end/g,t=>mA[t])}const mv=["left","right"],gv=["right","left"],yA=["top","bottom"],bA=["bottom","top"];function xA(e,t,n){switch(e){case"top":case"bottom":return n?t?gv:mv:t?mv:gv;case"left":case"right":return t?yA:bA;default:return[]}}function wA(e,t,n,r){const o=In(e);let i=xA(Kn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Oa)))),i}function _a(e){return e.replace(/left|right|bottom|top/g,t=>hA[t])}function SA(e){return{top:0,right:0,bottom:0,left:0,...e}}function vv(e){return typeof e!="number"?SA(e):{top:e,right:e,bottom:e,left:e}}function Da(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var EA=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ma=EA.join(","),yv=typeof Element>"u",Vo=yv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Na=!yv&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Fa=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},TA=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},bv=function(t,n,r){if(Fa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ma));return n&&Vo.call(t,Ma)&&o.unshift(t),o=o.filter(r),o},xv=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Fa(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Vo.call(s,Ma);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!Fa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},wv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Sv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||TA(t))&&!wv(t)?0:t.tabIndex},CA=function(t,n){var r=Sv(t);return r<0&&n&&!wv(t)?0:r},kA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ev=function(t){return t.tagName==="INPUT"},IA=function(t){return Ev(t)&&t.type==="hidden"},PA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},AA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},OA=function(t){if(!t.name)return!0;var n=t.form||Na(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=AA(o,t.form);return!i||i===t},_A=function(t){return Ev(t)&&t.type==="radio"},DA=function(t){return _A(t)&&!OA(t)},MA=function(t){var n,r=t&&Na(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Na(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Tv=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},NA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Vo.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(Vo.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Na(t);if(l&&!l.shadowRoot&&o(l)===!0)return Tv(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(MA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Tv(t);return!1},FA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Vo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Wu=function(t,n){return!(n.disabled||Fa(n)||IA(n)||NA(n,t)||PA(n)||FA(n))},qu=function(t,n){return!(DA(n)||Sv(n)<0||!Wu(t,n))},LA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},$A=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=CA(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(kA).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},La=function(t,n){n=n||{};var r;return n.getShadowRoot?r=xv([t],n.includeContainer,{filter:qu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:LA}):r=bv(t,n.includeContainer,qu.bind(null,n)),$A(r)},VA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=xv([t],n.includeContainer,{filter:Wu.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=bv(t,n.includeContainer,Wu.bind(null,n)),r},Cv=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Vo.call(t,Ma)===!1?!1:qu(n,t)};function Uu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function kv(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Iv(){return/apple/i.test(navigator.vendor)}function Gu(){const e=/android/i;return e.test(Uu())||e.test(kv())}function RA(){return Uu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Pv(){return kv().includes("jsdom/")}const Av="data-floating-ui-focusable",jA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ku="ArrowLeft",Yu="ArrowRight",zA="ArrowUp",BA="ArrowDown";function Yn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function jt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Gi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Zn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Zu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function HA(e){return e.matches("html,body")}function Bt(e){return e?.ownerDocument||document}function Xu(e){return ot(e)&&e.matches(jA)}function Qu(e){return e?e.getAttribute("role")==="combobox"&&Xu(e):!1}function WA(e){if(!e||Pv())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function $a(e){return e?e.hasAttribute(Av)?e:e.querySelector("["+Av+"]")||e:null}function Xr(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Xr(e,o.id,n)])}function qA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),Xr(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function Ov(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Ht(e){e.preventDefault(),e.stopPropagation()}function UA(e){return"nativeEvent"in e}function _v(e){return e.mozInputSource===0&&e.isTrusted?!0:Gu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Dv(e){return Pv()?!1:!Gu()&&e.width===0&&e.height===0||Gu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ro(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var GA=typeof document<"u",KA=function(){},Xe=GA?T.useLayoutEffect:KA;const YA={...k};function zt(e){const t=k.useRef(e);return Xe(()=>{t.current=e}),t}const ZA=YA.useInsertionEffect||(e=>e());function xt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ZA(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Va(e,t,n){return Math.floor(e/t)!==n}function Yi(e,t){return t<0||t>=e.current.length}function Ju(e,t){return Kt(e,{disabledIndices:t})}function Mv(e,t){return Kt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Kt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,s=n;do s+=r?-i:i;while(s>=0&&s<=e.current.length-1&&Ra(e,s,o));return s}function XA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===zA){if(d&&Ht(n),u===-1)f=c;else if(f=Kt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||f<0)){const p=u%s,g=c%s,m=c-(g-p);g===p?f=c:f=g>p?m:m-s}Yi(e,f)&&(f=u)}if(n.key===BA&&(d&&Ht(n),u===-1?f=l:(f=Kt(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(f=Kt(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),Yi(e,f)&&(f=u)),r==="both"){const p=$o(u/s);n.key===(i?Ku:Yu)&&(d&&Ht(n),u%s!==s-1?(f=Kt(e,{startingIndex:u,disabledIndices:a}),o&&Va(f,s,p)&&(f=Kt(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=Kt(e,{startingIndex:u-u%s-1,disabledIndices:a})),Va(f,s,p)&&(f=u)),n.key===(i?Yu:Ku)&&(d&&Ht(n),u%s!==0?(f=Kt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Va(f,s,p)&&(f=Kt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(f=Kt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Va(f,s,p)&&(f=u));const g=$o(c/s)===p;Yi(e,f)&&(o&&g?f=n.key===(i?Yu:Ku)?c:Kt(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function QA(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function JA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function eO(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ra(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Zi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Nv(e,t){const n=La(e,Zi()),r=n.length;if(r===0)return;const o=Yn(Bt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function Fv(e){return Nv(Bt(e).body,1)||e}function Lv(e){return Nv(Bt(e).body,-1)||e}function Xi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!jt(n,r)}function tO(e){La(e,Zi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function $v(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Vv(e,t,n){let{reference:r,floating:o}=e;const i=fr(t),s=Hu(t),a=Bu(s),l=Kn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(In(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}const nO=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Vv(c,r,l),f=r,p={},g=0;for(let m=0;m<a.length;m++){const{name:h,fn:y}=a[m],{x:b,y:x,data:E,reset:S}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=b??u,d=x??d,p={...p,[h]:{...p[h],...E}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=Vv(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function ja(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Zr(t,e),g=vv(p),h=a[f?d==="floating"?"reference":"floating":d],y=Da(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Da(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-S.top+g.top)/E.y,bottom:(S.bottom-y.bottom+g.bottom)/E.y,left:(y.left-S.left+g.left)/E.x,right:(S.right-y.right+g.right)/E.x}}const rO=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Zr(e,t)||{};if(c==null)return{};const d=vv(u),f={x:n,y:r},p=Hu(o),g=Bu(p),m=await s.getDimensions(c),h=p==="y",y=h?"top":"left",b=h?"bottom":"right",x=h?"clientHeight":"clientWidth",E=i.reference[g]+i.reference[p]-f[p]-i.floating[g],S=f[p]-i.reference[p],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(I)))&&(w=a.floating[x]||i.floating[g]);const C=E/2-S/2,A=w/2-m[g]/2-1,O=wr(d[y],A),N=wr(d[b],A),L=O,j=w-m[g]-N,_=w/2-m[g]/2+C,F=zu(L,_,j),z=!l.arrow&&In(o)!=null&&_!==F&&i.reference[g]/2-(_<L?O:N)-m[g]/2<0,M=z?_<L?_-L:_-j:0;return{[p]:f[p]+M,data:{[p]:F,centerOffset:_-F-M,...z&&{alignmentOffset:M}},reset:z}}});function oO(e,t,n){return(e?[...n.filter(o=>In(o)===e),...n.filter(o=>In(o)!==e)]:n.filter(o=>Kn(o)===o)).filter(o=>e?In(o)===e||(t?Oa(o)!==o:!1):!0)}const iO=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=fv,autoAlignment:p=!0,...g}=Zr(e,t),m=d!==void 0||f===fv?oO(d||null,p,f):f,h=await ja(t,g),y=((n=s.autoPlacement)==null?void 0:n.index)||0,b=m[y];if(b==null)return{};const x=hv(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:m[0]}};const E=[h[Kn(b)],h[x[0]],h[x[1]]],S=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:E}],I=m[y+1];if(I)return{data:{index:y+1,overflows:S},reset:{placement:I}};const w=S.map(O=>{const N=In(O.placement);return[O.placement,N&&u?O.overflows.slice(0,2).reduce((L,j)=>L+j,0):O.overflows[0],O.overflows]}).sort((O,N)=>O[1]-N[1]),A=((o=w.filter(O=>O[2].slice(0,In(O[0])?2:3).every(N=>N<=0))[0])==null?void 0:o[0])||w[0][0];return A!==a?{data:{index:y+1,overflows:S},reset:{placement:A}}:{}}}},sO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...h}=Zr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Kn(o),b=fr(a),x=Kn(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(x||!m?[_a(a)]:vA(a)),I=g!=="none";!f&&I&&S.push(...wA(a,m,g,E));const w=[a,...S],C=await ja(t,h),A=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(C[y]),d){const _=hv(o,s,E);A.push(C[_[0]],C[_[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(_=>_<=0)){var N,L;const _=(((N=i.flip)==null?void 0:N.index)||0)+1,F=w[_];if(F&&(!(d==="alignment"?b!==fr(F):!1)||O.every(P=>fr(P.placement)===b?P.overflows[0]>0:!0)))return{data:{index:_,overflows:O},reset:{placement:F}};let z=(L=O.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!z)switch(p){case"bestFit":{var j;const M=(j=O.filter(P=>{if(I){const R=fr(P.placement);return R===b||R==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(R=>R>0).reduce((R,V)=>R+V,0)]).sort((P,R)=>P[1]-R[1])[0])==null?void 0:j[0];M&&(z=M);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},aO=new Set(["left","top"]);async function lO(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Kn(n),a=In(n),l=fr(n)==="y",c=aO.has(s)?-1:1,u=i&&l?-1:1,d=Zr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const cO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await lO(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},uO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:h=>{let{x:y,y:b}=h;return{x:y,y:b}}},...l}=Zr(e,t),c={x:n,y:r},u=await ja(t,l),d=fr(Kn(o)),f=pv(d);let p=c[f],g=c[d];if(i){const h=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+u[h],x=p-u[y];p=zu(b,p,x)}if(s){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=g+u[h],x=g-u[y];g=zu(b,g,x)}const m=a.fn({...t,[f]:p,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}},dO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Zr(e,t),u=await ja(t,c),d=Kn(o),f=In(o),p=fr(o)==="y",{width:g,height:m}=i.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,h=f==="end"?"top":"bottom");const b=m-u.top-u.bottom,x=g-u.left-u.right,E=wr(m-u[h],b),S=wr(g-u[y],x),I=!t.middlewareData.shift;let w=E,C=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const O=ln(u.left,0),N=ln(u.right,0),L=ln(u.top,0),j=ln(u.bottom,0);p?C=g-2*(O!==0||N!==0?O+N:ln(u.left,u.right)):w=m-2*(L!==0||j!==0?L+j:ln(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:w});const A=await s.getDimensions(a.floating);return g!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Rv(e){const t=Zt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ot(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Aa(n)!==i||Aa(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ed(e){return qe(e)?e:e.contextElement}function jo(e){const t=ed(e);if(!ot(t))return Gn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Rv(t);let s=(i?Aa(n.width):n.width)/r,a=(i?Aa(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const fO=Gn(0);function jv(e){const t=Nt(e);return!Ki()||!t.visualViewport?fO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nt(e)?!1:t}function Qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ed(e);let s=Gn(1);t&&(r?qe(r)&&(s=jo(r)):s=jo(e));const a=pO(i,n,r)?jv(i):Gn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Nt(i),p=r&&qe(r)?Nt(r):r;let g=f,m=ju(g);for(;m&&r&&p!==g;){const h=jo(m),y=m.getBoundingClientRect(),b=Zt(m),x=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*h.x,E=y.top+(m.clientTop+parseFloat(b.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=E,g=Nt(m),m=ju(g)}}return Da({width:u,height:d,x:l,y:c})}function za(e,t){const n=Pa(e).scrollLeft;return t?t.left+n:Qr(qn(e)).left+n}function zv(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-za(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function hO(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=qn(r),a=t?Ia(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Gn(1);const u=Gn(0),d=ot(r);if((d||!d&&!i)&&((Wn(r)!=="body"||Yr(s))&&(l=Pa(r)),ot(r))){const p=Qr(r);c=jo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=s&&!d&&!i?zv(s,l):Gn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function mO(e){return Array.from(e.getClientRects())}function gO(e){const t=qn(e),n=Pa(e),r=e.ownerDocument.body,o=ln(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ln(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+za(e);const a=-n.scrollTop;return Zt(r).direction==="rtl"&&(s+=ln(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Bv=25;function vO(e,t){const n=Nt(e),r=qn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Ki();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=za(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=Bv&&(i-=g)}else c<=Bv&&(i+=c);return{width:i,height:s,x:a,y:l}}const yO=new Set(["absolute","fixed"]);function bO(e,t){const n=Qr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ot(e)?jo(e):Gn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Hv(e,t,n){let r;if(t==="viewport")r=vO(e,n);else if(t==="document")r=gO(qn(e));else if(qe(t))r=bO(t,n);else{const o=jv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Da(r)}function Wv(e,t){const n=Un(e);return n===t||!qe(n)||vn(n)?!1:Zt(n).position==="fixed"||Wv(n,t)}function xO(e,t){const n=t.get(e);if(n)return n;let r=kn(e,[],!1).filter(a=>qe(a)&&Wn(a)!=="body"),o=null;const i=Zt(e).position==="fixed";let s=i?Un(e):e;for(;qe(s)&&!vn(s);){const a=Zt(s),l=Ru(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&yO.has(o.position)||Yr(s)&&!l&&Wv(e,s))?r=r.filter(u=>u!==s):o=a,s=Un(s)}return t.set(e,r),r}function wO(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Ia(t)?[]:xO(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Hv(t,u,o);return c.top=ln(d.top,c.top),c.right=wr(d.right,c.right),c.bottom=wr(d.bottom,c.bottom),c.left=ln(d.left,c.left),c},Hv(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function SO(e){const{width:t,height:n}=Rv(e);return{width:t,height:n}}function EO(e,t,n){const r=ot(t),o=qn(t),i=n==="fixed",s=Qr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Gn(0);function c(){l.x=za(o)}if(r||!r&&!i)if((Wn(t)!=="body"||Yr(o))&&(a=Pa(t)),r){const p=Qr(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?zv(o,a):Gn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function td(e){return Zt(e).position==="static"}function qv(e,t){if(!ot(e)||Zt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qn(e)===n&&(n=n.ownerDocument.body),n}function Uv(e,t){const n=Nt(e);if(Ia(e))return n;if(!ot(e)){let o=Un(e);for(;o&&!vn(o);){if(qe(o)&&!td(o))return o;o=Un(o)}return n}let r=qv(e,t);for(;r&&sA(r)&&td(r);)r=qv(r,t);return r&&vn(r)&&td(r)&&!Ru(r)?n:r||dA(e)||n}const TO=async function(e){const t=this.getOffsetParent||Uv,n=this.getDimensions,r=await n(e.floating);return{reference:EO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function CO(e){return Zt(e).direction==="rtl"}const kO={convertOffsetParentRelativeRectToViewportRelativeRect:hO,getDocumentElement:qn,getClippingRect:wO,getOffsetParent:Uv,getElementRects:TO,getClientRects:mO,getDimensions:SO,getScale:jo,isElement:qe,isRTL:CO};function Gv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function IO(e,t){let n=null,r;const o=qn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const g=$o(d),m=$o(o.clientWidth-(u+f)),h=$o(o.clientHeight-(d+p)),y=$o(u),x={rootMargin:-g+"px "+-m+"px "+-h+"px "+-y+"px",threshold:ln(0,wr(1,l))||1};let E=!0;function S(I){const w=I[0].intersectionRatio;if(w!==l){if(!E)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!Gv(c,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),i}function zo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ed(e),u=o||i?[...c?kn(c):[],...kn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?IO(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let g,m=l?Qr(e):null;l&&h();function h(){const y=Qr(e);m&&!Gv(m,y)&&n(),m=y,g=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const PO=cO,AO=iO,OO=uO,_O=sO,DO=dO,Kv=rO,MO=(e,t,n)=>{const r=new Map,o={platform:kO,...n},i={...o.platform,_c:r};return nO(e,t,{...o,platform:i})};var NO=typeof document<"u",FO=function(){},Ba=NO?T.useLayoutEffect:FO;function Ha(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ha(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ha(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Yv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zv(e,t){const n=Yv(e);return Math.round(t*n)/n}function nd(e){const t=k.useRef(e);return Ba(()=>{t.current=e}),t}function LO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=k.useState(r);Ha(f,r)||p(r);const[g,m]=k.useState(null),[h,y]=k.useState(null),b=k.useCallback(P=>{P!==I.current&&(I.current=P,m(P))},[]),x=k.useCallback(P=>{P!==w.current&&(w.current=P,y(P))},[]),E=i||g,S=s||h,I=k.useRef(null),w=k.useRef(null),C=k.useRef(u),A=l!=null,O=nd(l),N=nd(o),L=nd(c),j=k.useCallback(()=>{if(!I.current||!w.current)return;const P={placement:t,strategy:n,middleware:f};N.current&&(P.platform=N.current),MO(I.current,w.current,P).then(R=>{const V={...R,isPositioned:L.current!==!1};_.current&&!Ha(C.current,V)&&(C.current=V,yr.flushSync(()=>{d(V)}))})},[f,t,n,N,L]);Ba(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);const _=k.useRef(!1);Ba(()=>(_.current=!0,()=>{_.current=!1}),[]),Ba(()=>{if(E&&(I.current=E),S&&(w.current=S),E&&S){if(O.current)return O.current(E,S,j);j()}},[E,S,j,O,A]);const F=k.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=k.useMemo(()=>({reference:E,floating:S}),[E,S]),M=k.useMemo(()=>{const P={position:n,left:0,top:0};if(!z.floating)return P;const R=Zv(z.floating,u.x),V=Zv(z.floating,u.y);return a?{...P,transform:"translate("+R+"px, "+V+"px)",...Yv(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:V}},[n,a,z.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:j,refs:F,elements:z,floatingStyles:M}),[u,j,F,z,M])}const $O=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Kv({element:r.current,padding:o}).fn(n):{}:r?Kv({element:r,padding:o}).fn(n):{}}}},Qi=(e,t)=>({...PO(e),options:[e,t]}),rd=(e,t)=>({...OO(e),options:[e,t]}),od=(e,t)=>({..._O(e),options:[e,t]}),Xv=(e,t)=>({...DO(e),options:[e,t]}),VO=(e,t)=>({...AO(e),options:[e,t]}),Qv=(e,t)=>({...$O(e),options:[e,t]});function RO(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Jv=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function jO(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=k.useState(()=>new Set),s=k.useCallback(c=>{i(u=>new Set(u).add(c))},[]),a=k.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=k.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(RO).forEach((d,f)=>{c.set(d,f)}),c},[o]);return v.jsx(Jv.Provider,{value:k.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function ey(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=k.useContext(Jv),[a,l]=k.useState(null),c=k.useRef(null),u=k.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const p=t!==void 0;s.current[a]=p?t:(f=d?.textContent)!=null?f:null}},[a,i,s,t]);return Xe(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Xe(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:a??-1}),[a,u])}const zO="data-floating-ui-focusable",ty="active",ny="selected",Ji="ArrowLeft",es="ArrowRight",ry="ArrowUp",Wa="ArrowDown",BO={...k};let oy=!1,HO=0;const iy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+HO++;function WO(){const[e,t]=k.useState(()=>oy?iy():void 0);return Xe(()=>{e==null&&t(iy())},[]),k.useEffect(()=>{oy=!0},[]),e}const ts=BO.useId||WO;let ns;process.env.NODE_ENV!=="production"&&(ns=new Set);function qa(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.warn(o)}}function qO(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.error(o)}}const sy=k.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:g,...m}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||qa("The `ref` prop is required for `FloatingArrow`."));const y=ts(),[b,x]=k.useState(!1);if(Xe(()=>{if(!o)return;Zt(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[E,S]=r.split("-"),I=E==="top"||E==="bottom";let w=d;(I&&s!=null&&s.x||!I&&s!=null&&s.y)&&(w=null);const C=u*2,A=C/2,O=a/2*(c/-8+1),N=l/2*c/4,L=!!p,j=w&&S==="end"?"bottom":"top";let _=w&&S==="end"?"right":"left";w&&b&&(_=S==="end"?"left":"right");const F=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=p||"M0,0"+(" H"+a)+(" L"+(a-O)+","+(l-N))+(" Q"+a/2+","+l+" "+O+","+(l-N))+" Z",P={top:L?"rotate(180deg)":"",left:L?"rotate(90deg)":"rotate(-90deg)",bottom:L?"":"rotate(180deg)",right:L?"rotate(-90deg)":"rotate(90deg)"}[E];return v.jsxs("svg",{...h,"aria-hidden":!0,ref:n,width:L?a:a+C,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[_]:F,[j]:z,[E]:I||L?"100%":"calc(100% - "+C/2+"px)",transform:[P,g].filter(R=>!!R).join(" "),...m},children:[C>0&&v.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:C+(p?0:1),d:M}),v.jsx("path",{stroke:C&&!p?h.fill:"none",d:M}),v.jsx("clipPath",{id:y,children:v.jsx("rect",{x:-A,y:A*(L?-1:1),width:a+C,height:a})})]})});function ay(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const ly=k.createContext(null),cy=k.createContext(null),Sr=()=>{var e;return((e=k.useContext(ly))==null?void 0:e.id)||null},Er=()=>k.useContext(cy);function UO(e){const t=ts(),n=Er(),o=Sr();return Xe(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function GO(e){const{children:t,id:n}=e,r=Sr();return v.jsx(ly.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function KO(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(s=>{n.current=[...n.current,s]},[]),o=k.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),[i]=k.useState(()=>ay());return v.jsx(cy.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function Jr(e){return"data-floating-ui-"+e}function Wt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const uy=Jr("safe-polygon");function id(e,t,n){if(n&&!Ro(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function sd(e){return typeof e=="function"?e():e}function dy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Er(),g=Sr(),m=zt(c),h=zt(l),y=zt(n),b=zt(d),x=k.useRef(),E=k.useRef(-1),S=k.useRef(),I=k.useRef(-1),w=k.useRef(!0),C=k.useRef(!1),A=k.useRef(()=>{}),O=k.useRef(!1),N=xt(()=>{var M;const P=(M=o.current.openEvent)==null?void 0:M.type;return P?.includes("mouse")&&P!=="mousedown"});k.useEffect(()=>{if(!a)return;function M(P){let{open:R}=P;R||(Wt(E),Wt(I),w.current=!0,O.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[a,i]),k.useEffect(()=>{if(!a||!m.current||!n)return;function M(R){N()&&r(!1,R,"hover")}const P=Bt(s.floating).documentElement;return P.addEventListener("mouseleave",M),()=>{P.removeEventListener("mouseleave",M)}},[s.floating,n,r,a,m,N]);const L=k.useCallback(function(M,P,R){P===void 0&&(P=!0),R===void 0&&(R="hover");const V=id(h.current,"close",x.current);V&&!S.current?(Wt(E),E.current=window.setTimeout(()=>r(!1,M,R),V)):P&&(Wt(E),r(!1,M,R))},[h,r]),j=xt(()=>{A.current(),S.current=void 0}),_=xt(()=>{if(C.current){const M=Bt(s.floating).body;M.style.pointerEvents="",M.removeAttribute(uy),C.current=!1}}),F=xt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);k.useEffect(()=>{if(!a)return;function M(U){if(Wt(E),w.current=!1,u&&!Ro(x.current)||sd(b.current)>0&&!id(h.current,"open"))return;const B=id(h.current,"open",x.current);B?E.current=window.setTimeout(()=>{y.current||r(!0,U,"hover")},B):n||r(!0,U,"hover")}function P(U){if(F()){_();return}A.current();const B=Bt(s.floating);if(Wt(I),O.current=!1,m.current&&o.current.floatingContext){n||Wt(E),S.current=m.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){_(),j(),F()||L(U,!0,"safe-polygon")}});const ne=S.current;B.addEventListener("mousemove",ne),A.current=()=>{B.removeEventListener("mousemove",ne)};return}(x.current!=="touch"||!jt(s.floating,U.relatedTarget))&&L(U)}function R(U){F()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){_(),j(),F()||L(U)}})(U))}function V(){Wt(E)}function G(U){F()||L(U,!1)}if(qe(s.domReference)){const U=s.domReference,B=s.floating;return n&&U.addEventListener("mouseleave",R),f&&U.addEventListener("mousemove",M,{once:!0}),U.addEventListener("mouseenter",M),U.addEventListener("mouseleave",P),B&&(B.addEventListener("mouseleave",R),B.addEventListener("mouseenter",V),B.addEventListener("mouseleave",G)),()=>{n&&U.removeEventListener("mouseleave",R),f&&U.removeEventListener("mousemove",M),U.removeEventListener("mouseenter",M),U.removeEventListener("mouseleave",P),B&&(B.removeEventListener("mouseleave",R),B.removeEventListener("mouseenter",V),B.removeEventListener("mouseleave",G))}}},[s,a,e,u,f,L,j,_,r,n,y,p,h,m,o,F,b]),Xe(()=>{var M;if(a&&n&&(M=m.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&N()){C.current=!0;const R=s.floating;if(qe(s.domReference)&&R){var P;const V=Bt(s.floating).body;V.setAttribute(uy,"");const G=s.domReference,U=p==null||(P=p.nodesRef.current.find(B=>B.id===g))==null||(P=P.context)==null?void 0:P.elements.floating;return U&&(U.style.pointerEvents=""),V.style.pointerEvents="none",G.style.pointerEvents="auto",R.style.pointerEvents="auto",()=>{V.style.pointerEvents="",G.style.pointerEvents="",R.style.pointerEvents=""}}}},[a,n,g,s,p,m,N]),Xe(()=>{n||(x.current=void 0,O.current=!1,j(),_())},[n,j,_]),k.useEffect(()=>()=>{j(),Wt(E),Wt(I),_()},[a,s.domReference,j,_]);const z=k.useMemo(()=>{function M(P){x.current=P.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(P){const{nativeEvent:R}=P;function V(){!w.current&&!y.current&&r(!0,R,"hover")}u&&!Ro(x.current)||n||sd(b.current)===0||O.current&&P.movementX**2+P.movementY**2<2||(Wt(I),x.current==="touch"?V():(O.current=!0,I.current=window.setTimeout(V,sd(b.current))))}}},[u,r,n,y,b]);return k.useMemo(()=>a?{reference:z}:{},[a,z])}let fy=0;function eo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(fy);const i=()=>e?.focus({preventScroll:n});o?i():fy=requestAnimationFrame(i)}function ad(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Gi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function YO(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ZO(e){return e?.ownerDocument||document}const Bo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function py(e){return e==="inert"?Bo.inert:e==="aria-hidden"?Bo["aria-hidden"]:Bo.none}let Ua=new WeakSet,Ga={},ld=0;const XO=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,hy=e=>e&&(e.host||hy(e.parentNode)),QO=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=hy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function JO(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=QO(t,e),a=new Set,l=new Set(s),c=[];Ga[o]||(Ga[o]=new WeakMap);const u=Ga[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,g=>{if(Wn(g)!=="script")if(a.has(g))f(g);else{const m=i?g.getAttribute(i):null,h=m!==null&&m!=="false",y=py(i),b=(y.get(g)||0)+1,x=(u.get(g)||0)+1;y.set(g,b),u.set(g,x),c.push(g),b===1&&h&&Ua.add(g),x===1&&g.setAttribute(o,""),!h&&i&&g.setAttribute(i,i==="inert"?"":"true")}})}return ld++,()=>{c.forEach(p=>{const g=py(i),h=(g.get(p)||0)-1,y=(u.get(p)||0)-1;g.set(p,h),u.set(p,y),h||(!Ua.has(p)&&i&&p.removeAttribute(i),Ua.delete(p)),y||p.removeAttribute(o)}),ld--,ld||(Bo.inert=new WeakMap,Bo["aria-hidden"]=new WeakMap,Bo.none=new WeakMap,Ua=new WeakSet,Ga={})}}function my(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ZO(e[0]).body;return JO(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Ka={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ya=k.forwardRef(function(t,n){const[r,o]=k.useState();Xe(()=>{Iv()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Jr("focus-guard")]:"",style:Ka};return v.jsx("span",{...t,...i})}),gy=k.createContext(null),vy=Jr("portal");function e_(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ts(),o=yy(),[i,s]=k.useState(null),a=k.useRef(null);return Xe(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),Xe(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(vy,""),l.appendChild(c),a.current=c,s(c)},[t,r]),Xe(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!ka(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(vy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function to(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=e_({id:n,root:r}),[s,a]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),f=s?.modal,p=s?.open,g=!!s&&!s.modal&&s.open&&o&&!!(r||i);return k.useEffect(()=>{if(!i||!o||f)return;function m(h){i&&Xi(h)&&(h.type==="focusin"?$v:tO)(i)}return i.addEventListener("focusin",m,!0),i.addEventListener("focusout",m,!0),()=>{i.removeEventListener("focusin",m,!0),i.removeEventListener("focusout",m,!0)}},[i,o,f]),k.useEffect(()=>{i&&(p||$v(i))},[p,i]),v.jsxs(gy.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[g&&i&&v.jsx(Ya,{"data-type":"outside",ref:l,onFocus:m=>{if(Xi(m,i)){var h;(h=u.current)==null||h.focus()}else{const y=s?s.domReference:null,b=Lv(y);b?.focus()}}}),g&&i&&v.jsx("span",{"aria-owns":i.id,style:Ka}),i&&yr.createPortal(t,i),g&&i&&v.jsx(Ya,{"data-type":"outside",ref:c,onFocus:m=>{if(Xi(m,i)){var h;(h=d.current)==null||h.focus()}else{const y=s?s.domReference:null,b=Fv(y);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const yy=()=>k.useContext(gy);function by(e){return k.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const t_=20;let Tr=[];function cd(){Tr=Tr.filter(e=>e.isConnected)}function n_(e){cd(),e&&Wn(e)!=="body"&&(Tr.push(e),Tr.length>t_&&(Tr=Tr.slice(-20)))}function xy(){return cd(),Tr[Tr.length-1]}function r_(e){const t=Zi();return Cv(e,t)?e:La(e,t)[0]||e}function wy(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Zi(),i=VA(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return Cv(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const o_=k.forwardRef(function(t,n){return v.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Ka})});function Ho(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:g,onOpenChange:m,events:h,dataRef:y,elements:{domReference:b,floating:x}}=t,E=xt(()=>{var D;return(D=y.current.floatingContext)==null?void 0:D.nodeId}),S=xt(p),I=typeof s=="number"&&s<0,w=Qu(b)&&I,C=XO(),A=C?i:!0,O=!A||C&&f,N=zt(o),L=zt(s),j=zt(a),_=Er(),F=yy(),z=k.useRef(null),M=k.useRef(null),P=k.useRef(!1),R=k.useRef(!1),V=k.useRef(-1),G=k.useRef(-1),U=F!=null,B=$a(x),Y=xt(function(D){return D===void 0&&(D=B),D?La(D,Zi()):[]}),ne=xt(D=>{const ee=Y(D);return N.current.map(Q=>b&&Q==="reference"?b:B&&Q==="floating"?B:ee).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function D(Q){if(Q.key==="Tab"){jt(B,Yn(Bt(B)))&&Y().length===0&&!w&&Ht(Q);const fe=ne(),J=Zn(Q);N.current[0]==="reference"&&J===b&&(Ht(Q),Q.shiftKey?eo(fe[fe.length-1]):eo(fe[1])),N.current[1]==="floating"&&J===B&&Q.shiftKey&&(Ht(Q),eo(fe[0]))}}const ee=Bt(B);return ee.addEventListener("keydown",D),()=>{ee.removeEventListener("keydown",D)}},[r,b,B,c,N,w,Y,ne]),k.useEffect(()=>{if(r||!x)return;function D(ee){const Q=Zn(ee),J=Y().indexOf(Q);J!==-1&&(V.current=J)}return x.addEventListener("focusin",D),()=>{x.removeEventListener("focusin",D)}},[r,x,Y]),k.useEffect(()=>{if(r||!d)return;function D(){R.current=!0,setTimeout(()=>{R.current=!1})}function ee(J){const te=J.relatedTarget,ce=J.currentTarget,ve=Zn(J);queueMicrotask(()=>{const he=E(),ge=!(jt(b,te)||jt(x,te)||jt(te,x)||jt(F?.portalNode,te)||te!=null&&te.hasAttribute(Jr("focus-guard"))||_&&(Xr(_.nodesRef.current,he).find(ie=>{var H,$;return jt((H=ie.context)==null?void 0:H.elements.floating,te)||jt(($=ie.context)==null?void 0:$.elements.domReference,te)})||Ov(_.nodesRef.current,he).find(ie=>{var H,$,re;return[(H=ie.context)==null?void 0:H.elements.floating,$a(($=ie.context)==null?void 0:$.elements.floating)].includes(te)||((re=ie.context)==null?void 0:re.elements.domReference)===te})));if(ce===b&&B&&wy(B,N),l&&ce!==b&&!(ve!=null&&ve.isConnected)&&Yn(Bt(B))===Bt(B).body){ot(B)&&B.focus();const ie=V.current,H=Y(),$=H[ie]||H[H.length-1]||B;ot($)&&$.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(w||!c)&&te&&ge&&!R.current&&te!==xy()&&(P.current=!0,m(!1,J,"focus-out"))})}const Q=!!(!_&&F);function fe(){Wt(G),y.current.insideReactTree=!0,G.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(x&&ot(b))return b.addEventListener("focusout",ee),b.addEventListener("pointerdown",D),x.addEventListener("focusout",ee),Q&&x.addEventListener("focusout",fe,!0),()=>{b.removeEventListener("focusout",ee),b.removeEventListener("pointerdown",D),x.removeEventListener("focusout",ee),Q&&x.removeEventListener("focusout",fe,!0)}},[r,b,x,B,c,_,F,m,d,l,Y,w,E,N,y]);const se=k.useRef(null),oe=k.useRef(null),W=by([se,F?.beforeInsideRef]),q=by([oe,F?.afterInsideRef]);k.useEffect(()=>{var D,ee;if(r||!x)return;const Q=Array.from((F==null||(D=F.portalNode)==null?void 0:D.querySelectorAll("["+Jr("portal")+"]"))||[]),J=(ee=(_?Ov(_.nodesRef.current,E()):[]).find(ve=>{var he;return Qu(((he=ve.context)==null?void 0:he.elements.domReference)||null)}))==null||(ee=ee.context)==null?void 0:ee.elements.domReference,te=[x,J,...Q,...S(),z.current,M.current,se.current,oe.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,N.current.includes("reference")||w?b:null].filter(ve=>ve!=null),ce=c||w?my(te,!O,O):my(te);return()=>{ce()}},[r,b,x,c,N,F,w,A,O,_,E,S]),Xe(()=>{if(r||!ot(B))return;const D=Bt(B),ee=Yn(D);queueMicrotask(()=>{const Q=ne(B),fe=L.current,J=(typeof fe=="number"?Q[fe]:fe.current)||B,te=jt(B,ee);!I&&!te&&g&&eo(J,{preventScroll:J===B})})},[r,g,B,I,ne,L]),Xe(()=>{if(r||!B)return;const D=Bt(B),ee=Yn(D);n_(ee);function Q(te){let{reason:ce,event:ve,nested:he}=te;if(["hover","safe-polygon"].includes(ce)&&ve.type==="mouseleave"&&(P.current=!0),ce==="outside-press")if(he)P.current=!1;else if(_v(ve)||Dv(ve))P.current=!1;else{let ge=!1;document.createElement("div").focus({get preventScroll(){return ge=!0,!1}}),ge?P.current=!1:P.current=!0}}h.on("openchange",Q);const fe=D.createElement("span");fe.setAttribute("tabindex","-1"),fe.setAttribute("aria-hidden","true"),Object.assign(fe.style,Ka),U&&b&&b.insertAdjacentElement("afterend",fe);function J(){if(typeof j.current=="boolean"){const te=b||xy();return te&&te.isConnected?te:fe}return j.current.current||fe}return()=>{h.off("openchange",Q);const te=Yn(D),ce=jt(x,te)||_&&Xr(_.nodesRef.current,E(),!1).some(he=>{var ge;return jt((ge=he.context)==null?void 0:ge.elements.floating,te)}),ve=J();queueMicrotask(()=>{const he=r_(ve);j.current&&!P.current&&ot(he)&&(!(he!==te&&te!==D.body)||ce)&&he.focus({preventScroll:!0}),fe.remove()})}},[r,x,B,j,y,h,_,U,b,E]),k.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(cd)}),[r]),Xe(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:g,onOpenChange:m,domReference:b}),()=>{F.setFocusManagerState(null)}},[r,F,c,g,m,d,b]),Xe(()=>{r||B&&wy(B,N)},[r,B,N]);function X(D){return r||!u||!c?null:v.jsx(o_,{ref:D==="start"?z:M,onClick:ee=>m(!1,ee.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const ue=!r&&A&&(c?!w:!0)&&(U||c);return v.jsxs(v.Fragment,{children:[ue&&v.jsx(Ya,{"data-type":"inside",ref:W,onFocus:D=>{if(c){const Q=ne();eo(o[0]==="reference"?Q[0]:Q[Q.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(P.current=!1,Xi(D,F.portalNode)){const Q=Fv(b);Q?.focus()}else{var ee;(ee=F.beforeOutsideRef.current)==null||ee.focus()}}}),!w&&X("start"),n,X("end"),ue&&v.jsx(Ya,{"data-type":"inside",ref:q,onFocus:D=>{if(c)eo(ne()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(P.current=!0),Xi(D,F.portalNode)){const Q=Lv(b);Q?.focus()}else{var ee;(ee=F.afterOutsideRef.current)==null||ee.focus()}}})]})}let Za=0;const Sy="--floating-ui-scrollbar-width";function i_(){const e=Uu(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Sy,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(Sy),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let Ey=()=>{};const Ty=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Xe(()=>{if(r)return Za++,Za===1&&(Ey=i_()),()=>{Za--,Za===0&&Ey()}},[r]),v.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Cy(e){return ot(e.target)&&e.target.tagName==="BUTTON"}function s_(e){return ot(e.target)&&e.target.tagName==="A"}function ky(e){return Xu(e)}function rs(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=k.useRef(),p=k.useRef(!1),g=k.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){const h=f.current;m.button===0&&a!=="click"&&(Ro(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const h=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Ro(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!u||Cy(m))&&(m.key===" "&&!ky(i)&&(m.preventDefault(),p.current=!0),!s_(m)&&m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Cy(m)||ky(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return k.useMemo(()=>s?{reference:g}:{},[s,g])}function a_(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,d=s.height,f=s.x,p=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=a&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function Iy(e){return e!=null&&e.clientX!=null}function l_(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=k.useRef(!1),f=k.useRef(null),[p,g]=k.useState(),[m,h]=k.useState([]),y=xt((I,w)=>{d.current||r.current.openEvent&&!Iy(r.current.openEvent)||s.setPositionReference(a_(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),b=xt(I=>{c!=null||u!=null||(n?f.current||h([]):y(I.clientX,I.clientY))}),x=Ro(p)?o:n,E=k.useCallback(()=>{if(!x||!a||c!=null||u!=null)return;const I=Nt(o);function w(C){const A=Zn(C);jt(o,A)?(I.removeEventListener("mousemove",w),f.current=null):y(C.clientX,C.clientY)}if(!r.current.openEvent||Iy(r.current.openEvent)){I.addEventListener("mousemove",w);const C=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=C,C}s.setPositionReference(i)},[x,a,c,u,o,r,s,i,y]);k.useEffect(()=>E(),[E,m]),k.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),k.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),Xe(()=>{a&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[a,c,u,y]);const S=k.useMemo(()=>{function I(w){let{pointerType:C}=w;g(C)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return k.useMemo(()=>a?{reference:S}:{},[a,S])}const c_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},u_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Py=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function no(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:g}=t,m=Er(),h=xt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?h:l,b=k.useRef(!1),{escapeKey:x,outsidePress:E}=Py(p),{escapeKey:S,outsidePress:I}=Py(g),w=k.useRef(!1),C=xt(_=>{var F;if(!n||!s||!a||_.key!=="Escape"||w.current)return;const z=(F=i.current.floatingContext)==null?void 0:F.nodeId,M=m?Xr(m.nodesRef.current,z):[];if(!x&&(_.stopPropagation(),M.length>0)){let P=!0;if(M.forEach(R=>{var V;if((V=R.context)!=null&&V.open&&!R.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,UA(_)?_.nativeEvent:_,"escape-key")}),A=xt(_=>{var F;const z=()=>{var M;C(_),(M=Zn(_))==null||M.removeEventListener("keydown",z)};(F=Zn(_))==null||F.addEventListener("keydown",z)}),O=xt(_=>{var F;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||z||typeof y=="function"&&!y(_))return;const P=Zn(_),R="["+Jr("inert")+"]",V=Bt(o.floating).querySelectorAll(R);let G=qe(P)?P:null;for(;G&&!vn(G);){const ne=Un(G);if(vn(ne)||!qe(ne))break;G=ne}if(V.length&&qe(P)&&!HA(P)&&!jt(P,o.floating)&&Array.from(V).every(ne=>!jt(G,ne)))return;if(ot(P)&&j){const ne=vn(P),se=Zt(P),oe=/auto|scroll/,W=ne||oe.test(se.overflowX),q=ne||oe.test(se.overflowY),X=W&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,ue=q&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,D=se.direction==="rtl",ee=ue&&(D?_.offsetX<=P.offsetWidth-P.clientWidth:_.offsetX>P.clientWidth),Q=X&&_.offsetY>P.clientHeight;if(ee||Q)return}const U=(F=i.current.floatingContext)==null?void 0:F.nodeId,B=m&&Xr(m.nodesRef.current,U).some(ne=>{var se;return Zu(_,(se=ne.context)==null?void 0:se.elements.floating)});if(Zu(_,o.floating)||Zu(_,o.domReference)||B)return;const Y=m?Xr(m.nodesRef.current,U):[];if(Y.length>0){let ne=!0;if(Y.forEach(se=>{var oe;if((oe=se.context)!=null&&oe.open&&!se.context.dataRef.current.__outsidePressBubbles){ne=!1;return}}),!ne)return}r(!1,_,"outside-press")}),N=xt(_=>{var F;const z=()=>{var M;O(_),(M=Zn(_))==null||M.removeEventListener(c,z)};(F=Zn(_))==null||F.addEventListener(c,z)});k.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=E;let _=-1;function F(V){r(!1,V,"ancestor-scroll")}function z(){window.clearTimeout(_),w.current=!0}function M(){_=window.setTimeout(()=>{w.current=!1},Ki()?5:0)}const P=Bt(o.floating);a&&(P.addEventListener("keydown",S?A:C,S),P.addEventListener("compositionstart",z),P.addEventListener("compositionend",M)),y&&P.addEventListener(c,I?N:O,I);let R=[];return f&&(qe(o.domReference)&&(R=kn(o.domReference)),qe(o.floating)&&(R=R.concat(kn(o.floating))),!qe(o.reference)&&o.reference&&o.reference.contextElement&&(R=R.concat(kn(o.reference.contextElement)))),R=R.filter(V=>{var G;return V!==((G=P.defaultView)==null?void 0:G.visualViewport)}),R.forEach(V=>{V.addEventListener("scroll",F,{passive:!0})}),()=>{a&&(P.removeEventListener("keydown",S?A:C,S),P.removeEventListener("compositionstart",z),P.removeEventListener("compositionend",M)),y&&P.removeEventListener(c,I?N:O,I),R.forEach(V=>{V.removeEventListener("scroll",F)}),window.clearTimeout(_)}},[i,o,a,y,c,n,r,f,s,x,E,C,S,A,O,I,N]),k.useEffect(()=>{i.current.insideReactTree=!1},[i,y,c]);const L=k.useMemo(()=>({onKeyDown:C,...u&&{[c_[d]]:_=>{r(!1,_.nativeEvent,"reference-press")},...d!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}}}}),[C,r,u,d]),j=k.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[u_[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return k.useMemo(()=>s?{reference:L,floating:j}:{},[s,L,j])}function d_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ts(),i=k.useRef({}),[s]=k.useState(()=>ay()),a=Sr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!qe(p)&&qO("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=k.useState(r.reference),u=xt((p,g,m)=>{i.current.openEvent=p?g:void 0,s.emit("openchange",{open:p,event:g,reason:m,nested:a}),n?.(p,g,m)}),d=k.useMemo(()=>({setPositionReference:c}),[]),f=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Cr(e){e===void 0&&(e={});const{nodeId:t}=e,n=d_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=k.useState(null),[a,l]=k.useState(null),u=o?.domReference||i,d=k.useRef(null),f=Er();Xe(()=>{u&&(d.current=u)},[u]);const p=LO({...e,elements:{...o,...a&&{reference:a}}}),g=k.useCallback(x=>{const E=qe(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(E),p.refs.setReference(E)},[p.refs]),m=k.useCallback(x=>{(qe(x)||x===null)&&(d.current=x,s(x)),(qe(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!qe(x))&&p.refs.setReference(x)},[p.refs]),h=k.useMemo(()=>({...p.refs,setReference:m,setPositionReference:g,domReference:d}),[p.refs,m,g]),y=k.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=k.useMemo(()=>({...p,...r,refs:h,elements:y,nodeId:t}),[p,h,y,t,r]);return Xe(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(E=>E.id===t);x&&(x.context=b)}),k.useMemo(()=>({...p,context:b,refs:h,elements:y}),[p,h,y,b])}function ud(){return RA()&&Iv()}function f_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=k.useRef(!1),u=k.useRef(-1),d=k.useRef(!0);k.useEffect(()=>{if(!a)return;const p=Nt(s.domReference);function g(){!n&&ot(s.domReference)&&s.domReference===Yn(Bt(s.domReference))&&(c.current=!0)}function m(){d.current=!0}function h(){d.current=!1}return p.addEventListener("blur",g),ud()&&(p.addEventListener("keydown",m,!0),p.addEventListener("pointerdown",h,!0)),()=>{p.removeEventListener("blur",g),ud()&&(p.removeEventListener("keydown",m,!0),p.removeEventListener("pointerdown",h,!0))}},[s.domReference,n,a]),k.useEffect(()=>{if(!a)return;function p(g){let{reason:m}=g;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,a]),k.useEffect(()=>()=>{Wt(u)},[]);const f=k.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const g=Zn(p.nativeEvent);if(l&&qe(g)){if(ud()&&!p.relatedTarget){if(!d.current&&!Xu(g))return}else if(!WA(g))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const g=p.relatedTarget,m=p.nativeEvent,h=qe(g)&&g.hasAttribute(Jr("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const b=Yn(s.domReference?s.domReference.ownerDocument:document);!g&&b===s.domReference||jt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,b)||jt(s.domReference,b)||h||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}function dd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ty]:s,[ny]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[zO]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[ty,ny].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(h=>h(...g)).find(h=>h!==void 0)}}}else s[c]=u}),s),{})}}function kr(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=k.useCallback(a=>dd(a,e,"reference"),t),i=k.useCallback(a=>dd(a,e,"floating"),n),s=k.useCallback(a=>dd(a,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const p_="Escape";function Xa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Qa(e,t){return Xa(t,e===ry||e===Wa,e===Ji||e===es)}function fd(e,t,n){return Xa(t,e===Wa,n?e===Ji:e===es)||e==="Enter"||e===" "||e===""}function Ay(e,t,n){return Xa(t,n?e===Ji:e===es,e===Wa)}function Oy(e,t,n,r){const o=n?e===es:e===Ji,i=e===ry;return t==="both"||t==="horizontal"&&r&&r>1?e===p_:Xa(t,o,i)}function Ja(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:g=!1,virtual:m=!1,focusItemOnOpen:h="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:E="vertical",parentOrientation:S,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:C,itemSizes:A,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||qa("`useListNavigation` looping must be enabled to allow escaping."),m||qa("`useListNavigation` must be virtual to allow escaping.")),E==="vertical"&&I>1&&qa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const N=$a(o.floating),L=zt(N),j=Sr(),_=Er();Xe(()=>{e.dataRef.current.orientation=E},[e,E]);const F=xt(()=>{l(P.current===-1?null:P.current)}),z=Qu(o.domReference),M=k.useRef(h),P=k.useRef(u??-1),R=k.useRef(null),V=k.useRef(!0),G=k.useRef(F),U=k.useRef(!!o.floating),B=k.useRef(n),Y=k.useRef(!1),ne=k.useRef(!1),se=zt(x),oe=zt(n),W=zt(w),q=zt(u),[X,ue]=k.useState(),[D,ee]=k.useState(),Q=xt(()=>{function ie(me){if(m){var Ce;(Ce=me.id)!=null&&Ce.endsWith("-fui-option")&&(me.id=i+"-"+Math.random().toString(16).slice(2,10)),ue(me.id),_?.events.emit("virtualfocus",me),C&&(C.current=me)}else eo(me,{sync:Y.current,preventScroll:!0})}const H=s.current[P.current],$=ne.current;H&&ie(H),(Y.current?me=>me():requestAnimationFrame)(()=>{const me=s.current[P.current]||H;if(!me)return;H||ie(me);const Ce=W.current;Ce&&J&&($||!V.current)&&(me.scrollIntoView==null||me.scrollIntoView(typeof Ce=="boolean"?{block:"nearest",inline:"nearest"}:Ce))})});Xe(()=>{c&&(n&&o.floating?M.current&&u!=null&&(ne.current=!0,P.current=u,F()):U.current&&(P.current=-1,G.current()))},[c,n,o.floating,u,F]),Xe(()=>{if(c&&n&&o.floating)if(a==null){if(Y.current=!1,q.current!=null)return;if(U.current&&(P.current=-1,Q()),(!B.current||!U.current)&&M.current&&(R.current!=null||M.current===!0&&R.current==null)){let ie=0;const H=()=>{s.current[0]==null?(ie<2&&(ie?requestAnimationFrame:queueMicrotask)(H),ie++):(P.current=R.current==null||fd(R.current,E,g)||p?Ju(s,se.current):Mv(s,se.current),R.current=null,F())};H()}}else Yi(s,a)||(P.current=a,Q(),ne.current=!1)},[c,n,o.floating,a,q,p,s,E,g,F,Q,se]),Xe(()=>{var ie;if(!c||o.floating||!_||m||!U.current)return;const H=_.nodesRef.current,$=(ie=H.find(Ce=>Ce.id===j))==null||(ie=ie.context)==null?void 0:ie.elements.floating,re=Yn(Bt(o.floating)),me=H.some(Ce=>Ce.context&&jt(Ce.context.elements.floating,re));$&&!me&&V.current&&$.focus({preventScroll:!0})},[c,o.floating,_,j,m]),Xe(()=>{if(!c||!_||!m||j)return;function ie(H){ee(H.id),C&&(C.current=H)}return _.events.on("virtualfocus",ie),()=>{_.events.off("virtualfocus",ie)}},[c,_,m,j,C]),Xe(()=>{G.current=F,B.current=n,U.current=!!o.floating}),Xe(()=>{n||(R.current=null,M.current=h)},[n,h]);const fe=a!=null,J=k.useMemo(()=>{function ie($){if(!oe.current)return;const re=s.current.indexOf($);re!==-1&&P.current!==re&&(P.current=re,F())}return{onFocus($){let{currentTarget:re}=$;Y.current=!0,ie(re)},onClick:$=>{let{currentTarget:re}=$;return re.focus({preventScroll:!0})},onMouseMove($){let{currentTarget:re}=$;Y.current=!0,ne.current=!1,y&&ie(re)},onPointerLeave($){let{pointerType:re}=$;if(!(!V.current||re==="touch")&&(Y.current=!0,!!y&&(P.current=-1,F(),!m))){var me;(me=L.current)==null||me.focus({preventScroll:!0})}}}},[oe,L,y,s,F,m]),te=k.useCallback(()=>{var ie;return S??(_==null||(ie=_.nodesRef.current.find(H=>H.id===j))==null||(ie=ie.context)==null||(ie=ie.dataRef)==null?void 0:ie.current.orientation)},[j,_,S]),ce=xt(ie=>{if(V.current=!1,Y.current=!0,ie.which===229||!oe.current&&ie.currentTarget===L.current)return;if(p&&Oy(ie.key,E,g,I)){Qa(ie.key,te())||Ht(ie),r(!1,ie.nativeEvent,"list-navigation"),ot(o.domReference)&&(m?_?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const H=P.current,$=Ju(s,x),re=Mv(s,x);if(z||(ie.key==="Home"&&(Ht(ie),P.current=$,F()),ie.key==="End"&&(Ht(ie),P.current=re,F())),I>1){const me=A||Array.from({length:s.current.length},()=>({width:1,height:1})),Ce=QA(me,I,O),Me=Ce.findIndex(ft=>ft!=null&&!Ra(s,ft,x)),Ne=Ce.reduce((ft,en,cr)=>en!=null&&!Ra(s,en,x)?cr:ft,-1),bt=Ce[XA({current:Ce.map(ft=>ft!=null?s.current[ft]:null)},{event:ie,orientation:E,loop:f,rtl:g,cols:I,disabledIndices:eO([...(typeof x!="function"?x:null)||s.current.map((ft,en)=>Ra(s,en,x)?en:void 0),void 0],Ce),minIndex:Me,maxIndex:Ne,prevIndex:JA(P.current>re?$:P.current,me,Ce,I,ie.key===Wa?"bl":ie.key===(g?Ji:es)?"tr":"tl"),stopEvent:!0})];if(bt!=null&&(P.current=bt,F()),E==="both")return}if(Qa(ie.key,E)){if(Ht(ie),n&&!m&&Yn(ie.currentTarget.ownerDocument)===ie.currentTarget){P.current=fd(ie.key,E,g)?$:re,F();return}fd(ie.key,E,g)?f?P.current=H>=re?d&&H!==s.current.length?-1:$:Kt(s,{startingIndex:H,disabledIndices:x}):P.current=Math.min(re,Kt(s,{startingIndex:H,disabledIndices:x})):f?P.current=H<=$?d&&H!==-1?s.current.length:re:Kt(s,{startingIndex:H,decrement:!0,disabledIndices:x}):P.current=Math.max($,Kt(s,{startingIndex:H,decrement:!0,disabledIndices:x})),Yi(s,P.current)&&(P.current=-1),F()}}),ve=k.useMemo(()=>m&&n&&fe&&{"aria-activedescendant":D||X},[m,n,fe,D,X]),he=k.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...z?{}:ve,onKeyDown:ce,onPointerMove(){V.current=!0}}),[ve,ce,E,z]),ge=k.useMemo(()=>{function ie($){h==="auto"&&_v($.nativeEvent)&&(M.current=!0)}function H($){M.current=h,h==="auto"&&Dv($.nativeEvent)&&(M.current=!0)}return{...ve,onKeyDown($){V.current=!1;const re=$.key.startsWith("Arrow"),me=["Home","End"].includes($.key),Ce=re||me,Me=Ay($.key,E,g),Ne=Oy($.key,E,g,I),bt=Ay($.key,te(),g),ft=Qa($.key,E),en=(p?bt:ft)||$.key==="Enter"||$.key.trim()==="";if(m&&n){const K=_?.nodesRef.current.find(Re=>Re.parentId==null),Z=_&&K?qA(_.nodesRef.current,K.id):null;if(Ce&&Z&&C){const Re=new KeyboardEvent("keydown",{key:$.key,bubbles:!0});if(Me||Ne){var cr,jn;const rt=((cr=Z.context)==null?void 0:cr.elements.domReference)===$.currentTarget,ct=Ne&&!rt?(jn=Z.context)==null?void 0:jn.elements.domReference:Me?s.current.find(Fe=>Fe?.id===X):null;ct&&(Ht($),ct.dispatchEvent(Re),ee(void 0))}if((ft||me)&&Z.context&&Z.context.open&&Z.parentId&&$.currentTarget!==Z.context.elements.domReference){var zn;Ht($),(zn=Z.context.elements.domReference)==null||zn.dispatchEvent(Re);return}}return ce($)}if(!(!n&&!b&&re)){if(en){const K=Qa($.key,te());R.current=p&&K?null:$.key}if(p){bt&&(Ht($),n?(P.current=Ju(s,se.current),F()):r(!0,$.nativeEvent,"list-navigation"));return}ft&&(u!=null&&(P.current=u),Ht($),!n&&b?r(!0,$.nativeEvent,"list-navigation"):ce($),n&&F())}},onFocus(){n&&!m&&(P.current=-1,F())},onPointerDown:H,onPointerEnter:H,onMouseDown:ie,onClick:ie}},[X,ve,I,ce,se,h,s,p,F,r,n,b,E,te,g,u,_,m,C]);return k.useMemo(()=>c?{reference:ge,floating:he,item:J}:{},[c,ge,he,J])}const h_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ro(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=ts(),u=((n=i.domReference)==null?void 0:n.id)||c,d=k.useMemo(()=>{var b;return((b=$a(i.floating))==null?void 0:b.id)||s},[i.floating,s]),f=(r=h_.get(l))!=null?r:l,g=Sr()!=null,m=k.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&g&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,g,o,u,l]),h=k.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),y=k.useCallback(b=>{let{active:x,selected:E}=b;const S={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...S,"aria-selected":E}}return{}},[d,l]);return k.useMemo(()=>a?{reference:m,floating:h,item:y}:{},[a,m,h,y])}const _y=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Wo(e,t){return typeof e=="function"?e(t):e}function m_(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function g_(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=k.useState("unmounted"),c=m_(n,s);return!c&&a==="close"&&l("unmounted"),Xe(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{yr.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Dy(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=k.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[p,g]=k.useState(()=>({...Wo(i,c),...Wo(n,c)})),{isMounted:m,status:h}=g_(e,{duration:s}),y=zt(n),b=zt(r),x=zt(o),E=zt(i);return Xe(()=>{const S=Wo(y.current,c),I=Wo(x.current,c),w=Wo(E.current,c),C=Wo(b.current,c)||Object.keys(S).reduce((A,O)=>(A[O]="",A),{});if(h==="initial"&&g(A=>({transitionProperty:A.transitionProperty,...w,...S})),h==="open"&&g({transitionProperty:Object.keys(C).map(_y).join(","),transitionDuration:d+"ms",...w,...C}),h==="close"){const A=I||S;g({transitionProperty:Object.keys(A).map(_y).join(","),transitionDuration:f+"ms",...w,...A})}},[f,x,y,b,E,d,h,c]),{isMounted:m,styles:p}}function v_(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,g=k.useRef(-1),m=k.useRef(""),h=k.useRef((n=p??s)!=null?n:-1),y=k.useRef(null),b=xt(a),x=xt(l),E=zt(u),S=zt(f);Xe(()=>{r&&(Wt(g),y.current=null,m.current="")},[r]),Xe(()=>{if(r&&m.current===""){var O;h.current=(O=p??s)!=null?O:-1}},[r,p,s]);const I=xt(O=>{O?o.current.typing||(o.current.typing=O,x(O)):o.current.typing&&(o.current.typing=O,x(O))}),w=xt(O=>{function N(z,M,P){const R=E.current?E.current(M,P):M.find(V=>V?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return R?z.indexOf(R):-1}const L=i.current;if(m.current.length>0&&m.current[0]!==" "&&(N(L,L,m.current)===-1?I(!1):O.key===" "&&Ht(O)),L==null||S.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Ht(O),I(!0)),L.every(z=>{var M,P;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((P=z[1])==null?void 0:P.toLocaleLowerCase()):!0})&&m.current===O.key&&(m.current="",h.current=y.current),m.current+=O.key,Wt(g),g.current=window.setTimeout(()=>{m.current="",h.current=y.current,I(!1)},d);const _=h.current,F=N(L,[...L.slice((_||0)+1),...L.slice(0,(_||0)+1)],m.current);F!==-1?(b(F),y.current=F):O.key!==" "&&(m.current="",I(!1))}),C=k.useMemo(()=>({onKeyDown:w}),[w]),A=k.useMemo(()=>({onKeyDown:w,onKeyUp(O){O.key===" "&&I(!1)}}),[w,I]);return k.useMemo(()=>c?{reference:C,floating:A}:{},[c,C,A])}function My(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...My(e,o.id,n)])}function Ny(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function y_(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Fy(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,s=null,a=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),g=p-l;if(s===null||a===null||g===0)return s=d,a=f,l=p,null;const m=d-s,h=f-a,b=Math.sqrt(m*m+h*h)/g;return s=d,a=f,l=p,b}const u=d=>{let{x:f,y:p,placement:g,elements:m,onClose:h,nodeId:y,tree:b}=d;return function(E){function S(){Wt(o),h()}if(Wt(o),!m.domReference||!m.floating||g==null||f==null||p==null)return;const{clientX:I,clientY:w}=E,C=[I,w],A=YO(E),O=E.type==="mouseleave",N=ad(m.floating,A),L=ad(m.domReference,A),j=m.domReference.getBoundingClientRect(),_=m.floating.getBoundingClientRect(),F=g.split("-")[0],z=f>_.right-_.width/2,M=p>_.bottom-_.height/2,P=y_(C,j),R=_.width>j.width,V=_.height>j.height,G=(R?j:_).left,U=(R?j:_).right,B=(V?j:_).top,Y=(V?j:_).bottom;if(N&&(i=!0,!O))return;if(L&&(i=!1),L&&!O){i=!0;return}if(O&&qe(E.relatedTarget)&&ad(m.floating,E.relatedTarget)||b&&My(b.nodesRef.current,y).length)return;if(F==="top"&&p>=j.bottom-1||F==="bottom"&&p<=j.top+1||F==="left"&&f>=j.right-1||F==="right"&&f<=j.left+1)return S();let ne=[];switch(F){case"top":ne=[[G,j.top+1],[G,_.bottom-1],[U,_.bottom-1],[U,j.top+1]];break;case"bottom":ne=[[G,_.top+1],[G,j.bottom-1],[U,j.bottom-1],[U,_.top+1]];break;case"left":ne=[[_.right-1,Y],[_.right-1,B],[j.left+1,B],[j.left+1,Y]];break;case"right":ne=[[j.right-1,Y],[j.right-1,B],[_.left+1,B],[_.left+1,Y]];break}function se(oe){let[W,q]=oe;switch(F){case"top":{const X=[R?W+t/2:z?W+t*4:W-t*4,q+t+1],ue=[R?W-t/2:z?W+t*4:W-t*4,q+t+1],D=[[_.left,z||R?_.bottom-t:_.top],[_.right,z?R?_.bottom-t:_.top:_.bottom-t]];return[X,ue,...D]}case"bottom":{const X=[R?W+t/2:z?W+t*4:W-t*4,q-t],ue=[R?W-t/2:z?W+t*4:W-t*4,q-t],D=[[_.left,z||R?_.top+t:_.bottom],[_.right,z?R?_.top+t:_.bottom:_.top+t]];return[X,ue,...D]}case"left":{const X=[W+t+1,V?q+t/2:M?q+t*4:q-t*4],ue=[W+t+1,V?q-t/2:M?q+t*4:q-t*4];return[...[[M||V?_.right-t:_.left,_.top],[M?V?_.right-t:_.left:_.right-t,_.bottom]],X,ue]}case"right":{const X=[W-t,V?q+t/2:M?q+t*4:q-t*4],ue=[W-t,V?q-t/2:M?q+t*4:q-t*4],D=[[M||V?_.left+t:_.right,_.top],[M?V?_.left+t:_.right:_.left+t,_.bottom]];return[X,ue,...D]}}}if(!Ny([I,w],ne)){if(i&&!P)return S();if(!O&&r){const oe=c(E.clientX,E.clientY);if(oe!==null&&oe<.1)return S()}Ny([I,w],se([f,p]))?!i&&r&&(o.current=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const Ly=200,b_=500,qo=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},$y=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Vy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},pd=(e,t)=>{const n=$y(t,Vy.basic,e)||$y(t,Vy.extend,e);return n===void 0||n===e?void 0:n},Ir=()=>typeof window>"u",hd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ry=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},x_=e=>!e,md=()=>{},jy=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},gd=T.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:s=!0,hover:a=!0,enabled:l=!0,popover:c=!0,onChange:u=md,followCursor:d=!1,...f},p){const[g,m]=T.useState(n??!1),h=T.useRef(null),y=t||"span",b=_=>{m(_),u?.(_)},{refs:x,floatingStyles:E,context:S}=Cr({placement:i,open:g,whileElementsMounted:zo,onOpenChange:n?void 0:b,middleware:[rd(),Qi(5),VO(),Qv({padding:5,element:h}),od({fallbackAxisSideDirection:"start"})]}),I=no(S,{enabled:l}),w=ro(S,{role:"tooltip",enabled:l}),C=f_(S,{enabled:l?s:!1}),A=rs(S,{enabled:l?c:!1}),O=l_(S,{enabled:!!l&&!!d}),N=dy(S,{move:!0,delay:{open:Ly},enabled:l?a:!1,handleClose:c?Fy():null}),{getReferenceProps:L,getFloatingProps:j}=kr([w,I,O,s?C:void 0,a?N:void 0,c?A:void 0]);return T.useEffect(()=>m(n===void 0?!1:n),[n]),v.jsxs(T.Fragment,{children:[v.jsx(y,{...L(f),ref:dr(x.setReference,p),children:r}),g&&v.jsx(to,{children:v.jsxs(an,{...j(),ref:x.setFloating,style:E,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[v.jsx(sy,{ref:h,context:S,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),zy=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>v.jsxs("span",{className:Ie("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:v.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||o?v.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?v.jsx(gd,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:v.jsx("span",{className:"cursor-help",children:v.jsx(Nu,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:v.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?v.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[v.jsx(rv,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),v.jsx(zP,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),os=T.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:g,componentName:m,placeholder:h,hideLeft:y=!1,required:b,disabled:x,reportStatus:E},S)=>{const I=Vu(),w=E!==void 0?E:I.input.iconFeedback,C=d??p,A=kt(),O=e??A.inputOptionalLabel;return v.jsxs("fieldset",{ref:S,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":m,"data-interactive":!!i,className:Ie("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[v.jsxs("label",{form:u,htmlFor:C,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[v.jsx(zy,{info:a,hideLeft:y,reportStatus:w,title:g,placeholder:h,children:O||n?v.jsxs(T.Fragment,{children:[b?null:v.jsx("span",{"aria-disabled":x,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:O}),n?v.jsx(T.Fragment,{children:n}):null]}):null}),v.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?v.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?v.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),v.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),v.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),By=(e,t,n,r)=>T.forwardRef(({info:i,left:s,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:g="text",labelClassName:m,feedback:h=null,hideLeft:y=!1,loading:b,...x},E)=>{const S=e,I=x.id??x.name,w=T.useRef(null);return T.useEffect(()=>{if(w.current===null)return;const C=w.current,A=Bi(w.current),O=r?.(C),N=L=>{const j=L;if(j.key==="Enter"&&C.enterKeyHint==="next"){const _=C.getAttribute("data-next");if(_){const F=document.getElementById(_);if(F)return F.focus(),void j.preventDefault()}}};return C.addEventListener("keydown",N),()=>{O?.(),A(),C.removeEventListener("keydown",N)}},[]),v.jsx(os,{...n,info:i,left:s,error:l,right:c,loading:b,form:x.form,name:x.name,feedback:h,hideLeft:y,title:x.title,container:Ie(u,n.container),rightLabel:d,disabled:x.disabled,interactive:f,required:x.required,componentName:t,id:x.name||x.id,optionalText:p,labelClassName:m,placeholder:x.placeholder,children:v.jsx(S,{...n,...x,id:I,name:I,type:g,"data-next":a,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:dr(E,w),className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),Uo=By(Jg,"input",{type:"text"}),w_=Ao("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),el=T.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return v.jsxs(an,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Ie(w_({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),oo=T.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:f,left:p,error:g,...m},h)=>{const y=kt(),b=T.useRef(null),x=m.id??m.name;T.useImperativeHandle(h,()=>b.current),T.useEffect(()=>{if(b.current===null)return;const S=new AbortController,I=b.current,w=Bi(b.current);return I.addEventListener("change",()=>I.setAttribute("data-selected","true"),{once:!0,signal:S.signal}),()=>{w(),S.abort()}},[]);const E=()=>b.current?.focus();return v.jsx(os,{info:n,left:p,error:g,form:m.form,loading:l,name:m.name,feedback:o,hideLeft:d,required:e,title:m.title,container:u,componentName:"select",rightLabel:a,interactive:s,id:m.name||m.id,optionalText:c,labelClassName:i,placeholder:m.placeholder,right:v.jsxs("label",{htmlFor:x,children:[f,v.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[v.jsx(Du,{size:20}),v.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:v.jsxs("select",{...m,id:x,name:x,required:e,ref:dr(h,b),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:Ie("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",m.className),children:[v.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(S=>T.createElement("option",{...S,value:S.value,children:S.label??S.value,key:`${x}-select-option-${S.value}`}))]})})});function Hy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wy(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Hy(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Hy(e[o],null)}}}}function cn(...e){return k.useCallback(Wy(...e),e)}function tl(e){const t=S_(e),n=k.forwardRef((r,o)=>{const{children:i,...s}=r,a=k.Children.toArray(i),l=a.find(T_);if(l){const c=l.props.children,u=a.map(d=>d===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:d);return v.jsx(t,{...s,ref:o,children:k.isValidElement(c)?k.cloneElement(c,void 0,u):null})}return v.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var qy=tl("Slot");function S_(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const s=k_(o),a=C_(i,o.props);return o.type!==k.Fragment&&(a.ref=r?Wy(r,s):s),k.cloneElement(o,a)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var E_=Symbol("radix.slottable");function T_(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===E_}function C_(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function k_(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var I_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qt=I_.reduce((e,t)=>{const n=tl(`Primitive.${t}`),r=k.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Uy(e,t){e&&yr.flushSync(()=>e.dispatchEvent(t))}var P_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),A_="VisuallyHidden",vd=k.forwardRef((e,t)=>v.jsx(qt.span,{...e,ref:t,style:{...P_,...e.style}}));vd.displayName=A_;function nl(e,t=[]){let n=[];function r(i,s){const a=k.createContext(s),l=n.length;n=[...n,s];const c=d=>{const{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||a,h=k.useMemo(()=>g,Object.values(g));return v.jsx(m.Provider,{value:h,children:p})};c.displayName=i+"Provider";function u(d,f){const p=f?.[e]?.[l]||a,g=k.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(s=>k.createContext(s));return function(a){const l=a?.[e]||i;return k.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,O_(o,...t)]}function O_(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Gy(e){const t=e+"CollectionProvider",[n,r]=nl(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:h,children:y}=m,b=T.useRef(null),x=T.useRef(new Map).current;return v.jsx(o,{scope:h,itemMap:x,collectionRef:b,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=tl(a),c=T.forwardRef((m,h)=>{const{scope:y,children:b}=m,x=i(a,y),E=cn(h,x.collectionRef);return v.jsx(l,{ref:E,children:b})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=tl(u),p=T.forwardRef((m,h)=>{const{scope:y,children:b,...x}=m,E=T.useRef(null),S=cn(h,E),I=i(u,y);return T.useEffect(()=>(I.itemMap.set(E,{ref:E,...x}),()=>{I.itemMap.delete(E)})),v.jsx(f,{[d]:"",ref:S,children:b})});p.displayName=u;function g(m){const h=i(e+"CollectionConsumer",m);return T.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((I,w)=>x.indexOf(I.ref.current)-x.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},g,r]}function Ft(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Go=globalThis?.document?k.useLayoutEffect:()=>{},__=k[" useInsertionEffect ".trim().toString()]||Go;function Ky({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=D_({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const u=k.useRef(e!==void 0);k.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=k.useCallback(u=>{if(a){const d=M_(u)?u(e):u;d!==e&&s.current?.(d)}else i(u)},[a,e,i,s]);return[l,c]}function D_({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),o=k.useRef(n),i=k.useRef(t);return __(()=>{i.current=t},[t]),k.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function M_(e){return typeof e=="function"}function N_(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var Yy=e=>{const{present:t,children:n}=e,r=F_(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=cn(r.ref,L_(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};Yy.displayName="Presence";function F_(e){const[t,n]=k.useState(),r=k.useRef(null),o=k.useRef(e),i=k.useRef("none"),s=e?"mounted":"unmounted",[a,l]=N_(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=rl(r.current);i.current=a==="mounted"?c:"none"},[a]),Go(()=>{const c=r.current,u=o.current;if(u!==e){const f=i.current,p=rl(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Go(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=p=>{const m=rl(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},f=p=>{p.target===t&&(i.current=rl(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:k.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function rl(e){return e?.animationName||"none"}function L_(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $_=k.createContext(void 0);function V_(e){const t=k.useContext($_);return e||t||"ltr"}function io(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}function R_(e,t=globalThis?.document){const n=io(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var j_="DismissableLayer",yd="dismissableLayer.update",z_="dismissableLayer.pointerDownOutside",B_="dismissableLayer.focusOutside",Zy,Xy=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qy=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=k.useContext(Xy),[u,d]=k.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=k.useState({}),g=cn(t,w=>d(w)),m=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(h),b=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,E=b>=y,S=W_(w=>{const C=w.target,A=[...c.branches].some(O=>O.contains(C));!E||A||(o?.(w),s?.(w),w.defaultPrevented||a?.())},f),I=q_(w=>{const C=w.target;[...c.branches].some(O=>O.contains(C))||(i?.(w),s?.(w),w.defaultPrevented||a?.())},f);return R_(w=>{b===c.layers.size-1&&(r?.(w),!w.defaultPrevented&&a&&(w.preventDefault(),a()))},f),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Zy=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),eb(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Zy)}},[u,f,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),eb())},[u,c]),k.useEffect(()=>{const w=()=>p({});return document.addEventListener(yd,w),()=>document.removeEventListener(yd,w)},[]),v.jsx(qt.div,{...l,ref:g,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:Ft(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Ft(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ft(e.onPointerDownCapture,S.onPointerDownCapture)})});Qy.displayName=j_;var H_="DismissableLayerBranch",Jy=k.forwardRef((e,t)=>{const n=k.useContext(Xy),r=k.useRef(null),o=cn(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(qt.div,{...e,ref:o})});Jy.displayName=H_;function W_(e,t=globalThis?.document){const n=io(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){tb(z_,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function q_(e,t=globalThis?.document){const n=io(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&tb(B_,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eb(){const e=new CustomEvent(yd);document.dispatchEvent(e)}function tb(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Uy(o,i):o.dispatchEvent(i)}var U_=Qy,G_=Jy,K_="Portal",nb=k.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=k.useState(!1);Go(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?Po.createPortal(v.jsx(qt.div,{...r,ref:t}),s):null});nb.displayName=K_;function so(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function Y_(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Z_(e){const[t,n]=k.useState(void 0);return Go(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function rb(e,[t,n]){return Math.min(n,Math.max(t,e))}var bd="Progress",xd=100,[X_,Nq]=nl(bd),[Q_,J_]=X_(bd),ob=k.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=eD,...s}=e;(o||o===0)&&!lb(o)&&console.error(tD(`${o}`,"Progress"));const a=lb(o)?o:xd;r!==null&&!cb(r,a)&&console.error(nD(`${r}`,"Progress"));const l=cb(r,a)?r:null,c=ol(l)?i(l,a):void 0;return v.jsx(Q_,{scope:n,value:l,max:a,children:v.jsx(qt.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":ol(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":ab(l,a),"data-value":l??void 0,"data-max":a,...s,ref:t})})});ob.displayName=bd;var ib="ProgressIndicator",sb=k.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=J_(ib,n);return v.jsx(qt.div,{"data-state":ab(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});sb.displayName=ib;function eD(e,t){return`${Math.round(e/t*100)}%`}function ab(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ol(e){return typeof e=="number"}function lb(e){return ol(e)&&!isNaN(e)&&e>0}function cb(e,t){return ol(e)&&!isNaN(e)&&e<=t&&e>=0}function tD(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${xd}\`.`}function nD(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
5
|
-
|
|
6
|
-
- less than the value passed to \`max\` (or ${xd} if no \`max\` prop is set)
|
|
7
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
8
|
-
|
|
9
|
-
Defaulting to \`null\`.`}var rD=ob,oD=sb,ub=["PageUp","PageDown"],db=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fb={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ko="Slider",[wd,iD,sD]=Gy(Ko),[pb,Fq]=nl(Ko,[sD]),[aD,il]=pb(Ko),hb=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:s="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:g,...m}=e,h=k.useRef(new Set),y=k.useRef(0),x=s==="horizontal"?lD:cD,[E=[],S]=Ky({prop:u,defaultProp:c,onChange:N=>{[...h.current][y.current]?.focus(),d(N)}}),I=k.useRef(E);function w(N){const L=hD(E,N);O(N,L)}function C(N){O(N,y.current)}function A(){const N=I.current[y.current];E[y.current]!==N&&f(E)}function O(N,L,{commit:j}={commit:!1}){const _=yD(i),F=bD(Math.round((N-r)/i)*i+r,_),z=rb(F,[r,o]);S((M=[])=>{const P=fD(M,z,L);if(vD(P,l*i)){y.current=P.indexOf(z);const R=String(P)!==String(M);return R&&j&&f(P),R?P:M}else return M})}return v.jsx(aD,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:y,thumbs:h.current,values:E,orientation:s,form:g,children:v.jsx(wd.Provider,{scope:e.__scopeSlider,children:v.jsx(wd.Slot,{scope:e.__scopeSlider,children:v.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...m,ref:t,onPointerDown:Ft(m.onPointerDown,()=>{a||(I.current=E)}),min:r,max:o,inverted:p,onSlideStart:a?void 0:w,onSlideMove:a?void 0:C,onSlideEnd:a?void 0:A,onHomeKeyDown:()=>!a&&O(r,0,{commit:!0}),onEndKeyDown:()=>!a&&O(o,E.length-1,{commit:!0}),onStepKeyDown:({event:N,direction:L})=>{if(!a){const F=ub.includes(N.key)||N.shiftKey&&db.includes(N.key)?10:1,z=y.current,M=E[z],P=i*F*L;O(M+P,z,{commit:!0})}}})})})})});hb.displayName=Ko;var[mb,gb]=pb(Ko,{startEdge:"left",endEdge:"right",size:"width",direction:1}),lD=k.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:s,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,f]=k.useState(null),p=cn(t,x=>f(x)),g=k.useRef(void 0),m=V_(o),h=m==="ltr",y=h&&!i||!h&&i;function b(x){const E=g.current||d.getBoundingClientRect(),S=[0,E.width],w=Td(S,y?[n,r]:[r,n]);return g.current=E,w(x-E.left)}return v.jsx(mb,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:v.jsx(vb,{dir:m,"data-orientation":"horizontal",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const E=b(x.clientX);s?.(E)},onSlideMove:x=>{const E=b(x.clientX);a?.(E)},onSlideEnd:()=>{g.current=void 0,l?.()},onStepKeyDown:x=>{const S=fb[y?"from-left":"from-right"].includes(x.key);c?.({event:x,direction:S?-1:1})}})})}),cD=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:s,onSlideEnd:a,onStepKeyDown:l,...c}=e,u=k.useRef(null),d=cn(t,u),f=k.useRef(void 0),p=!o;function g(m){const h=f.current||u.current.getBoundingClientRect(),y=[0,h.height],x=Td(y,p?[r,n]:[n,r]);return f.current=h,x(m-h.top)}return v.jsx(mb,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:v.jsx(vb,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const h=g(m.clientY);i?.(h)},onSlideMove:m=>{const h=g(m.clientY);s?.(h)},onSlideEnd:()=>{f.current=void 0,a?.()},onStepKeyDown:m=>{const y=fb[p?"from-bottom":"from-top"].includes(m.key);l?.({event:m,direction:y?-1:1})}})})}),vb=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:s,onEndKeyDown:a,onStepKeyDown:l,...c}=e,u=il(Ko,n);return v.jsx(qt.span,{...c,ref:t,onKeyDown:Ft(e.onKeyDown,d=>{d.key==="Home"?(s(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):ub.concat(db).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Ft(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():r(d)}),onPointerMove:Ft(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Ft(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),yb="SliderTrack",bb=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=il(yb,n);return v.jsx(qt.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});bb.displayName=yb;var Sd="SliderRange",xb=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=il(Sd,n),i=gb(Sd,n),s=k.useRef(null),a=cn(t,s),l=o.values.length,c=o.values.map(f=>Eb(f,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return v.jsx(qt.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});xb.displayName=Sd;var Ed="SliderThumb",wb=k.forwardRef((e,t)=>{const n=iD(e.__scopeSlider),[r,o]=k.useState(null),i=cn(t,a=>o(a)),s=k.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return v.jsx(uD,{...e,ref:i,index:s})}),uD=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,s=il(Ed,n),a=gb(Ed,n),[l,c]=k.useState(null),u=cn(t,b=>c(b)),d=l?s.form||!!l.closest("form"):!0,f=Z_(l),p=s.values[r],g=p===void 0?0:Eb(p,s.min,s.max),m=pD(r,s.values.length),h=f?.[a.size],y=h?mD(h,g,a.direction):0;return k.useEffect(()=>{if(l)return s.thumbs.add(l),()=>{s.thumbs.delete(l)}},[l,s.thumbs]),v.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${g}% + ${y}px)`},children:[v.jsx(wd.ItemSlot,{scope:e.__scopeSlider,children:v.jsx(qt.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":s.min,"aria-valuenow":p,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...i,ref:u,style:p===void 0?{display:"none"}:e.style,onFocus:Ft(e.onFocus,()=>{s.valueIndexToChangeRef.current=r})})}),d&&v.jsx(Sb,{name:o??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:p},r)]})});wb.displayName=Ed;var dD="RadioBubbleInput",Sb=k.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=k.useRef(null),i=cn(o,r),s=Y_(t);return k.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&u){const d=new Event("input",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[s,t]),v.jsx(qt.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});Sb.displayName=dD;function fD(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function Eb(e,t,n){const i=100/(n-t)*(e-t);return rb(i,[0,100])}function pD(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function hD(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function mD(e,t,n){const r=e/2,i=Td([0,50],[0,r]);return(r-i(t)*n)*n}function gD(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function vD(e,t){if(t>0){const n=gD(e);return Math.min(...n)>=t}return!0}function Td(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yD(e){return(String(e).split(".")[1]||"").length}function bD(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var xD=hb,wD=bb,SD=xb,ED=wb,Cd="ToastProvider",[kd,TD,CD]=Gy("Toast"),[Tb,Lq]=nl("Toast",[CD]),[kD,sl]=Tb(Cd),Cb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),f=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Cd}\`. Expected non-empty \`string\`.`),v.jsx(kd.Provider,{scope:t,children:v.jsx(kD,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:k.useCallback(()=>u(p=>p+1),[]),onToastRemove:k.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:s})})};Cb.displayName=Cd;var kb="ToastViewport",ID=["F8"],Id="toast.viewportPause",Pd="toast.viewportResume",Ib=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=ID,label:o="Notifications ({hotkey})",...i}=e,s=sl(kb,n),a=TD(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),f=cn(t,d,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=s.toastCount>0;k.useEffect(()=>{const h=y=>{r.length!==0&&r.every(x=>y[x]||y.code===x)&&d.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),k.useEffect(()=>{const h=l.current,y=d.current;if(g&&h&&y){const b=()=>{if(!s.isClosePausedRef.current){const I=new CustomEvent(Id);y.dispatchEvent(I),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const I=new CustomEvent(Pd);y.dispatchEvent(I),s.isClosePausedRef.current=!1}},E=I=>{!h.contains(I.relatedTarget)&&x()},S=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",b),h.addEventListener("focusout",E),h.addEventListener("pointermove",b),h.addEventListener("pointerleave",S),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",b),h.removeEventListener("focusout",E),h.removeEventListener("pointermove",b),h.removeEventListener("pointerleave",S),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[g,s.isClosePausedRef]);const m=k.useCallback(({tabbingDirection:h})=>{const b=a().map(x=>{const E=x.ref.current,S=[E,...zD(E)];return h==="forwards"?S:S.reverse()});return(h==="forwards"?b.reverse():b).flat()},[a]);return k.useEffect(()=>{const h=d.current;if(h){const y=b=>{const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const S=document.activeElement,I=b.shiftKey;if(b.target===h&&I){c.current?.focus();return}const A=m({tabbingDirection:I?"backwards":"forwards"}),O=A.findIndex(N=>N===S);_d(A.slice(O+1))?b.preventDefault():I?c.current?.focus():u.current?.focus()}};return h.addEventListener("keydown",y),()=>h.removeEventListener("keydown",y)}},[a,m]),v.jsxs(G_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&v.jsx(Ad,{ref:c,onFocusFromOutsideViewport:()=>{const h=m({tabbingDirection:"forwards"});_d(h)}}),v.jsx(kd.Slot,{scope:n,children:v.jsx(qt.ol,{tabIndex:-1,...i,ref:f})}),g&&v.jsx(Ad,{ref:u,onFocusFromOutsideViewport:()=>{const h=m({tabbingDirection:"backwards"});_d(h)}})]})});Ib.displayName=kb;var Pb="ToastFocusProxy",Ad=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=sl(Pb,n);return v.jsx(vd,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{const a=s.relatedTarget;!i.viewport?.contains(a)&&r()}})});Ad.displayName=Pb;var is="Toast",PD="toast.swipeStart",AD="toast.swipeMove",OD="toast.swipeCancel",_D="toast.swipeEnd",Ab=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a,l]=Ky({prop:r,defaultProp:o??!0,onChange:i,caller:is});return v.jsx(Yy,{present:n||a,children:v.jsx(ND,{open:a,...s,ref:t,onClose:()=>l(!1),onPause:io(e.onPause),onResume:io(e.onResume),onSwipeStart:Ft(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ft(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ft(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ft(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Ab.displayName=is;var[DD,MD]=Tb(is,{onClose(){}}),ND=k.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...g}=e,m=sl(is,n),[h,y]=k.useState(null),b=cn(t,_=>y(_)),x=k.useRef(null),E=k.useRef(null),S=o||m.duration,I=k.useRef(0),w=k.useRef(S),C=k.useRef(0),{onToastAdd:A,onToastRemove:O}=m,N=io(()=>{h?.contains(document.activeElement)&&m.viewport?.focus(),s()}),L=k.useCallback(_=>{!_||_===1/0||(window.clearTimeout(C.current),I.current=new Date().getTime(),C.current=window.setTimeout(N,_))},[N]);k.useEffect(()=>{const _=m.viewport;if(_){const F=()=>{L(w.current),c?.()},z=()=>{const M=new Date().getTime()-I.current;w.current=w.current-M,window.clearTimeout(C.current),l?.()};return _.addEventListener(Id,z),_.addEventListener(Pd,F),()=>{_.removeEventListener(Id,z),_.removeEventListener(Pd,F)}}},[m.viewport,S,l,c,L]),k.useEffect(()=>{i&&!m.isClosePausedRef.current&&L(S)},[i,S,m.isClosePausedRef,L]),k.useEffect(()=>(A(),()=>O()),[A,O]);const j=k.useMemo(()=>h?Fb(h):null,[h]);return m.viewport?v.jsxs(v.Fragment,{children:[j&&v.jsx(FD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:j}),v.jsx(DD,{scope:n,onClose:N,children:yr.createPortal(v.jsx(kd.ItemSlot,{scope:n,children:v.jsx(U_,{asChild:!0,onEscapeKeyDown:Ft(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||N(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(qt.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ft(e.onKeyDown,_=>{_.key==="Escape"&&(a?.(_.nativeEvent),_.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:Ft(e.onPointerDown,_=>{_.button===0&&(x.current={x:_.clientX,y:_.clientY})}),onPointerMove:Ft(e.onPointerMove,_=>{if(!x.current)return;const F=_.clientX-x.current.x,z=_.clientY-x.current.y,M=!!E.current,P=["left","right"].includes(m.swipeDirection),R=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,V=P?R(0,F):0,G=P?0:R(0,z),U=_.pointerType==="touch"?10:2,B={x:V,y:G},Y={originalEvent:_,delta:B};M?(E.current=B,al(AD,d,Y,{discrete:!1})):Lb(B,m.swipeDirection,U)?(E.current=B,al(PD,u,Y,{discrete:!1}),_.target.setPointerCapture(_.pointerId)):(Math.abs(F)>U||Math.abs(z)>U)&&(x.current=null)}),onPointerUp:Ft(e.onPointerUp,_=>{const F=E.current,z=_.target;if(z.hasPointerCapture(_.pointerId)&&z.releasePointerCapture(_.pointerId),E.current=null,x.current=null,F){const M=_.currentTarget,P={originalEvent:_,delta:F};Lb(F,m.swipeDirection,m.swipeThreshold)?al(_D,p,P,{discrete:!0}):al(OD,f,P,{discrete:!0}),M.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),FD=e=>{const{__scopeToast:t,children:n,...r}=e,o=sl(is,t),[i,s]=k.useState(!1),[a,l]=k.useState(!1);return RD(()=>s(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:v.jsx(nb,{asChild:!0,children:v.jsx(vd,{...r,children:i&&v.jsxs(v.Fragment,{children:[o.label," ",n]})})})},LD="ToastTitle",Ob=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(qt.div,{...r,ref:t})});Ob.displayName=LD;var $D="ToastDescription",_b=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(qt.div,{...r,ref:t})});_b.displayName=$D;var Db="ToastAction",VD=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?v.jsx(Nb,{altText:n,asChild:!0,children:v.jsx(Od,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Db}\`. Expected non-empty \`string\`.`),null)});VD.displayName=Db;var Mb="ToastClose",Od=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=MD(Mb,n);return v.jsx(Nb,{asChild:!0,children:v.jsx(qt.button,{type:"button",...r,ref:t,onClick:Ft(e.onClick,o.onClose)})})});Od.displayName=Mb;var Nb=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return v.jsx(qt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Fb(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),jD(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Fb(r))}}),t}function al(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Uy(o,i):o.dispatchEvent(i)}var Lb=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function RD(e=()=>{}){const t=io(e);Go(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function jD(e){return e.nodeType===e.ELEMENT_NODE}function zD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _d(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var BD=Cb,HD=Ib,WD=Ab,qD=Ob,UD=_b,GD=Od;const KD=e=>{const[t,n]=T.useState(null),r=T.useRef(null);return T.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));ze.number(i)&&n(i);const s=new MutationObserver(a=>{const l=a[0].target,c=Number(l.getAttribute("aria-valuenow"));n(ze.number(c)?c:null)});return s.observe(o,{attributeFilter:["aria-valuenow"]}),()=>s.disconnect()},[]),v.jsx(gd,{title:"",ref:r,as:ED,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},YD=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,s=T.useRef(qo()),a=r||o||[];return v.jsxs(xD,{...i,defaultValue:r,value:o,className:Ie("relative flex h-5 w-full touch-none select-none items-center",n),children:[v.jsx(wD,{className:"relative h-2 rounded-full grow bg-background",children:v.jsx(SD,{className:"absolute h-full rounded-full bg-primary"})}),a.map((l,c)=>v.jsx(KD,{tooltip:t??!1},`${s.current}-${c}`))]})},Pr=e=>{const t=T.useRef(e);return T.useEffect(()=>{t.current=e},[e]),t},ZD=T.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const s=T.useId(),[a,l]=T.useState(o.checked??!1),c=a,u=T.useRef(null),d=Pr(o.onChange);T.useImperativeHandle(i,()=>u.current),T.useEffect(()=>{if(u.current!==null&&d.current){const p=m=>{d.current&&d.current(m)},g=u.current;return g.addEventListener("change",p),()=>g?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return v.jsxs("fieldset",{className:Ie("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[v.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[v.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||s,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:p=>l(p.target.checked)}),v.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${s}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:v.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),v.jsx("label",{htmlFor:o.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:v.jsx("span",{className:"font-medium text-foreground",children:e})})]}),v.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),ss=T.createContext({});function Pn(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const $b=typeof window<"u",ll=$b?T.useLayoutEffect:T.useEffect,cl=T.createContext(null);function Dd(e,t){e.indexOf(t)===-1&&e.push(t)}function as(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function XD([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Xn=(e,t,n)=>n>t?t:n<e?e:n;function Md(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Yo=()=>{},un=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Yo=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Md(t,n))},un=(e,t,n)=>{if(!e)throw new Error(Md(t,n))});const pr={},Vb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Rb(e){return typeof e=="object"&&e!==null}const jb=e=>/^0[^.\s]+$/u.test(e);function Nd(e){let t;return()=>(t===void 0&&(t=e()),t)}const yn=e=>e,QD=(e,t)=>n=>t(e(n)),ls=(...e)=>e.reduce(QD),Zo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fd{constructor(){this.subscriptions=[]}add(t){return Dd(this.subscriptions,t),()=>as(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=e=>e*1e3,bn=e=>e/1e3;function zb(e,t){return t?e*(1e3/t):0}const Bb=new Set;function Ld(e,t,n){e||Bb.has(t)||(console.warn(Md(t,n)),Bb.add(t))}const JD=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},Hb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,eM=1e-7,tM=12;function nM(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Hb(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>eM&&++a<tM);return s}function cs(e,t,n,r){if(e===t&&n===r)return yn;const o=i=>nM(i,0,1,e,n);return i=>i===0||i===1?i:Hb(o(i),t,r)}const Wb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qb=e=>t=>1-e(1-t),Ub=cs(.33,1.53,.69,.99),$d=qb(Ub),Gb=Wb($d),Kb=e=>(e*=2)<1?.5*$d(e):.5*(2-Math.pow(2,-10*(e-1))),Vd=e=>1-Math.sin(Math.acos(e)),Yb=qb(Vd),Zb=Wb(Vd),rM=cs(.42,0,1,1),oM=cs(0,0,.58,1),Xb=cs(.42,0,.58,1),Qb=e=>Array.isArray(e)&&typeof e[0]!="number";function Jb(e,t){return Qb(e)?e[JD(0,e.length,t)]:e}const ex=e=>Array.isArray(e)&&typeof e[0]=="number",tx={linear:yn,easeIn:rM,easeInOut:Xb,easeOut:oM,circIn:Vd,circInOut:Zb,circOut:Yb,backIn:$d,backInOut:Gb,backOut:Ub,anticipate:Kb},iM=e=>typeof e=="string",Rd=e=>{if(ex(e)){un(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return cs(t,n,r,o)}else if(iM(e))return un(tx[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),tx[e];return e},ul=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function sM(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const g=f&&o?n:r;return d&&s.add(u),g.has(u)||g.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const aM=40;function nx(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=ul.reduce((x,E)=>(x[E]=sM(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:g}=s,m=()=>{const x=pr.useManualTiming?o.timestamp:performance.now();n=!1,pr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,aM),1)),o.timestamp=x,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},h=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:ul.reduce((x,E)=>{const S=s[E];return x[E]=(I,w=!1,C=!1)=>(n||h(),S.schedule(I,w,C)),x},{}),cancel:x=>{for(let E=0;E<ul.length;E++)s[ul[E]].cancel(x)},state:o,steps:s}}const{schedule:ut,cancel:hr,state:Ut,steps:jd}=nx(typeof requestAnimationFrame<"u"?requestAnimationFrame:yn,!0);let dl;function lM(){dl=void 0}const Xt={now:()=>(dl===void 0&&Xt.set(Ut.isProcessing||pr.useManualTiming?Ut.timestamp:performance.now()),dl),set:e=>{dl=e,queueMicrotask(lM)}},rx=e=>t=>typeof t=="string"&&t.startsWith(e),ox=rx("--"),cM=rx("var(--"),zd=e=>cM(e)?uM.test(e.split("/*")[0].trim()):!1,uM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ix(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Xo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},us={...Xo,transform:e=>Xn(0,1,e)},fl={...Xo,default:1},ds=e=>Math.round(e*1e5)/1e5,Bd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function dM(e){return e==null}const fM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hd=(e,t)=>n=>!!(typeof n=="string"&&fM.test(n)&&n.startsWith(e)||t&&!dM(n)&&Object.prototype.hasOwnProperty.call(n,t)),sx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(Bd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},pM=e=>Xn(0,255,e),Wd={...Xo,transform:e=>Math.round(pM(e))},ao={test:Hd("rgb","red"),parse:sx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Wd.transform(e)+", "+Wd.transform(t)+", "+Wd.transform(n)+", "+ds(us.transform(r))+")"};function hM(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const qd={test:Hd("#"),parse:hM,transform:ao.transform},fs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ar=fs("deg"),Qn=fs("%"),Se=fs("px"),mM=fs("vh"),gM=fs("vw"),ax={...Qn,parse:e=>Qn.parse(e)/100,transform:e=>Qn.transform(e*100)},Qo={test:Hd("hsl","hue"),parse:sx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qn.transform(ds(t))+", "+Qn.transform(ds(n))+", "+ds(us.transform(r))+")"},At={test:e=>ao.test(e)||qd.test(e)||Qo.test(e),parse:e=>ao.test(e)?ao.parse(e):Qo.test(e)?Qo.parse(e):qd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ao.transform(e):Qo.transform(e),getAnimatableNone:e=>{const t=At.parse(e);return t.alpha=0,At.transform(t)}},vM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yM(e){return isNaN(e)&&typeof e=="string"&&(e.match(Bd)?.length||0)+(e.match(vM)?.length||0)>0}const lx="number",cx="color",bM="var",xM="var(",ux="${}",wM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ps(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(wM,l=>(At.test(l)?(r.color.push(i),o.push(cx),n.push(At.parse(l))):l.startsWith(xM)?(r.var.push(i),o.push(bM),n.push(l)):(r.number.push(i),o.push(lx),n.push(parseFloat(l))),++i,ux)).split(ux);return{values:n,split:a,indexes:r,types:o}}function dx(e){return ps(e).values}function fx(e){const{split:t,types:n}=ps(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===lx?i+=ds(o[s]):a===cx?i+=At.transform(o[s]):i+=o[s]}return i}}const SM=e=>typeof e=="number"?0:At.test(e)?At.getAnimatableNone(e):e;function EM(e){const t=dx(e);return fx(e)(t.map(SM))}const Or={test:yM,parse:dx,createTransformer:fx,getAnimatableNone:EM};function Ud(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function TM({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Ud(l,a,e+1/3),i=Ud(l,a,e),s=Ud(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function pl(e,t){return n=>n>0?t:e}const pt=(e,t,n)=>e+(t-e)*n,Gd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},CM=[qd,ao,Qo],kM=e=>CM.find(t=>t.test(e));function px(e){const t=kM(e);if(Yo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Qo&&(n=TM(n)),n}const hx=(e,t)=>{const n=px(e),r=px(t);if(!n||!r)return pl(e,t);const o={...n};return i=>(o.red=Gd(n.red,r.red,i),o.green=Gd(n.green,r.green,i),o.blue=Gd(n.blue,r.blue,i),o.alpha=pt(n.alpha,r.alpha,i),ao.transform(o))},Kd=new Set(["none","hidden"]);function IM(e,t){return Kd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function PM(e,t){return n=>pt(e,t,n)}function Yd(e){return typeof e=="number"?PM:typeof e=="string"?zd(e)?pl:At.test(e)?hx:_M:Array.isArray(e)?mx:typeof e=="object"?At.test(e)?hx:AM:pl}function mx(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Yd(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function AM(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Yd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function OM(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],s=e.indexes[i][r[i]],a=e.values[s]??0;n[o]=a,r[i]++}return n}const _M=(e,t)=>{const n=Or.createTransformer(t),r=ps(e),o=ps(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Kd.has(e)&&!o.values.length||Kd.has(t)&&!r.values.length?IM(e,t):ls(mx(OM(r,o),o.values),n):(Yo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),pl(e,t))};function gx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pt(e,t,n):Yd(e)(e,t)}const DM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ut.update(t,n),stop:()=>hr(t),now:()=>Ut.isProcessing?Ut.timestamp:Xt.now()}},vx=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},hl=2e4;function Zd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hl;)t+=n,r=e.next(t);return t>=hl?1/0:t}function yx(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Zd(r),hl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:bn(o)}}const MM=5;function bx(e,t,n){const r=Math.max(t-MM,0);return zb(n-e(r),t-r)}const wt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Xd=.001;function NM({duration:e=wt.duration,bounce:t=wt.bounce,velocity:n=wt.velocity,mass:r=wt.mass}){let o,i;Yo(e<=An(wt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Xn(wt.minDamping,wt.maxDamping,s),e=Xn(wt.minDuration,wt.maxDuration,bn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,p=Qd(c,s),g=Math.exp(-d);return Xd-f/p*g},i=c=>{const d=c*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,g=Math.exp(-d),m=Qd(Math.pow(c,2),s);return(-o(c)+Xd>0?-1:1)*((f-p)*g)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Xd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=LM(o,i,a);if(e=An(e),isNaN(l))return{stiffness:wt.stiffness,damping:wt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const FM=12;function LM(e,t,n){let r=n;for(let o=1;o<FM;o++)r=r-e(r)/t(r);return r}function Qd(e,t){return e*Math.sqrt(1-t*t)}const $M=["duration","bounce"],VM=["stiffness","damping","mass"];function xx(e,t){return t.some(n=>e[n]!==void 0)}function RM(e){let t={velocity:wt.velocity,stiffness:wt.stiffness,damping:wt.damping,mass:wt.mass,isResolvedFromDuration:!1,...e};if(!xx(e,VM)&&xx(e,$M))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Xn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:wt.mass,stiffness:o,damping:i}}else{const n=NM(e);t={...t,...n,mass:wt.mass},t.isResolvedFromDuration=!0}return t}function hs(e=wt.visualDuration,t=wt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=RM({...n,velocity:-bn(n.velocity||0)}),g=f||0,m=c/(2*Math.sqrt(l*u)),h=s-i,y=bn(Math.sqrt(l/u)),b=Math.abs(h)<5;r||(r=b?wt.restSpeed.granular:wt.restSpeed.default),o||(o=b?wt.restDelta.granular:wt.restDelta.default);let x;if(m<1){const S=Qd(y,m);x=I=>{const w=Math.exp(-m*y*I);return s-w*((g+m*y*h)/S*Math.sin(S*I)+h*Math.cos(S*I))}}else if(m===1)x=S=>s-Math.exp(-y*S)*(h+(g+y*h)*S);else{const S=y*Math.sqrt(m*m-1);x=I=>{const w=Math.exp(-m*y*I),C=Math.min(S*I,300);return s-w*((g+m*y*h)*Math.sinh(C)+S*h*Math.cosh(C))/S}}const E={calculatedDuration:p&&d||null,next:S=>{const I=x(S);if(p)a.done=S>=d;else{let w=S===0?g:0;m<1&&(w=S===0?An(g):bx(x,S,I));const C=Math.abs(w)<=r,A=Math.abs(s-I)<=o;a.done=C&&A}return a.value=a.done?s:I,a},toString:()=>{const S=Math.min(Zd(E),hl),I=vx(w=>E.next(S*w).value,S,30);return S+"ms "+I},toTransition:()=>{}};return E}hs.applyToOptions=e=>{const t=yx(e,100,hs);return e.ease=t.ease,e.duration=An(t.duration),e.type="keyframes",e};function Jd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=C=>a!==void 0&&C<a||l!==void 0&&C>l,g=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let m=n*t;const h=d+m,y=s===void 0?h:s(h);y!==h&&(m=y-d);const b=C=>-m*Math.exp(-C/r),x=C=>y+b(C),E=C=>{const A=b(C),O=x(C);f.done=Math.abs(A)<=c,f.value=f.done?y:O};let S,I;const w=C=>{p(f.value)&&(S=C,I=hs({keyframes:[f.value,g(f.value)],velocity:bx(x,C,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:C=>{let A=!1;return!I&&S===void 0&&(A=!0,E(C),w(C)),S!==void 0&&C>=S?I.next(C-S):(!A&&E(C),f)}}}function jM(e,t,n){const r=[],o=n||pr.mix||gx,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||yn:t;a=ls(l,a)}r.push(a)}return r}function wx(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(un(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=jM(t,r,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Zo(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Xn(e[0],e[i-1],u)):c}function Sx(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Zo(0,t,r);e.push(pt(n,1,o))}}function Ex(e){const t=[0];return Sx(t,e.length-1),t}function zM(e,t){return e.map(n=>n*t)}function BM(e,t){return e.map(()=>t||Xb).splice(0,e.length-1)}function Jo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Qb(r)?r.map(Rd):Rd(r),i={done:!1,value:t[0]},s=zM(n&&n.length===t.length?n:Ex(t),e),a=wx(s,t,{ease:Array.isArray(o)?o:BM(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const HM=e=>e!==null;function ef(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(HM),a=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const WM={decay:Jd,inertia:Jd,tween:Jo,keyframes:Jo,spring:hs};function Tx(e){typeof e.type=="string"&&(e.type=WM[e.type])}class tf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const qM=e=>e/100;class nf extends tf{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Xt.now()&&this.tick(Xt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Tx(t);const{type:n=Jo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||Jo;process.env.NODE_ENV!=="production"&&l!==Jo&&un(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Jo&&typeof a[0]!="number"&&(this.mixKeyframes=ls(qM,gx(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=Zd(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:g,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,E=r;if(d){const C=Math.min(this.currentTime,o)/a;let A=Math.floor(C),O=C%1;!O&&C>=1&&(O=1),O===1&&A--,A=Math.min(A,d+1),A%2&&(f==="reverse"?(O=1-O,p&&(O-=p/a)):f==="mirror"&&(E=s)),x=Xn(0,1,O)*a}const S=b?{done:!1,value:u[0]}:E.next(x);i&&(S.value=i(S.value));let{done:I}=S;!b&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&g!==Jd&&(S.value=ef(u,this.options,h,this.speed)),m&&m(S.value),w&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return bn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(this.currentTime)}set time(t){t=An(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Xt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=bn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=DM,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Xt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function UM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const lo=e=>e*180/Math.PI,rf=e=>{const t=lo(Math.atan2(e[1],e[0]));return of(t)},GM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:rf,rotateZ:rf,skewX:e=>lo(Math.atan(e[1])),skewY:e=>lo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},of=e=>(e=e%360,e<0&&(e+=360),e),Cx=rf,kx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ix=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),KM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kx,scaleY:Ix,scale:e=>(kx(e)+Ix(e))/2,rotateX:e=>of(lo(Math.atan2(e[6],e[5]))),rotateY:e=>of(lo(Math.atan2(-e[2],e[0]))),rotateZ:Cx,rotate:Cx,skewX:e=>lo(Math.atan(e[4])),skewY:e=>lo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sf(e){return e.includes("scale")?1:0}function af(e,t){if(!e||e==="none")return sf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=KM,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=GM,o=a}if(!o)return sf(t);const i=r[t],s=o[1].split(",").map(ZM);return typeof i=="function"?i(s):s[i]}const YM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return af(n,t)};function ZM(e){return parseFloat(e.trim())}const ei=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ti=new Set(ei),Px=e=>e===Xo||e===Se,XM=new Set(["x","y","z"]),QM=ei.filter(e=>!XM.has(e));function JM(e){const t=[];return QM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const _r={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>af(t,"x"),y:(e,{transform:t})=>af(t,"y")};_r.translateX=_r.x,_r.translateY=_r.y;const co=new Set;let lf=!1,cf=!1,uf=!1;function Ax(){if(cf){const e=Array.from(co).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=JM(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{r.getValue(i)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}cf=!1,lf=!1,co.forEach(e=>e.complete(uf)),co.clear()}function Ox(){co.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cf=!0)})}function eN(){uf=!0,Ox(),Ax(),uf=!1}class df{constructor(t,n,r,o,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(co.add(this),lf||(lf=!0,ut.read(Ox),ut.resolveKeyframes(Ax))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}UM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),co.delete(this)}cancel(){this.state==="scheduled"&&(co.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const tN=e=>e.startsWith("--");function nN(e,t,n){tN(t)?e.style.setProperty(t,n):e.style[t]=n}const rN=Nd(()=>window.ScrollTimeline!==void 0),oN={};function iN(e,t){const n=Nd(e);return()=>oN[t]??n()}const _x=iN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ms=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Dx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ms([0,.65,.55,1]),circOut:ms([.55,0,1,.45]),backIn:ms([.31,.01,.66,-.59]),backOut:ms([.33,1.53,.69,.99])};function Mx(e,t){if(e)return typeof e=="function"?_x()?vx(e,t):"ease-out":ex(e)?ms(e):Array.isArray(e)?e.map(n=>Mx(n,t)||Dx.easeOut):Dx[e]}function sN(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Mx(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function ff(e){return typeof e=="function"&&"applyToOptions"in e}function aN({type:e,...t}){return ff(e)&&_x()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lN extends tf{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,un(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=aN(t);this.animation=sN(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=ef(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):nN(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return bn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=An(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&rN()?(this.animation.timeline=t,yn):n(this)}}const Nx={anticipate:Kb,backInOut:Gb,circInOut:Zb};function cN(e){return e in Nx}function uN(e){typeof e.ease=="string"&&cN(e.ease)&&(e.ease=Nx[e.ease])}const pf=10;class dN extends lN{constructor(t){uN(t),Tx(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new nf({...s,autoplay:!1}),l=Math.max(pf,Xt.now()-this.startTime),c=Xn(0,pf,l-pf);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const Fx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Or.test(e)||e==="0")&&!e.startsWith("url("));function fN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function pN(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=Fx(o,t),a=Fx(i,t);return Yo(s===a,`You are trying to animate ${t} from "${o}" to "${i}". "${s?i:o}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:fN(e)||(n==="spring"||ff(n))&&r}function hf(e){e.duration=0,e.type="keyframes"}const hN=new Set(["opacity","clipPath","filter","transform"]),mN=Nd(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gN(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return mN()&&n&&hN.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&s!=="inertia"}const vN=40;class yN extends tf{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Xt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||df;this.keyframeResolver=new p(a,(g,m,h)=>this.onKeyframesResolved(g,m,f,!h),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Xt.now(),pN(t,i,s,a)||((pr.instantAnimations||!l)&&u?.(ef(t,r,n)),t[0]=t[t.length-1],hf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>vN?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&gN(f),g=f.motionValue?.owner?.current,m=p?new dN({...f,element:g}):new nf(f);m.finished.then(()=>{this.notifyFinished()}).catch(yn),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),eN()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class bN{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Lx(this.animations,"duration")}get iterationDuration(){return Lx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Lx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class xN extends bN{then(t,n){return this.finished.finally(t).then(()=>{})}}function $x(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}const wN=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function SN(e){const t=wN.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const EN=4;function Vx(e,t,n=1){un(n<=EN,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=SN(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Vb(s)?parseFloat(s):s}return zd(o)?Vx(o,t,n+1):o}const TN={type:"spring",stiffness:500,damping:25,restSpeed:10},CN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kN={type:"keyframes",duration:.8},IN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},PN=(e,{keyframes:t})=>t.length>2?kN:ti.has(e)?e.startsWith("scale")?CN(t[1]):TN:IN,AN=e=>e!==null;function ON(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(AN),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function mf(e,t){return e?.[t]??e?.default??e}function _N({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const gf=(e,t,n,r={},o,i)=>s=>{const a=mf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-An(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};_N(a)||Object.assign(u,PN(e,u)),u.duration&&(u.duration=An(u.duration)),u.repeatDelay&&(u.repeatDelay=An(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(hf(u),u.delay===0&&(d=!0)),(pr.instantAnimations||pr.skipAnimations)&&(d=!0,hf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=ON(u.keyframes,a);if(f!==void 0){ut.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new nf(u):new yN(u)};function Rx(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function vf(e,t,n,r){if(typeof t=="function"){const[o,i]=Rx(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Rx(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ni(e,t,n){const r=e.getProps();return vf(r,t,n!==void 0?n:r.custom,e)}const jx=new Set(["width","height","top","left","right","bottom",...ei]),zx=30,DN=e=>!isNaN(parseFloat(e)),gs={current:void 0};class MN{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Xt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Xt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=DN(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ld(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fd);const r=this.events[t].add(n);return t==="change"?()=>{r(),ut.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return gs.current&&gs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Xt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>zx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,zx);return zb(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function uo(e,t){return new MN(e,t)}const yf=e=>Array.isArray(e);function NN(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function FN(e){return yf(e)?e[e.length-1]||0:e}function LN(e,t){const n=ni(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=FN(i[s]);NN(e,s,a)}}const Lt=e=>!!(e&&e.getVelocity);function $N(e){return!!(Lt(e)&&e.add)}function bf(e,t){const n=e.getValue("willChange");if($N(n))return n.add(t);if(!n&&pr.WillChange){const r=new pr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function xf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Bx="data-"+xf("framerAppearId");function Hx(e){return e.props[Bx]}function VN({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function wf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&VN(c,u))continue;const p={delay:n,...mf(i||{},u)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===g&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=Hx(e);if(y){const b=window.MotionHandoffAnimation(y,u,ut);b!==null&&(p.startTime=b,m=!0)}}bf(e,u),d.start(gf(u,d,f,e.shouldReduceMotion&&jx.has(u)?{type:!1}:p,e,m));const h=d.animation;h&&l.push(h)}return s&&Promise.all(l).then(()=>{ut.update(()=>{s&&LN(e,s)})}),l}function Sf(e,t,n={}){const r=ni(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(wf(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return RN(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function RN(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Sf(l,t,{...s,delay:n+(typeof r=="function"?0:r)+$x(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function jN(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Sf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Sf(e,t,n);else{const o=typeof t=="function"?ni(e,t,n.custom):t;r=Promise.all(wf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const zN={test:e=>e==="auto",parse:e=>e},Wx=e=>t=>t.test(e),qx=[Xo,Se,Qn,Ar,gM,mM,zN],Ux=e=>qx.find(Wx(e));function BN(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||jb(e):!0}const HN=new Set(["brightness","contrast","saturate","opacity"]);function WN(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Bd)||[];if(!r)return e;const o=n.replace(r,"");let i=HN.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const qN=/\b([a-z-]*)\(.*?\)/gu,Ef={...Or,getAnimatableNone:e=>{const t=e.match(qN);return t?t.map(WN).join(" "):e}},Gx={...Xo,transform:Math.round},Tf={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,inset:Se,insetBlock:Se,insetBlockStart:Se,insetBlockEnd:Se,insetInline:Se,insetInlineStart:Se,insetInlineEnd:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,paddingBlock:Se,paddingBlockStart:Se,paddingBlockEnd:Se,paddingInline:Se,paddingInlineStart:Se,paddingInlineEnd:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,marginBlock:Se,marginBlockStart:Se,marginBlockEnd:Se,marginInline:Se,marginInlineStart:Se,marginInlineEnd:Se,backgroundPositionX:Se,backgroundPositionY:Se,...{rotate:Ar,rotateX:Ar,rotateY:Ar,rotateZ:Ar,scale:fl,scaleX:fl,scaleY:fl,scaleZ:fl,skew:Ar,skewX:Ar,skewY:Ar,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:us,originX:ax,originY:ax,originZ:Se},zIndex:Gx,fillOpacity:us,strokeOpacity:us,numOctaves:Gx},UN={...Tf,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:Ef,WebkitFilter:Ef},Kx=e=>UN[e];function Yx(e,t){let n=Kx(e);return n!==Ef&&(n=Or),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const GN=new Set(["auto","none","0"]);function KN(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!GN.has(i)&&ps(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Yx(n,o)}class YN extends df{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),zd(d))){const f=Vx(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!jx.has(r)||t.length!==2)return;const[o,i]=t,s=Ux(o),a=Ux(i),l=ix(o),c=ix(i);if(l!==c&&_r[r]){this.needsMeasurement=!0;return}if(s!==a)if(Px(s)&&Px(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else _r[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||BN(t[o]))&&r.push(o);r.length&&KN(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_r[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=_r[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Zx(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const Xx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Cf(e){return Rb(e)&&"offsetHeight"in e}const{schedule:kf}=nx(queueMicrotask,!1),On={x:!1,y:!1};function Qx(){return On.x||On.y}function ZN(e){return e==="x"||e==="y"?On[e]?null:(On[e]=!0,()=>{On[e]=!1}):On.x||On.y?null:(On.x=On.y=!0,()=>{On.x=On.y=!1})}function Jx(e,t){const n=Zx(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function e0(e){return!(e.pointerType==="touch"||Qx())}function XN(e,t,n={}){const[r,o,i]=Jx(e,n),s=a=>{if(!e0(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{e0(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",s,o)}),i}const t0=(e,t)=>t?e===t?!0:t0(e,t.parentElement):!1,If=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,QN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function n0(e){return QN.has(e.tagName)||e.isContentEditable===!0}const ml=new WeakSet;function r0(e){return t=>{t.key==="Enter"&&e(t)}}function Pf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const JN=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=r0(()=>{if(ml.has(n))return;Pf(n,"down");const o=r0(()=>{Pf(n,"up")}),i=()=>Pf(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function o0(e){return If(e)&&!Qx()}function e2(e,t,n={}){const[r,o,i]=Jx(e,n),s=a=>{const l=a.currentTarget;if(!o0(a))return;ml.add(l);const c=t(l,a),u=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ml.has(l)&&ml.delete(l),o0(p)&&typeof c=="function"&&c(p,{success:g})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||t0(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),Cf(a)&&(a.addEventListener("focus",c=>JN(c,o)),!n0(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Af(e){return Rb(e)&&"ownerSVGElement"in e}function i0(e){return Af(e)&&e.tagName==="svg"}function t2(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function n2(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:t2(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=Rd(r)(l/c)*c}return t+l}}function r2(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=wx(o,i,s);return t?a(r):a}const o2=[...qx,At,Or],i2=e=>o2.find(Wx(e)),s0=()=>({translate:0,scale:1,origin:0,originPoint:0}),ri=()=>({x:s0(),y:s0()}),a0=()=>({min:0,max:0}),Ot=()=>({x:a0(),y:a0()}),Of={current:null},l0={current:!1},s2=typeof window<"u";function a2(){if(l0.current=!0,!!s2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Of.current=e.matches;e.addEventListener("change",t),t()}else Of.current=!1}const vs=new WeakMap;function gl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ys(e){return typeof e=="string"||Array.isArray(e)}const _f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Df=["initial",..._f];function vl(e){return gl(e.animate)||Df.some(t=>ys(e[t]))}function c0(e){return!!(vl(e)||e.variants)}function l2(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Lt(o))e.addValue(r,o);else if(Lt(i))e.addValue(r,uo(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,uo(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const u0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yl={};function d0(e){yl=e}function c2(){return yl}class f0{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=df,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Xt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ut.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=vl(n),this.isVariantNode=c0(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&Lt(p)&&p.set(l[f])}}mount(t){this.current=t,vs.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(l0.current||a2(),this.shouldReduceMotion=Of.current),process.env.NODE_ENV!=="production"&&Ld(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),hr(this.notifyUpdate),hr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ti.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ut.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yl){const n=yl[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ot()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<u0.length;r++){const o=u0[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=l2(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Vb(r)||jb(r))?r=parseFloat(r):!i2(r)&&Or.test(n)&&(r=Yx(t,n)),this.setBaseTarget(t,Lt(r)?r.get():r)),Lt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=vf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Lt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){kf.render(this.render)}}class p0 extends f0{constructor(){super(...arguments),this.KeyframeResolver=YN}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Lt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function h0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function u2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function d2(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Mf(e){return e===void 0||e===1}function Nf({scale:e,scaleX:t,scaleY:n}){return!Mf(e)||!Mf(t)||!Mf(n)}function fo(e){return Nf(e)||m0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function m0(e){return g0(e.x)||g0(e.y)}function g0(e){return e&&e!=="0%"}function bl(e,t,n){const r=e-n,o=t*r;return n+o}function v0(e,t,n,r,o){return o!==void 0&&(e=bl(e,o,r)),bl(e,n,r)+t}function Ff(e,t=0,n=1,r,o){e.min=v0(e.min,t,n,r,o),e.max=v0(e.max,t,n,r,o)}function y0(e,{x:t,y:n}){Ff(e.x,t.translate,t.scale,t.originPoint),Ff(e.y,n.translate,n.scale,n.originPoint)}const b0=.999999999999,x0=1.0000000000001;function f2(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ii(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,y0(e,s)),r&&fo(i.latestValues)&&ii(e,i.latestValues))}t.x<x0&&t.x>b0&&(t.x=1),t.y<x0&&t.y>b0&&(t.y=1)}function oi(e,t){e.min=e.min+t,e.max=e.max+t}function w0(e,t,n,r,o=.5){const i=pt(e.min,e.max,o);Ff(e,t,n,i,r)}function ii(e,t){w0(e.x,t.x,t.scaleX,t.scale,t.originX),w0(e.y,t.y,t.scaleY,t.scale,t.originY)}function S0(e,t){return h0(d2(e.getBoundingClientRect(),t))}function p2(e,t,n){const r=S0(e,n),{scroll:o}=t;return o&&(oi(r.x,o.offset.x),oi(r.y,o.offset.y)),r}const h2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},m2=ei.length;function g2(e,t,n){let r="",o=!0;for(let i=0;i<m2;i++){const s=ei[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Xx(a,Tf[s]);if(!l){o=!1;const u=h2[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Lf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(ti.has(l)){s=!0;continue}else if(ox(l)){o[l]=c;continue}else{const u=Xx(c,Tf[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=g2(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function E0(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function T0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const bs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=T0(e,t.target.x),r=T0(e,t.target.y);return`${n}% ${r}%`}},v2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Or.parse(e);if(o.length>5)return r;const i=Or.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=pt(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},$f={borderRadius:{...bs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bs,borderTopRightRadius:bs,borderBottomLeftRadius:bs,borderBottomRightRadius:bs,boxShadow:v2};function C0(e,{layout:t,layoutId:n}){return ti.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$f[e]||e==="opacity")}function Vf(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const s in r)(Lt(r[s])||o&&Lt(o[s])||C0(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}function y2(e){return window.getComputedStyle(e)}class k0 extends p0{constructor(){super(...arguments),this.type="html",this.renderInstance=E0}readValueFromInstance(t,n){if(ti.has(n))return this.projection?.isProjecting?sf(n):YM(t,n);{const r=y2(t),o=(ox(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return S0(t,n)}build(t,n,r){Lf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Vf(t,n,r)}}function b2(e,t){return e in t}class x2 extends f0{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(b2(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Ot()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const w2={offset:"stroke-dashoffset",array:"stroke-dasharray"},S2={offset:"strokeDashoffset",array:"strokeDasharray"};function E2(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?w2:S2;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const T2=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function I0(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Lf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of T2)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&E2(d,o,i,s,!1)}const P0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),A0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function C2(e,t,n,r){E0(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(P0.has(o)?o:xf(o),t.attrs[o])}function O0(e,t,n){const r=Vf(e,t,n);for(const o in e)if(Lt(e[o])||Lt(t[o])){const i=ei.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class _0 extends p0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ot}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ti.has(n)){const r=Kx(n);return r&&r.default||0}return n=P0.has(n)?n:xf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return O0(t,n,r)}build(t,n,r){I0(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){C2(t,n,r,o)}mount(t){this.isSVGTag=A0(t.tagName),super.mount(t)}}const k2=Df.length;function D0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?D0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<k2;n++){const r=Df[n],o=e.props[r];(ys(o)||o===!1)&&(t[r]=o)}return t}function M0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const I2=[..._f].reverse(),P2=_f.length;function A2(e){return t=>Promise.all(t.map(({animation:n,options:r})=>jN(e,n,r)))}function O2(e){let t=A2(e),n=N0(),r=!0;const o=l=>(c,u)=>{const d=ni(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...g}=d;c={...c,...g,...p}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=D0(e.parent)||{},d=[],f=new Set;let p={},g=1/0;for(let h=0;h<P2;h++){const y=I2[h],b=n[y],x=c[y]!==void 0?c[y]:u[y],E=ys(x),S=y===l?b.isActive:null;S===!1&&(g=h);let I=x===u[y]&&x!==c[y]&&E;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),b.protectedKeys={...p},!b.isActive&&S===null||!x&&!b.prevProp||gl(x)||typeof x=="boolean")continue;const w=_2(b.prevProp,x);let C=w||y===l&&b.isActive&&!I&&E||h>g&&E,A=!1;const O=Array.isArray(x)?x:[x];let N=O.reduce(o(y),{});S===!1&&(N={});const{prevResolvedValues:L={}}=b,j={...L,...N},_=M=>{C=!0,f.has(M)&&(A=!0,f.delete(M)),b.needsAnimating[M]=!0;const P=e.getValue(M);P&&(P.liveStyle=!1)};for(const M in j){const P=N[M],R=L[M];if(p.hasOwnProperty(M))continue;let V=!1;yf(P)&&yf(R)?V=!M0(P,R):V=P!==R,V?P!=null?_(M):f.add(M):P!==void 0&&f.has(M)?_(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=N,b.isActive&&(p={...p,...N}),r&&e.blockInitialAnimation&&(C=!1);const F=I&&w;C&&(!F||A)&&d.push(...O.map(M=>{const P={type:y};if(typeof M=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:R}=e,V=ni(R,M);if(R.enteringChildren&&V){const{delayChildren:G}=V.transition||{};P.delay=$x(R.enteringChildren,e,G)}}return{animation:M,options:P}}))}if(f.size){const h={};if(typeof c.initial!="boolean"){const y=ni(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(h.transition=y.transition)}f.forEach(y=>{const b=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),h[y]=b??null}),d.push({animation:h})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=N0()}}}function _2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!M0(t,e):!1}function po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function N0(){return{animate:po(!0),whileInView:po(),whileHover:po(),whileTap:po(),whileDrag:po(),whileFocus:po(),exit:po()}}function F0(e,t){e.min=t.min,e.max=t.max}function _n(e,t){F0(e.x,t.x),F0(e.y,t.y)}function L0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const $0=1e-4,D2=1-$0,M2=1+$0,V0=.01,N2=0-V0,F2=0+V0;function Qt(e){return e.max-e.min}function L2(e,t,n){return Math.abs(e-t)<=n}function R0(e,t,n,r=.5){e.origin=r,e.originPoint=pt(t.min,t.max,e.origin),e.scale=Qt(n)/Qt(t),e.translate=pt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=D2&&e.scale<=M2||isNaN(e.scale))&&(e.scale=1),(e.translate>=N2&&e.translate<=F2||isNaN(e.translate))&&(e.translate=0)}function xs(e,t,n,r){R0(e.x,t.x,n.x,r?r.originX:void 0),R0(e.y,t.y,n.y,r?r.originY:void 0)}function j0(e,t,n){e.min=n.min+t.min,e.max=e.min+Qt(t)}function $2(e,t,n){j0(e.x,t.x,n.x),j0(e.y,t.y,n.y)}function z0(e,t,n){e.min=t.min-n.min,e.max=e.min+Qt(t)}function xl(e,t,n){z0(e.x,t.x,n.x),z0(e.y,t.y,n.y)}function B0(e,t,n,r,o){return e-=t,e=bl(e,1/n,r),o!==void 0&&(e=bl(e,1/o,r)),e}function V2(e,t=0,n=1,r=.5,o,i=e,s=e){if(Qn.test(t)&&(t=parseFloat(t),t=pt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=pt(i.min,i.max,r);e===i&&(a-=t),e.min=B0(e.min,t,n,a,o),e.max=B0(e.max,t,n,a,o)}function H0(e,t,[n,r,o],i,s){V2(e,t[n],t[r],t[o],t.scale,i,s)}const R2=["x","scaleX","originX"],j2=["y","scaleY","originY"];function W0(e,t,n,r){H0(e.x,t,R2,n?n.x:void 0,r?r.x:void 0),H0(e.y,t,j2,n?n.y:void 0,r?r.y:void 0)}function q0(e){return e.translate===0&&e.scale===1}function U0(e){return q0(e.x)&&q0(e.y)}function G0(e,t){return e.min===t.min&&e.max===t.max}function z2(e,t){return G0(e.x,t.x)&&G0(e.y,t.y)}function K0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Y0(e,t){return K0(e.x,t.x)&&K0(e.y,t.y)}function Z0(e){return Qt(e.x)/Qt(e.y)}function X0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function xn(e){return[e("x"),e("y")]}function B2(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Q0=["TopLeft","TopRight","BottomLeft","BottomRight"],H2=Q0.length,J0=e=>typeof e=="string"?parseFloat(e):e,ew=e=>typeof e=="number"||Se.test(e);function W2(e,t,n,r,o,i){o?(e.opacity=pt(0,n.opacity??1,q2(r)),e.opacityExit=pt(t.opacity??1,0,U2(r))):i&&(e.opacity=pt(t.opacity??1,n.opacity??1,r));for(let s=0;s<H2;s++){const a=`border${Q0[s]}Radius`;let l=tw(t,a),c=tw(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||ew(l)===ew(c)?(e[a]=Math.max(pt(J0(l),J0(c),r),0),(Qn.test(c)||Qn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=pt(t.rotate||0,n.rotate||0,r))}function tw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const q2=nw(0,.5,Yb),U2=nw(.5,.95,yn);function nw(e,t,n){return r=>r<e?0:r>t?1:n(Zo(e,t,r))}function rw(e,t,n){const r=Lt(e)?e:uo(e);return r.start(gf("",r,t,n)),r.animation}function ws(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const G2=(e,t)=>e.depth-t.depth;class K2{constructor(){this.children=[],this.isDirty=!1}add(t){Dd(this.children,t),this.isDirty=!0}remove(t){as(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(G2),this.isDirty=!1,this.children.forEach(t)}}function Y2(e,t){const n=Xt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(hr(r),e(i-t))};return ut.setup(r,!0),()=>hr(r)}function wl(e){return Lt(e)?e.get():e}class Z2{constructor(){this.members=[]}add(t){Dd(this.members,t),t.scheduleRender()}remove(t){if(as(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Sl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Rf=["","X","Y","Z"],X2=1e3;let Q2=0;function jf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ow(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Hx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ut,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ow(r)}function iw({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=Q2++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(tF),this.nodes.forEach(iF),this.nodes.forEach(sF),this.nodes.forEach(nF)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new K2)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Fd),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Af(s)&&!i0(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;ut.read(()=>{d=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=Y2(f,250),Sl.hasAnimatedSinceResize&&(Sl.hasAnimatedSinceResize=!1,this.nodes.forEach(lw)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||dF,{onLayoutAnimationStart:m,onLayoutAnimationComplete:h}=c.getProps(),y=!this.targetLayout||!Y0(this.targetLayout,p),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...mf(g,"layout"),onPlay:m,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||lw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),hr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(aF),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ow(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(sw);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(aw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(oF),this.nodes.forEach(J2),this.nodes.forEach(eF)):this.nodes.forEach(aw),this.clearAllSnapshots();const a=Xt.now();Ut.delta=Xn(0,1e3/60,a-Ut.timestamp),Ut.timestamp=a,Ut.isProcessing=!0,jd.update.process(Ut),jd.preRender.process(Ut),jd.render.process(Ut),Ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rF),this.sharedNodes.forEach(lF)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ut.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ut.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Qt(this.snapshot.measuredBox.x)&&!Qt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ot(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!U0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||fo(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),fF(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Ot();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(pF))){const{scroll:c}=this.root;c&&(oi(a.x,c.offset.x),oi(a.y,c.offset.y))}return a}removeElementScroll(s){const a=Ot();if(_n(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&_n(a,s),oi(a.x,u.offset.x),oi(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=Ot();_n(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ii(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),fo(u.latestValues)&&ii(l,u.latestValues)}return fo(this.latestValues)&&ii(l,this.latestValues),l}removeTransform(s){const a=Ot();_n(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!fo(c.latestValues))continue;Nf(c.latestValues)&&c.updateSnapshot();const u=Ot(),d=c.measurePageBox();_n(u,d),W0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return fo(this.latestValues)&&W0(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Ut.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ot(),this.targetWithTransforms=Ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$2(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):_n(this.target,this.layout.layoutBox),y0(this.target,this.targetDelta)):_n(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Nf(this.parent.latestValues)||m0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),xl(this.relativeTargetOrigin,a,l),_n(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ut.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;_n(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;f2(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Ot());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(L0(this.prevProjectionDelta.x,this.projectionDelta.x),L0(this.prevProjectionDelta.y,this.projectionDelta.y)),xs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!X0(this.projectionDelta.x,this.prevProjectionDelta.x)||!X0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ri(),this.projectionDelta=ri(),this.projectionDeltaWithTransform=ri()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ri();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ot(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,h=this.getStack(),y=!h||h.members.length<=1,b=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(uF));this.animationProgress=0;let x;this.mixTargetDelta=E=>{const S=E/1e3;cw(d.x,s.x,S),cw(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cF(this.relativeTarget,this.relativeTargetOrigin,f,S),x&&z2(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Ot()),_n(x,this.relativeTarget)),m&&(this.animationValues=u,W2(u,c,this.latestValues,S,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ut.update(()=>{Sl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=uo(0)),this.currentAnimation=rw(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(X2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&hw(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ot();const d=Qt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=Qt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}_n(a,l),ii(a,u),xs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Z2),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&jf("z",s,c,this.animationValues);for(let u=0;u<Rf.length;u++)jf(`rotate${Rf[u]}`,s,c,this.animationValues),jf(`skew${Rf[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=wl(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=wl(a?.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=B2(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in $f){if(u[g]===void 0)continue;const{correct:m,applyTo:h,isCSSVariable:y}=$f[g],b=d==="none"?u[g]:m(u[g],c);if(h){const x=h.length;for(let E=0;E<x;E++)s[h[E]]=b}else y?this.options.visualElement.renderState.vars[g]=b:s[g]=b}this.options.layoutId&&(s.pointerEvents=c===this?wl(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(sw),this.root.sharedNodes.clear()}}}function J2(e){e.updateLayout()}function eF(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=Qt(d);d.min=n[u].min,d.max=d.min+f}):hw(o,t.layoutBox,n)&&xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=Qt(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const s=ri();xs(s,n,t.layoutBox);const a=ri();i?xs(a,e.applyTransform(r,!0),t.measuredBox):xs(a,n,t.layoutBox);const l=!U0(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Ot();xl(p,t.layoutBox,d.layoutBox);const g=Ot();xl(g,n,f.layoutBox),Y0(p,g)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function tF(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function nF(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rF(e){e.clearSnapshot()}function sw(e){e.clearMeasurements()}function aw(e){e.isLayoutDirty=!1}function oF(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function lw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iF(e){e.resolveTargetDelta()}function sF(e){e.calcProjection()}function aF(e){e.resetSkewAndRotation()}function lF(e){e.removeLeadSnapshot()}function cw(e,t,n){e.translate=pt(t.translate,0,n),e.scale=pt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uw(e,t,n,r){e.min=pt(t.min,n.min,r),e.max=pt(t.max,n.max,r)}function cF(e,t,n,r){uw(e.x,t.x,n.x,r),uw(e.y,t.y,n.y,r)}function uF(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dF={duration:.45,ease:[.4,0,.1,1]},dw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),fw=dw("applewebkit/")&&!dw("chrome/")?Math.round:yn;function pw(e){e.min=fw(e.min),e.max=fw(e.max)}function fF(e){pw(e.x),pw(e.y)}function hw(e,t,n){return e==="position"||e==="preserve-aspect"&&!L2(Z0(t),Z0(n),.2)}function pF(e){return e!==e.root&&e.scroll?.wasRoot}const hF=iw({attachResizeListener:(e,t)=>ws(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),mF=e=>!e.isLayoutDirty&&e.willUpdate(!1);function mw(){const e=new Set,t=new WeakMap,n=()=>e.forEach(mF);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const zf={current:void 0},gw=iw({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zf.current){const e=new hF({});e.mount(window),e.setOptions({layoutScroll:!0}),zf.current=e}return zf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),si=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function vw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gF(...e){return t=>{let n=!1;const r=e.map(o=>{const i=vw(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():vw(e[o],null)}}}}function vF(...e){return k.useCallback(gF(...e),e)}class yF extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Cf(r)&&r.offsetWidth||0,i=Cf(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function bF({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){const i=T.useId(),s=T.useRef(null),a=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=T.useContext(si),c=e.props?.ref??e?.ref,u=vF(s,c);return T.useInsertionEffect(()=>{const{width:d,height:f,top:p,left:g,right:m,bottom:h}=a.current;if(t||!s.current||!d||!f)return;const y=n==="left"?`left: ${g}`:`right: ${m}`,b=r==="bottom"?`bottom: ${h}`:`top: ${p}`;s.current.dataset.motionPopId=i;const x=document.createElement("style");l&&(x.nonce=l);const E=o??document.head;return E.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
1
|
+
(function(ue,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],T):(ue=typeof globalThis<"u"?globalThis:ue||self,T(ue.components={},ue.React,ue["react/jsx-runtime"],ue.ReactDOM))})(this,(function(ue,T,y,Ki){"use strict";function Am(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const I=Am(T),Xn=Am(Ki);function _m(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=_m(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mm(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=_m(e))&&(r&&(r+=" "),r+=t);return r}const Dm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Nm=Mm,Lo=(e,t)=>n=>{var r;if(t?.variants==null)return Nm(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=Dm(u)||Dm(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(h=>{let[m,g]=h;return Array.isArray(g)?g.includes({...i,...a}[m]):{...i,...a}[m]===g})?[...c,d,f]:c},[]);return Nm(e,s,l,n?.class,n?.className)};var Fm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Rk(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Yc,Vm;function Vo(){return Vm||(Vm=1,Yc=TypeError),Yc}const $k=Rk(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Kc,Rm;function ba(){if(Rm)return Kc;Rm=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=o&&i&&typeof i.get=="function"?i.get:null,a=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,E=String.prototype.toUpperCase,S=String.prototype.toLowerCase,O=RegExp.prototype.test,w=Array.prototype.concat,C=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,j=Object.getOwnPropertySymbols,L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(K){return K.__proto__}:null);function k(K,ee){if(K===1/0||K===-1/0||K!==K||K&&K>-1e3&&K<1e3||O.call(/e/,ee))return ee;var _e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof K=="number"){var Ze=K<0?-_(-K):_(K);if(Ze!==K){var Qe=String(Ze),Fe=b.call(ee,Qe.length+1);return x.call(Qe,_e,"$&_")+"."+x.call(x.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(ee,_e,"$&_")}var R=$k,$=R.custom,B=te($)?$:null,H={__proto__:null,double:'"',single:"'"},q={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Kc=function K(ee,_e,Ze,Qe){var Fe=_e||{};if(Z(Fe,"quoteStyle")&&!Z(H,Fe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Z(Fe,"maxStringLength")&&(typeof Fe.maxStringLength=="number"?Fe.maxStringLength<0&&Fe.maxStringLength!==1/0:Fe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var it=Z(Fe,"customInspect")?Fe.customInspect:!0;if(typeof it!="boolean"&&it!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Z(Fe,"indent")&&Fe.indent!==null&&Fe.indent!==" "&&!(parseInt(Fe.indent,10)===Fe.indent&&Fe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Z(Fe,"numericSeparator")&&typeof Fe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var vt=Fe.numericSeparator;if(typeof ee>"u")return"undefined";if(ee===null)return"null";if(typeof ee=="boolean")return ee?"true":"false";if(typeof ee=="string")return he(ee,Fe);if(typeof ee=="number"){if(ee===0)return 1/0/ee>0?"0":"-0";var st=String(ee);return vt?k(ee,st):st}if(typeof ee=="bigint"){var Cn=String(ee)+"n";return vt?k(ee,Cn):Cn}var ro=typeof Fe.depth>"u"?5:Fe.depth;if(typeof Ze>"u"&&(Ze=0),Ze>=ro&&ro>0&&typeof ee=="object")return ie(ee)?"[Array]":"[Object]";var oo=yt(Fe,Ze);if(typeof Qe>"u")Qe=[];else if(pe(Qe,ee)>=0)return"[Circular]";function Fn(Yi,Gc,g9){if(Gc&&(Qe=P.call(Qe),Qe.push(Gc)),g9){var Vk={depth:Fe.depth};return Z(Fe,"quoteStyle")&&(Vk.quoteStyle=Fe.quoteStyle),K(Yi,Vk,Ze+1,Qe)}return K(Yi,Fe,Ze+1,Qe)}if(typeof ee=="function"&&!G(ee)){var Ui=ce(ee),Gi=$e(ee,Fn);return"[Function"+(Ui?": "+Ui:" (anonymous)")+"]"+(Gi.length>0?" { "+C.call(Gi,", ")+" }":"")}if(te(ee)){var Mk=A?x.call(String(ee),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(ee);return typeof ee=="object"&&!A?be(Mk):Mk}if(de(ee)){for(var va="<"+S.call(String(ee.nodeName)),Em=ee.attributes||[],Uc=0;Uc<Em.length;Uc++)va+=" "+Em[Uc].name+"="+W(oe(Em[Uc].value),"double",Fe);return va+=">",ee.childNodes&&ee.childNodes.length&&(va+="..."),va+="</"+S.call(String(ee.nodeName))+">",va}if(ie(ee)){if(ee.length===0)return"[]";var Tm=$e(ee,Fn);return oo&&!gt(Tm)?"["+Bt(Tm,oo)+"]":"[ "+C.call(Tm,", ")+" ]"}if(J(ee)){var Cm=$e(ee,Fn);return!("cause"in Error.prototype)&&"cause"in ee&&!z.call(ee,"cause")?"{ ["+String(ee)+"] "+C.call(w.call("[cause]: "+Fn(ee.cause),Cm),", ")+" }":Cm.length===0?"["+String(ee)+"]":"{ ["+String(ee)+"] "+C.call(Cm,", ")+" }"}if(typeof ee=="object"&&it){if(B&&typeof ee[B]=="function"&&R)return R(ee,{depth:ro-Ze});if(it!=="symbol"&&typeof ee.inspect=="function")return ee.inspect()}if(ge(ee)){var Dk=[];return r&&r.call(ee,function(Yi,Gc){Dk.push(Fn(Gc,ee,!0)+" => "+Fn(Yi,ee))}),qe("Map",n.call(ee),Dk,oo)}if(V(ee)){var Nk=[];return a&&a.call(ee,function(Yi){Nk.push(Fn(Yi,ee))}),qe("Set",s.call(ee),Nk,oo)}if(se(ee))return Ae("WeakMap");if(X(ee))return Ae("WeakSet");if(Y(ee))return Ae("WeakRef");if(N(ee))return be(Fn(Number(ee)));if(re(ee))return be(Fn(F.call(ee)));if(ne(ee))return be(h.call(ee));if(fe(ee))return be(Fn(String(ee)));if(typeof window<"u"&&ee===window)return"{ [object Window] }";if(typeof globalThis<"u"&&ee===globalThis||typeof Fm<"u"&&ee===Fm)return"{ [object globalThis] }";if(!U(ee)&&!G(ee)){var km=$e(ee,Fn),Fk=M?M(ee)===Object.prototype:ee instanceof Object||ee.constructor===Object,Im=ee instanceof Object?"":"null prototype",Lk=!Fk&&D&&Object(ee)===ee&&D in ee?b.call(le(ee),8,-1):Im?"Object":"",m9=Fk||typeof ee.constructor!="function"?"":ee.constructor.name?ee.constructor.name+" ":"",Om=m9+(Lk||Im?"["+C.call(w.call([],Lk||[],Im||[]),": ")+"] ":"");return km.length===0?Om+"{}":oo?Om+"{"+Bt(km,oo)+"}":Om+"{ "+C.call(km,", ")+" }"}return String(ee)};function W(K,ee,_e){var Ze=_e.quoteStyle||ee,Qe=H[Ze];return Qe+K+Qe}function oe(K){return x.call(String(K),/"/g,""")}function ae(K){return!D||!(typeof K=="object"&&(D in K||typeof K[D]<"u"))}function ie(K){return le(K)==="[object Array]"&&ae(K)}function U(K){return le(K)==="[object Date]"&&ae(K)}function G(K){return le(K)==="[object RegExp]"&&ae(K)}function J(K){return le(K)==="[object Error]"&&ae(K)}function fe(K){return le(K)==="[object String]"&&ae(K)}function N(K){return le(K)==="[object Number]"&&ae(K)}function ne(K){return le(K)==="[object Boolean]"&&ae(K)}function te(K){if(A)return K&&typeof K=="object"&&K instanceof Symbol;if(typeof K=="symbol")return!0;if(!K||typeof K!="object"||!L)return!1;try{return L.call(K),!0}catch{}return!1}function re(K){if(!K||typeof K!="object"||!F)return!1;try{return F.call(K),!0}catch{}return!1}var Q=Object.prototype.hasOwnProperty||function(K){return K in this};function Z(K,ee){return Q.call(K,ee)}function le(K){return m.call(K)}function ce(K){if(K.name)return K.name;var ee=v.call(g.call(K),/^function\s*([\w$]+)/);return ee?ee[1]:null}function pe(K,ee){if(K.indexOf)return K.indexOf(ee);for(var _e=0,Ze=K.length;_e<Ze;_e++)if(K[_e]===ee)return _e;return-1}function ge(K){if(!n||!K||typeof K!="object")return!1;try{n.call(K);try{s.call(K)}catch{return!0}return K instanceof Map}catch{}return!1}function se(K){if(!c||!K||typeof K!="object")return!1;try{c.call(K,c);try{d.call(K,d)}catch{return!0}return K instanceof WeakMap}catch{}return!1}function Y(K){if(!p||!K||typeof K!="object")return!1;try{return p.call(K),!0}catch{}return!1}function V(K){if(!s||!K||typeof K!="object")return!1;try{s.call(K);try{n.call(K)}catch{return!0}return K instanceof Set}catch{}return!1}function X(K){if(!d||!K||typeof K!="object")return!1;try{d.call(K,d);try{c.call(K,c)}catch{return!0}return K instanceof WeakSet}catch{}return!1}function de(K){return!K||typeof K!="object"?!1:typeof HTMLElement<"u"&&K instanceof HTMLElement?!0:typeof K.nodeName=="string"&&typeof K.getAttribute=="function"}function he(K,ee){if(K.length>ee.maxStringLength){var _e=K.length-ee.maxStringLength,Ze="... "+_e+" more character"+(_e>1?"s":"");return he(b.call(K,0,ee.maxStringLength),ee)+Ze}var Qe=q[ee.quoteStyle||"single"];Qe.lastIndex=0;var Fe=x.call(x.call(K,Qe,"\\$1"),/[\x00-\x1f]/g,Se);return W(Fe,"single",ee)}function Se(K){var ee=K.charCodeAt(0),_e={8:"b",9:"t",10:"n",12:"f",13:"r"}[ee];return _e?"\\"+_e:"\\x"+(ee<16?"0":"")+E.call(ee.toString(16))}function be(K){return"Object("+K+")"}function Ae(K){return K+" { ? }"}function qe(K,ee,_e,Ze){var Qe=Ze?Bt(_e,Ze):C.call(_e,", ");return K+" ("+ee+") {"+Qe+"}"}function gt(K){for(var ee=0;ee<K.length;ee++)if(pe(K[ee],`
|
|
2
|
+
`)>=0)return!1;return!0}function yt(K,ee){var _e;if(K.indent===" ")_e=" ";else if(typeof K.indent=="number"&&K.indent>0)_e=C.call(Array(K.indent+1)," ");else return null;return{base:_e,prev:C.call(Array(ee+1),_e)}}function Bt(K,ee){if(K.length===0)return"";var _e=`
|
|
3
|
+
`+ee.prev+ee.base;return _e+C.call(K,","+_e)+`
|
|
4
|
+
`+ee.prev}function $e(K,ee){var _e=ie(K),Ze=[];if(_e){Ze.length=K.length;for(var Qe=0;Qe<K.length;Qe++)Ze[Qe]=Z(K,Qe)?ee(K[Qe],K):""}var Fe=typeof j=="function"?j(K):[],it;if(A){it={};for(var vt=0;vt<Fe.length;vt++)it["$"+Fe[vt]]=Fe[vt]}for(var st in K)Z(K,st)&&(_e&&String(Number(st))===st&&st<K.length||A&&it["$"+st]instanceof Symbol||(O.call(/[^\w$]/,st)?Ze.push(ee(st,K)+": "+ee(K[st],K)):Ze.push(st+": "+ee(K[st],K))));if(typeof j=="function")for(var Cn=0;Cn<Fe.length;Cn++)z.call(K,Fe[Cn])&&Ze.push("["+ee(Fe[Cn])+"]: "+ee(K[Fe[Cn]],K));return Ze}return Kc}var Zc,$m;function jk(){if($m)return Zc;$m=1;var e=ba(),t=Vo(),n=function(a,l,c){for(var u=a,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=a.next,a.next=d),d},r=function(a,l){if(a){var c=n(a,l);return c&&c.value}},o=function(a,l,c){var u=n(a,l);u?u.value=c:a.next={key:l,next:a.next,value:c}},i=function(a,l){return a?!!n(a,l):!1},s=function(a,l){if(a)return n(a,l,!0)};return Zc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=s(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Zc}var Xc,jm;function zm(){return jm||(jm=1,Xc=Object),Xc}var Qc,Bm;function zk(){return Bm||(Bm=1,Qc=Error),Qc}var Jc,Hm;function Bk(){return Hm||(Hm=1,Jc=EvalError),Jc}var eu,Wm;function Hk(){return Wm||(Wm=1,eu=RangeError),eu}var tu,qm;function Wk(){return qm||(qm=1,tu=ReferenceError),tu}var nu,Um;function qk(){return Um||(Um=1,nu=SyntaxError),nu}var ru,Gm;function Uk(){return Gm||(Gm=1,ru=URIError),ru}var ou,Ym;function Gk(){return Ym||(Ym=1,ou=Math.abs),ou}var iu,Km;function Yk(){return Km||(Km=1,iu=Math.floor),iu}var su,Zm;function Kk(){return Zm||(Zm=1,su=Math.max),su}var au,Xm;function Zk(){return Xm||(Xm=1,au=Math.min),au}var lu,Qm;function Xk(){return Qm||(Qm=1,lu=Math.pow),lu}var cu,Jm;function Qk(){return Jm||(Jm=1,cu=Math.round),cu}var uu,eg;function Jk(){return eg||(eg=1,uu=Number.isNaN||function(t){return t!==t}),uu}var du,tg;function eI(){if(tg)return du;tg=1;var e=Jk();return du=function(n){return e(n)||n===0?n:n<0?-1:1},du}var fu,ng;function tI(){return ng||(ng=1,fu=Object.getOwnPropertyDescriptor),fu}var pu,rg;function og(){if(rg)return pu;rg=1;var e=tI();if(e)try{e([],"length")}catch{e=null}return pu=e,pu}var hu,ig;function nI(){if(ig)return hu;ig=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return hu=e,hu}var mu,sg;function rI(){return sg||(sg=1,mu=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),mu}var gu,ag;function oI(){if(ag)return gu;ag=1;var e=typeof Symbol<"u"&&Symbol,t=rI();return gu=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},gu}var yu,lg;function cg(){return lg||(lg=1,yu=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),yu}var vu,ug;function dg(){if(ug)return vu;ug=1;var e=zm();return vu=e.getPrototypeOf||null,vu}var bu,fg;function iI(){if(fg)return bu;fg=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},s=function(a,l){for(var c="",u=0;u<a.length;u+=1)c+=a[u],u+1<a.length&&(c+=l);return c};return bu=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),h=[],m=0;m<p;m++)h[m]="$"+m;if(d=Function("binder","return function ("+s(h,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var g=function(){};g.prototype=c.prototype,d.prototype=new g,g.prototype=null}return d},bu}var xu,pg;function xa(){if(pg)return xu;pg=1;var e=iI();return xu=Function.prototype.bind||e,xu}var wu,hg;function Su(){return hg||(hg=1,wu=Function.prototype.call),wu}var Eu,mg;function gg(){return mg||(mg=1,Eu=Function.prototype.apply),Eu}var Tu,yg;function sI(){return yg||(yg=1,Tu=typeof Reflect<"u"&&Reflect&&Reflect.apply),Tu}var Cu,vg;function aI(){if(vg)return Cu;vg=1;var e=xa(),t=gg(),n=Su(),r=sI();return Cu=r||e.call(n,t),Cu}var ku,bg;function xg(){if(bg)return ku;bg=1;var e=xa(),t=Vo(),n=Su(),r=aI();return ku=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},ku}var Iu,wg;function lI(){if(wg)return Iu;wg=1;var e=xg(),t=og(),n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Iu=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,Iu}var Ou,Sg;function cI(){if(Sg)return Ou;Sg=1;var e=cg(),t=dg(),n=lI();return Ou=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,Ou}var Pu,Eg;function uI(){if(Eg)return Pu;Eg=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=xa();return Pu=n.call(e,t),Pu}var Au,Tg;function _u(){if(Tg)return Au;Tg=1;var e,t=zm(),n=zk(),r=Bk(),o=Hk(),i=Wk(),s=qk(),a=Vo(),l=Uk(),c=Gk(),u=Yk(),d=Kk(),f=Zk(),p=Xk(),h=Qk(),m=eI(),g=Function,v=function(G){try{return g('"use strict"; return ('+G+").constructor;")()}catch{}},b=og(),x=nI(),E=function(){throw new a},S=b?(function(){try{return arguments.callee,E}catch{try{return b(arguments,"callee").get}catch{return E}}})():E,O=oI()(),w=cI(),C=dg(),P=cg(),_=gg(),F=Su(),j={},L=typeof Uint8Array>"u"||!w?e:w(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":O&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":j,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!O||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!O||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&w?w(""[Symbol.iterator]()):e,"%Symbol%":O?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":S,"%TypedArray%":L,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":h,"%Math.sign%":m,"%Reflect.getPrototypeOf%":P};if(w)try{null.error}catch(G){var D=w(w(G));A["%Error.prototype%"]=D}var z=function G(J){var fe;if(J==="%AsyncFunction%")fe=v("async function () {}");else if(J==="%GeneratorFunction%")fe=v("function* () {}");else if(J==="%AsyncGeneratorFunction%")fe=v("async function* () {}");else if(J==="%AsyncGenerator%"){var N=G("%AsyncGeneratorFunction%");N&&(fe=N.prototype)}else if(J==="%AsyncIteratorPrototype%"){var ne=G("%AsyncGenerator%");ne&&w&&(fe=w(ne.prototype))}return A[J]=fe,fe},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},k=xa(),R=uI(),$=k.call(F,Array.prototype.concat),B=k.call(_,Array.prototype.splice),H=k.call(F,String.prototype.replace),q=k.call(F,String.prototype.slice),W=k.call(F,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ae=/\\(\\)?/g,ie=function(J){var fe=q(J,0,1),N=q(J,-1);if(fe==="%"&&N!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(N==="%"&&fe!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ne=[];return H(J,oe,function(te,re,Q,Z){ne[ne.length]=Q?H(Z,ae,"$1"):re||te}),ne},U=function(J,fe){var N=J,ne;if(R(M,N)&&(ne=M[N],N="%"+ne[0]+"%"),R(A,N)){var te=A[N];if(te===j&&(te=z(N)),typeof te>"u"&&!fe)throw new a("intrinsic "+J+" exists, but is not available. Please file an issue!");return{alias:ne,name:N,value:te}}throw new s("intrinsic "+J+" does not exist!")};return Au=function(J,fe){if(typeof J!="string"||J.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof fe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(W(/^%?[^%]*%?$/,J)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var N=ie(J),ne=N.length>0?N[0]:"",te=U("%"+ne+"%",fe),re=te.name,Q=te.value,Z=!1,le=te.alias;le&&(ne=le[0],B(N,$([0,1],le)));for(var ce=1,pe=!0;ce<N.length;ce+=1){var ge=N[ce],se=q(ge,0,1),Y=q(ge,-1);if((se==='"'||se==="'"||se==="`"||Y==='"'||Y==="'"||Y==="`")&&se!==Y)throw new s("property names with quotes must have matching quotes");if((ge==="constructor"||!pe)&&(Z=!0),ne+="."+ge,re="%"+ne+"%",R(A,re))Q=A[re];else if(Q!=null){if(!(ge in Q)){if(!fe)throw new a("base intrinsic for "+J+" exists, but the property is not available.");return}if(b&&ce+1>=N.length){var V=b(Q,ge);pe=!!V,pe&&"get"in V&&!("originalValue"in V.get)?Q=V.get:Q=Q[ge]}else pe=R(Q,ge),Q=Q[ge];pe&&!Z&&(A[re]=Q)}}return Q},Au}var Mu,Cg;function kg(){if(Cg)return Mu;Cg=1;var e=_u(),t=xg(),n=t([e("%String.prototype.indexOf%")]);return Mu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},Mu}var Du,Ig;function Og(){if(Ig)return Du;Ig=1;var e=_u(),t=kg(),n=ba(),r=Vo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),a=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return Du=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var h=l(d,p);return c(d)===0&&(d=void 0),h}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?a(d,p):!1},set:function(p,h){d||(d=new o),s(d,p,h)}};return f},Du}var Nu,Pg;function dI(){if(Pg)return Nu;Pg=1;var e=_u(),t=kg(),n=ba(),r=Og(),o=Vo(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return Nu=i?function(){var d,f,p={assert:function(h){if(!p.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&f)return f.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?s(d,h):f&&f.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!f&&f.has(h)},set:function(h,m){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),a(d,h,m)):r&&(f||(f=r()),f.set(h,m))}};return p}:r,Nu}var Fu,Ag;function _g(){if(Ag)return Fu;Ag=1;var e=Vo(),t=ba(),n=jk(),r=Og(),o=dI(),i=o||r||n;return Fu=function(){var a,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,u){a||(a=i()),a.set(c,u)}};return l},Fu}var Mg=e=>Array.isArray(e),Lu=e=>e===void 0,Vu=e=>e===null,fI=Function.bind.call(Function.call,Object.prototype.toString),pI=e=>!!e&&fI(e)==="[object Error]"||e instanceof Error,Dg=(e,t)=>e instanceof t,hI=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},mI=e=>Object.prototype.toString.call(e)==="[object Date]"&&Dg(e,Date),Ue={array:Mg,date:mI,empty:e=>Vu(e)||Lu(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Dg,isError:pI,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Vu(e)||Lu(e),null:Vu,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Mg(e)&&typeof e=="object",primitive:hI,string:e=>typeof e=="string",undefined:Lu},gI=e=>Object.keys(e),Qn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,s)=>i&&i[s],e);return o===void 0?n:o},yI=e=>e.replace(/[^0-9]/g,"");const vI=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},bI=(e,t)=>({classGroupId:e,validator:t}),Ng=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),wa="-",Fg=[],xI="arbitrary..",wI=e=>{const t=EI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return SI(s);const a=s.split(wa),l=a[0]===""&&a.length>1?1:0;return Lg(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?vI(c,l):l:c||Fg}return n[s]||Fg}}},Lg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Lg(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(wa):e.slice(t).join(wa),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},SI=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?xI+r:void 0})(),EI=e=>{const{theme:t,classGroups:n}=e;return TI(n,t)},TI=(e,t)=>{const n=Ng();for(const r in e){const o=e[r];Ru(o,n,r,t)}return n},Ru=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];CI(s,t,n,r)}},CI=(e,t,n,r)=>{if(typeof e=="string"){kI(e,t,n);return}if(typeof e=="function"){II(e,t,n,r);return}OI(e,t,n,r)},kI=(e,t,n)=>{const r=e===""?t:Vg(t,e);r.classGroupId=n},II=(e,t,n,r)=>{if(PI(e)){Ru(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bI(n,e))},OI=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Ru(l,Vg(t,a),n,r)}},Vg=(e,t)=>{let n=e;const r=t.split(wa),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=Ng(),n.nextPart.set(s,a)),n=a}return n},PI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,AI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},$u="!",Rg=":",_I=[],$g=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),MI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let m=0;m<u;m++){const g=o[m];if(s===0&&a===0){if(g===Rg){i.push(o.slice(l,m)),l=m+1;continue}if(g==="/"){c=m;continue}}g==="["?s++:g==="]"?s--:g==="("?a++:g===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith($u)?(f=d.slice(0,-1),p=!0):d.startsWith($u)&&(f=d.slice(1),p=!0);const h=c&&c>l?c-l:void 0;return $g(i,p,f,h)};if(t){const o=t+Rg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):$g(_I,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},DI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},NI=e=>({cache:AI(e.cacheSize),parseClassName:MI(e),sortModifiers:DI(e),...wI(e)}),FI=/\s+/,LI=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(FI);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let g=!!m,v=r(g?h.substring(0,m):h);if(!v){if(!g){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}g=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+$u:b,E=x+v;if(s.indexOf(E)>-1)continue;s.push(E);const S=o(v,g);for(let O=0;O<S.length;++O){const w=S[O];s.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},VI=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=jg(n))&&(o&&(o+=" "),o+=r);return o},jg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=jg(e[r]))&&(n&&(n+=" "),n+=t);return n},RI=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=NI(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=LI(l,n);return o(l,u),u};return i=s,(...l)=>i(VI(...l))},$I=[],Ht=e=>{const t=n=>n[e]||$I;return t.isThemeGetter=!0,t},zg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jI=/^\d+\/\d+$/,zI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,HI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,WI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ro=e=>jI.test(e),He=e=>!!e&&!Number.isNaN(Number(e)),Ir=e=>!!e&&Number.isInteger(Number(e)),ju=e=>e.endsWith("%")&&He(e.slice(0,-1)),br=e=>zI.test(e),UI=()=>!0,GI=e=>BI.test(e)&&!HI.test(e),Hg=()=>!1,YI=e=>WI.test(e),KI=e=>qI.test(e),ZI=e=>!Ee(e)&&!Te(e),XI=e=>$o(e,Yg,Hg),Ee=e=>zg.test(e),io=e=>$o(e,Kg,GI),zu=e=>$o(e,nO,He),Wg=e=>$o(e,Ug,Hg),QI=e=>$o(e,Gg,KI),Sa=e=>$o(e,Zg,YI),Te=e=>Bg.test(e),Zi=e=>jo(e,Kg),JI=e=>jo(e,rO),qg=e=>jo(e,Ug),eO=e=>jo(e,Yg),tO=e=>jo(e,Gg),Ea=e=>jo(e,Zg,!0),$o=(e,t,n)=>{const r=zg.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},jo=(e,t,n=!1)=>{const r=Bg.exec(e);return r?r[1]?t(r[1]):n:!1},Ug=e=>e==="position"||e==="percentage",Gg=e=>e==="image"||e==="url",Yg=e=>e==="length"||e==="size"||e==="bg-size",Kg=e=>e==="length",nO=e=>e==="number",rO=e=>e==="family-name",Zg=e=>e==="shadow",oO=RI(()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),r=Ht("font-weight"),o=Ht("tracking"),i=Ht("leading"),s=Ht("breakpoint"),a=Ht("container"),l=Ht("spacing"),c=Ht("radius"),u=Ht("shadow"),d=Ht("inset-shadow"),f=Ht("text-shadow"),p=Ht("drop-shadow"),h=Ht("blur"),m=Ht("perspective"),g=Ht("aspect"),v=Ht("ease"),b=Ht("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...E(),Te,Ee],O=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],C=()=>[Te,Ee,l],P=()=>[Ro,"full","auto",...C()],_=()=>[Ir,"none","subgrid",Te,Ee],F=()=>["auto",{span:["full",Ir,Te,Ee]},Ir,Te,Ee],j=()=>[Ir,"auto",Te,Ee],L=()=>["auto","min","max","fr",Te,Ee],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...C()],M=()=>[Ro,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,Te,Ee],R=()=>[...E(),qg,Wg,{position:[Te,Ee]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",eO,XI,{size:[Te,Ee]}],H=()=>[ju,Zi,io],q=()=>["","none","full",c,Te,Ee],W=()=>["",He,Zi,io],oe=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[He,ju,qg,Wg],U=()=>["","none",h,Te,Ee],G=()=>["none",He,Te,Ee],J=()=>["none",He,Te,Ee],fe=()=>[He,Te,Ee],N=()=>[Ro,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[br],breakpoint:[br],color:[UI],container:[br],"drop-shadow":[br],ease:["in","out","in-out"],font:[ZI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[br],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[br],shadow:[br],spacing:["px",He],text:[br],"text-shadow":[br],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ro,Ee,Te,g]}],container:["container"],columns:[{columns:[He,Ee,Te,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Ir,"auto",Te,Ee]}],basis:[{basis:[Ro,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,Ro,"auto","initial","none",Ee]}],grow:[{grow:["",He,Te,Ee]}],shrink:[{shrink:["",He,Te,Ee]}],order:[{order:[Ir,"first","last","none",Te,Ee]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[a,"screen",...M()]}],"min-w":[{"min-w":[a,"screen","none",...M()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Zi,io]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Te,zu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ju,Ee]}],"font-family":[{font:[JI,Ee,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Te,Ee]}],"line-clamp":[{"line-clamp":[He,"none",Te,zu]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",Te,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",Te,io]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[He,"auto",Te,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ir,Te,Ee],radial:["",Te,Ee],conic:[Ir,Te,Ee]},tO,QI]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,Te,Ee]}],"outline-w":[{outline:["",He,Zi,io]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,Ea,Sa]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,Ea,Sa]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[He,io]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,Ea,Sa]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[He,Te,Ee]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Te,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Ee]}],filter:[{filter:["","none",Te,Ee]}],blur:[{blur:U()}],brightness:[{brightness:[He,Te,Ee]}],contrast:[{contrast:[He,Te,Ee]}],"drop-shadow":[{"drop-shadow":["","none",p,Ea,Sa]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",He,Te,Ee]}],"hue-rotate":[{"hue-rotate":[He,Te,Ee]}],invert:[{invert:["",He,Te,Ee]}],saturate:[{saturate:[He,Te,Ee]}],sepia:[{sepia:["",He,Te,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Ee]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[He,Te,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[He,Te,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,Te,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,Te,Ee]}],"backdrop-invert":[{"backdrop-invert":["",He,Te,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[He,Te,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[He,Te,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",He,Te,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",Te,Ee]}],ease:[{ease:["linear","initial",v,Te,Ee]}],delay:[{delay:[He,Te,Ee]}],animate:[{animate:["none",b,Te,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Te,Ee]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[Te,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:N()}],"translate-x":[{"translate-x":N()}],"translate-y":[{"translate-y":N()}],"translate-z":[{"translate-z":N()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,Ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,Ee]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[He,Zi,io,zu]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),xr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},iO=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Bu=e=>Ue.function(e),Me=(...e)=>oO(Mm(e)),Xg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Xi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Qg=e=>e.scrollHeight>e.clientHeight,Qi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},sO=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},gn=T.forwardRef(function(t,n){const r=t.as||"span";return y.jsx(r,{ref:n,...t,as:void 0})}),aO={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},lO=Lo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),cO=Lo("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:aO,defaultVariants:{theme:"primary",size:"default"}}),Ta=T.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return y.jsxs(gn,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Me(cO({size:s,theme:o?"loading":i}),t),children:[n?y.jsx("span",{"aria-hidden":"true",className:lO({theme:n})}):null,r,a.children]})}),uO=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return y.jsx("form",{...e,onSubmit:t})};var Dt=function(){return Dt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Dt.apply(this,arguments)};function Hu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Wu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Ji=function(e){return e.replace(new RegExp(" ","g")," ")},Jg=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},dO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},ey=function(e,t,n){var r=e.length-2,o=dO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},ty=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ca=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},fO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},qu=function(e){var t=T.useRef(e);return T.useEffect(function(){t.current=e},[e]),t},pO=function(e){return e==="money"||e==="currency"},hO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Dt(Dt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ka=function(e,t){var n=Jg(ty(e),t.fraction.length),r="".concat(t.currency).concat(ey(n,t.group,t.decimal));return Ji(r)},mO=T.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Hu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=T.useRef(null);T.useImperativeHandle(t,function(){return u.current});var d=T.useMemo(function(){var h=hO(r,i,a);return h.currency=Ji("".concat(h.currency.trim()," ")),h.literal=Ji(h.literal.trim()),h},[r,i]),f=function(h){var m=ka(h.target.value,d),g=Ca(m);h.target.value=m,h.target.setAttribute("data-number",g.toString()),l?.(h),g!==0&&(u.current.selectionEnd=m.length)};T.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var m=ka(h,d),g=Ca(m);u.current.value=m,u.current.setAttribute("data-number",g.toString());var v=new InputEvent("change",{});l?.(Dt(Dt({},v),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=m.length)}}},[d]);var p=c.defaultValue?ka(c.defaultValue,d):void 0;return T.createElement("input",Dt({},c,{value:typeof c.value=="string"?ka(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),gO=1,yO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},vO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Dt(Dt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Ia=function(e,t){var n=Jg(ty(e),t.fraction.length),r="".concat(ey(n,t.group,t.decimal)," ").concat(t.percentSign);return Ji(r)},bO=T.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Hu(e,["locale","mask","onChange","onKeyUp"]),a=T.useRef(null),l=Wu(T.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];T.useImperativeHandle(t,function(){return a.current}),T.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Ia(b,d))},[s.value]);var d=T.useMemo(function(){var v=vO(r);return v.percentSign=Ji("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-gO,p=function(v){var b,x=a.current;x&&(x.setSelectionRange(f,f),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},h=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,E=b.selectionEnd,S=x!==E,O=f<x;!S&&O&&p()}i?.(v)},m=function(v){var b=Ia(v.target.value,d),x=Ca(b);u(b),v.target.value=b,v.target.setAttribute("data-number",x.toString()),o?.(v)};T.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var b=Ia(v,d),x=Ca(b);u(b),a.current.value=b,a.current.setAttribute("data-number",x.toString());var E=new InputEvent("change",{});o?.(Dt(Dt({},E),{target:a.current,currentTarget:a.current}))}}},[]),T.useEffect(function(){return p()},[c]);var g=s.defaultValue?Ia(s.defaultValue,d):void 0;return T.createElement("input",Dt({},s,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:p,onKeyUp:h,ref:a,type:"text"}))}),es={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},xO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=Oa[i];s===void 0?r.push(i.replace(es.dots,"\\.").replace(es.openParenthesis,"\\(").replace(es.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(es.leadingBars,"\\")},ts=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Uu(o,n);var i=xO(o);return n?"^".concat(i,"$"):i},wO=function(e){return e.replace(es.escape,"\\$&")},Uu=function(e,t){var n=e.map(function(r){return typeof r=="string"?wO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Oa={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},SO=/\d/,ny="(dd) 9dddd-dddd",ry="(dd) dddd-dddd",oy="ddd.ddd.ddd-dd",iy="dd.ddd.ddd/dddd-dd",Pa=function(e){return e.replace(/\D/g,"")},EO=["2",/[0-3]/,":",/[0-5]/,/\d/],TO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],un={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:oy,isoDate:"dddd-dd-dd",cnpj:iy,telephone:ry,cellphone:ny,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Pa(e).length<=11?oy:iy},int:function(e){return e===void 0&&(e=""),SO.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Pa(e);return t.length<11?ry:ny},time:function(e){var t=Pa(e),n=t[0];return n==="2"?EO:TO}},dn=function(e,t,n){var r;return n===void 0&&(n={}),Dt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:ts(e,"",!0),infinity:n.infinity},n)},en={cellTelephone:dn(un.cellTelephone,"tel"),cellphone:dn(un.cellphone,"tel"),cep:dn(un.cep,"decimal"),cnpj:dn(un.cnpj,"decimal"),color:dn(un.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:dn(un.cpf,"decimal"),cpfCnpj:dn(un.cpfCnpj,"decimal",{transform:Pa}),creditCard:dn(un.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:dn(un.date,"decimal"),int:dn(un.int,"decimal",{pattern:"[0-9]+"}),isoDate:dn(un.isoDate,"decimal"),telephone:dn(un.telephone,"tel"),time:dn(un.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:dn(un.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function sy(e,t,n,r){var o,i;r===void 0&&(r=Oa);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(a+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var ay=function(e){return e},CO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(ts(e,n,t));return r.test(n)};function kO(e){var t=T.useRef(e);return T.useEffect(function(){t.current=e},[e]),t.current}var IO=T.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=Hu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=T.useRef(null);T.useImperativeHandle(t,function(){return h.current});var m=qu(a),g=qu(d),v=qu(u),b=T.useRef(CO(u,i,p.value||p.defaultValue)),x=f??"input",E=Wu(T.useState(""),2),S=E[0],O=E[1],w=kO(S),C=T.useCallback(function(D,z){var M,k,R=(M=D??z)!==null&&M!==void 0?M:"";if(u===void 0)return R;var $=(k=R?.toString())!==null&&k!==void 0?k:"";return sy($,typeof u=="function"?u($):u,s??ay,c??Oa)},[s,u,c]),P=Wu(T.useState(function(){return C(p.value,p.defaultValue)}),2),_=P[0],F=P[1],j=C(p.defaultValue,p.defaultValue),L=T.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(_);return Array.isArray(D)?Uu(D,i):ts(u,_,i)}return typeof u=="string"?ts(u,_,i):Uu(u,i)},[l,_,i,u]);T.useEffect(function(){if(p.value!==void 0){var D=C(p.value,p.defaultValue);F(D),h.current!==null&&(h.current.value=D)}},[p.value,u,s,p.defaultValue]);var A=function(D){var z,M,k,R,$,B=D.currentTarget,H=D.target.value;if(v.current===void 0)return F(H),(z=g.current)===null||z===void 0||z.call(g,H),(M=m.current)===null||M===void 0||M.call(m,D),d?.(H);var q=new RegExp(ts(v.current,H,i)),W=(k=B.selectionEnd)!==null&&k!==void 0?k:0,oe=function(J,fe,N){if(J.type!=="number")return J.setSelectionRange(fe,N)};if(r&&b.current&&H.length>=_.length)return B.value=_,oe(B,W-1,W-1);var ae=!1;H.length<w.length&&(b.current=!1,ae=!0),q.test(H)&&(b.current=!0);var ie=W,U=H[ie-1],G=sy(H,typeof v.current=="function"?v.current(H):v.current,s??ay,c??Oa);for(B.value=G,F(G);ie<G.length&&G.charAt(ie-1)!==U;)ie+=1;ae?oe(B,W,W):oe(B,ie,ie),D.target.value=G,O(G),(R=g.current)===null||R===void 0||R.call(g,G),($=m.current)===null||$===void 0||$.call(m,D)};return T.createElement(x,Dt({},p,{ref:h,pattern:L,onChange:A,defaultValue:ly(p.defaultValue)?j:void 0,value:ly(p.value)?C(p.value,p.value):p.value}))}),ly=function(e){return typeof e=="string"},cy=T.forwardRef(function(e,t){return pO(e.mask)?T.createElement(mO,Dt({},e,{mask:void 0,ref:t})):yO(e.mask)?T.createElement(bO,Dt({},e,{mask:void 0,ref:t})):T.createElement(IO,Dt({},e,{ref:t}))}),fn=function(e){return function(t){return T.createElement(cy,Dt({},e,t))}};fn(en.cellTelephone),fn(en.cellphone),fn(en.cep),fn(en.cnpj),fn(en.color),fn(en.cpf),fn(en.cpfCnpj),fn(en.creditCard),fn(en.date),fn(en.int),fn(en.isoDate),fn(en.telephone),fn(en.time),fn(en.uuid);var uy=T.forwardRef(function(t,n){var r=T.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&fO(en,t.mask)?en[t.mask]:{mask:t.mask}},[t.mask]),o=Dt(Dt({},t),r);return T.createElement(cy,Dt({},o,{ref:n}))});const OO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),PO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),dy=e=>{const t=PO(e);return t.charAt(0).toUpperCase()+t.slice(1)},fy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),AO=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var _O={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const MO=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>T.createElement("svg",{ref:l,..._O,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fy("lucide",o),...!i&&!AO(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>T.createElement(c,u)),...Array.isArray(i)?i:[i]]));const at=(e,t)=>{const n=T.forwardRef(({className:r,...o},i)=>T.createElement(MO,{ref:i,iconNode:t,className:fy(`lucide-${OO(dy(e))}`,`lucide-${e}`,r),...o}));return n.displayName=dy(e),n};const DO=at("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const NO=at("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const py=at("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const FO=at("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const LO=at("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Gu=at("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const VO=at("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Yu=at("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const hy=at("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const RO=at("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const $O=at("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const jO=at("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const my=at("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const gy=at("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const yy=at("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const zO=at("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const BO=at("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const vy=at("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const HO=at("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Ku=at("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const WO=at("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const qO=at("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const Zu=at("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const UO=at("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const GO=at("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Xu=at("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const Aa=at("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const YO=at("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const KO=at("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const zo=at("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_a={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Or=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(Or(s,t,n,a))},[]),by=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:by(s,t,n,a)}},{}),xy={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Ma=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},ZO={default:e=>Ma(e,{result:xy.default}),dark:e=>Ma(e,{result:xy.dark})},Bo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},XO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Qu=(e,t)=>{const n=Or(e.colors,Bo(t?.colors)),r=Or(e.spacing,Bo(t?.spacing)),o=Or(e.rounded,Bo(t?.rounded)),i=Or(e.shadow,Bo(t?.rounded)),s=Or(e.zIndex,Bo(t?.zIndex??XO)),a=e.custom?Or(e.custom,Bo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},QO=(e,t)=>Ma(Qu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),JO=(e,t)=>Qu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),eP=(e,t)=>Ma(Qu(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),Da={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>y.jsxs(T.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},Na={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Ho=T.createContext({tweaks:Na,parser:_a.hsla,map:Da,locale:void 0}),Nt=()=>{const e=T.useContext(Ho);return e?e.map:Da},Ju=()=>{const e=T.useContext(Ho);return e?e.tweaks:Na};function Fa(){return typeof window<"u"}function Jn(e){return La(e)?(e.nodeName||"").toLowerCase():"#document"}function Ft(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function er(e){var t;return(t=(La(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function La(e){return Fa()?e instanceof Node||e instanceof Ft(e).Node:!1}function Ge(e){return Fa()?e instanceof Element||e instanceof Ft(e).Element:!1}function dt(e){return Fa()?e instanceof HTMLElement||e instanceof Ft(e).HTMLElement:!1}function ns(e){return!Fa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ft(e).ShadowRoot}const tP=new Set(["inline","contents"]);function so(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!tP.has(o)}const nP=new Set(["table","td","th"]);function rP(e){return nP.has(Jn(e))}const oP=[":popover-open",":modal"];function Va(e){return oP.some(t=>{try{return e.matches(t)}catch{return!1}})}const iP=["transform","translate","scale","rotate","perspective"],sP=["transform","translate","scale","rotate","perspective","filter"],aP=["paint","layout","strict","content"];function ed(e){const t=rs(),n=Ge(e)?sn(e):e;return iP.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||sP.some(r=>(n.willChange||"").includes(r))||aP.some(r=>(n.contain||"").includes(r))}function lP(e){let t=tr(e);for(;dt(t)&&!kn(t);){if(ed(t))return t;if(Va(t))return null;t=tr(t)}return null}function rs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const cP=new Set(["html","body","#document"]);function kn(e){return cP.has(Jn(e))}function sn(e){return Ft(e).getComputedStyle(e)}function Ra(e){return Ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tr(e){if(Jn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ns(e)&&e.host||er(e);return ns(t)?t.host:t}function wy(e){const t=tr(e);return kn(t)?e.ownerDocument?e.ownerDocument.body:e.body:dt(t)&&so(t)?t:wy(t)}function Ln(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ft(o);if(i){const a=td(s);return t.concat(s,s.visualViewport||[],so(o)?o:[],a&&n?Ln(a):[])}return t.concat(o,Ln(o,[],n))}function td(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const uP=["top","right","bottom","left"],Sy=["start","end"],Ey=uP.reduce((e,t)=>e.concat(t,t+"-"+Sy[0],t+"-"+Sy[1]),[]),Pr=Math.min,yn=Math.max,$a=Math.round,Wo=Math.floor,nr=e=>({x:e,y:e}),dP={left:"right",right:"left",bottom:"top",top:"bottom"},fP={start:"end",end:"start"};function nd(e,t,n){return yn(e,Pr(t,n))}function ao(e,t){return typeof e=="function"?e(t):e}function rr(e){return e.split("-")[0]}function Vn(e){return e.split("-")[1]}function Ty(e){return e==="x"?"y":"x"}function rd(e){return e==="y"?"height":"width"}const pP=new Set(["top","bottom"]);function wr(e){return pP.has(rr(e))?"y":"x"}function od(e){return Ty(wr(e))}function Cy(e,t,n){n===void 0&&(n=!1);const r=Vn(e),o=od(e),i=rd(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=za(s)),[s,za(s)]}function hP(e){const t=za(e);return[ja(e),t,ja(t)]}function ja(e){return e.replace(/start|end/g,t=>fP[t])}const ky=["left","right"],Iy=["right","left"],mP=["top","bottom"],gP=["bottom","top"];function yP(e,t,n){switch(e){case"top":case"bottom":return n?t?Iy:ky:t?ky:Iy;case"left":case"right":return t?mP:gP;default:return[]}}function vP(e,t,n,r){const o=Vn(e);let i=yP(rr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ja)))),i}function za(e){return e.replace(/left|right|bottom|top/g,t=>dP[t])}function bP(e){return{top:0,right:0,bottom:0,left:0,...e}}function Oy(e){return typeof e!="number"?bP(e):{top:e,right:e,bottom:e,left:e}}function Ba(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var xP=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ha=xP.join(","),Py=typeof Element>"u",qo=Py?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wa=!Py&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},qa=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},wP=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Ay=function(t,n,r){if(qa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ha));return n&&qo.call(t,Ha)&&o.unshift(t),o=o.filter(r),o},_y=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!qa(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=qo.call(s,Ha);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!qa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},My=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Dy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||wP(t))&&!My(t)?0:t.tabIndex},SP=function(t,n){var r=Dy(t);return r<0&&n&&!My(t)?0:r},EP=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ny=function(t){return t.tagName==="INPUT"},TP=function(t){return Ny(t)&&t.type==="hidden"},CP=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},kP=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},IP=function(t){if(!t.name)return!0;var n=t.form||Wa(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=kP(o,t.form);return!i||i===t},OP=function(t){return Ny(t)&&t.type==="radio"},PP=function(t){return OP(t)&&!IP(t)},AP=function(t){var n,r=t&&Wa(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Wa(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Fy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},_P=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=qo.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(qo.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Wa(t);if(l&&!l.shadowRoot&&o(l)===!0)return Fy(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(AP(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Fy(t);return!1},MP=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return qo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},id=function(t,n){return!(n.disabled||qa(n)||TP(n)||_P(n,t)||CP(n)||MP(n))},sd=function(t,n){return!(PP(n)||Dy(n)<0||!id(t,n))},DP=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},NP=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=SP(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(EP).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ua=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_y([t],n.includeContainer,{filter:sd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DP}):r=Ay(t,n.includeContainer,sd.bind(null,n)),NP(r)},FP=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_y([t],n.includeContainer,{filter:id.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Ay(t,n.includeContainer,id.bind(null,n)),r},Ly=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Ha)===!1?!1:sd(n,t)};function ad(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Vy(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Ry(){return/apple/i.test(navigator.vendor)}function ld(){const e=/android/i;return e.test(ad())||e.test(Vy())}function LP(){return ad().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function $y(){return Vy().includes("jsdom/")}const jy="data-floating-ui-focusable",VP="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",cd="ArrowLeft",ud="ArrowRight",RP="ArrowUp",$P="ArrowDown";function or(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Gt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ns(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ir(e){return"composedPath"in e?e.composedPath()[0]:e.target}function dd(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function jP(e){return e.matches("html,body")}function Kt(e){return e?.ownerDocument||document}function fd(e){return dt(e)&&e.matches(VP)}function pd(e){return e?e.getAttribute("role")==="combobox"&&fd(e):!1}function zP(e){if(!e||$y())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ga(e){return e?e.hasAttribute(jy)?e:e.querySelector("["+jy+"]")||e:null}function lo(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...lo(e,o.id,n)])}function BP(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),lo(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function zy(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Zt(e){e.preventDefault(),e.stopPropagation()}function HP(e){return"nativeEvent"in e}function By(e){return e.mozInputSource===0&&e.isTrusted?!0:ld()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Hy(e){return $y()?!1:!ld()&&e.width===0&&e.height===0||ld()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Uo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var WP=typeof document<"u",qP=function(){},rt=WP?T.useLayoutEffect:qP;const UP={...I};function Yt(e){const t=I.useRef(e);return rt(()=>{t.current=e}),t}const GP=UP.useInsertionEffect||(e=>e());function Ot(e){const t=I.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return GP(()=>{t.current=e}),I.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Ya(e,t,n){return Math.floor(e/t)!==n}function os(e,t){return t<0||t>=e.current.length}function hd(e,t){return tn(e,{disabledIndices:t})}function Wy(e,t){return tn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,s=n;do s+=r?-i:i;while(s>=0&&s<=e.current.length-1&&Ka(e,s,o));return s}function YP(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===RP){if(d&&Zt(n),u===-1)f=c;else if(f=tn(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||f<0)){const p=u%s,h=c%s,m=c-(h-p);h===p?f=c:f=h>p?m:m-s}os(e,f)&&(f=u)}if(n.key===$P&&(d&&Zt(n),u===-1?f=l:(f=tn(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(f=tn(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),os(e,f)&&(f=u)),r==="both"){const p=Wo(u/s);n.key===(i?cd:ud)&&(d&&Zt(n),u%s!==s-1?(f=tn(e,{startingIndex:u,disabledIndices:a}),o&&Ya(f,s,p)&&(f=tn(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=tn(e,{startingIndex:u-u%s-1,disabledIndices:a})),Ya(f,s,p)&&(f=u)),n.key===(i?ud:cd)&&(d&&Zt(n),u%s!==0?(f=tn(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Ya(f,s,p)&&(f=tn(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(f=tn(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Ya(f,s,p)&&(f=u));const h=Wo(c/s)===p;os(e,f)&&(o&&h?f=n.key===(i?ud:cd)?c:tn(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function KP(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function ZP(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function XP(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ka(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const is=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function qy(e,t){const n=Ua(e,is()),r=n.length;if(r===0)return;const o=or(Kt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function Uy(e){return qy(Kt(e).body,1)||e}function Gy(e){return qy(Kt(e).body,-1)||e}function ss(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Gt(n,r)}function QP(e){Ua(e,is()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Yy(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Ky(e,t,n){let{reference:r,floating:o}=e;const i=wr(t),s=od(t),a=rd(s),l=rr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Vn(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}const JP=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ky(c,r,l),f=r,p={},h=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x:b,y:x,data:E,reset:S}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=b??u,d=x??d,p={...p,[g]:{...p[g],...E}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=Ky(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function Za(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=ao(t,e),h=Oy(p),g=a[f?d==="floating"?"reference":"floating":d],v=Ba(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Ba(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-S.top+h.top)/E.y,bottom:(S.bottom-v.bottom+h.bottom)/E.y,left:(v.left-S.left+h.left)/E.x,right:(S.right-v.right+h.right)/E.x}}const eA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=ao(e,t)||{};if(c==null)return{};const d=Oy(u),f={x:n,y:r},p=od(o),h=rd(p),m=await s.getDimensions(c),g=p==="y",v=g?"top":"left",b=g?"bottom":"right",x=g?"clientHeight":"clientWidth",E=i.reference[h]+i.reference[p]-f[p]-i.floating[h],S=f[p]-i.reference[p],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=O?O[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(O)))&&(w=a.floating[x]||i.floating[h]);const C=E/2-S/2,P=w/2-m[h]/2-1,_=Pr(d[v],P),F=Pr(d[b],P),j=_,L=w-m[h]-F,A=w/2-m[h]/2+C,D=nd(j,A,L),z=!l.arrow&&Vn(o)!=null&&A!==D&&i.reference[h]/2-(A<j?_:F)-m[h]/2<0,M=z?A<j?A-j:A-L:0;return{[p]:f[p]+M,data:{[p]:D,centerOffset:A-D-M,...z&&{alignmentOffset:M}},reset:z}}});function tA(e,t,n){return(e?[...n.filter(o=>Vn(o)===e),...n.filter(o=>Vn(o)!==e)]:n.filter(o=>rr(o)===o)).filter(o=>e?Vn(o)===e||(t?ja(o)!==o:!1):!0)}const nA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Ey,autoAlignment:p=!0,...h}=ao(e,t),m=d!==void 0||f===Ey?tA(d||null,p,f):f,g=await Za(t,h),v=((n=s.autoPlacement)==null?void 0:n.index)||0,b=m[v];if(b==null)return{};const x=Cy(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:m[0]}};const E=[g[rr(b)],g[x[0]],g[x[1]]],S=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:E}],O=m[v+1];if(O)return{data:{index:v+1,overflows:S},reset:{placement:O}};const w=S.map(_=>{const F=Vn(_.placement);return[_.placement,F&&u?_.overflows.slice(0,2).reduce((j,L)=>j+L,0):_.overflows[0],_.overflows]}).sort((_,F)=>_[1]-F[1]),P=((o=w.filter(_=>_[2].slice(0,Vn(_[0])?2:3).every(F=>F<=0))[0])==null?void 0:o[0])||w[0][0];return P!==a?{data:{index:v+1,overflows:S},reset:{placement:P}}:{}}}},rA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=ao(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=rr(o),b=wr(a),x=rr(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(x||!m?[za(a)]:hP(a)),O=h!=="none";!f&&O&&S.push(...vP(a,m,h,E));const w=[a,...S],C=await Za(t,g),P=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(C[v]),d){const A=Cy(o,s,E);P.push(C[A[0]],C[A[1]])}if(_=[..._,{placement:o,overflows:P}],!P.every(A=>A<=0)){var F,j;const A=(((F=i.flip)==null?void 0:F.index)||0)+1,D=w[A];if(D&&(!(d==="alignment"?b!==wr(D):!1)||_.every(k=>wr(k.placement)===b?k.overflows[0]>0:!0)))return{data:{index:A,overflows:_},reset:{placement:D}};let z=(j=_.filter(M=>M.overflows[0]<=0).sort((M,k)=>M.overflows[1]-k.overflows[1])[0])==null?void 0:j.placement;if(!z)switch(p){case"bestFit":{var L;const M=(L=_.filter(k=>{if(O){const R=wr(k.placement);return R===b||R==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(R=>R>0).reduce((R,$)=>R+$,0)]).sort((k,R)=>k[1]-R[1])[0])==null?void 0:L[0];M&&(z=M);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},oA=new Set(["left","top"]);async function iA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=rr(n),a=Vn(n),l=wr(n)==="y",c=oA.has(s)?-1:1,u=i&&l?-1:1,d=ao(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const sA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await iA(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},aA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:v,y:b}=g;return{x:v,y:b}}},...l}=ao(e,t),c={x:n,y:r},u=await Za(t,l),d=wr(rr(o)),f=Ty(d);let p=c[f],h=c[d];if(i){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=p+u[g],x=p-u[v];p=nd(b,p,x)}if(s){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=h+u[g],x=h-u[v];h=nd(b,h,x)}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}},lA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=ao(e,t),u=await Za(t,c),d=rr(o),f=Vn(o),p=wr(o)==="y",{width:h,height:m}=i.floating;let g,v;d==="top"||d==="bottom"?(g=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,g=f==="end"?"top":"bottom");const b=m-u.top-u.bottom,x=h-u.left-u.right,E=Pr(m-u[g],b),S=Pr(h-u[v],x),O=!t.middlewareData.shift;let w=E,C=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),O&&!f){const _=yn(u.left,0),F=yn(u.right,0),j=yn(u.top,0),L=yn(u.bottom,0);p?C=h-2*(_!==0||F!==0?_+F:yn(u.left,u.right)):w=m-2*(j!==0||L!==0?j+L:yn(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:w});const P=await s.getDimensions(a.floating);return h!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}};function Zy(e){const t=sn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=dt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=$a(n)!==i||$a(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function md(e){return Ge(e)?e:e.contextElement}function Go(e){const t=md(e);if(!dt(t))return nr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Zy(t);let s=(i?$a(n.width):n.width)/r,a=(i?$a(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const cA=nr(0);function Xy(e){const t=Ft(e);return!rs()||!t.visualViewport?cA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ft(e)?!1:t}function co(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=md(e);let s=nr(1);t&&(r?Ge(r)&&(s=Go(r)):s=Go(e));const a=uA(i,n,r)?Xy(i):nr(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Ft(i),p=r&&Ge(r)?Ft(r):r;let h=f,m=td(h);for(;m&&r&&p!==h;){const g=Go(m),v=m.getBoundingClientRect(),b=sn(m),x=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,E=v.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=x,c+=E,h=Ft(m),m=td(h)}}return Ba({width:u,height:d,x:l,y:c})}function Xa(e,t){const n=Ra(e).scrollLeft;return t?t.left+n:co(er(e)).left+n}function Qy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Xa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function dA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=er(r),a=t?Va(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=nr(1);const u=nr(0),d=dt(r);if((d||!d&&!i)&&((Jn(r)!=="body"||so(s))&&(l=Ra(r)),dt(r))){const p=co(r);c=Go(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=s&&!d&&!i?Qy(s,l):nr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function fA(e){return Array.from(e.getClientRects())}function pA(e){const t=er(e),n=Ra(e),r=e.ownerDocument.body,o=yn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=yn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xa(e);const a=-n.scrollTop;return sn(r).direction==="rtl"&&(s+=yn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Jy=25;function hA(e,t){const n=Ft(e),r=er(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=rs();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Xa(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=Jy&&(i-=h)}else c<=Jy&&(i+=c);return{width:i,height:s,x:a,y:l}}const mA=new Set(["absolute","fixed"]);function gA(e,t){const n=co(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=dt(e)?Go(e):nr(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function ev(e,t,n){let r;if(t==="viewport")r=hA(e,n);else if(t==="document")r=pA(er(e));else if(Ge(t))r=gA(t,n);else{const o=Xy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ba(r)}function tv(e,t){const n=tr(e);return n===t||!Ge(n)||kn(n)?!1:sn(n).position==="fixed"||tv(n,t)}function yA(e,t){const n=t.get(e);if(n)return n;let r=Ln(e,[],!1).filter(a=>Ge(a)&&Jn(a)!=="body"),o=null;const i=sn(e).position==="fixed";let s=i?tr(e):e;for(;Ge(s)&&!kn(s);){const a=sn(s),l=ed(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&mA.has(o.position)||so(s)&&!l&&tv(e,s))?r=r.filter(u=>u!==s):o=a,s=tr(s)}return t.set(e,r),r}function vA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Va(t)?[]:yA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=ev(t,u,o);return c.top=yn(d.top,c.top),c.right=Pr(d.right,c.right),c.bottom=Pr(d.bottom,c.bottom),c.left=yn(d.left,c.left),c},ev(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function bA(e){const{width:t,height:n}=Zy(e);return{width:t,height:n}}function xA(e,t,n){const r=dt(t),o=er(t),i=n==="fixed",s=co(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=nr(0);function c(){l.x=Xa(o)}if(r||!r&&!i)if((Jn(t)!=="body"||so(o))&&(a=Ra(t)),r){const p=co(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?Qy(o,a):nr(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function gd(e){return sn(e).position==="static"}function nv(e,t){if(!dt(e)||sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return er(e)===n&&(n=n.ownerDocument.body),n}function rv(e,t){const n=Ft(e);if(Va(e))return n;if(!dt(e)){let o=tr(e);for(;o&&!kn(o);){if(Ge(o)&&!gd(o))return o;o=tr(o)}return n}let r=nv(e,t);for(;r&&rP(r)&&gd(r);)r=nv(r,t);return r&&kn(r)&&gd(r)&&!ed(r)?n:r||lP(e)||n}const wA=async function(e){const t=this.getOffsetParent||rv,n=this.getDimensions,r=await n(e.floating);return{reference:xA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function SA(e){return sn(e).direction==="rtl"}const EA={convertOffsetParentRelativeRectToViewportRelativeRect:dA,getDocumentElement:er,getClippingRect:vA,getOffsetParent:rv,getElementRects:wA,getClientRects:fA,getDimensions:bA,getScale:Go,isElement:Ge,isRTL:SA};function ov(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function TA(e,t){let n=null,r;const o=er(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const h=Wo(d),m=Wo(o.clientWidth-(u+f)),g=Wo(o.clientHeight-(d+p)),v=Wo(u),x={rootMargin:-h+"px "+-m+"px "+-g+"px "+-v+"px",threshold:yn(0,Pr(1,l))||1};let E=!0;function S(O){const w=O[0].intersectionRatio;if(w!==l){if(!E)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!ov(c,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),i}function Yo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=md(e),u=o||i?[...c?Ln(c):[],...Ln(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?TA(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let h,m=l?co(e):null;l&&g();function g(){const v=co(e);m&&!ov(m,v)&&n(),m=v,h=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const CA=sA,kA=nA,IA=aA,OA=rA,PA=lA,iv=eA,AA=(e,t,n)=>{const r=new Map,o={platform:EA,...n},i={...o.platform,_c:r};return JP(e,t,{...o,platform:i})};var _A=typeof document<"u",MA=function(){},Qa=_A?T.useLayoutEffect:MA;function Ja(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ja(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ja(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function sv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function av(e,t){const n=sv(e);return Math.round(t*n)/n}function yd(e){const t=I.useRef(e);return Qa(()=>{t.current=e}),t}function DA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=I.useState(r);Ja(f,r)||p(r);const[h,m]=I.useState(null),[g,v]=I.useState(null),b=I.useCallback(k=>{k!==O.current&&(O.current=k,m(k))},[]),x=I.useCallback(k=>{k!==w.current&&(w.current=k,v(k))},[]),E=i||h,S=s||g,O=I.useRef(null),w=I.useRef(null),C=I.useRef(u),P=l!=null,_=yd(l),F=yd(o),j=yd(c),L=I.useCallback(()=>{if(!O.current||!w.current)return;const k={placement:t,strategy:n,middleware:f};F.current&&(k.platform=F.current),AA(O.current,w.current,k).then(R=>{const $={...R,isPositioned:j.current!==!1};A.current&&!Ja(C.current,$)&&(C.current=$,Xn.flushSync(()=>{d($)}))})},[f,t,n,F,j]);Qa(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);const A=I.useRef(!1);Qa(()=>(A.current=!0,()=>{A.current=!1}),[]),Qa(()=>{if(E&&(O.current=E),S&&(w.current=S),E&&S){if(_.current)return _.current(E,S,L);L()}},[E,S,L,_,P]);const D=I.useMemo(()=>({reference:O,floating:w,setReference:b,setFloating:x}),[b,x]),z=I.useMemo(()=>({reference:E,floating:S}),[E,S]),M=I.useMemo(()=>{const k={position:n,left:0,top:0};if(!z.floating)return k;const R=av(z.floating,u.x),$=av(z.floating,u.y);return a?{...k,transform:"translate("+R+"px, "+$+"px)",...sv(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:$}},[n,a,z.floating,u.x,u.y]);return I.useMemo(()=>({...u,update:L,refs:D,elements:z,floatingStyles:M}),[u,L,D,z,M])}const NA=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?iv({element:r.current,padding:o}).fn(n):{}:r?iv({element:r,padding:o}).fn(n):{}}}},as=(e,t)=>({...CA(e),options:[e,t]}),vd=(e,t)=>({...IA(e),options:[e,t]}),bd=(e,t)=>({...OA(e),options:[e,t]}),lv=(e,t)=>({...PA(e),options:[e,t]}),FA=(e,t)=>({...kA(e),options:[e,t]}),cv=(e,t)=>({...NA(e),options:[e,t]});function LA(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const uv=I.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function VA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=I.useState(()=>new Set),s=I.useCallback(c=>{i(u=>new Set(u).add(c))},[]),a=I.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=I.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(LA).forEach((d,f)=>{c.set(d,f)}),c},[o]);return y.jsx(uv.Provider,{value:I.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function dv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=I.useContext(uv),[a,l]=I.useState(null),c=I.useRef(null),u=I.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const p=t!==void 0;s.current[a]=p?t:(f=d?.textContent)!=null?f:null}},[a,i,s,t]);return rt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),rt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),I.useMemo(()=>({ref:u,index:a??-1}),[a,u])}const RA="data-floating-ui-focusable",fv="active",pv="selected",ls="ArrowLeft",cs="ArrowRight",hv="ArrowUp",el="ArrowDown",$A={...I};let mv=!1,jA=0;const gv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+jA++;function zA(){const[e,t]=I.useState(()=>mv?gv():void 0);return rt(()=>{e==null&&t(gv())},[]),I.useEffect(()=>{mv=!0},[]),e}const us=$A.useId||zA;let ds;process.env.NODE_ENV!=="production"&&(ds=new Set);function tl(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ds)!=null&&e.has(o))){var i;(i=ds)==null||i.add(o),console.warn(o)}}function BA(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ds)!=null&&e.has(o))){var i;(i=ds)==null||i.add(o),console.error(o)}}const yv=I.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||tl("The `ref` prop is required for `FloatingArrow`."));const v=us(),[b,x]=I.useState(!1);if(rt(()=>{if(!o)return;sn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[E,S]=r.split("-"),O=E==="top"||E==="bottom";let w=d;(O&&s!=null&&s.x||!O&&s!=null&&s.y)&&(w=null);const C=u*2,P=C/2,_=a/2*(c/-8+1),F=l/2*c/4,j=!!p,L=w&&S==="end"?"bottom":"top";let A=w&&S==="end"?"right":"left";w&&b&&(A=S==="end"?"left":"right");const D=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=p||"M0,0"+(" H"+a)+(" L"+(a-_)+","+(l-F))+(" Q"+a/2+","+l+" "+_+","+(l-F))+" Z",k={top:j?"rotate(180deg)":"",left:j?"rotate(90deg)":"rotate(-90deg)",bottom:j?"":"rotate(180deg)",right:j?"rotate(-90deg)":"rotate(90deg)"}[E];return y.jsxs("svg",{...g,"aria-hidden":!0,ref:n,width:j?a:a+C,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[A]:D,[L]:z,[E]:O||j?"100%":"calc(100% - "+C/2+"px)",transform:[k,h].filter(R=>!!R).join(" "),...m},children:[C>0&&y.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:C+(p?0:1),d:M}),y.jsx("path",{stroke:C&&!p?g.fill:"none",d:M}),y.jsx("clipPath",{id:v,children:y.jsx("rect",{x:-P,y:P*(j?-1:1),width:a+C,height:a})})]})});function vv(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const bv=I.createContext(null),xv=I.createContext(null),Ar=()=>{var e;return((e=I.useContext(bv))==null?void 0:e.id)||null},_r=()=>I.useContext(xv);function HA(e){const t=us(),n=_r(),o=Ar();return rt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function WA(e){const{children:t,id:n}=e,r=Ar();return y.jsx(bv.Provider,{value:I.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function qA(e){const{children:t}=e,n=I.useRef([]),r=I.useCallback(s=>{n.current=[...n.current,s]},[]),o=I.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),[i]=I.useState(()=>vv());return y.jsx(xv.Provider,{value:I.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function uo(e){return"data-floating-ui-"+e}function Xt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const wv=uo("safe-polygon");function xd(e,t,n){if(n&&!Uo(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function wd(e){return typeof e=="function"?e():e}function Sv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=_r(),h=Ar(),m=Yt(c),g=Yt(l),v=Yt(n),b=Yt(d),x=I.useRef(),E=I.useRef(-1),S=I.useRef(),O=I.useRef(-1),w=I.useRef(!0),C=I.useRef(!1),P=I.useRef(()=>{}),_=I.useRef(!1),F=Ot(()=>{var M;const k=(M=o.current.openEvent)==null?void 0:M.type;return k?.includes("mouse")&&k!=="mousedown"});I.useEffect(()=>{if(!a)return;function M(k){let{open:R}=k;R||(Xt(E),Xt(O),w.current=!0,_.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[a,i]),I.useEffect(()=>{if(!a||!m.current||!n)return;function M(R){F()&&r(!1,R,"hover")}const k=Kt(s.floating).documentElement;return k.addEventListener("mouseleave",M),()=>{k.removeEventListener("mouseleave",M)}},[s.floating,n,r,a,m,F]);const j=I.useCallback(function(M,k,R){k===void 0&&(k=!0),R===void 0&&(R="hover");const $=xd(g.current,"close",x.current);$&&!S.current?(Xt(E),E.current=window.setTimeout(()=>r(!1,M,R),$)):k&&(Xt(E),r(!1,M,R))},[g,r]),L=Ot(()=>{P.current(),S.current=void 0}),A=Ot(()=>{if(C.current){const M=Kt(s.floating).body;M.style.pointerEvents="",M.removeAttribute(wv),C.current=!1}}),D=Ot(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);I.useEffect(()=>{if(!a)return;function M(H){if(Xt(E),w.current=!1,u&&!Uo(x.current)||wd(b.current)>0&&!xd(g.current,"open"))return;const q=xd(g.current,"open",x.current);q?E.current=window.setTimeout(()=>{v.current||r(!0,H,"hover")},q):n||r(!0,H,"hover")}function k(H){if(D()){A();return}P.current();const q=Kt(s.floating);if(Xt(O),_.current=!1,m.current&&o.current.floatingContext){n||Xt(E),S.current=m.current({...o.current.floatingContext,tree:p,x:H.clientX,y:H.clientY,onClose(){A(),L(),D()||j(H,!0,"safe-polygon")}});const oe=S.current;q.addEventListener("mousemove",oe),P.current=()=>{q.removeEventListener("mousemove",oe)};return}(x.current!=="touch"||!Gt(s.floating,H.relatedTarget))&&j(H)}function R(H){D()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:p,x:H.clientX,y:H.clientY,onClose(){A(),L(),D()||j(H)}})(H))}function $(){Xt(E)}function B(H){D()||j(H,!1)}if(Ge(s.domReference)){const H=s.domReference,q=s.floating;return n&&H.addEventListener("mouseleave",R),f&&H.addEventListener("mousemove",M,{once:!0}),H.addEventListener("mouseenter",M),H.addEventListener("mouseleave",k),q&&(q.addEventListener("mouseleave",R),q.addEventListener("mouseenter",$),q.addEventListener("mouseleave",B)),()=>{n&&H.removeEventListener("mouseleave",R),f&&H.removeEventListener("mousemove",M),H.removeEventListener("mouseenter",M),H.removeEventListener("mouseleave",k),q&&(q.removeEventListener("mouseleave",R),q.removeEventListener("mouseenter",$),q.removeEventListener("mouseleave",B))}}},[s,a,e,u,f,j,L,A,r,n,v,p,g,m,o,D,b]),rt(()=>{var M;if(a&&n&&(M=m.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&F()){C.current=!0;const R=s.floating;if(Ge(s.domReference)&&R){var k;const $=Kt(s.floating).body;$.setAttribute(wv,"");const B=s.domReference,H=p==null||(k=p.nodesRef.current.find(q=>q.id===h))==null||(k=k.context)==null?void 0:k.elements.floating;return H&&(H.style.pointerEvents=""),$.style.pointerEvents="none",B.style.pointerEvents="auto",R.style.pointerEvents="auto",()=>{$.style.pointerEvents="",B.style.pointerEvents="",R.style.pointerEvents=""}}}},[a,n,h,s,p,m,F]),rt(()=>{n||(x.current=void 0,_.current=!1,L(),A())},[n,L,A]),I.useEffect(()=>()=>{L(),Xt(E),Xt(O),A()},[a,s.domReference,L,A]);const z=I.useMemo(()=>{function M(k){x.current=k.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(k){const{nativeEvent:R}=k;function $(){!w.current&&!v.current&&r(!0,R,"hover")}u&&!Uo(x.current)||n||wd(b.current)===0||_.current&&k.movementX**2+k.movementY**2<2||(Xt(O),x.current==="touch"?$():(_.current=!0,O.current=window.setTimeout($,wd(b.current))))}}},[u,r,n,v,b]);return I.useMemo(()=>a?{reference:z}:{},[a,z])}let Ev=0;function fo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ev);const i=()=>e?.focus({preventScroll:n});o?i():Ev=requestAnimationFrame(i)}function Sd(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ns(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function UA(e){return"composedPath"in e?e.composedPath()[0]:e.target}function GA(e){return e?.ownerDocument||document}const Ko={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Tv(e){return e==="inert"?Ko.inert:e==="aria-hidden"?Ko["aria-hidden"]:Ko.none}let nl=new WeakSet,rl={},Ed=0;const YA=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Cv=e=>e&&(e.host||Cv(e.parentNode)),KA=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Cv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function ZA(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=KA(t,e),a=new Set,l=new Set(s),c=[];rl[o]||(rl[o]=new WeakMap);const u=rl[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(Jn(h)!=="script")if(a.has(h))f(h);else{const m=i?h.getAttribute(i):null,g=m!==null&&m!=="false",v=Tv(i),b=(v.get(h)||0)+1,x=(u.get(h)||0)+1;v.set(h,b),u.set(h,x),c.push(h),b===1&&g&&nl.add(h),x===1&&h.setAttribute(o,""),!g&&i&&h.setAttribute(i,i==="inert"?"":"true")}})}return Ed++,()=>{c.forEach(p=>{const h=Tv(i),g=(h.get(p)||0)-1,v=(u.get(p)||0)-1;h.set(p,g),u.set(p,v),g||(!nl.has(p)&&i&&p.removeAttribute(i),nl.delete(p)),v||p.removeAttribute(o)}),Ed--,Ed||(Ko.inert=new WeakMap,Ko["aria-hidden"]=new WeakMap,Ko.none=new WeakMap,nl=new WeakSet,rl={})}}function kv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=GA(e[0]).body;return ZA(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const ol={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},il=I.forwardRef(function(t,n){const[r,o]=I.useState();rt(()=>{Ry()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[uo("focus-guard")]:"",style:ol};return y.jsx("span",{...t,...i})}),Iv=I.createContext(null),Ov=uo("portal");function XA(e){e===void 0&&(e={});const{id:t,root:n}=e,r=us(),o=Pv(),[i,s]=I.useState(null),a=I.useRef(null);return rt(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),rt(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Ov,""),l.appendChild(c),a.current=c,s(c)},[t,r]),rt(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!La(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Ov,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function po(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=XA({id:n,root:r}),[s,a]=I.useState(null),l=I.useRef(null),c=I.useRef(null),u=I.useRef(null),d=I.useRef(null),f=s?.modal,p=s?.open,h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return I.useEffect(()=>{if(!i||!o||f)return;function m(g){i&&ss(g)&&(g.type==="focusin"?Yy:QP)(i)}return i.addEventListener("focusin",m,!0),i.addEventListener("focusout",m,!0),()=>{i.removeEventListener("focusin",m,!0),i.removeEventListener("focusout",m,!0)}},[i,o,f]),I.useEffect(()=>{i&&(p||Yy(i))},[p,i]),y.jsxs(Iv.Provider,{value:I.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[h&&i&&y.jsx(il,{"data-type":"outside",ref:l,onFocus:m=>{if(ss(m,i)){var g;(g=u.current)==null||g.focus()}else{const v=s?s.domReference:null,b=Gy(v);b?.focus()}}}),h&&i&&y.jsx("span",{"aria-owns":i.id,style:ol}),i&&Xn.createPortal(t,i),h&&i&&y.jsx(il,{"data-type":"outside",ref:c,onFocus:m=>{if(ss(m,i)){var g;(g=d.current)==null||g.focus()}else{const v=s?s.domReference:null,b=Uy(v);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const Pv=()=>I.useContext(Iv);function Av(e){return I.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const QA=20;let Mr=[];function Td(){Mr=Mr.filter(e=>e.isConnected)}function JA(e){Td(),e&&Jn(e)!=="body"&&(Mr.push(e),Mr.length>QA&&(Mr=Mr.slice(-20)))}function _v(){return Td(),Mr[Mr.length-1]}function e_(e){const t=is();return Ly(e,t)?e:Ua(e,t)[0]||e}function Mv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=is(),i=FP(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return Ly(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const t_=I.forwardRef(function(t,n){return y.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:ol})});function Zo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:h,onOpenChange:m,events:g,dataRef:v,elements:{domReference:b,floating:x}}=t,E=Ot(()=>{var N;return(N=v.current.floatingContext)==null?void 0:N.nodeId}),S=Ot(p),O=typeof s=="number"&&s<0,w=pd(b)&&O,C=YA(),P=C?i:!0,_=!P||C&&f,F=Yt(o),j=Yt(s),L=Yt(a),A=_r(),D=Pv(),z=I.useRef(null),M=I.useRef(null),k=I.useRef(!1),R=I.useRef(!1),$=I.useRef(-1),B=I.useRef(-1),H=D!=null,q=Ga(x),W=Ot(function(N){return N===void 0&&(N=q),N?Ua(N,is()):[]}),oe=Ot(N=>{const ne=W(N);return F.current.map(te=>b&&te==="reference"?b:q&&te==="floating"?q:ne).filter(Boolean).flat()});I.useEffect(()=>{if(r||!c)return;function N(te){if(te.key==="Tab"){Gt(q,or(Kt(q)))&&W().length===0&&!w&&Zt(te);const re=oe(),Q=ir(te);F.current[0]==="reference"&&Q===b&&(Zt(te),te.shiftKey?fo(re[re.length-1]):fo(re[1])),F.current[1]==="floating"&&Q===q&&te.shiftKey&&(Zt(te),fo(re[0]))}}const ne=Kt(q);return ne.addEventListener("keydown",N),()=>{ne.removeEventListener("keydown",N)}},[r,b,q,c,F,w,W,oe]),I.useEffect(()=>{if(r||!x)return;function N(ne){const te=ir(ne),Q=W().indexOf(te);Q!==-1&&($.current=Q)}return x.addEventListener("focusin",N),()=>{x.removeEventListener("focusin",N)}},[r,x,W]),I.useEffect(()=>{if(r||!d)return;function N(){R.current=!0,setTimeout(()=>{R.current=!1})}function ne(Q){const Z=Q.relatedTarget,le=Q.currentTarget,ce=ir(Q);queueMicrotask(()=>{const pe=E(),ge=!(Gt(b,Z)||Gt(x,Z)||Gt(Z,x)||Gt(D?.portalNode,Z)||Z!=null&&Z.hasAttribute(uo("focus-guard"))||A&&(lo(A.nodesRef.current,pe).find(se=>{var Y,V;return Gt((Y=se.context)==null?void 0:Y.elements.floating,Z)||Gt((V=se.context)==null?void 0:V.elements.domReference,Z)})||zy(A.nodesRef.current,pe).find(se=>{var Y,V,X;return[(Y=se.context)==null?void 0:Y.elements.floating,Ga((V=se.context)==null?void 0:V.elements.floating)].includes(Z)||((X=se.context)==null?void 0:X.elements.domReference)===Z})));if(le===b&&q&&Mv(q,F),l&&le!==b&&!(ce!=null&&ce.isConnected)&&or(Kt(q))===Kt(q).body){dt(q)&&q.focus();const se=$.current,Y=W(),V=Y[se]||Y[Y.length-1]||q;dt(V)&&V.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(w||!c)&&Z&&ge&&!R.current&&Z!==_v()&&(k.current=!0,m(!1,Q,"focus-out"))})}const te=!!(!A&&D);function re(){Xt(B),v.current.insideReactTree=!0,B.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&dt(b))return b.addEventListener("focusout",ne),b.addEventListener("pointerdown",N),x.addEventListener("focusout",ne),te&&x.addEventListener("focusout",re,!0),()=>{b.removeEventListener("focusout",ne),b.removeEventListener("pointerdown",N),x.removeEventListener("focusout",ne),te&&x.removeEventListener("focusout",re,!0)}},[r,b,x,q,c,A,D,m,d,l,W,w,E,F,v]);const ae=I.useRef(null),ie=I.useRef(null),U=Av([ae,D?.beforeInsideRef]),G=Av([ie,D?.afterInsideRef]);I.useEffect(()=>{var N,ne;if(r||!x)return;const te=Array.from((D==null||(N=D.portalNode)==null?void 0:N.querySelectorAll("["+uo("portal")+"]"))||[]),Q=(ne=(A?zy(A.nodesRef.current,E()):[]).find(ce=>{var pe;return pd(((pe=ce.context)==null?void 0:pe.elements.domReference)||null)}))==null||(ne=ne.context)==null?void 0:ne.elements.domReference,Z=[x,Q,...te,...S(),z.current,M.current,ae.current,ie.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,F.current.includes("reference")||w?b:null].filter(ce=>ce!=null),le=c||w?kv(Z,!_,_):kv(Z);return()=>{le()}},[r,b,x,c,F,D,w,P,_,A,E,S]),rt(()=>{if(r||!dt(q))return;const N=Kt(q),ne=or(N);queueMicrotask(()=>{const te=oe(q),re=j.current,Q=(typeof re=="number"?te[re]:re.current)||q,Z=Gt(q,ne);!O&&!Z&&h&&fo(Q,{preventScroll:Q===q})})},[r,h,q,O,oe,j]),rt(()=>{if(r||!q)return;const N=Kt(q),ne=or(N);JA(ne);function te(Z){let{reason:le,event:ce,nested:pe}=Z;if(["hover","safe-polygon"].includes(le)&&ce.type==="mouseleave"&&(k.current=!0),le==="outside-press")if(pe)k.current=!1;else if(By(ce)||Hy(ce))k.current=!1;else{let ge=!1;document.createElement("div").focus({get preventScroll(){return ge=!0,!1}}),ge?k.current=!1:k.current=!0}}g.on("openchange",te);const re=N.createElement("span");re.setAttribute("tabindex","-1"),re.setAttribute("aria-hidden","true"),Object.assign(re.style,ol),H&&b&&b.insertAdjacentElement("afterend",re);function Q(){if(typeof L.current=="boolean"){const Z=b||_v();return Z&&Z.isConnected?Z:re}return L.current.current||re}return()=>{g.off("openchange",te);const Z=or(N),le=Gt(x,Z)||A&&lo(A.nodesRef.current,E(),!1).some(pe=>{var ge;return Gt((ge=pe.context)==null?void 0:ge.elements.floating,Z)}),ce=Q();queueMicrotask(()=>{const pe=e_(ce);L.current&&!k.current&&dt(pe)&&(!(pe!==Z&&Z!==N.body)||le)&&pe.focus({preventScroll:!0}),re.remove()})}},[r,x,q,L,v,g,A,H,b,E]),I.useEffect(()=>(queueMicrotask(()=>{k.current=!1}),()=>{queueMicrotask(Td)}),[r]),rt(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:h,onOpenChange:m,domReference:b}),()=>{D.setFocusManagerState(null)}},[r,D,c,h,m,d,b]),rt(()=>{r||q&&Mv(q,F)},[r,q,F]);function J(N){return r||!u||!c?null:y.jsx(t_,{ref:N==="start"?z:M,onClick:ne=>m(!1,ne.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const fe=!r&&P&&(c?!w:!0)&&(H||c);return y.jsxs(y.Fragment,{children:[fe&&y.jsx(il,{"data-type":"inside",ref:U,onFocus:N=>{if(c){const te=oe();fo(o[0]==="reference"?te[0]:te[te.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(k.current=!1,ss(N,D.portalNode)){const te=Uy(b);te?.focus()}else{var ne;(ne=D.beforeOutsideRef.current)==null||ne.focus()}}}),!w&&J("start"),n,J("end"),fe&&y.jsx(il,{"data-type":"inside",ref:G,onFocus:N=>{if(c)fo(oe()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(k.current=!0),ss(N,D.portalNode)){const te=Gy(b);te?.focus()}else{var ne;(ne=D.afterOutsideRef.current)==null||ne.focus()}}})]})}let sl=0;const Dv="--floating-ui-scrollbar-width";function n_(){const e=ad(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Dv,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(Dv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let Nv=()=>{};const Fv=I.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return rt(()=>{if(r)return sl++,sl===1&&(Nv=n_()),()=>{sl--,sl===0&&Nv()}},[r]),y.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Lv(e){return dt(e.target)&&e.target.tagName==="BUTTON"}function r_(e){return dt(e.target)&&e.target.tagName==="A"}function Vv(e){return fd(e)}function fs(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=I.useRef(),p=I.useRef(!1),h=I.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){const g=f.current;m.button===0&&a!=="click"&&(Uo(g,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Uo(g,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!u||Lv(m))&&(m.key===" "&&!Vv(i)&&(m.preventDefault(),p.current=!0),!r_(m)&&m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Lv(m)||Vv(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return I.useMemo(()=>s?{reference:h}:{},[s,h])}function o_(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,d=s.height,f=s.x,p=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=a&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function Rv(e){return e!=null&&e.clientX!=null}function i_(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=I.useRef(!1),f=I.useRef(null),[p,h]=I.useState(),[m,g]=I.useState([]),v=Ot((O,w)=>{d.current||r.current.openEvent&&!Rv(r.current.openEvent)||s.setPositionReference(o_(i,{x:O,y:w,axis:l,dataRef:r,pointerType:p}))}),b=Ot(O=>{c!=null||u!=null||(n?f.current||g([]):v(O.clientX,O.clientY))}),x=Uo(p)?o:n,E=I.useCallback(()=>{if(!x||!a||c!=null||u!=null)return;const O=Ft(o);function w(C){const P=ir(C);Gt(o,P)?(O.removeEventListener("mousemove",w),f.current=null):v(C.clientX,C.clientY)}if(!r.current.openEvent||Rv(r.current.openEvent)){O.addEventListener("mousemove",w);const C=()=>{O.removeEventListener("mousemove",w),f.current=null};return f.current=C,C}s.setPositionReference(i)},[x,a,c,u,o,r,s,i,v]);I.useEffect(()=>E(),[E,m]),I.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),I.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),rt(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const S=I.useMemo(()=>{function O(w){let{pointerType:C}=w;h(C)}return{onPointerDown:O,onPointerEnter:O,onMouseMove:b,onMouseEnter:b}},[b]);return I.useMemo(()=>a?{reference:S}:{},[a,S])}const s_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},a_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},$v=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function ho(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,m=_r(),g=Ot(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,b=I.useRef(!1),{escapeKey:x,outsidePress:E}=$v(p),{escapeKey:S,outsidePress:O}=$v(h),w=I.useRef(!1),C=Ot(A=>{var D;if(!n||!s||!a||A.key!=="Escape"||w.current)return;const z=(D=i.current.floatingContext)==null?void 0:D.nodeId,M=m?lo(m.nodesRef.current,z):[];if(!x&&(A.stopPropagation(),M.length>0)){let k=!0;if(M.forEach(R=>{var $;if(($=R.context)!=null&&$.open&&!R.context.dataRef.current.__escapeKeyBubbles){k=!1;return}}),!k)return}r(!1,HP(A)?A.nativeEvent:A,"escape-key")}),P=Ot(A=>{var D;const z=()=>{var M;C(A),(M=ir(A))==null||M.removeEventListener("keydown",z)};(D=ir(A))==null||D.addEventListener("keydown",z)}),_=Ot(A=>{var D;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||z||typeof v=="function"&&!v(A))return;const k=ir(A),R="["+uo("inert")+"]",$=Kt(o.floating).querySelectorAll(R);let B=Ge(k)?k:null;for(;B&&!kn(B);){const oe=tr(B);if(kn(oe)||!Ge(oe))break;B=oe}if($.length&&Ge(k)&&!jP(k)&&!Gt(k,o.floating)&&Array.from($).every(oe=>!Gt(B,oe)))return;if(dt(k)&&L){const oe=kn(k),ae=sn(k),ie=/auto|scroll/,U=oe||ie.test(ae.overflowX),G=oe||ie.test(ae.overflowY),J=U&&k.clientWidth>0&&k.scrollWidth>k.clientWidth,fe=G&&k.clientHeight>0&&k.scrollHeight>k.clientHeight,N=ae.direction==="rtl",ne=fe&&(N?A.offsetX<=k.offsetWidth-k.clientWidth:A.offsetX>k.clientWidth),te=J&&A.offsetY>k.clientHeight;if(ne||te)return}const H=(D=i.current.floatingContext)==null?void 0:D.nodeId,q=m&&lo(m.nodesRef.current,H).some(oe=>{var ae;return dd(A,(ae=oe.context)==null?void 0:ae.elements.floating)});if(dd(A,o.floating)||dd(A,o.domReference)||q)return;const W=m?lo(m.nodesRef.current,H):[];if(W.length>0){let oe=!0;if(W.forEach(ae=>{var ie;if((ie=ae.context)!=null&&ie.open&&!ae.context.dataRef.current.__outsidePressBubbles){oe=!1;return}}),!oe)return}r(!1,A,"outside-press")}),F=Ot(A=>{var D;const z=()=>{var M;_(A),(M=ir(A))==null||M.removeEventListener(c,z)};(D=ir(A))==null||D.addEventListener(c,z)});I.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=E;let A=-1;function D($){r(!1,$,"ancestor-scroll")}function z(){window.clearTimeout(A),w.current=!0}function M(){A=window.setTimeout(()=>{w.current=!1},rs()?5:0)}const k=Kt(o.floating);a&&(k.addEventListener("keydown",S?P:C,S),k.addEventListener("compositionstart",z),k.addEventListener("compositionend",M)),v&&k.addEventListener(c,O?F:_,O);let R=[];return f&&(Ge(o.domReference)&&(R=Ln(o.domReference)),Ge(o.floating)&&(R=R.concat(Ln(o.floating))),!Ge(o.reference)&&o.reference&&o.reference.contextElement&&(R=R.concat(Ln(o.reference.contextElement)))),R=R.filter($=>{var B;return $!==((B=k.defaultView)==null?void 0:B.visualViewport)}),R.forEach($=>{$.addEventListener("scroll",D,{passive:!0})}),()=>{a&&(k.removeEventListener("keydown",S?P:C,S),k.removeEventListener("compositionstart",z),k.removeEventListener("compositionend",M)),v&&k.removeEventListener(c,O?F:_,O),R.forEach($=>{$.removeEventListener("scroll",D)}),window.clearTimeout(A)}},[i,o,a,v,c,n,r,f,s,x,E,C,S,P,_,O,F]),I.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const j=I.useMemo(()=>({onKeyDown:C,...u&&{[s_[d]]:A=>{r(!1,A.nativeEvent,"reference-press")},...d!=="click"&&{onClick(A){r(!1,A.nativeEvent,"reference-press")}}}}),[C,r,u,d]),L=I.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[a_[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return I.useMemo(()=>s?{reference:j,floating:L}:{},[s,j,L])}function l_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=us(),i=I.useRef({}),[s]=I.useState(()=>vv()),a=Ar()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!Ge(p)&&BA("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=I.useState(r.reference),u=Ot((p,h,m)=>{i.current.openEvent=p?h:void 0,s.emit("openchange",{open:p,event:h,reason:m,nested:a}),n?.(p,h,m)}),d=I.useMemo(()=>({setPositionReference:c}),[]),f=I.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return I.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Dr(e){e===void 0&&(e={});const{nodeId:t}=e,n=l_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=I.useState(null),[a,l]=I.useState(null),u=o?.domReference||i,d=I.useRef(null),f=_r();rt(()=>{u&&(d.current=u)},[u]);const p=DA({...e,elements:{...o,...a&&{reference:a}}}),h=I.useCallback(x=>{const E=Ge(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(E),p.refs.setReference(E)},[p.refs]),m=I.useCallback(x=>{(Ge(x)||x===null)&&(d.current=x,s(x)),(Ge(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!Ge(x))&&p.refs.setReference(x)},[p.refs]),g=I.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d}),[p.refs,m,h]),v=I.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=I.useMemo(()=>({...p,...r,refs:g,elements:v,nodeId:t}),[p,g,v,t,r]);return rt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(E=>E.id===t);x&&(x.context=b)}),I.useMemo(()=>({...p,context:b,refs:g,elements:v}),[p,g,v,b])}function Cd(){return LP()&&Ry()}function c_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=I.useRef(!1),u=I.useRef(-1),d=I.useRef(!0);I.useEffect(()=>{if(!a)return;const p=Ft(s.domReference);function h(){!n&&dt(s.domReference)&&s.domReference===or(Kt(s.domReference))&&(c.current=!0)}function m(){d.current=!0}function g(){d.current=!1}return p.addEventListener("blur",h),Cd()&&(p.addEventListener("keydown",m,!0),p.addEventListener("pointerdown",g,!0)),()=>{p.removeEventListener("blur",h),Cd()&&(p.removeEventListener("keydown",m,!0),p.removeEventListener("pointerdown",g,!0))}},[s.domReference,n,a]),I.useEffect(()=>{if(!a)return;function p(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,a]),I.useEffect(()=>()=>{Xt(u)},[]);const f=I.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const h=ir(p.nativeEvent);if(l&&Ge(h)){if(Cd()&&!p.relatedTarget){if(!d.current&&!fd(h))return}else if(!zP(h))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const h=p.relatedTarget,m=p.nativeEvent,g=Ge(h)&&h.hasAttribute(uo("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=or(s.domReference?s.domReference.ownerDocument:document);!h&&b===s.domReference||Gt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Gt(s.domReference,b)||g||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return I.useMemo(()=>a?{reference:f}:{},[a,f])}function kd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[fv]:s,[pv]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[RA]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[fv,pv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(g=>g(...h)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function Nr(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=I.useCallback(a=>kd(a,e,"reference"),t),i=I.useCallback(a=>kd(a,e,"floating"),n),s=I.useCallback(a=>kd(a,e,"item"),r);return I.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const u_="Escape";function al(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function ll(e,t){return al(t,e===hv||e===el,e===ls||e===cs)}function Id(e,t,n){return al(t,e===el,n?e===ls:e===cs)||e==="Enter"||e===" "||e===""}function jv(e,t,n){return al(t,n?e===ls:e===cs,e===el)}function zv(e,t,n,r){const o=n?e===cs:e===ls,i=e===hv;return t==="both"||t==="horizontal"&&r&&r>1?e===u_:al(t,o,i)}function cl(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:E="vertical",parentOrientation:S,cols:O=1,scrollItemIntoView:w=!0,virtualItemRef:C,itemSizes:P,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||tl("`useListNavigation` looping must be enabled to allow escaping."),m||tl("`useListNavigation` must be virtual to allow escaping.")),E==="vertical"&&O>1&&tl("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=Ga(o.floating),j=Yt(F),L=Ar(),A=_r();rt(()=>{e.dataRef.current.orientation=E},[e,E]);const D=Ot(()=>{l(k.current===-1?null:k.current)}),z=pd(o.domReference),M=I.useRef(g),k=I.useRef(u??-1),R=I.useRef(null),$=I.useRef(!0),B=I.useRef(D),H=I.useRef(!!o.floating),q=I.useRef(n),W=I.useRef(!1),oe=I.useRef(!1),ae=Yt(x),ie=Yt(n),U=Yt(w),G=Yt(u),[J,fe]=I.useState(),[N,ne]=I.useState(),te=Ot(()=>{function se(de){if(m){var he;(he=de.id)!=null&&he.endsWith("-fui-option")&&(de.id=i+"-"+Math.random().toString(16).slice(2,10)),fe(de.id),A?.events.emit("virtualfocus",de),C&&(C.current=de)}else fo(de,{sync:W.current,preventScroll:!0})}const Y=s.current[k.current],V=oe.current;Y&&se(Y),(W.current?de=>de():requestAnimationFrame)(()=>{const de=s.current[k.current]||Y;if(!de)return;Y||se(de);const he=U.current;he&&Q&&(V||!$.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof he=="boolean"?{block:"nearest",inline:"nearest"}:he))})});rt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(oe.current=!0,k.current=u,D()):H.current&&(k.current=-1,B.current()))},[c,n,o.floating,u,D]),rt(()=>{if(c&&n&&o.floating)if(a==null){if(W.current=!1,G.current!=null)return;if(H.current&&(k.current=-1,te()),(!q.current||!H.current)&&M.current&&(R.current!=null||M.current===!0&&R.current==null)){let se=0;const Y=()=>{s.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(Y),se++):(k.current=R.current==null||Id(R.current,E,h)||p?hd(s,ae.current):Wy(s,ae.current),R.current=null,D())};Y()}}else os(s,a)||(k.current=a,te(),oe.current=!1)},[c,n,o.floating,a,G,p,s,E,h,D,te,ae]),rt(()=>{var se;if(!c||o.floating||!A||m||!H.current)return;const Y=A.nodesRef.current,V=(se=Y.find(he=>he.id===L))==null||(se=se.context)==null?void 0:se.elements.floating,X=or(Kt(o.floating)),de=Y.some(he=>he.context&&Gt(he.context.elements.floating,X));V&&!de&&$.current&&V.focus({preventScroll:!0})},[c,o.floating,A,L,m]),rt(()=>{if(!c||!A||!m||L)return;function se(Y){ne(Y.id),C&&(C.current=Y)}return A.events.on("virtualfocus",se),()=>{A.events.off("virtualfocus",se)}},[c,A,m,L,C]),rt(()=>{B.current=D,q.current=n,H.current=!!o.floating}),rt(()=>{n||(R.current=null,M.current=g)},[n,g]);const re=a!=null,Q=I.useMemo(()=>{function se(V){if(!ie.current)return;const X=s.current.indexOf(V);X!==-1&&k.current!==X&&(k.current=X,D())}return{onFocus(V){let{currentTarget:X}=V;W.current=!0,se(X)},onClick:V=>{let{currentTarget:X}=V;return X.focus({preventScroll:!0})},onMouseMove(V){let{currentTarget:X}=V;W.current=!0,oe.current=!1,v&&se(X)},onPointerLeave(V){let{pointerType:X}=V;if(!(!$.current||X==="touch")&&(W.current=!0,!!v&&(k.current=-1,D(),!m))){var de;(de=j.current)==null||de.focus({preventScroll:!0})}}}},[ie,j,v,s,D,m]),Z=I.useCallback(()=>{var se;return S??(A==null||(se=A.nodesRef.current.find(Y=>Y.id===L))==null||(se=se.context)==null||(se=se.dataRef)==null?void 0:se.current.orientation)},[L,A,S]),le=Ot(se=>{if($.current=!1,W.current=!0,se.which===229||!ie.current&&se.currentTarget===j.current)return;if(p&&zv(se.key,E,h,O)){ll(se.key,Z())||Zt(se),r(!1,se.nativeEvent,"list-navigation"),dt(o.domReference)&&(m?A?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const Y=k.current,V=hd(s,x),X=Wy(s,x);if(z||(se.key==="Home"&&(Zt(se),k.current=V,D()),se.key==="End"&&(Zt(se),k.current=X,D())),O>1){const de=P||Array.from({length:s.current.length},()=>({width:1,height:1})),he=KP(de,O,_),Se=he.findIndex(qe=>qe!=null&&!Ka(s,qe,x)),be=he.reduce((qe,gt,yt)=>gt!=null&&!Ka(s,gt,x)?yt:qe,-1),Ae=he[YP({current:he.map(qe=>qe!=null?s.current[qe]:null)},{event:se,orientation:E,loop:f,rtl:h,cols:O,disabledIndices:XP([...(typeof x!="function"?x:null)||s.current.map((qe,gt)=>Ka(s,gt,x)?gt:void 0),void 0],he),minIndex:Se,maxIndex:be,prevIndex:ZP(k.current>X?V:k.current,de,he,O,se.key===el?"bl":se.key===(h?ls:cs)?"tr":"tl"),stopEvent:!0})];if(Ae!=null&&(k.current=Ae,D()),E==="both")return}if(ll(se.key,E)){if(Zt(se),n&&!m&&or(se.currentTarget.ownerDocument)===se.currentTarget){k.current=Id(se.key,E,h)?V:X,D();return}Id(se.key,E,h)?f?k.current=Y>=X?d&&Y!==s.current.length?-1:V:tn(s,{startingIndex:Y,disabledIndices:x}):k.current=Math.min(X,tn(s,{startingIndex:Y,disabledIndices:x})):f?k.current=Y<=V?d&&Y!==-1?s.current.length:X:tn(s,{startingIndex:Y,decrement:!0,disabledIndices:x}):k.current=Math.max(V,tn(s,{startingIndex:Y,decrement:!0,disabledIndices:x})),os(s,k.current)&&(k.current=-1),D()}}),ce=I.useMemo(()=>m&&n&&re&&{"aria-activedescendant":N||J},[m,n,re,N,J]),pe=I.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...z?{}:ce,onKeyDown:le,onPointerMove(){$.current=!0}}),[ce,le,E,z]),ge=I.useMemo(()=>{function se(V){g==="auto"&&By(V.nativeEvent)&&(M.current=!0)}function Y(V){M.current=g,g==="auto"&&Hy(V.nativeEvent)&&(M.current=!0)}return{...ce,onKeyDown(V){$.current=!1;const X=V.key.startsWith("Arrow"),de=["Home","End"].includes(V.key),he=X||de,Se=jv(V.key,E,h),be=zv(V.key,E,h,O),Ae=jv(V.key,Z(),h),qe=ll(V.key,E),gt=(p?Ae:qe)||V.key==="Enter"||V.key.trim()==="";if(m&&n){const K=A?.nodesRef.current.find(_e=>_e.parentId==null),ee=A&&K?BP(A.nodesRef.current,K.id):null;if(he&&ee&&C){const _e=new KeyboardEvent("keydown",{key:V.key,bubbles:!0});if(Se||be){var yt,Bt;const Ze=((yt=ee.context)==null?void 0:yt.elements.domReference)===V.currentTarget,Qe=be&&!Ze?(Bt=ee.context)==null?void 0:Bt.elements.domReference:Se?s.current.find(Fe=>Fe?.id===J):null;Qe&&(Zt(V),Qe.dispatchEvent(_e),ne(void 0))}if((qe||de)&&ee.context&&ee.context.open&&ee.parentId&&V.currentTarget!==ee.context.elements.domReference){var $e;Zt(V),($e=ee.context.elements.domReference)==null||$e.dispatchEvent(_e);return}}return le(V)}if(!(!n&&!b&&X)){if(gt){const K=ll(V.key,Z());R.current=p&&K?null:V.key}if(p){Ae&&(Zt(V),n?(k.current=hd(s,ae.current),D()):r(!0,V.nativeEvent,"list-navigation"));return}qe&&(u!=null&&(k.current=u),Zt(V),!n&&b?r(!0,V.nativeEvent,"list-navigation"):le(V),n&&D())}},onFocus(){n&&!m&&(k.current=-1,D())},onPointerDown:Y,onPointerEnter:Y,onMouseDown:se,onClick:se}},[J,ce,O,le,ae,g,s,p,D,r,n,b,E,Z,h,u,A,m,C]);return I.useMemo(()=>c?{reference:ge,floating:pe,item:Q}:{},[c,ge,pe,Q])}const d_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function mo(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=us(),u=((n=i.domReference)==null?void 0:n.id)||c,d=I.useMemo(()=>{var b;return((b=Ga(i.floating))==null?void 0:b.id)||s},[i.floating,s]),f=(r=d_.get(l))!=null?r:l,h=Ar()!=null,m=I.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&h&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,h,o,u,l]),g=I.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),v=I.useCallback(b=>{let{active:x,selected:E}=b;const S={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...S,"aria-selected":E}}return{}},[d,l]);return I.useMemo(()=>a?{reference:m,floating:g,item:v}:{},[a,m,g,v])}const Bv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Xo(e,t){return typeof e=="function"?e(t):e}function f_(e,t){const[n,r]=I.useState(e);return e&&!n&&r(!0),I.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function p_(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=I.useState("unmounted"),c=f_(n,s);return!c&&a==="close"&&l("unmounted"),rt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{Xn.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Hv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=I.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[p,h]=I.useState(()=>({...Xo(i,c),...Xo(n,c)})),{isMounted:m,status:g}=p_(e,{duration:s}),v=Yt(n),b=Yt(r),x=Yt(o),E=Yt(i);return rt(()=>{const S=Xo(v.current,c),O=Xo(x.current,c),w=Xo(E.current,c),C=Xo(b.current,c)||Object.keys(S).reduce((P,_)=>(P[_]="",P),{});if(g==="initial"&&h(P=>({transitionProperty:P.transitionProperty,...w,...S})),g==="open"&&h({transitionProperty:Object.keys(C).map(Bv).join(","),transitionDuration:d+"ms",...w,...C}),g==="close"){const P=O||S;h({transitionProperty:Object.keys(P).map(Bv).join(","),transitionDuration:f+"ms",...w,...P})}},[f,x,v,b,E,d,g,c]),{isMounted:m,styles:p}}function h_(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,h=I.useRef(-1),m=I.useRef(""),g=I.useRef((n=p??s)!=null?n:-1),v=I.useRef(null),b=Ot(a),x=Ot(l),E=Yt(u),S=Yt(f);rt(()=>{r&&(Xt(h),v.current=null,m.current="")},[r]),rt(()=>{if(r&&m.current===""){var _;g.current=(_=p??s)!=null?_:-1}},[r,p,s]);const O=Ot(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),w=Ot(_=>{function F(z,M,k){const R=E.current?E.current(M,k):M.find($=>$?.toLocaleLowerCase().indexOf(k.toLocaleLowerCase())===0);return R?z.indexOf(R):-1}const j=i.current;if(m.current.length>0&&m.current[0]!==" "&&(F(j,j,m.current)===-1?O(!1):_.key===" "&&Zt(_)),j==null||S.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Zt(_),O(!0)),j.every(z=>{var M,k;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((k=z[1])==null?void 0:k.toLocaleLowerCase()):!0})&&m.current===_.key&&(m.current="",g.current=v.current),m.current+=_.key,Xt(h),h.current=window.setTimeout(()=>{m.current="",g.current=v.current,O(!1)},d);const A=g.current,D=F(j,[...j.slice((A||0)+1),...j.slice(0,(A||0)+1)],m.current);D!==-1?(b(D),v.current=D):_.key!==" "&&(m.current="",O(!1))}),C=I.useMemo(()=>({onKeyDown:w}),[w]),P=I.useMemo(()=>({onKeyDown:w,onKeyUp(_){_.key===" "&&O(!1)}}),[w,O]);return I.useMemo(()=>c?{reference:C,floating:P}:{},[c,C,P])}function Wv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Wv(e,o.id,n)])}function qv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function m_(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Uv(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,s=null,a=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),h=p-l;if(s===null||a===null||h===0)return s=d,a=f,l=p,null;const m=d-s,g=f-a,b=Math.sqrt(m*m+g*g)/h;return s=d,a=f,l=p,b}const u=d=>{let{x:f,y:p,placement:h,elements:m,onClose:g,nodeId:v,tree:b}=d;return function(E){function S(){Xt(o),g()}if(Xt(o),!m.domReference||!m.floating||h==null||f==null||p==null)return;const{clientX:O,clientY:w}=E,C=[O,w],P=UA(E),_=E.type==="mouseleave",F=Sd(m.floating,P),j=Sd(m.domReference,P),L=m.domReference.getBoundingClientRect(),A=m.floating.getBoundingClientRect(),D=h.split("-")[0],z=f>A.right-A.width/2,M=p>A.bottom-A.height/2,k=m_(C,L),R=A.width>L.width,$=A.height>L.height,B=(R?L:A).left,H=(R?L:A).right,q=($?L:A).top,W=($?L:A).bottom;if(F&&(i=!0,!_))return;if(j&&(i=!1),j&&!_){i=!0;return}if(_&&Ge(E.relatedTarget)&&Sd(m.floating,E.relatedTarget)||b&&Wv(b.nodesRef.current,v).length)return;if(D==="top"&&p>=L.bottom-1||D==="bottom"&&p<=L.top+1||D==="left"&&f>=L.right-1||D==="right"&&f<=L.left+1)return S();let oe=[];switch(D){case"top":oe=[[B,L.top+1],[B,A.bottom-1],[H,A.bottom-1],[H,L.top+1]];break;case"bottom":oe=[[B,A.top+1],[B,L.bottom-1],[H,L.bottom-1],[H,A.top+1]];break;case"left":oe=[[A.right-1,W],[A.right-1,q],[L.left+1,q],[L.left+1,W]];break;case"right":oe=[[L.right-1,W],[L.right-1,q],[A.left+1,q],[A.left+1,W]];break}function ae(ie){let[U,G]=ie;switch(D){case"top":{const J=[R?U+t/2:z?U+t*4:U-t*4,G+t+1],fe=[R?U-t/2:z?U+t*4:U-t*4,G+t+1],N=[[A.left,z||R?A.bottom-t:A.top],[A.right,z?R?A.bottom-t:A.top:A.bottom-t]];return[J,fe,...N]}case"bottom":{const J=[R?U+t/2:z?U+t*4:U-t*4,G-t],fe=[R?U-t/2:z?U+t*4:U-t*4,G-t],N=[[A.left,z||R?A.top+t:A.bottom],[A.right,z?R?A.top+t:A.bottom:A.top+t]];return[J,fe,...N]}case"left":{const J=[U+t+1,$?G+t/2:M?G+t*4:G-t*4],fe=[U+t+1,$?G-t/2:M?G+t*4:G-t*4];return[...[[M||$?A.right-t:A.left,A.top],[M?$?A.right-t:A.left:A.right-t,A.bottom]],J,fe]}case"right":{const J=[U-t,$?G+t/2:M?G+t*4:G-t*4],fe=[U-t,$?G-t/2:M?G+t*4:G-t*4],N=[[M||$?A.left+t:A.right,A.top],[M?$?A.left+t:A.right:A.left+t,A.bottom]];return[J,fe,...N]}}}if(!qv([O,w],oe)){if(i&&!k)return S();if(!_&&r){const ie=c(E.clientX,E.clientY);if(ie!==null&&ie<.1)return S()}qv([O,w],ae([f,p]))?!i&&r&&(o.current=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const Gv=200,g_=500,Qo=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},Yv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Kv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Od=(e,t)=>{const n=Yv(t,Kv.basic,e)||Yv(t,Kv.extend,e);return n===void 0||n===e?void 0:n},Fr=()=>typeof window>"u",Pd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Zv=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},y_=e=>!e,Ad=()=>{},Xv=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},_d=T.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:s=!0,hover:a=!0,enabled:l=!0,popover:c=!0,onChange:u=Ad,followCursor:d=!1,...f},p){const[h,m]=T.useState(n??!1),g=T.useRef(null),v=t||"span",b=A=>{m(A),u?.(A)},{refs:x,floatingStyles:E,context:S}=Dr({placement:i,open:h,whileElementsMounted:Yo,onOpenChange:n?void 0:b,middleware:[vd(),as(5),FA(),cv({padding:5,element:g}),bd({fallbackAxisSideDirection:"start"})]}),O=ho(S,{enabled:l}),w=mo(S,{role:"tooltip",enabled:l}),C=c_(S,{enabled:l?s:!1}),P=fs(S,{enabled:l?c:!1}),_=i_(S,{enabled:!!l&&!!d}),F=Sv(S,{move:!0,delay:{open:Gv},enabled:l?a:!1,handleClose:c?Uv():null}),{getReferenceProps:j,getFloatingProps:L}=Nr([w,O,_,s?C:void 0,a?F:void 0,c?P:void 0]);return T.useEffect(()=>m(n===void 0?!1:n),[n]),y.jsxs(T.Fragment,{children:[y.jsx(v,{...j(f),ref:xr(x.setReference,p),children:r}),h&&y.jsx(po,{children:y.jsxs(gn,{...L(),ref:x.setFloating,style:E,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[y.jsx(yv,{ref:g,context:S,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),Qv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>y.jsxs("span",{className:Me("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:y.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||o?y.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?y.jsx(_d,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:y.jsx("span",{className:"cursor-help",children:y.jsx(Ku,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:y.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?y.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[y.jsx(hy,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),y.jsx(RO,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),ps=T.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:h,componentName:m,placeholder:g,hideLeft:v=!1,required:b,disabled:x,reportStatus:E},S)=>{const O=Ju(),w=E!==void 0?E:O.input.iconFeedback,C=d??p,P=Nt(),_=e??P.inputOptionalLabel;return y.jsxs("fieldset",{ref:S,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":m,"data-interactive":!!i,className:Me("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[y.jsxs("label",{form:u,htmlFor:C,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[y.jsx(Qv,{info:a,hideLeft:v,reportStatus:w,title:h,placeholder:g,children:_||n?y.jsxs(T.Fragment,{children:[b?null:y.jsx("span",{"aria-disabled":x,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:_}),n?y.jsx(T.Fragment,{children:n}):null]}):null}),y.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?y.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?y.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),y.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),y.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),Jv=(e,t,n,r)=>T.forwardRef(({info:i,left:s,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:h="text",labelClassName:m,feedback:g=null,hideLeft:v=!1,loading:b,...x},E)=>{const S=e,O=x.id??x.name,w=T.useRef(null);return T.useEffect(()=>{if(w.current===null)return;const C=w.current,P=Xi(w.current),_=r?.(C),F=j=>{const L=j;if(L.key==="Enter"&&C.enterKeyHint==="next"){const A=C.getAttribute("data-next");if(A){const D=document.getElementById(A);if(D)return D.focus(),void L.preventDefault()}}};return C.addEventListener("keydown",F),()=>{_?.(),P(),C.removeEventListener("keydown",F)}},[]),y.jsx(ps,{...n,info:i,left:s,error:l,right:c,loading:b,form:x.form,name:x.name,feedback:g,hideLeft:v,title:x.title,container:Me(u,n.container),rightLabel:d,disabled:x.disabled,interactive:f,required:x.required,componentName:t,id:x.name||x.id,optionalText:p,labelClassName:m,placeholder:x.placeholder,children:y.jsx(S,{...n,...x,id:O,name:O,type:h,"data-next":a,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:xr(E,w),className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),Jo=Jv(uy,"input",{type:"text"}),v_=Lo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ul=T.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return y.jsxs(gn,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Me(v_({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),go=T.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:f,left:p,error:h,...m},g)=>{const v=Nt(),b=T.useRef(null),x=m.id??m.name;T.useImperativeHandle(g,()=>b.current),T.useEffect(()=>{if(b.current===null)return;const S=new AbortController,O=b.current,w=Xi(b.current);return O.addEventListener("change",()=>O.setAttribute("data-selected","true"),{once:!0,signal:S.signal}),()=>{w(),S.abort()}},[]);const E=()=>b.current?.focus();return y.jsx(ps,{info:n,left:p,error:h,form:m.form,loading:l,name:m.name,feedback:o,hideLeft:d,required:e,title:m.title,container:u,componentName:"select",rightLabel:a,interactive:s,id:m.name||m.id,optionalText:c,labelClassName:i,placeholder:m.placeholder,right:y.jsxs("label",{htmlFor:x,children:[f,y.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[y.jsx(Gu,{size:20}),y.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:y.jsxs("select",{...m,id:x,name:x,required:e,ref:xr(g,b),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:Me("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",m.className),children:[y.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(S=>T.createElement("option",{...S,value:S.value,children:S.label??S.value,key:`${x}-select-option-${S.value}`}))]})})});function nn(e){return e?.ownerDocument||document}function b_({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=I.useRef(e!==void 0),[i,s]=I.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){I.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
5
|
+
`))},[r,n,e]);const{current:c}=I.useRef(t);I.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
6
|
+
`))},[JSON.stringify(t)])}const l=I.useCallback(c=>{o||s(c)},[]);return[a,l]}const eb={};function sr(e,t){const n=I.useRef(eb);return n.current===eb&&(n.current=e(t)),n}const Md=I[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],x_=Md&&Md!==I.useLayoutEffect?Md:e=>e();function ke(e){const t=sr(w_).current;return t.next=e,x_(t.effect),t.trampoline}function w_(){const e={next:void 0,callback:S_,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function S_(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const We=typeof document<"u"?I.useLayoutEffect:()=>{};function yo(e){const t=sr(E_,e).current;return t.next=e,We(t.effect),t}function E_(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let Dd;process.env.NODE_ENV!=="production"&&(Dd=new Set);function T_(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Dd.has(t)||(Dd.add(t),console.warn(`Base UI: ${t}`))}}function vn(){}const rn=Object.freeze({}),tb="data-base-ui-click-trigger",C_={clipPath:"inset(50%)",position:"fixed",top:0,left:0},nb="none",hs="trigger-press",k_="trigger-hover",rb="outside-press",I_="close-press",ob="track-press",O_="input-change",ib="focus-out",P_="escape-key",A_="keyboard",__="drag",M_="imperative-action";function Qt(e,t,n,r){let o=!1,i=!1;const s=r??rn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function sb(e,t,n){const r=rn;return{reason:e,event:t??new Event("base-ui"),...r}}function D_(e,t){const n=I.useRef(e),r=ke(t);We(()=>{n.current!==e&&r(n.current)},[e,r]),We(()=>{n.current=e},[e])}const N_={...I};let ab=0;function F_(e,t="mui"){const[n,r]=I.useState(e),o=e||n;return I.useEffect(()=>{n==null&&(ab+=1,r(`${t}-${ab}`))},[n,t]),o}const lb=N_.useId;function ei(e,t){if(lb!==void 0){const n=lb();return e??(t?`${t}-${n}`:n)}return F_(e,t)}function ti(e){return ei(e,"base-ui")}function bn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function ms(e,t,n,r){const o=sr(cb).current;return V_(o,e,t,n,r)&&ub(o,[e,t,n,r]),o.callback}function L_(e){const t=sr(cb).current;return R_(t,e)&&ub(t,e),t.callback}function cb(){return{callback:null,cleanup:null,refs:[]}}function V_(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function R_(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function ub(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const $_=parseInt(I.version,10);function Nd(e){return $_>=e}function db(e){if(!I.isValidElement(e))return null;const t=e,n=t.props;return(Nd(19)?n?.ref:t.ref)??null}function Fd(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function j_(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function z_(e,t){return typeof e=="function"?e(t):e}function B_(e,t){return typeof e=="function"?e(t):e}const gs={};function Ld(e,t,n,r,o){let i={...Vd(e,gs)};return t&&(i=dl(i,t)),n&&(i=dl(i,n)),r&&(i=dl(i,r)),i}function H_(e){if(e.length===0)return gs;if(e.length===1)return Vd(e[0],gs);let t={...Vd(e[0],gs)};for(let n=1;n<e.length;n+=1)t=dl(t,e[n]);return t}function dl(e,t){return fb(t)?t(e):W_(e,t)}function W_(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Fd(e.style,r);break}case"className":{e[n]=pb(e.className,r);break}default:q_(n,r)?e[n]=U_(e[n],r):e[n]=r}}return e}function q_(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function fb(e){return typeof e=="function"}function Vd(e,t){return fb(e)?e(t):e??gs}function U_(e,t){return t?e?n=>{if(G_(n)){const o=n;Rd(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Rd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function pb(e,t){return t?e?t+" "+e:t:e}function G_(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Rt(e,t,n={}){const r=t.render,o=Y_(t,n);if(n.enabled===!1)return null;const i=n.state??rn;return K_(e,r,o,i)}function Y_(e,t={}){const{className:n,style:r,render:o}=e,{state:i=rn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?z_(n,i):void 0,d=c?B_(r,i):void 0,f=c?j_(i,l):rn,p=c?Fd(f,Array.isArray(a)?H_(a):a)??rn:rn;return typeof document<"u"&&(c?Array.isArray(s)?p.ref=L_([p.ref,db(o),...s]):p.ref=ms(p.ref,db(o),s):ms(null,null)),c?(u!==void 0&&(p.className=pb(p.className,u)),d!==void 0&&(p.style=Fd(p.style,d)),p):rn}function K_(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Ld(n,t.props);return o.ref=n.ref,I.cloneElement(t,o)}if(e&&typeof e=="string")return Z_(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":bn(8))}function Z_(e,t){return e==="button"?T.createElement("button",{type:"button",...t,key:t.key}):e==="img"?T.createElement("img",{alt:"",...t,key:t.key}):I.createElement(e,t)}function Rn(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function hb(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const ni=typeof navigator<"u",$d=J_(),mb=tM(),gb=eM(),X_=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),yb=$d.platform==="MacIntel"&&$d.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test($d.platform),Q_=ni&&/apple/i.test(navigator.vendor),jd=ni&&/android/i.test(mb)||/android/i.test(gb);ni&&mb.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const vb=gb.includes("jsdom/");function J_(){if(!ni)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function eM(){if(!ni)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function tM(){if(!ni)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const zd="data-base-ui-focusable",bb="active",xb="selected",nM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function In(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function bt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&ns(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function pn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function $n(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function rM(e){return e.matches("html,body")}function hn(e){return e?.ownerDocument||document}function wb(e){return dt(e)&&e.matches(nM)}function Sb(e){return e?e.getAttribute("role")==="combobox"&&wb(e):!1}function Bd(e){if(!e||vb)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Hd(e){return e?e.hasAttribute(zd)?e:e.querySelector(`[${zd}]`)||e:null}function ri(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...ri(e,o.id,n)])}function Eb(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function oM(e){e.preventDefault(),e.stopPropagation()}function iM(e){return"nativeEvent"in e}function sM(e){return e.mozInputSource===0&&e.isTrusted?!0:jd&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function aM(e){return vb?!1:!jd&&e.width===0&&e.height===0||jd&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Tb(e,t){return["mouse","pen"].includes(e)}function Cb(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var lM=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],fl=lM.join(","),kb=typeof Element>"u",oi=kb?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,pl=!kb&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},hl=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):hl(t.parentNode));return s},cM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Ib=function(t,n,r){if(hl(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(fl));return n&&oi.call(t,fl)&&o.unshift(t),o=o.filter(r),o},ml=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!hl(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=ml(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=oi.call(s,fl);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!hl(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=ml(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},Ob=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Pb=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||cM(t))&&!Ob(t)?0:t.tabIndex},uM=function(t,n){var r=Pb(t);return r<0&&n&&!Ob(t)?0:r},dM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ab=function(t){return t.tagName==="INPUT"},fM=function(t){return Ab(t)&&t.type==="hidden"},pM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},hM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},mM=function(t){if(!t.name)return!0;var n=t.form||pl(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=hM(o,t.form);return!i||i===t},gM=function(t){return Ab(t)&&t.type==="radio"},yM=function(t){return gM(t)&&!mM(t)},vM=function(t){var n,r=t&&pl(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=pl(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},_b=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},bM=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=oi.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(oi.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=pl(t);if(c&&!c.shadowRoot&&o(c)===!0)return _b(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(vM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return _b(t);return!1},xM=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return oi.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Wd=function(t,n){return!(n.disabled||fM(n)||bM(n,t)||pM(n)||xM(n))},qd=function(t,n){return!(yM(n)||Pb(n)<0||!Wd(t,n))},wM=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Mb=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=uM(a,s),c=s?Mb(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(dM).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},gl=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ml([t],n.includeContainer,{filter:qd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:wM}):r=Ib(t,n.includeContainer,qd.bind(null,n)),Mb(r)},SM=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ml([t],n.includeContainer,{filter:Wd.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Ib(t,n.includeContainer,Wd.bind(null,n)),r},Db=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return oi.call(t,fl)===!1?!1:qd(n,t)};const ys=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Nb(e,t){const n=gl(e,ys()),r=n.length;if(r===0)return;const o=In(hn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function Fb(e){return Nb(hn(e).body,1)||e}function Lb(e){return Nb(hn(e).body,-1)||e}function vs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function EM(e){gl(e,ys()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Vb(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Ud=I.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(Ud.displayName="CompositeListContext");function TM(){return I.useContext(Ud)}function CM(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=ke(o),s=I.useRef(0),a=sr(IM).current,l=sr(kM).current,[c,u]=I.useState(0),d=I.useRef(c),f=ke((v,b)=>{l.set(v,b??null),d.current+=1,u(d.current)}),p=ke(v=>{l.delete(v),d.current+=1,u(d.current)}),h=I.useMemo(()=>{const v=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(OM).forEach((x,E)=>{const S=l.get(x)??{};v.set(x,{...S,index:E})}),v},[l,c]);We(()=>{if(typeof MutationObserver!="function"||h.size===0)return;const v=new MutationObserver(b=>{const x=new Set,E=S=>x.has(S)?x.delete(S):x.add(S);b.forEach(S=>{S.removedNodes.forEach(E),S.addedNodes.forEach(E)}),x.size===0&&(d.current+=1,u(d.current))});return h.forEach((b,x)=>{x.parentElement&&v.observe(x.parentElement,{childList:!0})}),()=>{v.disconnect()}},[h]),We(()=>{d.current===c&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),s.current=h.size),i(h)},[i,h,n,r,c]),We(()=>()=>{n.current=[]},[n]),We(()=>()=>{r&&(r.current=[])},[r]);const m=ke(v=>(a.add(v),()=>{a.delete(v)}));We(()=>{a.forEach(v=>v(h))},[a,h]);const g=I.useMemo(()=>({register:f,unregister:p,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:s}),[f,p,m,n,r,s]);return y.jsx(Ud.Provider,{value:g,children:t})}function kM(){return new Map}function IM(){return new Set}function OM(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function PM(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Rb=I.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:vn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Rb.displayName="FormContext");function $b(){return I.useContext(Rb)}const AM={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jb=I.createContext({invalid:void 0,name:void 0,validityData:{state:AM,errors:[],error:"",value:"",initialValue:null},setValidityData:vn,disabled:void 0,touched:!1,setTouched:vn,dirty:!1,setDirty:vn,filled:!1,setFilled:vn,focused:!1,setFocused:vn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=rn)=>e,getInputValidationProps:(e=rn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(jb.displayName="FieldRootContext");function Gd(e=!0){const t=I.useContext(jb);if(t.setValidityData===vn&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":bn(28));return t}function _M(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=$b(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=Gd(),f=ke(e.getValue);We(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(h=>({...h,initialValue:p}))},[t,d,n,u.initialValue,f]),We(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:PM(u,l),validate(p=!0){let h=n;h===void 0&&(h=f()),c.current=!0,p?Xn.flushSync(()=>s(h)):s(h)}})},[s,i,t,a,f,r,l,c,o,u,n]),We(()=>{const p=a.current.fields;return()=>{r&&p.delete(r)}},[a,r])}const zb=I.createContext({controlId:void 0,setControlId:vn,labelId:void 0,setLabelId:vn,messageIds:[],setMessageIds:vn,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(zb.displayName="LabelableContext");function Bb(){return I.useContext(zb)}function Hb(e,t){return e-t}function MM(e,t,n){const r=e.slice();return r[t]=n,r.sort(Hb)}function Wb(e,t,n,r,o,i){let s=e;return s=Rn(s,n,r),o&&(s=MM(i,t,Rn(s,i[t-1]||-1/0,i[t+1]||1/0))),s}function qb(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,s,a)=>(s===a.length-1||o.push(Math.abs(i-a[s+1])),o),[]);return Math.min(...r)>=t*n}const bs={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null},Yd=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(Yd.displayName="SliderRootContext");function yl(){const e=I.useContext(Yd);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":bn(62));return e}function DM(e){return"key"in e?A_:O_}function NM(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?hb(e,t):!1}const Ub=I.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:s=!1,id:a,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:h=0,name:m,onValueChange:g,onValueCommitted:v,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:E="push",thumbAlignment:S="center",value:O,...w}=t,C=ti(a),P=ke(g),_=ke(v),{clearErrors:F}=$b(),{state:j,disabled:L,name:A,setTouched:D,setDirty:z,validityData:M,shouldValidateOnChange:k,validation:R}=Gd(),{labelId:$}=Bb(),B=r??$,H=L||s,q=A??m,[W,oe]=b_({controlled:O,default:i??p,name:"Slider"}),ae=I.useRef(null),ie=I.useRef(null),U=I.useRef([]),G=I.useRef(null),J=I.useRef(null),fe=I.useRef(-1),N=I.useRef(null),ne=I.useRef(null),te=I.useRef("none"),re=yo(l),[Q,Z]=I.useState(-1),[le,ce]=I.useState(-1),[pe,ge]=I.useState(!1),[se,Y]=I.useState(()=>new Map),[V,X]=I.useState([void 0,void 0]),de=ke($e=>{Z($e),$e!==-1&&ce($e)});_M({id:C,commit:R.commit,value:W,controlRef:ie,name:q,getValue:()=>W}),D_(W,()=>{F(q),k()?R.commit(W):R.commit(W,!0);const $e=M.initialValue;let K;Array.isArray(W)&&Array.isArray($e)?K=!hb(W,$e):K=W!==$e,z(K)});const he=ke($e=>{$e&&(ie.current=$e)}),Se=Array.isArray(W),be=I.useMemo(()=>Se?W.slice().sort(Hb):[Rn(W,p,f)],[f,p,Se,W]),Ae=ke(($e,K)=>{if(Number.isNaN($e)||NM($e,W))return;const ee=K??Qt(nb,void 0,void 0,{activeThumbIndex:-1});te.current=ee.reason;const _e=new event.constructor(event.type,event);Object.defineProperty(_e,"target",{writable:!0,value:{value:$e,name:q}}),ee.event=_e,ne.current=$e,P($e,ee),!ee.isCanceled&&oe($e)}),qe=ke(($e,K,ee)=>{const _e=Wb($e,K,p,f,Se,be);if(qb(_e,x,h)){const Ze=DM(ee);Ae(_e,Qt(Ze,ee.nativeEvent,void 0,{activeThumbIndex:K})),D(!0);const Qe=ne.current??_e;_(Qe,sb(Ze,ee.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&T_("Slider `max` must be greater than `min`."),We(()=>{const $e=In(nn(ae.current));H&&$e&&ae.current?.contains($e)&&$e.blur()},[H]),H&&Q!==-1&&de(-1);const gt=I.useMemo(()=>({...j,activeThumbIndex:Q,disabled:H,dragging:pe,orientation:b,max:f,min:p,minStepsBetweenValues:h,step:x,values:be}),[j,Q,H,pe,f,p,h,b,x,be]),yt=I.useMemo(()=>({active:Q,controlRef:ie,disabled:H,dragging:pe,validation:R,formatOptionsRef:re,handleInputChange:qe,indicatorPosition:V,inset:S!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:le,lastChangedValueRef:ne,lastChangeReasonRef:te,locale:u,max:f,min:p,minStepsBetweenValues:h,name:q,onValueCommitted:_,orientation:b,pressedInputRef:G,pressedThumbCenterOffsetRef:J,pressedThumbIndexRef:fe,pressedValuesRef:N,registerFieldControlRef:he,renderBeforeHydration:S==="edge",setActive:de,setDragging:ge,setIndicatorPosition:X,setValue:Ae,state:gt,step:x,thumbCollisionBehavior:E,thumbMap:se,thumbRefs:U,values:be}),[Q,ie,B,H,pe,R,re,qe,V,c,le,ne,te,u,f,p,h,q,_,b,G,J,fe,N,he,de,ge,X,Ae,gt,x,E,S,se,U,be]),Bt=Rt("div",t,{state:gt,ref:[n,ae],props:[{"aria-labelledby":B,id:C,role:"group"},R.getValidationProps,w],stateAttributesMapping:bs});return y.jsx(Yd.Provider,{value:yt,children:y.jsx(CM,{elementsRef:U,onMapChange:Y,children:Bt})})});process.env.NODE_ENV!=="production"&&(Ub.displayName="SliderRoot");const Gb=new Map;function FM(e,t){const n=JSON.stringify({locale:e,options:t}),r=Gb.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return Gb.set(n,o),o}function ii(e,t,n){return e==null?"":FM(t,n).format(e)}const LM=[];function vl(e){I.useEffect(e,LM)}const bl=null;let Yb=globalThis.requestAnimationFrame;class VM{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV==="test"&&Yb!==requestAnimationFrame&&(Yb=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const xl=new VM;class ar{static create(){return new ar}static request(t){return xl.request(t)}static cancel(t){return xl.cancel(t)}currentId=bl;request(t){this.cancel(),this.currentId=xl.request(()=>{this.currentId=bl,t()})}cancel=()=>{this.currentId!==bl&&(xl.cancel(this.currentId),this.currentId=bl)};disposeEffect=()=>this.cancel}function wl(){const e=sr(ar.create).current;return vl(e.disposeEffect),e}const Kb=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(Kb.displayName="DirectionContext");function Zb(){return I.useContext(Kb)?.direction??"ltr"}function Xb(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function RM(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Qb(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(RM(t)))}function Jb({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:s,initialValues:a}){if(e.length===0)return[];const l=e.slice(),c=i*s,u=l.length-1,d=a??e,f=r+t*c,p=o-(u-t)*c;l[t]=Rn(n,f,p);for(let h=t+1;h<=u;h+=1){const m=l[h-1]+c,g=o-(u-h)*c,v=d[h]??l[h];let b=Math.max(l[h],m);v<b&&(b=Math.max(v,m)),l[h]=Rn(b,m,g)}for(let h=t-1;h>=0;h-=1){const m=l[h+1]-c,g=r+h*c,v=d[h]??l[h];let b=Math.min(l[h],m);v>b&&(b=Math.min(v,m)),l[h]=Rn(b,g,m)}for(let h=0;h<=u;h+=1)l[h]=Number(l[h].toFixed(12));return l}function $M({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const h=u[o],m=1e-7,g=u.slice(),v=g[o-1],b=g[o+1],x=v!=null?v+p:s,E=b!=null?b-p:a,S=Rn(i,x,E),O=Number(S.toFixed(12));g[o]=O;const w=i>h,C=i<h,P=w&&b!=null&&i>=b-m,_=C&&v!=null&&i<=v+m;if(!P&&!_)return{value:g,thumbIndex:o,didSwap:!1};const F=P?o+1:o-1,j=g.map((z,M)=>{if(M===o)return O;const k=d[M];return k??u[M]});let L=i;P?L=Math.max(i,g[F]):L=Math.min(i,g[F]);const A=Jb({values:g,index:F,nextValue:L,min:s,max:a,step:l,minStepsBetweenValues:c,initialValues:j}),D=P?F-1:F+1;if(D>=0&&D<A.length){const z=A[D-1],M=A[D+1];let k=z!=null?z+p:s;k=Math.max(k,s+D*p);let R=M!=null?M-p:a;R=Math.min(R,a-(A.length-1-D)*p);const $=Rn(O,k,R);A[D]=Number($.toFixed(12))}return{value:A,thumbIndex:F,didSwap:!0}}case"push":return{value:Jb({values:u,index:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const h=u.slice(),m=h[o-1],g=h[o+1],v=m!=null?m+p:s,b=g!=null?g-p:a,x=Rn(i,v,b);return h[o]=Number(x.toFixed(12)),{value:h,thumbIndex:o,didSwap:!1}}}}const jM=2;function zM(e,t){if(!e)return{start:0,end:0};function n(i){const s=i!=null?parseFloat(i):0;return Number.isNaN(s)?0:s}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function Sl(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const ex=I.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:s,dragging:a,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:h,onValueCommitted:m,orientation:g,pressedInputRef:v,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:E,registerFieldControlRef:S,renderBeforeHydration:O,setActive:w,setDragging:C,setValue:P,state:_,step:F,thumbCollisionBehavior:j,thumbRefs:L,values:A}=yl(),D=Zb(),z=A.length>1,M=g==="vertical",k=I.useRef(null),R=I.useRef(null),$=ke(re=>{re&&R.current==null&&R.current==null&&(R.current=getComputedStyle(re))}),B=I.useRef(null),H=I.useRef(0),q=I.useRef(0),W=yo(A),oe=ke(re=>{x.current!==re&&(x.current=re);const Q=L.current[re];if(!Q){b.current=null,v.current=null;return}v.current=Q.querySelector('input[type="range"]')}),ae=ke(re=>{const Q=k.current;if(!Q)return null;const{width:Z,height:le,bottom:ce,left:pe,right:ge}=Q.getBoundingClientRect(),se=zM(R.current,M),Y=q.current,V=(M?le:Z)-se.start-se.end-Y*2,X=b.current??0,de=re.x-X,he=re.y-X,Se=M?ce-he-se.end:(D==="rtl"?ge-de:de-pe)-se.start,be=Rn((Se-Y)/V,0,1);let Ae=(f-p)*be+p;if(Ae=Qb(Ae,F,p),Ae=Rn(Ae,p,f),!z)return{value:Ae,thumbIndex:0,didSwap:!1};const qe=x.current;if(qe<0)return null;const gt=$M({behavior:j,values:A,currentValues:W.current??A,initialValues:E.current,pressedIndex:qe,nextValue:Ae,min:p,max:f,step:F,minStepsBetweenValues:h});return j==="swap"&>.didSwap?oe(gt.thumbIndex):x.current=gt.thumbIndex,gt}),ie=ke(re=>{E.current=z?A.slice():null,W.current=A;const Q=x.current;let Z=Q;if(Q>-1&&Q<A.length){if(A[Q]===f){let le=Q;for(;le>0&&A[le-1]===f;)le-=1;Z=le}}else{const le=M?"y":"x";let ce;Z=-1;for(let pe=0;pe<L.current.length;pe+=1){const ge=L.current[pe];if(Ge(ge)){const se=Xb(ge),Y=Math.abs(re[le]-se[le]);(ce===void 0||Y<=ce)&&(Z=pe,ce=Y)}}}if(Z>-1&&Z!==Q&&oe(Z),c){const le=L.current[Z];if(Ge(le)){const ce=le.getBoundingClientRect(),pe=M?"height":"width";q.current=ce[pe]/2}}}),U=ke(re=>{L.current?.[re]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),G=ke(re=>{const Q=Sl(re,B);if(Q==null)return;if(H.current+=1,re.type==="pointermove"&&re.buttons===0){J(re);return}const Z=ae(Q);Z!=null&&qb(Z.value,F,h)&&(!a&&H.current>jM&&C(!0),P(Z.value,Qt(__,re,void 0,{activeThumbIndex:Z.thumbIndex})),W.current=Array.isArray(Z.value)?Z.value:[Z.value],Z.didSwap&&U(Z.thumbIndex))});function J(re){w(-1),C(!1),v.current=null,b.current=null;const Q=Sl(re,B),Z=Q!=null?ae(Q):null;if(Z!=null){const le=d.current;l.commit(u.current??Z.value),m(u.current??Z.value,sb(le,re))}"pointerType"in re&&k.current?.hasPointerCapture(re.pointerId)&&k.current?.releasePointerCapture(re.pointerId),x.current=-1,B.current=null,E.current=null,N()}const fe=ke(re=>{if(s)return;const Q=re.changedTouches[0];Q!=null&&(B.current=Q.identifier);const Z=Sl(re,B);if(Z!=null){ie(Z);const ce=ae(Z);if(ce==null)return;U(ce.thumbIndex),P(ce.value,Qt(ob,re,void 0,{activeThumbIndex:ce.thumbIndex})),W.current=Array.isArray(ce.value)?ce.value:[ce.value],ce.didSwap&&U(ce.thumbIndex)}H.current=0;const le=nn(k.current);le.addEventListener("touchmove",G,{passive:!0}),le.addEventListener("touchend",J,{passive:!0})}),N=ke(()=>{const re=nn(k.current);re.removeEventListener("pointermove",G),re.removeEventListener("pointerup",J),re.removeEventListener("touchmove",G),re.removeEventListener("touchend",J),E.current=null}),ne=wl();return I.useEffect(()=>{const re=k.current;return re?(re.addEventListener("touchstart",fe,{passive:!0}),()=>{re.removeEventListener("touchstart",fe),ne.cancel(),N()}):()=>N()},[N,fe,k,ne]),I.useEffect(()=>{s&&N()},[s,N]),Rt("div",t,{state:_,ref:[n,S,k,$],props:[{"data-base-ui-slider-control":O?"":void 0,onPointerDown(re){const Q=k.current;if(!Q||s||re.defaultPrevented||!Ge(re.target)||re.button!==0)return;const Z=Sl(re,B);if(Z!=null){ie(Z);const ce=ae(Z);if(ce==null)return;bt(L.current[ce.thumbIndex],In(nn(Q)))?re.preventDefault():ne.request(()=>{U(ce.thumbIndex)}),C(!0),b.current!=null||(P(ce.value,Qt(ob,re.nativeEvent,void 0,{activeThumbIndex:ce.thumbIndex})),W.current=Array.isArray(ce.value)?ce.value:[ce.value],ce.didSwap&&U(ce.thumbIndex))}re.nativeEvent.pointerId&&Q.setPointerCapture(re.nativeEvent.pointerId),H.current=0;const le=nn(k.current);le.addEventListener("pointermove",G,{passive:!0}),le.addEventListener("pointerup",J,{once:!0})},tabIndex:-1},i],stateAttributesMapping:bs})});process.env.NODE_ENV!=="production"&&(ex.displayName="SliderControl");const tx=I.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:s}=yl();return Rt("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:bs})});process.env.NODE_ENV!=="production"&&(tx.displayName="SliderTrack");const xs={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function El(e,t,n){return(e-t)*100/(n-t)}const Tl="ArrowUp",Cl="ArrowDown",kl="ArrowLeft",Il="ArrowRight",Ol="Home",Pl="End",BM=new Set([kl,Il]),HM=new Set([Tl,Cl]),WM=new Set([...BM,...HM]);[...WM];const nx=new Set([Tl,Cl,kl,Il,Ol,Pl]);let qM=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function UM(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=TM(),f=I.useRef(-1),[p,h]=I.useState(i??(o===qM.GuessFromOrder?()=>{if(f.current===-1){const v=d.current;d.current+=1,f.current=v}return f.current}:-1)),m=I.useRef(null),g=I.useCallback(v=>{if(m.current=v,p!==-1&&v!==null&&(c.current[p]=v,u)){const b=t!==void 0;u.current[p]=b?t:r?.current?.textContent??v.textContent}},[p,c,u,t,r]);return We(()=>{if(i!=null)return;const v=m.current;if(v)return s(v,n),()=>{a(v)}},[i,s,a,n]),We(()=>{if(i==null)return l(v=>{const b=m.current?v.get(m.current)?.index:null;b!=null&&h(b)})},[i,l,h]),I.useMemo(()=>({ref:g,index:p}),[p,g])}const rx=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(rx.displayName="CSPContext");const GM={disableStyleElements:!1};function YM(){return I.useContext(rx)??GM}function KM(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=Bb(),s=ti(t);return We(()=>{if(!(!n&&!t||i===vn)){if(n){const a=r?.current;Ge(a)&&a.closest("label")!=null?i(t??null):i(o??s)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,s]),o??s}let ZM=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const XM='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',ox="PageUp",ix="PageDown",QM=new Set([Tl,Cl,kl,Il,Ol,Pl,ox,ix]);function JM(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${ii(e[t],r,n)} start range`:`${ii(e[t],r,n)} end range`:n?ii(e[t],r,n):void 0}function si(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const sx=I.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":s,"aria-label":a,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:h,onBlur:m,onFocus:g,onKeyDown:v,tabIndex:b,...x}=t,{nonce:E}=YM(),S=ti(f),{active:O,lastUsedThumbIndex:w,controlRef:C,disabled:P,validation:_,formatOptionsRef:F,handleInputChange:j,inset:L,labelId:A,largeStep:D,locale:z,max:M,min:k,minStepsBetweenValues:R,name:$,orientation:B,pressedInputRef:H,pressedThumbCenterOffsetRef:q,pressedThumbIndexRef:W,renderBeforeHydration:oe,setActive:ae,setIndicatorPosition:ie,state:U,step:G,values:J}=yl(),fe=Zb(),N=c||P,ne=J.length>1,te=B==="vertical",re=fe==="rtl",{setTouched:Q,setFocused:Z,validationMode:le}=Gd(),ce=I.useRef(null),pe=I.useRef(null),ge=ti(),se=KM(),Y=ne?ge:se,V=I.useMemo(()=>({inputId:Y}),[Y]),{ref:X,index:de}=UM({metadata:V}),he=ne?p??de:0,Se=he===J.length-1,be=J[he],Ae=El(be,k,M),[qe,gt]=I.useState(!1),[yt,Bt]=I.useState();vl(()=>gt(!0));const $e=w>=0&&w<J.length?w:-1,K=ke(()=>{const it=C.current,vt=ce.current;if(!it||!vt)return;const st=vt.getBoundingClientRect(),Cn=it.getBoundingClientRect(),ro=te?"height":"width",oo=Cn[ro]-st[ro],Ui=(st[ro]/2+oo*Ae/100)/Cn[ro]*100;Bt(Ui),he===0?ie(Gi=>[Ui,Gi[1]]):Se&&ie(Gi=>[Gi[0],Ui])});We(()=>{L&&queueMicrotask(K)},[K,L]),We(()=>{L&&K()},[K,L,Ae]);const ee=I.useCallback(()=>{const it=te?"bottom":"insetInlineStart",vt=te?"left":"top";let st;return ne?O===he?st=2:$e===he&&(st=1):O===he&&(st=1),L?{"--position":`${yt}%`,visibility:oe&&!qe||yt===void 0?"hidden":void 0,position:"absolute",[it]:"var(--position)",[vt]:"50%",translate:`${(te||!re?-1:1)*50}% ${(te?1:-1)*50}%`,zIndex:st}:Number.isFinite(Ae)?{position:"absolute",[it]:`${Ae}%`,[vt]:"50%",translate:`${(te||!re?-1:1)*50}% ${(te?1:-1)*50}%`,zIndex:st}:xs},[O,he,L,qe,yt,ne,oe,re,$e,Ae,te]);let _e;B==="vertical"&&(_e=re?"vertical-rl":"vertical-lr");const Ze=Ld({"aria-label":typeof u=="function"?u(he):a,"aria-labelledby":l??A,"aria-describedby":s,"aria-orientation":B,"aria-valuenow":be,"aria-valuetext":typeof d=="function"?d(ii(be,z,F.current??void 0),be,he):JM(J,he,F.current??void 0,z),disabled:N,id:Y,max:M,min:k,name:$,onChange(it){j(it.target.valueAsNumber,he,it)},onFocus(){ae(he),Z(!0)},onBlur(){ce.current&&(ae(-1),Q(!0),Z(!1),le==="onBlur"&&_.commit(Wb(be,he,k,M,ne,J)))},onKeyDown(it){if(!QM.has(it.key))return;nx.has(it.key)&&it.stopPropagation();let vt=null;const st=Qb(be,G,k);switch(it.key){case Tl:vt=si(st,it.shiftKey?D:G,1,k,M);break;case Il:vt=si(st,it.shiftKey?D:G,re?-1:1,k,M);break;case Cl:vt=si(st,it.shiftKey?D:G,-1,k,M);break;case kl:vt=si(st,it.shiftKey?D:G,re?1:-1,k,M);break;case ox:vt=si(st,D,1,k,M);break;case ix:vt=si(st,D,-1,k,M);break;case Pl:vt=M,ne&&(vt=Number.isFinite(J[he+1])?J[he+1]-G*R:M);break;case Ol:vt=k,ne&&(vt=Number.isFinite(J[he-1])?J[he-1]+G*R:k);break}vt!==null&&(j(vt,he,it),it.preventDefault())},step:G,style:{...xs,width:"100%",height:"100%",writingMode:_e},tabIndex:b??void 0,type:"range",value:be??""},_.getInputValidationProps),Qe=ms(pe,_.inputRef,h);return Rt("div",t,{state:U,ref:[n,X,ce],props:[{[ZM.index]:he,children:y.jsxs(I.Fragment,{children:[o,y.jsx("input",{ref:Qe,...Ze}),L&&!qe&&oe&&Se&&y.jsx("script",{nonce:E,dangerouslySetInnerHTML:{__html:XM},suppressHydrationWarning:!0})]}),id:S,onBlur:m,onFocus:g,onPointerDown(it){if(W.current=he,ce.current!=null){const vt=B==="horizontal"?"x":"y",st=Xb(ce.current),Cn=(B==="horizontal"?it.clientX:it.clientY)-st[vt];q.current=Cn}pe.current!=null&&H.current!==pe.current&&(H.current=pe.current)},style:ee(),suppressHydrationWarning:oe||void 0,tabIndex:-1},x],stateAttributesMapping:bs})});process.env.NODE_ENV!=="production"&&(sx.displayName="SliderThumb");function eD(e,t,n,r,o,i){const s=n===void 0||t&&r===void 0?"hidden":void 0,a=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":s,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[a]="var(--start-position)",u[l]="var(--relative-size)",u):(u[a]=0,u[l]="var(--start-position)",u)}function tD(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",a={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return a[o]=0,a[i]=`${n}%`,a;const l=r-n;return a[o]=`${n}%`,a[i]=`${l}%`,a}const ax=I.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:s,inset:a,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=yl(),[h,m]=I.useState(!1);vl(()=>m(!0));const g=u==="vertical",v=p.length>1,b=a?eD(g,v,s[0],s[1],d,h):tD(g,v,El(p[0],c,l),El(p[p.length-1],c,l));return Rt("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:bs})});process.env.NODE_ENV!=="production"&&(ax.displayName="SliderIndicator");const Al=e=>{const t=T.useContext(Ho);if(e)return e;if(t)return t.locale||e},nD=e=>{const[t,n]=T.useState(null),r=T.useRef(null);return T.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Ue.number(i)&&n(i);const s=new MutationObserver(a=>{const l=a[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Ue.number(c)?c:null)});return s.observe(o,{attributeFilter:["aria-valuenow"]}),()=>s.disconnect()},[]),y.jsx(_d,{title:"",ref:r,as:sx,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline active:cursor-grabbing",children:t})},rD=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,s=T.useRef(Qo()),a=r||o||[],l=Al();return y.jsx(Ub,{...i,value:o,locale:l,defaultValue:r,children:y.jsxs(ex,{className:Me("relative flex h-5 w-full touch-none select-none items-center",n),children:[y.jsx(tx,{className:"relative h-2 rounded-full grow bg-background",children:y.jsx(ax,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(a)?a.map((c,u)=>y.jsx(nD,{tooltip:t??!1},`${s.current}-${u}`)):null]})})},Lr=e=>{const t=T.useRef(e);return T.useEffect(()=>{t.current=e},[e]),t},oD=T.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const s=T.useId(),[a,l]=T.useState(o.checked??!1),c=a,u=T.useRef(null),d=Lr(o.onChange);T.useImperativeHandle(i,()=>u.current),T.useEffect(()=>{if(u.current!==null&&d.current){const p=m=>{d.current&&d.current(m)},h=u.current;return h.addEventListener("change",p),()=>h?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return y.jsxs("fieldset",{className:Me("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[y.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[y.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||s,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:p=>l(p.target.checked)}),y.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${s}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:y.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),y.jsx("label",{htmlFor:o.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:y.jsx("span",{className:"font-medium text-foreground",children:e})})]}),y.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),ws=T.createContext({});function jn(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const lx=typeof window<"u",_l=lx?T.useLayoutEffect:T.useEffect,Ml=T.createContext(null);function Kd(e,t){e.indexOf(t)===-1&&e.push(t)}function Ss(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function iD([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const lr=(e,t,n)=>n>t?t:n<e?e:n;function Zd(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ai=()=>{},xn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(ai=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Zd(t,n))},xn=(e,t,n)=>{if(!e)throw new Error(Zd(t,n))});const Sr={},cx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ux(e){return typeof e=="object"&&e!==null}const dx=e=>/^0[^.\s]+$/u.test(e);function Xd(e){let t;return()=>(t===void 0&&(t=e()),t)}const On=e=>e,sD=(e,t)=>n=>t(e(n)),Es=(...e)=>e.reduce(sD),li=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Qd{constructor(){this.subscriptions=[]}add(t){return Kd(this.subscriptions,t),()=>Ss(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zn=e=>e*1e3,Pn=e=>e/1e3;function fx(e,t){return t?e*(1e3/t):0}const px=new Set;function Jd(e,t,n){e||px.has(t)||(console.warn(Zd(t,n)),px.add(t))}const aD=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},hx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lD=1e-7,cD=12;function uD(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=hx(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>lD&&++a<cD);return s}function Ts(e,t,n,r){if(e===t&&n===r)return On;const o=i=>uD(i,0,1,e,n);return i=>i===0||i===1?i:hx(o(i),t,r)}const mx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gx=e=>t=>1-e(1-t),yx=Ts(.33,1.53,.69,.99),ef=gx(yx),vx=mx(ef),bx=e=>(e*=2)<1?.5*ef(e):.5*(2-Math.pow(2,-10*(e-1))),tf=e=>1-Math.sin(Math.acos(e)),xx=gx(tf),wx=mx(tf),dD=Ts(.42,0,1,1),fD=Ts(0,0,.58,1),Sx=Ts(.42,0,.58,1),Ex=e=>Array.isArray(e)&&typeof e[0]!="number";function Tx(e,t){return Ex(e)?e[aD(0,e.length,t)]:e}const Cx=e=>Array.isArray(e)&&typeof e[0]=="number",kx={linear:On,easeIn:dD,easeInOut:Sx,easeOut:fD,circIn:tf,circInOut:wx,circOut:xx,backIn:ef,backInOut:vx,backOut:yx,anticipate:bx},pD=e=>typeof e=="string",nf=e=>{if(Cx(e)){xn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return Ts(t,n,r,o)}else if(pD(e))return xn(kx[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),kx[e];return e},Dl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function hD(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const h=f&&o?n:r;return d&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const mD=40;function Ix(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Dl.reduce((x,E)=>(x[E]=hD(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=s,m=()=>{const x=Sr.useManualTiming?o.timestamp:performance.now();n=!1,Sr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,mD),1)),o.timestamp=x,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},g=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:Dl.reduce((x,E)=>{const S=s[E];return x[E]=(O,w=!1,C=!1)=>(n||g(),S.schedule(O,w,C)),x},{}),cancel:x=>{for(let E=0;E<Dl.length;E++)s[Dl[E]].cancel(x)},state:o,steps:s}}const{schedule:xt,cancel:Er,state:Jt,steps:rf}=Ix(typeof requestAnimationFrame<"u"?requestAnimationFrame:On,!0);let Nl;function gD(){Nl=void 0}const an={now:()=>(Nl===void 0&&an.set(Jt.isProcessing||Sr.useManualTiming?Jt.timestamp:performance.now()),Nl),set:e=>{Nl=e,queueMicrotask(gD)}},Ox=e=>t=>typeof t=="string"&&t.startsWith(e),Px=Ox("--"),yD=Ox("var(--"),of=e=>yD(e)?vD.test(e.split("/*")[0].trim()):!1,vD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ax(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ci={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cs={...ci,transform:e=>lr(0,1,e)},Fl={...ci,default:1},ks=e=>Math.round(e*1e5)/1e5,sf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bD(e){return e==null}const xD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,af=(e,t)=>n=>!!(typeof n=="string"&&xD.test(n)&&n.startsWith(e)||t&&!bD(n)&&Object.prototype.hasOwnProperty.call(n,t)),_x=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(sf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},wD=e=>lr(0,255,e),lf={...ci,transform:e=>Math.round(wD(e))},vo={test:af("rgb","red"),parse:_x("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+lf.transform(e)+", "+lf.transform(t)+", "+lf.transform(n)+", "+ks(Cs.transform(r))+")"};function SD(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const cf={test:af("#"),parse:SD,transform:vo.transform},Is=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vr=Is("deg"),cr=Is("%"),Ce=Is("px"),ED=Is("vh"),TD=Is("vw"),Mx={...cr,parse:e=>cr.parse(e)/100,transform:e=>cr.transform(e*100)},ui={test:af("hsl","hue"),parse:_x("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+cr.transform(ks(t))+", "+cr.transform(ks(n))+", "+ks(Cs.transform(r))+")"},$t={test:e=>vo.test(e)||cf.test(e)||ui.test(e),parse:e=>vo.test(e)?vo.parse(e):ui.test(e)?ui.parse(e):cf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?vo.transform(e):ui.transform(e),getAnimatableNone:e=>{const t=$t.parse(e);return t.alpha=0,$t.transform(t)}},CD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function kD(e){return isNaN(e)&&typeof e=="string"&&(e.match(sf)?.length||0)+(e.match(CD)?.length||0)>0}const Dx="number",Nx="color",ID="var",OD="var(",Fx="${}",PD=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Os(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(PD,l=>($t.test(l)?(r.color.push(i),o.push(Nx),n.push($t.parse(l))):l.startsWith(OD)?(r.var.push(i),o.push(ID),n.push(l)):(r.number.push(i),o.push(Dx),n.push(parseFloat(l))),++i,Fx)).split(Fx);return{values:n,split:a,indexes:r,types:o}}function Lx(e){return Os(e).values}function Vx(e){const{split:t,types:n}=Os(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Dx?i+=ks(o[s]):a===Nx?i+=$t.transform(o[s]):i+=o[s]}return i}}const AD=e=>typeof e=="number"?0:$t.test(e)?$t.getAnimatableNone(e):e;function _D(e){const t=Lx(e);return Vx(e)(t.map(AD))}const Rr={test:kD,parse:Lx,createTransformer:Vx,getAnimatableNone:_D};function uf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MD({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=uf(l,a,e+1/3),i=uf(l,a,e),s=uf(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Ll(e,t){return n=>n>0?t:e}const St=(e,t,n)=>e+(t-e)*n,df=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},DD=[cf,vo,ui],ND=e=>DD.find(t=>t.test(e));function Rx(e){const t=ND(e);if(ai(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===ui&&(n=MD(n)),n}const $x=(e,t)=>{const n=Rx(e),r=Rx(t);if(!n||!r)return Ll(e,t);const o={...n};return i=>(o.red=df(n.red,r.red,i),o.green=df(n.green,r.green,i),o.blue=df(n.blue,r.blue,i),o.alpha=St(n.alpha,r.alpha,i),vo.transform(o))},ff=new Set(["none","hidden"]);function FD(e,t){return ff.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function LD(e,t){return n=>St(e,t,n)}function pf(e){return typeof e=="number"?LD:typeof e=="string"?of(e)?Ll:$t.test(e)?$x:$D:Array.isArray(e)?jx:typeof e=="object"?$t.test(e)?$x:VD:Ll}function jx(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>pf(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function VD(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=pf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function RD(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],s=e.indexes[i][r[i]],a=e.values[s]??0;n[o]=a,r[i]++}return n}const $D=(e,t)=>{const n=Rr.createTransformer(t),r=Os(e),o=Os(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?ff.has(e)&&!o.values.length||ff.has(t)&&!r.values.length?FD(e,t):Es(jx(RD(r,o),o.values),n):(ai(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ll(e,t))};function zx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?St(e,t,n):pf(e)(e,t)}const jD=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>xt.update(t,n),stop:()=>Er(t),now:()=>Jt.isProcessing?Jt.timestamp:an.now()}},Bx=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Vl=2e4;function hf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Vl;)t+=n,r=e.next(t);return t>=Vl?1/0:t}function Hx(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(hf(r),Vl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Pn(o)}}const zD=5;function Wx(e,t,n){const r=Math.max(t-zD,0);return fx(n-e(r),t-r)}const Pt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},mf=.001;function BD({duration:e=Pt.duration,bounce:t=Pt.bounce,velocity:n=Pt.velocity,mass:r=Pt.mass}){let o,i;ai(e<=zn(Pt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=lr(Pt.minDamping,Pt.maxDamping,s),e=lr(Pt.minDuration,Pt.maxDuration,Pn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,p=gf(c,s),h=Math.exp(-d);return mf-f/p*h},i=c=>{const d=c*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,h=Math.exp(-d),m=gf(Math.pow(c,2),s);return(-o(c)+mf>0?-1:1)*((f-p)*h)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-mf+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=WD(o,i,a);if(e=zn(e),isNaN(l))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const HD=12;function WD(e,t,n){let r=n;for(let o=1;o<HD;o++)r=r-e(r)/t(r);return r}function gf(e,t){return e*Math.sqrt(1-t*t)}const qD=["duration","bounce"],UD=["stiffness","damping","mass"];function qx(e,t){return t.some(n=>e[n]!==void 0)}function GD(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!qx(e,UD)&&qx(e,qD))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*lr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Pt.mass,stiffness:o,damping:i}}else{const n=BD(e);t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function Ps(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=GD({...n,velocity:-Pn(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),g=s-i,v=Pn(Math.sqrt(l/u)),b=Math.abs(g)<5;r||(r=b?Pt.restSpeed.granular:Pt.restSpeed.default),o||(o=b?Pt.restDelta.granular:Pt.restDelta.default);let x;if(m<1){const S=gf(v,m);x=O=>{const w=Math.exp(-m*v*O);return s-w*((h+m*v*g)/S*Math.sin(S*O)+g*Math.cos(S*O))}}else if(m===1)x=S=>s-Math.exp(-v*S)*(g+(h+v*g)*S);else{const S=v*Math.sqrt(m*m-1);x=O=>{const w=Math.exp(-m*v*O),C=Math.min(S*O,300);return s-w*((h+m*v*g)*Math.sinh(C)+S*g*Math.cosh(C))/S}}const E={calculatedDuration:p&&d||null,next:S=>{const O=x(S);if(p)a.done=S>=d;else{let w=S===0?h:0;m<1&&(w=S===0?zn(h):Wx(x,S,O));const C=Math.abs(w)<=r,P=Math.abs(s-O)<=o;a.done=C&&P}return a.value=a.done?s:O,a},toString:()=>{const S=Math.min(hf(E),Vl),O=Bx(w=>E.next(S*w).value,S,30);return S+"ms "+O},toTransition:()=>{}};return E}Ps.applyToOptions=e=>{const t=Hx(e,100,Ps);return e.ease=t.ease,e.duration=zn(t.duration),e.type="keyframes",e};function yf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=C=>a!==void 0&&C<a||l!==void 0&&C>l,h=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let m=n*t;const g=d+m,v=s===void 0?g:s(g);v!==g&&(m=v-d);const b=C=>-m*Math.exp(-C/r),x=C=>v+b(C),E=C=>{const P=b(C),_=x(C);f.done=Math.abs(P)<=c,f.value=f.done?v:_};let S,O;const w=C=>{p(f.value)&&(S=C,O=Ps({keyframes:[f.value,h(f.value)],velocity:Wx(x,C,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:C=>{let P=!1;return!O&&S===void 0&&(P=!0,E(C),w(C)),S!==void 0&&C>=S?O.next(C-S):(!P&&E(C),f)}}}function YD(e,t,n){const r=[],o=n||Sr.mix||zx,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||On:t;a=Es(l,a)}r.push(a)}return r}function Ux(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(xn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=YD(t,r,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=li(e[d],e[d+1],u);return a[d](f)};return n?u=>c(lr(e[0],e[i-1],u)):c}function Gx(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=li(0,t,r);e.push(St(n,1,o))}}function Yx(e){const t=[0];return Gx(t,e.length-1),t}function KD(e,t){return e.map(n=>n*t)}function ZD(e,t){return e.map(()=>t||Sx).splice(0,e.length-1)}function di({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Ex(r)?r.map(nf):nf(r),i={done:!1,value:t[0]},s=KD(n&&n.length===t.length?n:Yx(t),e),a=Ux(s,t,{ease:Array.isArray(o)?o:ZD(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const XD=e=>e!==null;function vf(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(XD),a=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const QD={decay:yf,inertia:yf,tween:di,keyframes:di,spring:Ps};function Kx(e){typeof e.type=="string"&&(e.type=QD[e.type])}class bf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const JD=e=>e/100;class xf extends bf{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==an.now()&&this.tick(an.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Kx(t);const{type:n=di,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||di;process.env.NODE_ENV!=="production"&&l!==di&&xn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==di&&typeof a[0]!="number"&&(this.mixKeyframes=Es(JD,zx(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=hf(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,E=r;if(d){const C=Math.min(this.currentTime,o)/a;let P=Math.floor(C),_=C%1;!_&&C>=1&&(_=1),_===1&&P--,P=Math.min(P,d+1),P%2&&(f==="reverse"?(_=1-_,p&&(_-=p/a)):f==="mirror"&&(E=s)),x=lr(0,1,_)*a}const S=b?{done:!1,value:u[0]}:E.next(x);i&&(S.value=i(S.value));let{done:O}=S;!b&&l!==null&&(O=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return w&&h!==yf&&(S.value=vf(u,this.options,g,this.speed)),m&&m(S.value),w&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Pn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Pn(t)}get time(){return Pn(this.currentTime)}set time(t){t=zn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(an.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Pn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=jD,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(an.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function eN(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const bo=e=>e*180/Math.PI,wf=e=>{const t=bo(Math.atan2(e[1],e[0]));return Sf(t)},tN={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:wf,rotateZ:wf,skewX:e=>bo(Math.atan(e[1])),skewY:e=>bo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Sf=e=>(e=e%360,e<0&&(e+=360),e),Zx=wf,Xx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Qx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),nN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xx,scaleY:Qx,scale:e=>(Xx(e)+Qx(e))/2,rotateX:e=>Sf(bo(Math.atan2(e[6],e[5]))),rotateY:e=>Sf(bo(Math.atan2(-e[2],e[0]))),rotateZ:Zx,rotate:Zx,skewX:e=>bo(Math.atan(e[4])),skewY:e=>bo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ef(e){return e.includes("scale")?1:0}function Tf(e,t){if(!e||e==="none")return Ef(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=nN,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=tN,o=a}if(!o)return Ef(t);const i=r[t],s=o[1].split(",").map(oN);return typeof i=="function"?i(s):s[i]}const rN=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Tf(n,t)};function oN(e){return parseFloat(e.trim())}const fi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pi=new Set(fi),Jx=e=>e===ci||e===Ce,iN=new Set(["x","y","z"]),sN=fi.filter(e=>!iN.has(e));function aN(e){const t=[];return sN.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $r={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Tf(t,"x"),y:(e,{transform:t})=>Tf(t,"y")};$r.translateX=$r.x,$r.translateY=$r.y;const xo=new Set;let Cf=!1,kf=!1,If=!1;function e0(){if(kf){const e=Array.from(xo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=aN(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{r.getValue(i)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}kf=!1,Cf=!1,xo.forEach(e=>e.complete(If)),xo.clear()}function t0(){xo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(kf=!0)})}function lN(){If=!0,t0(),e0(),If=!1}class Of{constructor(t,n,r,o,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(xo.add(this),Cf||(Cf=!0,xt.read(t0),xt.resolveKeyframes(e0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}eN(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xo.delete(this)}cancel(){this.state==="scheduled"&&(xo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const cN=e=>e.startsWith("--");function uN(e,t,n){cN(t)?e.style.setProperty(t,n):e.style[t]=n}const dN=Xd(()=>window.ScrollTimeline!==void 0),fN={};function pN(e,t){const n=Xd(e);return()=>fN[t]??n()}const n0=pN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),As=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,r0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:As([0,.65,.55,1]),circOut:As([.55,0,1,.45]),backIn:As([.31,.01,.66,-.59]),backOut:As([.33,1.53,.69,.99])};function o0(e,t){if(e)return typeof e=="function"?n0()?Bx(e,t):"ease-out":Cx(e)?As(e):Array.isArray(e)?e.map(n=>o0(n,t)||r0.easeOut):r0[e]}function hN(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=o0(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function Pf(e){return typeof e=="function"&&"applyToOptions"in e}function mN({type:e,...t}){return Pf(e)&&n0()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class gN extends bf{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,xn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=mN(t);this.animation=hN(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=vf(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):uN(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Pn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Pn(t)}get time(){return Pn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=zn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&dN()?(this.animation.timeline=t,On):n(this)}}const i0={anticipate:bx,backInOut:vx,circInOut:wx};function yN(e){return e in i0}function vN(e){typeof e.ease=="string"&&yN(e.ease)&&(e.ease=i0[e.ease])}const Af=10;class bN extends gN{constructor(t){vN(t),Kx(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new xf({...s,autoplay:!1}),l=Math.max(Af,an.now()-this.startTime),c=lr(0,Af,l-Af);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const s0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Rr.test(e)||e==="0")&&!e.startsWith("url("));function xN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function wN(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=s0(o,t),a=s0(i,t);return ai(s===a,`You are trying to animate ${t} from "${o}" to "${i}". "${s?i:o}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:xN(e)||(n==="spring"||Pf(n))&&r}function _f(e){e.duration=0,e.type="keyframes"}const SN=new Set(["opacity","clipPath","filter","transform"]),EN=Xd(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function TN(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return EN()&&n&&SN.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&s!=="inertia"}const CN=40;class kN extends bf{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=an.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||Of;this.keyframeResolver=new p(a,(h,m,g)=>this.onKeyframesResolved(h,m,f,!g),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=an.now(),wN(t,i,s,a)||((Sr.instantAnimations||!l)&&u?.(vf(t,r,n)),t[0]=t[t.length-1],_f(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>CN?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&TN(f),h=f.motionValue?.owner?.current,m=p?new bN({...f,element:h}):new xf(f);m.finished.then(()=>{this.notifyFinished()}).catch(On),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),lN()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class IN{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return a0(this.animations,"duration")}get iterationDuration(){return a0(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function a0(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class ON extends IN{then(t,n){return this.finished.finally(t).then(()=>{})}}function l0(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}const PN=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function AN(e){const t=PN.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const _N=4;function c0(e,t,n=1){xn(n<=_N,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=AN(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return cx(s)?parseFloat(s):s}return of(o)?c0(o,t,n+1):o}const MN={type:"spring",stiffness:500,damping:25,restSpeed:10},DN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),NN={type:"keyframes",duration:.8},FN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},LN=(e,{keyframes:t})=>t.length>2?NN:pi.has(e)?e.startsWith("scale")?DN(t[1]):MN:FN,VN=e=>e!==null;function RN(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(VN),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function Mf(e,t){return e?.[t]??e?.default??e}function $N({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Df=(e,t,n,r={},o,i)=>s=>{const a=Mf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-zn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};$N(a)||Object.assign(u,LN(e,u)),u.duration&&(u.duration=zn(u.duration)),u.repeatDelay&&(u.repeatDelay=zn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(_f(u),u.delay===0&&(d=!0)),(Sr.instantAnimations||Sr.skipAnimations)&&(d=!0,_f(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=RN(u.keyframes,a);if(f!==void 0){xt.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new xf(u):new kN(u)};function u0(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Nf(e,t,n,r){if(typeof t=="function"){const[o,i]=u0(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=u0(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function hi(e,t,n){const r=e.getProps();return Nf(r,t,n!==void 0?n:r.custom,e)}const d0=new Set(["width","height","top","left","right","bottom",...fi]),f0=30,jN=e=>!isNaN(parseFloat(e)),_s={current:void 0};class zN{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=an.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=an.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=jN(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Jd(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Qd);const r=this.events[t].add(n);return t==="change"?()=>{r(),xt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return _s.current&&_s.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=an.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>f0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,f0);return fx(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wo(e,t){return new zN(e,t)}const Ff=e=>Array.isArray(e);function BN(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wo(n))}function HN(e){return Ff(e)?e[e.length-1]||0:e}function WN(e,t){const n=hi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=HN(i[s]);BN(e,s,a)}}const Wt=e=>!!(e&&e.getVelocity);function qN(e){return!!(Wt(e)&&e.add)}function Lf(e,t){const n=e.getValue("willChange");if(qN(n))return n.add(t);if(!n&&Sr.WillChange){const r=new Sr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Vf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const p0="data-"+Vf("framerAppearId");function h0(e){return e.props[p0]}function UN({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Rf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&UN(c,u))continue;const p={delay:n,...Mf(i||{},u)},h=d.get();if(h!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===h&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const v=h0(e);if(v){const b=window.MotionHandoffAnimation(v,u,xt);b!==null&&(p.startTime=b,m=!0)}}Lf(e,u),d.start(Df(u,d,f,e.shouldReduceMotion&&d0.has(u)?{type:!1}:p,e,m));const g=d.animation;g&&l.push(g)}return s&&Promise.all(l).then(()=>{xt.update(()=>{s&&WN(e,s)})}),l}function $f(e,t,n={}){const r=hi(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Rf(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return GN(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function GN(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push($f(l,t,{...s,delay:n+(typeof r=="function"?0:r)+l0(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function YN(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>$f(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=$f(e,t,n);else{const o=typeof t=="function"?hi(e,t,n.custom):t;r=Promise.all(Rf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const KN={test:e=>e==="auto",parse:e=>e},m0=e=>t=>t.test(e),g0=[ci,Ce,cr,Vr,TD,ED,KN],y0=e=>g0.find(m0(e));function ZN(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||dx(e):!0}const XN=new Set(["brightness","contrast","saturate","opacity"]);function QN(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(sf)||[];if(!r)return e;const o=n.replace(r,"");let i=XN.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const JN=/\b([a-z-]*)\(.*?\)/gu,jf={...Rr,getAnimatableNone:e=>{const t=e.match(JN);return t?t.map(QN).join(" "):e}},v0={...ci,transform:Math.round},zf={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,inset:Ce,insetBlock:Ce,insetBlockStart:Ce,insetBlockEnd:Ce,insetInline:Ce,insetInlineStart:Ce,insetInlineEnd:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,paddingBlock:Ce,paddingBlockStart:Ce,paddingBlockEnd:Ce,paddingInline:Ce,paddingInlineStart:Ce,paddingInlineEnd:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,marginBlock:Ce,marginBlockStart:Ce,marginBlockEnd:Ce,marginInline:Ce,marginInlineStart:Ce,marginInlineEnd:Ce,backgroundPositionX:Ce,backgroundPositionY:Ce,...{rotate:Vr,rotateX:Vr,rotateY:Vr,rotateZ:Vr,scale:Fl,scaleX:Fl,scaleY:Fl,scaleZ:Fl,skew:Vr,skewX:Vr,skewY:Vr,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:Cs,originX:Mx,originY:Mx,originZ:Ce},zIndex:v0,fillOpacity:Cs,strokeOpacity:Cs,numOctaves:v0},e2={...zf,color:$t,backgroundColor:$t,outlineColor:$t,fill:$t,stroke:$t,borderColor:$t,borderTopColor:$t,borderRightColor:$t,borderBottomColor:$t,borderLeftColor:$t,filter:jf,WebkitFilter:jf},b0=e=>e2[e];function x0(e,t){let n=b0(e);return n!==jf&&(n=Rr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const t2=new Set(["auto","none","0"]);function n2(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!t2.has(i)&&Os(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=x0(n,o)}class r2 extends Of{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),of(d))){const f=c0(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!d0.has(r)||t.length!==2)return;const[o,i]=t,s=y0(o),a=y0(i),l=Ax(o),c=Ax(i);if(l!==c&&$r[r]){this.needsMeasurement=!0;return}if(s!==a)if(Jx(s)&&Jx(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else $r[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||ZN(t[o]))&&r.push(o);r.length&&n2(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$r[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=$r[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function w0(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const S0=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Bf(e){return ux(e)&&"offsetHeight"in e}const{schedule:Hf}=Ix(queueMicrotask,!1),Bn={x:!1,y:!1};function E0(){return Bn.x||Bn.y}function o2(e){return e==="x"||e==="y"?Bn[e]?null:(Bn[e]=!0,()=>{Bn[e]=!1}):Bn.x||Bn.y?null:(Bn.x=Bn.y=!0,()=>{Bn.x=Bn.y=!1})}function T0(e,t){const n=w0(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function C0(e){return!(e.pointerType==="touch"||E0())}function i2(e,t,n={}){const[r,o,i]=T0(e,n),s=a=>{if(!C0(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{C0(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",s,o)}),i}const k0=(e,t)=>t?e===t?!0:k0(e,t.parentElement):!1,Wf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,s2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function I0(e){return s2.has(e.tagName)||e.isContentEditable===!0}const Rl=new WeakSet;function O0(e){return t=>{t.key==="Enter"&&e(t)}}function qf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const a2=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=O0(()=>{if(Rl.has(n))return;qf(n,"down");const o=O0(()=>{qf(n,"up")}),i=()=>qf(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function P0(e){return Wf(e)&&!E0()}function l2(e,t,n={}){const[r,o,i]=T0(e,n),s=a=>{const l=a.currentTarget;if(!P0(a))return;Rl.add(l);const c=t(l,a),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Rl.has(l)&&Rl.delete(l),P0(p)&&typeof c=="function"&&c(p,{success:h})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||k0(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),Bf(a)&&(a.addEventListener("focus",c=>a2(c,o)),!I0(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Uf(e){return ux(e)&&"ownerSVGElement"in e}function A0(e){return Uf(e)&&e.tagName==="svg"}function c2(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function u2(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:c2(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=nf(r)(l/c)*c}return t+l}}function d2(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=Ux(o,i,s);return t?a(r):a}const f2=[...g0,$t,Rr],p2=e=>f2.find(m0(e)),_0=()=>({translate:0,scale:1,origin:0,originPoint:0}),mi=()=>({x:_0(),y:_0()}),M0=()=>({min:0,max:0}),jt=()=>({x:M0(),y:M0()}),Gf={current:null},D0={current:!1},h2=typeof window<"u";function m2(){if(D0.current=!0,!!h2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gf.current=e.matches;e.addEventListener("change",t),t()}else Gf.current=!1}const Ms=new WeakMap;function $l(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ds(e){return typeof e=="string"||Array.isArray(e)}const Yf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kf=["initial",...Yf];function jl(e){return $l(e.animate)||Kf.some(t=>Ds(e[t]))}function N0(e){return!!(jl(e)||e.variants)}function g2(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Wt(o))e.addValue(r,o);else if(Wt(i))e.addValue(r,wo(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,wo(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const F0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zl={};function L0(e){zl=e}function y2(){return zl}class V0{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Of,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=an.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,xt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=jl(n),this.isVariantNode=N0(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&Wt(p)&&p.set(l[f])}}mount(t){this.current=t,Ms.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(D0.current||m2(),this.shouldReduceMotion=Gf.current),process.env.NODE_ENV!=="production"&&Jd(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Er(this.notifyUpdate),Er(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=pi.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&xt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zl){const n=zl[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):jt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<F0.length;r++){const o=F0[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=g2(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=wo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(cx(r)||dx(r))?r=parseFloat(r):!p2(r)&&Rr.test(n)&&(r=x0(t,n)),this.setBaseTarget(t,Wt(r)?r.get():r)),Wt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Nf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Wt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Qd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Hf.render(this.render)}}class R0 extends V0{constructor(){super(...arguments),this.KeyframeResolver=r2}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function $0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function v2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function b2(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zf(e){return e===void 0||e===1}function Xf({scale:e,scaleX:t,scaleY:n}){return!Zf(e)||!Zf(t)||!Zf(n)}function So(e){return Xf(e)||j0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function j0(e){return z0(e.x)||z0(e.y)}function z0(e){return e&&e!=="0%"}function Bl(e,t,n){const r=e-n,o=t*r;return n+o}function B0(e,t,n,r,o){return o!==void 0&&(e=Bl(e,o,r)),Bl(e,n,r)+t}function Qf(e,t=0,n=1,r,o){e.min=B0(e.min,t,n,r,o),e.max=B0(e.max,t,n,r,o)}function H0(e,{x:t,y:n}){Qf(e.x,t.translate,t.scale,t.originPoint),Qf(e.y,n.translate,n.scale,n.originPoint)}const W0=.999999999999,q0=1.0000000000001;function x2(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&yi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,H0(e,s)),r&&So(i.latestValues)&&yi(e,i.latestValues))}t.x<q0&&t.x>W0&&(t.x=1),t.y<q0&&t.y>W0&&(t.y=1)}function gi(e,t){e.min=e.min+t,e.max=e.max+t}function U0(e,t,n,r,o=.5){const i=St(e.min,e.max,o);Qf(e,t,n,i,r)}function yi(e,t){U0(e.x,t.x,t.scaleX,t.scale,t.originX),U0(e.y,t.y,t.scaleY,t.scale,t.originY)}function G0(e,t){return $0(b2(e.getBoundingClientRect(),t))}function w2(e,t,n){const r=G0(e,n),{scroll:o}=t;return o&&(gi(r.x,o.offset.x),gi(r.y,o.offset.y)),r}const S2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},E2=fi.length;function T2(e,t,n){let r="",o=!0;for(let i=0;i<E2;i++){const s=fi[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(s.startsWith("scale")?1:0);else{const c=parseFloat(a);l=s.startsWith("scale")?c===1:c===0}if(!l||n){const c=S0(a,zf[s]);if(!l){o=!1;const u=S2[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Jf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(pi.has(l)){s=!0;continue}else if(Px(l)){o[l]=c;continue}else{const u=S0(c,zf[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=T2(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function Y0(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function K0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ns={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ce.test(e))e=parseFloat(e);else return e;const n=K0(e,t.target.x),r=K0(e,t.target.y);return`${n}% ${r}%`}},C2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Rr.parse(e);if(o.length>5)return r;const i=Rr.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=St(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},ep={borderRadius:{...Ns,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ns,borderTopRightRadius:Ns,borderBottomLeftRadius:Ns,borderBottomRightRadius:Ns,boxShadow:C2};function Z0(e,{layout:t,layoutId:n}){return pi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ep[e]||e==="opacity")}function tp(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const s in r)(Wt(r[s])||o&&Wt(o[s])||Z0(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}function k2(e){return window.getComputedStyle(e)}class X0 extends R0{constructor(){super(...arguments),this.type="html",this.renderInstance=Y0}readValueFromInstance(t,n){if(pi.has(n))return this.projection?.isProjecting?Ef(n):rN(t,n);{const r=k2(t),o=(Px(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return G0(t,n)}build(t,n,r){Jf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tp(t,n,r)}}function I2(e,t){return e in t}class O2 extends V0{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(I2(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return jt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const P2={offset:"stroke-dashoffset",array:"stroke-dasharray"},A2={offset:"strokeDashoffset",array:"strokeDasharray"};function _2(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?P2:A2;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const M2=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Q0(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Jf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of M2)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&_2(d,o,i,s,!1)}const J0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ew=e=>typeof e=="string"&&e.toLowerCase()==="svg";function D2(e,t,n,r){Y0(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(J0.has(o)?o:Vf(o),t.attrs[o])}function tw(e,t,n){const r=tp(e,t,n);for(const o in e)if(Wt(e[o])||Wt(t[o])){const i=fi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class nw extends R0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=jt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(pi.has(n)){const r=b0(n);return r&&r.default||0}return n=J0.has(n)?n:Vf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return tw(t,n,r)}build(t,n,r){Q0(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){D2(t,n,r,o)}mount(t){this.isSVGTag=ew(t.tagName),super.mount(t)}}const N2=Kf.length;function rw(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?rw(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<N2;n++){const r=Kf[n],o=e.props[r];(Ds(o)||o===!1)&&(t[r]=o)}return t}function ow(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const F2=[...Yf].reverse(),L2=Yf.length;function V2(e){return t=>Promise.all(t.map(({animation:n,options:r})=>YN(e,n,r)))}function R2(e){let t=V2(e),n=iw(),r=!0;const o=l=>(c,u)=>{const d=hi(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...h}=d;c={...c,...h,...p}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=rw(e.parent)||{},d=[],f=new Set;let p={},h=1/0;for(let g=0;g<L2;g++){const v=F2[g],b=n[v],x=c[v]!==void 0?c[v]:u[v],E=Ds(x),S=v===l?b.isActive:null;S===!1&&(h=g);let O=x===u[v]&&x!==c[v]&&E;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),b.protectedKeys={...p},!b.isActive&&S===null||!x&&!b.prevProp||$l(x)||typeof x=="boolean")continue;const w=$2(b.prevProp,x);let C=w||v===l&&b.isActive&&!O&&E||g>h&&E,P=!1;const _=Array.isArray(x)?x:[x];let F=_.reduce(o(v),{});S===!1&&(F={});const{prevResolvedValues:j={}}=b,L={...j,...F},A=M=>{C=!0,f.has(M)&&(P=!0,f.delete(M)),b.needsAnimating[M]=!0;const k=e.getValue(M);k&&(k.liveStyle=!1)};for(const M in L){const k=F[M],R=j[M];if(p.hasOwnProperty(M))continue;let $=!1;Ff(k)&&Ff(R)?$=!ow(k,R):$=k!==R,$?k!=null?A(M):f.add(M):k!==void 0&&f.has(M)?A(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=F,b.isActive&&(p={...p,...F}),r&&e.blockInitialAnimation&&(C=!1);const D=O&&w;C&&(!D||P)&&d.push(..._.map(M=>{const k={type:v};if(typeof M=="string"&&r&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:R}=e,$=hi(R,M);if(R.enteringChildren&&$){const{delayChildren:B}=$.transition||{};k.delay=l0(R.enteringChildren,e,B)}}return{animation:M,options:k}}))}if(f.size){const g={};if(typeof c.initial!="boolean"){const v=hi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(g.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),g[v]=b??null}),d.push({animation:g})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=iw()}}}function $2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ow(t,e):!1}function Eo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iw(){return{animate:Eo(!0),whileInView:Eo(),whileHover:Eo(),whileTap:Eo(),whileDrag:Eo(),whileFocus:Eo(),exit:Eo()}}function sw(e,t){e.min=t.min,e.max=t.max}function Hn(e,t){sw(e.x,t.x),sw(e.y,t.y)}function aw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const lw=1e-4,j2=1-lw,z2=1+lw,cw=.01,B2=0-cw,H2=0+cw;function ln(e){return e.max-e.min}function W2(e,t,n){return Math.abs(e-t)<=n}function uw(e,t,n,r=.5){e.origin=r,e.originPoint=St(t.min,t.max,e.origin),e.scale=ln(n)/ln(t),e.translate=St(n.min,n.max,e.origin)-e.originPoint,(e.scale>=j2&&e.scale<=z2||isNaN(e.scale))&&(e.scale=1),(e.translate>=B2&&e.translate<=H2||isNaN(e.translate))&&(e.translate=0)}function Fs(e,t,n,r){uw(e.x,t.x,n.x,r?r.originX:void 0),uw(e.y,t.y,n.y,r?r.originY:void 0)}function dw(e,t,n){e.min=n.min+t.min,e.max=e.min+ln(t)}function q2(e,t,n){dw(e.x,t.x,n.x),dw(e.y,t.y,n.y)}function fw(e,t,n){e.min=t.min-n.min,e.max=e.min+ln(t)}function Hl(e,t,n){fw(e.x,t.x,n.x),fw(e.y,t.y,n.y)}function pw(e,t,n,r,o){return e-=t,e=Bl(e,1/n,r),o!==void 0&&(e=Bl(e,1/o,r)),e}function U2(e,t=0,n=1,r=.5,o,i=e,s=e){if(cr.test(t)&&(t=parseFloat(t),t=St(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=St(i.min,i.max,r);e===i&&(a-=t),e.min=pw(e.min,t,n,a,o),e.max=pw(e.max,t,n,a,o)}function hw(e,t,[n,r,o],i,s){U2(e,t[n],t[r],t[o],t.scale,i,s)}const G2=["x","scaleX","originX"],Y2=["y","scaleY","originY"];function mw(e,t,n,r){hw(e.x,t,G2,n?n.x:void 0,r?r.x:void 0),hw(e.y,t,Y2,n?n.y:void 0,r?r.y:void 0)}function gw(e){return e.translate===0&&e.scale===1}function yw(e){return gw(e.x)&&gw(e.y)}function vw(e,t){return e.min===t.min&&e.max===t.max}function K2(e,t){return vw(e.x,t.x)&&vw(e.y,t.y)}function bw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function xw(e,t){return bw(e.x,t.x)&&bw(e.y,t.y)}function ww(e){return ln(e.x)/ln(e.y)}function Sw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function An(e){return[e("x"),e("y")]}function Z2(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Ew=["TopLeft","TopRight","BottomLeft","BottomRight"],X2=Ew.length,Tw=e=>typeof e=="string"?parseFloat(e):e,Cw=e=>typeof e=="number"||Ce.test(e);function Q2(e,t,n,r,o,i){o?(e.opacity=St(0,n.opacity??1,J2(r)),e.opacityExit=St(t.opacity??1,0,eF(r))):i&&(e.opacity=St(t.opacity??1,n.opacity??1,r));for(let s=0;s<X2;s++){const a=`border${Ew[s]}Radius`;let l=kw(t,a),c=kw(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Cw(l)===Cw(c)?(e[a]=Math.max(St(Tw(l),Tw(c),r),0),(cr.test(c)||cr.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=St(t.rotate||0,n.rotate||0,r))}function kw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const J2=Iw(0,.5,xx),eF=Iw(.5,.95,On);function Iw(e,t,n){return r=>r<e?0:r>t?1:n(li(e,t,r))}function Ow(e,t,n){const r=Wt(e)?e:wo(e);return r.start(Df("",r,t,n)),r.animation}function Ls(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const tF=(e,t)=>e.depth-t.depth;class nF{constructor(){this.children=[],this.isDirty=!1}add(t){Kd(this.children,t),this.isDirty=!0}remove(t){Ss(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(tF),this.isDirty=!1,this.children.forEach(t)}}function rF(e,t){const n=an.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Er(r),e(i-t))};return xt.setup(r,!0),()=>Er(r)}function Wl(e){return Wt(e)?e.get():e}class oF{constructor(){this.members=[]}add(t){Kd(this.members,t),t.scheduleRender()}remove(t){if(Ss(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ql={hasAnimatedSinceResize:!0,hasEverUpdated:!1},np=["","X","Y","Z"],iF=1e3;let sF=0;function rp(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Pw(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=h0(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",xt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Pw(r)}function Aw({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=sF++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(cF),this.nodes.forEach(pF),this.nodes.forEach(hF),this.nodes.forEach(uF)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new nF)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Qd),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Uf(s)&&!A0(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;xt.read(()=>{d=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=rF(f,250),ql.hasAnimatedSinceResize&&(ql.hasAnimatedSinceResize=!1,this.nodes.forEach(Dw)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||c.getDefaultTransition()||bF,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!xw(this.targetLayout,p),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Mf(h,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||Dw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Er(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(mF),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(_w);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Mw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(fF),this.nodes.forEach(aF),this.nodes.forEach(lF)):this.nodes.forEach(Mw),this.clearAllSnapshots();const a=an.now();Jt.delta=lr(0,1e3/60,a-Jt.timestamp),Jt.timestamp=a,Jt.isProcessing=!0,rf.update.process(Jt),rf.preRender.process(Jt),rf.render.process(Jt),Jt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dF),this.sharedNodes.forEach(gF)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ln(this.snapshot.measuredBox.x)&&!ln(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=jt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!yw(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||So(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),xF(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return jt();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(wF))){const{scroll:c}=this.root;c&&(gi(a.x,c.offset.x),gi(a.y,c.offset.y))}return a}removeElementScroll(s){const a=jt();if(Hn(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Hn(a,s),gi(a.x,u.offset.x),gi(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=jt();Hn(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&yi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),So(u.latestValues)&&yi(l,u.latestValues)}return So(this.latestValues)&&yi(l,this.latestValues),l}removeTransform(s){const a=jt();Hn(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!So(c.latestValues))continue;Xf(c.latestValues)&&c.updateSnapshot();const u=jt(),d=c.measurePageBox();Hn(u,d),mw(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return So(this.latestValues)&&mw(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Jt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Jt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=jt(),this.targetWithTransforms=jt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),q2(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Hn(this.target,this.layout.layoutBox),H0(this.target,this.targetDelta)):Hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Xf(this.parent.latestValues)||j0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=jt(),this.relativeTargetOrigin=jt(),Hl(this.relativeTargetOrigin,a,l),Hn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Jt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Hn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;x2(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=jt());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(aw(this.prevProjectionDelta.x,this.projectionDelta.x),aw(this.prevProjectionDelta.y,this.projectionDelta.y)),Fs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Sw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Sw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=mi(),this.projectionDelta=mi(),this.projectionDeltaWithTransform=mi()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=mi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=jt(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,g=this.getStack(),v=!g||g.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(vF));this.animationProgress=0;let x;this.mixTargetDelta=E=>{const S=E/1e3;Nw(d.x,s.x,S),Nw(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yF(this.relativeTarget,this.relativeTargetOrigin,f,S),x&&K2(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=jt()),Hn(x,this.relativeTarget)),m&&(this.animationValues=u,Q2(u,c,this.latestValues,S,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Er(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xt.update(()=>{ql.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wo(0)),this.currentAnimation=Ow(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(iF),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&$w(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||jt();const d=ln(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=ln(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Hn(a,l),yi(a,u),Fs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new oF),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&rp("z",s,c,this.animationValues);for(let u=0;u<np.length;u++)rp(`rotate${np[u]}`,s,c,this.animationValues),rp(`skew${np[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Wl(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Wl(a?.pointerEvents)||""),this.hasProjected&&!So(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Z2(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const h in ep){if(u[h]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:v}=ep[h],b=d==="none"?u[h]:m(u[h],c);if(g){const x=g.length;for(let E=0;E<x;E++)s[g[E]]=b}else v?this.options.visualElement.renderState.vars[h]=b:s[h]=b}this.options.layoutId&&(s.pointerEvents=c===this?Wl(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(_w),this.root.sharedNodes.clear()}}}function aF(e){e.updateLayout()}function lF(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?An(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=ln(d);d.min=n[u].min,d.max=d.min+f}):$w(o,t.layoutBox,n)&&An(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=ln(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const s=mi();Fs(s,n,t.layoutBox);const a=mi();i?Fs(a,e.applyTransform(r,!0),t.measuredBox):Fs(a,n,t.layoutBox);const l=!yw(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=jt();Hl(p,t.layoutBox,d.layoutBox);const h=jt();Hl(h,n,f.layoutBox),xw(p,h)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function cF(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function uF(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dF(e){e.clearSnapshot()}function _w(e){e.clearMeasurements()}function Mw(e){e.isLayoutDirty=!1}function fF(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pF(e){e.resolveTargetDelta()}function hF(e){e.calcProjection()}function mF(e){e.resetSkewAndRotation()}function gF(e){e.removeLeadSnapshot()}function Nw(e,t,n){e.translate=St(t.translate,0,n),e.scale=St(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fw(e,t,n,r){e.min=St(t.min,n.min,r),e.max=St(t.max,n.max,r)}function yF(e,t,n,r){Fw(e.x,t.x,n.x,r),Fw(e.y,t.y,n.y,r)}function vF(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bF={duration:.45,ease:[.4,0,.1,1]},Lw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vw=Lw("applewebkit/")&&!Lw("chrome/")?Math.round:On;function Rw(e){e.min=Vw(e.min),e.max=Vw(e.max)}function xF(e){Rw(e.x),Rw(e.y)}function $w(e,t,n){return e==="position"||e==="preserve-aspect"&&!W2(ww(t),ww(n),.2)}function wF(e){return e!==e.root&&e.scroll?.wasRoot}const SF=Aw({attachResizeListener:(e,t)=>Ls(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),EF=e=>!e.isLayoutDirty&&e.willUpdate(!1);function jw(){const e=new Set,t=new WeakMap,n=()=>e.forEach(EF);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const op={current:void 0},zw=Aw({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!op.current){const e=new SF({});e.mount(window),e.setOptions({layoutScroll:!0}),op.current=e}return op.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),vi=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Bw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function TF(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Bw(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Bw(e[o],null)}}}}function CF(...e){return I.useCallback(TF(...e),e)}class kF extends I.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Bf(r)&&r.offsetWidth||0,i=Bf(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function IF({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){const i=T.useId(),s=T.useRef(null),a=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=T.useContext(vi),c=e.props?.ref??e?.ref,u=CF(s,c);return T.useInsertionEffect(()=>{const{width:d,height:f,top:p,left:h,right:m,bottom:g}=a.current;if(t||!s.current||!d||!f)return;const v=n==="left"?`left: ${h}`:`right: ${m}`,b=r==="bottom"?`bottom: ${g}`:`top: ${p}`;s.current.dataset.motionPopId=i;const x=document.createElement("style");l&&(x.nonce=l);const E=o??document.head;return E.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
10
7
|
[data-motion-pop-id="${i}"] {
|
|
11
8
|
position: absolute !important;
|
|
12
9
|
width: ${d}px !important;
|
|
13
10
|
height: ${f}px !important;
|
|
14
|
-
${
|
|
11
|
+
${v}px !important;
|
|
15
12
|
${b}px !important;
|
|
16
13
|
}
|
|
17
|
-
`),()=>{E.contains(x)&&E.removeChild(x)}},[t]),v.jsx(yF,{isPresent:t,childRef:s,sizeRef:a,children:k.cloneElement(e,{ref:u})})}const xF=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,anchorY:l,root:c})=>{const u=Pn(wF),d=T.useId();let f=!0,p=T.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:g=>{u.set(g,!0);for(const m of u.values())if(!m)return;r&&r()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,r]);return i&&f&&(p={...p}),T.useMemo(()=>{u.forEach((g,m)=>u.set(m,!1))},[n]),k.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),s==="popLayout"&&(e=v.jsx(bF,{isPresent:n,anchorX:a,anchorY:l,root:c,children:e})),v.jsx(cl.Provider,{value:p,children:e})};function wF(){return new Map}function yw(e=!0){const t=T.useContext(cl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=T.useId();T.useEffect(()=>{if(e)return o(i)},[e]);const s=T.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const El=e=>e.key||"";function bw(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const Dn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=yw(s),f=T.useMemo(()=>bw(e),[e]),p=s&&!u?[]:f.map(El),g=T.useRef(!0),m=T.useRef(f),h=Pn(()=>new Map),y=T.useRef(new Set),[b,x]=T.useState(f),[E,S]=T.useState(f);ll(()=>{g.current=!1,m.current=f;for(let C=0;C<E.length;C++){const A=El(E[C]);p.includes(A)?(h.delete(A),y.current.delete(A)):h.get(A)!==!0&&h.set(A,!1)}},[E,p.length,p.join("-")]);const I=[];if(f!==b){let C=[...f];for(let A=0;A<E.length;A++){const O=E[A],N=El(O);p.includes(N)||(C.splice(A,0,O),I.push(O))}return i==="wait"&&I.length&&(C=I),S(bw(C)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&E.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=T.useContext(ss);return v.jsx(v.Fragment,{children:E.map(C=>{const A=El(C),O=s&&!u?!1:f===E||p.includes(A),N=()=>{if(y.current.has(A))return;if(y.current.add(A),h.has(A))h.set(A,!0);else return;let L=!0;h.forEach(j=>{j||(L=!1)}),L&&(w?.(),S(m.current),s&&d?.(),r&&r())};return v.jsx(xF,{isPresent:O,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:O?void 0:N,anchorX:a,anchorY:l,children:C},A)})})},SF=T.createContext(null);function EF(){const e=T.useRef(!1);return ll(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function TF(){const e=EF(),[t,n]=T.useState(0),r=T.useCallback(()=>{e.current&&n(t+1)},[t]);return[T.useCallback(()=>ut.postRender(r),[r]),t]}const xw=e=>e===!0,CF=e=>xw(e===!0)||e==="id",kF=({children:e,id:t,inherit:n=!0})=>{const r=T.useContext(ss),o=T.useContext(SF),[i,s]=TF(),a=T.useRef(null),l=r.id||o;a.current===null&&(CF(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:xw(n)&&r.group||mw()});const c=T.useMemo(()=>({...a.current,forceRender:i}),[s]);return v.jsx(ss.Provider,{value:c,children:e})},ww=T.createContext({strict:!1}),Sw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ew=!1;function IF(){if(Ew)return;const e={};for(const t in Sw)e[t]={isEnabled:n=>Sw[t].some(r=>!!n[r])};d0(e),Ew=!0}function Tw(){return IF(),c2()}function PF(e){const t=Tw();for(const n in e)t[n]={...t[n],...e[n]};d0(t)}const AF=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Tl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||AF.has(e)}let Cw=e=>!Tl(e);function kw(e){typeof e=="function"&&(Cw=t=>t.startsWith("on")?!Tl(t):e(t))}try{kw(require("@emotion/is-prop-valid").default)}catch{}function OF(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Cw(o)||n===!0&&Tl(o)||!t&&!Tl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Bf({children:e,isValidProp:t,...n}){t&&kw(t),n={...T.useContext(si),...n},n.isStatic=Pn(()=>n.isStatic);const r=T.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return v.jsx(si.Provider,{value:r,children:e})}const Cl=T.createContext({});function _F(e,t){if(vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ys(n)?n:void 0,animate:ys(r)?r:void 0}}return e.inherit!==!1?t:{}}function DF(e){const{initial:t,animate:n}=_F(e,T.useContext(Cl));return T.useMemo(()=>({initial:t,animate:n}),[Iw(t),Iw(n)])}function Iw(e){return Array.isArray(e)?e.join(" "):e}const Hf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pw(e,t,n){for(const r in t)!Lt(t[r])&&!C0(r,n)&&(e[r]=t[r])}function MF({transformTemplate:e},t){return T.useMemo(()=>{const n=Hf();return Lf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function NF(e,t){const n=e.style||{},r={};return Pw(r,n,e),Object.assign(r,MF(e,t)),r}function FF(e,t){const n={},r=NF(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Aw=()=>({...Hf(),attrs:{}});function LF(e,t,n,r){const o=T.useMemo(()=>{const i=Aw();return I0(i,t,A0(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Pw(i,e.style,e),o.style={...i,...o.style}}return o}const $F=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Wf(e){return typeof e!="string"||e.includes("-")?!1:!!($F.indexOf(e)>-1||/[A-Z]/u.test(e))}function VF(e,t,n,{latestValues:r},o,i=!1,s){const l=(s??Wf(e)?LF:FF)(t,r,o,e),c=OF(t,typeof e=="string",i),u=e!==T.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=T.useMemo(()=>Lt(d)?d.get():d,[d]);return T.createElement(e,{...u,children:f})}function RF({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:jF(n,r,o,e),renderState:t()}}function jF(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=wl(i[f]);let{initial:s,animate:a}=e;const l=vl(e),c=c0(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!gl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const g=vf(e,f[p]);if(g){const{transitionEnd:m,transition:h,...y}=g;for(const b in y){let x=y[b];if(Array.isArray(x)){const E=u?x.length-1:0;x=x[E]}x!==null&&(o[b]=x)}for(const b in m)o[b]=m[b]}}}return o}const Ow=e=>(t,n)=>{const r=T.useContext(Cl),o=T.useContext(cl),i=()=>RF(e,t,r,o);return n?i():Pn(i)},zF=Ow({scrapeMotionValuesFromProps:Vf,createRenderState:Hf}),BF=Ow({scrapeMotionValuesFromProps:O0,createRenderState:Aw}),HF=Symbol.for("motionComponentSymbol");function WF(e,t,n){const r=T.useRef(n);T.useInsertionEffect(()=>{r.current=n});const o=T.useRef(null);return T.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const s=r.current;if(typeof s=="function")if(i){const a=s(i);typeof a=="function"&&(o.current=a)}else o.current?(o.current(),o.current=null):s(i);else s&&(s.current=i)},[t])}const _w=T.createContext({});function Ss(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qF(e,t,n,r,o,i){const{visualElement:s}=T.useContext(Cl),a=T.useContext(ww),l=T.useContext(cl),c=T.useContext(si).reducedMotion,u=T.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=T.useContext(_w);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&UF(u.current,n,o,f);const p=T.useRef(!1);T.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const g=n[Bx],m=T.useRef(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return ll(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),m.current&&d.animationState&&d.animationState.animateChanges())}),T.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),m.current=!1),d.enteringChildren=void 0)}),d}function UF(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Dw(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Ss(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Dw(e){if(e)return e.options.allowProjection!==!1?e.projection:Dw(e.parent)}function qf(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&PF(r);const i=n?n==="svg":Wf(e),s=i?BF:zF;function a(c,u){let d;const f={...T.useContext(si),...c,layoutId:GF(c)},{isStatic:p}=f,g=DF(c),m=s(c,p);if(!p&&$b){KF(f,r);const h=YF(f);d=h.MeasureLayout,g.visualElement=qF(e,m,f,o,h.ProjectionNode,i)}return v.jsxs(Cl.Provider,{value:g,children:[d&&g.visualElement?v.jsx(d,{visualElement:g.visualElement,...f}):null,VF(e,c,WF(m,g.visualElement,u),m,p,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=T.forwardRef(a);return l[HF]=e,l}function GF({layoutId:e}){const t=T.useContext(ss).id;return t&&e!==void 0?t+"-"+e:e}function KF(e,t){const n=T.useContext(ww).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Yo(!1,r,"lazy-strict-mode"):un(!1,r,"lazy-strict-mode")}}function YF(e){const t=Tw(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function ZF(e,t){if(typeof Proxy>"u")return qf;const n=new Map,r=(i,s)=>qf(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&Ld(!1,"motion() is deprecated. Use motion.create() instead."),r(i,s));return new Proxy(o,{get:(i,s)=>s==="create"?r:(n.has(s)||n.set(s,qf(s,void 0,e,t)),n.get(s))})}const XF=(e,t)=>t.isSVG??Wf(e)?new _0(t):new k0(t,{allowProjection:e!==T.Fragment});class QF extends Dr{constructor(t){super(t),t.animationState||(t.animationState=O2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let JF=0;class eL extends Dr{constructor(){super(...arguments),this.id=JF++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tL={animation:{Feature:QF},exit:{Feature:eL}};function Es(e){return{point:{x:e.pageX,y:e.pageY}}}const nL=e=>t=>If(t)&&e(t,Es(t));function Ts(e,t,n,r){return ws(e,t,nL(n),r)}const Mw=({current:e})=>e?e.ownerDocument.defaultView:null,Nw=(e,t)=>Math.abs(e-t);function rL(e,t){const n=Nw(e.x,t.x),r=Nw(e.y,t.y);return Math.sqrt(n**2+r**2)}const Fw=new Set(["auto","scroll"]);class Lw{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Gf(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,m=rL(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!m)return;const{point:h}=p,{timestamp:y}=Ut;this.history.push({...h,timestamp:y});const{onStart:b,onMove:x}=this.handlers;g||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Uf(g,this.transformPagePoint),ut.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:m,onSessionEnd:h,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Gf(p.type==="pointercancel"?this.lastMoveEventInfo:Uf(g,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,b),h&&h(p,b)},!If(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const l=Es(t),c=Uf(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Ut;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Gf(c,this.history)),this.removeListeners=ls(Ts(this.contextWindow,"pointermove",this.handlePointerMove),Ts(this.contextWindow,"pointerup",this.handlePointerUp),Ts(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Fw.has(r.overflowX)||Fw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),ut.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hr(this.updatePoint)}}function Uf(e,t){return t?{point:t(e.point)}:e}function $w(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Gf({point:e},t){return{point:e,delta:$w(e,Vw(t)),offset:$w(e,oL(t)),velocity:iL(t,.1)}}function oL(e){return e[0]}function Vw(e){return e[e.length-1]}function iL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Vw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const i=bn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function sL(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?pt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?pt(n,e,r.max):Math.min(e,n)),e}function Rw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function aL(e,{top:t,left:n,bottom:r,right:o}){return{x:Rw(e.x,n,o),y:Rw(e.y,t,r)}}function jw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lL(e,t){return{x:jw(e.x,t.x),y:jw(e.y,t.y)}}function cL(e,t){let n=.5;const r=Qt(e),o=Qt(t);return o>r?n=Zo(t.min,t.max-r,e.min):r>o&&(n=Zo(e.min,e.max-o,t.min)),Xn(0,1,n)}function uL(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Kf=.35;function dL(e=Kf){return e===!1?e=0:e===!0&&(e=Kf),{x:zw(e,"left","right"),y:zw(e,"top","bottom")}}function zw(e,t,n){return{min:Bw(e,t),max:Bw(e,n)}}function Bw(e,t){return typeof e=="number"?e:e[t]||0}const fL=new WeakMap;class pL{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ot(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(Es(d).point)):this.pauseAnimation()},s=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ZN(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xn(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Qn.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const E=x.layout.layoutBox[y];E&&(b=Qt(E)*(parseFloat(b)/100))}}this.originPoint[y]=b}),m&&ut.postRender(()=>m(d,f)),bf(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:m,onDrag:h}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(g&&this.currentDirection===null){this.currentDirection=hL(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),h&&h(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>xn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Lw(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Mw(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&ut.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!kl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=sL(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Ss(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aL(r.layoutBox,t):this.constraints=!1,this.elastic=dL(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&xn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=uL(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ss(t))return!1;const r=t.current;un(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=p2(r,o.root,this.visualElement.getTransformPagePoint());let s=lL(o.layout.layoutBox,i);if(n){const a=n(u2(s));this.hasMutatedConstraints=!!a,a&&(s=h0(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=xn(u=>{if(!kl(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,g)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return bf(this.visualElement,t),r.start(gf(t,r,0,n,this.visualElement,!1))}stopAnimation(){xn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){xn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){xn(n=>{const{drag:r}=this.getProps();if(!kl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-pt(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ss(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};xn(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=cL({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),xn(s=>{if(!kl(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(pt(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;fL.set(this.visualElement,this);const t=this.visualElement.current,n=Ts(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&n0(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ss(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ut.read(r);const s=ws(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(xn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=Kf,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function kl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hL(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class mL extends Dr{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new pL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const Hw=e=>(t,n)=>{e&&ut.postRender(()=>e(t,n))};class gL extends Dr{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new Lw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Mw(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Hw(t),onStart:Hw(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&ut.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Ts(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Yf=!1;class vL extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),Yf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Sl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,Yf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||ut.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),kf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Yf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ww(e){const[t,n]=yw(),r=T.useContext(ss);return v.jsx(vL,{...e,layoutGroup:r,switchLayoutGroup:T.useContext(_w),isPresent:t,safeToRemove:n})}const yL={pan:{Feature:gL},drag:{Feature:mL,ProjectionNode:gw,MeasureLayout:Ww}};function qw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&ut.postRender(()=>i(t,Es(t)))}class bL extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=XN(t,(n,r)=>(qw(this.node,r,"Start"),o=>qw(this.node,o,"End"))))}unmount(){}}class xL extends Dr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ls(ws(this.node.current,"focus",()=>this.onFocus()),ws(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Uw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&ut.postRender(()=>i(t,Es(t)))}class wL extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=e2(t,(n,r)=>(Uw(this.node,r,"Start"),(o,{success:i})=>Uw(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Zf=new WeakMap,Xf=new WeakMap,SL=e=>{const t=Zf.get(e.target);t&&t(e)},EL=e=>{e.forEach(SL)};function TL({root:e,...t}){const n=e||document;Xf.has(n)||Xf.set(n,{});const r=Xf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(EL,{root:e,...t})),r[o]}function CL(e,t,n){const r=TL(t);return Zf.set(e,n),r.observe(e),()=>{Zf.delete(e),r.unobserve(e)}}const kL={some:0,all:1};class IL extends Dr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:kL[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return CL(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(PL(t,n))&&this.startObserver()}unmount(){}}function PL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const AL={...tL,...{inView:{Feature:IL},tap:{Feature:wL},focus:{Feature:xL},hover:{Feature:bL}},...yL,...{layout:{ProjectionNode:gw,MeasureLayout:Ww}}},Be=ZF(AL,XF);function OL(e){return T.useEffect(()=>()=>e(),[])}function ai(e){const t=Pn(()=>uo(e)),{isStatic:n}=T.useContext(si);if(n){const[,r]=T.useState(e);T.useEffect(()=>t.on("change",r),[])}return t}function Gw(e,t){const n=ai(t()),r=()=>n.set(t());return r(),ll(()=>{const o=()=>ut.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),hr(r)}}),n}function _L(e){gs.current=[],e();const t=Gw(gs.current,e);return gs.current=void 0,t}function DL(e,t,n,r){if(typeof e=="function")return _L(e);const i=typeof t=="function"?t:r2(t,n,r);return Array.isArray(e)?Kw(e,i):Kw([e],([s])=>i(s))}function Kw(e,t){const n=Pn(()=>[]);return Gw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Qf(e){return typeof e=="object"&&!Array.isArray(e)}function Yw(e,t,n,r){return e==null?[]:typeof e=="string"&&Qf(t)?Zx(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function ML(e,t,n){return e*(t+1)}function Zw(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function NL(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(as(e,o),r--)}}function FL(e,t,n,r,o,i){NL(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:pt(o,i,r[s]),easing:Jb(n,s)})}function LL(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function $L(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const VL="easeInOut",RL=20;function jL(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,s=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const g=e[p];if(typeof g=="string"){c.set(g,d);continue}else if(!Array.isArray(g)){c.set(g.name,Zw(d,g.at,u,c));continue}let[m,h,y={}]=g;y.at!==void 0&&(d=Zw(d,y.at,u,c));let b=0;const x=(E,S,I,w=0,C=0)=>{const A=zL(E),{delay:O=0,times:N=Ex(A),type:L="keyframes",repeat:j,repeatType:_,repeatDelay:F=0,...z}=S;let{ease:M=t.ease||"easeOut",duration:P}=S;const R=typeof O=="function"?O(w,C):O,V=A.length,G=ff(L)?L:o?.[L||"keyframes"];if(V<=2&&G){let ne=100;if(V===2&&WL(A)){const W=A[1]-A[0];ne=Math.abs(W)}const se={...z};P!==void 0&&(se.duration=An(P));const oe=yx(se,ne,G);M=oe.ease,P=oe.duration}P??(P=i);const U=d+R;N.length===1&&N[0]===0&&(N[1]=1);const B=N.length-A.length;if(B>0&&Sx(N,B),A.length===1&&A.unshift(null),j){un(j<RL,"Repeat count too high, must be less than 20","repeat-count-high"),P=ML(P,j);const ne=[...A],se=[...N];M=Array.isArray(M)?[...M]:[M];const oe=[...M];for(let W=0;W<j;W++){A.push(...ne);for(let q=0;q<ne.length;q++)N.push(se[q]+(W+1)),M.push(q===0?"linear":Jb(oe,q-1))}LL(N,j)}const Y=U+P;FL(I,A,M,N,U,Y),b=Math.max(R+P,b),f=Math.max(Y,f)};if(Lt(m)){const E=Xw(m,a);x(h,y,Qw("default",E))}else{const E=Yw(m,h,r,l),S=E.length;for(let I=0;I<S;I++){h=h,y=y;const w=E[I],C=Xw(w,a);for(const A in h)x(h[A],BL(y,A),Qw(A,C),I,S)}}u=d,d+=b}return a.forEach((p,g)=>{for(const m in p){const h=p[m];h.sort($L);const y=[],b=[],x=[];for(let S=0;S<h.length;S++){const{at:I,value:w,easing:C}=h[S];y.push(w),b.push(Zo(0,f,I)),x.push(C||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),x.unshift(VL)),b[b.length-1]!==1&&(b.push(1),y.push(null)),s.has(g)||s.set(g,{keyframes:{},transition:{}});const E=s.get(g);E.keyframes[m]=y,E.transition[m]={...t,duration:f,ease:x,times:b,...n}}}),s}function Xw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Qw(e,t){return t[e]||(t[e]=[]),t[e]}function zL(e){return Array.isArray(e)?e:[e]}function BL(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const HL=e=>typeof e=="number",WL=e=>e.every(HL);function qL(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Af(e)&&!i0(e)?new _0(t):new k0(t);n.mount(e),vs.set(e,n)}function UL(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new x2(t);n.mount(e),vs.set(e,n)}function GL(e,t){return Lt(e)||typeof e=="number"||typeof e=="string"&&!Qf(t)}function Jw(e,t,n,r){const o=[];if(GL(e,t))o.push(rw(e,Qf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=Yw(e,t,r),s=i.length;un(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=i[a],c=l instanceof Element?qL:UL;vs.has(l)||c(l);const u=vs.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),o.push(...wf(u,{...t,transition:d},{}))}}return o}function KL(e,t,n){const r=[];return jL(e,t,n,{spring:hs}).forEach(({keyframes:i,transition:s},a)=>{r.push(...Jw(a,i,s))}),r}function YL(e){return Array.isArray(e)&&e.some(Array.isArray)}function ZL(e){function t(n,r,o){let i=[],s;if(YL(n))i=KL(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(s=l),i=Jw(n,r,c,e)}const a=new xN(i);return s&&a.finished.then(s),e&&(e.animations.push(a),a.finished.then(()=>{as(e.animations,a)})),a}return t}function e1(){const e=Pn(()=>({current:null,animations:[]})),t=Pn(()=>ZL(e));return OL(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class XL{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const QL=()=>new XL;function JL(){return Pn(QL)}const t1=T.createContext(null);function e$(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=pt(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?XD(e,o,o+i):e}function t$({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Pn(()=>Be[t]),l=[],c=T.useRef(!1),u=T.useRef(null);un(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(g,m)=>{const h=l.findIndex(y=>g===y.value);h!==-1?l[h].layout=m[n]:l.push({value:g,layout:m[n]}),l.sort(r$)},updateOrder:(g,m,h)=>{if(c.current)return;const y=e$(l,g,m,h);l!==y&&(c.current=!0,r(y.map(n$).filter(b=>o.indexOf(b)!==-1)))}};T.useEffect(()=>{c.current=!1});const f=g=>{u.current=g,typeof s=="function"?s(g):s&&(s.current=g)},p={overflowAnchor:"none",...i.style};return v.jsx(a,{...i,style:p,ref:f,ignoreStrict:!0,children:v.jsx(t1.Provider,{value:d,children:e})})}const n1=T.forwardRef(t$);function n$(e){return e.value}function r$(e,t){return e.layout.min-t.layout.min}const Il=50,r1=25,o$=new Set(["auto","scroll"]),Cs=new WeakMap,ks=new WeakMap;let Is=null;function i$(){if(Is){const e=Jf(Is,"y");e&&(ks.delete(e),Cs.delete(e));const t=Jf(Is,"x");t&&t!==e&&(ks.delete(t),Cs.delete(t)),Is=null}}function s$(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return o$.has(r)}function Jf(e,t){let n=e?.parentElement;for(;n;){if(s$(n,t))return n;n=n.parentElement}return null}function a$(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,s=e-o,a=i-e;if(s<Il){const l=1-s/Il;return{amount:-r1*l*l,edge:"start"}}else if(a<Il){const l=1-a/Il;return{amount:r1*l*l,edge:"end"}}return{amount:0,edge:null}}function l$(e,t,n,r){if(!e)return;Is=e;const o=Jf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=a$(i,o,n);if(a===null){ks.delete(o),Cs.delete(o);return}if(ks.get(o)!==a){if(!(a==="start"&&r<0||a==="end"&&r>0))return;ks.set(o,a);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;Cs.set(o,u)}if(s>0){const c=Cs.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=s:o.scrollTop+=s}function o1(e,t=0){return Lt(e)?e:ai(t)}function c$({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:s=!0,...a},l){const c=Pn(()=>Be[r]),u=T.useContext(t1),d={x:o1(t.x),y:o1(t.y)},f=DL([d.x,d.y],([y,b])=>y||b?1:"unset");un(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:g,updateOrder:m,groupRef:h}=u;return v.jsx(c,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:s,onDrag:(y,b)=>{const{velocity:x,point:E}=b,S=d[p].get();m(n,S,x[p]),l$(h.current,E[p],p,x[p]),o&&o(y,b)},onDragEnd:(y,b)=>{i$(),i&&i(y,b)},onLayoutMeasure:y=>{g(n,y)},ref:l,ignoreStrict:!0,children:e})}const i1=T.forwardRef(c$);var Pl={exports:{}},ep={},Al={exports:{}},tp={};var s1;function u$(){if(s1)return tp;s1=1;var e=T;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var p=f(),g=r({inst:{value:p,getSnapshot:f}}),m=g[0].inst,h=g[1];return i(function(){m.value=p,m.getSnapshot=f,l(m)&&h({inst:m})},[d,p,f]),o(function(){return l(m)&&h({inst:m}),d(function(){l(m)&&h({inst:m})})},[d]),s(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return tp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,tp}var np={};var a1;function d$(){return a1||(a1=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function t(p,g){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=g();if(!d){var h=g();i(m,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=s({inst:{value:m,getSnapshot:g}});var y=h[0].inst,b=h[1];return l(function(){y.value=m,y.getSnapshot=g,n(y)&&b({inst:y})},[p,m,g]),a(function(){return n(y)&&b({inst:y}),p(function(){n(y)&&b({inst:y})})},[p]),c(m),m}function n(p){var g=p.getSnapshot;p=p.value;try{var m=g();return!i(p,m)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=T,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;np.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),np}var l1;function c1(){return l1||(l1=1,process.env.NODE_ENV==="production"?Al.exports=u$():Al.exports=d$()),Al.exports}var u1;function f$(){if(u1)return ep;u1=1;var e=T,t=c1();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return ep.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&m.hasValue){var w=m.value;if(p(w,I))return E=w}return E=I}if(w=E,r(x,I))return w;var C=f(I);return p!==void 0&&p(w,C)?(x=I,w):(x=I,E=C)}var b=!1,x,E,S=d===void 0?null:d;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,d,f,p]);var h=o(c,g[0],g[1]);return s(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},ep}var rp={};var d1;function p$(){return d1||(d1=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=T,n=c1(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;rp.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&m.hasValue){var w=m.value;if(p(w,I))return E=w}return E=I}if(w=E,r(x,I))return w;var C=f(I);return p!==void 0&&p(w,C)?(x=I,w):(x=I,E=C)}var b=!1,x,E,S=d===void 0?null:d;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,d,f,p]);var h=o(c,g[0],g[1]);return s(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),rp}var f1;function h$(){return f1||(f1=1,process.env.NODE_ENV==="production"?Pl.exports=f$():Pl.exports=p$()),Pl.exports}h$();var li=function(){return li=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},li.apply(this,arguments)};function Ps(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function p1(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var ci=function(e){var t=T.useRef(e??{});return T.useEffect(function(){t.current=e},[e]),t},m$=function(e){var t=T.useRef(void 0);return T.useEffect(function(){t.current=e},[e]),t.current},g$=function(e){return Object.entries(e)},h1=function(e){return e instanceof Promise},m1=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},li(li({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},v$=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=performance.now(),c=t.apply(void 0,p1([],Ps(s),!1)),u=function(d,f){return n(function(p){return m1(d,p,i,f)})};return h1(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},y$=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,p1([],Ps(s),!1)),c=function(u){return n(function(d){return m1(u,d,i,o.current)})};return h1(l)?l.then(function(u){return c(u)}):c(l)}},op=function(e,t,n){var r,o,i,s=Ps(T.useState(function(){return e}),2),a=s[0],l=s[1],c=ci(a),u=ci((r=n?.props)!==null&&r!==void 0?r:{}),d=ci(t),f=ci((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=ci((i=n?.interceptor)!==null&&i!==void 0?i:[]),g=T.useRef(e),m=m$(a),h=ci(m),y=T.useRef(null);T.useEffect(function(){if(y.current!==null){var E=y.current;f.current.forEach(function(S){S(a,m,E)})}},[a,f,m]);var b=Ps(T.useState(function(){var E=function(){return u.current},S=d.current({props:E,state:function(){return c.current},initialState:g.current,previousState:function(){return h.current}});return g$(S).reduce(function(I,w){var C,A=Ps(w,2),O=A[0],N=A[1];return li(li({},I),(C={},C[O]=n?.debug?v$(O,N,l,E,y,p.current):y$(O,N,l,E,y,p.current),C))},{})}),1),x=b[0];return[a,x,u.current]},b$=Object.defineProperty,g1=Object.getOwnPropertySymbols,x$=Object.prototype.hasOwnProperty,w$=Object.prototype.propertyIsEnumerable,v1=(e,t,n)=>t in e?b$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S$=(e,t)=>{for(var n in t||(t={}))x$.call(t,n)&&v1(e,n,t[n]);if(g1)for(var n of g1(t))w$.call(t,n)&&v1(e,n,t[n]);return e},ip=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},E$=(e,t,n,r)=>_l(ip,e,t,n,r),ui=e=>typeof e=="object",Mr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ui(e)&&!ui(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Mr(e[r],t[r]))},T$=(e,t)=>(ui(e)||Array.isArray(e))&&t?e[t]:e,C$=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ol=e=>/[0-9.]+/.test(e),y1=e=>["string","number"].includes(typeof e),b1=e=>e==null||e?.length===0||e==="",x1={eq:Mr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:b1,notEmpty:e=>!b1(e),in:(e,t)=>ip(t,n=>Mr(e,n)),notIn:(e,t)=>w1(t,n=>!Mr(e,n))},k$=e=>{if(e in x1)return x1[e];throw new Error("Linq - Symbol not found")},di=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},_l=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=k$(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},I$=(e,t,n,r)=>_l(di,e,t,n,r),w1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},P$=(e,t,n,r)=>_l(w1,e,t,n,r),S1=e=>{if(e===null)return null;const t=S$({},e);return Object.keys(t).forEach(n=>t[n]=ui(e[n])?S1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},E1=(e,t)=>{if(ui(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Mr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Mr(t,r))return!0}return!1},A$=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},O$=e=>di(e,(t,n,r)=>ui(t)?n===r.findIndex(o=>Mr(o,t)):n===r.indexOf(t)),_$=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},T1=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},D$=(e,t)=>T1(e,n=>n[t]),C1=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},M$=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},N$=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Ol(e)&&Ol(t)?r.map(s=>Number.parseInt(s)):r},sp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ol(e)&&Ol(t)){const o=[],[i,s]=M$(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return N$(e,t,r)},F$=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?sp(r,o,1):sp(r,i,Number.parseInt(o,10))}return y1(e)&&y1(t)?sp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},ap=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},k1=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},L$=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},$$=(e,t,n,r)=>_l(L$,e,t,n,r),I1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(C$(t))},P1=(e=>(e.Asc="asc",e.Desc="desc",e))(P1||{}),V$=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),R$=(e,t)=>e.sort(V$(t)),j$=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:di(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},z$=class ym{constructor(t=[]){this.array=t}static Range(...t){return F$(...t)}static New(t){return new ym(t)}Where(t,n,r){return this.array=I$(this.array,t,n,r),this}Some(t,n,r){return E$(this.array,t,n,r)}All(t,n,r){return P$(this.array,t,n,r)}Reverse(){return this.array=k1(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=$$(this.array,t,n,r),this}Distinct(){return this.array=O$(this.array),this}First(t){return t===void 0?this.array[0]:_$(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?ap((n,r)=>n+r,0,this.array):ap((n,r)=>n+T$(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return D$(this.array,t)}GroupWith(t){return T1(this.array,t)}Except(t){return di(this.array,n=>!E1(t,n))}Intersect(t){return di(this.array,n=>E1(t,n))}OrderBy(t,n){let r;return r=t?I1(this.array,t):this.array.toSorted(),this.array=n==="desc"?k1(r):r,this}Includes(t){return ip(this.array,n=>Mr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return ap(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(C1(this.array,n=>[t,n]))}Zip(t,n){return C1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:di(this.array,t).length}Get(t){return this.array[t]}Clone(){return new ym(S1(this.array))}ToObject(t){return A$(this.array,t)}Sort(t){return Array.isArray(t)?R$(this.array,t):I1(this.array,t)}Unique(t){return j$(this.array,t)}},A1=z$;const Dl=0,Nr=1,fi=2,O1=4;function _1(e){return()=>e}function B$(e){e()}function As(e,t){return n=>e(t(n))}function D1(e,t){return()=>e(t)}function H$(e,t){return n=>e(t,n)}function lp(e){return e!==void 0}function W$(...e){return()=>{e.map(B$)}}function pi(){}function Ml(e,t){return t(e),e}function q$(e,t){return t(e)}function ht(...e){return e}function et(e,t){return e(Nr,t)}function Le(e,t){e(Dl,t)}function cp(e){e(fi)}function vt(e){return e(O1)}function ke(e,t){return et(e,H$(t,Dl))}function Mn(e,t){const n=e(Nr,r=>{n(),t(r)});return n}function M1(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function N1(e,t){return e===t}function mt(e=N1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Pe(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>As(t,e)}function Jn(e){return t=>()=>{t(e)}}function le(e,...t){const n=U$(...t);return((r,o)=>{switch(r){case fi:cp(e);return;case Nr:return et(e,n(o))}})}function er(e,t){return n=>r=>{n(t=e(t,r))}}function ho(e){return t=>n=>{e>0?e--:t(n)}}function mr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ve(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);et(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>{i([s].concat(t))};n===o?a():r=a}}function U$(...e){return t=>e.reduceRight(q$,t)}function G$(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Nr:return i?n===i?void 0:(r(),n=i,t=et(e,i),t):(r(),pi);case fi:r(),n=null;return}}}function de(e){let t=e;const n=We();return((r,o)=>{switch(r){case Dl:t=o;break;case Nr:{o(t);break}case O1:return t}return n(r,o)})}function Yt(e,t){return Ml(de(t),n=>ke(e,n))}function We(){const e=[];return((t,n)=>{switch(t){case Dl:e.slice().forEach(r=>{r(n)});return;case fi:e.splice(0,e.length);return;case Nr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function dn(e){return Ml(We(),t=>ke(e,t))}function Ge(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:K$(),singleton:n}}const K$=()=>Symbol();function Y$(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:s})=>{if(s&&t.has(i))return t.get(i);const a=r(o.map(l=>n(l)));return s&&t.set(i,a),a};return n(e)}function _t(...e){const t=We(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);et(i,l=>{n[s]=l,r=r|a,r===o&&Le(t,n)})}),function(i,s){switch(i){case fi:{cp(t);return}case Nr:return r===o&&s(n),et(t,s)}}}function Ae(e,t=N1){return le(e,mt(t))}function up(...e){return function(t,n){switch(t){case fi:return;case Nr:return W$(...e.map(r=>et(r,n)))}}}var on=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(on||{});const Z$={0:"debug",3:"error",1:"log",2:"warn"},X$=()=>typeof globalThis>"u"?window:globalThis,Fr=Ge(()=>{const e=de(3);return{log:de((t,n,r=1)=>{var o;const i=(o=X$().VIRTUOSO_LOG_LEVEL)!=null?o:vt(e);r>=i&&console[Z$[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function tr(e,t,n){return dp(e,t,n).callbackRef}function dp(e,t,n){const r=T.useRef(null);let o=s=>{};const i=T.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const a=()=>{const l=s[0].target;l.offsetParent!==null&&e(l)};n?a():requestAnimationFrame(a)}):null,[e,n]);return o=s=>{s&&t?(i?.observe(s),r.current=s):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function F1(e,t,n,r,o,i,s,a,l){const c=T.useCallback(u=>{const d=Q$(u.children,t,a?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let g;p&&(g=f.ownerDocument.defaultView);const m=s?a?s.scrollLeft:s.scrollTop:p?a?g.scrollX||g.document.documentElement.scrollLeft:g.scrollY||g.document.documentElement.scrollTop:a?f.scrollLeft:f.scrollTop,h=s?a?s.scrollWidth:s.scrollHeight:p?a?g.document.documentElement.scrollWidth:g.document.documentElement.scrollHeight:a?f.scrollWidth:f.scrollHeight,y=s?a?s.offsetWidth:s.offsetHeight:p?a?g.innerWidth:g.innerHeight:a?f.offsetWidth:f.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(m,0),viewportHeight:y}),i?.(a?L1("column-gap",getComputedStyle(u).columnGap,o):L1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,s,r,a]);return dp(c,n,l)}function Q$(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},on.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function L1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,on.WARN),t==="normal"?0:parseInt(t??"0",10)}function fp(e,t,n){const r=T.useRef(null),o=T.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),g=c.top-p.top;f=p.height-Math.max(0,g),d=g+t.scrollTop}else{const p=s.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:s}=dp(o,!0,n),a=T.useCallback(()=>{o(s.current)},[o,s]);return T.useEffect(()=>{var l;if(t){t.addEventListener("scroll",a);const c=new ResizeObserver(()=>{requestAnimationFrame(a)});return c.observe(t),()=>{t.removeEventListener("scroll",a),c.unobserve(t)}}else{const c=(l=s.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",a),c?.addEventListener("resize",a),()=>{c?.removeEventListener("scroll",a),c?.removeEventListener("resize",a)}}},[a,t,s]),i}const Jt=Ge(()=>{const e=We(),t=We(),n=de(0),r=We(),o=de(0),i=We(),s=We(),a=de(0),l=de(0),c=de(0),u=de(0),d=We(),f=We(),p=de(!1),g=de(!1),m=de(!1);return ke(le(e,be(({scrollTop:h})=>h)),t),ke(le(e,be(({scrollHeight:h})=>h)),s),ke(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:a,horizontalDirection:g,scrollBy:f,scrollContainerState:e,scrollHeight:s,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Os={lvl:0};function $1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({end:a-1,start:r,value:o}),r=a,o=l}return i.push({end:1/0,start:r,value:o}),i}function lt(e){return e===Os}function _s(e,t){if(!lt(e))return t===e.k?e.v:t<e.k?_s(e.l,t):_s(e.r,t)}function Nn(e,t,n="k"){if(lt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Nn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Nn(e.l,t,n)}function fn(e,t,n){return lt(e)?j1(t,n,1):t===e.k?$t(e,{k:t,v:n}):t<e.k?z1($t(e,{l:fn(e.l,t,n)})):z1($t(e,{r:fn(e.r,t,n)}))}function hi(){return Os}function mi(e,t,n){if(lt(e))return[];const r=Nn(e,t)[0];return J$(hp(e,r,n))}function pp(e,t){if(lt(e))return Os;const{k:n,l:r,r:o}=e;if(t===n){if(lt(r))return o;if(lt(o))return r;{const[i,s]=R1(r);return Nl($t(e,{k:i,l:V1(r),v:s}))}}else return t<n?Nl($t(e,{l:pp(r,t)})):Nl($t(e,{r:pp(o,t)}))}function mo(e){return lt(e)?[]:[...mo(e.l),{k:e.k,v:e.v},...mo(e.r)]}function hp(e,t,n){if(lt(e))return[];const{k:r,l:o,r:i,v:s}=e;let a=[];return r>t&&(a=a.concat(hp(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(hp(i,t,n))),a}function Nl(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(mp(t))return B1($t(e,{lvl:n-1}));if(!lt(t)&&!lt(t.r))return $t(t.r,{l:$t(t,{r:t.r.l}),lvl:n,r:$t(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(mp(e))return gp($t(e,{lvl:n-1}));if(!lt(r)&&!lt(r.l)){const o=r.l,i=mp(o)?r.lvl-1:r.lvl;return $t(o,{l:$t(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:gp($t(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function $t(e,t){return j1(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function V1(e){return lt(e.r)?e.l:Nl($t(e,{r:V1(e.r)}))}function mp(e){return lt(e)||e.lvl>e.r.lvl}function R1(e){return lt(e.r)?[e.k,e.v]:R1(e.r)}function j1(e,t,n,r=Os,o=Os){return{k:e,l:r,lvl:n,r:o,v:t}}function z1(e){return gp(B1(e))}function B1(e){const{l:t}=e;return!lt(t)&&t.lvl===e.lvl?$t(t,{r:$t(e,{l:t.r})}):e}function gp(e){const{lvl:t,r:n}=e;return!lt(n)&&!lt(n.r)&&n.lvl===t&&n.r.lvl===t?$t(n,{l:$t(e,{r:n.l}),lvl:t+1}):e}function J$(e){return $1(e,({k:t,v:n})=>({index:t,value:n}))}function H1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Ds(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const vp=Ge(()=>({recalcInProgress:de(!1)}),[],{singleton:!0});function W1(e,t,n){return e[Fl(e,t,n)]}function Fl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function eV(e,t,n,r){const o=Fl(e,t,r),i=Fl(e,n,r,o);return e.slice(o,i+1)}function Fn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ll(e){return!lt(e.groupOffsetTree)}function yp({index:e},t){return t===e?0:t<e?-1:1}function tV(){return{groupIndices:[],groupOffsetTree:hi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:hi()}}function nV(e,t){let n=lt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:s}=r;if(n=Math.min(n,s),lt(e)){e=fn(e,0,i);continue}const a=mi(e,s-1,o+1);if(a.some(cV(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of a)l?(o>=d||i===f)&&(e=pp(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=fn(e,o+1,f));c&&(e=fn(e,s,i))}return[e,n]}function rV(e){return typeof e.groupIndex<"u"}function oV({offset:e},t){return t===e?0:t<e?-1:1}function Ms(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=W1(t,e,yp),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function q1(e,t){if(!Ll(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function U1(e,t,n){if(rV(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=q1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function iV(e,t,n,r=0){return r>0&&(t=Math.max(t,W1(e,r,yp).offset)),$1(eV(e,t,n,oV),lV)}function sV(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,on.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&<(i)&&t.length===2){const f=t[0].size,p=t[1].size;s=n.reduce((g,m)=>fn(fn(g,m,f),m+1,p),s)}else[s,a]=nV(s,t);if(s===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=bp(e.offsetTree,a,s,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>fn(f,p,Ms(p,d,o)),hi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:s}}function aV(e){return mo(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function G1(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function bp(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Fl(o,t-1,yp),a=o[l].offset;const c=Nn(n,t-1);i=c[0],s=c[1],o.length&&o[l].size===Nn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of mi(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({index:c,offset:f,size:u}),i=c,a=f,s=u}return{lastIndex:i,lastOffset:a,lastSize:s,offsetTree:o}}function lV(e){return{index:e.index,value:e}}function cV(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const uV={offsetHeight:"height",offsetWidth:"width"},nr=Ge(([{log:e},{recalcInProgress:t}])=>{const n=We(),r=We(),o=Yt(r,0),i=We(),s=We(),a=de(0),l=de([]),c=de(void 0),u=de(void 0),d=de(void 0),f=de(void 0),p=de((w,C)=>Fn(w,uV[C])),g=de(void 0),m=de(0),h=tV(),y=Yt(le(n,Ve(l,e,m),er(sV,h),mt()),h),b=Yt(le(l,mt(),er((w,C)=>({current:C,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);ke(le(l,Pe(w=>w.length>0),Ve(y,m),be(([w,C,A])=>{const O=w.reduce((N,L,j)=>fn(N,L,Ms(L,C.offsetTree,A)||j),hi());return{...C,groupIndices:w,groupOffsetTree:O}})),y),ke(le(r,Ve(y),Pe(([w,{lastIndex:C}])=>w<C),be(([w,{lastIndex:C,lastSize:A}])=>[{endIndex:C,size:A,startIndex:w}])),n),ke(c,u);const x=Yt(le(c,be(w=>w===void 0)),!0);ke(le(u,Pe(w=>w!==void 0&<(vt(y).sizeTree)),be(w=>{const C=vt(d),A=vt(l).length>0;return C?A?[{endIndex:0,size:C,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),ke(le(f,Pe(w=>w!==void 0&&w.length>0&<(vt(y).sizeTree)),be(w=>{const C=[];let A=w[0],O=0;for(let N=1;N<w.length;N++){const L=w[N];L!==A&&(C.push({endIndex:N-1,size:A,startIndex:O}),A=L,O=N)}return C.push({endIndex:w.length-1,size:A,startIndex:O}),C})),n),ke(le(l,Ve(d,u),Pe(([,w,C])=>w!==void 0&&C!==void 0),be(([w,C,A])=>{const O=[];for(let N=0;N<w.length;N++){const L=w[N],j=w[N+1];O.push({startIndex:L,endIndex:L,size:C}),j!==void 0&&O.push({startIndex:L+1,endIndex:j-1,size:A})}return O})),n);const E=dn(le(n,Ve(y),er(({sizes:w},[C,A])=>({changed:A!==w,sizes:A}),{changed:!1,sizes:h}),be(w=>w.changed)));et(le(a,er((w,C)=>({diff:w.prev-C,prev:C}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:C}=vt(y);if(w>0)Le(t,!0),Le(i,w+G1(w,C));else if(w<0){const A=vt(b);A.length>0&&(w-=G1(-w,A)),Le(s,w)}}),et(le(a,Ve(e)),([w,C])=>{w<0&&C("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},on.ERROR)});const S=dn(i);ke(le(i,Ve(y),be(([w,C])=>{const A=C.groupIndices.length>0,O=[],N=C.lastSize;if(A){const L=_s(C.sizeTree,0);let j=0,_=0;for(;j<w;){const z=C.groupIndices[_],M=C.groupIndices.length===_+1?1/0:C.groupIndices[_+1]-z-1;O.push({endIndex:z,size:L,startIndex:z}),O.push({endIndex:z+1+M-1,size:N,startIndex:z+1}),_++,j+=M+1}const F=mo(C.sizeTree);return j!==w&&F.shift(),F.reduce((z,{k:M,v:P})=>{let R=z.ranges;return z.prevSize!==0&&(R=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:P,ranges:R}},{prevIndex:w,prevSize:0,ranges:O}).ranges}return mo(C.sizeTree).reduce((L,{k:j,v:_})=>({prevIndex:j+w,prevSize:_,ranges:[...L.ranges,{endIndex:j+w-1,size:L.prevSize,startIndex:L.prevIndex}]}),{prevIndex:0,prevSize:N,ranges:[]}).ranges})),n);const I=dn(le(s,Ve(y,m),be(([w,{offsetTree:C},A])=>{const O=-w;return Ms(O,C,A)})));return ke(le(s,Ve(y,m),be(([w,C,A])=>{if(C.groupIndices.length>0){if(lt(C.sizeTree))return C;let O=hi();const N=vt(b);let L=0,j=0,_=0;for(;L<-w;){_=N[j];const F=N[j+1]-_-1;j++,L+=F+1}if(O=mo(C.sizeTree).reduce((F,{k:z,v:M})=>fn(F,Math.max(0,z+w),M),O),L!==-w){const F=_s(C.sizeTree,_);O=fn(O,0,F);const z=Nn(C.sizeTree,-w+1)[1];O=fn(O,1,z)}return{...C,sizeTree:O,...bp(C.offsetTree,0,O,A)}}else{const O=mo(C.sizeTree).reduce((N,{k:L,v:j})=>fn(N,Math.max(0,L+w),j),hi());return{...C,sizeTree:O,...bp(C.offsetTree,0,O,A)}}})),y),{beforeUnshiftWith:S,data:g,defaultItemSize:u,firstItemIndex:a,fixedItemSize:c,fixedGroupSize:d,gap:m,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:E,shiftWith:s,shiftWithOffset:I,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},ht(Fr,vp),{singleton:!0});function dV(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const K1=Ge(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=We(),s=We(),a=dn(le(i,be(dV)));return ke(le(a,be(l=>l.totalCount)),n),ke(le(a,be(l=>l.groupIndices)),e),ke(le(_t(o,t,r),Pe(([l,c])=>Ll(c)),be(([l,c,u])=>Nn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),mt(),be(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},ht(nr,Jt)),Lr=Ge(([{log:e}])=>{const t=de(!1),n=dn(le(t,Pe(r=>r),mt()));return et(t,r=>{r&&vt(e)("props updated",{},on.DEBUG)}),{didMount:n,propsReady:t}},ht(Fr),{singleton:!0}),fV=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Y1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!fV)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ns=Ge(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=We(),g=We(),m=de(0);let h=null,y=null,b=null;function x(){h&&(h(),h=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),Le(l,!1)}return ke(le(p,Ve(n,d,r,m,a,s,f),Ve(e,i,o),be(([[E,S,I,w,C,A,O,N],L,j,_])=>{const F=Y1(E),{align:z,behavior:M,offset:P}=F,R=w-1,V=U1(F,S,R);let G=Ms(V,S.offsetTree,L)+A;z==="end"?(G+=j+Nn(S.sizeTree,V)[1]-I+_,V===R&&(G+=O)):z==="center"?G+=(j+Nn(S.sizeTree,V)[1]-I+_)/2:G-=C,P&&(G+=P);const U=B=>{x(),B?(N("retrying to scroll to",{location:E},on.DEBUG),Le(p,E)):(Le(g,!0),N("list did not change, scroll successful",{},on.DEBUG))};if(x(),M==="smooth"){let B=!1;b=et(t,Y=>{B=B||Y}),h=Mn(u,()=>{U(B)})}else h=Mn(le(t,pV(150)),U);return y=setTimeout(()=>{x()},1200),Le(l,!0),N("scrolling from index to",{behavior:M,index:V,top:G},on.DEBUG),{behavior:M,top:G}})),c),{scrollTargetReached:g,scrollToIndex:p,topListHeight:m}},ht(nr,Jt,Fr),{singleton:!0});function pV(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function xp(e,t){e==0?t():requestAnimationFrame(()=>{xp(e-1,t)})}function wp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Fs=Ge(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:s}])=>{const a=de(!0),l=de(0),c=de(!0);return ke(le(s,Ve(l),Pe(([u,d])=>!!d),Jn(!1)),a),ke(le(s,Ve(l),Pe(([u,d])=>!!d),Jn(!1)),c),et(le(_t(t,s),Ve(a,n,e,c),Pe(([[,u],d,{sizeTree:f},p,g])=>u&&(!lt(f)||lp(p))&&!d&&!g),Ve(l)),([,u])=>{Mn(o,()=>{Le(c,!0)}),xp(4,()=>{Mn(r,()=>{Le(a,!0)}),Le(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},ht(nr,Jt,Ns,Lr),{singleton:!0});function Z1(e,t){return Math.abs(e-t)<1.01}const Ls="up",$s="down",hV="none",mV={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},gV=0,Vs=Ge(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const s=de(!1),a=de(!0),l=We(),c=We(),u=de(4),d=de(gV),f=Yt(le(up(le(Ae(o),ho(1),Jn(!0)),le(Ae(o),ho(1),Jn(!1),M1(100))),mt()),!1),p=Yt(le(up(le(n,Jn(!0)),le(n,Jn(!1),M1(200))),mt()),!1);ke(le(_t(Ae(o),Ae(d)),be(([b,x])=>b<=x),mt()),a),ke(le(a,mr(50)),c);const g=dn(le(_t(r,Ae(i),Ae(t),Ae(e),Ae(u)),er((b,[{scrollHeight:x,scrollTop:E},S,I,w,C])=>{const A=E+S-x>-C,O={scrollHeight:x,scrollTop:E,viewportHeight:S};if(A){let L,j;return E>b.state.scrollTop?(L="SCROLLED_DOWN",j=b.state.scrollTop-E):(L="SIZE_DECREASED",j=b.state.scrollTop-E||b.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:j,state:O}}let N;return O.scrollHeight>b.state.scrollHeight?N="SIZE_INCREASED":S<b.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":E<b.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:O}},mV),mt((b,x)=>b&&b.atBottom===x.atBottom))),m=Yt(le(r,er((b,{scrollHeight:x,scrollTop:E,viewportHeight:S})=>{if(Z1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:E};{const I=x-(E+S)<1;return b.scrollTop!==E&&I?{changed:!0,jump:b.scrollTop-E,scrollHeight:x,scrollTop:E}:{changed:!0,jump:0,scrollHeight:x,scrollTop:E}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Pe(b=>b.changed),be(b=>b.jump)),0);ke(le(g,be(b=>b.atBottom)),s),ke(le(s,mr(50)),l);const h=de($s);ke(le(r,be(({scrollTop:b})=>b),mt(),er((b,x)=>vt(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?Ls:$s,prevScrollTop:x},{direction:$s,prevScrollTop:0}),be(b=>b.direction)),h),ke(le(r,mr(50),Jn(hV)),h);const y=de(0);return ke(le(f,Pe(b=>!b),Jn(0)),y),ke(le(o,mr(100),Ve(f),Pe(([b,x])=>x),er(([b,x],[E])=>[x,E],[0,0]),be(([b,x])=>x-b)),y),{atBottomState:g,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:s,isAtTop:a,isScrolling:f,lastJumpDueToItemResize:m,scrollDirection:h,scrollVelocity:y}},ht(Jt)),Rs="top",js="bottom",X1="none";function Q1(e,t,n){return typeof e=="number"?n===Ls&&t===Rs||n===$s&&t===js?e:0:n===Ls?t===Rs?e.main:e.reverse:t===js?e.main:e.reverse}function J1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Sp=Ge(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=We(),s=de(0),a=de(0),l=de(0),c=Yt(le(_t(Ae(r),Ae(o),Ae(n),Ae(i,Ds),Ae(l),Ae(s),Ae(t),Ae(e),Ae(a)),be(([u,d,f,[p,g],m,h,y,b,x])=>{const E=u-b,S=h+y,I=Math.max(f-E,0);let w=X1;const C=J1(x,Rs),A=J1(x,js);return p-=b,p+=f+y,g+=f+y,g-=b,p>u+S-C&&(w=Ls),g<u-I+d+A&&(w=$s),w!==X1?[Math.max(E-f-Q1(m,Rs,w)-C,0),E-I-y+d+Q1(m,js,w)+A]:null}),Pe(u=>u!=null),mt(Ds)),[0,0]);return{increaseViewportBy:a,listBoundary:i,overscan:l,topListHeight:s,visibleRange:c}},ht(Jt),{singleton:!0});function vV(e,t,n){if(Ll(t)){const r=q1(e,t);return[{index:Nn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const Ep={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function $l(e,t,n,r,o,i){const{lastIndex:s,lastOffset:a,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-s,f=a+d*l+(d-1)*r,p=c,g=f-u;return{bottom:u,firstItemIndex:i,items:tS(e,o,i),offsetBottom:g,offsetTop:c,top:p,topItems:tS(t,o,i),topListHeight:t.reduce((m,h)=>h.size+m,0),totalCount:n}}function eS(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=wp(t,a),c=Array.from({length:a}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return $l(c,[],a,o,n,r)}function tS(e,t,n){if(e.length===0)return[];if(!Ll(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=mi(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function nS(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const go=Ge(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:g}])=>{const m=de([]),h=de(0),y=We(),b=de(0);ke(i.topItemsIndexes,m);const x=Yt(le(_t(p,g,Ae(l,Ds),Ae(o),Ae(r),Ae(c),u,Ae(m),Ae(t),Ae(n),Ae(b),e),Pe(([w,C,,A,,,,,,,,O])=>{const N=O&&O.length!==A;return w&&!C&&!N}),be(([,,[w,C],A,O,N,L,j,_,F,z,M])=>{var P,R,V,G;const U=O,{offsetTree:B,sizeTree:Y}=U,ne=vt(h);if(A===0)return{...Ep,totalCount:A};if(w===0&&C===0)return ne===0?{...Ep,totalCount:A}:eS(ne,N,O,_,F,M||[]);if(lt(Y))return ne>0?null:$l(vV(wp(N,A),U,M),[],A,F,U,_);const se=[];if(j.length>0){const ee=j[0],Q=j[j.length-1];let fe=0;for(const J of mi(Y,ee,Q)){const te=J.value,ce=Math.max(J.start,ee),ve=Math.min(J.end,Q);for(let he=ce;he<=ve;he++)se.push({data:M?.[he],index:he,offset:fe,size:te}),fe+=te}}if(!L)return $l([],se,A,F,U,_);const oe=j.length>0?j[j.length-1]+1:0,W=iV(B,w,C,oe);if(W.length===0)return null;const q=A-1,X=Ml([],ee=>{for(const Q of W){const fe=Q.value;let J=fe.offset,te=Q.start;const ce=fe.size;if(fe.offset<w){te+=Math.floor((w-fe.offset+F)/(ce+F));const he=te-Q.start;J+=he*ce+he*F}te<oe&&(J+=(oe-te)*ce,te=oe);const ve=Math.min(Q.end,q);for(let he=te;he<=ve&&!(J>=C);he++)ee.push({data:M?.[he],index:he,offset:J,size:ce}),J+=ce+F}}),ue=nS(z,Rs),D=nS(z,js);if(X.length>0&&(ue>0||D>0)){const ee=X[0],Q=X[X.length-1];if(ue>0&&ee.index>oe){const fe=Math.min(ue,ee.index-oe),J=[];let te=ee.offset;for(let ce=ee.index-1;ce>=ee.index-fe;ce--){const ve=(R=(P=mi(Y,ce,ce)[0])==null?void 0:P.value)!=null?R:ee.size;te-=ve+F,J.unshift({data:M?.[ce],index:ce,offset:te,size:ve})}X.unshift(...J)}if(D>0&&Q.index<q){const fe=Math.min(D,q-Q.index);let J=Q.offset+Q.size+F;for(let te=Q.index+1;te<=Q.index+fe;te++){const ce=(G=(V=mi(Y,te,te)[0])==null?void 0:V.value)!=null?G:Q.size;X.push({data:M?.[te],index:te,offset:J,size:ce}),J+=ce+F}}}return $l(X,se,A,F,U,_)}),Pe(w=>w!==null),mt()),Ep);ke(le(e,Pe(lp),be(w=>w?.length)),o),ke(le(x,be(w=>w.topListHeight)),d),ke(d,a),ke(le(x,be(w=>[w.top,w.bottom])),s),ke(le(x,be(w=>w.items)),y);const E=dn(le(x,Pe(({items:w})=>w.length>0),Ve(o,e),Pe(([{items:w},C])=>w[w.length-1].originalIndex===C-1),be(([,w,C])=>[w-1,C]),mt(Ds),be(([w])=>w))),S=dn(le(x,mr(200),Pe(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),be(({items:w})=>w[0].index),mt())),I=dn(le(x,Pe(({items:w})=>w.length>0),be(({items:w})=>{let C=0,A=w.length-1;for(;w[C].type==="group"&&C<A;)C++;for(;w[A].type==="group"&&A>C;)A--;return{endIndex:w[A].index,startIndex:w[C].index}}),mt(H1)));return{endReached:E,initialItemCount:h,itemsRendered:y,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:S,topItemsIndexes:m,...f}},ht(nr,K1,Sp,Fs,Ns,Vs,Lr,vp),{singleton:!0}),rS=Ge(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=We(),s=Yt(le(_t(n,e,r,t,o),be(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ke(Ae(s),i),{totalListHeight:s,totalListHeightChanged:i}},ht(Jt,go),{singleton:!0}),yV=Ge(([{viewportHeight:e},{totalListHeight:t}])=>{const n=de(!1),r=Yt(le(_t(n,e,t),Pe(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),mr(0),mt()),0);return{alignToBottom:n,paddingTopAddition:r}},ht(Jt,rS),{singleton:!0}),oS=Ge(()=>({context:de(null)})),bV=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:s})=>t<s?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,iS=Ge(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:c}])=>{const u=We();return ke(le(u,Ve(t,l,n,i,o,r,a),Ve(e),be(([[d,f,p,g,m,h,y,b],x])=>{const{align:E,behavior:S,calculateViewLocation:I=bV,done:w,...C}=d,A=U1(d,f,g-1),O=Ms(A,f.offsetTree,x)+m+h,N=O+Nn(f.sizeTree,A)[1],L=b+h,j=b+p-y,_=I({itemBottom:N,itemTop:O,locationParams:{align:E,behavior:S,...C},viewportBottom:j,viewportTop:L});return _?w&&Mn(le(s,Pe(F=>!F),ho(vt(s)?1:2)),w):w?.(),_}),Pe(d=>d!==null)),c),{scrollIntoView:u}},ht(nr,Jt,Ns,go,Fr),{singleton:!0});function sS(e){return e?e==="smooth"?"smooth":"auto":!1}const xV=(e,t)=>typeof e=="function"?sS(e(t)):t&&sS(e),wV=Ge(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const g=de(!1),m=We();let h=null;function y(S){Le(s,{align:"end",behavior:S,index:"LAST"})}et(le(_t(le(Ae(t),ho(1)),l),Ve(Ae(g),i,a,d),be(([[S,I],w,C,A,O])=>{let N=I&&A,L="auto";return N&&(L=xV(w,C||O),N=N&&!!L),{followOutputBehavior:L,shouldFollow:N,totalCount:S}}),Pe(({shouldFollow:S})=>S)),({followOutputBehavior:S,totalCount:I})=>{h&&(h(),h=null),vt(n)?requestAnimationFrame(()=>{vt(u)("following output to ",{totalCount:I},on.DEBUG),y(S)}):h=Mn(e,()=>{vt(u)("following output to ",{totalCount:I},on.DEBUG),y(S),h=null})});function b(S){const I=Mn(o,w=>{S&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(vt(u)("scrolling to bottom due to increased size",{},on.DEBUG),y("auto"))});setTimeout(I,100)}et(le(_t(Ae(g),t,c),Pe(([S,,I])=>S&&I),er(({value:S},[,I])=>({refreshed:S===I,value:I}),{refreshed:!1,value:0}),Pe(({refreshed:S})=>S),Ve(g,t)),([,S])=>{vt(a)&&b(S!==!1)}),et(m,()=>{b(vt(g)!==!1)}),et(_t(Ae(g),o),([S,I])=>{S&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const x=de(null),E=We();return ke(up(le(Ae(r),be(S=>{var I;return(I=S?.length)!=null?I:0})),le(Ae(t))),E),et(le(_t(le(E,ho(1)),l),Ve(Ae(x),a,d,f),be(([[S,I],w,C,A,O])=>I&&C&&w?.({context:O,totalCount:S,scrollingInProgress:A})),Pe(S=>!!S),mr(0)),S=>{h&&(h(),h=null),vt(n)?requestAnimationFrame(()=>{vt(u)("scrolling into view",{}),Le(p,S)}):h=Mn(e,()=>{vt(u)("scrolling into view",{}),Le(p,S),h=null})}),{autoscrollToBottom:m,followOutput:g,scrollIntoViewOnChange:x}},ht(nr,Vs,Ns,Fs,Lr,Fr,Jt,oS,iS)),SV=Ge(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ke(le(a,Ve(i),Pe(([,l])=>l!==0),Ve(o,r,t,n,e),be(([[,l],c,u,d,f,p=[]])=>eS(l,c,u,d,f,p))),s),{}),ht(nr,Fs,go,Lr),{singleton:!0}),EV=Ge(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=de(0);return et(le(e,Ve(r),Pe(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Mn(le(n,ho(1),Pe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Le(t,o)})})}),{initialScrollTop:r}},ht(Lr,Jt,go),{singleton:!0}),aS=Ge(([{scrollVelocity:e}])=>{const t=de(!1),n=We(),r=de(!1);return ke(le(e,Ve(r,t,n),Pe(([o,i])=>!!i),be(([o,i,s,a])=>{const{enter:l,exit:c}=i;if(s){if(c(o,a))return!1}else if(l(o,a))return!0;return s}),mt()),t),et(le(_t(t,e,n),Ve(r)),([[o,i,s],a])=>{o&&a&&a.change&&a.change(i,s)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ht(Vs),{singleton:!0}),Tp=Ge(([{scrollContainerState:e,scrollTo:t}])=>{const n=We(),r=We(),o=We(),i=de(!1),s=de(void 0);return ke(le(_t(n,r),be(([{scrollHeight:a,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:a,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),ke(le(t,Ve(r),be(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{customScrollParent:s,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ht(Jt)),TV=Ge(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=We(),u=de(void 0),d=de(null),f=de(null);return ke(a,d),ke(l,f),et(le(c,Ve(t,r,s,d,f,n)),([p,g,m,h,y,b,x])=>{const E=aV(g.sizeTree);h&&y!==null&&b!==null&&(m=y.scrollTop-b.offsetTop),m-=x,p({ranges:E,scrollTop:m})}),ke(le(u,Pe(lp),be(CV)),o),ke(le(i,Ve(u),Pe(([,p])=>p!==void 0),mt(),be(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},ht(nr,Jt,Fs,Lr,Tp));function CV(e){return{align:"start",index:0,offset:e.scrollTop}}const kV=Ge(([{topItemsIndexes:e}])=>{const t=de(0);return ke(le(t,Pe(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ht(go));function lS(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const IV=lS(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),PV=Ge(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:s,scrollDirection:a},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:g}])=>{const m=dn(le(l,Ve(s),er(([,y,b,x],[{bottom:E,items:S,offsetBottom:I,totalCount:w},C])=>{const A=E+I;let O=0;return b===w&&y.length>0&&S.length>0&&(S[0].originalIndex===0&&y[0].originalIndex===0||(O=A-x,O!==0&&(O+=C))),[O,S,w,A]},[0,[],0,0]),Pe(([y])=>y!==0),Ve(r,a,n,o,p,g),Pe(([,y,b,x,,,E])=>!E&&!x&&y!==0&&b===Ls),be(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},on.DEBUG),y))));function h(y){y>0?(Le(t,{behavior:"auto",top:-y}),Le(e,0)):(Le(e,0),Le(t,{behavior:"auto",top:-y}))}return et(le(m,Ve(e,i)),([y,b,x])=>{x&&IV()?Le(e,b-y):h(-y)}),et(le(_t(Yt(i,!1),e,g),Pe(([y,b,x])=>!y&&!x&&b!==0),be(([y,b])=>b),mr(1)),h),ke(le(d,be(y=>({top:-y}))),t),et(le(c,Ve(f,u),be(([y,{groupIndices:b,lastSize:x,sizeTree:E},S])=>{function I(w){return w*(x+S)}if(b.length===0)return I(y);{let w=0;const C=_s(E,0);let A=0,O=0;for(;A<y;){A++,w+=C;let N=b.length===O+1?1/0:b[O+1]-b[O]-1;A+N>y&&(w-=C,N=y-A+1),A+=N,w+=I(N),O++}return w}})),y=>{Le(e,y),requestAnimationFrame(()=>{Le(t,{top:y}),requestAnimationFrame(()=>{Le(e,0),Le(g,!1)})})}),{deviation:e}},ht(Jt,Vs,go,nr,Fr,vp)),AV=Ge(([e,t,n,r,o,i,s,a,l,c,u])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c,...u}),ht(Sp,SV,Lr,aS,rS,EV,yV,Tp,iS,Fr,oS)),cS=Ge(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:g,initialTopMostItemIndex:m,scrolledToInitialItem:h},y,b,x,E,{scrollToIndex:S},I,{topItemCount:w},{groupCounts:C},A])=>{const{listState:O,minOverscanItemCount:N,topItemsIndexes:L,rangeChanged:j,..._}=E;return ke(j,A.scrollSeekRangeChanged),ke(le(A.windowViewportRect,be(F=>F.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:C,heightEstimates:a,initialItemFinalLocationReached:g,initialTopMostItemIndex:m,scrolledToInitialItem:h,sizeRanges:c,topItemCount:w,topItemsIndexes:L,totalCount:f,...x,groupIndices:s,itemSize:l,listState:O,minOverscanItemCount:N,scrollToIndex:S,statefulTotalCount:d,trackItemSizes:p,rangeChanged:j,..._,...A,...y,sizes:u,...b}},ht(nr,Fs,Jt,TV,wV,go,Ns,PV,kV,K1,AV));function OV(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)Object.hasOwn(r,s)||(n[s]=t[s]);return n}const Vl=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Cp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=T.createContext({});function l(h,y){h.propsReady&&Le(h.propsReady,!1);for(const b of r){const x=h[t.required[b]];Le(x,y[b])}for(const b of o)if(b in y){const x=h[t.optional[b]];Le(x,y[b])}h.propsReady&&Le(h.propsReady,!0)}function c(h){return i.reduce((y,b)=>(y[b]=x=>{const E=h[t.methods[b]];Le(E,x)},y),{})}function u(h){return s.reduce((y,b)=>(y[b]=G$(h[t.events[b]]),y),{})}const d=T.forwardRef((h,y)=>{const{children:b,...x}=h,[E]=T.useState(()=>Ml(Y$(e),w=>{l(w,x)})),[S]=T.useState(D1(u,E));Vl(()=>{for(const w of s)w in x&&et(S[w],x[w]);return()=>{Object.values(S).map(cp)}},[x,S,E]),Vl(()=>{l(E,x)}),T.useImperativeHandle(y,_1(c(E)));const I=n;return v.jsx(a.Provider,{value:E,children:n?v.jsx(I,{...OV([...r,...o,...s],x),children:b}):b})}),f=h=>{const y=T.useContext(a);return T.useCallback(b=>{Le(y[h],b)},[y,h])},p=h=>{const y=T.useContext(a)[h],b=T.useCallback(x=>et(y,x),[y]);return T.useSyncExternalStore(b,()=>vt(y),()=>vt(y))},g=h=>{const y=T.useContext(a)[h],[b,x]=T.useState(D1(vt,y));return Vl(()=>et(y,E=>{E!==b&&x(_1(E))}),[y,b]),b},m=T.version.startsWith("18")?p:g;return{Component:d,useEmitter:(h,y)=>{const b=T.useContext(a)[h];Vl(()=>et(b,y),[y,b])},useEmitterValue:m,usePublisher:f}}const Rl=T.createContext(void 0),uS=T.createContext(void 0),dS=typeof document<"u"?T.useLayoutEffect:T.useEffect;function kp(e){return"self"in e}function _V(e){return"body"in e}function fS(e,t,n,r=pi,o,i){const s=T.useRef(null),a=T.useRef(null),l=T.useRef(null),c=T.useCallback(f=>{let p,g,m;const h=f.target;if(_V(h)||kp(h)){const b=kp(h)?h:h.defaultView;m=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,g=i?b.innerWidth:b.innerHeight}else m=i?h.scrollLeft:h.scrollTop,p=i?h.scrollWidth:h.scrollHeight,g=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:p,scrollTop:Math.max(m,0),viewportHeight:g})};f.suppressFlushSync?y():Po.flushSync(y),a.current!==null&&(m===a.current||m<=0||m===p-g)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);T.useEffect(()=>{const f=o||s.current;return r(o||s.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[s,c,n,r,o]);function u(f){const p=s.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const g=f.behavior==="smooth";let m,h,y;kp(p)?(h=Math.max(Fn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),m=i?p.innerWidth:p.innerHeight,y=i?window.scrollX:window.scrollY):(h=p[i?"scrollWidth":"scrollHeight"],m=Fn(p,i?"width":"height"),y=p[i?"scrollLeft":"scrollTop"]);const b=h-m;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),Z1(m,h)||f.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:m}),g&&t(!0);return}g?(a.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),s.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:s,scrollToCallback:u}}const Ip="-webkit-sticky",pS="sticky",Pp=lS(()=>{if(typeof document>"u")return pS;const e=document.createElement("div");return e.style.position=Ip,e.style.position===Ip?Ip:pS});function Ap(e){return e}const DV=Ge(()=>{const e=de(a=>`Item ${a}`),t=de(a=>`Group ${a}`),n=de({}),r=de(Ap),o=de("div"),i=de(pi),s=(a,l=null)=>Yt(le(n,be(c=>c[a]),mt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),MV=Ge(([e,t])=>({...e,...t}),ht(cS,DV)),NV=({height:e})=>v.jsx("div",{style:{height:e}}),FV={overflowAnchor:"none",position:Pp(),zIndex:1},hS={overflowAnchor:"none"},LV={...hS,display:"inline-block",height:"100%"},mS=T.memo(function({showTopList:e=!1}){const t=Oe("listState"),n=wn("sizeRanges"),r=Oe("useWindowScroll"),o=Oe("customScrollParent"),i=wn("windowScrollContainerState"),s=wn("scrollContainerState"),a=o||r?i:s,l=Oe("itemContent"),c=Oe("context"),u=Oe("groupContent"),d=Oe("trackItemSizes"),f=Oe("itemSize"),p=Oe("log"),g=wn("gap"),m=Oe("horizontalDirection"),{callbackRef:h}=F1(n,f,d,e?pi:a,p,g,o,m,Oe("skipAnimationFrameInResizeObserver")),[y,b]=T.useState(0);Dp("deviation",_=>{y!==_&&b(_)});const x=Oe("EmptyPlaceholder"),E=Oe("ScrollSeekPlaceholder")||NV,S=Oe("ListComponent"),I=Oe("ItemComponent"),w=Oe("GroupComponent"),C=Oe("computeItemKey"),A=Oe("isSeeking"),O=Oe("groupIndices").length>0,N=Oe("alignToBottom"),L=Oe("initialItemFinalLocationReached"),j=e?{}:{boxSizing:"border-box",...m?{display:"inline-block",height:"100%",marginLeft:y!==0?y:N?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:N?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?v.jsx(x,{...gt(x,c)}):v.jsx(S,{...gt(S,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:j,children:(e?t.topItems:t.items).map(_=>{const F=_.originalIndex,z=C(F+t.firstItemIndex,_.data,c);return A?T.createElement(E,{...gt(E,c),height:_.size,index:_.index,key:z,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?T.createElement(w,{...gt(w,c),"data-index":F,"data-item-index":_.index,"data-known-size":_.size,key:z,style:FV},u(_.index,c)):T.createElement(I,{...gt(I,c),...gS(I,_.data),"data-index":F,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:z,style:m?LV:hS},O?l(_.index,_.groupIndex,_.data,c):l(_.index,_.data,c))})})}),$V={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},VV={outline:"none",overflowX:"auto",position:"relative"},gi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),RV={position:Pp(),top:0,width:"100%",zIndex:1};function gt(e,t){if(typeof e!="string")return{context:t}}function gS(e,t){return{item:typeof e=="string"?void 0:t}}const jV=T.memo(function(){const e=Oe("HeaderComponent"),t=wn("headerHeight"),n=Oe("HeaderFooterTag"),r=tr(T.useMemo(()=>i=>{t(Fn(i,"height"))},[t]),!0,Oe("skipAnimationFrameInResizeObserver")),o=Oe("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...gt(e,o)})}):null}),zV=T.memo(function(){const e=Oe("FooterComponent"),t=wn("footerHeight"),n=Oe("HeaderFooterTag"),r=tr(T.useMemo(()=>i=>{t(Fn(i,"height"))},[t]),!0,Oe("skipAnimationFrameInResizeObserver")),o=Oe("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...gt(e,o)})}):null});function Op({useEmitter:e,useEmitterValue:t,usePublisher:n}){return T.memo(function({children:r,style:o,context:i,...s}){const a=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:g}=fS(a,c,l,u,void 0,d);return e("scrollTo",g),e("scrollBy",f),v.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?VV:$V,...o},tabIndex:0,...s,...gt(l,i),children:r})})}function _p({useEmitter:e,useEmitterValue:t,usePublisher:n}){return T.memo(function({children:r,style:o,context:i,...s}){const a=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=T.useRef(null),g=t("scrollerRef"),{scrollByCallback:m,scrollerRef:h,scrollToCallback:y}=fS(a,c,l,g,f);return dS(()=>{var b;return h.current=f||((b=p.current)==null?void 0:b.ownerDocument.defaultView),()=>{h.current=null}},[h,f]),e("windowScrollTo",y),e("scrollBy",m),v.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...s,...gt(l,i),children:r})})}const BV=({children:e})=>{const t=T.useContext(Rl),n=wn("viewportHeight"),r=wn("fixedItemHeight"),o=Oe("alignToBottom"),i=Oe("horizontalDirection"),s=T.useMemo(()=>As(n,l=>Fn(l,i?"width":"height")),[n,i]),a=tr(s,!0,Oe("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:a,style:gi(o),children:e})},HV=({children:e})=>{const t=T.useContext(Rl),n=wn("windowViewportRect"),r=wn("fixedItemHeight"),o=Oe("customScrollParent"),i=fp(n,o,Oe("skipAnimationFrameInResizeObserver")),s=Oe("alignToBottom");return T.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:gi(s),children:e})},WV=({children:e})=>{const t=Oe("TopItemListComponent")||"div",n=Oe("headerHeight"),r={...RV,marginTop:`${n}px`},o=Oe("context");return v.jsx(t,{style:r,...gt(t,o),children:e})},qV=T.memo(function(e){const t=Oe("useWindowScroll"),n=Oe("topItemsIndexes").length>0,r=Oe("customScrollParent"),o=Oe("context");return v.jsxs(r||t?KV:GV,{...e,context:o,children:[n&&v.jsx(WV,{children:v.jsx(mS,{showTopList:!0})}),v.jsxs(r||t?HV:BV,{children:[v.jsx(jV,{}),v.jsx(mS,{}),v.jsx(zV,{})]})]})}),{Component:UV,useEmitter:Dp,useEmitterValue:Oe,usePublisher:wn}=Cp(MV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},qV),GV=Op({useEmitter:Dp,useEmitterValue:Oe,usePublisher:wn}),KV=_p({useEmitter:Dp,useEmitterValue:Oe,usePublisher:wn}),Mp=UV,YV=Ge(()=>{const e=de(c=>v.jsxs("td",{children:["Item $",c]})),t=de(null),n=de(c=>v.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=de(null),o=de(null),i=de({}),s=de(Ap),a=de(pi),l=(c,u=null)=>Yt(le(i,be(d=>d[c]),mt()),u);return{components:i,computeItemKey:s,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),ZV=Ge(([e,t])=>({...e,...t}),ht(cS,YV)),XV=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{height:e}})}),QV=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{border:0,height:e,padding:0}})}),JV={overflowAnchor:"none"},vS={position:Pp(),zIndex:2,overflowAnchor:"none"},yS=T.memo(function({showTopList:e=!1}){const t=$e("listState"),n=$e("computeItemKey"),r=$e("firstItemIndex"),o=$e("context"),i=$e("isSeeking"),s=$e("fixedHeaderHeight"),a=$e("groupIndices").length>0,l=$e("itemContent"),c=$e("groupContent"),u=$e("ScrollSeekPlaceholder")||XV,d=$e("GroupComponent"),f=$e("TableRowComponent"),p=(e?t.topItems:[]).reduce((m,h,y)=>(y===0?m.push(h.size):m.push(m[y-1]+h.size),m),[]),g=(e?t.topItems:t.items).map(m=>{const h=m.originalIndex,y=n(h+r,m.data,o),b=e?h===0?0:p[h-1]:0;return i?T.createElement(u,{...gt(u,o),height:m.size,index:m.index,key:y,type:m.type||"item"}):m.type==="group"?T.createElement(d,{...gt(d,o),"data-index":h,"data-item-index":m.index,"data-known-size":m.size,key:y,style:{...vS,top:s}},c(m.index,o)):T.createElement(f,{...gt(f,o),...gS(f,m.data),"data-index":h,"data-item-index":m.index,"data-known-size":m.size,"data-item-group-index":m.groupIndex,key:y,style:e?{...vS,top:s+b}:JV},a?l(m.index,m.groupIndex,m.data,o):l(m.index,m.data,o))});return v.jsx(v.Fragment,{children:g})}),eR=T.memo(function(){const e=$e("listState"),t=$e("topItemsIndexes").length>0,n=Ln("sizeRanges"),r=$e("useWindowScroll"),o=$e("customScrollParent"),i=Ln("windowScrollContainerState"),s=Ln("scrollContainerState"),a=o||r?i:s,l=$e("trackItemSizes"),c=$e("itemSize"),u=$e("log"),{callbackRef:d,ref:f}=F1(n,c,l,a,u,void 0,o,!1,$e("skipAnimationFrameInResizeObserver")),[p,g]=T.useState(0);Np("deviation",O=>{p!==O&&(f.current.style.marginTop=`${O}px`,g(O))});const m=$e("EmptyPlaceholder"),h=$e("FillerRow")||QV,y=$e("TableBodyComponent"),b=$e("paddingTopAddition"),x=$e("statefulTotalCount"),E=$e("context");if(x===0&&m)return v.jsx(m,{...gt(m,E)});const S=(t?e.topItems:[]).reduce((O,N)=>O+N.size,0),I=e.offsetTop+b+p-S,w=e.offsetBottom,C=I>0?v.jsx(h,{context:E,height:I},"padding-top"):null,A=w>0?v.jsx(h,{context:E,height:w},"padding-bottom"):null;return v.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...gt(y,E),children:[C,t&&v.jsx(yS,{showTopList:!0}),v.jsx(yS,{}),A]})}),tR=({children:e})=>{const t=T.useContext(Rl),n=Ln("viewportHeight"),r=Ln("fixedItemHeight"),o=tr(T.useMemo(()=>As(n,i=>Fn(i,"height")),[n]),!0,$e("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:o,style:gi(!1),children:e})},nR=({children:e})=>{const t=T.useContext(Rl),n=Ln("windowViewportRect"),r=Ln("fixedItemHeight"),o=$e("customScrollParent"),i=fp(n,o,$e("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:gi(!1),children:e})},rR=T.memo(function(e){const t=$e("useWindowScroll"),n=$e("customScrollParent"),r=Ln("fixedHeaderHeight"),o=Ln("fixedFooterHeight"),i=$e("fixedHeaderContent"),s=$e("fixedFooterContent"),a=$e("context"),l=tr(T.useMemo(()=>As(r,y=>Fn(y,"height")),[r]),!0,$e("skipAnimationFrameInResizeObserver")),c=tr(T.useMemo(()=>As(o,y=>Fn(y,"height")),[o]),!0,$e("skipAnimationFrameInResizeObserver")),u=n||t?sR:iR,d=n||t?nR:tR,f=$e("TableComponent"),p=$e("TableHeadComponent"),g=$e("TableFooterComponent"),m=i?v.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...gt(p,a),children:i()},"TableHead"):null,h=s?v.jsx(g,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...gt(g,a),children:s()},"TableFoot"):null;return v.jsx(u,{...e,...gt(u,a),children:v.jsx(d,{children:v.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...gt(f,a),children:[m,v.jsx(eR,{},"TableBody"),h]})})})}),{Component:oR,useEmitter:Np,useEmitterValue:$e,usePublisher:Ln}=Cp(ZV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},rR),iR=Op({useEmitter:Np,useEmitterValue:$e,usePublisher:Ln}),sR=_p({useEmitter:Np,useEmitterValue:$e,usePublisher:Ln}),aR=oR,bS={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},lR={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:xS,floor:jl,max:zs,min:Fp,round:wS}=Math;function SS(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function cR(e){return{...lR,items:e}}function zl(e,t){return e&&e.width===t.width&&e.height===t.height}function uR(e,t){return e&&e.column===t.column&&e.row===t.row}const dR=Ge(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:g,propsReady:m},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:E},S])=>{const I=de(0),w=de(0),C=de(bS),A=de({height:0,width:0}),O=de({height:0,width:0}),N=We(),L=We(),j=de(0),_=de(null),F=de({column:0,row:0}),z=We(),M=We(),P=de(!1),R=de(0),V=de(!0),G=de(!1),U=de(!1);et(le(g,Ve(R),Pe(([W,q])=>!!q)),()=>{Le(V,!1)}),et(le(_t(g,V,O,A,R,G),Pe(([W,q,X,ue,,D])=>W&&!q&&X.height!==0&&ue.height!==0&&!D)),([,,,,W])=>{Le(G,!0),xp(1,()=>{Le(N,W)}),Mn(le(c),()=>{Le(t,[0,0]),Le(V,!0)})}),ke(le(M,Pe(W=>W!=null&&W.scrollTop>0),Jn(0)),w),et(le(g,Ve(M),Pe(([,W])=>W!=null)),([,W])=>{W&&(Le(A,W.viewport),Le(O,W.item),Le(F,W.gap),W.scrollTop>0&&(Le(P,!0),Mn(le(c,ho(1)),q=>{Le(P,!1)}),Le(l,{top:W.scrollTop})))}),ke(le(A,be(({height:W})=>W)),d),ke(le(_t(Ae(A,zl),Ae(O,zl),Ae(F,(W,q)=>W&&W.column===q.column&&W.row===q.row),Ae(c)),be(([W,q,X,ue])=>({gap:X,item:q,scrollTop:ue,viewport:W}))),z),ke(le(_t(Ae(I),r,Ae(F,uR),Ae(O,zl),Ae(A,zl),Ae(_),Ae(w),Ae(P),Ae(V),Ae(R)),Pe(([,,,,,,,W])=>!W),be(([W,[q,X],ue,D,ee,Q,fe,,J,te])=>{const{column:ce,row:ve}=ue,{height:he,width:ge}=D,{width:ie}=ee;if(fe===0&&(W===0||ie===0))return bS;if(ge===0){const ft=wp(te,W),en=ft+Math.max(fe-1,0);return cR(SS(ft,en,Q))}const H=ES(ie,ge,ce);let $,re;J?q===0&&X===0&&fe>0?($=0,re=fe-1):($=H*jl((q+ve)/(he+ve)),re=H*xS((X+ve)/(he+ve))-1,re=Fp(W-1,zs(re,H-1)),$=Fp(re,zs(0,$))):($=0,re=-1);const me=SS($,re,Q),{bottom:Ce,top:Me}=TS(ee,ue,D,me),Ne=xS(W/H),bt=Ne*he+(Ne-1)*ve-Ce;return{bottom:Ce,itemHeight:he,items:me,itemWidth:ge,offsetBottom:bt,offsetTop:Me,top:Me}})),C),ke(le(_,Pe(W=>W!==null),be(W=>W.length)),I),ke(le(_t(A,O,C,F),Pe(([W,q,{items:X}])=>X.length>0&&q.height!==0&&W.height!==0),be(([W,q,{items:X},ue])=>{const{bottom:D,top:ee}=TS(W,ue,q,X);return[ee,D]}),mt(Ds)),t);const B=de(!1);ke(le(c,Ve(B),be(([W,q])=>q||W!==0)),B);const Y=dn(le(_t(C,I),Pe(([{items:W}])=>W.length>0),Ve(B),Pe(([[W,q],X])=>{const ue=W.items[W.items.length-1].index===q-1;return(X||W.bottom>0&&W.itemHeight>0&&W.offsetBottom===0&&W.items.length===q)&&ue}),be(([[,W]])=>W-1),mt())),ne=dn(le(Ae(C),Pe(({items:W})=>W.length>0&&W[0].index===0),Jn(0),mt())),se=dn(le(Ae(C),Ve(P),Pe(([{items:W},q])=>W.length>0&&!q),be(([{items:W}])=>({endIndex:W[W.length-1].index,startIndex:W[0].index})),mt(H1),mr(0)));ke(se,p.scrollSeekRangeChanged),ke(le(N,Ve(A,O,I,F),be(([W,q,X,ue,D])=>{const ee=Y1(W),{align:Q,behavior:fe,offset:J}=ee;let te=ee.index;te==="LAST"&&(te=ue-1),te=zs(0,te,Fp(ue-1,te));let ce=Lp(q,D,X,te);return Q==="end"?ce=wS(ce-q.height+X.height):Q==="center"&&(ce=wS(ce-q.height/2+X.height/2)),J&&(ce+=J),{behavior:fe,top:ce}})),l);const oe=Yt(le(C,be(W=>W.offsetBottom+W.bottom)),0);return ke(le(E,be(W=>({height:W.visibleHeight,width:W.visibleWidth}))),A),{customScrollParent:h,data:_,deviation:j,footerHeight:o,gap:F,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:O,overscan:n,restoreStateFrom:M,scrollBy:s,scrollContainerState:a,scrollHeight:L,scrollTo:l,scrollToIndex:N,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:y,viewportDimensions:A,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:E,...p,gridState:C,horizontalDirection:U,initialTopMostItemIndex:R,totalListHeight:oe,...f,endReached:Y,propsReady:m,rangeChanged:se,startReached:ne,stateChanged:z,stateRestoreInProgress:P,...S}},ht(Sp,Jt,Vs,aS,Lr,Tp,Fr));function ES(e,t,n){return zs(1,jl((e+n)/(jl(t)+n)))}function TS(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Lp(e,t,n,r[0].index);return{bottom:Lp(e,t,n,r[r.length-1].index)+o,top:i}}function Lp(e,t,n,r){const o=ES(e.width,n.width,t.column),i=jl(r/o),s=i*n.height+zs(0,i-1)*t.row;return s>0?s+t.row:s}const fR=Ge(()=>{const e=de(d=>`Item ${d}`),t=de({}),n=de(null),r=de("virtuoso-grid-item"),o=de("virtuoso-grid-list"),i=de(Ap),s=de("div"),a=de(pi),l=(d,f=null)=>Yt(le(t,be(p=>p[d]),mt()),f),c=de(!1),u=de(!1);return ke(Ae(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),pR=Ge(([e,t])=>({...e,...t}),ht(dR,fR)),hR=T.memo(function(){const e=yt("gridState"),t=yt("listClassName"),n=yt("itemClassName"),r=yt("itemContent"),o=yt("computeItemKey"),i=yt("isSeeking"),s=Sn("scrollHeight"),a=yt("ItemComponent"),l=yt("ListComponent"),c=yt("ScrollSeekPlaceholder"),u=yt("context"),d=Sn("itemDimensions"),f=Sn("gap"),p=yt("log"),g=yt("stateRestoreInProgress"),m=Sn("reportReadyState"),h=tr(T.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;s(b);const x=y.firstChild;if(x){const{height:E,width:S}=x.getBoundingClientRect();d({height:E,width:S})}f({column:kS("column-gap",getComputedStyle(y).columnGap,p),row:kS("row-gap",getComputedStyle(y).rowGap,p)})},[s,d,f,p]),!0,!1);return dS(()=>{e.itemHeight>0&&e.itemWidth>0&&m(!0)},[e]),g?null:v.jsx(l,{className:t,ref:h,...gt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const b=o(y.index,y.data,u);return i?v.jsx(c,{...gt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},b):T.createElement(a,{...gt(a,u),className:n,"data-index":y.index,key:b},r(y.index,y.data,u))})})}),mR=T.memo(function(){const e=yt("HeaderComponent"),t=Sn("headerHeight"),n=yt("headerFooterTag"),r=tr(T.useMemo(()=>i=>{t(Fn(i,"height"))},[t]),!0,!1),o=yt("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...gt(e,o)})}):null}),gR=T.memo(function(){const e=yt("FooterComponent"),t=Sn("footerHeight"),n=yt("headerFooterTag"),r=tr(T.useMemo(()=>i=>{t(Fn(i,"height"))},[t]),!0,!1),o=yt("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...gt(e,o)})}):null}),vR=({children:e})=>{const t=T.useContext(uS),n=Sn("itemDimensions"),r=Sn("viewportDimensions"),o=tr(T.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return T.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),v.jsx("div",{ref:o,style:gi(!1),children:e})},yR=({children:e})=>{const t=T.useContext(uS),n=Sn("windowViewportRect"),r=Sn("itemDimensions"),o=yt("customScrollParent"),i=fp(n,o,!1);return T.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),v.jsx("div",{ref:i,style:gi(!1),children:e})},bR=T.memo(function({...e}){const t=yt("useWindowScroll"),n=yt("customScrollParent"),r=n||t?wR:xR,o=n||t?yR:vR,i=yt("context");return v.jsx(r,{...e,...gt(r,i),children:v.jsxs(o,{children:[v.jsx(mR,{}),v.jsx(hR,{}),v.jsx(gR,{})]})})}),{useEmitter:CS,useEmitterValue:yt,usePublisher:Sn}=Cp(pR,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},bR),xR=Op({useEmitter:CS,useEmitterValue:yt,usePublisher:Sn}),wR=_p({useEmitter:CS,useEmitterValue:yt,usePublisher:Sn});function kS(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,on.WARN),t==="normal"?0:parseInt(t??"0",10)}const IS=e=>{const t=e.Icon??sv,n=kt();return v.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[v.jsx(t,{size:64,className:"text-disabled"}),v.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},$p=v.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),Bs=e=>v.jsx(an,{...e,as:e.as||"span",className:Ie("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function SR(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const ER=e=>{const t=T.useId(),n=kt(),r=T.useMemo(()=>SR(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return v.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[v.jsx("p",{children:v.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?v.jsxs(T.Fragment,{children:[v.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),v.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>v.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),v.jsx("nav",{children:v.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?v.jsx("li",{children:v.jsx(an,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:v.jsx(T.Fragment,{children:typeof i=="string"?v.jsx("li",{children:"..."}):v.jsx("li",{children:v.jsx(an,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?v.jsx("li",{children:v.jsx(an,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},TR=e=>{const t=T.useRef(null),n=T.useRef(null),[r,o]=T.useState("opacity-0"),i=r==="opacity-0",s=()=>o("opacity-0"),a=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return T.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;a();const u=new IntersectionObserver(d=>d.forEach(a),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),v.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:s,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:v.jsx("div",{ref:n,className:"block isolate",children:e.children})})},CR=(e,t,n)=>{const r=n.cols,o=n.loading;return v.jsx(T.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=pd(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=s===0&&n.Aside&&o===!1,f=n.Aside;return T.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?v.jsx(TR,{children:v.jsx(f,{col:i,row:t,rowIndex:e})}):null,v.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),v.jsx("span",{className:"relative",children:o?$p:c?v.jsx(T.Fragment,{children:v.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l})}):v.jsx(T.Fragment,{children:ze.nil(l)?"":l})}))})})},vi=e=>{const t=T.useId(),[n,r]=T.useState(e.open);T.useEffect(()=>r(e.open),[e.open]);const o=T.useRef(null),i=T.useMemo(()=>[Qi(10),od({fallbackAxisSideDirection:"end"}),rd(),Qv({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Cr({open:n,middleware:i,transform:!0,whileElementsMounted:zo,onOpenChange:(g,m)=>{const h=m?.relatedTarget;h&&h.dataset.floating==="true"&&!g||(r(g),e.onChange?.(g))}}),c=rs(l),u=no(l),d=ro(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=kr([c,u,d]);return v.jsxs(T.Fragment,{children:[v.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&v.jsx(to,{preserveTabOrder:!0,id:`${t}-portal`,children:v.jsx(Ho,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:v.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:s.setFloating,style:a,"aria-labelledby":t,...p(),children:[v.jsx(sy,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),v.jsx("header",{className:"mb-2",children:v.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})};var Vp={},PS;function kR(){return PS||(PS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const b=y.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((y,b)=>({...y,[b]:o(b,h)}),{}),s=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(h))},d=[{name:"expires",parse:h=>`expires=${s(h.expires??a)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${s(h.expires??a)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],f={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=f.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,b={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),E=d.reduce((S,I)=>{const w=I.parse(b);return w===""?S:S.concat(w)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=E,u()}},p=h=>{const y=new Set,b=x=>{h().removeItem(x);const E=i(h());y.forEach(S=>S(E))};return{delete:b,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const E=h().getItem(x);return!n(E)},deleteAll:()=>{t(h(),b),y.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,E)=>{h().setItem(x,JSON.stringify(E)),y.forEach(S=>S(h()))}}},g=p(()=>window.sessionStorage),m=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=g,e.createStorage=p})(Vp)),Vp}var Hs=kR();const Rp=e=>e.headerLabel??e.thead??e.id,jp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var yi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(yi||{});const zp=e=>e.type==="number"?e.valueAsNumber:e.value,IR=e=>{let t=[];return e({add:(s,a,l)=>t.push({...l,id:s,thead:a}),remove:s=>t=t.filter(a=>a.id!==s),getAll:()=>Array.from(t),filter:s=>t=Array.from(t.filter(s))}),t},PR={},AR=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const s=r.get(o.id);return s===void 0?e[i]:s})},OR=(e,t,n=PR)=>{const r=Ir()?null:Hs.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=op({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:AR(t,r?.cols)},s=>{const a=l=>{const c=s.state(),u={...c,...l};return Ir()||Hs.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(s.state()),{set:l=>a(l)}});return{...o,...i,name:e}},_R=e=>{const t=Pr(e),n=T.useRef(null),r=T.useCallback(o=>{t.current(o),o.forEach(i=>{const s=n.current.querySelector(`th[data-tableheader="${i.id}"]`);s&&(s.style.width="auto")})},[t]);return[n,r]},DR=()=>Ir()?void 0:document.querySelector('[data-component="modal-body"]'),MR=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),NR=(e,t)=>e.toSorted(MR(t)),AS=(e,t,n)=>({label:t,id:qo(),type:n,value:e.id}),FR=e=>{const t=kt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,AS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return v.jsx(T.Fragment,{children:v.jsx(vi,{title:t.tableSortDropdownTitle,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(nv,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(oo,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),v.jsx(oo,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),v.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:v.jsx(xa,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[v.jsx(Fu,{size:14})," ",t.tableSortAddButton]})})]})})})},LR=e=>{const t=kt(),[n,r]=T.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");T.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=AS(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Rp(e.col);return v.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[v.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?v.jsx($P,{size:14}):null,n==="desc"?v.jsx(LP,{size:14}):null,n==="undefined"?v.jsx(nv,{size:14}):null]})},OS=T.createContext({}),$R=OS.Provider,VR=()=>T.useContext(OS),Bp=(e,t,n,r={})=>{const o=e.id,i=e.type??yi.Text,s=t[i]??[],a=s.find(c=>c["data-default"])?.value??s[0]?.value,l=n[a];return{id:qo(),operation:l,label:Rp(e),name:o,type:i,value:"",...r}},Hp=()=>{const e=kt(),t=T.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:T.useMemo(()=>({[yi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[yi.Boolean]:[t.is,t.isNot],[yi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},RR=e=>{const t=kt(),n=Hp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Bp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(g=>u===g.id);return Bp(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=zp(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return v.jsx(T.Fragment,{children:v.jsx(vi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:v.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[v.jsx(GP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(oo,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),v.jsx(oo,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),v.jsx(Uo,{optionalText:"","data-id":l.id,onChange:a,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),v.jsx("div",{className:"flex justify-center items-center mt-5",children:v.jsx("button",{"data-id":l.id,type:"button",onClick:s,children:v.jsx(xa,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[v.jsx(Fu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},jR=({filter:e,onDelete:t,set:n})=>{const r=kt(),o=Hp(),i=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},s=a=>{const l=a.target.dataset.id||"",c=zp(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return v.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[v.jsx(oo,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),v.jsx(Uo,{optionalText:" ","data-id":e.id,onChange:s,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),v.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:v.jsx(xa,{className:"text-danger",size:14})})]})},zR={top:0,left:0,right:0,bottom:-1},BR=e=>{const t=Vu(),n=kt(),r=e.filters.filter(m=>m.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,s=e.header.allowFilter??t.table.filters??!0,a=Hp(),l=o?YP:ZP,c=T.useRef(null),u=m=>{const h=m.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==h))},d=T.useCallback(m=>{if(m===null)return;c.current=m;const h=new AbortController;return m.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:h.signal}),()=>h.abort()},[]),f=e.sorters.find(m=>e.header.id===m.value),p=f?.type?f.type===P1.Asc?"ascending":"descending":"none",g=Rp(e.header);return v.jsxs(i1,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[v.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:v.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&s?v.jsx(vi,{arrow:!0,trigger:v.jsxs("span",{children:[v.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",g]}),v.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:v.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",v.jsx("span",{className:"font-medium",children:g})]}),children:v.jsxs("ul",{className:"font-medium",children:[r.length===0?null:v.jsx(T.Fragment,{children:r.map(m=>v.jsx("li",{className:"my-1",children:v.jsx(jR,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),v.jsx("li",{children:v.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(m=>m.concat(Bp(e.header,a.options,a.operations))),children:[v.jsx(Fu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,v.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?v.jsx(LR,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:v.jsx(Be.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:zR,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:m=>{m.currentTarget.focus()},onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const h=c.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(h+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,h)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=h.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},HR=e=>{const[t,n]=_R(e.setCols);return v.jsx(n1,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:v.jsx(Dn,{children:e.headers.map((r,o)=>v.jsx(BR,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},WR=T.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:v.jsx(Dn,{children:n.children})})),qR=T.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),UR=T.forwardRef(({context:e,...t},n)=>{const r=VR(),o={...t?.style,top:ze.number(r.sticky)?`${r.sticky}px`:void 0};return v.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),GR=T.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return v.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),KR=T.forwardRef((e,t)=>e.context.loadingMore?v.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:v.jsx("tr",{role:"row",className:"bg-card-background",children:v.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:v.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),YR={TableRow:GR,TableFoot:KR,TableHead:UR,Table:qR,TableBody:WR},ZR=[0,0,0,0,0,0,0,0,0,0],XR=e=>v.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?$p:v.jsx(IS,{})}),QR=()=>v.jsx(T.Fragment,{}),JR=[],_S=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:s,getScrollRef:a,border:l=!0,pagination:c=null,useControl:u=!1,...d})=>{const f=T.useRef(null),[p,g]=T.useState(!1),m=Pr(s),h=Pr(d.loadingMore),y=T.useMemo(()=>{if(d.loading)return ZR;if(u)return d.rows;const E=new A1(d.rows);return t.length>0&&t.forEach(S=>S.value===""||Number.isNaN(S.value)?void 0:E.Where(S.name,S.operation.symbol,S.value)),r.length===0?E.Select():NR(E.Select(),r)},[d.loading,d.rows,u,t,r]);T.useEffect(()=>{if(f.current===null)return()=>{};const E=f.current,S=new IntersectionObserver(I=>I[I.length-1].isIntersecting&&h.current?(m.current?.(),void g(!0)):g(!1));return S.observe(E),()=>S.disconnect()},[h,m]);const b=y.length===0,x={cols:e,Aside:d.Aside,loading:d.loading,getRowProps:d.getRowProps,loadingMore:d.loadingMore};return v.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[v.jsx(aR,{context:x,components:YR,totalCount:y.length,itemContent:b?QR:CR,data:b?JR:y,useWindowScroll:!a,customScrollParent:a?a():void 0,fixedHeaderContent:()=>v.jsx(HR,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),b?v.jsx(XR,{loading:d.loading}):null,v.jsx("div",{"aria-hidden":"true",ref:f,className:"w-full h-0.5"}),c!==null?v.jsx(ER,{...c}):null]})},ej=({item:e,onPointerDown:t})=>{const n=ai(0);return v.jsxs(i1,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[v.jsx("button",{type:"button",className:"cursor-grab",children:v.jsx(UP,{size:14})}),v.jsx("span",{children:e.groupName})]},e.groupId)},tj=e=>{const t=kt(),n=jp(e.cols),r=JL(),[o,i]=T.useState(e.groups[0]?.thead||""),s=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new A1(e.rows).GroupBy(u),g=e.cols.find(m=>m.id===u);e.setGroups(bI(p).map((m,h)=>{const y=p[m];return{...g,groupId:qo(),groupKey:u,index:h,rows:y,groupName:m}}))},a=()=>e.setGroups([]);return v.jsx(T.Fragment,{children:v.jsxs(vi,{arrow:!1,title:t.tableGroupLabel,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(QP,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[v.jsxs("div",{className:"flex flex-nowrap items-center",children:[v.jsx(oo,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),v.jsx(el,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:v.jsx(xa,{size:16,className:"text-danger"})})]}),e.groups.length>0?v.jsxs("section",{className:"my-4",children:[v.jsx("header",{children:v.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),v.jsx(kF,{children:v.jsx(n1,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>v.jsx(ej,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},nj=e=>v.jsx("header",{className:"min-w-full mb-1",children:v.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[v.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[v.jsx("span",{children:v.jsx(RR,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),v.jsx("span",{children:v.jsx(FR,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),v.jsx("span",{children:v.jsx(tj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),v.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>v.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[v.jsxs("span",{children:[v.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),v.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[v.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),v.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=zp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),rj=(e,t)=>typeof t=="function"?t(e):t,Bl=(e,t,n)=>e===t?void 0:n?.(t),oj=e=>{const t=Vu(),n=T.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=T.useMemo(()=>jp(e.cols),[e.cols]),[i,s]=op({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const l=c=>u=>{const d=a.state();return{...d,[c]:rj(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(a,l)=>(e.set?.(a),Bl(l?.filters??[],a.filters??[],e.setFilters),Bl(l?.sorters??[],a.sorters??[],e.setSorters),Bl(l?.groups??[],a.groups??[],e.setGroups),Bl(l?.cols??[],a.cols??[],e.setCols),a)]});return v.jsx($R,{value:n,children:v.jsxs(Dn,{initial:!1,children:[r?v.jsx(nj,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?v.jsx(_S,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):v.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((a,l)=>v.jsx("div",{className:"min-w-full",children:v.jsx(_S,{...e,group:a,index:l,cols:i.cols,pagination:null,rows:a.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${a.groupId}`))})]})})},Hl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:s="",...a})=>v.jsxs(an,{...a,as:r||"div","data-component":"card",className:Ie("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4",i),children:[e?v.jsx("header",{"data-component":"card-title",className:Ie("mb-2 w-full border-b border-card-border px-6 pb-4 text-xl font-medium",s),children:e}):o,v.jsx("div",{"data-component":"card-body",className:Ie("min-w-full px-6",a.className),children:t?v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx(Bs,{className:"w-full"}),v.jsx(Bs,{className:"w-8/12"}),v.jsx(Bs,{className:"w-10/12"}),v.jsx(Bs,{className:"w-1/2"})]}):n})]});Hl.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",s=t||"h2",a=n||"nav";return v.jsxs(i,{...o,title:ze.string(o.title)?o.title:void 0,className:Ie("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[v.jsx(s,{className:"font-semibold",children:o.title}),r?v.jsx(a,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const ij=e=>{const t=e.interactive??!0,n=e.Icon??Nu;return v.jsx(Hl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:v.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[v.jsx("div",{className:Ie("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:v.jsx(n,{size:48})}),v.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[v.jsx("p",{className:"text-lg",children:e.title}),e.loading?v.jsx(Bs,{className:"h-10"}):v.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},sj=({item:e,context:t,setter:n,get:r,refs:o})=>v.jsx(to,{children:v.jsx(Bf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:v.jsxs(Dn,{presenceAffectsLayout:!0,children:[e?v.jsx(Be.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?v.jsx(Ty,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:v.jsx(Ho,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:v.jsxs(Be.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[v.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:v.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:v.jsx(No,{})})}),v.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[v.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),v.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),aj=e=>{const[t,n]=T.useState(null),r=T.useId(),{context:o,refs:i}=Cr({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),s=rs(o),a=ro(o,{role:"dialog"}),l=no(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=kr([s,a,l]),u=T.useCallback(()=>{n(null)},[]),d=T.Children.toArray(e.children);return v.jsxs(T.Fragment,{children:[v.jsx(sj,{refs:i,context:o,get:c,item:t,setter:u}),v.jsx("ul",{role:"list",children:d.map((f,p)=>{const g=f.props,m=`${r}-${p}`,h=()=>n({...g,id:m}),y=g.leading;return v.jsx(Be.li,{layout:!0,layoutId:`item-${m}`,className:"border-b border-card-border py-2 last:border-transparent",children:v.jsx(Be.div,{layoutId:`toast-${m}`,className:"relative",children:v.jsx("div",{className:"relative flex items-start space-x-3",children:v.jsxs(T.Fragment,{children:[g.avatar?v.jsx("div",{children:v.jsx("div",{className:"relative px-1",children:v.jsx("button",{onClick:h,className:"flex size-10 items-center justify-center ring-primary",children:g.avatar})})}):null,v.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:v.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[v.jsxs("button",{onClick:h,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[v.jsx("h3",{children:g.title}),v.jsx("p",{className:"text-sm leading-snug text-secondary",children:g.description})]}),y?v.jsx(y,{open:h}):null]})})]})})})},m)})})]})},lj=e=>v.jsx(T.Fragment,{children:e.children}),DS=(e,t)=>{const[n,r]=T.useState(()=>t||e);return T.useEffect(()=>{r(e)},[e]),[n,r]},MS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},NS=T.createContext(""),cj=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Wp=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const s=e[i];if(!cj(s))return s}return n==="backward"?Wp(e,e.length-1,"backward"):Wp(e,-1,"forward")},FS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Wp(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},LS={[MS.ArrowLeft]:(e,t)=>FS(t,"backward"),[MS.ArrowRight]:(e,t)=>FS(t,"forward")},uj=e=>{const[t,n]=DS(e.active),r=T.useRef(null),o=Pr(e.onChange);T.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),T.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=T.Children.toArray(e.children),s=l=>{const c=l.currentTarget;n(c.dataset.id||"")},a=l=>{if(r.current===null)return;const c=l.key;if(ze.keyof(LS,c)){const u=LS[c],d=u(l,r.current);if(d===null)return;n(d)}};return v.jsx(NS.Provider,{value:t,children:v.jsx(Hl,{className:e.className,container:Ie("pt-0 max-w-full w-full min-w-0",e.container),header:v.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[v.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),v.jsx("nav",{className:"min-w-0",children:v.jsx("ul",{onKeyDown:a,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return v.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Ie("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:v.jsx(an,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:s,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},dj=()=>T.useContext(NS),fj=e=>{const t=dj();return v.jsx(T.Fragment,{children:e.id===t?e.children:null})},$S=()=>{const e=T.useContext(Lo);return e?e.parser:wa.hsla},qp=.3,Ws={duration:qp,type:"tween",ease:"easeInOut"},VS=T.createContext(null),Up={delay:.2,duration:.3,type:"tween",ease:"easeOut"},bi={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},pj=e=>v.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx(Be.path,{className:"currentColor",initial:bi.initial,animate:bi.animate,transition:Up,d:"M18 6 6 18"}),v.jsx(Be.path,{className:"currentColor",initial:bi.initial,animate:bi.animate,transition:Up,d:"m6 6 12 12"})]}),hj=e=>v.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:v.jsx(Be.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:bi.animate,initial:bi.initial,transition:Up})}),mj={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},gj={duration:.6,delay:.2,type:"tween",ease:"circOut"},vj=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",yj=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,RS=()=>T.useContext(VS),bj=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const s=$S(),a=RS(),[l,c]=T.useState(t);T.useEffect(()=>{if(!a){c(t);return}const d=yj(e,a.currentStep,a.previousStep,a.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,a,e]);const u=vj(e,l,n);return v.jsxs(Be.button,{...i,type:"button","data-step":e,animate:u,className:"relative w-auto text-center flex items-center justify-center",children:[v.jsx(Be.div,{variants:mj,transition:gj,className:`absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),v.jsx(Be.div,{initial:!1,animate:u,transition:Ws,className:"flex relative justify-center items-center w-10 h-10 font-semibold rounded-full",variants:{error:{color:s("var(--danger-foreground)"),borderColor:s("var(--danger-hover)"),backgroundColor:s("var(--danger-DEFAULT)")},inactive:{transition:Ws,color:s("var(--disabled)"),borderColor:s("var(--card-border)"),backgroundColor:s("var(--background)")},active:{transition:Ws,color:s("var(--primary-foreground)"),borderColor:s("var(--primary-DEFAULT)"),backgroundColor:s("var(--primary-DEFAULT)")},complete:{transition:Ws,color:s("var(--success-foreground)"),borderColor:s("var(--success-DEFAULT)"),backgroundColor:s("var(--success-DEFAULT)")}},children:v.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?v.jsx(hj,{className:"size-6 text-primary-foreground"}):u==="error"?v.jsx(pj,{className:"size-6 text-danger-foreground"}):v.jsx(T.Fragment,{children:v.jsx("span",{children:e})})})}),r&&u==="active"?v.jsx("span",{className:`h-full flex items-center px-4 ${o}`,children:r}):null]})},xj=e=>{const[t,n]=e1(),r=T.useRef(e.currentStep),[o,i]=T.useState(e.currentStep);T.useEffect(()=>{if(e.currentStep===0)return;const a=t.current,l=a.querySelectorAll("[data-step]")[0],c=a.querySelector(`[data-step="${e.currentStep}"]`);if(l&&c){const u=c.getBoundingClientRect().left-l.getBoundingClientRect().left;n("div[data-name='progress']",{width:`${Math.max(0,u)}px`},Ws)}},[e.currentStep]),T.useEffect(()=>{r.current=o;const a=setTimeout(()=>{i(e.currentStep)},qp*1e3);return()=>clearTimeout(a)},[e.currentStep]);const s={currentStep:e.currentStep,previousStep:r.current,progressBarDuration:qp};return v.jsx(VS.Provider,{value:s,children:v.jsxs("div",{className:"flex relative justify-between",ref:t,children:[v.jsx("div",{className:"absolute top-1/2 h-1 w-[calc(100%)] bg-card-border"}),v.jsx("div",{"data-name":"progress",className:"absolute top-1/2 w-0 h-1 bg-success"}),e.children]})})},jS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},wj={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},zS=e=>v.jsx(Be.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:jS,exit:jS.false,transition:wj,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ie("aria-hidden:pointer-events-none",e.className),children:e.children}),Sj=Ao("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),Ej=T.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const l=()=>o?.(!1);return v.jsx(Dn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?v.jsx(Be.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Ie("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:v.jsx(zS,{"data-open":!!i,open:!!i,children:v.jsxs(an,{...s,ref:a,role:"alert","data-theme":n,as:s.as??"div",className:Ie(Sj({theme:n}),t),children:[v.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?v.jsx(rv,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?v.jsx(Nu,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?v.jsx(XP,{"aria-hidden":"true",size:20}):null,r,v.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:s.title})]}),s.children,o!==void 0&&i?v.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:v.jsx(No,{size:20})}):null]})})}):null})}),Tj=e=>v.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[v.jsxs("header",{className:"flex items-start gap-4 p-6",children:[v.jsx("div",{className:Ie("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:v.jsx("div",{children:v.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx("header",{children:v.jsx("h3",{className:"text-base leading-none",children:e.title})}),v.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?v.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),BS=(e="")=>Ie("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Gp=T.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),HS=T.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:s="",label:a,...l},c)=>{const[u,d]=T.useState(r??!1),[f,p]=T.useState(!1),[g,m]=T.useState(null),h=T.useRef([]),y=T.useRef([]),b=T.useContext(Gp),x=Sr(),E=Er(),S=UO(),I=ey(),w=x!==null,{floatingStyles:C,refs:A,context:O}=Cr({nodeId:S,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:zo,placement:w?"right":"bottom-start",middleware:[Qi({mainAxis:w?0:4,alignmentAxis:w?-4:0}),od(),rd()]}),N=ro(O,{role:"menu"}),L=no(O,{bubbles:!0}),j=dy(O,{move:!1,enabled:n,delay:{open:Ly},handleClose:Fy({blockPointerEvents:!0,requireIntent:!1})}),_=rs(O,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),F=Ja(O,{loop:!0,activeIndex:g,nested:w,listRef:h,onNavigate:m}),z=v_(O,{activeIndex:g,listRef:y,resetMs:b_,onMatch:u?m:void 0}),{getReferenceProps:M,getFloatingProps:P,getItemProps:R}=kr([j,_,N,L,F,z]);T.useEffect(()=>{if(!E)return;const G=()=>d(!1),U=B=>{B.nodeId!==S&&B.parentId===x&&d(!1)};return E.events.on("click",G),E.events.on("menuopen",U),()=>{E.events.off("click",G),E.events.off("menuopen",U)}},[E,S,x]),T.useEffect(()=>{u&&E&&E.events.emit("menuopen",{parentId:x,nodeId:S})},[E,u,S,x]);const V=o?l.className:Ie(BS(l.className));return v.jsxs(GO,{id:S,children:[v.jsx(T.Fragment,{children:l.asChild?v.jsx(qy,{...M(b.getItemProps({...l,onFocus(G){l.onFocus?.(G),p(!1),b.setHasFocusInside(!0)}})),children:a,className:V,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:dr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):v.jsxs("button",{type:"button",className:V,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:dr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(G){l.onFocus?.(G),p(!1),b.setHasFocusInside(!0)}})),children:[a,w&&v.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[v.jsx("span",{className:"sr-only",children:"Next menu"}),v.jsx(Mu,{size:14})]})]})}),v.jsx(Gp.Provider,{value:{activeIndex:g,setActiveIndex:m,getItemProps:R,setHasFocusInside:p,isOpen:u},children:v.jsx(jO,{elementsRef:h,labelsRef:y,children:u&&v.jsx(to,{children:v.jsx(Ho,{context:O,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:v.jsx(t,{...P(),ref:A.setFloating,style:{...l.style,...C},className:Ie("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",s),children:e})})})})})]})}),Cj=T.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const s=T.useContext(Gp),a=ey({label:n?null:e}),l=Er(),c=a.index===s.activeIndex;return v.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":s.isOpen,tabIndex:c?0:-1,ref:dr(a.ref,i),className:BS(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...s.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),s.setHasFocusInside(!0)}}),children:[r,t?v.jsx(t,{size:16}):null]})}),kj=T.forwardRef((e,t)=>Sr()===null?v.jsx(KO,{children:v.jsx(HS,{...e,isParent:!0,ref:t})}):v.jsx(HS,{...e,isParent:!1,ref:t})),Kp=T.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:s,container:a,...l},c)=>{const u=l.disabled||r;return v.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Ie("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[v.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Ie("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,v.jsx("span",{"data-name":"checkbox-label",className:Ie("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Ij=({children:e,className:t="",size:n,...r})=>v.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[v.jsx("input",{...r,type:"radio",className:Ie("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),Pj=By("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
18
|
-
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)});function vo(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const Yp=k.createContext(void 0);process.env.NODE_ENV!=="production"&&(Yp.displayName="DialogRootContext");function yo(e){const t=k.useContext(Yp);if(e===!1&&t===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.":vo(27));return t}const WS={};function $r(e,t){const n=k.useRef(WS);return n.current===WS&&(n.current=e(t)),n}function Wl(e,t,n,r){const o=$r(qS).current;return Oj(o,e,t,n,r)&&US(o,[e,t,n,r]),o.callback}function Aj(e){const t=$r(qS).current;return _j(t,e)&&US(t,e),t.callback}function qS(){return{callback:null,cleanup:null,refs:[]}}function Oj(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function _j(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function US(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const Dj=parseInt(k.version,10);function Zp(e){return Dj>=e}function GS(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return(Zp(19)?n?.ref:t.ref)??null}function Xp(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Mj(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Nj(e,t){return typeof e=="function"?e(t):e}function Fj(e,t){return typeof e=="function"?e(t):e}const qs={};function KS(e,t,n,r,o){let i={...Qp(e,qs)};return t&&(i=ql(i,t)),n&&(i=ql(i,n)),r&&(i=ql(i,r)),i}function Lj(e){if(e.length===0)return qs;if(e.length===1)return Qp(e[0],qs);let t={...Qp(e[0],qs)};for(let n=1;n<e.length;n+=1)t=ql(t,e[n]);return t}function ql(e,t){return YS(t)?t(e):$j(e,t)}function $j(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Xp(e.style,r);break}case"className":{e[n]=ZS(e.className,r);break}default:Vj(n,r)?e[n]=Rj(e[n],r):e[n]=r}}return e}function Vj(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function YS(e){return typeof e=="function"}function Qp(e,t){return YS(e)?e(t):e??qs}function Rj(e,t){return t?e?n=>{if(jj(n)){const o=n;Jp(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Jp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ZS(e,t){return t?e?t+" "+e:t:e}function jj(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function XS(){}const pn=Object.freeze({}),QS="data-base-ui-click-trigger",zj={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function xi(e,t,n={}){const r=t.render,o=Bj(t,n);if(n.enabled===!1)return null;const i=n.state??pn;return Hj(e,r,o,i)}function Bj(e,t={}){const{className:n,style:r,render:o}=e,{state:i=pn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?Nj(n,i):void 0,d=c?Fj(r,i):void 0,f=c?Mj(i,l):pn,p=c?Xp(f,Array.isArray(a)?Lj(a):a)??pn:pn;return typeof document<"u"&&(c?Array.isArray(s)?p.ref=Aj([p.ref,GS(o),...s]):p.ref=Wl(p.ref,GS(o),s):Wl(null,null)),c?(u!==void 0&&(p.className=ZS(p.className,u)),d!==void 0&&(p.style=Xp(p.style,d)),p):pn}function Hj(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=KS(n,t.props);return o.ref=n.ref,k.cloneElement(t,o)}if(e&&typeof e=="string")return Wj(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":vo(8))}function Wj(e,t){return e==="button"?T.createElement("button",{type:"button",...t,key:t.key}):e==="img"?T.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}let Us=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const qj={[Us.startingStyle]:""},Uj={[Us.endingStyle]:""},JS={transitionStatus(e){return e==="starting"?qj:e==="ending"?Uj:null}};let bo=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Us.startingStyle]="startingStyle",e[e.endingStyle=Us.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({});const Gj={[(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}).popupOpen]:""},Kj={[bo.open]:""},Yj={[bo.closed]:""},Zj={[bo.anchorHidden]:""},Xj={open(e){return e?Gj:null}},eE={open(e){return e?Kj:Yj},anchorHidden(e){return e?Zj:null}},Qj={...eE,...JS},tE=k.forwardRef(function(t,n){const{render:r,className:o,forceRender:i=!1,...s}=t,{store:a}=yo(),l=a.useState("open"),c=a.useState("nested"),u=a.useState("mounted"),d=a.useState("transitionStatus"),f=k.useMemo(()=>({open:l,transitionStatus:d}),[l,d]);return xi("div",t,{state:f,ref:[a.context.backdropRef,n],stateAttributesMapping:Qj,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},s],enabled:i||!c})});process.env.NODE_ENV!=="production"&&(tE.displayName="DialogBackdrop");const eh=k[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Jj=eh&&eh!==k.useLayoutEffect?eh:e=>e();function Ke(e){const t=$r(ez).current;return t.next=e,Jj(t.effect),t.trampoline}function ez(){const e={next:void 0,callback:tz,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function tz(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}let th;process.env.NODE_ENV!=="production"&&(th=new Set);function nE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");th.has(t)||(th.add(t),console.error(`Base UI: ${t}`))}}const Vt=typeof document<"u"?k.useLayoutEffect:()=>{},rE=k.createContext(void 0);process.env.NODE_ENV!=="production"&&(rE.displayName="CompositeRootContext");function nz(e=!1){const t=k.useContext(rE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":vo(16));return t}function rz(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:k.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[r,n,t,s,a,i,o])}}function oE(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=k.useRef(null),s=nz(!0)!==void 0,a=Ke(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=rz({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&k.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";o?f||nE("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):f&&nE("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[o]);const c=k.useCallback(()=>{const f=i.current;oz(f)&&s&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,s]);Vt(c,[c]);const u=k.useCallback((f={})=>{const{onClick:p,onMouseDown:g,onKeyUp:m,onKeyDown:h,onPointerDown:y,...b}=f;return KS({type:o?"button":void 0,onClick(E){if(t){E.preventDefault();return}p?.(E)},onMouseDown(E){t||g?.(E)},onKeyDown(E){if(t||(Jp(E),h?.(E)),E.baseUIHandlerPrevented)return;const S=E.target===E.currentTarget&&!o&&!a()&&!t,I=E.key==="Enter",w=E.key===" ";S&&((w||I)&&E.preventDefault(),I&&p?.(E))},onKeyUp(E){t||(Jp(E),m?.(E)),!E.baseUIHandlerPrevented&&E.target===E.currentTarget&&!o&&!t&&E.key===" "&&p?.(E)},onPointerDown(E){if(t){E.preventDefault();return}y?.(E)}},o?void 0:{role:"button"},l,b)},[t,l,o,a]),d=Ke(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function oz(e){return ot(e)&&e.tagName==="BUTTON"}const iz="none",Gs="trigger-press",sz="trigger-hover",iE="outside-press",az="close-press",sE="focus-out",lz="escape-key",cz="imperative-action";function En(e,t,n,r){let o=!1,i=!1;const s=pn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}const aE=k.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,...a}=t,{store:l}=yo(),c=l.useState("open");function u(g){c&&l.setOpen(!1,En(az,g.nativeEvent))}const{getButtonProps:d,buttonRef:f}=oE({disabled:i,native:s}),p=k.useMemo(()=>({disabled:i}),[i]);return xi("button",t,{state:p,ref:[n,f],props:[{onClick:u},a,d]})});process.env.NODE_ENV!=="production"&&(aE.displayName="DialogClose");const uz={...k};let lE=0;function dz(e,t="mui"){const[n,r]=k.useState(e),o=e||n;return k.useEffect(()=>{n==null&&(lE+=1,r(`${t}-${lE}`))},[n,t]),o}const cE=uz.useId;function Ul(e,t){if(cE!==void 0){const n=cE();return e??(t?`${t}-${n}`:n)}return dz(e,t)}function uE(e){return Ul(e,"base-ui")}const fz=[];function dE(e){k.useEffect(e,fz)}const Ks=0;class wi{static create(){return new wi}currentId=Ks;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ks,n()},t)}isStarted(){return this.currentId!==Ks}clear=()=>{this.currentId!==Ks&&(clearTimeout(this.currentId),this.currentId=Ks)};disposeEffect=()=>this.clear}function Ys(){const e=$r(wi.create).current;return dE(e.disposeEffect),e}function Gl(e){const t=$r(pz,e).current;return t.next=e,Vt(t.effect),t}function pz(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Si=typeof navigator<"u",nh=vz(),fE=bz(),pE=yz(),hz=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),hE=nh.platform==="MacIntel"&&nh.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(nh.platform),mz=Si&&/apple/i.test(navigator.vendor),rh=Si&&/android/i.test(fE)||/android/i.test(pE);Si&&fE.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const gz=pE.includes("jsdom/");function vz(){if(!Si)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function yz(){if(!Si)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function bz(){if(!Si)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const oh="data-base-ui-focusable",mE="active",gE="selected",xz="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ei(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Dt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Gi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function $n(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Vn(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function wz(e){return e.matches("html,body")}function sn(e){return e?.ownerDocument||document}function vE(e){return ot(e)&&e.matches(xz)}function yE(e){return e?e.getAttribute("role")==="combobox"&&vE(e):!1}function ih(e){return e?e.hasAttribute(oh)?e:e.querySelector(`[${oh}]`)||e:null}function Ti(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...Ti(e,o.id,n)])}function bE(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Sz(e){e.preventDefault(),e.stopPropagation()}function Ez(e){return"nativeEvent"in e}function Tz(e){return e.mozInputSource===0&&e.isTrusted?!0:rh&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Cz(e){return gz?!1:!rh&&e.width===0&&e.height===0||rh&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function xE(e,t){return["mouse","pen"].includes(e)}function wE(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var kz=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Kl=kz.join(","),SE=typeof Element>"u",Ci=SE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Yl=!SE&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Zl=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Zl(t.parentNode));return s},Iz=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},EE=function(t,n,r){if(Zl(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Kl));return n&&Ci.call(t,Kl)&&o.unshift(t),o=o.filter(r),o},Xl=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Zl(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=Xl(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Ci.call(s,Kl);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!Zl(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=Xl(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},TE=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},CE=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Iz(t))&&!TE(t)?0:t.tabIndex},Pz=function(t,n){var r=CE(t);return r<0&&n&&!TE(t)?0:r},Az=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},kE=function(t){return t.tagName==="INPUT"},Oz=function(t){return kE(t)&&t.type==="hidden"},_z=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Dz=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Mz=function(t){if(!t.name)return!0;var n=t.form||Yl(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=Dz(o,t.form);return!i||i===t},Nz=function(t){return kE(t)&&t.type==="radio"},Fz=function(t){return Nz(t)&&!Mz(t)},Lz=function(t){var n,r=t&&Yl(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Yl(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},IE=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},$z=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Ci.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(Ci.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Yl(t);if(c&&!c.shadowRoot&&o(c)===!0)return IE(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(Lz(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return IE(t);return!1},Vz=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Ci.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},sh=function(t,n){return!(n.disabled||Oz(n)||$z(n,t)||_z(n)||Vz(n))},ah=function(t,n){return!(Fz(n)||CE(n)<0||!sh(t,n))},Rz=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},PE=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=Pz(a,s),c=s?PE(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(Az).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ql=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Xl([t],n.includeContainer,{filter:ah.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Rz}):r=EE(t,n.includeContainer,ah.bind(null,n)),PE(r)},jz=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Xl([t],n.includeContainer,{filter:sh.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=EE(t,n.includeContainer,sh.bind(null,n)),r},AE=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ci.call(t,Kl)===!1?!1:ah(n,t)};const Zs=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function OE(e,t){const n=Ql(e,Zs()),r=n.length;if(r===0)return;const o=Ei(sn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function _E(e){return OE(sn(e).body,1)||e}function DE(e){return OE(sn(e).body,-1)||e}function Xs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Dt(n,r)}function zz(e){Ql(e,Zs()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ME(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Bz(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const NE=k.createContext(null);process.env.NODE_ENV!=="production"&&(NE.displayName="FloatingNodeContext");const FE=k.createContext(null);process.env.NODE_ENV!=="production"&&(FE.displayName="FloatingTreeContext");const LE=()=>k.useContext(NE)?.id||null,$E=e=>{const t=k.useContext(FE);return e??t};function Jl(e){return`data-base-ui-${e}`}const VE={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0},ec=null;let RE=globalThis.requestAnimationFrame;class Hz{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV==="test"&&RE!==requestAnimationFrame&&(RE=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const tc=new Hz;class rr{static create(){return new rr}static request(t){return tc.request(t)}static cancel(t){return tc.cancel(t)}currentId=ec;request(t){this.cancel(),this.currentId=tc.request(()=>{this.currentId=ec,t()})}cancel=()=>{this.currentId!==ec&&(tc.cancel(this.currentId),this.currentId=ec)};disposeEffect=()=>this.cancel}function lh(){const e=$r(rr.create).current;return dE(e.disposeEffect),e}function Qs(e){return e?.ownerDocument||document}const Js=k.forwardRef(function(t,n){const[r,o]=k.useState();Vt(()=>{mz&&o("button")},[]);const i={tabIndex:0,role:r};return v.jsx("span",{...t,ref:n,style:VE,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Js.displayName="FocusGuard");let jE=0;function ch(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(jE);const i=()=>e?.focus({preventScroll:n});o?i():jE=requestAnimationFrame(i)}const ki={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function zE(e){return e==="inert"?ki.inert:e==="aria-hidden"?ki["aria-hidden"]:ki.none}let nc=new WeakSet,rc={},uh=0;const BE=e=>e&&(e.host||BE(e.parentNode)),Wz=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=BE(n);return e.contains(r)?r:null}).filter(n=>n!=null);function qz(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,s=Wz(t,e),a=new Set,l=new Set(s),c=[];rc[o]||(rc[o]=new WeakMap);const u=rc[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,g=>{if(Wn(g)!=="script")if(a.has(g))f(g);else{const m=i?g.getAttribute(i):null,h=m!==null&&m!=="false",y=zE(i),b=(y.get(g)||0)+1,x=(u.get(g)||0)+1;y.set(g,b),u.set(g,x),c.push(g),b===1&&h&&nc.add(g),x===1&&g.setAttribute(o,""),!h&&i&&g.setAttribute(i,i==="inert"?"":"true")}})}return uh+=1,()=>{c.forEach(p=>{const g=zE(i),h=(g.get(p)||0)-1,y=(u.get(p)||0)-1;g.set(p,h),u.set(p,y),h||(!nc.has(p)&&i&&p.removeAttribute(i),nc.delete(p)),y||p.removeAttribute(o)}),uh-=1,uh||(ki.inert=new WeakMap,ki["aria-hidden"]=new WeakMap,ki.none=new WeakMap,nc=new WeakSet,rc={})}}function Uz(e,t=!1,n=!1){const r=sn(e[0]).body;return qz(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const dh=k.createContext(null);process.env.NODE_ENV!=="production"&&(dh.displayName="PortalContext");const HE=()=>k.useContext(dh),Gz=Jl("portal");function Kz(e={}){const{ref:t,container:n,componentProps:r=pn,elementProps:o,elementState:i}=e,s=Ul(),l=HE()?.portalNode,[c,u]=k.useState(null),[d,f]=k.useState(null),p=Ke(y=>{y!==null&&f(y)}),g=k.useRef(null);Vt(()=>{if(n===null){g.current&&(g.current=null,f(null),u(null));return}if(s==null)return;const y=(n&&(ka(n)?n:n.current))??l??document.body;if(y==null){g.current&&(g.current=null,f(null),u(null));return}g.current!==y&&(g.current=y,f(null),u(y))},[n,l,s]);const m=xi("div",r,{ref:[t,p],state:i,props:[{id:s,[Gz]:""},o]});return{portalNode:d,portalSubtree:c&&m?yr.createPortal(m,c):null}}const WE=k.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:u}=Kz({container:o,ref:n,componentProps:t,elementProps:l}),d=k.useRef(null),f=k.useRef(null),p=k.useRef(null),g=k.useRef(null),[m,h]=k.useState(null),y=m?.modal,b=m?.open,x=typeof a=="boolean"?a:!!m&&!m.modal&&m.open&&!!c;k.useEffect(()=>{if(!c||y)return;function S(I){c&&I.relatedTarget&&Xs(I)&&(I.type==="focusin"?ME:zz)(c)}return c.addEventListener("focusin",S,!0),c.addEventListener("focusout",S,!0),()=>{c.removeEventListener("focusin",S,!0),c.removeEventListener("focusout",S,!0)}},[c,y]),k.useEffect(()=>{!c||b||ME(c)},[b,c]);const E=k.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:g,portalNode:c,setFocusManagerState:h}),[c]);return v.jsxs(k.Fragment,{children:[u,v.jsxs(dh.Provider,{value:E,children:[x&&c&&v.jsx(Js,{"data-type":"outside",ref:d,onFocus:S=>{if(Xs(S,c))p.current?.focus();else{const I=m?m.domReference:null;DE(I)?.focus()}}}),x&&c&&v.jsx("span",{"aria-owns":c.id,style:zj}),c&&yr.createPortal(r,c),x&&c&&v.jsx(Js,{"data-type":"outside",ref:f,onFocus:S=>{if(Xs(S,c))g.current?.focus();else{const I=m?m.domReference:null;_E(I)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,En(sE,S.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(WE.displayName="FloatingPortal");function gr(e){return e==null?e:"current"in e?e.current:e}function Yz(e,t){const n=Nt(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const qE=20;let Vr=[];function fh(){Vr=Vr.filter(e=>e.isConnected)}function Zz(e){fh(),e&&Wn(e)!=="body"&&(Vr.push(e),Vr.length>qE&&(Vr=Vr.slice(-qE)))}function ph(){return fh(),Vr[Vr.length-1]}function Xz(e){if(!e)return null;const t=Zs();return AE(e,t)?e:Ql(e,t)[0]||e}function Qz(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Zt(e).display!=="none"}function UE(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Zs(),o=jz(e,n).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return AE(s,n)||s.hasAttribute("data-tabindex")&&!a.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Jz(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],initialFocus:i=!0,returnFocus:s=!0,restoreFocus:a=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:u="",getInsideElements:d=()=>[],nextFocusableElement:f,previousFocusableElement:p,beforeContentFocusGuardRef:g,externalTree:m}=e,h="rootStore"in t?t.rootStore:t,y=h.useState("open"),b=h.useState("domReferenceElement"),x=h.useState("floatingElement"),{events:E,dataRef:S}=h.context,I=Ke(()=>S.current.floatingContext?.nodeId),w=Ke(d),C=i===!1,A=yE(b)&&C,O=Gl(o),N=Gl(i),L=Gl(s),j=Gl(u),_=$E(m),F=HE(),z=k.useRef(null),M=k.useRef(null),P=k.useRef(!1),R=k.useRef(!1),V=k.useRef(!1),G=k.useRef(-1),U=k.useRef(""),B=k.useRef(""),Y=k.useRef(null),ne=k.useRef(null),se=Wl(Y,g,F?.beforeInsideRef),oe=Wl(ne,F?.afterInsideRef),W=Ys(),q=Ys(),X=lh(),ue=F!=null,D=ih(x),ee=Ke((J=D)=>J?Ql(J,Zs()):[]),Q=Ke(J=>{const te=ee(J);return O.current.map(()=>te).filter(Boolean).flat()});k.useEffect(()=>{if(r||!l)return;function J(ce){ce.key==="Tab"&&Dt(D,Ei(sn(D)))&&ee().length===0&&!A&&Sz(ce)}const te=sn(D);return te.addEventListener("keydown",J),()=>{te.removeEventListener("keydown",J)}},[r,b,D,l,O,A,ee,Q]),k.useEffect(()=>{if(r||!x)return;function J(te){const ce=$n(te),he=ee().indexOf(ce);he!==-1&&(G.current=he)}return x.addEventListener("focusin",J),()=>{x.removeEventListener("focusin",J)}},[r,x,ee]),k.useEffect(()=>{if(r||!y)return;const J=sn(D);function te(){V.current=!1}function ce(he){const ge=$n(he),ie=Dt(x,ge)||Dt(b,ge)||Dt(F?.portalNode,ge);V.current=!ie,B.current=he.pointerType||"keyboard"}function ve(){B.current="keyboard"}return J.addEventListener("pointerdown",ce,!0),J.addEventListener("pointerup",te,!0),J.addEventListener("pointercancel",te,!0),J.addEventListener("keydown",ve,!0),()=>{J.removeEventListener("pointerdown",ce,!0),J.removeEventListener("pointerup",te,!0),J.removeEventListener("pointercancel",te,!0),J.removeEventListener("keydown",ve,!0)}},[r,x,b,D,y,F]),k.useEffect(()=>{if(r||!c)return;function J(){R.current=!0,q.start(0,()=>{R.current=!1})}function te(ge){const ie=ge.relatedTarget,H=ge.currentTarget,$=$n(ge);queueMicrotask(()=>{const re=I(),me=h.context.triggerElements,Ce=ie?.hasAttribute(Jl("focus-guard"))&&[Y.current,ne.current,F?.beforeInsideRef.current,F?.afterInsideRef.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,gr(p),gr(f)].includes(ie),Me=!(Dt(b,ie)||Dt(x,ie)||Dt(ie,x)||Dt(F?.portalNode,ie)||ie!=null&&me.hasElement(ie)||me.hasMatchingElement(Ne=>Dt(Ne,ie))||Ce||_&&(Ti(_.nodesRef.current,re).find(Ne=>Dt(Ne.context?.elements.floating,ie)||Dt(Ne.context?.elements.domReference,ie))||bE(_.nodesRef.current,re).find(Ne=>[Ne.context?.elements.floating,ih(Ne.context?.elements.floating)].includes(ie)||Ne.context?.elements.domReference===ie)));if(H===b&&D&&UE(D,O),a&&H!==b&&!Qz($)&&Ei(sn(D))===sn(D).body){if(ot(D)&&(D.focus(),a==="popup")){X.request(()=>{D.focus()});return}const Ne=G.current,bt=ee(),ft=bt[Ne]||bt[bt.length-1]||D;ot(ft)&&ft.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(A||!l)&&ie&&Me&&!R.current&&(A||ie!==ph())&&(P.current=!0,h.setOpen(!1,En(sE,ge)))})}function ce(){V.current||(S.current.insideReactTree=!0,W.start(0,()=>{S.current.insideReactTree=!1}))}const ve=ot(b)?b:null,he=[];if(!(!x&&!ve))return ve&&(ve.addEventListener("focusout",te),ve.addEventListener("pointerdown",J),he.push(()=>{ve.removeEventListener("focusout",te),ve.removeEventListener("pointerdown",J)})),x&&(x.addEventListener("focusout",te),F&&(x.addEventListener("focusout",ce,!0),he.push(()=>{x.removeEventListener("focusout",ce,!0)})),he.push(()=>{x.removeEventListener("focusout",te)})),()=>{he.forEach(ge=>{ge()})}},[r,b,x,D,l,_,F,h,c,a,ee,A,I,O,S,W,q,X,f,p]),k.useEffect(()=>{if(r||!x||!y)return;const J=Array.from(F?.portalNode?.querySelectorAll(`[${Jl("portal")}]`)||[]),ce=(_?bE(_.nodesRef.current,I()):[]).find(ge=>yE(ge.context?.elements.domReference||null))?.context?.elements.domReference,ve=[x,ce,...J,...w(),z.current,M.current,Y.current,ne.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,gr(p),gr(f),A?b:null].filter(ge=>ge!=null),he=Uz(ve,l||A);return()=>{he()}},[y,r,b,x,l,O,F,A,_,I,w,f,p]),Vt(()=>{if(!y||r||!ot(D))return;const J=sn(D),te=Ei(J);queueMicrotask(()=>{const ce=Q(D),ve=N.current,he=typeof ve=="function"?ve(j.current||""):ve;if(he===void 0||he===!1)return;let ge;he===!0||he===null?ge=ce[0]||D:ge=gr(he),ge=ge||ce[0]||D,!Dt(D,te)&&ch(ge,{preventScroll:ge===D})})},[r,y,D,C,Q,N,j]),Vt(()=>{if(r||!D)return;const J=sn(D),te=Ei(J);Zz(te);function ce(ge){if(ge.open||(U.current=Yz(ge.nativeEvent,B.current)),ge.reason===sz&&ge.nativeEvent.type==="mouseleave"&&(P.current=!0),ge.reason===iE)if(ge.nested)P.current=!1;else if(Tz(ge.nativeEvent)||Cz(ge.nativeEvent))P.current=!1;else{let ie=!1;document.createElement("div").focus({get preventScroll(){return ie=!0,!1}}),ie?P.current=!1:P.current=!0}}E.on("openchange",ce);const ve=J.createElement("span");ve.setAttribute("tabindex","-1"),ve.setAttribute("aria-hidden","true"),Object.assign(ve.style,VE),ue&&b&&b.insertAdjacentElement("afterend",ve);function he(){const ge=L.current;let ie=typeof ge=="function"?ge(U.current):ge;if(ie===void 0||ie===!1)return null;if(ie===null&&(ie=!0),typeof ie=="boolean"){const $=b||ph();return $&&$.isConnected?$:ve}const H=b||ph()||ve;return gr(ie)||H}return()=>{E.off("openchange",ce);const ge=Ei(J),ie=Dt(x,ge)||_&&Ti(_.nodesRef.current,I(),!1).some($=>Dt($.context?.elements.floating,ge)),H=he();queueMicrotask(()=>{const $=Xz(H),re=typeof L.current!="boolean";L.current&&!P.current&&ot($)&&(!(!re&&$!==ge&&ge!==J.body)||ie)&&$.focus({preventScroll:!0}),ve.remove()})}},[r,x,D,L,S,E,_,ue,b,I]),k.useEffect(()=>{queueMicrotask(()=>{P.current=!1})},[r]),k.useEffect(()=>{if(r||!y)return;function J(ce){$n(ce)?.closest(`[${QS}]`)&&(R.current=!0)}const te=sn(D);return te.addEventListener("pointerdown",J,!0),()=>{te.removeEventListener("pointerdown",J,!0)}},[r,y,D]),Vt(()=>{if(!r&&F)return F.setFocusManagerState({modal:l,closeOnFocusOut:c,open:y,onOpenChange:h.setOpen,domReference:b}),()=>{F.setFocusManagerState(null)}},[r,F,l,y,h,c,b]),Vt(()=>{if(!(r||!D))return UE(D,O),()=>{queueMicrotask(fh)}},[r,D,O]);const fe=!r&&(l?!A:!0)&&(ue||l);return v.jsxs(k.Fragment,{children:[fe&&v.jsx(Js,{"data-type":"inside",ref:se,onFocus:J=>{if(l){const te=Q();ch(te[te.length-1])}else F?.portalNode&&(P.current=!1,Xs(J,F.portalNode)?_E(b)?.focus():gr(p??F.beforeOutsideRef)?.focus())}}),n,fe&&v.jsx(Js,{"data-type":"inside",ref:oe,onFocus:J=>{l?ch(Q()[0]):F?.portalNode&&(c&&(P.current=!0),Xs(J,F.portalNode)?DE(b)?.focus():gr(f??F.afterOutsideRef)?.focus())}})]})}function eB(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0}=t,u=k.useRef(void 0),d=lh(),f=Ys(),p=k.useMemo(()=>({onPointerDown(g){u.current=g.pointerType},onMouseDown(g){const m=u.current,h=g.nativeEvent,y=n.select("open");if(g.button!==0||i==="click"||xE(m)&&a)return;const b=r.current.openEvent,x=b?.type,E=n.select("domReferenceElement")!==g.currentTarget,S=y&&E||!(y&&s&&(!(b&&l)||x==="click"||x==="mousedown"));if(vE(h.target)){const w=En(Gs,h,h.target);S&&m==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,w)}):n.setOpen(S,w);return}const I=g.currentTarget;d.request(()=>{const w=En(Gs,h,I);S&&m==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,w)}):n.setOpen(S,w)})},onClick(g){if(i==="mousedown-only")return;const m=u.current;if(i==="mousedown"&&m){u.current=void 0;return}if(xE(m)&&a)return;const h=n.select("open"),y=r.current.openEvent,b=n.select("domReferenceElement")!==g.currentTarget,x=h&&b||!(h&&s&&(!(y&&l)||wE(y))),E=En(Gs,g.nativeEvent,g.currentTarget);x&&m==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,E)}):n.setOpen(x,E)},onKeyDown(){u.current=void 0}}),[r,i,a,n,l,s,d,f,c]);return k.useMemo(()=>o?{reference:p}:pn,[o,p])}const tB={intentional:"onClick",sloppy:"onPointerDown"};function nB(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function rB(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("referenceElement"),s=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:l}=n.context,{enabled:c=!0,escapeKey:u=!0,outsidePress:d=!0,outsidePressEvent:f="sloppy",referencePress:p=!1,referencePressEvent:g="sloppy",ancestorScroll:m=!1,bubbles:h,externalTree:y}=t,b=$E(y),x=Ke(typeof d=="function"?d:()=>!1),E=typeof d=="function"?x:d,S=k.useRef(!1),{escapeKey:I,outsidePress:w}=nB(h),C=k.useRef(null),A=Ys(),O=Ys(),N=Ke(()=>{O.clear(),l.current.insideReactTree=!1}),L=k.useRef(!1),j=k.useRef(""),_=Ke(D=>{j.current=D.pointerType}),F=Ke(()=>{const D=j.current,ee=D==="pen"||!D?"mouse":D,Q=typeof f=="function"?f():f;return typeof Q=="string"?Q:Q[ee]}),z=Ke(D=>{if(!r||!c||!u||D.key!=="Escape"||L.current)return;const ee=l.current.floatingContext?.nodeId,Q=b?Ti(b.nodesRef.current,ee):[];if(!I&&Q.length>0){let te=!0;if(Q.forEach(ce=>{ce.context?.open&&!ce.context.dataRef.current.__escapeKeyBubbles&&(te=!1)}),!te)return}const fe=Ez(D)?D.nativeEvent:D,J=En(lz,fe);n.setOpen(!1,J),!I&&!J.isPropagationAllowed&&D.stopPropagation()}),M=Ke(D=>{const ee=F();return ee==="intentional"&&D.type!=="click"||ee==="sloppy"&&D.type==="click"}),P=Ke(()=>{l.current.insideReactTree=!0,O.start(0,N)}),R=Ke((D,ee=!1)=>{if(M(D)){N();return}if(l.current.insideReactTree){N();return}if(F()==="intentional"&&ee||typeof E=="function"&&!E(D))return;const Q=$n(D),fe=`[${Jl("inert")}]`,J=sn(n.select("floatingElement")).querySelectorAll(fe),te=n.context.triggerElements;if(Q&&(te.hasElement(Q)||te.hasMatchingElement(ie=>Dt(ie,Q))))return;let ce=qe(Q)?Q:null;for(;ce&&!vn(ce);){const ie=Un(ce);if(vn(ie)||!qe(ie))break;ce=ie}if(J.length&&qe(Q)&&!wz(Q)&&!Dt(Q,n.select("floatingElement"))&&Array.from(J).every(ie=>!Dt(ce,ie)))return;if(ot(Q)&&!("touches"in D)){const ie=vn(Q),H=Zt(Q),$=/auto|scroll/,re=ie||$.test(H.overflowX),me=ie||$.test(H.overflowY),Ce=re&&Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,Me=me&&Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight,Ne=H.direction==="rtl",bt=Me&&(Ne?D.offsetX<=Q.offsetWidth-Q.clientWidth:D.offsetX>Q.clientWidth),ft=Ce&&D.offsetY>Q.clientHeight;if(bt||ft)return}const ve=l.current.floatingContext?.nodeId,he=b&&Ti(b.nodesRef.current,ve).some(ie=>Vn(D,ie.context?.elements.floating));if(Vn(D,n.select("floatingElement"))||Vn(D,n.select("domReferenceElement"))||he)return;const ge=b?Ti(b.nodesRef.current,ve):[];if(ge.length>0){let ie=!0;if(ge.forEach(H=>{H.context?.open&&!H.context.dataRef.current.__outsidePressBubbles&&(ie=!1)}),!ie)return}n.setOpen(!1,En(iE,D)),N()}),V=Ke(D=>{F()!=="sloppy"||D.pointerType==="touch"||!n.select("open")||!c||Vn(D,n.select("floatingElement"))||Vn(D,n.select("domReferenceElement"))||R(D)}),G=Ke(D=>{if(F()!=="sloppy"||!n.select("open")||!c||Vn(D,n.select("floatingElement"))||Vn(D,n.select("domReferenceElement")))return;const ee=D.touches[0];ee&&(C.current={startTime:Date.now(),startX:ee.clientX,startY:ee.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{C.current&&(C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1)}))}),U=Ke(D=>{const ee=$n(D);function Q(){G(D),ee?.removeEventListener(D.type,Q)}ee?.addEventListener(D.type,Q)}),B=Ke(D=>{const ee=S.current;if(S.current=!1,A.clear(),D.type==="mousedown"&&C.current&&!C.current.dismissOnMouseDown)return;const Q=$n(D);function fe(){D.type==="pointerdown"?V(D):R(D,ee),Q?.removeEventListener(D.type,fe)}Q?.addEventListener(D.type,fe)}),Y=Ke(D=>{if(F()!=="sloppy"||!C.current||Vn(D,n.select("floatingElement"))||Vn(D,n.select("domReferenceElement")))return;const ee=D.touches[0];if(!ee)return;const Q=Math.abs(ee.clientX-C.current.startX),fe=Math.abs(ee.clientY-C.current.startY),J=Math.sqrt(Q*Q+fe*fe);J>5&&(C.current.dismissOnTouchEnd=!0),J>10&&(R(D),A.clear(),C.current=null)}),ne=Ke(D=>{const ee=$n(D);function Q(){Y(D),ee?.removeEventListener(D.type,Q)}ee?.addEventListener(D.type,Q)}),se=Ke(D=>{F()!=="sloppy"||!C.current||Vn(D,n.select("floatingElement"))||Vn(D,n.select("domReferenceElement"))||(C.current.dismissOnTouchEnd&&R(D),A.clear(),C.current=null)}),oe=Ke(D=>{const ee=$n(D);function Q(){se(D),ee?.removeEventListener(D.type,Q)}ee?.addEventListener(D.type,Q)});k.useEffect(()=>{if(!r||!c)return;l.current.__escapeKeyBubbles=I,l.current.__outsidePressBubbles=w;const D=new wi;function ee(ce){n.setOpen(!1,En(iz,ce))}function Q(){D.clear(),L.current=!0}function fe(){D.start(Ki()?5:0,()=>{L.current=!1})}const J=sn(o);J.addEventListener("pointerdown",_,!0),u&&(J.addEventListener("keydown",z),J.addEventListener("compositionstart",Q),J.addEventListener("compositionend",fe)),E&&(J.addEventListener("click",B,!0),J.addEventListener("pointerdown",B,!0),J.addEventListener("touchstart",U,!0),J.addEventListener("touchmove",ne,!0),J.addEventListener("touchend",oe,!0),J.addEventListener("mousedown",B,!0));let te=[];return m&&(qe(s)&&(te=kn(s)),qe(o)&&(te=te.concat(kn(o))),!qe(i)&&i&&i.contextElement&&(te=te.concat(kn(i.contextElement)))),te=te.filter(ce=>ce!==J.defaultView?.visualViewport),te.forEach(ce=>{ce.addEventListener("scroll",ee,{passive:!0})}),()=>{J.removeEventListener("pointerdown",_,!0),u&&(J.removeEventListener("keydown",z),J.removeEventListener("compositionstart",Q),J.removeEventListener("compositionend",fe)),E&&(J.removeEventListener("click",B,!0),J.removeEventListener("pointerdown",B,!0),J.removeEventListener("touchstart",U,!0),J.removeEventListener("touchmove",ne,!0),J.removeEventListener("touchend",oe,!0),J.removeEventListener("mousedown",B,!0)),te.forEach(ce=>{ce.removeEventListener("scroll",ee)}),D.clear(),S.current=!1}},[l,o,i,s,u,E,r,a,m,c,I,w,z,R,B,V,U,ne,oe,_,n]),k.useEffect(N,[E,N]);const W=k.useMemo(()=>({onKeyDown:z,...p&&{[tB[g]]:D=>{n.setOpen(!1,En(Gs,D.nativeEvent))},...g!=="intentional"&&{onClick(D){n.setOpen(!1,En(Gs,D.nativeEvent))}}}}),[z,n,p,g]),q=Ke(D=>{const ee=$n(D.nativeEvent);!Dt(n.select("floatingElement"),ee)||D.button!==0||(S.current=!0)}),X=Ke(D=>{!r||!c||D.button!==0||(S.current=!0)}),ue=k.useMemo(()=>({onKeyDown:z,onPointerDown:q,onMouseDown:q,onMouseUp:q,onClickCapture:P,onMouseDownCapture(D){P(),X(D)},onPointerDownCapture(D){P(),X(D)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[z,q,P,X]);return k.useMemo(()=>c?{reference:W,floating:ue,trigger:W}:{},[c,W,ue])}var oB=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
14
|
+
`),()=>{E.contains(x)&&E.removeChild(x)}},[t]),y.jsx(kF,{isPresent:t,childRef:s,sizeRef:a,children:I.cloneElement(e,{ref:u})})}const OF=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,anchorY:l,root:c})=>{const u=jn(PF),d=T.useId();let f=!0,p=T.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:h=>{u.set(h,!0);for(const m of u.values())if(!m)return;r&&r()},register:h=>(u.set(h,!1),()=>u.delete(h))}),[n,u,r]);return i&&f&&(p={...p}),T.useMemo(()=>{u.forEach((h,m)=>u.set(m,!1))},[n]),I.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),s==="popLayout"&&(e=y.jsx(IF,{isPresent:n,anchorX:a,anchorY:l,root:c,children:e})),y.jsx(Ml.Provider,{value:p,children:e})};function PF(){return new Map}function Hw(e=!0){const t=T.useContext(Ml);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=T.useId();T.useEffect(()=>{if(e)return o(i)},[e]);const s=T.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const Ul=e=>e.key||"";function Ww(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const Wn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=Hw(s),f=T.useMemo(()=>Ww(e),[e]),p=s&&!u?[]:f.map(Ul),h=T.useRef(!0),m=T.useRef(f),g=jn(()=>new Map),v=T.useRef(new Set),[b,x]=T.useState(f),[E,S]=T.useState(f);_l(()=>{h.current=!1,m.current=f;for(let C=0;C<E.length;C++){const P=Ul(E[C]);p.includes(P)?(g.delete(P),v.current.delete(P)):g.get(P)!==!0&&g.set(P,!1)}},[E,p.length,p.join("-")]);const O=[];if(f!==b){let C=[...f];for(let P=0;P<E.length;P++){const _=E[P],F=Ul(_);p.includes(F)||(C.splice(P,0,_),O.push(_))}return i==="wait"&&O.length&&(C=O),S(Ww(C)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&E.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=T.useContext(ws);return y.jsx(y.Fragment,{children:E.map(C=>{const P=Ul(C),_=s&&!u?!1:f===E||p.includes(P),F=()=>{if(v.current.has(P))return;if(v.current.add(P),g.has(P))g.set(P,!0);else return;let j=!0;g.forEach(L=>{L||(j=!1)}),j&&(w?.(),S(m.current),s&&d?.(),r&&r())};return y.jsx(OF,{isPresent:_,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:a,anchorY:l,children:C},P)})})},AF=T.createContext(null);function _F(){const e=T.useRef(!1);return _l(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function MF(){const e=_F(),[t,n]=T.useState(0),r=T.useCallback(()=>{e.current&&n(t+1)},[t]);return[T.useCallback(()=>xt.postRender(r),[r]),t]}const qw=e=>e===!0,DF=e=>qw(e===!0)||e==="id",NF=({children:e,id:t,inherit:n=!0})=>{const r=T.useContext(ws),o=T.useContext(AF),[i,s]=MF(),a=T.useRef(null),l=r.id||o;a.current===null&&(DF(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:qw(n)&&r.group||jw()});const c=T.useMemo(()=>({...a.current,forceRender:i}),[s]);return y.jsx(ws.Provider,{value:c,children:e})},Uw=T.createContext({strict:!1}),Gw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Yw=!1;function FF(){if(Yw)return;const e={};for(const t in Gw)e[t]={isEnabled:n=>Gw[t].some(r=>!!n[r])};L0(e),Yw=!0}function Kw(){return FF(),y2()}function LF(e){const t=Kw();for(const n in e)t[n]={...t[n],...e[n]};L0(t)}const VF=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Gl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||VF.has(e)}let Zw=e=>!Gl(e);function Xw(e){typeof e=="function"&&(Zw=t=>t.startsWith("on")?!Gl(t):e(t))}try{Xw(require("@emotion/is-prop-valid").default)}catch{}function RF(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Zw(o)||n===!0&&Gl(o)||!t&&!Gl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function ip({children:e,isValidProp:t,...n}){t&&Xw(t),n={...T.useContext(vi),...n},n.isStatic=jn(()=>n.isStatic);const r=T.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return y.jsx(vi.Provider,{value:r,children:e})}const Yl=T.createContext({});function $F(e,t){if(jl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ds(n)?n:void 0,animate:Ds(r)?r:void 0}}return e.inherit!==!1?t:{}}function jF(e){const{initial:t,animate:n}=$F(e,T.useContext(Yl));return T.useMemo(()=>({initial:t,animate:n}),[Qw(t),Qw(n)])}function Qw(e){return Array.isArray(e)?e.join(" "):e}const sp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Jw(e,t,n){for(const r in t)!Wt(t[r])&&!Z0(r,n)&&(e[r]=t[r])}function zF({transformTemplate:e},t){return T.useMemo(()=>{const n=sp();return Jf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function BF(e,t){const n=e.style||{},r={};return Jw(r,n,e),Object.assign(r,zF(e,t)),r}function HF(e,t){const n={},r=BF(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const e1=()=>({...sp(),attrs:{}});function WF(e,t,n,r){const o=T.useMemo(()=>{const i=e1();return Q0(i,t,ew(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Jw(i,e.style,e),o.style={...i,...o.style}}return o}const qF=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ap(e){return typeof e!="string"||e.includes("-")?!1:!!(qF.indexOf(e)>-1||/[A-Z]/u.test(e))}function UF(e,t,n,{latestValues:r},o,i=!1,s){const l=(s??ap(e)?WF:HF)(t,r,o,e),c=RF(t,typeof e=="string",i),u=e!==T.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=T.useMemo(()=>Wt(d)?d.get():d,[d]);return T.createElement(e,{...u,children:f})}function GF({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:YF(n,r,o,e),renderState:t()}}function YF(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Wl(i[f]);let{initial:s,animate:a}=e;const l=jl(e),c=N0(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!$l(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const h=Nf(e,f[p]);if(h){const{transitionEnd:m,transition:g,...v}=h;for(const b in v){let x=v[b];if(Array.isArray(x)){const E=u?x.length-1:0;x=x[E]}x!==null&&(o[b]=x)}for(const b in m)o[b]=m[b]}}}return o}const t1=e=>(t,n)=>{const r=T.useContext(Yl),o=T.useContext(Ml),i=()=>GF(e,t,r,o);return n?i():jn(i)},KF=t1({scrapeMotionValuesFromProps:tp,createRenderState:sp}),ZF=t1({scrapeMotionValuesFromProps:tw,createRenderState:e1}),XF=Symbol.for("motionComponentSymbol");function QF(e,t,n){const r=T.useRef(n);T.useInsertionEffect(()=>{r.current=n});const o=T.useRef(null);return T.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const s=r.current;if(typeof s=="function")if(i){const a=s(i);typeof a=="function"&&(o.current=a)}else o.current?(o.current(),o.current=null):s(i);else s&&(s.current=i)},[t])}const n1=T.createContext({});function Vs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function JF(e,t,n,r,o,i){const{visualElement:s}=T.useContext(Yl),a=T.useContext(Uw),l=T.useContext(Ml),c=T.useContext(vi).reducedMotion,u=T.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=T.useContext(n1);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&eL(u.current,n,o,f);const p=T.useRef(!1);T.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const h=n[p0],m=T.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return _l(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),m.current&&d.animationState&&d.animationState.animateChanges())}),T.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),m.current=!1),d.enteringChildren=void 0)}),d}function eL(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:r1(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Vs(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function r1(e){if(e)return e.options.allowProjection!==!1?e.projection:r1(e.parent)}function lp(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&LF(r);const i=n?n==="svg":ap(e),s=i?ZF:KF;function a(c,u){let d;const f={...T.useContext(vi),...c,layoutId:tL(c)},{isStatic:p}=f,h=jF(c),m=s(c,p);if(!p&&lx){nL(f,r);const g=rL(f);d=g.MeasureLayout,h.visualElement=JF(e,m,f,o,g.ProjectionNode,i)}return y.jsxs(Yl.Provider,{value:h,children:[d&&h.visualElement?y.jsx(d,{visualElement:h.visualElement,...f}):null,UF(e,c,QF(m,h.visualElement,u),m,p,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=T.forwardRef(a);return l[XF]=e,l}function tL({layoutId:e}){const t=T.useContext(ws).id;return t&&e!==void 0?t+"-"+e:e}function nL(e,t){const n=T.useContext(Uw).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ai(!1,r,"lazy-strict-mode"):xn(!1,r,"lazy-strict-mode")}}function rL(e){const t=Kw(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function oL(e,t){if(typeof Proxy>"u")return lp;const n=new Map,r=(i,s)=>lp(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&Jd(!1,"motion() is deprecated. Use motion.create() instead."),r(i,s));return new Proxy(o,{get:(i,s)=>s==="create"?r:(n.has(s)||n.set(s,lp(s,void 0,e,t)),n.get(s))})}const iL=(e,t)=>t.isSVG??ap(e)?new nw(t):new X0(t,{allowProjection:e!==T.Fragment});class sL extends jr{constructor(t){super(t),t.animationState||(t.animationState=R2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();$l(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aL=0;class lL extends jr{constructor(){super(...arguments),this.id=aL++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const cL={animation:{Feature:sL},exit:{Feature:lL}};function Rs(e){return{point:{x:e.pageX,y:e.pageY}}}const uL=e=>t=>Wf(t)&&e(t,Rs(t));function $s(e,t,n,r){return Ls(e,t,uL(n),r)}const o1=({current:e})=>e?e.ownerDocument.defaultView:null,i1=(e,t)=>Math.abs(e-t);function dL(e,t){const n=i1(e.x,t.x),r=i1(e.y,t.y);return Math.sqrt(n**2+r**2)}const s1=new Set(["auto","scroll"]);class a1{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=up(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=dL(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=p,{timestamp:v}=Jt;this.history.push({...g,timestamp:v});const{onStart:b,onMove:x}=this.handlers;h||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=cp(h,this.transformPagePoint),xt.update(this.updatePoint,!0)},this.handlePointerUp=(p,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=up(p.type==="pointercancel"?this.lastMoveEventInfo:cp(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,b),g&&g(p,b)},!Wf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const l=Rs(t),c=cp(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Jt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,up(c,this.history)),this.removeListeners=Es($s(this.contextWindow,"pointermove",this.handlePointerMove),$s(this.contextWindow,"pointerup",this.handlePointerUp),$s(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(s1.has(r.overflowX)||s1.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),xt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Er(this.updatePoint)}}function cp(e,t){return t?{point:t(e.point)}:e}function l1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function up({point:e},t){return{point:e,delta:l1(e,c1(t)),offset:l1(e,fL(t)),velocity:pL(t,.1)}}function fL(e){return e[0]}function c1(e){return e[e.length-1]}function pL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=c1(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>zn(t)));)n--;if(!r)return{x:0,y:0};const i=Pn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function hL(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?St(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?St(n,e,r.max):Math.min(e,n)),e}function u1(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function mL(e,{top:t,left:n,bottom:r,right:o}){return{x:u1(e.x,n,o),y:u1(e.y,t,r)}}function d1(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function gL(e,t){return{x:d1(e.x,t.x),y:d1(e.y,t.y)}}function yL(e,t){let n=.5;const r=ln(e),o=ln(t);return o>r?n=li(t.min,t.max-r,e.min):r>o&&(n=li(e.min,e.max-o,t.min)),lr(0,1,n)}function vL(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const dp=.35;function bL(e=dp){return e===!1?e=0:e===!0&&(e=dp),{x:f1(e,"left","right"),y:f1(e,"top","bottom")}}function f1(e,t,n){return{min:p1(e,t),max:p1(e,n)}}function p1(e,t){return typeof e=="number"?e:e[t]||0}const xL=new WeakMap;class wL{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=jt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(Rs(d).point)):this.pauseAnimation()},s=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:h,onDragStart:m}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=o2(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),An(v=>{let b=this.getAxisMotionValue(v).get()||0;if(cr.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const E=x.layout.layoutBox[v];E&&(b=ln(E)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&xt.postRender(()=>m(d,f)),Lf(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=SL(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&g(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>An(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new a1(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:o1(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&xt.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Kl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=hL(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Vs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=mL(r.layoutBox,t):this.constraints=!1,this.elastic=bL(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&An(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=vL(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Vs(t))return!1;const r=t.current;xn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=w2(r,o.root,this.visualElement.getTransformPagePoint());let s=gL(o.layout.layoutBox,i);if(n){const a=n(v2(s));this.hasMutatedConstraints=!!a,a&&(s=$0(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=An(u=>{if(!Kl(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Lf(this.visualElement,t),r.start(Df(t,r,0,n,this.visualElement,!1))}stopAnimation(){An(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){An(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){An(n=>{const{drag:r}=this.getProps();if(!Kl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-St(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Vs(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};An(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=yL({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),An(s=>{if(!Kl(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(St(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;xL.set(this.visualElement,this);const t=this.visualElement.current,n=$s(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&I0(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Vs(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),xt.read(r);const s=Ls(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(An(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=dp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Kl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function SL(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class EL extends jr{constructor(t){super(t),this.removeGroupControls=On,this.removeListeners=On,this.controls=new wL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||On}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const h1=e=>(t,n)=>{e&&xt.postRender(()=>e(t,n))};class TL extends jr{constructor(){super(...arguments),this.removePointerDownListener=On}onPointerDown(t){this.session=new a1(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:o1(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:h1(t),onStart:h1(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&xt.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=$s(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let fp=!1;class CL extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),fp&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ql.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,fp=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||xt.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Hf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;fp=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function m1(e){const[t,n]=Hw(),r=T.useContext(ws);return y.jsx(CL,{...e,layoutGroup:r,switchLayoutGroup:T.useContext(n1),isPresent:t,safeToRemove:n})}const kL={pan:{Feature:TL},drag:{Feature:EL,ProjectionNode:zw,MeasureLayout:m1}};function g1(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&xt.postRender(()=>i(t,Rs(t)))}class IL extends jr{mount(){const{current:t}=this.node;t&&(this.unmount=i2(t,(n,r)=>(g1(this.node,r,"Start"),o=>g1(this.node,o,"End"))))}unmount(){}}class OL extends jr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Es(Ls(this.node.current,"focus",()=>this.onFocus()),Ls(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function y1(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&xt.postRender(()=>i(t,Rs(t)))}class PL extends jr{mount(){const{current:t}=this.node;t&&(this.unmount=l2(t,(n,r)=>(y1(this.node,r,"Start"),(o,{success:i})=>y1(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pp=new WeakMap,hp=new WeakMap,AL=e=>{const t=pp.get(e.target);t&&t(e)},_L=e=>{e.forEach(AL)};function ML({root:e,...t}){const n=e||document;hp.has(n)||hp.set(n,{});const r=hp.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(_L,{root:e,...t})),r[o]}function DL(e,t,n){const r=ML(t);return pp.set(e,n),r.observe(e),()=>{pp.delete(e),r.unobserve(e)}}const NL={some:0,all:1};class FL extends jr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:NL[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return DL(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(LL(t,n))&&this.startObserver()}unmount(){}}function LL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const VL={...cL,...{inView:{Feature:FL},tap:{Feature:PL},focus:{Feature:OL},hover:{Feature:IL}},...kL,...{layout:{ProjectionNode:zw,MeasureLayout:m1}}},Ye=oL(VL,iL);function RL(e){return T.useEffect(()=>()=>e(),[])}function bi(e){const t=jn(()=>wo(e)),{isStatic:n}=T.useContext(vi);if(n){const[,r]=T.useState(e);T.useEffect(()=>t.on("change",r),[])}return t}function v1(e,t){const n=bi(t()),r=()=>n.set(t());return r(),_l(()=>{const o=()=>xt.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),Er(r)}}),n}function $L(e){_s.current=[],e();const t=v1(_s.current,e);return _s.current=void 0,t}function jL(e,t,n,r){if(typeof e=="function")return $L(e);const i=typeof t=="function"?t:d2(t,n,r);return Array.isArray(e)?b1(e,i):b1([e],([s])=>i(s))}function b1(e,t){const n=jn(()=>[]);return v1(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function mp(e){return typeof e=="object"&&!Array.isArray(e)}function x1(e,t,n,r){return e==null?[]:typeof e=="string"&&mp(t)?w0(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function zL(e,t,n){return e*(t+1)}function w1(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function BL(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ss(e,o),r--)}}function HL(e,t,n,r,o,i){BL(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:St(o,i,r[s]),easing:Tx(n,s)})}function WL(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function qL(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const UL="easeInOut",GL=20;function YL(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,s=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const h=e[p];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,w1(d,h.at,u,c));continue}let[m,g,v={}]=h;v.at!==void 0&&(d=w1(d,v.at,u,c));let b=0;const x=(E,S,O,w=0,C=0)=>{const P=KL(E),{delay:_=0,times:F=Yx(P),type:j=t.type||"keyframes",repeat:L,repeatType:A,repeatDelay:D=0,...z}=S;let{ease:M=t.ease||"easeOut",duration:k}=S;const R=typeof _=="function"?_(w,C):_,$=P.length,B=Pf(j)?j:o?.[j||"keyframes"];if($<=2&&B){let oe=100;if($===2&&QL(P)){const U=P[1]-P[0];oe=Math.abs(U)}const ae={...t,...z};k!==void 0&&(ae.duration=zn(k));const ie=Hx(ae,oe,B);M=ie.ease,k=ie.duration}k??(k=i);const H=d+R;F.length===1&&F[0]===0&&(F[1]=1);const q=F.length-P.length;if(q>0&&Gx(F,q),P.length===1&&P.unshift(null),L){xn(L<GL,"Repeat count too high, must be less than 20","repeat-count-high"),k=zL(k,L);const oe=[...P],ae=[...F];M=Array.isArray(M)?[...M]:[M];const ie=[...M];for(let U=0;U<L;U++){P.push(...oe);for(let G=0;G<oe.length;G++)F.push(ae[G]+(U+1)),M.push(G===0?"linear":Tx(ie,G-1))}WL(F,L)}const W=H+k;HL(O,P,M,F,H,W),b=Math.max(R+k,b),f=Math.max(W,f)};if(Wt(m)){const E=S1(m,a);x(g,v,E1("default",E))}else{const E=x1(m,g,r,l),S=E.length;for(let O=0;O<S;O++){g=g,v=v;const w=E[O],C=S1(w,a);for(const P in g)x(g[P],ZL(v,P),E1(P,C),O,S)}}u=d,d+=b}return a.forEach((p,h)=>{for(const m in p){const g=p[m];g.sort(qL);const v=[],b=[],x=[];for(let w=0;w<g.length;w++){const{at:C,value:P,easing:_}=g[w];v.push(P),b.push(li(0,f,C)),x.push(_||"easeOut")}b[0]!==0&&(b.unshift(0),v.unshift(v[0]),x.unshift(UL)),b[b.length-1]!==1&&(b.push(1),v.push(null)),s.has(h)||s.set(h,{keyframes:{},transition:{}});const E=s.get(h);E.keyframes[m]=v;const{type:S,...O}=t;E.transition[m]={...O,duration:f,ease:x,times:b,...n}}}),s}function S1(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function E1(e,t){return t[e]||(t[e]=[]),t[e]}function KL(e){return Array.isArray(e)?e:[e]}function ZL(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const XL=e=>typeof e=="number",QL=e=>e.every(XL);function JL(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Uf(e)&&!A0(e)?new nw(t):new X0(t);n.mount(e),Ms.set(e,n)}function eV(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new O2(t);n.mount(e),Ms.set(e,n)}function tV(e,t){return Wt(e)||typeof e=="number"||typeof e=="string"&&!mp(t)}function T1(e,t,n,r){const o=[];if(tV(e,t))o.push(Ow(e,mp(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=x1(e,t,r),s=i.length;xn(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=i[a],c=l instanceof Element?JL:eV;Ms.has(l)||c(l);const u=Ms.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),o.push(...Rf(u,{...t,transition:d},{}))}}return o}function nV(e,t,n){const r=[];return YL(e,t,n,{spring:Ps}).forEach(({keyframes:i,transition:s},a)=>{r.push(...T1(a,i,s))}),r}function rV(e){return Array.isArray(e)&&e.some(Array.isArray)}function oV(e){function t(n,r,o){let i=[],s;if(rV(n))i=nV(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(s=l),i=T1(n,r,c,e)}const a=new ON(i);return s&&a.finished.then(s),e&&(e.animations.push(a),a.finished.then(()=>{Ss(e.animations,a)})),a}return t}function C1(){const e=jn(()=>({current:null,animations:[]})),t=jn(()=>oV(e));return RL(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class iV{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const sV=()=>new iV;function aV(){return jn(sV)}const k1=T.createContext(null);function lV(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=St(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?iD(e,o,o+i):e}function cV({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=jn(()=>Ye[t]),l=[],c=T.useRef(!1),u=T.useRef(null);xn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(h,m)=>{const g=l.findIndex(v=>h===v.value);g!==-1?l[g].layout=m[n]:l.push({value:h,layout:m[n]}),l.sort(dV)},updateOrder:(h,m,g)=>{if(c.current)return;const v=lV(l,h,m,g);l!==v&&(c.current=!0,r(v.map(uV).filter(b=>o.indexOf(b)!==-1)))}};T.useEffect(()=>{c.current=!1});const f=h=>{u.current=h,typeof s=="function"?s(h):s&&(s.current=h)},p={overflowAnchor:"none",...i.style};return y.jsx(a,{...i,style:p,ref:f,ignoreStrict:!0,children:y.jsx(k1.Provider,{value:d,children:e})})}const I1=T.forwardRef(cV);function uV(e){return e.value}function dV(e,t){return e.layout.min-t.layout.min}const Zl=50,O1=25,fV=new Set(["auto","scroll"]),js=new WeakMap,zs=new WeakMap;let Bs=null;function pV(){if(Bs){const e=gp(Bs,"y");e&&(zs.delete(e),js.delete(e));const t=gp(Bs,"x");t&&t!==e&&(zs.delete(t),js.delete(t)),Bs=null}}function hV(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return fV.has(r)}function gp(e,t){let n=e?.parentElement;for(;n;){if(hV(n,t))return n;n=n.parentElement}return null}function mV(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,s=e-o,a=i-e;if(s<Zl){const l=1-s/Zl;return{amount:-O1*l*l,edge:"start"}}else if(a<Zl){const l=1-a/Zl;return{amount:O1*l*l,edge:"end"}}return{amount:0,edge:null}}function gV(e,t,n,r){if(!e)return;Bs=e;const o=gp(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=mV(i,o,n);if(a===null){zs.delete(o),js.delete(o);return}if(zs.get(o)!==a){if(!(a==="start"&&r<0||a==="end"&&r>0))return;zs.set(o,a);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;js.set(o,u)}if(s>0){const c=js.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=s:o.scrollTop+=s}function P1(e,t=0){return Wt(e)?e:bi(t)}function yV({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:s=!0,...a},l){const c=jn(()=>Ye[r]),u=T.useContext(k1),d={x:P1(t.x),y:P1(t.y)},f=jL([d.x,d.y],([v,b])=>v||b?1:"unset");xn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:h,updateOrder:m,groupRef:g}=u;return y.jsx(c,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:s,onDrag:(v,b)=>{const{velocity:x,point:E}=b,S=d[p].get();m(n,S,x[p]),gV(g.current,E[p],p,x[p]),o&&o(v,b)},onDragEnd:(v,b)=>{pV(),i&&i(v,b)},onLayoutMeasure:v=>{h(n,v)},ref:l,ignoreStrict:!0,children:e})}const A1=T.forwardRef(yV);var Xl={exports:{}},yp={},Ql={exports:{}},vp={};var _1;function vV(){if(_1)return vp;_1=1;var e=T;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var p=f(),h=r({inst:{value:p,getSnapshot:f}}),m=h[0].inst,g=h[1];return i(function(){m.value=p,m.getSnapshot=f,l(m)&&g({inst:m})},[d,p,f]),o(function(){return l(m)&&g({inst:m}),d(function(){l(m)&&g({inst:m})})},[d]),s(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return vp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,vp}var bp={};var M1;function bV(){return M1||(M1=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}function t(p,h){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=h();if(!d){var g=h();i(m,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=s({inst:{value:m,getSnapshot:h}});var v=g[0].inst,b=g[1];return l(function(){v.value=m,v.getSnapshot=h,n(v)&&b({inst:v})},[p,m,h]),a(function(){return n(v)&&b({inst:v}),p(function(){n(v)&&b({inst:v})})},[p]),c(m),m}function n(p){var h=p.getSnapshot;p=p.value;try{var m=h();return!i(p,m)}catch{return!0}}function r(p,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=T,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;bp.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),bp}var D1;function N1(){return D1||(D1=1,process.env.NODE_ENV==="production"?Ql.exports=vV():Ql.exports=bV()),Ql.exports}var F1;function xV(){if(F1)return yp;F1=1;var e=T,t=N1();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return yp.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function v(O){if(!b){if(b=!0,x=O,O=f(O),p!==void 0&&m.hasValue){var w=m.value;if(p(w,O))return E=w}return E=O}if(w=E,r(x,O))return w;var C=f(O);return p!==void 0&&p(w,C)?(x=O,w):(x=O,E=C)}var b=!1,x,E,S=d===void 0?null:d;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,d,f,p]);var g=o(c,h[0],h[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},yp}var xp={};var L1;function wV(){return L1||(L1=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=T,n=N1(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;xp.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function v(O){if(!b){if(b=!0,x=O,O=f(O),p!==void 0&&m.hasValue){var w=m.value;if(p(w,O))return E=w}return E=O}if(w=E,r(x,O))return w;var C=f(O);return p!==void 0&&p(w,C)?(x=O,w):(x=O,E=C)}var b=!1,x,E,S=d===void 0?null:d;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,d,f,p]);var g=o(c,h[0],h[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),xp}var V1;function SV(){return V1||(V1=1,process.env.NODE_ENV==="production"?Xl.exports=xV():Xl.exports=wV()),Xl.exports}SV();var xi=function(){return xi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xi.apply(this,arguments)};function Hs(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function R1(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var wi=function(e){var t=T.useRef(e??{});return T.useEffect(function(){t.current=e},[e]),t},EV=function(e){var t=T.useRef(void 0);return T.useEffect(function(){t.current=e},[e]),t.current},TV=function(e){return Object.entries(e)},$1=function(e){return e instanceof Promise},j1=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},xi(xi({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},CV=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=performance.now(),c=t.apply(void 0,R1([],Hs(s),!1)),u=function(d,f){return n(function(p){return j1(d,p,i,f)})};return $1(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},kV=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,R1([],Hs(s),!1)),c=function(u){return n(function(d){return j1(u,d,i,o.current)})};return $1(l)?l.then(function(u){return c(u)}):c(l)}},wp=function(e,t,n){var r,o,i,s=Hs(T.useState(function(){return e}),2),a=s[0],l=s[1],c=wi(a),u=wi((r=n?.props)!==null&&r!==void 0?r:{}),d=wi(t),f=wi((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=wi((i=n?.interceptor)!==null&&i!==void 0?i:[]),h=T.useRef(e),m=EV(a),g=wi(m),v=T.useRef(null);T.useEffect(function(){if(v.current!==null){var E=v.current;f.current.forEach(function(S){S(a,m,E)})}},[a,f,m]);var b=Hs(T.useState(function(){var E=function(){return u.current},S=d.current({props:E,state:function(){return c.current},initialState:h.current,previousState:function(){return g.current}});return TV(S).reduce(function(O,w){var C,P=Hs(w,2),_=P[0],F=P[1];return xi(xi({},O),(C={},C[_]=n?.debug?CV(_,F,l,E,v,p.current):kV(_,F,l,E,v,p.current),C))},{})}),1),x=b[0];return[a,x,u.current]},IV=Object.defineProperty,z1=Object.getOwnPropertySymbols,OV=Object.prototype.hasOwnProperty,PV=Object.prototype.propertyIsEnumerable,B1=(e,t,n)=>t in e?IV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AV=(e,t)=>{for(var n in t||(t={}))OV.call(t,n)&&B1(e,n,t[n]);if(z1)for(var n of z1(t))PV.call(t,n)&&B1(e,n,t[n]);return e},Sp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},_V=(e,t,n,r)=>ec(Sp,e,t,n,r),Si=e=>typeof e=="object",zr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Si(e)&&!Si(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>zr(e[r],t[r]))},MV=(e,t)=>(Si(e)||Array.isArray(e))&&t?e[t]:e,DV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Jl=e=>/[0-9.]+/.test(e),H1=e=>["string","number"].includes(typeof e),W1=e=>e==null||e?.length===0||e==="",q1={eq:zr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:W1,notEmpty:e=>!W1(e),in:(e,t)=>Sp(t,n=>zr(e,n)),notIn:(e,t)=>U1(t,n=>!zr(e,n))},NV=e=>{if(e in q1)return q1[e];throw new Error("Linq - Symbol not found")},Ei=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},ec=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=NV(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},FV=(e,t,n,r)=>ec(Ei,e,t,n,r),U1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},LV=(e,t,n,r)=>ec(U1,e,t,n,r),G1=e=>{if(e===null)return null;const t=AV({},e);return Object.keys(t).forEach(n=>t[n]=Si(e[n])?G1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Y1=(e,t)=>{if(Si(t)){for(let n=0;n<e.length;n++){const r=e[n];if(zr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(zr(t,r))return!0}return!1},VV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},RV=e=>Ei(e,(t,n,r)=>Si(t)?n===r.findIndex(o=>zr(o,t)):n===r.indexOf(t)),$V=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},K1=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},jV=(e,t)=>K1(e,n=>n[t]),Z1=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},zV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},BV=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Jl(e)&&Jl(t)?r.map(s=>Number.parseInt(s)):r},Ep=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Jl(e)&&Jl(t)){const o=[],[i,s]=zV(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return BV(e,t,r)},HV=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Ep(r,o,1):Ep(r,i,Number.parseInt(o,10))}return H1(e)&&H1(t)?Ep(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Tp=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},X1=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},WV=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},qV=(e,t,n,r)=>ec(WV,e,t,n,r),Q1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(DV(t))},J1=(e=>(e.Asc="asc",e.Desc="desc",e))(J1||{}),UV=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),GV=(e,t)=>e.sort(UV(t)),YV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Ei(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},KV=class Pm{constructor(t=[]){this.array=t}static Range(...t){return HV(...t)}static New(t){return new Pm(t)}Where(t,n,r){return this.array=FV(this.array,t,n,r),this}Some(t,n,r){return _V(this.array,t,n,r)}All(t,n,r){return LV(this.array,t,n,r)}Reverse(){return this.array=X1(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=qV(this.array,t,n,r),this}Distinct(){return this.array=RV(this.array),this}First(t){return t===void 0?this.array[0]:$V(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?Tp((n,r)=>n+r,0,this.array):Tp((n,r)=>n+MV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return jV(this.array,t)}GroupWith(t){return K1(this.array,t)}Except(t){return Ei(this.array,n=>!Y1(t,n))}Intersect(t){return Ei(this.array,n=>Y1(t,n))}OrderBy(t,n){let r;return r=t?Q1(this.array,t):this.array.toSorted(),this.array=n==="desc"?X1(r):r,this}Includes(t){return Sp(this.array,n=>zr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return Tp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Z1(this.array,n=>[t,n]))}Zip(t,n){return Z1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Ei(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Pm(G1(this.array))}ToObject(t){return VV(this.array,t)}Sort(t){return Array.isArray(t)?GV(this.array,t):Q1(this.array,t)}Unique(t){return YV(this.array,t)}},eS=KV;const tc=0,Br=1,Ti=2,tS=4;function nS(e){return()=>e}function ZV(e){e()}function Ws(e,t){return n=>e(t(n))}function rS(e,t){return()=>e(t)}function XV(e,t){return n=>e(t,n)}function Cp(e){return e!==void 0}function QV(...e){return()=>{e.map(ZV)}}function Ci(){}function nc(e,t){return t(e),e}function JV(e,t){return t(e)}function Et(...e){return e}function lt(e,t){return e(Br,t)}function je(e,t){e(tc,t)}function kp(e){e(Ti)}function kt(e){return e(tS)}function Pe(e,t){return lt(e,XV(t,tc))}function qn(e,t){const n=e(Br,r=>{n(),t(r)});return n}function oS(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function iS(e,t){return e===t}function Tt(e=iS){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function De(e){return t=>n=>{e(n)&&t(n)}}function we(e){return t=>Ws(t,e)}function ur(e){return t=>()=>{t(e)}}function me(e,...t){const n=eR(...t);return((r,o)=>{switch(r){case Ti:kp(e);return;case Br:return lt(e,n(o))}})}function dr(e,t){return n=>r=>{n(t=e(t,r))}}function To(e){return t=>n=>{e>0?e--:t(n)}}function Tr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Be(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);lt(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>{i([s].concat(t))};n===o?a():r=a}}function eR(...e){return t=>e.reduceRight(JV,t)}function tR(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Br:return i?n===i?void 0:(r(),n=i,t=lt(e,i),t):(r(),Ci);case Ti:r(),n=null;return}}}function ye(e){let t=e;const n=Xe();return((r,o)=>{switch(r){case tc:t=o;break;case Br:{o(t);break}case tS:return t}return n(r,o)})}function on(e,t){return nc(ye(t),n=>Pe(e,n))}function Xe(){const e=[];return((t,n)=>{switch(t){case tc:e.slice().forEach(r=>{r(n)});return;case Ti:e.splice(0,e.length);return;case Br:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function wn(e){return nc(Xe(),t=>Pe(e,t))}function et(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:nR(),singleton:n}}const nR=()=>Symbol();function rR(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:s})=>{if(s&&t.has(i))return t.get(i);const a=r(o.map(l=>n(l)));return s&&t.set(i,a),a};return n(e)}function zt(...e){const t=Xe(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);lt(i,l=>{n[s]=l,r=r|a,r===o&&je(t,n)})}),function(i,s){switch(i){case Ti:{kp(t);return}case Br:return r===o&&s(n),lt(t,s)}}}function Ne(e,t=iS){return me(e,Tt(t))}function Ip(...e){return function(t,n){switch(t){case Ti:return;case Br:return QV(...e.map(r=>lt(r,n)))}}}var mn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(mn||{});const oR={0:"debug",3:"error",1:"log",2:"warn"},iR=()=>typeof globalThis>"u"?window:globalThis,Hr=et(()=>{const e=ye(3);return{log:ye((t,n,r=1)=>{var o;const i=(o=iR().VIRTUOSO_LOG_LEVEL)!=null?o:kt(e);r>=i&&console[oR[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function fr(e,t,n){return Op(e,t,n).callbackRef}function Op(e,t,n){const r=T.useRef(null);let o=s=>{};const i=T.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const a=()=>{const l=s[0].target;l.offsetParent!==null&&e(l)};n?a():requestAnimationFrame(a)}):null,[e,n]);return o=s=>{s&&t?(i?.observe(s),r.current=s):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function sS(e,t,n,r,o,i,s,a,l){const c=T.useCallback(u=>{const d=sR(u.children,t,a?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let h;p&&(h=f.ownerDocument.defaultView);const m=s?a?s.scrollLeft:s.scrollTop:p?a?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:a?f.scrollLeft:f.scrollTop,g=s?a?s.scrollWidth:s.scrollHeight:p?a?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:a?f.scrollWidth:f.scrollHeight,v=s?a?s.offsetWidth:s.offsetHeight:p?a?h.innerWidth:h.innerHeight:a?f.offsetWidth:f.offsetHeight;r({scrollHeight:g,scrollTop:Math.max(m,0),viewportHeight:v}),i?.(a?aS("column-gap",getComputedStyle(u).columnGap,o):aS("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,s,r,a]);return Op(c,n,l)}function sR(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},mn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function aS(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,mn.WARN),t==="normal"?0:parseInt(t??"0",10)}function Pp(e,t,n){const r=T.useRef(null),o=T.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),h=c.top-p.top;f=p.height-Math.max(0,h),d=h+t.scrollTop}else{const p=s.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:s}=Op(o,!0,n),a=T.useCallback(()=>{o(s.current)},[o,s]);return T.useEffect(()=>{var l;if(t){t.addEventListener("scroll",a);const c=new ResizeObserver(()=>{requestAnimationFrame(a)});return c.observe(t),()=>{t.removeEventListener("scroll",a),c.unobserve(t)}}else{const c=(l=s.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",a),c?.addEventListener("resize",a),()=>{c?.removeEventListener("scroll",a),c?.removeEventListener("resize",a)}}},[a,t,s]),i}const cn=et(()=>{const e=Xe(),t=Xe(),n=ye(0),r=Xe(),o=ye(0),i=Xe(),s=Xe(),a=ye(0),l=ye(0),c=ye(0),u=ye(0),d=Xe(),f=Xe(),p=ye(!1),h=ye(!1),m=ye(!1);return Pe(me(e,we(({scrollTop:g})=>g)),t),Pe(me(e,we(({scrollHeight:g})=>g)),s),Pe(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:a,horizontalDirection:h,scrollBy:f,scrollContainerState:e,scrollHeight:s,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),qs={lvl:0};function lS(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({end:a-1,start:r,value:o}),r=a,o=l}return i.push({end:1/0,start:r,value:o}),i}function mt(e){return e===qs}function Us(e,t){if(!mt(e))return t===e.k?e.v:t<e.k?Us(e.l,t):Us(e.r,t)}function Un(e,t,n="k"){if(mt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Un(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Un(e.l,t,n)}function Sn(e,t,n){return mt(e)?dS(t,n,1):t===e.k?qt(e,{k:t,v:n}):t<e.k?fS(qt(e,{l:Sn(e.l,t,n)})):fS(qt(e,{r:Sn(e.r,t,n)}))}function ki(){return qs}function Ii(e,t,n){if(mt(e))return[];const r=Un(e,t)[0];return aR(_p(e,r,n))}function Ap(e,t){if(mt(e))return qs;const{k:n,l:r,r:o}=e;if(t===n){if(mt(r))return o;if(mt(o))return r;{const[i,s]=uS(r);return rc(qt(e,{k:i,l:cS(r),v:s}))}}else return t<n?rc(qt(e,{l:Ap(r,t)})):rc(qt(e,{r:Ap(o,t)}))}function Co(e){return mt(e)?[]:[...Co(e.l),{k:e.k,v:e.v},...Co(e.r)]}function _p(e,t,n){if(mt(e))return[];const{k:r,l:o,r:i,v:s}=e;let a=[];return r>t&&(a=a.concat(_p(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(_p(i,t,n))),a}function rc(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Mp(t))return pS(qt(e,{lvl:n-1}));if(!mt(t)&&!mt(t.r))return qt(t.r,{l:qt(t,{r:t.r.l}),lvl:n,r:qt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Mp(e))return Dp(qt(e,{lvl:n-1}));if(!mt(r)&&!mt(r.l)){const o=r.l,i=Mp(o)?r.lvl-1:r.lvl;return qt(o,{l:qt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Dp(qt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function qt(e,t){return dS(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function cS(e){return mt(e.r)?e.l:rc(qt(e,{r:cS(e.r)}))}function Mp(e){return mt(e)||e.lvl>e.r.lvl}function uS(e){return mt(e.r)?[e.k,e.v]:uS(e.r)}function dS(e,t,n,r=qs,o=qs){return{k:e,l:r,lvl:n,r:o,v:t}}function fS(e){return Dp(pS(e))}function pS(e){const{l:t}=e;return!mt(t)&&t.lvl===e.lvl?qt(t,{r:qt(e,{l:t.r})}):e}function Dp(e){const{lvl:t,r:n}=e;return!mt(n)&&!mt(n.r)&&n.lvl===t&&n.r.lvl===t?qt(n,{l:qt(e,{r:n.l}),lvl:t+1}):e}function aR(e){return lS(e,({k:t,v:n})=>({index:t,value:n}))}function hS(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Gs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Np=et(()=>({recalcInProgress:ye(!1)}),[],{singleton:!0});function mS(e,t,n){return e[oc(e,t,n)]}function oc(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function lR(e,t,n,r){const o=oc(e,t,r),i=oc(e,n,r,o);return e.slice(o,i+1)}function Gn(e,t){return Math.round(e.getBoundingClientRect()[t])}function ic(e){return!mt(e.groupOffsetTree)}function Fp({index:e},t){return t===e?0:t<e?-1:1}function cR(){return{groupIndices:[],groupOffsetTree:ki(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ki()}}function uR(e,t){let n=mt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:s}=r;if(n=Math.min(n,s),mt(e)){e=Sn(e,0,i);continue}const a=Ii(e,s-1,o+1);if(a.some(yR(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of a)l?(o>=d||i===f)&&(e=Ap(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=Sn(e,o+1,f));c&&(e=Sn(e,s,i))}return[e,n]}function dR(e){return typeof e.groupIndex<"u"}function fR({offset:e},t){return t===e?0:t<e?-1:1}function Ys(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=mS(t,e,Fp),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function gS(e,t){if(!ic(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function yS(e,t,n){if(dR(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=gS(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function pR(e,t,n,r=0){return r>0&&(t=Math.max(t,mS(e,r,Fp).offset)),lS(lR(e,t,n,fR),gR)}function hR(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,mn.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&mt(i)&&t.length===2){const f=t[0].size,p=t[1].size;s=n.reduce((h,m)=>Sn(Sn(h,m,f),m+1,p),s)}else[s,a]=uR(s,t);if(s===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Lp(e.offsetTree,a,s,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>Sn(f,p,Ys(p,d,o)),ki()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:s}}function mR(e){return Co(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function vS(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Lp(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=oc(o,t-1,Fp),a=o[l].offset;const c=Un(n,t-1);i=c[0],s=c[1],o.length&&o[l].size===Un(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ii(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({index:c,offset:f,size:u}),i=c,a=f,s=u}return{lastIndex:i,lastOffset:a,lastSize:s,offsetTree:o}}function gR(e){return{index:e.index,value:e}}function yR(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const vR={offsetHeight:"height",offsetWidth:"width"},pr=et(([{log:e},{recalcInProgress:t}])=>{const n=Xe(),r=Xe(),o=on(r,0),i=Xe(),s=Xe(),a=ye(0),l=ye([]),c=ye(void 0),u=ye(void 0),d=ye(void 0),f=ye(void 0),p=ye((w,C)=>Gn(w,vR[C])),h=ye(void 0),m=ye(0),g=cR(),v=on(me(n,Be(l,e,m),dr(hR,g),Tt()),g),b=on(me(l,Tt(),dr((w,C)=>({current:C,prev:w.current}),{current:[],prev:[]}),we(({prev:w})=>w)),[]);Pe(me(l,De(w=>w.length>0),Be(v,m),we(([w,C,P])=>{const _=w.reduce((F,j,L)=>Sn(F,j,Ys(j,C.offsetTree,P)||L),ki());return{...C,groupIndices:w,groupOffsetTree:_}})),v),Pe(me(r,Be(v),De(([w,{lastIndex:C}])=>w<C),we(([w,{lastIndex:C,lastSize:P}])=>[{endIndex:C,size:P,startIndex:w}])),n),Pe(c,u);const x=on(me(c,we(w=>w===void 0)),!0);Pe(me(u,De(w=>w!==void 0&&mt(kt(v).sizeTree)),we(w=>{const C=kt(d),P=kt(l).length>0;return C?P?[{endIndex:0,size:C,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Pe(me(f,De(w=>w!==void 0&&w.length>0&&mt(kt(v).sizeTree)),we(w=>{const C=[];let P=w[0],_=0;for(let F=1;F<w.length;F++){const j=w[F];j!==P&&(C.push({endIndex:F-1,size:P,startIndex:_}),P=j,_=F)}return C.push({endIndex:w.length-1,size:P,startIndex:_}),C})),n),Pe(me(l,Be(d,u),De(([,w,C])=>w!==void 0&&C!==void 0),we(([w,C,P])=>{const _=[];for(let F=0;F<w.length;F++){const j=w[F],L=w[F+1];_.push({startIndex:j,endIndex:j,size:C}),L!==void 0&&_.push({startIndex:j+1,endIndex:L-1,size:P})}return _})),n);const E=wn(me(n,Be(v),dr(({sizes:w},[C,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:g}),we(w=>w.changed)));lt(me(a,dr((w,C)=>({diff:w.prev-C,prev:C}),{diff:0,prev:0}),we(w=>w.diff)),w=>{const{groupIndices:C}=kt(v);if(w>0)je(t,!0),je(i,w+vS(w,C));else if(w<0){const P=kt(b);P.length>0&&(w-=vS(-w,P)),je(s,w)}}),lt(me(a,Be(e)),([w,C])=>{w<0&&C("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},mn.ERROR)});const S=wn(i);Pe(me(i,Be(v),we(([w,C])=>{const P=C.groupIndices.length>0,_=[],F=C.lastSize;if(P){const j=Us(C.sizeTree,0);let L=0,A=0;for(;L<w;){const z=C.groupIndices[A],M=C.groupIndices.length===A+1?1/0:C.groupIndices[A+1]-z-1;_.push({endIndex:z,size:j,startIndex:z}),_.push({endIndex:z+1+M-1,size:F,startIndex:z+1}),A++,L+=M+1}const D=Co(C.sizeTree);return L!==w&&D.shift(),D.reduce((z,{k:M,v:k})=>{let R=z.ranges;return z.prevSize!==0&&(R=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:k,ranges:R}},{prevIndex:w,prevSize:0,ranges:_}).ranges}return Co(C.sizeTree).reduce((j,{k:L,v:A})=>({prevIndex:L+w,prevSize:A,ranges:[...j.ranges,{endIndex:L+w-1,size:j.prevSize,startIndex:j.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),n);const O=wn(me(s,Be(v,m),we(([w,{offsetTree:C},P])=>{const _=-w;return Ys(_,C,P)})));return Pe(me(s,Be(v,m),we(([w,C,P])=>{if(C.groupIndices.length>0){if(mt(C.sizeTree))return C;let _=ki();const F=kt(b);let j=0,L=0,A=0;for(;j<-w;){A=F[L];const D=F[L+1]-A-1;L++,j+=D+1}if(_=Co(C.sizeTree).reduce((D,{k:z,v:M})=>Sn(D,Math.max(0,z+w),M),_),j!==-w){const D=Us(C.sizeTree,A);_=Sn(_,0,D);const z=Un(C.sizeTree,-w+1)[1];_=Sn(_,1,z)}return{...C,sizeTree:_,...Lp(C.offsetTree,0,_,P)}}else{const _=Co(C.sizeTree).reduce((F,{k:j,v:L})=>Sn(F,Math.max(0,j+w),L),ki());return{...C,sizeTree:_,...Lp(C.offsetTree,0,_,P)}}})),v),{beforeUnshiftWith:S,data:h,defaultItemSize:u,firstItemIndex:a,fixedItemSize:c,fixedGroupSize:d,gap:m,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:E,shiftWith:s,shiftWithOffset:O,sizeRanges:n,sizes:v,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},Et(Hr,Np),{singleton:!0});function bR(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const bS=et(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Xe(),s=Xe(),a=wn(me(i,we(bR)));return Pe(me(a,we(l=>l.totalCount)),n),Pe(me(a,we(l=>l.groupIndices)),e),Pe(me(zt(o,t,r),De(([l,c])=>ic(c)),we(([l,c,u])=>Un(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Tt(),we(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Et(pr,cn)),Wr=et(([{log:e}])=>{const t=ye(!1),n=wn(me(t,De(r=>r),Tt()));return lt(t,r=>{r&&kt(e)("props updated",{},mn.DEBUG)}),{didMount:n,propsReady:t}},Et(Hr),{singleton:!0}),xR=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function xS(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!xR)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ks=et(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=Xe(),h=Xe(),m=ye(0);let g=null,v=null,b=null;function x(){g&&(g(),g=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),je(l,!1)}return Pe(me(p,Be(n,d,r,m,a,s,f),Be(e,i,o),we(([[E,S,O,w,C,P,_,F],j,L,A])=>{const D=xS(E),{align:z,behavior:M,offset:k}=D,R=w-1,$=yS(D,S,R);let B=Ys($,S.offsetTree,j)+P;z==="end"?(B+=L+Un(S.sizeTree,$)[1]-O+A,$===R&&(B+=_)):z==="center"?B+=(L+Un(S.sizeTree,$)[1]-O+A)/2:B-=C,k&&(B+=k);const H=q=>{x(),q?(F("retrying to scroll to",{location:E},mn.DEBUG),je(p,E)):(je(h,!0),F("list did not change, scroll successful",{},mn.DEBUG))};if(x(),M==="smooth"){let q=!1;b=lt(t,W=>{q=q||W}),g=qn(u,()=>{H(q)})}else g=qn(me(t,wR(150)),H);return v=setTimeout(()=>{x()},1200),je(l,!0),F("scrolling from index to",{behavior:M,index:$,top:B},mn.DEBUG),{behavior:M,top:B}})),c),{scrollTargetReached:h,scrollToIndex:p,topListHeight:m}},Et(pr,cn,Hr),{singleton:!0});function wR(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Vp(e,t){e==0?t():requestAnimationFrame(()=>{Vp(e-1,t)})}function Rp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Zs=et(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:s}])=>{const a=ye(!0),l=ye(0),c=ye(!0);return Pe(me(s,Be(l),De(([u,d])=>!!d),ur(!1)),a),Pe(me(s,Be(l),De(([u,d])=>!!d),ur(!1)),c),lt(me(zt(t,s),Be(a,n,e,c),De(([[,u],d,{sizeTree:f},p,h])=>u&&(!mt(f)||Cp(p))&&!d&&!h),Be(l)),([,u])=>{qn(o,()=>{je(c,!0)}),Vp(4,()=>{qn(r,()=>{je(a,!0)}),je(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},Et(pr,cn,Ks,Wr),{singleton:!0});function wS(e,t){return Math.abs(e-t)<1.01}const Xs="up",Qs="down",SR="none",ER={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},TR=0,Js=et(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const s=ye(!1),a=ye(!0),l=Xe(),c=Xe(),u=ye(4),d=ye(TR),f=on(me(Ip(me(Ne(o),To(1),ur(!0)),me(Ne(o),To(1),ur(!1),oS(100))),Tt()),!1),p=on(me(Ip(me(n,ur(!0)),me(n,ur(!1),oS(200))),Tt()),!1);Pe(me(zt(Ne(o),Ne(d)),we(([b,x])=>b<=x),Tt()),a),Pe(me(a,Tr(50)),c);const h=wn(me(zt(r,Ne(i),Ne(t),Ne(e),Ne(u)),dr((b,[{scrollHeight:x,scrollTop:E},S,O,w,C])=>{const P=E+S-x>-C,_={scrollHeight:x,scrollTop:E,viewportHeight:S};if(P){let j,L;return E>b.state.scrollTop?(j="SCROLLED_DOWN",L=b.state.scrollTop-E):(j="SIZE_DECREASED",L=b.state.scrollTop-E||b.scrollTopDelta),{atBottom:!0,atBottomBecause:j,scrollTopDelta:L,state:_}}let F;return _.scrollHeight>b.state.scrollHeight?F="SIZE_INCREASED":S<b.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":E<b.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},ER),Tt((b,x)=>b&&b.atBottom===x.atBottom))),m=on(me(r,dr((b,{scrollHeight:x,scrollTop:E,viewportHeight:S})=>{if(wS(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:E};{const O=x-(E+S)<1;return b.scrollTop!==E&&O?{changed:!0,jump:b.scrollTop-E,scrollHeight:x,scrollTop:E}:{changed:!0,jump:0,scrollHeight:x,scrollTop:E}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),De(b=>b.changed),we(b=>b.jump)),0);Pe(me(h,we(b=>b.atBottom)),s),Pe(me(s,Tr(50)),l);const g=ye(Qs);Pe(me(r,we(({scrollTop:b})=>b),Tt(),dr((b,x)=>kt(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?Xs:Qs,prevScrollTop:x},{direction:Qs,prevScrollTop:0}),we(b=>b.direction)),g),Pe(me(r,Tr(50),ur(SR)),g);const v=ye(0);return Pe(me(f,De(b=>!b),ur(0)),v),Pe(me(o,Tr(100),Be(f),De(([b,x])=>x),dr(([b,x],[E])=>[x,E],[0,0]),we(([b,x])=>x-b)),v),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:s,isAtTop:a,isScrolling:f,lastJumpDueToItemResize:m,scrollDirection:g,scrollVelocity:v}},Et(cn)),ea="top",ta="bottom",SS="none";function ES(e,t,n){return typeof e=="number"?n===Xs&&t===ea||n===Qs&&t===ta?e:0:n===Xs?t===ea?e.main:e.reverse:t===ta?e.main:e.reverse}function TS(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const $p=et(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Xe(),s=ye(0),a=ye(0),l=ye(0),c=on(me(zt(Ne(r),Ne(o),Ne(n),Ne(i,Gs),Ne(l),Ne(s),Ne(t),Ne(e),Ne(a)),we(([u,d,f,[p,h],m,g,v,b,x])=>{const E=u-b,S=g+v,O=Math.max(f-E,0);let w=SS;const C=TS(x,ea),P=TS(x,ta);return p-=b,p+=f+v,h+=f+v,h-=b,p>u+S-C&&(w=Xs),h<u-O+d+P&&(w=Qs),w!==SS?[Math.max(E-f-ES(m,ea,w)-C,0),E-O-v+d+ES(m,ta,w)+P]:null}),De(u=>u!=null),Tt(Gs)),[0,0]);return{increaseViewportBy:a,listBoundary:i,overscan:l,topListHeight:s,visibleRange:c}},Et(cn),{singleton:!0});function CR(e,t,n){if(ic(t)){const r=gS(e,t);return[{index:Un(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const jp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function sc(e,t,n,r,o,i){const{lastIndex:s,lastOffset:a,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-s,f=a+d*l+(d-1)*r,p=c,h=f-u;return{bottom:u,firstItemIndex:i,items:kS(e,o,i),offsetBottom:h,offsetTop:c,top:p,topItems:kS(t,o,i),topListHeight:t.reduce((m,g)=>g.size+m,0),totalCount:n}}function CS(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=Rp(t,a),c=Array.from({length:a}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return sc(c,[],a,o,n,r)}function kS(e,t,n){if(e.length===0)return[];if(!ic(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=Ii(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function IS(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const ko=et(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:h}])=>{const m=ye([]),g=ye(0),v=Xe(),b=ye(0);Pe(i.topItemsIndexes,m);const x=on(me(zt(p,h,Ne(l,Gs),Ne(o),Ne(r),Ne(c),u,Ne(m),Ne(t),Ne(n),Ne(b),e),De(([w,C,,P,,,,,,,,_])=>{const F=_&&_.length!==P;return w&&!C&&!F}),we(([,,[w,C],P,_,F,j,L,A,D,z,M])=>{var k,R,$,B;const H=_,{offsetTree:q,sizeTree:W}=H,oe=kt(g);if(P===0)return{...jp,totalCount:P};if(w===0&&C===0)return oe===0?{...jp,totalCount:P}:CS(oe,F,_,A,D,M||[]);if(mt(W))return oe>0?null:sc(CR(Rp(F,P),H,M),[],P,D,H,A);const ae=[];if(L.length>0){const ne=L[0],te=L[L.length-1];let re=0;for(const Q of Ii(W,ne,te)){const Z=Q.value,le=Math.max(Q.start,ne),ce=Math.min(Q.end,te);for(let pe=le;pe<=ce;pe++)ae.push({data:M?.[pe],index:pe,offset:re,size:Z}),re+=Z}}if(!j)return sc([],ae,P,D,H,A);const ie=L.length>0?L[L.length-1]+1:0,U=pR(q,w,C,ie);if(U.length===0)return null;const G=P-1,J=nc([],ne=>{for(const te of U){const re=te.value;let Q=re.offset,Z=te.start;const le=re.size;if(re.offset<w){Z+=Math.floor((w-re.offset+D)/(le+D));const pe=Z-te.start;Q+=pe*le+pe*D}Z<ie&&(Q+=(ie-Z)*le,Z=ie);const ce=Math.min(te.end,G);for(let pe=Z;pe<=ce&&!(Q>=C);pe++)ne.push({data:M?.[pe],index:pe,offset:Q,size:le}),Q+=le+D}}),fe=IS(z,ea),N=IS(z,ta);if(J.length>0&&(fe>0||N>0)){const ne=J[0],te=J[J.length-1];if(fe>0&&ne.index>ie){const re=Math.min(fe,ne.index-ie),Q=[];let Z=ne.offset;for(let le=ne.index-1;le>=ne.index-re;le--){const ce=(R=(k=Ii(W,le,le)[0])==null?void 0:k.value)!=null?R:ne.size;Z-=ce+D,Q.unshift({data:M?.[le],index:le,offset:Z,size:ce})}J.unshift(...Q)}if(N>0&&te.index<G){const re=Math.min(N,G-te.index);let Q=te.offset+te.size+D;for(let Z=te.index+1;Z<=te.index+re;Z++){const le=(B=($=Ii(W,Z,Z)[0])==null?void 0:$.value)!=null?B:te.size;J.push({data:M?.[Z],index:Z,offset:Q,size:le}),Q+=le+D}}}return sc(J,ae,P,D,H,A)}),De(w=>w!==null),Tt()),jp);Pe(me(e,De(Cp),we(w=>w?.length)),o),Pe(me(x,we(w=>w.topListHeight)),d),Pe(d,a),Pe(me(x,we(w=>[w.top,w.bottom])),s),Pe(me(x,we(w=>w.items)),v);const E=wn(me(x,De(({items:w})=>w.length>0),Be(o,e),De(([{items:w},C])=>w[w.length-1].originalIndex===C-1),we(([,w,C])=>[w-1,C]),Tt(Gs),we(([w])=>w))),S=wn(me(x,Tr(200),De(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),we(({items:w})=>w[0].index),Tt())),O=wn(me(x,De(({items:w})=>w.length>0),we(({items:w})=>{let C=0,P=w.length-1;for(;w[C].type==="group"&&C<P;)C++;for(;w[P].type==="group"&&P>C;)P--;return{endIndex:w[P].index,startIndex:w[C].index}}),Tt(hS)));return{endReached:E,initialItemCount:g,itemsRendered:v,listState:x,minOverscanItemCount:b,rangeChanged:O,startReached:S,topItemsIndexes:m,...f}},Et(pr,bS,$p,Zs,Ks,Js,Wr,Np),{singleton:!0}),OS=et(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Xe(),s=on(me(zt(n,e,r,t,o),we(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return Pe(Ne(s),i),{totalListHeight:s,totalListHeightChanged:i}},Et(cn,ko),{singleton:!0}),kR=et(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ye(!1),r=on(me(zt(n,e,t),De(([o])=>o),we(([,o,i])=>Math.max(0,o-i)),Tr(0),Tt()),0);return{alignToBottom:n,paddingTopAddition:r}},Et(cn,OS),{singleton:!0}),PS=et(()=>({context:ye(null)})),IR=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:s})=>t<s?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,AS=et(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:c}])=>{const u=Xe();return Pe(me(u,Be(t,l,n,i,o,r,a),Be(e),we(([[d,f,p,h,m,g,v,b],x])=>{const{align:E,behavior:S,calculateViewLocation:O=IR,done:w,...C}=d,P=yS(d,f,h-1),_=Ys(P,f.offsetTree,x)+m+g,F=_+Un(f.sizeTree,P)[1],j=b+g,L=b+p-v,A=O({itemBottom:F,itemTop:_,locationParams:{align:E,behavior:S,...C},viewportBottom:L,viewportTop:j});return A?w&&qn(me(s,De(D=>!D),To(kt(s)?1:2)),w):w?.(),A}),De(d=>d!==null)),c),{scrollIntoView:u}},Et(pr,cn,Ks,ko,Hr),{singleton:!0});function _S(e){return e?e==="smooth"?"smooth":"auto":!1}const OR=(e,t)=>typeof e=="function"?_S(e(t)):t&&_S(e),PR=et(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const h=ye(!1),m=Xe();let g=null;function v(S){je(s,{align:"end",behavior:S,index:"LAST"})}lt(me(zt(me(Ne(t),To(1)),l),Be(Ne(h),i,a,d),we(([[S,O],w,C,P,_])=>{let F=O&&P,j="auto";return F&&(j=OR(w,C||_),F=F&&!!j),{followOutputBehavior:j,shouldFollow:F,totalCount:S}}),De(({shouldFollow:S})=>S)),({followOutputBehavior:S,totalCount:O})=>{g&&(g(),g=null),kt(n)?requestAnimationFrame(()=>{kt(u)("following output to ",{totalCount:O},mn.DEBUG),v(S)}):g=qn(e,()=>{kt(u)("following output to ",{totalCount:O},mn.DEBUG),v(S),g=null})});function b(S){const O=qn(o,w=>{S&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!g&&(kt(u)("scrolling to bottom due to increased size",{},mn.DEBUG),v("auto"))});setTimeout(O,100)}lt(me(zt(Ne(h),t,c),De(([S,,O])=>S&&O),dr(({value:S},[,O])=>({refreshed:S===O,value:O}),{refreshed:!1,value:0}),De(({refreshed:S})=>S),Be(h,t)),([,S])=>{kt(a)&&b(S!==!1)}),lt(m,()=>{b(kt(h)!==!1)}),lt(zt(Ne(h),o),([S,O])=>{S&&!O.atBottom&&O.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const x=ye(null),E=Xe();return Pe(Ip(me(Ne(r),we(S=>{var O;return(O=S?.length)!=null?O:0})),me(Ne(t))),E),lt(me(zt(me(E,To(1)),l),Be(Ne(x),a,d,f),we(([[S,O],w,C,P,_])=>O&&C&&w?.({context:_,totalCount:S,scrollingInProgress:P})),De(S=>!!S),Tr(0)),S=>{g&&(g(),g=null),kt(n)?requestAnimationFrame(()=>{kt(u)("scrolling into view",{}),je(p,S)}):g=qn(e,()=>{kt(u)("scrolling into view",{}),je(p,S),g=null})}),{autoscrollToBottom:m,followOutput:h,scrollIntoViewOnChange:x}},Et(pr,Js,Ks,Zs,Wr,Hr,cn,PS,AS)),AR=et(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(Pe(me(a,Be(i),De(([,l])=>l!==0),Be(o,r,t,n,e),we(([[,l],c,u,d,f,p=[]])=>CS(l,c,u,d,f,p))),s),{}),Et(pr,Zs,ko,Wr),{singleton:!0}),_R=et(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ye(0);return lt(me(e,Be(r),De(([,o])=>o!==0),we(([,o])=>({top:o}))),o=>{qn(me(n,To(1),De(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{je(t,o)})})}),{initialScrollTop:r}},Et(Wr,cn,ko),{singleton:!0}),MS=et(([{scrollVelocity:e}])=>{const t=ye(!1),n=Xe(),r=ye(!1);return Pe(me(e,Be(r,t,n),De(([o,i])=>!!i),we(([o,i,s,a])=>{const{enter:l,exit:c}=i;if(s){if(c(o,a))return!1}else if(l(o,a))return!0;return s}),Tt()),t),lt(me(zt(t,e,n),Be(r)),([[o,i,s],a])=>{o&&a&&a.change&&a.change(i,s)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Et(Js),{singleton:!0}),zp=et(([{scrollContainerState:e,scrollTo:t}])=>{const n=Xe(),r=Xe(),o=Xe(),i=ye(!1),s=ye(void 0);return Pe(me(zt(n,r),we(([{scrollHeight:a,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:a,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Pe(me(t,Be(r),we(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{customScrollParent:s,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},Et(cn)),MR=et(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Xe(),u=ye(void 0),d=ye(null),f=ye(null);return Pe(a,d),Pe(l,f),lt(me(c,Be(t,r,s,d,f,n)),([p,h,m,g,v,b,x])=>{const E=mR(h.sizeTree);g&&v!==null&&b!==null&&(m=v.scrollTop-b.offsetTop),m-=x,p({ranges:E,scrollTop:m})}),Pe(me(u,De(Cp),we(DR)),o),Pe(me(i,Be(u),De(([,p])=>p!==void 0),Tt(),we(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},Et(pr,cn,Zs,Wr,zp));function DR(e){return{align:"start",index:0,offset:e.scrollTop}}const NR=et(([{topItemsIndexes:e}])=>{const t=ye(0);return Pe(me(t,De(n=>n>=0),we(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Et(ko));function DS(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const FR=DS(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),LR=et(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:s,scrollDirection:a},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:h}])=>{const m=wn(me(l,Be(s),dr(([,v,b,x],[{bottom:E,items:S,offsetBottom:O,totalCount:w},C])=>{const P=E+O;let _=0;return b===w&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(_=P-x,_!==0&&(_+=C))),[_,S,w,P]},[0,[],0,0]),De(([v])=>v!==0),Be(r,a,n,o,p,h),De(([,v,b,x,,,E])=>!E&&!x&&v!==0&&b===Xs),we(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},mn.DEBUG),v))));function g(v){v>0?(je(t,{behavior:"auto",top:-v}),je(e,0)):(je(e,0),je(t,{behavior:"auto",top:-v}))}return lt(me(m,Be(e,i)),([v,b,x])=>{x&&FR()?je(e,b-v):g(-v)}),lt(me(zt(on(i,!1),e,h),De(([v,b,x])=>!v&&!x&&b!==0),we(([v,b])=>b),Tr(1)),g),Pe(me(d,we(v=>({top:-v}))),t),lt(me(c,Be(f,u),we(([v,{groupIndices:b,lastSize:x,sizeTree:E},S])=>{function O(w){return w*(x+S)}if(b.length===0)return O(v);{let w=0;const C=Us(E,0);let P=0,_=0;for(;P<v;){P++,w+=C;let F=b.length===_+1?1/0:b[_+1]-b[_]-1;P+F>v&&(w-=C,F=v-P+1),P+=F,w+=O(F),_++}return w}})),v=>{je(e,v),requestAnimationFrame(()=>{je(t,{top:v}),requestAnimationFrame(()=>{je(e,0),je(h,!1)})})}),{deviation:e}},Et(cn,Js,ko,pr,Hr,Np)),VR=et(([e,t,n,r,o,i,s,a,l,c,u])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c,...u}),Et($p,AR,Wr,MS,OS,_R,kR,zp,AS,Hr,PS)),NS=et(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:h,initialTopMostItemIndex:m,scrolledToInitialItem:g},v,b,x,E,{scrollToIndex:S},O,{topItemCount:w},{groupCounts:C},P])=>{const{listState:_,minOverscanItemCount:F,topItemsIndexes:j,rangeChanged:L,...A}=E;return Pe(L,P.scrollSeekRangeChanged),Pe(me(P.windowViewportRect,we(D=>D.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:C,heightEstimates:a,initialItemFinalLocationReached:h,initialTopMostItemIndex:m,scrolledToInitialItem:g,sizeRanges:c,topItemCount:w,topItemsIndexes:j,totalCount:f,...x,groupIndices:s,itemSize:l,listState:_,minOverscanItemCount:F,scrollToIndex:S,statefulTotalCount:d,trackItemSizes:p,rangeChanged:L,...A,...P,...v,sizes:u,...b}},Et(pr,Zs,cn,MR,PR,ko,Ks,LR,NR,bS,VR));function RR(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)Object.hasOwn(r,s)||(n[s]=t[s]);return n}const ac=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Bp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=T.createContext({});function l(g,v){g.propsReady&&je(g.propsReady,!1);for(const b of r){const x=g[t.required[b]];je(x,v[b])}for(const b of o)if(b in v){const x=g[t.optional[b]];je(x,v[b])}g.propsReady&&je(g.propsReady,!0)}function c(g){return i.reduce((v,b)=>(v[b]=x=>{const E=g[t.methods[b]];je(E,x)},v),{})}function u(g){return s.reduce((v,b)=>(v[b]=tR(g[t.events[b]]),v),{})}const d=T.forwardRef((g,v)=>{const{children:b,...x}=g,[E]=T.useState(()=>nc(rR(e),w=>{l(w,x)})),[S]=T.useState(rS(u,E));ac(()=>{for(const w of s)w in x&<(S[w],x[w]);return()=>{Object.values(S).map(kp)}},[x,S,E]),ac(()=>{l(E,x)}),T.useImperativeHandle(v,nS(c(E)));const O=n;return y.jsx(a.Provider,{value:E,children:n?y.jsx(O,{...RR([...r,...o,...s],x),children:b}):b})}),f=g=>{const v=T.useContext(a);return T.useCallback(b=>{je(v[g],b)},[v,g])},p=g=>{const v=T.useContext(a)[g],b=T.useCallback(x=>lt(v,x),[v]);return T.useSyncExternalStore(b,()=>kt(v),()=>kt(v))},h=g=>{const v=T.useContext(a)[g],[b,x]=T.useState(rS(kt,v));return ac(()=>lt(v,E=>{E!==b&&x(nS(E))}),[v,b]),b},m=T.version.startsWith("18")?p:h;return{Component:d,useEmitter:(g,v)=>{const b=T.useContext(a)[g];ac(()=>lt(b,v),[v,b])},useEmitterValue:m,usePublisher:f}}const lc=T.createContext(void 0),FS=T.createContext(void 0),LS=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Hp(e){return"self"in e}function $R(e){return"body"in e}function VS(e,t,n,r=Ci,o,i){const s=T.useRef(null),a=T.useRef(null),l=T.useRef(null),c=T.useCallback(f=>{let p,h,m;const g=f.target;if($R(g)||Hp(g)){const b=Hp(g)?g:g.defaultView;m=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,h=i?b.innerWidth:b.innerHeight}else m=i?g.scrollLeft:g.scrollTop,p=i?g.scrollWidth:g.scrollHeight,h=i?g.offsetWidth:g.offsetHeight;const v=()=>{e({scrollHeight:p,scrollTop:Math.max(m,0),viewportHeight:h})};f.suppressFlushSync?v():Ki.flushSync(v),a.current!==null&&(m===a.current||m<=0||m===p-h)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);T.useEffect(()=>{const f=o||s.current;return r(o||s.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[s,c,n,r,o]);function u(f){const p=s.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const h=f.behavior==="smooth";let m,g,v;Hp(p)?(g=Math.max(Gn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),m=i?p.innerWidth:p.innerHeight,v=i?window.scrollX:window.scrollY):(g=p[i?"scrollWidth":"scrollHeight"],m=Gn(p,i?"width":"height"),v=p[i?"scrollLeft":"scrollTop"]);const b=g-m;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),wS(m,g)||f.top===v){e({scrollHeight:g,scrollTop:v,viewportHeight:m}),h&&t(!0);return}h?(a.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),s.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:s,scrollToCallback:u}}const Wp="-webkit-sticky",RS="sticky",qp=DS(()=>{if(typeof document>"u")return RS;const e=document.createElement("div");return e.style.position=Wp,e.style.position===Wp?Wp:RS});function Up(e){return e}const jR=et(()=>{const e=ye(a=>`Item ${a}`),t=ye(a=>`Group ${a}`),n=ye({}),r=ye(Up),o=ye("div"),i=ye(Ci),s=(a,l=null)=>on(me(n,we(c=>c[a]),Tt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),zR=et(([e,t])=>({...e,...t}),Et(NS,jR)),BR=({height:e})=>y.jsx("div",{style:{height:e}}),HR={overflowAnchor:"none",position:qp(),zIndex:1},$S={overflowAnchor:"none"},WR={...$S,display:"inline-block",height:"100%"},jS=T.memo(function({showTopList:e=!1}){const t=Le("listState"),n=_n("sizeRanges"),r=Le("useWindowScroll"),o=Le("customScrollParent"),i=_n("windowScrollContainerState"),s=_n("scrollContainerState"),a=o||r?i:s,l=Le("itemContent"),c=Le("context"),u=Le("groupContent"),d=Le("trackItemSizes"),f=Le("itemSize"),p=Le("log"),h=_n("gap"),m=Le("horizontalDirection"),{callbackRef:g}=sS(n,f,d,e?Ci:a,p,h,o,m,Le("skipAnimationFrameInResizeObserver")),[v,b]=T.useState(0);Kp("deviation",A=>{v!==A&&b(A)});const x=Le("EmptyPlaceholder"),E=Le("ScrollSeekPlaceholder")||BR,S=Le("ListComponent"),O=Le("ItemComponent"),w=Le("GroupComponent"),C=Le("computeItemKey"),P=Le("isSeeking"),_=Le("groupIndices").length>0,F=Le("alignToBottom"),j=Le("initialItemFinalLocationReached"),L=e?{}:{boxSizing:"border-box",...m?{display:"inline-block",height:"100%",marginLeft:v!==0?v:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...j?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?y.jsx(x,{...Ct(x,c)}):y.jsx(S,{...Ct(S,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:g,style:L,children:(e?t.topItems:t.items).map(A=>{const D=A.originalIndex,z=C(D+t.firstItemIndex,A.data,c);return P?T.createElement(E,{...Ct(E,c),height:A.size,index:A.index,key:z,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?T.createElement(w,{...Ct(w,c),"data-index":D,"data-item-index":A.index,"data-known-size":A.size,key:z,style:HR},u(A.index,c)):T.createElement(O,{...Ct(O,c),...zS(O,A.data),"data-index":D,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:z,style:m?WR:$S},_?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),qR={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},UR={outline:"none",overflowX:"auto",position:"relative"},Oi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),GR={position:qp(),top:0,width:"100%",zIndex:1};function Ct(e,t){if(typeof e!="string")return{context:t}}function zS(e,t){return{item:typeof e=="string"?void 0:t}}const YR=T.memo(function(){const e=Le("HeaderComponent"),t=_n("headerHeight"),n=Le("HeaderFooterTag"),r=fr(T.useMemo(()=>i=>{t(Gn(i,"height"))},[t]),!0,Le("skipAnimationFrameInResizeObserver")),o=Le("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...Ct(e,o)})}):null}),KR=T.memo(function(){const e=Le("FooterComponent"),t=_n("footerHeight"),n=Le("HeaderFooterTag"),r=fr(T.useMemo(()=>i=>{t(Gn(i,"height"))},[t]),!0,Le("skipAnimationFrameInResizeObserver")),o=Le("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...Ct(e,o)})}):null});function Gp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return T.memo(function({children:r,style:o,context:i,...s}){const a=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:h}=VS(a,c,l,u,void 0,d);return e("scrollTo",h),e("scrollBy",f),y.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?UR:qR,...o},tabIndex:0,...s,...Ct(l,i),children:r})})}function Yp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return T.memo(function({children:r,style:o,context:i,...s}){const a=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=T.useRef(null),h=t("scrollerRef"),{scrollByCallback:m,scrollerRef:g,scrollToCallback:v}=VS(a,c,l,h,f);return LS(()=>{var b;return g.current=f||((b=p.current)==null?void 0:b.ownerDocument.defaultView),()=>{g.current=null}},[g,f]),e("windowScrollTo",v),e("scrollBy",m),y.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...s,...Ct(l,i),children:r})})}const ZR=({children:e})=>{const t=T.useContext(lc),n=_n("viewportHeight"),r=_n("fixedItemHeight"),o=Le("alignToBottom"),i=Le("horizontalDirection"),s=T.useMemo(()=>Ws(n,l=>Gn(l,i?"width":"height")),[n,i]),a=fr(s,!0,Le("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:a,style:Oi(o),children:e})},XR=({children:e})=>{const t=T.useContext(lc),n=_n("windowViewportRect"),r=_n("fixedItemHeight"),o=Le("customScrollParent"),i=Pp(n,o,Le("skipAnimationFrameInResizeObserver")),s=Le("alignToBottom");return T.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:Oi(s),children:e})},QR=({children:e})=>{const t=Le("TopItemListComponent")||"div",n=Le("headerHeight"),r={...GR,marginTop:`${n}px`},o=Le("context");return y.jsx(t,{style:r,...Ct(t,o),children:e})},JR=T.memo(function(e){const t=Le("useWindowScroll"),n=Le("topItemsIndexes").length>0,r=Le("customScrollParent"),o=Le("context");return y.jsxs(r||t?n$:t$,{...e,context:o,children:[n&&y.jsx(QR,{children:y.jsx(jS,{showTopList:!0})}),y.jsxs(r||t?XR:ZR,{children:[y.jsx(YR,{}),y.jsx(jS,{}),y.jsx(KR,{})]})]})}),{Component:e$,useEmitter:Kp,useEmitterValue:Le,usePublisher:_n}=Bp(zR,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},JR),t$=Gp({useEmitter:Kp,useEmitterValue:Le,usePublisher:_n}),n$=Yp({useEmitter:Kp,useEmitterValue:Le,usePublisher:_n}),Zp=e$,r$=et(()=>{const e=ye(c=>y.jsxs("td",{children:["Item $",c]})),t=ye(null),n=ye(c=>y.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=ye(null),o=ye(null),i=ye({}),s=ye(Up),a=ye(Ci),l=(c,u=null)=>on(me(i,we(d=>d[c]),Tt()),u);return{components:i,computeItemKey:s,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),o$=et(([e,t])=>({...e,...t}),Et(NS,r$)),i$=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{height:e}})}),s$=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{border:0,height:e,padding:0}})}),a$={overflowAnchor:"none"},BS={position:qp(),zIndex:2,overflowAnchor:"none"},HS=T.memo(function({showTopList:e=!1}){const t=ze("listState"),n=ze("computeItemKey"),r=ze("firstItemIndex"),o=ze("context"),i=ze("isSeeking"),s=ze("fixedHeaderHeight"),a=ze("groupIndices").length>0,l=ze("itemContent"),c=ze("groupContent"),u=ze("ScrollSeekPlaceholder")||i$,d=ze("GroupComponent"),f=ze("TableRowComponent"),p=(e?t.topItems:[]).reduce((m,g,v)=>(v===0?m.push(g.size):m.push(m[v-1]+g.size),m),[]),h=(e?t.topItems:t.items).map(m=>{const g=m.originalIndex,v=n(g+r,m.data,o),b=e?g===0?0:p[g-1]:0;return i?T.createElement(u,{...Ct(u,o),height:m.size,index:m.index,key:v,type:m.type||"item"}):m.type==="group"?T.createElement(d,{...Ct(d,o),"data-index":g,"data-item-index":m.index,"data-known-size":m.size,key:v,style:{...BS,top:s}},c(m.index,o)):T.createElement(f,{...Ct(f,o),...zS(f,m.data),"data-index":g,"data-item-index":m.index,"data-known-size":m.size,"data-item-group-index":m.groupIndex,key:v,style:e?{...BS,top:s+b}:a$},a?l(m.index,m.groupIndex,m.data,o):l(m.index,m.data,o))});return y.jsx(y.Fragment,{children:h})}),l$=T.memo(function(){const e=ze("listState"),t=ze("topItemsIndexes").length>0,n=Yn("sizeRanges"),r=ze("useWindowScroll"),o=ze("customScrollParent"),i=Yn("windowScrollContainerState"),s=Yn("scrollContainerState"),a=o||r?i:s,l=ze("trackItemSizes"),c=ze("itemSize"),u=ze("log"),{callbackRef:d,ref:f}=sS(n,c,l,a,u,void 0,o,!1,ze("skipAnimationFrameInResizeObserver")),[p,h]=T.useState(0);Xp("deviation",_=>{p!==_&&(f.current.style.marginTop=`${_}px`,h(_))});const m=ze("EmptyPlaceholder"),g=ze("FillerRow")||s$,v=ze("TableBodyComponent"),b=ze("paddingTopAddition"),x=ze("statefulTotalCount"),E=ze("context");if(x===0&&m)return y.jsx(m,{...Ct(m,E)});const S=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),O=e.offsetTop+b+p-S,w=e.offsetBottom,C=O>0?y.jsx(g,{context:E,height:O},"padding-top"):null,P=w>0?y.jsx(g,{context:E,height:w},"padding-bottom"):null;return y.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...Ct(v,E),children:[C,t&&y.jsx(HS,{showTopList:!0}),y.jsx(HS,{}),P]})}),c$=({children:e})=>{const t=T.useContext(lc),n=Yn("viewportHeight"),r=Yn("fixedItemHeight"),o=fr(T.useMemo(()=>Ws(n,i=>Gn(i,"height")),[n]),!0,ze("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:o,style:Oi(!1),children:e})},u$=({children:e})=>{const t=T.useContext(lc),n=Yn("windowViewportRect"),r=Yn("fixedItemHeight"),o=ze("customScrollParent"),i=Pp(n,o,ze("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:Oi(!1),children:e})},d$=T.memo(function(e){const t=ze("useWindowScroll"),n=ze("customScrollParent"),r=Yn("fixedHeaderHeight"),o=Yn("fixedFooterHeight"),i=ze("fixedHeaderContent"),s=ze("fixedFooterContent"),a=ze("context"),l=fr(T.useMemo(()=>Ws(r,v=>Gn(v,"height")),[r]),!0,ze("skipAnimationFrameInResizeObserver")),c=fr(T.useMemo(()=>Ws(o,v=>Gn(v,"height")),[o]),!0,ze("skipAnimationFrameInResizeObserver")),u=n||t?h$:p$,d=n||t?u$:c$,f=ze("TableComponent"),p=ze("TableHeadComponent"),h=ze("TableFooterComponent"),m=i?y.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...Ct(p,a),children:i()},"TableHead"):null,g=s?y.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...Ct(h,a),children:s()},"TableFoot"):null;return y.jsx(u,{...e,...Ct(u,a),children:y.jsx(d,{children:y.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...Ct(f,a),children:[m,y.jsx(l$,{},"TableBody"),g]})})})}),{Component:f$,useEmitter:Xp,useEmitterValue:ze,usePublisher:Yn}=Bp(o$,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},d$),p$=Gp({useEmitter:Xp,useEmitterValue:ze,usePublisher:Yn}),h$=Yp({useEmitter:Xp,useEmitterValue:ze,usePublisher:Yn}),m$=f$,WS={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},g$={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:qS,floor:cc,max:na,min:Qp,round:US}=Math;function GS(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function y$(e){return{...g$,items:e}}function uc(e,t){return e&&e.width===t.width&&e.height===t.height}function v$(e,t){return e&&e.column===t.column&&e.row===t.row}const b$=et(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:h,propsReady:m},{customScrollParent:g,useWindowScroll:v,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:E},S])=>{const O=ye(0),w=ye(0),C=ye(WS),P=ye({height:0,width:0}),_=ye({height:0,width:0}),F=Xe(),j=Xe(),L=ye(0),A=ye(null),D=ye({column:0,row:0}),z=Xe(),M=Xe(),k=ye(!1),R=ye(0),$=ye(!0),B=ye(!1),H=ye(!1);lt(me(h,Be(R),De(([U,G])=>!!G)),()=>{je($,!1)}),lt(me(zt(h,$,_,P,R,B),De(([U,G,J,fe,,N])=>U&&!G&&J.height!==0&&fe.height!==0&&!N)),([,,,,U])=>{je(B,!0),Vp(1,()=>{je(F,U)}),qn(me(c),()=>{je(t,[0,0]),je($,!0)})}),Pe(me(M,De(U=>U!=null&&U.scrollTop>0),ur(0)),w),lt(me(h,Be(M),De(([,U])=>U!=null)),([,U])=>{U&&(je(P,U.viewport),je(_,U.item),je(D,U.gap),U.scrollTop>0&&(je(k,!0),qn(me(c,To(1)),G=>{je(k,!1)}),je(l,{top:U.scrollTop})))}),Pe(me(P,we(({height:U})=>U)),d),Pe(me(zt(Ne(P,uc),Ne(_,uc),Ne(D,(U,G)=>U&&U.column===G.column&&U.row===G.row),Ne(c)),we(([U,G,J,fe])=>({gap:J,item:G,scrollTop:fe,viewport:U}))),z),Pe(me(zt(Ne(O),r,Ne(D,v$),Ne(_,uc),Ne(P,uc),Ne(A),Ne(w),Ne(k),Ne($),Ne(R)),De(([,,,,,,,U])=>!U),we(([U,[G,J],fe,N,ne,te,re,,Q,Z])=>{const{column:le,row:ce}=fe,{height:pe,width:ge}=N,{width:se}=ne;if(re===0&&(U===0||se===0))return WS;if(ge===0){const qe=Rp(Z,U),gt=qe+Math.max(re-1,0);return y$(GS(qe,gt,te))}const Y=YS(se,ge,le);let V,X;Q?G===0&&J===0&&re>0?(V=0,X=re-1):(V=Y*cc((G+ce)/(pe+ce)),X=Y*qS((J+ce)/(pe+ce))-1,X=Qp(U-1,na(X,Y-1)),V=Qp(X,na(0,V))):(V=0,X=-1);const de=GS(V,X,te),{bottom:he,top:Se}=KS(ne,fe,N,de),be=qS(U/Y),Ae=be*pe+(be-1)*ce-he;return{bottom:he,itemHeight:pe,items:de,itemWidth:ge,offsetBottom:Ae,offsetTop:Se,top:Se}})),C),Pe(me(A,De(U=>U!==null),we(U=>U.length)),O),Pe(me(zt(P,_,C,D),De(([U,G,{items:J}])=>J.length>0&&G.height!==0&&U.height!==0),we(([U,G,{items:J},fe])=>{const{bottom:N,top:ne}=KS(U,fe,G,J);return[ne,N]}),Tt(Gs)),t);const q=ye(!1);Pe(me(c,Be(q),we(([U,G])=>G||U!==0)),q);const W=wn(me(zt(C,O),De(([{items:U}])=>U.length>0),Be(q),De(([[U,G],J])=>{const fe=U.items[U.items.length-1].index===G-1;return(J||U.bottom>0&&U.itemHeight>0&&U.offsetBottom===0&&U.items.length===G)&&fe}),we(([[,U]])=>U-1),Tt())),oe=wn(me(Ne(C),De(({items:U})=>U.length>0&&U[0].index===0),ur(0),Tt())),ae=wn(me(Ne(C),Be(k),De(([{items:U},G])=>U.length>0&&!G),we(([{items:U}])=>({endIndex:U[U.length-1].index,startIndex:U[0].index})),Tt(hS),Tr(0)));Pe(ae,p.scrollSeekRangeChanged),Pe(me(F,Be(P,_,O,D),we(([U,G,J,fe,N])=>{const ne=xS(U),{align:te,behavior:re,offset:Q}=ne;let Z=ne.index;Z==="LAST"&&(Z=fe-1),Z=na(0,Z,Qp(fe-1,Z));let le=Jp(G,N,J,Z);return te==="end"?le=US(le-G.height+J.height):te==="center"&&(le=US(le-G.height/2+J.height/2)),Q&&(le+=Q),{behavior:re,top:le}})),l);const ie=on(me(C,we(U=>U.offsetBottom+U.bottom)),0);return Pe(me(E,we(U=>({height:U.visibleHeight,width:U.visibleWidth}))),P),{customScrollParent:g,data:A,deviation:L,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:s,scrollContainerState:a,scrollHeight:j,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:O,useWindowScroll:v,viewportDimensions:P,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:E,...p,gridState:C,horizontalDirection:H,initialTopMostItemIndex:R,totalListHeight:ie,...f,endReached:W,propsReady:m,rangeChanged:ae,startReached:oe,stateChanged:z,stateRestoreInProgress:k,...S}},Et($p,cn,Js,MS,Wr,zp,Hr));function YS(e,t,n){return na(1,cc((e+n)/(cc(t)+n)))}function KS(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Jp(e,t,n,r[0].index);return{bottom:Jp(e,t,n,r[r.length-1].index)+o,top:i}}function Jp(e,t,n,r){const o=YS(e.width,n.width,t.column),i=cc(r/o),s=i*n.height+na(0,i-1)*t.row;return s>0?s+t.row:s}const x$=et(()=>{const e=ye(d=>`Item ${d}`),t=ye({}),n=ye(null),r=ye("virtuoso-grid-item"),o=ye("virtuoso-grid-list"),i=ye(Up),s=ye("div"),a=ye(Ci),l=(d,f=null)=>on(me(t,we(p=>p[d]),Tt()),f),c=ye(!1),u=ye(!1);return Pe(Ne(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),w$=et(([e,t])=>({...e,...t}),Et(b$,x$)),S$=T.memo(function(){const e=It("gridState"),t=It("listClassName"),n=It("itemClassName"),r=It("itemContent"),o=It("computeItemKey"),i=It("isSeeking"),s=Mn("scrollHeight"),a=It("ItemComponent"),l=It("ListComponent"),c=It("ScrollSeekPlaceholder"),u=It("context"),d=Mn("itemDimensions"),f=Mn("gap"),p=It("log"),h=It("stateRestoreInProgress"),m=Mn("reportReadyState"),g=fr(T.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;s(b);const x=v.firstChild;if(x){const{height:E,width:S}=x.getBoundingClientRect();d({height:E,width:S})}f({column:XS("column-gap",getComputedStyle(v).columnGap,p),row:XS("row-gap",getComputedStyle(v).rowGap,p)})},[s,d,f,p]),!0,!1);return LS(()=>{e.itemHeight>0&&e.itemWidth>0&&m(!0)},[e]),h?null:y.jsx(l,{className:t,ref:g,...Ct(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const b=o(v.index,v.data,u);return i?y.jsx(c,{...Ct(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},b):T.createElement(a,{...Ct(a,u),className:n,"data-index":v.index,key:b},r(v.index,v.data,u))})})}),E$=T.memo(function(){const e=It("HeaderComponent"),t=Mn("headerHeight"),n=It("headerFooterTag"),r=fr(T.useMemo(()=>i=>{t(Gn(i,"height"))},[t]),!0,!1),o=It("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...Ct(e,o)})}):null}),T$=T.memo(function(){const e=It("FooterComponent"),t=Mn("footerHeight"),n=It("headerFooterTag"),r=fr(T.useMemo(()=>i=>{t(Gn(i,"height"))},[t]),!0,!1),o=It("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...Ct(e,o)})}):null}),C$=({children:e})=>{const t=T.useContext(FS),n=Mn("itemDimensions"),r=Mn("viewportDimensions"),o=fr(T.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return T.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),y.jsx("div",{ref:o,style:Oi(!1),children:e})},k$=({children:e})=>{const t=T.useContext(FS),n=Mn("windowViewportRect"),r=Mn("itemDimensions"),o=It("customScrollParent"),i=Pp(n,o,!1);return T.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),y.jsx("div",{ref:i,style:Oi(!1),children:e})},I$=T.memo(function({...e}){const t=It("useWindowScroll"),n=It("customScrollParent"),r=n||t?P$:O$,o=n||t?k$:C$,i=It("context");return y.jsx(r,{...e,...Ct(r,i),children:y.jsxs(o,{children:[y.jsx(E$,{}),y.jsx(S$,{}),y.jsx(T$,{})]})})}),{useEmitter:ZS,useEmitterValue:It,usePublisher:Mn}=Bp(w$,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},I$),O$=Gp({useEmitter:ZS,useEmitterValue:It,usePublisher:Mn}),P$=Yp({useEmitter:ZS,useEmitterValue:It,usePublisher:Mn});function XS(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,mn.WARN),t==="normal"?0:parseInt(t??"0",10)}const QS=e=>{const t=e.Icon??yy,n=Nt();return y.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[y.jsx(t,{size:64,className:"text-disabled"}),y.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},eh=y.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),ra=e=>y.jsx(gn,{...e,as:e.as||"span",className:Me("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function A$(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const _$=e=>{const t=T.useId(),n=Nt(),r=T.useMemo(()=>A$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return y.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[y.jsx("p",{children:y.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?y.jsxs(T.Fragment,{children:[y.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),y.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>y.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),y.jsx("nav",{children:y.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?y.jsx("li",{children:y.jsx(gn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:y.jsx(T.Fragment,{children:typeof i=="string"?y.jsx("li",{children:"..."}):y.jsx("li",{children:y.jsx(gn,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?y.jsx("li",{children:y.jsx(gn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},M$=e=>{const t=T.useRef(null),n=T.useRef(null),[r,o]=T.useState("opacity-0"),i=r==="opacity-0",s=()=>o("opacity-0"),a=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return T.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;a();const u=new IntersectionObserver(d=>d.forEach(a),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),y.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:s,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:y.jsx("div",{ref:n,className:"block isolate",children:e.children})})},D$=(e,t,n)=>{const r=n.cols,o=n.loading;return y.jsx(T.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=Od(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=s===0&&n.Aside&&o===!1,f=n.Aside;return T.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?y.jsx(M$,{children:y.jsx(f,{col:i,row:t,rowIndex:e})}):null,y.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),y.jsx("span",{className:"relative",children:o?eh:c?y.jsx(T.Fragment,{children:y.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l})}):y.jsx(T.Fragment,{children:Ue.nil(l)?"":l})}))})})},Pi=e=>{const t=T.useId(),[n,r]=T.useState(e.open);T.useEffect(()=>r(e.open),[e.open]);const o=T.useRef(null),i=T.useMemo(()=>[as(10),bd({fallbackAxisSideDirection:"end"}),vd(),cv({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Dr({open:n,middleware:i,transform:!0,whileElementsMounted:Yo,onOpenChange:(h,m)=>{const g=m?.relatedTarget;g&&g.dataset.floating==="true"&&!h||(r(h),e.onChange?.(h))}}),c=fs(l),u=ho(l),d=mo(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Nr([c,u,d]);return y.jsxs(T.Fragment,{children:[y.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&y.jsx(po,{preserveTabOrder:!0,id:`${t}-portal`,children:y.jsx(Zo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:y.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:s.setFloating,"aria-labelledby":t,style:a,...p(),children:[y.jsx(yv,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),y.jsx("header",{className:"mb-2",children:y.jsx("h3",{className:"text-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var th={},JS;function N$(){return JS||(JS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,v)=>{try{Object.keys(g).forEach(v)}catch(b){window.console.log(b)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const b=v.getItem(g);try{return JSON.parse(b)}catch{return b??null}},i=g=>Object.keys(g).reduce((v,b)=>({...v,[b]:o(b,g)}),{}),s=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},d=[{name:"expires",parse:g=>`expires=${s(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${s(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const v=g.domain??"";return v===""?"":`domain=${g.multiDomain?".":""}${v}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],f={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=f.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,b={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),E=d.reduce((S,O)=>{const w=O.parse(b);return w===""?S:S.concat(w)},[`${encodeURIComponent(g)}=${x}`]).join(";");document.cookie=E,u()}},p=g=>{const v=new Set,b=x=>{g().removeItem(x);const E=i(g());v.forEach(S=>S(E))};return{delete:b,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(g()):g(),has:x=>{const E=g().getItem(x);return!n(E)},deleteAll:()=>{t(g(),b),v.forEach(x=>x(g()))},get:x=>o(x,g()),set:(x,E)=>{g().setItem(x,JSON.stringify(E)),v.forEach(S=>S(g()))}}},h=p(()=>window.sessionStorage),m=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=h,e.createStorage=p})(th)),th}var oa=N$();const nh=e=>e.headerLabel??e.thead??e.id,rh=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Ai=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Ai||{});const oh=e=>e.type==="number"?e.valueAsNumber:e.value,F$=e=>{let t=[];return e({add:(s,a,l)=>t.push({...l,id:s,thead:a}),remove:s=>t=t.filter(a=>a.id!==s),getAll:()=>Array.from(t),filter:s=>t=Array.from(t.filter(s))}),t},L$={},V$=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const s=r.get(o.id);return s===void 0?e[i]:s})},R$=(e,t,n=L$)=>{const r=Fr()?null:oa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=wp({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:V$(t,r?.cols)},s=>{const a=l=>{const c=s.state(),u={...c,...l};return Fr()||oa.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(s.state()),{set:l=>a(l)}});return{...o,...i,name:e}},$$=e=>{const t=Lr(e),n=T.useRef(null),r=T.useCallback(o=>{t.current(o),o.forEach(i=>{const s=n.current.querySelector(`th[data-tableheader="${i.id}"]`);s&&(s.style.width="auto")})},[t]);return[n,r]},j$=()=>Fr()?void 0:document.querySelector('[data-component="modal-body"]'),z$=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),B$=(e,t)=>e.toSorted(z$(t)),eE=(e,t,n)=>({label:t,id:Qo(),type:n,value:e.id}),H$=e=>{const t=Nt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,eE(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return y.jsx(T.Fragment,{children:y.jsx(Pi,{title:t.tableSortDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(py,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(go,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),y.jsx(go,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),y.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:y.jsx(Aa,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[y.jsx(Zu,{size:14})," ",t.tableSortAddButton]})})]})})})},W$=e=>{const t=Nt(),[n,r]=T.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");T.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=eE(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=nh(e.col);return y.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[y.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?y.jsx(NO,{size:14}):null,n==="desc"?y.jsx(DO,{size:14}):null,n==="undefined"?y.jsx(py,{size:14}):null]})},tE=T.createContext({}),q$=tE.Provider,U$=()=>T.useContext(tE),ih=(e,t,n,r={})=>{const o=e.id,i=e.type??Ai.Text,s=t[i]??[],a=s.find(c=>c["data-default"])?.value??s[0]?.value,l=n[a];return{id:Qo(),operation:l,label:nh(e),name:o,type:i,value:"",...r}},sh=()=>{const e=Nt(),t=T.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:T.useMemo(()=>({[Ai.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Ai.Boolean]:[t.is,t.isNot],[Ai.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},G$=e=>{const t=Nt(),n=sh(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,ih(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(h=>u===h.id);return ih(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=oh(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return y.jsx(T.Fragment,{children:y.jsx(Pi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:y.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[y.jsx(WO,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(go,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),y.jsx(go,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),y.jsx(Jo,{optionalText:"","data-id":l.id,onChange:a,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),y.jsx("div",{className:"flex justify-center items-center mt-5",children:y.jsx("button",{"data-id":l.id,type:"button",onClick:s,children:y.jsx(Aa,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[y.jsx(Zu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Y$=({filter:e,onDelete:t,set:n})=>{const r=Nt(),o=sh(),i=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},s=a=>{const l=a.target.dataset.id||"",c=oh(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return y.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[y.jsx(go,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),y.jsx(Jo,{optionalText:" ","data-id":e.id,onChange:s,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),y.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:y.jsx(Aa,{className:"text-danger",size:14})})]})},K$={top:0,left:0,right:0,bottom:-1},Z$=e=>{const t=Ju(),n=Nt(),r=e.filters.filter(m=>m.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,s=e.header.allowFilter??t.table.filters??!0,a=sh(),l=o?UO:GO,c=T.useRef(null),u=m=>{const g=m.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==g))},d=T.useCallback(m=>{if(m===null)return;c.current=m;const g=new AbortController;return m.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:g.signal}),()=>g.abort()},[]),f=e.sorters.find(m=>e.header.id===m.value),p=f?.type?f.type===J1.Asc?"ascending":"descending":"none",h=nh(e.header);return y.jsxs(A1,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[y.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:y.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&s?y.jsx(Pi,{arrow:!0,trigger:y.jsxs("span",{children:[y.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",h]}),y.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:y.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",y.jsx("span",{className:"font-medium",children:h})]}),children:y.jsxs("ul",{className:"font-medium",children:[r.length===0?null:y.jsx(T.Fragment,{children:r.map(m=>y.jsx("li",{className:"my-1",children:y.jsx(Y$,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),y.jsx("li",{children:y.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(m=>m.concat(ih(e.header,a.options,a.operations))),children:[y.jsx(Zu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,y.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?y.jsx(W$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:y.jsx(Ye.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:K$,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:m=>{m.currentTarget.focus()},onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const g=c.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(g+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,g)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=g.delta.x;c.current.style.width=`${Math.abs(v+b)}px`}})]})},X$=e=>{const[t,n]=$$(e.setCols);return y.jsx(I1,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:y.jsx(Wn,{children:e.headers.map((r,o)=>y.jsx(Z$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},Q$=T.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:y.jsx(Wn,{children:n.children})})),J$=T.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),ej=T.forwardRef(({context:e,...t},n)=>{const r=U$(),o={...t?.style,top:Ue.number(r.sticky)?`${r.sticky}px`:void 0};return y.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),tj=T.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return y.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),nj=T.forwardRef((e,t)=>e.context.loadingMore?y.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:y.jsx("tr",{role:"row",className:"bg-card-background",children:y.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:y.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),rj={TableRow:tj,TableFoot:nj,TableHead:ej,Table:J$,TableBody:Q$},oj=[0,0,0,0,0,0,0,0,0,0],ij=e=>y.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?eh:y.jsx(QS,{})}),sj=()=>y.jsx(T.Fragment,{}),aj=[],nE=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:s,getScrollRef:a,border:l=!0,pagination:c=null,useControl:u=!1,...d})=>{const f=T.useRef(null),[p,h]=T.useState(!1),m=Lr(s),g=Lr(d.loadingMore),v=T.useMemo(()=>{if(d.loading)return oj;if(u)return d.rows;const E=new eS(d.rows);return t.length>0&&t.forEach(S=>S.value===""||Number.isNaN(S.value)?void 0:E.Where(S.name,S.operation.symbol,S.value)),r.length===0?E.Select():B$(E.Select(),r)},[d.loading,d.rows,u,t,r]);T.useEffect(()=>{if(f.current===null)return()=>{};const E=f.current,S=new IntersectionObserver(O=>O[O.length-1].isIntersecting&&g.current?(m.current?.(),void h(!0)):h(!1));return S.observe(E),()=>S.disconnect()},[g,m]);const b=v.length===0,x={cols:e,Aside:d.Aside,loading:d.loading,getRowProps:d.getRowProps,loadingMore:d.loadingMore};return y.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[y.jsx(m$,{context:x,components:rj,totalCount:v.length,itemContent:b?sj:D$,data:b?aj:v,useWindowScroll:!a,customScrollParent:a?a():void 0,fixedHeaderContent:()=>y.jsx(X$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),b?y.jsx(ij,{loading:d.loading}):null,y.jsx("div",{"aria-hidden":"true",ref:f,className:"w-full h-0.5"}),c!==null?y.jsx(_$,{...c}):null]})},lj=({item:e,onPointerDown:t})=>{const n=bi(0);return y.jsxs(A1,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[y.jsx("button",{type:"button",className:"cursor-grab",children:y.jsx(HO,{size:14})}),y.jsx("span",{children:e.groupName})]},e.groupId)},cj=e=>{const t=Nt(),n=rh(e.cols),r=aV(),[o,i]=T.useState(e.groups[0]?.thead||""),s=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new eS(e.rows).GroupBy(u),h=e.cols.find(m=>m.id===u);e.setGroups(gI(p).map((m,g)=>{const v=p[m];return{...h,groupId:Qo(),groupKey:u,index:g,rows:v,groupName:m}}))},a=()=>e.setGroups([]);return y.jsx(T.Fragment,{children:y.jsxs(Pi,{arrow:!1,title:t.tableGroupLabel,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(KO,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[y.jsxs("div",{className:"flex flex-nowrap items-center",children:[y.jsx(go,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),y.jsx(ul,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:y.jsx(Aa,{size:16,className:"text-danger"})})]}),e.groups.length>0?y.jsxs("section",{className:"my-4",children:[y.jsx("header",{children:y.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),y.jsx(NF,{children:y.jsx(I1,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>y.jsx(lj,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},uj=e=>y.jsx("header",{className:"min-w-full mb-1",children:y.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[y.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[y.jsx("span",{children:y.jsx(G$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),y.jsx("span",{children:y.jsx(H$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),y.jsx("span",{children:y.jsx(cj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),y.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>y.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[y.jsxs("span",{children:[y.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),y.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[y.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),y.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=oh(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),dj=(e,t)=>typeof t=="function"?t(e):t,dc=(e,t,n)=>e===t?void 0:n?.(t),fj=e=>{const t=Ju(),n=T.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=T.useMemo(()=>rh(e.cols),[e.cols]),[i,s]=wp({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const l=c=>u=>{const d=a.state();return{...d,[c]:dj(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(a,l)=>(e.set?.(a),dc(l?.filters??[],a.filters??[],e.setFilters),dc(l?.sorters??[],a.sorters??[],e.setSorters),dc(l?.groups??[],a.groups??[],e.setGroups),dc(l?.cols??[],a.cols??[],e.setCols),a)]});return y.jsx(q$,{value:n,children:y.jsxs(Wn,{initial:!1,children:[r?y.jsx(uj,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?y.jsx(nE,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):y.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((a,l)=>y.jsx("div",{className:"min-w-full",children:y.jsx(nE,{...e,group:a,index:l,cols:i.cols,pagination:null,rows:a.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${a.groupId}`))})]})})},fc=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:s="",...a})=>y.jsxs(gn,{...a,as:r||"div","data-component":"card",className:Me("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4",i),children:[e?y.jsx("header",{"data-component":"card-title",className:Me("mb-2 w-full border-b border-card-border px-6 pb-4 text-xl font-medium",s),children:e}):o,y.jsx("div",{"data-component":"card-body",className:Me("min-w-full px-6",a.className),children:t?y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsx(ra,{className:"w-full"}),y.jsx(ra,{className:"w-8/12"}),y.jsx(ra,{className:"w-10/12"}),y.jsx(ra,{className:"w-1/2"})]}):n})]});fc.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",s=t||"h2",a=n||"nav";return y.jsxs(i,{...o,title:Ue.string(o.title)?o.title:void 0,className:Me("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[y.jsx(s,{className:"font-semibold",children:o.title}),r?y.jsx(a,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const pj=e=>{const t=e.interactive??!0,n=e.Icon??Ku;return y.jsx(fc,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:y.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[y.jsx("div",{className:Me("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:y.jsx(n,{size:48})}),y.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[y.jsx("p",{className:"text-lg",children:e.title}),e.loading?y.jsx(ra,{className:"h-10"}):y.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},hj=({item:e,context:t,setter:n,get:r,refs:o})=>y.jsx(po,{children:y.jsx(ip,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:y.jsxs(Wn,{presenceAffectsLayout:!0,children:[e?y.jsx(Ye.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?y.jsx(Fv,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:y.jsx(Zo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:y.jsxs(Ye.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[y.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:y.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:y.jsx(zo,{})})}),y.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[y.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),y.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),mj=e=>{const[t,n]=T.useState(null),r=T.useId(),{context:o,refs:i}=Dr({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),s=fs(o),a=mo(o,{role:"dialog"}),l=ho(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Nr([s,a,l]),u=T.useCallback(()=>{n(null)},[]),d=T.Children.toArray(e.children);return y.jsxs(T.Fragment,{children:[y.jsx(hj,{refs:i,context:o,get:c,item:t,setter:u}),y.jsx("ul",{role:"list",children:d.map((f,p)=>{const h=f.props,m=`${r}-${p}`,g=()=>n({...h,id:m}),v=h.leading;return y.jsx(Ye.li,{layout:!0,layoutId:`item-${m}`,className:"border-b border-card-border py-2 last:border-transparent",children:y.jsx(Ye.div,{layoutId:`toast-${m}`,className:"relative",children:y.jsx("div",{className:"relative flex items-start space-x-3",children:y.jsxs(T.Fragment,{children:[h.avatar?y.jsx("div",{children:y.jsx("div",{className:"relative px-1",children:y.jsx("button",{onClick:g,className:"flex size-10 items-center justify-center ring-primary",children:h.avatar})})}):null,y.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:y.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[y.jsxs("button",{onClick:g,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[y.jsx("h3",{children:h.title}),y.jsx("p",{className:"text-sm leading-snug text-secondary",children:h.description})]}),v?y.jsx(v,{open:g}):null]})})]})})})},m)})})]})},gj=e=>y.jsx(T.Fragment,{children:e.children}),rE=(e,t)=>{const[n,r]=T.useState(()=>t||e);return T.useEffect(()=>{r(e)},[e]),[n,r]},oE={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},iE=T.createContext(""),yj=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",ah=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const s=e[i];if(!yj(s))return s}return n==="backward"?ah(e,e.length-1,"backward"):ah(e,-1,"forward")},sE=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=ah(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},aE={[oE.ArrowLeft]:(e,t)=>sE(t,"backward"),[oE.ArrowRight]:(e,t)=>sE(t,"forward")},vj=e=>{const[t,n]=rE(e.active),r=T.useRef(null),o=Lr(e.onChange);T.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),T.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=T.Children.toArray(e.children),s=l=>{const c=l.currentTarget;n(c.dataset.id||"")},a=l=>{if(r.current===null)return;const c=l.key;if(Ue.keyof(aE,c)){const u=aE[c],d=u(l,r.current);if(d===null)return;n(d)}};return y.jsx(iE.Provider,{value:t,children:y.jsx(fc,{className:e.className,container:Me("pt-0 max-w-full w-full min-w-0",e.container),header:y.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[y.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),y.jsx("nav",{className:"min-w-0",children:y.jsx("ul",{onKeyDown:a,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return y.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Me("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:y.jsx(gn,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:s,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},bj=()=>T.useContext(iE),xj=e=>{const t=bj();return y.jsx(T.Fragment,{children:e.id===t?e.children:null})},lE=()=>{const e=T.useContext(Ho);return e?e.parser:_a.hsla},lh=.3,ia={duration:lh,type:"tween",ease:"easeInOut"},cE=T.createContext(null),ch={delay:.2,duration:.3,type:"tween",ease:"easeOut"},_i={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},wj=e=>y.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx(Ye.path,{className:"currentColor",initial:_i.initial,animate:_i.animate,transition:ch,d:"M18 6 6 18"}),y.jsx(Ye.path,{className:"currentColor",initial:_i.initial,animate:_i.animate,transition:ch,d:"m6 6 12 12"})]}),Sj=e=>y.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:y.jsx(Ye.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:_i.animate,initial:_i.initial,transition:ch})}),Ej={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},Tj={duration:.6,delay:.2,type:"tween",ease:"circOut"},Cj=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",kj=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,uE=()=>T.useContext(cE),Ij=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const s=lE(),a=uE(),[l,c]=T.useState(t);T.useEffect(()=>{if(!a){c(t);return}const d=kj(e,a.currentStep,a.previousStep,a.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,a,e]);const u=Cj(e,l,n);return y.jsxs(Ye.button,{...i,type:"button","data-step":e,animate:u,className:"relative w-auto text-center flex items-center justify-center",children:[y.jsx(Ye.div,{variants:Ej,transition:Tj,className:`absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),y.jsx(Ye.div,{initial:!1,animate:u,transition:ia,className:"flex relative justify-center items-center w-10 h-10 font-semibold rounded-full",variants:{error:{color:s("var(--danger-foreground)"),borderColor:s("var(--danger-hover)"),backgroundColor:s("var(--danger-DEFAULT)")},inactive:{transition:ia,color:s("var(--disabled)"),borderColor:s("var(--card-border)"),backgroundColor:s("var(--background)")},active:{transition:ia,color:s("var(--primary-foreground)"),borderColor:s("var(--primary-DEFAULT)"),backgroundColor:s("var(--primary-DEFAULT)")},complete:{transition:ia,color:s("var(--success-foreground)"),borderColor:s("var(--success-DEFAULT)"),backgroundColor:s("var(--success-DEFAULT)")}},children:y.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?y.jsx(Sj,{className:"size-6 text-primary-foreground"}):u==="error"?y.jsx(wj,{className:"size-6 text-danger-foreground"}):y.jsx(T.Fragment,{children:y.jsx("span",{children:e})})})}),r&&u==="active"?y.jsx("span",{className:`h-full flex items-center px-4 ${o}`,children:r}):null]})},Oj=e=>{const[t,n]=C1(),r=T.useRef(e.currentStep),[o,i]=T.useState(e.currentStep);T.useEffect(()=>{if(e.currentStep===0)return;const a=t.current,l=a.querySelectorAll("[data-step]")[0],c=a.querySelector(`[data-step="${e.currentStep}"]`);if(l&&c){const u=c.getBoundingClientRect().left-l.getBoundingClientRect().left;n("div[data-name='progress']",{width:`${Math.max(0,u)}px`},ia)}},[e.currentStep]),T.useEffect(()=>{r.current=o;const a=setTimeout(()=>{i(e.currentStep)},lh*1e3);return()=>clearTimeout(a)},[e.currentStep]);const s={currentStep:e.currentStep,previousStep:r.current,progressBarDuration:lh};return y.jsx(cE.Provider,{value:s,children:y.jsxs("div",{className:"flex relative justify-between",ref:t,children:[y.jsx("div",{className:"absolute top-1/2 h-1 w-[calc(100%)] bg-card-border"}),y.jsx("div",{"data-name":"progress",className:"absolute top-1/2 w-0 h-1 bg-success"}),e.children]})})},dE={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},Pj={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},fE=e=>y.jsx(Ye.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:dE,exit:dE.false,transition:Pj,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Me("aria-hidden:pointer-events-none",e.className),children:e.children}),Aj=Lo("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),_j=T.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const l=()=>o?.(!1);return y.jsx(Wn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?y.jsx(Ye.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Me("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:y.jsx(fE,{"data-open":!!i,open:!!i,children:y.jsxs(gn,{...s,ref:a,role:"alert","data-theme":n,as:s.as??"div",className:Me(Aj({theme:n}),t),children:[y.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?y.jsx(hy,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?y.jsx(Ku,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?y.jsx(YO,{"aria-hidden":"true",size:20}):null,r,y.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:s.title})]}),s.children,o!==void 0&&i?y.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:y.jsx(zo,{size:20})}):null]})})}):null})}),Mj=e=>y.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[y.jsxs("header",{className:"flex items-start gap-4 p-6",children:[y.jsx("div",{className:Me("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:y.jsx("div",{children:y.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("header",{children:y.jsx("h3",{className:"text-base leading-none",children:e.title})}),y.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?y.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Dj=Symbol.for("react.lazy");function pE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nj(...e){return t=>{let n=!1;const r=e.map(o=>{const i=pE(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():pE(e[o],null)}}}}const pc=I[" use ".trim().toString()];function Fj(e){return typeof e=="object"&&e!==null&&"then"in e}function hE(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Dj&&"_payload"in e&&Fj(e._payload)}function Lj(e){const t=Vj(e),n=I.forwardRef((r,o)=>{let{children:i,...s}=r;hE(i)&&typeof pc=="function"&&(i=pc(i._payload));const a=I.Children.toArray(i),l=a.find($j);if(l){const c=l.props.children,u=a.map(d=>d===l?I.Children.count(c)>1?I.Children.only(null):I.isValidElement(c)?c.props.children:null:d);return y.jsx(t,{...s,ref:o,children:I.isValidElement(c)?I.cloneElement(c,void 0,u):null})}return y.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const mE=Lj("Slot");function Vj(e){const t=I.forwardRef((n,r)=>{let{children:o,...i}=n;if(hE(o)&&typeof pc=="function"&&(o=pc(o._payload)),I.isValidElement(o)){const s=zj(o),a=jj(i,o.props);return o.type!==I.Fragment&&(a.ref=r?Nj(r,s):s),I.cloneElement(o,a)}return I.Children.count(o)>1?I.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const Rj=Symbol("radix.slottable");function $j(e){return I.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rj}function jj(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function zj(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const gE=(e="")=>Me("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),uh=T.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),yE=T.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:s="",label:a,...l},c)=>{const[u,d]=T.useState(r??!1),[f,p]=T.useState(!1),[h,m]=T.useState(null),g=T.useRef([]),v=T.useRef([]),b=T.useContext(uh),x=Ar(),E=_r(),S=HA(),O=dv(),w=x!==null,{floatingStyles:C,refs:P,context:_}=Dr({nodeId:S,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Yo,placement:w?"right":"bottom-start",middleware:[as({mainAxis:w?0:4,alignmentAxis:w?-4:0}),bd(),vd()]}),F=mo(_,{role:"menu"}),j=ho(_,{bubbles:!0}),L=Sv(_,{move:!1,enabled:n,delay:{open:Gv},handleClose:Uv({blockPointerEvents:!0,requireIntent:!1})}),A=fs(_,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),D=cl(_,{loop:!0,activeIndex:h,nested:w,listRef:g,onNavigate:m}),z=h_(_,{activeIndex:h,listRef:v,resetMs:g_,onMatch:u?m:void 0}),{getReferenceProps:M,getFloatingProps:k,getItemProps:R}=Nr([L,A,F,j,D,z]);T.useEffect(()=>{if(!E)return;const B=()=>d(!1),H=q=>{q.nodeId!==S&&q.parentId===x&&d(!1)};return E.events.on("click",B),E.events.on("menuopen",H),()=>{E.events.off("click",B),E.events.off("menuopen",H)}},[E,S,x]),T.useEffect(()=>{u&&E&&E.events.emit("menuopen",{parentId:x,nodeId:S})},[E,u,S,x]);const $=o?l.className:Me(gE(l.className));return y.jsxs(WA,{id:S,children:[y.jsx(T.Fragment,{children:l.asChild?y.jsx(mE,{...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:a,className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:xr(P.setReference,O.ref,c),tabIndex:w?b.activeIndex===O.index?0:-1:void 0}):y.jsxs("button",{type:"button",className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:xr(P.setReference,O.ref,c),tabIndex:w?b.activeIndex===O.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:[a,w&&y.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[y.jsx("span",{className:"sr-only",children:"Next menu"}),y.jsx(Yu,{size:14})]})]})}),y.jsx(uh.Provider,{value:{activeIndex:h,setActiveIndex:m,getItemProps:R,setHasFocusInside:p,isOpen:u},children:y.jsx(VA,{elementsRef:g,labelsRef:v,children:u&&y.jsx(po,{children:y.jsx(Zo,{context:_,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:y.jsx(t,{...k(),ref:P.setFloating,style:{...l.style,...C},className:Me("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",s),children:e})})})})})]})}),Bj=T.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const s=T.useContext(uh),a=dv({label:n?null:e}),l=_r(),c=a.index===s.activeIndex;return y.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":s.isOpen,tabIndex:c?0:-1,ref:xr(a.ref,i),className:gE(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...s.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),s.setHasFocusInside(!0)}}),children:[r,t?y.jsx(t,{size:16}):null]})}),Hj=T.forwardRef((e,t)=>Ar()===null?y.jsx(qA,{children:y.jsx(yE,{...e,isParent:!0,ref:t})}):y.jsx(yE,{...e,isParent:!1,ref:t})),dh=T.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:s,container:a,...l},c)=>{const u=l.disabled||r;return y.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Me("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[y.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Me("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,y.jsx("span",{"data-name":"checkbox-label",className:Me("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Wj=({children:e,className:t="",size:n,...r})=>y.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[y.jsx("input",{...r,type:"radio",className:Me("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),qj=Jv("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
15
|
+
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),fh=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(fh.displayName="DialogRootContext");function qr(e){const t=I.useContext(fh);if(e===!1&&t===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.":bn(27));return t}let sa=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Uj={[sa.startingStyle]:""},Gj={[sa.endingStyle]:""},hc={transitionStatus(e){return e==="starting"?Uj:e==="ending"?Gj:null}};let Kn=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=sa.startingStyle]="startingStyle",e[e.endingStyle=sa.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({});const Yj={[(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}).popupOpen]:""},Kj={[Kn.open]:""},Zj={[Kn.closed]:""},Xj={[Kn.anchorHidden]:""},Qj={open(e){return e?Yj:null}},ph={open(e){return e?Kj:Zj},anchorHidden(e){return e?Xj:null}},Jj={...ph,...hc},vE=I.forwardRef(function(t,n){const{render:r,className:o,forceRender:i=!1,...s}=t,{store:a}=qr(),l=a.useState("open"),c=a.useState("nested"),u=a.useState("mounted"),d=a.useState("transitionStatus"),f=I.useMemo(()=>({open:l,transitionStatus:d}),[l,d]);return Rt("div",t,{state:f,ref:[a.context.backdropRef,n],stateAttributesMapping:Jj,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},s],enabled:i||!c})});process.env.NODE_ENV!=="production"&&(vE.displayName="DialogBackdrop");let hh;process.env.NODE_ENV!=="production"&&(hh=new Set);function bE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");hh.has(t)||(hh.add(t),console.error(`Base UI: ${t}`))}}const xE=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(xE.displayName="CompositeRootContext");function ez(e=!1){const t=I.useContext(xE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":bn(16));return t}function tz(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:I.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[r,n,t,s,a,i,o])}}function mh(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=I.useRef(null),s=ez(!0)!==void 0,a=ke(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=tz({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&I.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";o?f||bE("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):f&&bE("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[o]);const c=I.useCallback(()=>{const f=i.current;nz(f)&&s&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,s]);We(c,[c]);const u=I.useCallback((f={})=>{const{onClick:p,onMouseDown:h,onKeyUp:m,onKeyDown:g,onPointerDown:v,...b}=f;return Ld({type:o?"button":void 0,onClick(E){if(t){E.preventDefault();return}p?.(E)},onMouseDown(E){t||h?.(E)},onKeyDown(E){if(t||(Rd(E),g?.(E)),E.baseUIHandlerPrevented)return;const S=E.target===E.currentTarget&&!o&&!a()&&!t,O=E.key==="Enter",w=E.key===" ";S&&((w||O)&&E.preventDefault(),O&&p?.(E))},onKeyUp(E){t||(Rd(E),m?.(E)),!E.baseUIHandlerPrevented&&E.target===E.currentTarget&&!o&&!t&&E.key===" "&&p?.(E)},onPointerDown(E){if(t){E.preventDefault();return}v?.(E)}},o?void 0:{role:"button"},l,b)},[t,l,o,a]),d=ke(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function nz(e){return dt(e)&&e.tagName==="BUTTON"}const wE=I.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,...a}=t,{store:l}=qr(),c=l.useState("open");function u(h){c&&l.setOpen(!1,Qt(I_,h.nativeEvent))}const{getButtonProps:d,buttonRef:f}=mh({disabled:i,native:s}),p=I.useMemo(()=>({disabled:i}),[i]);return Rt("button",t,{state:p,ref:[n,f],props:[{onClick:u},a,d]})});process.env.NODE_ENV!=="production"&&(wE.displayName="DialogClose");const aa=0;class Ur{static create(){return new Ur}currentId=aa;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=aa,n()},t)}isStarted(){return this.currentId!==aa}clear=()=>{this.currentId!==aa&&(clearTimeout(this.currentId),this.currentId=aa)};disposeEffect=()=>this.clear}function la(){const e=sr(Ur.create).current;return vl(e.disposeEffect),e}function rz(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const SE=I.createContext(null);process.env.NODE_ENV!=="production"&&(SE.displayName="FloatingNodeContext");const EE=I.createContext(null);process.env.NODE_ENV!=="production"&&(EE.displayName="FloatingTreeContext");const TE=()=>I.useContext(SE)?.id||null,CE=e=>{const t=I.useContext(EE);return e??t};function mc(e){return`data-base-ui-${e}`}const Gr=I.forwardRef(function(t,n){const[r,o]=I.useState();We(()=>{Q_&&o("button")},[]);const i={tabIndex:0,role:r};return y.jsx("span",{...t,ref:n,style:xs,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Gr.displayName="FocusGuard");let kE=0;function gh(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(kE);const i=()=>e?.focus({preventScroll:n});o?i():kE=requestAnimationFrame(i)}const Mi={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function IE(e){return e==="inert"?Mi.inert:e==="aria-hidden"?Mi["aria-hidden"]:Mi.none}let gc=new WeakSet,yc={},yh=0;const OE=e=>e&&(e.host||OE(e.parentNode)),oz=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=OE(n);return e.contains(r)?r:null}).filter(n=>n!=null);function iz(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,s=oz(t,e),a=new Set,l=new Set(s),c=[];yc[o]||(yc[o]=new WeakMap);const u=yc[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(Jn(h)!=="script")if(a.has(h))f(h);else{const m=i?h.getAttribute(i):null,g=m!==null&&m!=="false",v=IE(i),b=(v.get(h)||0)+1,x=(u.get(h)||0)+1;v.set(h,b),u.set(h,x),c.push(h),b===1&&g&&gc.add(h),x===1&&h.setAttribute(o,""),!g&&i&&h.setAttribute(i,i==="inert"?"":"true")}})}return yh+=1,()=>{c.forEach(p=>{const h=IE(i),g=(h.get(p)||0)-1,v=(u.get(p)||0)-1;h.set(p,g),u.set(p,v),g||(!gc.has(p)&&i&&p.removeAttribute(i),gc.delete(p)),v||p.removeAttribute(o)}),yh-=1,yh||(Mi.inert=new WeakMap,Mi["aria-hidden"]=new WeakMap,Mi.none=new WeakMap,gc=new WeakSet,yc={})}}function sz(e,t=!1,n=!1){const r=hn(e[0]).body;return iz(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const vh=I.createContext(null);process.env.NODE_ENV!=="production"&&(vh.displayName="PortalContext");const PE=()=>I.useContext(vh),az=mc("portal");function AE(e={}){const{ref:t,container:n,componentProps:r=rn,elementProps:o,elementState:i}=e,s=ei(),l=PE()?.portalNode,[c,u]=I.useState(null),[d,f]=I.useState(null),p=ke(v=>{v!==null&&f(v)}),h=I.useRef(null);We(()=>{if(n===null){h.current&&(h.current=null,f(null),u(null));return}if(s==null)return;const v=(n&&(La(n)?n:n.current))??l??document.body;if(v==null){h.current&&(h.current=null,f(null),u(null));return}h.current!==v&&(h.current=v,f(null),u(v))},[n,l,s]);const m=Rt("div",r,{ref:[t,p],state:i,props:[{id:s,[az]:""},o]});return{portalNode:d,portalSubtree:c&&m?Xn.createPortal(m,c):null}}const _E=I.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:u}=AE({container:o,ref:n,componentProps:t,elementProps:l}),d=I.useRef(null),f=I.useRef(null),p=I.useRef(null),h=I.useRef(null),[m,g]=I.useState(null),v=m?.modal,b=m?.open,x=typeof a=="boolean"?a:!!m&&!m.modal&&m.open&&!!c;I.useEffect(()=>{if(!c||v)return;function S(O){c&&O.relatedTarget&&vs(O)&&(O.type==="focusin"?Vb:EM)(c)}return c.addEventListener("focusin",S,!0),c.addEventListener("focusout",S,!0),()=>{c.removeEventListener("focusin",S,!0),c.removeEventListener("focusout",S,!0)}},[c,v]),I.useEffect(()=>{!c||b||Vb(c)},[b,c]);const E=I.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:h,portalNode:c,setFocusManagerState:g}),[c]);return y.jsxs(I.Fragment,{children:[u,y.jsxs(vh.Provider,{value:E,children:[x&&c&&y.jsx(Gr,{"data-type":"outside",ref:d,onFocus:S=>{if(vs(S,c))p.current?.focus();else{const O=m?m.domReference:null;Lb(O)?.focus()}}}),x&&c&&y.jsx("span",{"aria-owns":c.id,style:C_}),c&&Xn.createPortal(r,c),x&&c&&y.jsx(Gr,{"data-type":"outside",ref:f,onFocus:S=>{if(vs(S,c))h.current?.focus();else{const O=m?m.domReference:null;Fb(O)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,Qt(ib,S.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(_E.displayName="FloatingPortal");function Cr(e){return e==null?e:"current"in e?e.current:e}function lz(e,t){const n=Ft(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const ME=20;let Yr=[];function bh(){Yr=Yr.filter(e=>e.isConnected)}function cz(e){bh(),e&&Jn(e)!=="body"&&(Yr.push(e),Yr.length>ME&&(Yr=Yr.slice(-ME)))}function xh(){return bh(),Yr[Yr.length-1]}function uz(e){if(!e)return null;const t=ys();return Db(e,t)?e:gl(e,t)[0]||e}function dz(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():sn(e).display!=="none"}function DE(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=ys(),o=SM(e,n).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return Db(s,n)||s.hasAttribute("data-tabindex")&&!a.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function fz(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],initialFocus:i=!0,returnFocus:s=!0,restoreFocus:a=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:u="",getInsideElements:d=()=>[],nextFocusableElement:f,previousFocusableElement:p,beforeContentFocusGuardRef:h,externalTree:m}=e,g="rootStore"in t?t.rootStore:t,v=g.useState("open"),b=g.useState("domReferenceElement"),x=g.useState("floatingElement"),{events:E,dataRef:S}=g.context,O=ke(()=>S.current.floatingContext?.nodeId),w=ke(d),C=i===!1,P=Sb(b)&&C,_=yo(o),F=yo(i),j=yo(s),L=yo(u),A=CE(m),D=PE(),z=I.useRef(null),M=I.useRef(null),k=I.useRef(!1),R=I.useRef(!1),$=I.useRef(!1),B=I.useRef(-1),H=I.useRef(""),q=I.useRef(""),W=I.useRef(null),oe=I.useRef(null),ae=ms(W,h,D?.beforeInsideRef),ie=ms(oe,D?.afterInsideRef),U=la(),G=la(),J=wl(),fe=D!=null,N=Hd(x),ne=ke((Q=N)=>Q?gl(Q,ys()):[]),te=ke(Q=>{const Z=ne(Q);return _.current.map(()=>Z).filter(Boolean).flat()});I.useEffect(()=>{if(r||!l)return;function Q(le){le.key==="Tab"&&bt(N,In(hn(N)))&&ne().length===0&&!P&&oM(le)}const Z=hn(N);return Z.addEventListener("keydown",Q),()=>{Z.removeEventListener("keydown",Q)}},[r,b,N,l,_,P,ne,te]),I.useEffect(()=>{if(r||!x)return;function Q(Z){const le=pn(Z),pe=ne().indexOf(le);pe!==-1&&(B.current=pe)}return x.addEventListener("focusin",Q),()=>{x.removeEventListener("focusin",Q)}},[r,x,ne]),I.useEffect(()=>{if(r||!v)return;const Q=hn(N);function Z(){$.current=!1}function le(pe){const ge=pn(pe),se=bt(x,ge)||bt(b,ge)||bt(D?.portalNode,ge);$.current=!se,q.current=pe.pointerType||"keyboard"}function ce(){q.current="keyboard"}return Q.addEventListener("pointerdown",le,!0),Q.addEventListener("pointerup",Z,!0),Q.addEventListener("pointercancel",Z,!0),Q.addEventListener("keydown",ce,!0),()=>{Q.removeEventListener("pointerdown",le,!0),Q.removeEventListener("pointerup",Z,!0),Q.removeEventListener("pointercancel",Z,!0),Q.removeEventListener("keydown",ce,!0)}},[r,x,b,N,v,D]),I.useEffect(()=>{if(r||!c)return;function Q(){R.current=!0,G.start(0,()=>{R.current=!1})}function Z(ge){const se=ge.relatedTarget,Y=ge.currentTarget,V=pn(ge);queueMicrotask(()=>{const X=O(),de=g.context.triggerElements,he=se?.hasAttribute(mc("focus-guard"))&&[W.current,oe.current,D?.beforeInsideRef.current,D?.afterInsideRef.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,Cr(p),Cr(f)].includes(se),Se=!(bt(b,se)||bt(x,se)||bt(se,x)||bt(D?.portalNode,se)||se!=null&&de.hasElement(se)||de.hasMatchingElement(be=>bt(be,se))||he||A&&(ri(A.nodesRef.current,X).find(be=>bt(be.context?.elements.floating,se)||bt(be.context?.elements.domReference,se))||Eb(A.nodesRef.current,X).find(be=>[be.context?.elements.floating,Hd(be.context?.elements.floating)].includes(se)||be.context?.elements.domReference===se)));if(Y===b&&N&&DE(N,_),a&&Y!==b&&!dz(V)&&In(hn(N))===hn(N).body){if(dt(N)&&(N.focus(),a==="popup")){J.request(()=>{N.focus()});return}const be=B.current,Ae=ne(),qe=Ae[be]||Ae[Ae.length-1]||N;dt(qe)&&qe.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(P||!l)&&se&&Se&&!R.current&&(P||se!==xh())&&(k.current=!0,g.setOpen(!1,Qt(ib,ge)))})}function le(){$.current||(S.current.insideReactTree=!0,U.start(0,()=>{S.current.insideReactTree=!1}))}const ce=dt(b)?b:null,pe=[];if(!(!x&&!ce))return ce&&(ce.addEventListener("focusout",Z),ce.addEventListener("pointerdown",Q),pe.push(()=>{ce.removeEventListener("focusout",Z),ce.removeEventListener("pointerdown",Q)})),x&&(x.addEventListener("focusout",Z),D&&(x.addEventListener("focusout",le,!0),pe.push(()=>{x.removeEventListener("focusout",le,!0)})),pe.push(()=>{x.removeEventListener("focusout",Z)})),()=>{pe.forEach(ge=>{ge()})}},[r,b,x,N,l,A,D,g,c,a,ne,P,O,_,S,U,G,J,f,p]),I.useEffect(()=>{if(r||!x||!v)return;const Q=Array.from(D?.portalNode?.querySelectorAll(`[${mc("portal")}]`)||[]),le=(A?Eb(A.nodesRef.current,O()):[]).find(ge=>Sb(ge.context?.elements.domReference||null))?.context?.elements.domReference,ce=[x,le,...Q,...w(),z.current,M.current,W.current,oe.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,Cr(p),Cr(f),P?b:null].filter(ge=>ge!=null),pe=sz(ce,l||P);return()=>{pe()}},[v,r,b,x,l,_,D,P,A,O,w,f,p]),We(()=>{if(!v||r||!dt(N))return;const Q=hn(N),Z=In(Q);queueMicrotask(()=>{const le=te(N),ce=F.current,pe=typeof ce=="function"?ce(L.current||""):ce;if(pe===void 0||pe===!1)return;let ge;pe===!0||pe===null?ge=le[0]||N:ge=Cr(pe),ge=ge||le[0]||N,!bt(N,Z)&&gh(ge,{preventScroll:ge===N})})},[r,v,N,C,te,F,L]),We(()=>{if(r||!N)return;const Q=hn(N),Z=In(Q);cz(Z);function le(ge){if(ge.open||(H.current=lz(ge.nativeEvent,q.current)),ge.reason===k_&&ge.nativeEvent.type==="mouseleave"&&(k.current=!0),ge.reason===rb)if(ge.nested)k.current=!1;else if(sM(ge.nativeEvent)||aM(ge.nativeEvent))k.current=!1;else{let se=!1;document.createElement("div").focus({get preventScroll(){return se=!0,!1}}),se?k.current=!1:k.current=!0}}E.on("openchange",le);const ce=Q.createElement("span");ce.setAttribute("tabindex","-1"),ce.setAttribute("aria-hidden","true"),Object.assign(ce.style,xs),fe&&b&&b.insertAdjacentElement("afterend",ce);function pe(){const ge=j.current;let se=typeof ge=="function"?ge(H.current):ge;if(se===void 0||se===!1)return null;if(se===null&&(se=!0),typeof se=="boolean"){const V=b||xh();return V&&V.isConnected?V:ce}const Y=b||xh()||ce;return Cr(se)||Y}return()=>{E.off("openchange",le);const ge=In(Q),se=bt(x,ge)||A&&ri(A.nodesRef.current,O(),!1).some(V=>bt(V.context?.elements.floating,ge)),Y=pe();queueMicrotask(()=>{const V=uz(Y),X=typeof j.current!="boolean";j.current&&!k.current&&dt(V)&&(!(!X&&V!==ge&&ge!==Q.body)||se)&&V.focus({preventScroll:!0}),ce.remove()})}},[r,x,N,j,S,E,A,fe,b,O]),I.useEffect(()=>{queueMicrotask(()=>{k.current=!1})},[r]),I.useEffect(()=>{if(r||!v)return;function Q(le){pn(le)?.closest(`[${tb}]`)&&(R.current=!0)}const Z=hn(N);return Z.addEventListener("pointerdown",Q,!0),()=>{Z.removeEventListener("pointerdown",Q,!0)}},[r,v,N]),We(()=>{if(!r&&D)return D.setFocusManagerState({modal:l,closeOnFocusOut:c,open:v,onOpenChange:g.setOpen,domReference:b}),()=>{D.setFocusManagerState(null)}},[r,D,l,v,g,c,b]),We(()=>{if(!(r||!N))return DE(N,_),()=>{queueMicrotask(bh)}},[r,N,_]);const re=!r&&(l?!P:!0)&&(fe||l);return y.jsxs(I.Fragment,{children:[re&&y.jsx(Gr,{"data-type":"inside",ref:ae,onFocus:Q=>{if(l){const Z=te();gh(Z[Z.length-1])}else D?.portalNode&&(k.current=!1,vs(Q,D.portalNode)?Fb(b)?.focus():Cr(p??D.beforeOutsideRef)?.focus())}}),n,re&&y.jsx(Gr,{"data-type":"inside",ref:ie,onFocus:Q=>{l?gh(te()[0]):D?.portalNode&&(c&&(k.current=!0),vs(Q,D.portalNode)?Lb(b)?.focus():Cr(f??D.afterOutsideRef)?.focus())}})]})}function pz(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0}=t,u=I.useRef(void 0),d=wl(),f=la(),p=I.useMemo(()=>({onPointerDown(h){u.current=h.pointerType},onMouseDown(h){const m=u.current,g=h.nativeEvent,v=n.select("open");if(h.button!==0||i==="click"||Tb(m)&&a)return;const b=r.current.openEvent,x=b?.type,E=n.select("domReferenceElement")!==h.currentTarget,S=v&&E||!(v&&s&&(!(b&&l)||x==="click"||x==="mousedown"));if(wb(g.target)){const w=Qt(hs,g,g.target);S&&m==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,w)}):n.setOpen(S,w);return}const O=h.currentTarget;d.request(()=>{const w=Qt(hs,g,O);S&&m==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,w)}):n.setOpen(S,w)})},onClick(h){if(i==="mousedown-only")return;const m=u.current;if(i==="mousedown"&&m){u.current=void 0;return}if(Tb(m)&&a)return;const g=n.select("open"),v=r.current.openEvent,b=n.select("domReferenceElement")!==h.currentTarget,x=g&&b||!(g&&s&&(!(v&&l)||Cb(v))),E=Qt(hs,h.nativeEvent,h.currentTarget);x&&m==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,E)}):n.setOpen(x,E)},onKeyDown(){u.current=void 0}}),[r,i,a,n,l,s,d,f,c]);return I.useMemo(()=>o?{reference:p}:rn,[o,p])}const hz={intentional:"onClick",sloppy:"onPointerDown"};function mz(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function gz(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("referenceElement"),s=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:l}=n.context,{enabled:c=!0,escapeKey:u=!0,outsidePress:d=!0,outsidePressEvent:f="sloppy",referencePress:p=!1,referencePressEvent:h="sloppy",ancestorScroll:m=!1,bubbles:g,externalTree:v}=t,b=CE(v),x=ke(typeof d=="function"?d:()=>!1),E=typeof d=="function"?x:d,S=I.useRef(!1),{escapeKey:O,outsidePress:w}=mz(g),C=I.useRef(null),P=la(),_=la(),F=ke(()=>{_.clear(),l.current.insideReactTree=!1}),j=I.useRef(!1),L=I.useRef(""),A=ke(N=>{L.current=N.pointerType}),D=ke(()=>{const N=L.current,ne=N==="pen"||!N?"mouse":N,te=typeof f=="function"?f():f;return typeof te=="string"?te:te[ne]}),z=ke(N=>{if(!r||!c||!u||N.key!=="Escape"||j.current)return;const ne=l.current.floatingContext?.nodeId,te=b?ri(b.nodesRef.current,ne):[];if(!O&&te.length>0){let Z=!0;if(te.forEach(le=>{le.context?.open&&!le.context.dataRef.current.__escapeKeyBubbles&&(Z=!1)}),!Z)return}const re=iM(N)?N.nativeEvent:N,Q=Qt(P_,re);n.setOpen(!1,Q),!O&&!Q.isPropagationAllowed&&N.stopPropagation()}),M=ke(N=>{const ne=D();return ne==="intentional"&&N.type!=="click"||ne==="sloppy"&&N.type==="click"}),k=ke(()=>{l.current.insideReactTree=!0,_.start(0,F)}),R=ke((N,ne=!1)=>{if(M(N)){F();return}if(l.current.insideReactTree){F();return}if(D()==="intentional"&&ne||typeof E=="function"&&!E(N))return;const te=pn(N),re=`[${mc("inert")}]`,Q=hn(n.select("floatingElement")).querySelectorAll(re),Z=n.context.triggerElements;if(te&&(Z.hasElement(te)||Z.hasMatchingElement(se=>bt(se,te))))return;let le=Ge(te)?te:null;for(;le&&!kn(le);){const se=tr(le);if(kn(se)||!Ge(se))break;le=se}if(Q.length&&Ge(te)&&!rM(te)&&!bt(te,n.select("floatingElement"))&&Array.from(Q).every(se=>!bt(le,se)))return;if(dt(te)&&!("touches"in N)){const se=kn(te),Y=sn(te),V=/auto|scroll/,X=se||V.test(Y.overflowX),de=se||V.test(Y.overflowY),he=X&&te.clientWidth>0&&te.scrollWidth>te.clientWidth,Se=de&&te.clientHeight>0&&te.scrollHeight>te.clientHeight,be=Y.direction==="rtl",Ae=Se&&(be?N.offsetX<=te.offsetWidth-te.clientWidth:N.offsetX>te.clientWidth),qe=he&&N.offsetY>te.clientHeight;if(Ae||qe)return}const ce=l.current.floatingContext?.nodeId,pe=b&&ri(b.nodesRef.current,ce).some(se=>$n(N,se.context?.elements.floating));if($n(N,n.select("floatingElement"))||$n(N,n.select("domReferenceElement"))||pe)return;const ge=b?ri(b.nodesRef.current,ce):[];if(ge.length>0){let se=!0;if(ge.forEach(Y=>{Y.context?.open&&!Y.context.dataRef.current.__outsidePressBubbles&&(se=!1)}),!se)return}n.setOpen(!1,Qt(rb,N)),F()}),$=ke(N=>{D()!=="sloppy"||N.pointerType==="touch"||!n.select("open")||!c||$n(N,n.select("floatingElement"))||$n(N,n.select("domReferenceElement"))||R(N)}),B=ke(N=>{if(D()!=="sloppy"||!n.select("open")||!c||$n(N,n.select("floatingElement"))||$n(N,n.select("domReferenceElement")))return;const ne=N.touches[0];ne&&(C.current={startTime:Date.now(),startX:ne.clientX,startY:ne.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},P.start(1e3,()=>{C.current&&(C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1)}))}),H=ke(N=>{const ne=pn(N);function te(){B(N),ne?.removeEventListener(N.type,te)}ne?.addEventListener(N.type,te)}),q=ke(N=>{const ne=S.current;if(S.current=!1,P.clear(),N.type==="mousedown"&&C.current&&!C.current.dismissOnMouseDown)return;const te=pn(N);function re(){N.type==="pointerdown"?$(N):R(N,ne),te?.removeEventListener(N.type,re)}te?.addEventListener(N.type,re)}),W=ke(N=>{if(D()!=="sloppy"||!C.current||$n(N,n.select("floatingElement"))||$n(N,n.select("domReferenceElement")))return;const ne=N.touches[0];if(!ne)return;const te=Math.abs(ne.clientX-C.current.startX),re=Math.abs(ne.clientY-C.current.startY),Q=Math.sqrt(te*te+re*re);Q>5&&(C.current.dismissOnTouchEnd=!0),Q>10&&(R(N),P.clear(),C.current=null)}),oe=ke(N=>{const ne=pn(N);function te(){W(N),ne?.removeEventListener(N.type,te)}ne?.addEventListener(N.type,te)}),ae=ke(N=>{D()!=="sloppy"||!C.current||$n(N,n.select("floatingElement"))||$n(N,n.select("domReferenceElement"))||(C.current.dismissOnTouchEnd&&R(N),P.clear(),C.current=null)}),ie=ke(N=>{const ne=pn(N);function te(){ae(N),ne?.removeEventListener(N.type,te)}ne?.addEventListener(N.type,te)});I.useEffect(()=>{if(!r||!c)return;l.current.__escapeKeyBubbles=O,l.current.__outsidePressBubbles=w;const N=new Ur;function ne(le){n.setOpen(!1,Qt(nb,le))}function te(){N.clear(),j.current=!0}function re(){N.start(rs()?5:0,()=>{j.current=!1})}const Q=hn(o);Q.addEventListener("pointerdown",A,!0),u&&(Q.addEventListener("keydown",z),Q.addEventListener("compositionstart",te),Q.addEventListener("compositionend",re)),E&&(Q.addEventListener("click",q,!0),Q.addEventListener("pointerdown",q,!0),Q.addEventListener("touchstart",H,!0),Q.addEventListener("touchmove",oe,!0),Q.addEventListener("touchend",ie,!0),Q.addEventListener("mousedown",q,!0));let Z=[];return m&&(Ge(s)&&(Z=Ln(s)),Ge(o)&&(Z=Z.concat(Ln(o))),!Ge(i)&&i&&i.contextElement&&(Z=Z.concat(Ln(i.contextElement)))),Z=Z.filter(le=>le!==Q.defaultView?.visualViewport),Z.forEach(le=>{le.addEventListener("scroll",ne,{passive:!0})}),()=>{Q.removeEventListener("pointerdown",A,!0),u&&(Q.removeEventListener("keydown",z),Q.removeEventListener("compositionstart",te),Q.removeEventListener("compositionend",re)),E&&(Q.removeEventListener("click",q,!0),Q.removeEventListener("pointerdown",q,!0),Q.removeEventListener("touchstart",H,!0),Q.removeEventListener("touchmove",oe,!0),Q.removeEventListener("touchend",ie,!0),Q.removeEventListener("mousedown",q,!0)),Z.forEach(le=>{le.removeEventListener("scroll",ne)}),N.clear(),S.current=!1}},[l,o,i,s,u,E,r,a,m,c,O,w,z,R,q,$,H,oe,ie,A,n]),I.useEffect(F,[E,F]);const U=I.useMemo(()=>({onKeyDown:z,...p&&{[hz[h]]:N=>{n.setOpen(!1,Qt(hs,N.nativeEvent))},...h!=="intentional"&&{onClick(N){n.setOpen(!1,Qt(hs,N.nativeEvent))}}}}),[z,n,p,h]),G=ke(N=>{const ne=pn(N.nativeEvent);!bt(n.select("floatingElement"),ne)||N.button!==0||(S.current=!0)}),J=ke(N=>{!r||!c||N.button!==0||(S.current=!0)}),fe=I.useMemo(()=>({onKeyDown:z,onPointerDown:G,onMouseDown:G,onMouseUp:G,onClickCapture:k,onMouseDownCapture(N){k(),J(N)},onPointerDownCapture(N){k(),J(N)},onMouseUpCapture:k,onTouchEndCapture:k,onTouchMoveCapture:k}),[z,G,k,J]);return I.useMemo(()=>c?{reference:U,floating:fe,trigger:U}:{},[c,U,fe])}var yz=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
19
16
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
20
17
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
21
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},
|
|
18
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},vz=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(!(a.apply(null,i)===a.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
22
19
|
This means your output selector will likely run more frequently than intended.
|
|
23
20
|
Avoid returning a new reference inside your input selector, e.g.
|
|
24
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:c})}},sB={inputStabilityCheck:"once",identityFunctionCheck:"once"},oc=Symbol("NOT_FOUND");function aB(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function lB(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function cB(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var GE=e=>Array.isArray(e)?e:[e];function uB(e){const t=Array.isArray(e[0])?e[0]:e;return cB(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function KE(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var dB=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...sB,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:oB},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:iB}}};function fB(e){let t;return{get(n){return t&&e(t.key,n)?t.value:oc},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function pB(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return oc}function o(a,l){r(a)===oc&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var hB=(e,t)=>e===t;function mB(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function gB(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=hB,maxSize:o=1,resultEqualityCheck:i}=n,s=mB(r);let a=0;const l=o<=1?fB(s):pB(o,s);function c(){let u=l.get(arguments);if(u===oc){if(u=e.apply(null,arguments),a++,i){const f=l.getEntries().find(p=>i(p.value,u));f&&(u=f.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var vB=class{constructor(e){this.value=e}deref(){return this.value}},yB=typeof WeakRef<"u"?WeakRef:vB,bB=0,YE=1;function ic(){return{s:bB,v:void 0,o:null,p:null}}function ZE(e,t={}){let n=ic();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,f=l;d<f;d++){const p=arguments[d];if(typeof p=="function"||typeof p=="object"&&p!==null){let g=a.o;g===null&&(a.o=g=new WeakMap);const m=g.get(p);m===void 0?(a=ic(),g.set(p,a)):a=m}else{let g=a.p;g===null&&(a.p=g=new Map);const m=g.get(p);m===void 0?(a=ic(),g.set(p,a)):a=m}}const c=a;let u;if(a.s===YE)u=a.v;else if(u=e.apply(null,arguments),i++,r){const d=o?.deref?.()??o;d!=null&&r(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new yB(u):u}return c.s=YE,c.v=u,u}return s.clearCache=()=>{n=ic(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function XE(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),aB(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=ZE,argsMemoizeOptions:g=[],devModeChecks:m={}}=u,h=GE(f),y=GE(g),b=uB(o),x=d(function(){return i++,c.apply(null,arguments)},...h);let E=!0;const S=p(function(){s++;const w=KE(b,arguments);if(a=x.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:C,inputStabilityCheck:A}=dB(E,m);if(C.shouldRun&&C.run(c,w,a),A.shouldRun){const O=KE(b,arguments);A.run({inputSelectorResults:w,inputSelectorResultsCopy:O},{memoize:d,memoizeOptions:h},arguments)}E&&(E=!1)}return a},...y);return Object.assign(S,{resultFunc:c,memoizedResultFunc:x,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var xB=XE(ZE),wB=Object.assign((e,t=xB)=>{lB(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>wB});XE({memoize:gB,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const it=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":vo(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var sc={exports:{}},hh={};var QE;function SB(){if(QE)return hh;QE=1;var e=T;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var p=f(),g=r({inst:{value:p,getSnapshot:f}}),m=g[0].inst,h=g[1];return i(function(){m.value=p,m.getSnapshot=f,l(m)&&h({inst:m})},[d,p,f]),o(function(){return l(m)&&h({inst:m}),d(function(){l(m)&&h({inst:m})})},[d]),s(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return hh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,hh}var mh={};var JE;function EB(){return JE||(JE=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function t(p,g){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=g();if(!d){var h=g();i(m,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=s({inst:{value:m,getSnapshot:g}});var y=h[0].inst,b=h[1];return l(function(){y.value=m,y.getSnapshot=g,n(y)&&b({inst:y})},[p,m,g]),a(function(){return n(y)&&b({inst:y}),p(function(){n(y)&&b({inst:y})})},[p]),c(m),m}function n(p){var g=p.getSnapshot;p=p.value;try{var m=g();return!i(p,m)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=T,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;mh.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),mh}var eT;function gh(){return eT||(eT=1,process.env.NODE_ENV==="production"?sc.exports=SB():sc.exports=EB()),sc.exports}var TB=gh(),ac={exports:{}},vh={};var tT;function CB(){if(tT)return vh;tT=1;var e=T,t=gh();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return vh.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&m.hasValue){var w=m.value;if(p(w,I))return E=w}return E=I}if(w=E,r(x,I))return w;var C=f(I);return p!==void 0&&p(w,C)?(x=I,w):(x=I,E=C)}var b=!1,x,E,S=d===void 0?null:d;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,d,f,p]);var h=o(c,g[0],g[1]);return s(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},vh}var yh={};var nT;function kB(){return nT||(nT=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=T,n=gh(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;yh.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&m.hasValue){var w=m.value;if(p(w,I))return E=w}return E=I}if(w=E,r(x,I))return w;var C=f(I);return p!==void 0&&p(w,C)?(x=I,w):(x=I,E=C)}var b=!1,x,E,S=d===void 0?null:d;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,d,f,p]);var h=o(c,g[0],g[1]);return s(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),yh}var rT;function IB(){return rT||(rT=1,process.env.NODE_ENV==="production"?ac.exports=CB():ac.exports=kB()),ac.exports}var PB=IB();const AB=Zp(19)?_B:DB;function OB(e,t,n,r,o){return AB(e,t,n,r,o)}function _B(e,t,n,r,o){const i=k.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return TB.useSyncExternalStore(e.subscribe,i,i)}function DB(e,t,n,r,o){return PB.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class ea{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;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){ea.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||ea.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};ea.prototype.setState.call(this,t)}}class oT extends ea{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){k.useDebugValue(t),Vt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;Vt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){k.useDebugValue(t,s=>Object.keys(s));const o=k.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);Vt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n,r){k.useDebugValue(t);const o=this,i=n!==void 0;if(process.env.NODE_ENV!=="production"){const s=this.controlledValues.get(t);s!==void 0&&s!==i&&console.error(`A component is changing the ${i?"":"un"}controlled state of ${t.toString()} to be ${i?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}this.controlledValues.has(t)||(this.controlledValues.set(t,i),!i&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),Vt(()=>{i&&!Object.is(o.state[t],n)&&super.setState({...o.state,[t]:n})},[o,t,n,r,i])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,o)=>{const i=this.selectors[t];return i(this.state,n,r,o)};useState=(t,n,r,o)=>{k.useDebugValue(t);const i=this.selectors[t];return OB(this,i,n,r,o)};useContextCallback(t,n){k.useDebugValue(t);const r=Ke(n??XS);this.context[t]=r}useStateSetter(t){const n=k.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const MB={open:it(e=>e.open),domReferenceElement:it(e=>e.domReferenceElement),referenceElement:it(e=>e.positionReference??e.referenceElement),floatingElement:it(e=>e.floatingElement),floatingId:it(e=>e.floatingId)};class iT extends oT{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:Bz(),nested:n,noEmit:r,triggerElements:i},MB)}setOpen=(t,n)=>{if((!t||!this.state.open||wE(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function NB(e,t=!1,n=!1){const[r,o]=k.useState(e&&t?"idle":void 0),[i,s]=k.useState(e);return e&&!i&&(s(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),Vt(()=>{if(!e&&i&&r!=="ending"&&n){const a=rr.request(()=>{o("ending")});return()=>{rr.cancel(a)}}},[e,i,r,n]),Vt(()=>{if(!e||t)return;const a=rr.request(()=>{o(void 0)});return()=>{rr.cancel(a)}},[t,e]),Vt(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const a=rr.request(()=>{o("idle")});return()=>{rr.cancel(a)}},[t,e,i,o,r]),k.useMemo(()=>({mounted:i,setMounted:s,transitionStatus:r}),[i,r])}function FB(e,t=!1,n=!0){const r=lh();return Ke((o,i=null)=>{r.cancel();function s(){yr.flushSync(o)}const a=gr(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=Us.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;s()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function sT(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Ke(o),s=FB(r,n,!1);k.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}function LB(e,t){const n=k.useRef(null),r=k.useRef(null);return k.useCallback(o=>{if(e!==void 0){if(n.current!==null){const i=n.current,s=r.current,a=t.context.triggerElements.getById(i);s&&a===s&&t.context.triggerElements.delete(i),n.current=null,r.current=null}o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o))}},[t,e])}function $B(e,t,n,r){const o=n.useState("isMountedByTrigger",e),i=LB(e,n),s=Ke(a=>{if(i(a),!a||!n.select("open"))return;const l=n.select("activeTriggerId");if(l===e){n.update({activeTriggerElement:a,...r});return}l==null&&n.update({activeTriggerId:e,activeTriggerElement:a,...r})});return Vt(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:o}}function VB(e){const t=e.useState("open");Vt(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function RB(e,t,n){const{mounted:r,setMounted:o,transitionStatus:i}=NB(e);t.useSyncedValues({mounted:r,transitionStatus:i});const s=Ke(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),a=t.useState("preventUnmountingOnClose");return sT({enabled:!a,open:e,ref:t.context.popupRef,onComplete(){e||s()}}),{forceUnmount:s,transitionStatus:i}}class aT{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elements.size!==this.idMap.size))throw new Error(process.env.NODE_ENV!=="production"?"Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.":vo(87))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function jB(){return new iT({open:!1,floatingElement:null,referenceElement:null,triggerElements:new aT,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function zB(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:jB(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:pn,inactiveTriggerProps:pn,popupProps:pn}}const BB={open:it(e=>e.open),mounted:it(e=>e.mounted),transitionStatus:it(e=>e.transitionStatus),floatingRootContext:it(e=>e.floatingRootContext),preventUnmountingOnClose:it(e=>e.preventUnmountingOnClose),payload:it(e=>e.payload),activeTriggerId:it(e=>e.activeTriggerId),activeTriggerElement:it(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:it((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:it((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:it((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:it((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:it(e=>e.popupProps),popupElement:it(e=>e.popupElement),positionerElement:it(e=>e.positionerElement)};function HB(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=Ul(),s=LE()!=null,a=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(r?"popupElement":"positionerElement"),u=t.context.triggerElements,d=$r(()=>new iT({open:a,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:o,floatingId:i,nested:s,noEmit:n})).current;return Vt(()=>{const f={open:a,floatingId:i,referenceElement:l,floatingElement:c};qe(l)&&(f.domReferenceElement=l),d.state.positionReference===d.state.referenceElement&&(f.positionReference=l),d.update(f)},[a,i,l,c,d]),d.context.onOpenChange=o,d.context.nested=s,d.context.noEmit=n,d}function lT(e=[]){const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),o=e.map(c=>c?.trigger),i=k.useCallback(c=>lc(c,e,"reference"),t),s=k.useCallback(c=>lc(c,e,"floating"),n),a=k.useCallback(c=>lc(c,e,"item"),r),l=k.useCallback(c=>lc(c,e,"trigger"),o);return k.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a,getTriggerProps:l}),[i,s,a,l])}function lc(e,t,n){const r=new Map,o=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[oh]="");for(const s in e)o&&e&&(s===mE||s===gE)||(i[s]=e[s]);for(let s=0;s<t.length;s+=1){let a;const l=t[s]?.[n];typeof l=="function"?a=e?l(e):null:a=l,a&&cT(i,a,o,r)}return cT(i,e,o,r),i}function cT(e,t,n,r){for(const o in t){const i=t[o];n&&(o===mE||o===gE)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof i=="function"&&(r.get(o)?.push(i),e[o]=(...s)=>r.get(o)?.map(a=>a(...s)).find(a=>a!==void 0))):e[o]=i)}}const WB=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qB(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),i=n.useState("domReferenceElement"),s=n.useState("floatingElement"),{enabled:a=!0,role:l="dialog"}=t,c=Ul(),u=i?.id||c,d=k.useMemo(()=>ih(s)?.id||o,[s,o]),f=WB.get(l)??l,g=LE()!=null,m=k.useMemo(()=>f==="tooltip"||l==="label"?pn:{"aria-haspopup":f==="alertdialog"?"dialog":f,"aria-expanded":"false",...f==="listbox"&&{role:"combobox"},...f==="menu"&&g&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,g,l]),h=k.useMemo(()=>f==="tooltip"||l==="label"?{[`aria-${l==="label"?"labelledby":"describedby"}`]:r?d:void 0}:{...m,"aria-expanded":r?"true":"false","aria-controls":r?d:void 0,...f==="menu"&&{id:u}},[f,d,r,u,l,m]),y=k.useMemo(()=>{const x={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?x:{...x,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),b=k.useCallback(({active:x,selected:E})=>{const S={role:"option",...x&&{id:`${d}-fui-option`}};switch(l){case"select":case"combobox":return{...S,"aria-selected":E}}return{}},[d,l]);return k.useMemo(()=>a?{reference:h,floating:y,item:b,trigger:m}:{},[a,h,y,m,b])}let UB=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),GB=(function(e){return e[e.open=bo.open]="open",e[e.closed=bo.closed]="closed",e[e.startingStyle=bo.startingStyle]="startingStyle",e[e.endingStyle=bo.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const bh=k.createContext(void 0);process.env.NODE_ENV!=="production"&&(bh.displayName="DialogPortalContext");function KB(){const e=k.useContext(bh);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Portal> is missing.":vo(26));return e}const uT="ArrowUp",dT="ArrowDown",fT="ArrowLeft",pT="ArrowRight",hT="Home",mT="End",YB=new Set([fT,pT]),ZB=new Set([uT,dT]),XB=new Set([...YB,...ZB]);[...XB];const QB=new Set([uT,dT,fT,pT,hT,mT]),JB={...eE,...JS,nestedDialogOpen(e){return e?{[GB.nestedDialogOpen]:""}:null}},gT=k.forwardRef(function(t,n){const{className:r,finalFocus:o,initialFocus:i,render:s,...a}=t,{store:l}=yo(),c=l.useState("descriptionElementId"),u=l.useState("disablePointerDismissal"),d=l.useState("floatingRootContext"),f=l.useState("popupProps"),p=l.useState("modal"),g=l.useState("mounted"),m=l.useState("nested"),h=l.useState("nestedOpenDialogCount"),y=l.useState("open"),b=l.useState("openMethod"),x=l.useState("titleElementId"),E=l.useState("transitionStatus"),S=l.useState("role");KB(),sT({open:y,ref:l.context.popupRef,onComplete(){y&&l.context.onOpenChangeComplete?.(!0)}});function I(N){return N==="touch"?l.context.popupRef.current:!0}const w=i===void 0?I:i,C=h>0,A=k.useMemo(()=>({open:y,nested:m,transitionStatus:E,nestedDialogOpen:C}),[y,m,E,C]),O=xi("div",t,{state:A,props:[f,{"aria-labelledby":x??void 0,"aria-describedby":c??void 0,role:S,tabIndex:-1,hidden:!g,onKeyDown(N){QB.has(N.key)&&N.stopPropagation()},style:{[UB.nestedDialogs]:h}},a],ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],stateAttributesMapping:JB});return v.jsx(Jz,{context:d,openInteractionType:b,disabled:!g,closeOnFocusOut:!u,initialFocus:w,returnFocus:o,modal:p!==!1,restoreFocus:"popup",children:O})});process.env.NODE_ENV!=="production"&&(gT.displayName="DialogPopup");function e4(e){return Zp(19)?e:e?"true":void 0}const vT=k.forwardRef(function(t,n){const{cutout:r,...o}=t;let i;if(r){const s=r?.getBoundingClientRect();i=`polygon(
|
|
21
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:c})}},bz={inputStabilityCheck:"once",identityFunctionCheck:"once"},vc=Symbol("NOT_FOUND");function xz(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function wz(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Sz(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var NE=e=>Array.isArray(e)?e:[e];function Ez(e){const t=Array.isArray(e[0])?e[0]:e;return Sz(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function FE(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Tz=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...bz,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:yz},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:vz}}};function Cz(e){let t;return{get(n){return t&&e(t.key,n)?t.value:vc},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function kz(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return vc}function o(a,l){r(a)===vc&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var Iz=(e,t)=>e===t;function Oz(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function Pz(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Iz,maxSize:o=1,resultEqualityCheck:i}=n,s=Oz(r);let a=0;const l=o<=1?Cz(s):kz(o,s);function c(){let u=l.get(arguments);if(u===vc){if(u=e.apply(null,arguments),a++,i){const f=l.getEntries().find(p=>i(p.value,u));f&&(u=f.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var Az=class{constructor(e){this.value=e}deref(){return this.value}},_z=typeof WeakRef<"u"?WeakRef:Az,Mz=0,LE=1;function bc(){return{s:Mz,v:void 0,o:null,p:null}}function VE(e,t={}){let n=bc();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,f=l;d<f;d++){const p=arguments[d];if(typeof p=="function"||typeof p=="object"&&p!==null){let h=a.o;h===null&&(a.o=h=new WeakMap);const m=h.get(p);m===void 0?(a=bc(),h.set(p,a)):a=m}else{let h=a.p;h===null&&(a.p=h=new Map);const m=h.get(p);m===void 0?(a=bc(),h.set(p,a)):a=m}}const c=a;let u;if(a.s===LE)u=a.v;else if(u=e.apply(null,arguments),i++,r){const d=o?.deref?.()??o;d!=null&&r(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new _z(u):u}return c.s=LE,c.v=u,u}return s.clearCache=()=>{n=bc(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function RE(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),xz(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=VE,argsMemoizeOptions:h=[],devModeChecks:m={}}=u,g=NE(f),v=NE(h),b=Ez(o),x=d(function(){return i++,c.apply(null,arguments)},...g);let E=!0;const S=p(function(){s++;const w=FE(b,arguments);if(a=x.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:C,inputStabilityCheck:P}=Tz(E,m);if(C.shouldRun&&C.run(c,w,a),P.shouldRun){const _=FE(b,arguments);P.run({inputSelectorResults:w,inputSelectorResultsCopy:_},{memoize:d,memoizeOptions:g},arguments)}E&&(E=!1)}return a},...v);return Object.assign(S,{resultFunc:c,memoizedResultFunc:x,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Dz=RE(VE),Nz=Object.assign((e,t=Dz)=>{wz(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>Nz});RE({memoize:Pz,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ft=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":bn(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var xc={exports:{}},wh={};var $E;function Fz(){if($E)return wh;$E=1;var e=T;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var p=f(),h=r({inst:{value:p,getSnapshot:f}}),m=h[0].inst,g=h[1];return i(function(){m.value=p,m.getSnapshot=f,l(m)&&g({inst:m})},[d,p,f]),o(function(){return l(m)&&g({inst:m}),d(function(){l(m)&&g({inst:m})})},[d]),s(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return wh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,wh}var Sh={};var jE;function Lz(){return jE||(jE=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}function t(p,h){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=h();if(!d){var g=h();i(m,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=s({inst:{value:m,getSnapshot:h}});var v=g[0].inst,b=g[1];return l(function(){v.value=m,v.getSnapshot=h,n(v)&&b({inst:v})},[p,m,h]),a(function(){return n(v)&&b({inst:v}),p(function(){n(v)&&b({inst:v})})},[p]),c(m),m}function n(p){var h=p.getSnapshot;p=p.value;try{var m=h();return!i(p,m)}catch{return!0}}function r(p,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=T,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Sh.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Sh}var zE;function Eh(){return zE||(zE=1,process.env.NODE_ENV==="production"?xc.exports=Fz():xc.exports=Lz()),xc.exports}var Vz=Eh(),wc={exports:{}},Th={};var BE;function Rz(){if(BE)return Th;BE=1;var e=T,t=Eh();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Th.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function v(O){if(!b){if(b=!0,x=O,O=f(O),p!==void 0&&m.hasValue){var w=m.value;if(p(w,O))return E=w}return E=O}if(w=E,r(x,O))return w;var C=f(O);return p!==void 0&&p(w,C)?(x=O,w):(x=O,E=C)}var b=!1,x,E,S=d===void 0?null:d;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,d,f,p]);var g=o(c,h[0],h[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Th}var Ch={};var HE;function $z(){return HE||(HE=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=T,n=Eh(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;Ch.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function v(O){if(!b){if(b=!0,x=O,O=f(O),p!==void 0&&m.hasValue){var w=m.value;if(p(w,O))return E=w}return E=O}if(w=E,r(x,O))return w;var C=f(O);return p!==void 0&&p(w,C)?(x=O,w):(x=O,E=C)}var b=!1,x,E,S=d===void 0?null:d;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,d,f,p]);var g=o(c,h[0],h[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ch}var WE;function jz(){return WE||(WE=1,process.env.NODE_ENV==="production"?wc.exports=Rz():wc.exports=$z()),wc.exports}var zz=jz();const Bz=Nd(19)?Wz:qz;function Hz(e,t,n,r,o){return Bz(e,t,n,r,o)}function Wz(e,t,n,r,o){const i=I.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return Vz.useSyncExternalStore(e.subscribe,i,i)}function qz(e,t,n,r,o){return zz.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class ca{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;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){ca.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||ca.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};ca.prototype.setState.call(this,t)}}class qE extends ca{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){I.useDebugValue(t),We(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;We(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){I.useDebugValue(t,s=>Object.keys(s));const o=I.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);We(()=>{n.update(t)},[n,...r])}useControlledProp(t,n,r){I.useDebugValue(t);const o=this,i=n!==void 0;if(process.env.NODE_ENV!=="production"){const s=this.controlledValues.get(t);s!==void 0&&s!==i&&console.error(`A component is changing the ${i?"":"un"}controlled state of ${t.toString()} to be ${i?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}this.controlledValues.has(t)||(this.controlledValues.set(t,i),!i&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),We(()=>{i&&!Object.is(o.state[t],n)&&super.setState({...o.state,[t]:n})},[o,t,n,r,i])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,o)=>{const i=this.selectors[t];return i(this.state,n,r,o)};useState=(t,n,r,o)=>{I.useDebugValue(t);const i=this.selectors[t];return Hz(this,i,n,r,o)};useContextCallback(t,n){I.useDebugValue(t);const r=ke(n??vn);this.context[t]=r}useStateSetter(t){const n=I.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const Uz={open:ft(e=>e.open),domReferenceElement:ft(e=>e.domReferenceElement),referenceElement:ft(e=>e.positionReference??e.referenceElement),floatingElement:ft(e=>e.floatingElement),floatingId:ft(e=>e.floatingId)};class UE extends qE{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:rz(),nested:n,noEmit:r,triggerElements:i},Uz)}setOpen=(t,n)=>{if((!t||!this.state.open||Cb(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function Gz(e,t=!1,n=!1){const[r,o]=I.useState(e&&t?"idle":void 0),[i,s]=I.useState(e);return e&&!i&&(s(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),We(()=>{if(!e&&i&&r!=="ending"&&n){const a=ar.request(()=>{o("ending")});return()=>{ar.cancel(a)}}},[e,i,r,n]),We(()=>{if(!e||t)return;const a=ar.request(()=>{o(void 0)});return()=>{ar.cancel(a)}},[t,e]),We(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const a=ar.request(()=>{o("idle")});return()=>{ar.cancel(a)}},[t,e,i,o,r]),I.useMemo(()=>({mounted:i,setMounted:s,transitionStatus:r}),[i,r])}function Yz(e,t=!1,n=!0){const r=wl();return ke((o,i=null)=>{r.cancel();function s(){Xn.flushSync(o)}const a=Cr(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=sa.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;s()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function kh(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=ke(o),s=Yz(r,n,!1);I.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}function Kz(e,t){const n=I.useRef(null),r=I.useRef(null);return I.useCallback(o=>{if(e!==void 0){if(n.current!==null){const i=n.current,s=r.current,a=t.context.triggerElements.getById(i);s&&a===s&&t.context.triggerElements.delete(i),n.current=null,r.current=null}o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o))}},[t,e])}function Zz(e,t,n,r){const o=n.useState("isMountedByTrigger",e),i=Kz(e,n),s=ke(a=>{if(i(a),!a||!n.select("open"))return;const l=n.select("activeTriggerId");if(l===e){n.update({activeTriggerElement:a,...r});return}l==null&&n.update({activeTriggerId:e,activeTriggerElement:a,...r})});return We(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:o}}function Xz(e){const t=e.useState("open");We(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function Qz(e,t,n){const{mounted:r,setMounted:o,transitionStatus:i}=Gz(e);t.useSyncedValues({mounted:r,transitionStatus:i});const s=ke(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),a=t.useState("preventUnmountingOnClose");return kh({enabled:!a,open:e,ref:t.context.popupRef,onComplete(){e||s()}}),{forceUnmount:s,transitionStatus:i}}class GE{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elements.size!==this.idMap.size))throw new Error(process.env.NODE_ENV!=="production"?"Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.":bn(87))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function Jz(){return new UE({open:!1,floatingElement:null,referenceElement:null,triggerElements:new GE,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function eB(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:Jz(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:rn,inactiveTriggerProps:rn,popupProps:rn}}const tB={open:ft(e=>e.open),mounted:ft(e=>e.mounted),transitionStatus:ft(e=>e.transitionStatus),floatingRootContext:ft(e=>e.floatingRootContext),preventUnmountingOnClose:ft(e=>e.preventUnmountingOnClose),payload:ft(e=>e.payload),activeTriggerId:ft(e=>e.activeTriggerId),activeTriggerElement:ft(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ft((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:ft((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:ft((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:ft((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ft(e=>e.popupProps),popupElement:ft(e=>e.popupElement),positionerElement:ft(e=>e.positionerElement)};function nB(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=ei(),s=TE()!=null,a=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(r?"popupElement":"positionerElement"),u=t.context.triggerElements,d=sr(()=>new UE({open:a,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:o,floatingId:i,nested:s,noEmit:n})).current;return We(()=>{const f={open:a,floatingId:i,referenceElement:l,floatingElement:c};Ge(l)&&(f.domReferenceElement=l),d.state.positionReference===d.state.referenceElement&&(f.positionReference=l),d.update(f)},[a,i,l,c,d]),d.context.onOpenChange=o,d.context.nested=s,d.context.noEmit=n,d}function YE(e=[]){const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),o=e.map(c=>c?.trigger),i=I.useCallback(c=>Sc(c,e,"reference"),t),s=I.useCallback(c=>Sc(c,e,"floating"),n),a=I.useCallback(c=>Sc(c,e,"item"),r),l=I.useCallback(c=>Sc(c,e,"trigger"),o);return I.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a,getTriggerProps:l}),[i,s,a,l])}function Sc(e,t,n){const r=new Map,o=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[zd]="");for(const s in e)o&&e&&(s===bb||s===xb)||(i[s]=e[s]);for(let s=0;s<t.length;s+=1){let a;const l=t[s]?.[n];typeof l=="function"?a=e?l(e):null:a=l,a&&KE(i,a,o,r)}return KE(i,e,o,r),i}function KE(e,t,n,r){for(const o in t){const i=t[o];n&&(o===bb||o===xb)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof i=="function"&&(r.get(o)?.push(i),e[o]=(...s)=>r.get(o)?.map(a=>a(...s)).find(a=>a!==void 0))):e[o]=i)}}const rB=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function oB(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),i=n.useState("domReferenceElement"),s=n.useState("floatingElement"),{enabled:a=!0,role:l="dialog"}=t,c=ei(),u=i?.id||c,d=I.useMemo(()=>Hd(s)?.id||o,[s,o]),f=rB.get(l)??l,h=TE()!=null,m=I.useMemo(()=>f==="tooltip"||l==="label"?rn:{"aria-haspopup":f==="alertdialog"?"dialog":f,"aria-expanded":"false",...f==="listbox"&&{role:"combobox"},...f==="menu"&&h&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,h,l]),g=I.useMemo(()=>f==="tooltip"||l==="label"?{[`aria-${l==="label"?"labelledby":"describedby"}`]:r?d:void 0}:{...m,"aria-expanded":r?"true":"false","aria-controls":r?d:void 0,...f==="menu"&&{id:u}},[f,d,r,u,l,m]),v=I.useMemo(()=>{const x={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?x:{...x,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),b=I.useCallback(({active:x,selected:E})=>{const S={role:"option",...x&&{id:`${d}-fui-option`}};switch(l){case"select":case"combobox":return{...S,"aria-selected":E}}return{}},[d,l]);return I.useMemo(()=>a?{reference:g,floating:v,item:b,trigger:m}:{},[a,g,v,m,b])}let iB=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),sB=(function(e){return e[e.open=Kn.open]="open",e[e.closed=Kn.closed]="closed",e[e.startingStyle=Kn.startingStyle]="startingStyle",e[e.endingStyle=Kn.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const Ih=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ih.displayName="DialogPortalContext");function ZE(){const e=I.useContext(Ih);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Portal> is missing.":bn(26));return e}const aB={...ph,...hc,nestedDialogOpen(e){return e?{[sB.nestedDialogOpen]:""}:null}},XE=I.forwardRef(function(t,n){const{className:r,finalFocus:o,initialFocus:i,render:s,...a}=t,{store:l}=qr(),c=l.useState("descriptionElementId"),u=l.useState("disablePointerDismissal"),d=l.useState("floatingRootContext"),f=l.useState("popupProps"),p=l.useState("modal"),h=l.useState("mounted"),m=l.useState("nested"),g=l.useState("nestedOpenDialogCount"),v=l.useState("open"),b=l.useState("openMethod"),x=l.useState("titleElementId"),E=l.useState("transitionStatus"),S=l.useState("role");ZE(),kh({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}});function O(F){return F==="touch"?l.context.popupRef.current:!0}const w=i===void 0?O:i,C=g>0,P=I.useMemo(()=>({open:v,nested:m,transitionStatus:E,nestedDialogOpen:C}),[v,m,E,C]),_=Rt("div",t,{state:P,props:[f,{"aria-labelledby":x??void 0,"aria-describedby":c??void 0,role:S,tabIndex:-1,hidden:!h,onKeyDown(F){nx.has(F.key)&&F.stopPropagation()},style:{[iB.nestedDialogs]:g}},a],ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],stateAttributesMapping:aB});return y.jsx(fz,{context:d,openInteractionType:b,disabled:!h,closeOnFocusOut:!u,initialFocus:w,returnFocus:o,modal:p!==!1,restoreFocus:"popup",children:_})});process.env.NODE_ENV!=="production"&&(XE.displayName="DialogPopup");function QE(e){return Nd(19)?e:e?"true":void 0}const JE=I.forwardRef(function(t,n){const{cutout:r,...o}=t;let i;if(r){const s=r?.getBoundingClientRect();i=`polygon(
|
|
25
22
|
0% 0%,
|
|
26
23
|
100% 0%,
|
|
27
24
|
100% 100%,
|
|
@@ -32,10 +29,10 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
32
29
|
${s.right}px ${s.bottom}px,
|
|
33
30
|
${s.right}px ${s.top}px,
|
|
34
31
|
${s.left}px ${s.top}px
|
|
35
|
-
)`}return v.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});process.env.NODE_ENV!=="production"&&(vT.displayName="InternalBackdrop");const yT=k.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=yo(),s=i.useState("mounted"),a=i.useState("modal"),l=i.useState("open");return s||r?v.jsx(bh.Provider,{value:r,children:v.jsxs(WE,{ref:n,...o,children:[s&&a===!0&&v.jsx(vT,{ref:i.context.internalBackdropRef,inert:e4(!l)}),t.children]})}):null});process.env.NODE_ENV!=="production"&&(yT.displayName="DialogPortal");let bT={},xT={},wT="";function t4(e){if(typeof document>"u")return!1;const t=Qs(e);return Nt(t).innerWidth-t.documentElement.clientWidth>0}function n4(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=Qs(e).documentElement,o={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY};r.style.scrollbarGutter="stable",r.style.overflowY="scroll";const i=r.offsetWidth;r.style.overflowY="hidden";const s=r.offsetWidth;return Object.assign(r.style,o),i===s}function r4(e){const t=Qs(e),n=t.documentElement,r=t.body,o=Yr(n)?n:r,i=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=i}}function o4(e){const t=Qs(e),n=t.documentElement,r=t.body,o=Nt(n);let i=0,s=0,a=!1;const l=rr.create();if(hz&&(o.visualViewport?.scale??1)!==1)return()=>{};function c(){const f=o.getComputedStyle(n),p=o.getComputedStyle(r),h=(f.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,bT={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},wT=n.style.scrollBehavior,xT={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const y=n.scrollHeight>n.clientHeight,b=n.scrollWidth>n.clientWidth,x=f.overflowY==="scroll"||p.overflowY==="scroll",E=f.overflowX==="scroll"||p.overflowX==="scroll",S=Math.max(0,o.innerWidth-r.clientWidth),I=Math.max(0,o.innerHeight-r.clientHeight),w=parseFloat(p.marginTop)+parseFloat(p.marginBottom),C=parseFloat(p.marginLeft)+parseFloat(p.marginRight),A=Yr(n)?n:r;if(a=n4(e),a){n.style.scrollbarGutter=h,A.style.overflowY="hidden",A.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:h,overflowY:"hidden",overflowX:"hidden"}),(y||x)&&(n.style.overflowY="scroll"),(b||E)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:w||I?`calc(100dvh - ${w+I}px)`:"100dvh",width:C||S?`calc(100vw - ${C+S}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,bT),Object.assign(r.style,xT),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=wT)}function d(){u(),l.request(c)}return c(),o.addEventListener("resize",d),()=>{l.cancel(),u(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",d)}}class i4{lockCount=0;restore=null;timeoutLock=wi.create();timeoutUnlock=wi.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Qs(t).documentElement,o=Nt(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=XS;return}const i=hE||!t4(t);this.restore=i?r4(t):o4(t)}}const s4=new i4;function a4(e=!0,t=null){Vt(()=>{if(e)return s4.acquire(t)},[e,t])}function l4(e){const t=k.useRef(""),n=k.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:k.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function c4(e){const[t,n]=k.useState(null),r=Ke((a,l)=>{e||n(l||(hE?"touch":""))}),o=k.useCallback(()=>{n(null)},[]),{onClick:i,onPointerDown:s}=l4(r);return k.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:i,onPointerDown:s}}),[t,o,i,s])}function u4(e){const{store:t,parentContext:n,actionsRef:r}=e,o=t.useState("open"),i=t.useState("disablePointerDismissal"),s=t.useState("modal"),a=t.useState("popupElement"),{openMethod:l,triggerProps:c,reset:u}=c4(o);VB(t);const{forceUnmount:d}=RB(o,t,()=>{u()}),f=Ke(O=>{const N=En(O);return N.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},N}),p=k.useCallback(()=>{t.setOpen(!1,f(cz))},[t,f]);k.useImperativeHandle(r,()=>({unmount:d,close:p}),[d,p]);const g=HB({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=k.useState(0),y=m===0,b=qB(g),x=rB(g,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(O){if("button"in O&&O.button!==0||"touches"in O&&O.touches.length!==1)return!1;const N=$n(O);if(y&&!i){const L=N;return s&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===L||t.context.backdropRef.current===L||Dt(L,a)&&!L?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:y});a4(o&&s===!0,a);const{getReferenceProps:E,getFloatingProps:S,getTriggerProps:I}=lT([b,x]);t.useContextCallback("onNestedDialogOpen",O=>{h(O+1)}),t.useContextCallback("onNestedDialogClose",()=>{h(0)}),k.useEffect(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!o&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&o&&n.onNestedDialogClose()}),[o,n,m]);const w=k.useMemo(()=>E(c),[E,c]),C=k.useMemo(()=>I(c),[I,c]),A=k.useMemo(()=>S(),[S]);t.useSyncedValues({openMethod:l,activeTriggerProps:w,inactiveTriggerProps:C,popupProps:A,floatingRootContext:g,nestedOpenDialogCount:m})}const d4={...BB,modal:it(e=>e.modal),nested:it(e=>e.nested),nestedOpenDialogCount:it(e=>e.nestedOpenDialogCount),disablePointerDismissal:it(e=>e.disablePointerDismissal),openMethod:it(e=>e.openMethod),descriptionElementId:it(e=>e.descriptionElementId),titleElementId:it(e=>e.titleElementId),viewportElement:it(e=>e.viewportElement),role:it(e=>e.role)};class f4 extends oT{constructor(t){super(p4(t),{popupRef:k.createRef(),backdropRef:k.createRef(),internalBackdropRef:k.createRef(),triggerElements:new aT,onOpenChange:void 0,onOpenChangeComplete:void 0},d4)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const o={open:t},i=n.trigger?.id??null;(i||t)&&(o.activeTriggerId=i,o.activeTriggerElement=n.trigger??null),this.update(o)}}function p4(e={}){return{...zB(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function h4(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,disablePointerDismissal:s=!1,modal:a=!0,actionsRef:l,handle:c,triggerId:u,defaultTriggerId:d=null}=e,f=yo(!0),p=!!f,g=$r(()=>c?.store??new f4({open:n??r,activeTriggerId:u!==void 0?u:d,modal:a,disablePointerDismissal:s,nested:p})).current;g.useControlledProp("open",n,r),g.useControlledProp("activeTriggerId",u,d),g.useSyncedValues({disablePointerDismissal:s,nested:p,modal:a}),g.useContextCallback("onOpenChange",o),g.useContextCallback("onOpenChangeComplete",i);const m=g.useState("payload");u4({store:g,actionsRef:l,parentContext:f?.store.context});const h=k.useMemo(()=>({store:g}),[g]);return v.jsx(Yp.Provider,{value:h,children:typeof t=="function"?t({payload:m}):t})}const ST=k.forwardRef(function(t,n){const{render:r,className:o,id:i,...s}=t,{store:a}=yo(),l=uE(i);return a.useSyncedValueWithCleanup("titleElementId",l),xi("h2",t,{ref:n,props:[{id:l},s]})});process.env.NODE_ENV!=="production"&&(ST.displayName="DialogTitle");const xh=k.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,id:a,payload:l,handle:c,...u}=t,d=yo(!0),f=c?.store??d?.store;if(!f)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.":vo(79));const p=uE(a),g=f.useState("floatingRootContext"),m=f.useState("isOpenedByTrigger",p),h=k.useRef(null),{registerTrigger:y,isMountedByThisTrigger:b}=$B(p,h,f,{payload:l}),{getButtonProps:x,buttonRef:E}=oE({disabled:i,native:s}),S=eB(g,{enabled:g!=null}),I=lT([S]),w=k.useMemo(()=>({disabled:i,open:m}),[i,m]),C=f.useState("triggerProps",b);return xi("button",t,{state:w,ref:[E,n,y,h],props:[I.getReferenceProps(),C,{[QS]:"",id:p},u,x],stateAttributesMapping:Xj})});process.env.NODE_ENV!=="production"&&(xh.displayName="DialogTrigger");const m4=(e,t)=>Ir()?t:window.matchMedia(e).matches,g4=(e,t=!0)=>{const[n,r]=T.useState(t);return T.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(m4(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},v4=qy,Tn="500ms",y4={exit:{x:["0%","-30%"],opacity:0,animationDuration:Tn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Tn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Tn}},b4={enter:{x:"0%",opacity:1,animationDuration:Tn},exit:{x:["0%","30%"],opacity:0,animationDuration:Tn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Tn}},wh={drawer:e=>e==="left"?y4:b4,sheet:{enter:{opacity:1,y:"0%",animationDuration:Tn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Tn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Tn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Tn},enter:{opacity:1,scale:[1.05,1],animationDuration:Tn},initial:{opacity:.5,scale:.95,animationDuration:Tn,transition:{duration:.5,ease:"easeInOut"}}}},x4=Ao("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),Sh={top:0,left:0,right:0,bottom:0},cc=e=>e*.6,w4=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,p=cc(f);return d>=p?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,s=e.position==="right"?-r.delta.x:r.delta.x,a=Math.abs(i+s);return e.value.set(a)}};return v.jsx(Be.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:Sh,whileDrag:{cursor:"grabbing"},className:Ie("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?v.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},uc={drawer:"right",sheet:"none",dialog:"none"},S4=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??uc.drawer:uc[o]:t?uc[o]:uc.sheet},Eh=T.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:s,ariaTitle:a,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:p=!1,layoutId:g=void 0,overlayClassName:m="",type:h="dialog",position:y,overlayClickClose:b=!1,...x},E)=>{const S=T.useRef(null),I=T.useRef(null),w=T.useRef(null),C=T.useId(),A=T.useId(),O=g4("(min-width: 64rem)"),N=S4(O,p,h,y),L=O||p?wh[h]:wh.sheet,j=typeof L=="function"?L(N):L,_=O||p?h:"sheet",F=_!=="dialog",z=o,M=ai(void 0);T.useEffect(()=>M.set(void 0),[_,M]);const P=()=>s(!1);T.useImperativeHandle(E,()=>({floating:w.current}),[w]);const R=(Y,ne)=>{const oe=I.current.getBoundingClientRect(),W=M.get()||oe.height,q=Math.abs(W-ne.delta.y),X=window.outerHeight,ue=cc(X);return q>=ue?M.set(q):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),s?.(!1),setTimeout(()=>M.set(void 0),350))},V=(Y,ne)=>{const se=I.current;if(ne.delta.y<0&&ne.offset.y<0){se.scrollTo({top:se.scrollTop+Math.abs(ne.offset.y),behavior:"smooth"});return}const oe=se.getBoundingClientRect(),W=M.get()||oe.height,q=Math.abs(W-ne.delta.y),X=window.outerHeight,ue=cc(X);return q>=ue?M.set(q):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),s?.(!1),setTimeout(()=>M.set(void 0),350))},G=_==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:Sh,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:R,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},U=ai(void 0),B=ai(void 0);return v.jsxs(h4,{open:e,onOpenChange:s,children:[o?v.jsx(T.Fragment,{children:r?v.jsx(xh,{render:v.jsx(v4,{}),children:z}):v.jsx(xh,{render:v.jsx(Be.button,{layoutId:g,type:"button"}),children:z})}):null,v.jsx(Dn,{mode:"wait",initial:!1,children:e?v.jsxs(yT,{keepMounted:!1,children:[v.jsx(tE,{className:Ie("fixed inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",_==="drawer"?"":"items-start justify-center p-10",m)}),v.jsx(Bf,{reducedMotion:d?"user":"always",children:v.jsxs(gT,{render:v.jsx(Be.div,{...x,...t?{"aria-labelledby":C,"aria-describedby":A}:{"aria-label":a},ref:dr(I,w),className:Ie(x4({position:N,type:_}),l,"isolate overscroll-contain fixed",_==="dialog"?"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2":""),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:g,variants:j,"data-component":"modal",style:_==="drawer"?{width:M}:{height:M}}),children:[F&&u?v.jsx(w4,{onChange:s,value:M,sheet:_==="sheet",position:N,parent:I}):null,t?v.jsx(Be.header,{...G,className:"relative w-full isolate",children:v.jsx(ST,{render:v.jsx("h2",{id:C,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border"}),children:t})}):null,v.jsx(Be.section,{ref:S,"data-component":"modal-body",dragConstraints:Sh,drag:O?void 0:"y",onDrag:_==="sheet"?O?void 0:V:void 0,className:Ie("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:()=>{B.set(void 0),U.set(void 0)},onTouchStart:Y=>{const ne=Y.changedTouches[0];U.set(ne.pageY),B.set(ne.pageY)},onTouchMove:Y=>{const ne=Y.changedTouches[0],se=ne.pageY,oe=U.get();if(oe!==void 0&&oe<se&&S.current?.scrollTop===0){const X=I.current.getBoundingClientRect(),ue=M.get()||X.height,D=(oe-se)/10,ee=ue+D,Q=window.outerHeight,fe=cc(Q);ee<fe&&s?.(!1),M.set(ee)}B.set(ne.pageY)},children:i}),n?v.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?v.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:v.jsx(aE,{render:v.jsx("button",{type:"button",onClick:P,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger"}),children:v.jsx(No,{})})}):null]})})]}):null})]})}),E4=e=>{const[t,n]=e1();return T.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:n2(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),v.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},T4=e=>v.jsx("p",{...e,className:Ie("text-base leading-snug",e.className)}),C4=e=>v.jsx("p",{...e,className:Ie("mb-kilo text-sm text-secondary",e.className)}),k4=e=>v.jsx("div",{className:Ie(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:v.jsxs(T.Fragment,{children:[v.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),v.jsx("span",{className:`w-fit ${e.disabled?"text-disabled":""} ${e.row?"text-base":"text-lg"}`,children:e.children})]})}),ET=e=>v.jsxs("div",{children:[v.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),v.jsx("p",{className:"text-secondary typography",children:e.children})]}),I4=e=>v.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[v.jsx("div",{children:v.jsx(ET,{title:e.title,children:e.description})}),v.jsx("div",{className:"flex gap-kilo items-center",children:e.children})]}),TT=e=>v.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Ie("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),P4=()=>v.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:v.jsx(TT,{})}),A4=e=>{const t=T.useRef(null),n=T.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=T.useState(e.open??!1);T.useEffect(()=>{s(e.open??!1)},[e.open]);const{context:a,refs:l}=Cr({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=rs(a,{enabled:e.disabled??!0}),u=ro(a,{role:"tooltip"}),d=no(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=kr([c,u,d]);return v.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[v.jsx(el,{...p(e),as:Be.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:v.jsx(Be.span,{layoutId:o,children:e.trigger})}),v.jsx(Dn,{children:i?v.jsx(to,{root:t,children:v.jsx(Ho,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:v.jsx(Be.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},CT=6048e5,O4=864e5,_4=6e4,D4=36e5,M4=1e3,kT=Symbol.for("constructDateFrom");function st(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&kT in e?e[kT](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ye(e,t){return st(t||e,e)}function dc(e,t,n){const r=Ye(e,n?.in);return isNaN(t)?st(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function IT(e,t,n){const r=Ye(e,n?.in);if(isNaN(t))return st(e,NaN);if(!t)return r;const o=r.getDate(),i=st(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Ii(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=Ye(e,n?.in),d=o||r?IT(u,o+r*12):u,f=s||i?dc(d,s+i*7):d,p=l+a*60,m=(c+p*60)*1e3;return st(e,+f+m)}let N4={};function xo(){return N4}function or(e,t){const n=xo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ye(e,t?.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Pi(e,t){return or(e,{...t,weekStartsOn:1})}function PT(e,t){const n=Ye(e,t?.in),r=n.getFullYear(),o=st(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Pi(o),s=st(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=Pi(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function fc(e){const t=Ye(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function pc(e,...t){const n=st.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function wo(e,t){const n=Ye(e,t?.in);return n.setHours(0,0,0,0),n}function F4(e,t,n){const[r,o]=pc(n?.in,e,t),i=wo(r),s=wo(o),a=+i-fc(i),l=+s-fc(s);return Math.round((a-l)/O4)}function L4(e,t){const n=PT(e,t),r=st(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Pi(r)}function $4(e){return st(e,Date.now())}function V4(e,t,n){const[r,o]=pc(n?.in,e,t);return+wo(r)==+wo(o)}function R4(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function hc(e){return!(!R4(e)&&typeof e!="number"||isNaN(+Ye(e)))}function j4(e,t){const[n,r]=pc(e,t.start,t.end);return{start:n,end:r}}function AT(e,t){const{start:n,end:r}=j4(t?.in,e);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(st(n,s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function OT(e,t){const n=Ye(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function z4(e,t){const n=Ye(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function B4(e,t){const n=xo(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ye(e,t?.in),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const H4={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"}},W4=(e,t,n)=>{let r;const o=H4[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Th(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const q4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},G4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},K4={date:Th({formats:q4,defaultWidth:"full"}),time:Th({formats:U4,defaultWidth:"full"}),dateTime:Th({formats:G4,defaultWidth:"full"})},Y4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Z4=(e,t,n,r)=>Y4[e];function ta(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const X4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Q4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},J4={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"]},eH={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"]},tH={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"}},nH={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"}},rH={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ta({values:X4,defaultWidth:"wide"}),quarter:ta({values:Q4,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ta({values:J4,defaultWidth:"wide"}),day:ta({values:eH,defaultWidth:"wide"}),dayPeriod:ta({values:tH,defaultWidth:"wide",formattingValues:nH,defaultFormattingWidth:"wide"})};function na(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?iH(a,d=>d.test(s)):oH(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function oH(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function iH(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function sH(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const aH=/^(\d+)(th|st|nd|rd)?/i,lH=/\d+/i,cH={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},uH={any:[/^b/i,/^(a|c)/i]},dH={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fH={any:[/1/i,/2/i,/3/i,/4/i]},pH={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},hH={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]},mH={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},gH={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]},vH={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},yH={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}},bH={ordinalNumber:sH({matchPattern:aH,parsePattern:lH,valueCallback:e=>parseInt(e,10)}),era:na({matchPatterns:cH,defaultMatchWidth:"wide",parsePatterns:uH,defaultParseWidth:"any"}),quarter:na({matchPatterns:dH,defaultMatchWidth:"wide",parsePatterns:fH,defaultParseWidth:"any",valueCallback:e=>e+1}),month:na({matchPatterns:pH,defaultMatchWidth:"wide",parsePatterns:hH,defaultParseWidth:"any"}),day:na({matchPatterns:mH,defaultMatchWidth:"wide",parsePatterns:gH,defaultParseWidth:"any"}),dayPeriod:na({matchPatterns:vH,defaultMatchWidth:"any",parsePatterns:yH,defaultParseWidth:"any"})},_T={code:"en-US",formatDistance:W4,formatLong:K4,formatRelative:Z4,localize:rH,match:bH,options:{weekStartsOn:0,firstWeekContainsDate:1}};function xH(e,t){const n=Ye(e,t?.in);return F4(n,z4(n))+1}function DT(e,t){const n=Ye(e,t?.in),r=+Pi(n)-+L4(n);return Math.round(r/CT)+1}function Ch(e,t){const n=Ye(e,t?.in),r=n.getFullYear(),o=xo(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=st(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=or(s,t),l=st(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=or(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function wH(e,t){const n=xo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Ch(e,t),i=st(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),or(i,t)}function MT(e,t){const n=Ye(e,t?.in),r=+or(n,t)-+wH(n,t);return Math.round(r/CT)+1}function at(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return at(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):at(n+1,2)},d(e,t){return at(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return at(e.getHours()%12||12,t.length)},H(e,t){return at(e.getHours(),t.length)},m(e,t){return at(e.getMinutes(),t.length)},s(e,t){return at(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return at(o,t.length)}},Ai={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},NT={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Rr.y(e,t)},Y:function(e,t,n,r){const o=Ch(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return at(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):at(i,t.length)},R:function(e,t){const n=PT(e);return at(n,t.length)},u:function(e,t){const n=e.getFullYear();return at(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return at(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return at(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return at(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=MT(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):at(o,t.length)},I:function(e,t,n){const r=DT(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):at(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Rr.d(e,t)},D:function(e,t,n){const r=xH(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):at(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return at(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return at(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return at(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Ai.noon:r===0?o=Ai.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Ai.evening:r>=12?o=Ai.afternoon:r>=4?o=Ai.morning:o=Ai.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):at(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):at(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Rr.s(e,t)},S:function(e,t){return Rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return LT(r);case"XXXX":case"XX":return So(r);default:return So(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return LT(r);case"xxxx":case"xx":return So(r);default:return So(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+FT(r,":");default:return"GMT"+So(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+FT(r,":");default:return"GMT"+So(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return at(r,t.length)},T:function(e,t,n){return at(+e,t.length)}};function FT(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+at(i,2)}function LT(e,t){return e%60===0?(e>0?"-":"+")+at(Math.abs(e)/60,2):So(e,t)}function So(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=at(Math.trunc(r/60),2),i=at(r%60,2);return n+o+t+i}const $T=(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"})}},VT=(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"})}},kh={p:VT,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $T(e,t);let i;switch(r){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}}",$T(r,t)).replace("{{time}}",VT(o,t))}},SH=/^D+$/,EH=/^Y+$/,TH=["D","DD","YY","YYYY"];function RT(e){return SH.test(e)}function jT(e){return EH.test(e)}function Ih(e,t,n){const r=CH(e,t,n);if(console.warn(r),TH.includes(e))throw new RangeError(r)}function CH(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const kH=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IH=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PH=/^'([^]*?)'?$/,AH=/''/g,OH=/[a-zA-Z]/;function Ph(e,t,n){const r=xo(),o=r.locale??_T,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Ye(e,n?.in);if(!hc(a))throw new RangeError("Invalid time value");let l=t.match(IH).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=kh[d];return f(u,o.formatLong)}return u}).join("").match(kH).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:_H(u)};if(NT[d])return{isToken:!0,value:u};if(d.match(OH))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(jT(d)||RT(d))&&Ih(d,t,String(e));const f=NT[d[0]];return f(a,d,o.localize,c)}).join("")}function _H(e){const t=e.match(PH);return t?t[1].replace(AH,"'"):e}function DH(e,t){const n=Ye(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=st(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function MH(){return Object.assign({},xo())}function NH(e,t){const n=Ye(e,t?.in).getDay();return n===0?7:n}function FH(e,t){return+Ye(e)>+Ye(t)}function LH(e,t){return+Ye(e)<+Ye(t)}function $H(e,t){const n=VH(t)?new t(0):st(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function VH(e){return typeof e=="function"&&e.prototype?.constructor===e}const RH=10;class zT{subPriority=0;validate(t,n){return!0}}class jH extends zT{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class zH extends zT{priority=RH;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>st(n,r))}set(t,n){return n.timestampIsSet?t:st(t,$H(t,this.context))}}class Qe{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new jH(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class BH extends Qe{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const It={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ir={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Pt(e,t){return e&&{value:t(e.value),rest:e.rest}}function St(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function sr(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*D4+i*_4+s*M4),rest:t.slice(n[0].length)}}function BT(e){return St(It.anyDigitsSigned,e)}function Tt(e,t){switch(e){case 1:return St(It.singleDigit,t);case 2:return St(It.twoDigits,t);case 3:return St(It.threeDigits,t);case 4:return St(It.fourDigits,t);default:return St(new RegExp("^\\d{1,"+e+"}"),t)}}function mc(e,t){switch(e){case 1:return St(It.singleDigitSigned,t);case 2:return St(It.twoDigitsSigned,t);case 3:return St(It.threeDigitsSigned,t);case 4:return St(It.fourDigitsSigned,t);default:return St(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Ah(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function HT(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function WT(e){return e%400===0||e%4===0&&e%100!==0}class HH extends Qe{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Pt(Tt(4,t),o);case"yo":return Pt(r.ordinalNumber(t,{unit:"year"}),o);default:return Pt(Tt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const s=HT(r.year,o);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class WH extends Qe{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Pt(Tt(4,t),o);case"Yo":return Pt(r.ordinalNumber(t,{unit:"year"}),o);default:return Pt(Tt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Ch(t,o);if(r.isTwoDigitYear){const a=HT(r.year,i);return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),or(t,o)}const s=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),or(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class qH extends Qe{priority=130;parse(t,n){return mc(n==="R"?4:n.length,t)}set(t,n,r){const o=st(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Pi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class UH extends Qe{priority=130;parse(t,n){return mc(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class GH extends Qe{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Tt(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class KH extends Qe{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Tt(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class YH extends Qe{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Pt(St(It.month,t),o);case"MM":return Pt(Tt(2,t),o);case"Mo":return Pt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class ZH extends Qe{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Pt(St(It.month,t),o);case"LL":return Pt(Tt(2,t),o);case"Lo":return Pt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function XH(e,t,n){const r=Ye(e,n?.in),o=MT(r,n)-t;return r.setDate(r.getDate()-o*7),Ye(r,n?.in)}class QH extends Qe{priority=100;parse(t,n,r){switch(n){case"w":return St(It.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Tt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return or(XH(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function JH(e,t,n){const r=Ye(e,n?.in),o=DT(r,n)-t;return r.setDate(r.getDate()-o*7),r}class e3 extends Qe{priority=100;parse(t,n,r){switch(n){case"I":return St(It.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Tt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Pi(JH(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const t3=[31,28,31,30,31,30,31,31,30,31,30,31],n3=[31,29,31,30,31,30,31,31,30,31,30,31];class r3 extends Qe{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return St(It.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Tt(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=WT(r),i=t.getMonth();return o?n>=1&&n<=n3[i]:n>=1&&n<=t3[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class o3 extends Qe{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return St(It.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Tt(n.length,t)}}validate(t,n){const r=t.getFullYear();return WT(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Oh(e,t,n){const r=xo(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ye(e,n?.in),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return dc(i,u,n)}class i3 extends Qe{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Oh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class s3 extends Qe{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return Pt(Tt(n.length,t),i);case"eo":return Pt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Oh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class a3 extends Qe{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return Pt(Tt(n.length,t),i);case"co":return Pt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Oh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function l3(e,t,n){const r=Ye(e,n?.in),o=NH(r,n),i=t-o;return dc(r,i,n)}class c3 extends Qe{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return Tt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Pt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Pt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Pt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Pt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=l3(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class u3 extends Qe{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Ah(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class d3 extends Qe{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Ah(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class f3 extends Qe{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Ah(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class p3 extends Qe{priority=70;parse(t,n,r){switch(n){case"h":return St(It.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Tt(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class h3 extends Qe{priority=70;parse(t,n,r){switch(n){case"H":return St(It.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Tt(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class m3 extends Qe{priority=70;parse(t,n,r){switch(n){case"K":return St(It.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Tt(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class g3 extends Qe{priority=70;parse(t,n,r){switch(n){case"k":return St(It.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Tt(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class v3 extends Qe{priority=60;parse(t,n,r){switch(n){case"m":return St(It.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Tt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class y3 extends Qe{priority=50;parse(t,n,r){switch(n){case"s":return St(It.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Tt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class b3 extends Qe{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Pt(Tt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class x3 extends Qe{priority=10;parse(t,n){switch(n){case"X":return sr(ir.basicOptionalMinutes,t);case"XX":return sr(ir.basic,t);case"XXXX":return sr(ir.basicOptionalSeconds,t);case"XXXXX":return sr(ir.extendedOptionalSeconds,t);default:return sr(ir.extended,t)}}set(t,n,r){return n.timestampIsSet?t:st(t,t.getTime()-fc(t)-r)}incompatibleTokens=["t","T","x"]}class w3 extends Qe{priority=10;parse(t,n){switch(n){case"x":return sr(ir.basicOptionalMinutes,t);case"xx":return sr(ir.basic,t);case"xxxx":return sr(ir.basicOptionalSeconds,t);case"xxxxx":return sr(ir.extendedOptionalSeconds,t);default:return sr(ir.extended,t)}}set(t,n,r){return n.timestampIsSet?t:st(t,t.getTime()-fc(t)-r)}incompatibleTokens=["t","T","X"]}class S3 extends Qe{priority=40;parse(t){return BT(t)}set(t,n,r){return[st(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class E3 extends Qe{priority=20;parse(t){return BT(t)}set(t,n,r){return[st(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const T3={G:new BH,y:new HH,Y:new WH,R:new qH,u:new UH,Q:new GH,q:new KH,M:new YH,L:new ZH,w:new QH,I:new e3,d:new r3,D:new o3,E:new i3,e:new s3,c:new a3,i:new c3,a:new u3,b:new d3,B:new f3,h:new p3,H:new h3,K:new m3,k:new g3,m:new v3,s:new y3,S:new b3,X:new x3,x:new w3,t:new S3,T:new E3},C3=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,k3=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,I3=/^'([^]*?)'?$/,P3=/''/g,A3=/\S/,O3=/[a-zA-Z]/;function _3(e,t,n,r){const o=()=>st(n,NaN),i=MH(),s=i.locale??_T,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Ye(n,r?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},u=[new zH(r?.in,n)],d=t.match(k3).map(h=>{const y=h[0];if(y in kh){const b=kh[y];return b(h,s.formatLong)}return h}).join("").match(C3),f=[];for(let h of d){jT(h)&&Ih(h,t,e),RT(h)&&Ih(h,t,e);const y=h[0],b=T3[y];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const S=f.find(I=>x.includes(I.token)||I.token===y);if(S)throw new RangeError(`The format string mustn't contain \`${S.fullToken}\` and \`${h}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);f.push({token:y,fullToken:h});const E=b.run(e,h,s.match,c);if(!E)return o();u.push(E.setter),e=E.rest}else{if(y.match(O3))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(h==="''"?h="'":y==="'"&&(h=D3(h)),e.indexOf(h)===0)e=e.slice(h.length);else return o()}}if(e.length>0&&A3.test(e))return o();const p=u.map(h=>h.priority).sort((h,y)=>y-h).filter((h,y,b)=>b.indexOf(h)===y).map(h=>u.filter(y=>y.priority===h).sort((y,b)=>b.subPriority-y.subPriority)).map(h=>h[0]);let g=Ye(n,r?.in);if(isNaN(+g))return o();const m={};for(const h of p){if(!h.validate(g,c))return o();const y=h.set(g,m,c);Array.isArray(y)?(g=y[0],Object.assign(m,y[1])):g=y}return g}function D3(e){return e.match(I3)[1].replace(P3,"'")}function M3(e,t,n){const[r,o]=pc(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function N3(e,t){return V4(st(e,e),$4(e))}function F3(e,t,n){return dc(e,-t,n)}function L3(e,t,n){const r=Ye(e,n?.in),o=r.getFullYear(),i=r.getDate(),s=st(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const a=DH(s);return r.setMonth(t,Math.min(i,a)),r}function $3(e,t,n){let r=Ye(e,n?.in);return isNaN(+r)?st(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=L3(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function V3(e,t,n){const r=Ye(e,n?.in);return isNaN(+r)?st(e,NaN):(r.setFullYear(t),r)}function R3(e,t,n){return IT(e,-t,n)}function ra(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=R3(e,o+r*12,n),d=F3(u,s+i*7,n),f=l+a*60,g=(c+f*60)*1e3;return st(e,+d-g)}const j3=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function z3(e,t){return T.useRef(j3(e,t)).current}const _h=e=>{const t=T.useContext(Lo);if(e)return e;if(t)return t.locale||e};function qT(e,t){const n=T.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const a=i.changedTouches[0].clientX-n.current;Math.abs(a)>t&&e(i,a>0?"right":"left"),n.current=null}}}const B3=/^(?<hour>\d\d):(?<min>\d\d)$/,H3={type:"spring",bounce:.3,duration:.6},UT=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),GT={enter:UT(1),exit:UT(-1),middle:{x:"0%",opacity:1}},KT={exit:{visibility:"hidden"}},W3=e=>{const t=or(OT(e));return AT({start:t,end:Ii(t,{days:41})})},YT=(e,t)=>e.toLocaleDateString(t,{month:"long"}),q3=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=OT(new Date(1970,o,1).setMonth(o)),s=YT(i,n);return v.jsx("option",{value:s,"data-index":o,children:s},`${e}-${s}`)}),Dh={ArrowLeft:(e,t)=>t==="days"?ra(e,{days:1}):ra(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Ii(e,{days:1}):Ii(e,{months:1}),ArrowUp:(e,t)=>t==="days"?ra(e,{weeks:1}):ra(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Ii(e,{weeks:1}):Ii(e,{years:1})},ZT=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const s=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>s?.focus({preventScroll:!0}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},Eo=e=>e.getFullYear().toString().padStart(4,"0"),U3=(e,t,n)=>e===void 0||n===void 0?!1:FH(t,e)&&LH(t,n),G3=e=>{const t=kt();return v.jsx(Be.tbody,{layout:!0,variants:GT,custom:e.direction,onKeyDown:e.onKeyDown,className:Ie(e.styles?.week),children:e.zip.map((n,r)=>{const o=ze.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return v.jsx("tr",{className:o,children:n.map(i=>{const s=i.toISOString(),a=e.rangeMode?s===e.range?.to?.toISOString()||s===e.range?.from?.toISOString():s===(e.date?wo(e.date).toISOString():void 0),l=N3(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=M3(i,e.stateDate),d=!u||c,f=e.rangeMode?U3(e.range?.from,i,e.range?.to):!1;return v.jsxs("td",{align:"center",className:Ie("relative",ze.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[v.jsxs("button",{type:"button","data-date":s,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Ie(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${a?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",ze.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),a&&e.stateRange.from?.toISOString()===s?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,a&&e.stateRange.to?.toISOString()===s?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?v.jsx(e.RenderOnDay,{date:i}):null]},s)})},`week-${n.length}-${r}`)})})},K3=()=>wo(new Date),XT=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:s,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:p,...g})=>{const m=T.useRef(qo()),h=kt(),y=_h(o),b=T.useRef(null),{date:x,range:E}=g,S=x||new Date,I=T.useRef(null),[w,C]=op({date:S,isAnimating:!1,year:Eo(S),direction:void 0,range:{from:E?.from,to:E?.to},months:q3(m.current,S,y),selectMode:l?"from":void 0,week:AT({start:or(S),end:B4(S)})},M=>({onChangeYear:P=>({year:P}),onExitComplete:()=>(ZT(I.current||null,b,M.state().date,200),I.current=null,{isAnimating:!1}),date:P=>{const R=P(M.state().date);return{date:R,year:Eo(R)}},nextMonth:P=>{P&&(I.current=P.currentTarget);const R=M.state();if(R.isAnimating)return R;const V=Ii(R.date,{months:1});return{date:V,isAnimating:!0,direction:1,year:Eo(V)}},previousMonth:P=>{P&&(I.current=P.currentTarget);const R=M.state();if(R.isAnimating)return R;const V=ra(R.date,{months:1});return{date:V,isAnimating:!0,direction:-1,year:Eo(V)}},onSelectDate:P=>{const R=M.state(),V=P.currentTarget.dataset.range==="true",G=P.currentTarget.dataset.date||"",U=new Date(G);return{date:U,year:Eo(U),selectMode:R.selectMode===void 0?void 0:R.selectMode==="from"?"to":"from",range:V?{from:R.selectMode==="from"?U:R.range.from,to:R.selectMode==="to"?U:R.range.to}:R.range}},onChangeMonth:P=>{const R=P.target.value,G=Array.from(P.target.options).find(B=>B.value===R),U=M.state();if(G){const B=G.dataset.index||"",Y=new Date(M.state().date);return Y.setMonth(+B),{...U,date:Y,year:Eo(Y)}}return U},onKeyDown:P=>{const R=P.key,V=M.state();if(R in Dh){(R==="ArrowUp"||R==="ArrowDown")&&P.preventDefault();const G=M.state().date,U=ze.keyof(Dh,R)?Dh[R](G,P.shiftKey?"month":"days"):null;if(U!==null)return ZT(P.target,b,U),{...V,date:U,year:Eo(U)}}return M.state()}}),{props:{onChangeMonth:s,onChangeYear:a},postMiddleware:[(M,P,R)=>((R.method==="onChangeMonth"||R.method==="previousMonth"||R.method==="nextMonth")&&R.props.onChangeMonth?.(M.date),M),(M,P,R)=>(R.method==="onChangeYear"&&R.props.onChangeYear?.(M.date),M),(M,P,R)=>{const V=R.method==="onSelectDate"||R.method==="setToday"||R.method==="onKeyDown";return l&&V&&t?(c?.(M.range),M):(V&&t&&c?.(M.date),M)}]}),A=W3(w.date),O=Ry(A,7),N=w.date.toISOString(),L=YT(w.date,y);T.useEffect(()=>{t||c?.(w.date)},[N,t]);const j=z3(M=>C.date(P=>V3(new Date(P),+M)),1200),_=M=>{const P=M.currentTarget.value;C.onChangeYear(P),a?.(new Date(P)),j(P)},F=qT((M,P)=>(M.preventDefault(),P==="right"?C.previousMonth():C.nextMonth()),10),z=()=>{const M=K3();C.date(()=>M),c?.(M)};return v.jsx(Bf,{transition:H3,children:v.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:F.onTouchEnd,onTouchStart:F.onTouchStart,className:Ie("relative overflow-hidden",ze.function(u?.calendar)?u?.calendar(A):u?.calendar),children:[v.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:v.jsx(Dn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:C.onExitComplete,children:v.jsxs(Be.div,{initial:"enter",animate:"middle",exit:"exit",children:[v.jsxs("header",{className:"relative flex justify-between",children:[v.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"prev",variants:KT,onClick:C.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(jP,{className:"h-4 w-4"})}),v.jsx(Be.span,{layout:!0,variants:GT,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:v.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[v.jsx("select",{value:L,onChange:C.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${L.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),v.jsx(Jg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:_,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),v.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"next",variants:KT,onClick:C.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(Mu,{className:"h-4 w-4"})}),v.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),v.jsxs(Be.table,{className:"mt-2 table min-w-full table-auto border-0",children:[v.jsx("thead",{children:v.jsx("tr",{children:w.week.map(M=>v.jsx("th",{role:"columnheader",className:Ie("py-2 text-sm font-medium capitalize",ze.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(y,{weekday:"short"})},M.toString()))})}),v.jsx(G3,{zip:O,range:E,styles:u,date:x||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},L)})}),f==="datetime"?v.jsx("section",{className:"grid items-center my-4",children:v.jsx(Uo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?Ph(x,"HH:mm"):void 0,title:p||h.calendarDatetimeTitle,onChange:M=>{const P=M.target.value,R=B3.exec(P);if(!R)return;const V=R.groups.hour,G=R.groups.min,U=$3(w.date,{hours:Number(V),minutes:Number(G),seconds:0});C.date(()=>U),c?.(U)}})}):null,v.jsx("footer",{className:"mt-2 text-center text-primary",children:v.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},Y3=e=>v.jsxs(rD,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:Ie("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[v.jsx(oD,{style:{transform:ze.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Ie("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),ze.number(e.percent)?v.jsx("p",{className:Ie("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),gc=e=>v.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[v.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),v.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});gc.Icon=function(t){return v.jsx("header",{...t,className:Ie("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},gc.Body=function(t){return v.jsx(an,{...t,className:Ie("min-w-0 flex-1",t.className),children:t.children})},gc.Right=function(t){return v.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:v.jsx(an,{...t,type:"button"})})};const Z3=e=>v.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),X3=e=>v.jsx(Be.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),QT=new Date(1970,11,31),Mh={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},JT={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},Q3={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Nh=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},J3={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},eW={day:"numeric",month:"numeric",year:"numeric"},tW=T.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:s=!0,type:a,...l},c)=>{const u=_h(t),d=T.useId(),f=kt(),p=T.useMemo(()=>new Intl.DateTimeFormat(u,a==="datetime"?J3:eW),[u,a]),[g,m]=T.useState(e||void 0),[h,y]=T.useState(!1),b=Nh(p,QT).flatMap(L=>ze.keyof(Mh,L.type)?Mh[L.type](L.value):[]),x=T.useMemo(()=>Nh(p,QT).reduce((L,j)=>L+(ze.keyof(JT,j.type)?JT[j.type](j.value):""),""),[p]),E=e?.toISOString(),[S,I]=T.useState(g?Nh(p,g).reduce((L,j)=>L+(ze.keyof(Mh,j.type)?Q3[j.type](g,j.value):""),""):""),w=L=>{const j=L.target.value;if(I(j),b.length===j.length&&b.every((F,z)=>{const M=j.charAt(z);return typeof F=="string"?M===F:F.test(M)})){const F=_3(j,x,new Date),z=a==="datetime"?F:wo(F);return m(z),r?.(z)}return m(void 0),r?.(void 0)};T.useEffect(()=>{hc(e)&&(m(e),I(Ph(e,x)))},[E,x]);const C=L=>(m(L),r?.(L),i&&y(!1),I(L?Ph(L,x):"")),A=hc(g),O=A?g.toISOString():void 0,N=v.jsx(XT,{...l,type:a,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:C,disabledDate:n,date:A?g:void 0});return v.jsx(T.Fragment,{children:v.jsx(Uo,{...l,mask:b,value:S,id:void 0,name:void 0,"data-value":O,formNoValidate:!h,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:h?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:s?v.jsxs(T.Fragment,{children:[v.jsx("input",{"data-origin":l.name,defaultValue:O,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),v.jsx(vi,{open:h,onChange:y,buttonProps:{"aria-describedby":d},trigger:v.jsxs("span",{"aria-labelledby":d,children:[v.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),v.jsx(RP,{})]}),children:N})]}):null})})}),nW=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],rW=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],oW=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],iW=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],eC=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},tC=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},sW=e=>typeof e=="number"?Math.log(e):tC(e)*Math.log(10),aW=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},nC=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},lW=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function cW(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?iW:oW:t.binary?rW:nW,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return nC(c,t.fixedWidth)}const i=e<0,s=i?"-":t.signed?"+":"";i&&(e=-e);const a=lW(t);let l;if(e<1){const c=eC(e,t.locale,a);l=s+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?sW(e)/Math.log(1024):tC(e)/3),n.length-1);if(e=aW(e,(t.binary?1024:1e3)**c),!a){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=eC(Number(e),t.locale,a),d=n[c];l=s+u+r+d}return nC(l,t.fixedWidth)}var vc={exports:{}},yc={exports:{}},tt={};var rC;function uW(){if(rC)return tt;rC=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(S){if(typeof S=="object"&&S!==null){var I=S.$$typeof;switch(I){case t:switch(S=S.type,S){case l:case c:case r:case i:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case g:case p:case s:return S;default:return I}}case n:return I}}}function E(S){return x(S)===c}return tt.AsyncMode=l,tt.ConcurrentMode=c,tt.ContextConsumer=a,tt.ContextProvider=s,tt.Element=t,tt.ForwardRef=u,tt.Fragment=r,tt.Lazy=g,tt.Memo=p,tt.Portal=n,tt.Profiler=i,tt.StrictMode=o,tt.Suspense=d,tt.isAsyncMode=function(S){return E(S)||x(S)===l},tt.isConcurrentMode=E,tt.isContextConsumer=function(S){return x(S)===a},tt.isContextProvider=function(S){return x(S)===s},tt.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},tt.isForwardRef=function(S){return x(S)===u},tt.isFragment=function(S){return x(S)===r},tt.isLazy=function(S){return x(S)===g},tt.isMemo=function(S){return x(S)===p},tt.isPortal=function(S){return x(S)===n},tt.isProfiler=function(S){return x(S)===i},tt.isStrictMode=function(S){return x(S)===o},tt.isSuspense=function(S){return x(S)===d},tt.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===i||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===g||S.$$typeof===p||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===h||S.$$typeof===y||S.$$typeof===b||S.$$typeof===m)},tt.typeOf=x,tt}var nt={};var oC;function dW(){return oC||(oC=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(D){return typeof D=="string"||typeof D=="function"||D===r||D===c||D===i||D===o||D===d||D===f||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===p||D.$$typeof===s||D.$$typeof===a||D.$$typeof===u||D.$$typeof===h||D.$$typeof===y||D.$$typeof===b||D.$$typeof===m)}function E(D){if(typeof D=="object"&&D!==null){var ee=D.$$typeof;switch(ee){case t:var Q=D.type;switch(Q){case l:case c:case r:case i:case o:case d:return Q;default:var fe=Q&&Q.$$typeof;switch(fe){case a:case u:case g:case p:case s:return fe;default:return ee}}case n:return ee}}}var S=l,I=c,w=a,C=s,A=t,O=u,N=r,L=g,j=p,_=n,F=i,z=o,M=d,P=!1;function R(D){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),V(D)||E(D)===l}function V(D){return E(D)===c}function G(D){return E(D)===a}function U(D){return E(D)===s}function B(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function Y(D){return E(D)===u}function ne(D){return E(D)===r}function se(D){return E(D)===g}function oe(D){return E(D)===p}function W(D){return E(D)===n}function q(D){return E(D)===i}function X(D){return E(D)===o}function ue(D){return E(D)===d}nt.AsyncMode=S,nt.ConcurrentMode=I,nt.ContextConsumer=w,nt.ContextProvider=C,nt.Element=A,nt.ForwardRef=O,nt.Fragment=N,nt.Lazy=L,nt.Memo=j,nt.Portal=_,nt.Profiler=F,nt.StrictMode=z,nt.Suspense=M,nt.isAsyncMode=R,nt.isConcurrentMode=V,nt.isContextConsumer=G,nt.isContextProvider=U,nt.isElement=B,nt.isForwardRef=Y,nt.isFragment=ne,nt.isLazy=se,nt.isMemo=oe,nt.isPortal=W,nt.isProfiler=q,nt.isStrictMode=X,nt.isSuspense=ue,nt.isValidElementType=x,nt.typeOf=E})()),nt}var iC;function sC(){return iC||(iC=1,process.env.NODE_ENV==="production"?yc.exports=uW():yc.exports=dW()),yc.exports}var Fh,aC;function fW(){if(aC)return Fh;aC=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Fh=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Fh}var Lh,lC;function $h(){if(lC)return Lh;lC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Lh=e,Lh}var Vh,cC;function uC(){return cC||(cC=1,Vh=Function.call.bind(Object.prototype.hasOwnProperty)),Vh}var Rh,dC;function pW(){if(dC)return Rh;dC=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=$h(),n={},r=uC();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+a+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Rh=o,Rh}var jh,fC;function hW(){if(fC)return jh;fC=1;var e=sC(),t=fW(),n=$h(),r=uC(),o=pW(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return jh=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(V){var G=V&&(c&&V[c]||V[u]);if(typeof G=="function")return G}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:x,element:E(),elementType:S(),instanceOf:I,node:O(),objectOf:C,oneOf:w,oneOfType:A,shape:L,exact:j};function g(V,G){return V===G?V!==0||1/V===1/G:V!==V&&G!==G}function m(V,G){this.message=V,this.data=G&&typeof G=="object"?G:{},this.stack=""}m.prototype=Error.prototype;function h(V){if(process.env.NODE_ENV!=="production")var G={},U=0;function B(ne,se,oe,W,q,X,ue){if(W=W||f,X=X||oe,ue!==n){if(l){var D=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 D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ee=W+":"+oe;!G[ee]&&U<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),G[ee]=!0,U++)}}return se[oe]==null?ne?se[oe]===null?new m("The "+q+" `"+X+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+q+" `"+X+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:V(se,oe,W,q,X)}var Y=B.bind(null,!1);return Y.isRequired=B.bind(null,!0),Y}function y(V){function G(U,B,Y,ne,se,oe){var W=U[B],q=z(W);if(q!==V){var X=M(W);return new m("Invalid "+ne+" `"+se+"` of type "+("`"+X+"` supplied to `"+Y+"`, expected ")+("`"+V+"`."),{expectedType:V})}return null}return h(G)}function b(){return h(s)}function x(V){function G(U,B,Y,ne,se){if(typeof V!="function")return new m("Property `"+se+"` of component `"+Y+"` has invalid PropType notation inside arrayOf.");var oe=U[B];if(!Array.isArray(oe)){var W=z(oe);return new m("Invalid "+ne+" `"+se+"` of type "+("`"+W+"` supplied to `"+Y+"`, expected an array."))}for(var q=0;q<oe.length;q++){var X=V(oe,q,Y,ne,se+"["+q+"]",n);if(X instanceof Error)return X}return null}return h(G)}function E(){function V(G,U,B,Y,ne){var se=G[U];if(!a(se)){var oe=z(se);return new m("Invalid "+Y+" `"+ne+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return h(V)}function S(){function V(G,U,B,Y,ne){var se=G[U];if(!e.isValidElementType(se)){var oe=z(se);return new m("Invalid "+Y+" `"+ne+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return h(V)}function I(V){function G(U,B,Y,ne,se){if(!(U[B]instanceof V)){var oe=V.name||f,W=R(U[B]);return new m("Invalid "+ne+" `"+se+"` of type "+("`"+W+"` supplied to `"+Y+"`, expected ")+("instance of `"+oe+"`."))}return null}return h(G)}function w(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function G(U,B,Y,ne,se){for(var oe=U[B],W=0;W<V.length;W++)if(g(oe,V[W]))return null;var q=JSON.stringify(V,function(ue,D){var ee=M(D);return ee==="symbol"?String(D):D});return new m("Invalid "+ne+" `"+se+"` of value `"+String(oe)+"` "+("supplied to `"+Y+"`, expected one of "+q+"."))}return h(G)}function C(V){function G(U,B,Y,ne,se){if(typeof V!="function")return new m("Property `"+se+"` of component `"+Y+"` has invalid PropType notation inside objectOf.");var oe=U[B],W=z(oe);if(W!=="object")return new m("Invalid "+ne+" `"+se+"` of type "+("`"+W+"` supplied to `"+Y+"`, expected an object."));for(var q in oe)if(r(oe,q)){var X=V(oe,q,Y,ne,se+"."+q,n);if(X instanceof Error)return X}return null}return h(G)}function A(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var G=0;G<V.length;G++){var U=V[G];if(typeof U!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(U)+" at index "+G+"."),s}function B(Y,ne,se,oe,W){for(var q=[],X=0;X<V.length;X++){var ue=V[X],D=ue(Y,ne,se,oe,W,n);if(D==null)return null;D.data&&r(D.data,"expectedType")&&q.push(D.data.expectedType)}var ee=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new m("Invalid "+oe+" `"+W+"` supplied to "+("`"+se+"`"+ee+"."))}return h(B)}function O(){function V(G,U,B,Y,ne){return _(G[U])?null:new m("Invalid "+Y+" `"+ne+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return h(V)}function N(V,G,U,B,Y){return new m((V||"React class")+": "+G+" type `"+U+"."+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Y+"`.")}function L(V){function G(U,B,Y,ne,se){var oe=U[B],W=z(oe);if(W!=="object")return new m("Invalid "+ne+" `"+se+"` of type `"+W+"` "+("supplied to `"+Y+"`, expected `object`."));for(var q in V){var X=V[q];if(typeof X!="function")return N(Y,ne,se,q,M(X));var ue=X(oe,q,Y,ne,se+"."+q,n);if(ue)return ue}return null}return h(G)}function j(V){function G(U,B,Y,ne,se){var oe=U[B],W=z(oe);if(W!=="object")return new m("Invalid "+ne+" `"+se+"` of type `"+W+"` "+("supplied to `"+Y+"`, expected `object`."));var q=t({},U[B],V);for(var X in q){var ue=V[X];if(r(V,X)&&typeof ue!="function")return N(Y,ne,se,X,M(ue));if(!ue)return new m("Invalid "+ne+" `"+se+"` key `"+X+"` supplied to `"+Y+"`.\nBad object: "+JSON.stringify(U[B],null," ")+`
|
|
36
|
-
Valid keys: `+JSON.stringify(Object.keys(V),null," "));var D=ue(oe,X,Y,ne,se+"."+X,n);if(D)return D}return null}return h(G)}function _(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(_);if(V===null||a(V))return!0;var G=d(V);if(G){var U=G.call(V),B;if(G!==V.entries){for(;!(B=U.next()).done;)if(!_(B.value))return!1}else for(;!(B=U.next()).done;){var Y=B.value;if(Y&&!_(Y[1]))return!1}}else return!1;return!0;default:return!1}}function F(V,G){return V==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function z(V){var G=typeof V;return Array.isArray(V)?"array":V instanceof RegExp?"object":F(G,V)?"symbol":G}function M(V){if(typeof V>"u"||V===null)return""+V;var G=z(V);if(G==="object"){if(V instanceof Date)return"date";if(V instanceof RegExp)return"regexp"}return G}function P(V){var G=M(V);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function R(V){return!V.constructor||!V.constructor.name?f:V.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},jh}var zh,pC;function mW(){if(pC)return zh;pC=1;var e=$h();function t(){}function n(){}return n.resetWarningCache=t,zh=function(){function r(s,a,l,c,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},zh}var hC;function gW(){if(hC)return vc.exports;if(hC=1,process.env.NODE_ENV!=="production"){var e=sC(),t=!0;vc.exports=hW()(e.isElement,t)}else vc.exports=mW()();return vc.exports}var vW=gW();const dt=Cm(vW),yW=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Oi(e,t,n){const r=bW(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&mC(r,"path",i),mC(r,"relativePath",i),r}function bW(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=yW.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function mC(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const xW=[".DS_Store","Thumbs.db"];function wW(e){return so(this,void 0,void 0,function*(){return bc(e)&&SW(e.dataTransfer)?kW(e.dataTransfer,e.type):EW(e)?TW(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?CW(e):[]})}function SW(e){return bc(e)}function EW(e){return bc(e)&&bc(e.target)}function bc(e){return typeof e=="object"&&e!==null}function TW(e){return Bh(e.target.files).map(t=>Oi(t))}function CW(e){return so(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Oi(n))})}function kW(e,t){return so(this,void 0,void 0,function*(){if(e.items){const n=Bh(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(IW));return gC(vC(r))}return gC(Bh(e.files).map(n=>Oi(n)))})}function gC(e){return e.filter(t=>xW.indexOf(t.name)===-1)}function Bh(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function IW(e){if(typeof e.webkitGetAsEntry!="function")return yC(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?bC(t):yC(e,t)}function vC(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?vC(n):[n]],[])}function yC(e,t){return so(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const s=yield i.getFile();return s.handle=i,Oi(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Oi(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function PW(e){return so(this,void 0,void 0,function*(){return e.isDirectory?bC(e):AW(e)})}function bC(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(s=>so(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(PW));o.push(a),i()}else try{const a=yield Promise.all(o);n(a)}catch(a){r(a)}}),s=>{r(s)})}i()})}function AW(e){return so(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Oi(r,e.fullPath);t(o)},r=>{n(r)})})})}var xc={},xC;function OW(){return xC||(xC=1,xc.__esModule=!0,xc.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0}),xc}var _W=OW();const Hh=Cm(_W);function wC(e){return NW(e)||MW(e)||CC(e)||DW()}function DW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
37
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
38
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
39
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
40
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MC(e,t){if(e){if(typeof e=="string")return Uh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Uh(e,t)}}function Uh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c5(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function u5(e){if(Array.isArray(e))return e}function NC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NC(Object(n),!0).forEach(function(r){Gh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ec(e,t){if(e==null)return{};var n=d5(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function d5(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Kh=T.forwardRef(function(e,t){var n=e.children,r=Ec(e,e5),o=LC(r),i=o.open,s=Ec(o,t5);return T.useImperativeHandle(t,function(){return{open:i}},[i]),T.createElement(T.Fragment,null,n(Et(Et({},s),{},{open:i})))});Kh.displayName="Dropzone";var FC={disabled:!1,getFilesFromEvent:wW,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Kh.defaultProps=FC,Kh.propTypes={children:dt.func,accept:dt.objectOf(dt.arrayOf(dt.string)),multiple:dt.bool,preventDropOnDocument:dt.bool,noClick:dt.bool,noKeyboard:dt.bool,noDrag:dt.bool,noDragEventsBubbling:dt.bool,minSize:dt.number,maxSize:dt.number,maxFiles:dt.number,disabled:dt.bool,getFilesFromEvent:dt.func,onFileDialogCancel:dt.func,onFileDialogOpen:dt.func,useFsAccessApi:dt.bool,autoFocus:dt.bool,onDragEnter:dt.func,onDragLeave:dt.func,onDragOver:dt.func,onDrop:dt.func,onDropAccepted:dt.func,onDropRejected:dt.func,onError:dt.func,validator:dt.func};var Yh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function LC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Et(Et({},FC),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,g=t.onDropRejected,m=t.onFileDialogCancel,h=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,E=t.noClick,S=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,C=t.onError,A=t.validator,O=T.useMemo(function(){return XW(n)},[n]),N=T.useMemo(function(){return ZW(n)},[n]),L=T.useMemo(function(){return typeof h=="function"?h:$C},[h]),j=T.useMemo(function(){return typeof m=="function"?m:$C},[m]),_=T.useRef(null),F=T.useRef(null),z=T.useReducer(f5,Yh),M=qh(z,2),P=M[0],R=M[1],V=P.isFocused,G=P.isFileDialogActive,U=T.useRef(typeof window<"u"&&window.isSecureContext&&y&&YW()),B=function(){!U.current&&G&&setTimeout(function(){if(F.current){var re=F.current.files;re.length||(R({type:"closeDialog"}),j())}},300)};T.useEffect(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[F,G,j,U]);var Y=T.useRef([]),ne=function(re){_.current&&_.current.contains(re.target)||(re.preventDefault(),Y.current=[])};T.useEffect(function(){return x&&(document.addEventListener("dragover",OC,!1),document.addEventListener("drop",ne,!1)),function(){x&&(document.removeEventListener("dragover",OC),document.removeEventListener("drop",ne))}},[_,x]),T.useEffect(function(){return!r&&b&&_.current&&_.current.focus(),function(){}},[_,b,r]);var se=T.useCallback(function($){C?C($):console.error($)},[C]),oe=T.useCallback(function($){$.preventDefault(),$.persist(),he($),Y.current=[].concat(o5(Y.current),[$.target]),Sc($)&&Promise.resolve(o($)).then(function(re){if(!(wc($)&&!w)){var me=re.length,Ce=me>0&&qW({files:re,accept:O,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:A}),Me=me>0&&!Ce;R({isDragAccept:Ce,isDragReject:Me,isDragActive:!0,type:"setDraggedFiles"}),c&&c($)}}).catch(function(re){return se(re)})},[o,c,se,w,O,s,i,a,l,A]),W=T.useCallback(function($){$.preventDefault(),$.persist(),he($);var re=Sc($);if(re&&$.dataTransfer)try{$.dataTransfer.dropEffect="copy"}catch{}return re&&d&&d($),!1},[d,w]),q=T.useCallback(function($){$.preventDefault(),$.persist(),he($);var re=Y.current.filter(function(Ce){return _.current&&_.current.contains(Ce)}),me=re.indexOf($.target);me!==-1&&re.splice(me,1),Y.current=re,!(re.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Sc($)&&u&&u($))},[_,u,w]),X=T.useCallback(function($,re){var me=[],Ce=[];$.forEach(function(Me){var Ne=PC(Me,O),bt=qh(Ne,2),ft=bt[0],en=bt[1],cr=AC(Me,s,i),jn=qh(cr,2),zn=jn[0],K=jn[1],Z=A?A(Me):null;if(ft&&zn&&!Z)me.push(Me);else{var Re=[en,K];Z&&(Re=Re.concat(Z)),Ce.push({file:Me,errors:Re.filter(function(rt){return rt})})}}),(!a&&me.length>1||a&&l>=1&&me.length>l)&&(me.forEach(function(Me){Ce.push({file:Me,errors:[WW]})}),me.splice(0)),R({acceptedFiles:me,fileRejections:Ce,isDragReject:Ce.length>0,type:"setFiles"}),f&&f(me,Ce,re),Ce.length>0&&g&&g(Ce,re),me.length>0&&p&&p(me,re)},[R,a,O,s,i,l,f,p,g,A]),ue=T.useCallback(function($){$.preventDefault(),$.persist(),he($),Y.current=[],Sc($)&&Promise.resolve(o($)).then(function(re){wc($)&&!w||X(re,$)}).catch(function(re){return se(re)}),R({type:"reset"})},[o,X,se,w]),D=T.useCallback(function(){if(U.current){R({type:"openDialog"}),L();var $={multiple:a,types:N};window.showOpenFilePicker($).then(function(re){return o(re)}).then(function(re){X(re,null),R({type:"closeDialog"})}).catch(function(re){QW(re)?(j(re),R({type:"closeDialog"})):JW(re)?(U.current=!1,F.current?(F.current.value=null,F.current.click()):se(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):se(re)});return}F.current&&(R({type:"openDialog"}),L(),F.current.value=null,F.current.click())},[R,L,j,y,X,se,N,a]),ee=T.useCallback(function($){!_.current||!_.current.isEqualNode($.target)||($.key===" "||$.key==="Enter"||$.keyCode===32||$.keyCode===13)&&($.preventDefault(),D())},[_,D]),Q=T.useCallback(function(){R({type:"focus"})},[]),fe=T.useCallback(function(){R({type:"blur"})},[]),J=T.useCallback(function(){E||(KW()?setTimeout(D,0):D())},[E,D]),te=function(re){return r?null:re},ce=function(re){return S?null:te(re)},ve=function(re){return I?null:te(re)},he=function(re){w&&re.stopPropagation()},ge=T.useMemo(function(){return function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=$.refKey,me=re===void 0?"ref":re,Ce=$.role,Me=$.onKeyDown,Ne=$.onFocus,bt=$.onBlur,ft=$.onClick,en=$.onDragEnter,cr=$.onDragOver,jn=$.onDragLeave,zn=$.onDrop,K=Ec($,n5);return Et(Et(Gh({onKeyDown:ce(ar(Me,ee)),onFocus:ce(ar(Ne,Q)),onBlur:ce(ar(bt,fe)),onClick:te(ar(ft,J)),onDragEnter:ve(ar(en,oe)),onDragOver:ve(ar(cr,W)),onDragLeave:ve(ar(jn,q)),onDrop:ve(ar(zn,ue)),role:typeof Ce=="string"&&Ce!==""?Ce:"presentation"},me,_),!r&&!S?{tabIndex:0}:{}),K)}},[_,ee,Q,fe,J,oe,W,q,ue,S,I,r]),ie=T.useCallback(function($){$.stopPropagation()},[]),H=T.useMemo(function(){return function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=$.refKey,me=re===void 0?"ref":re,Ce=$.onChange,Me=$.onClick,Ne=Ec($,r5),bt=Gh({accept:O,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:te(ar(Ce,ue)),onClick:te(ar(Me,ie)),tabIndex:-1},me,F);return Et(Et({},bt),Ne)}},[F,n,a,ue,r]);return Et(Et({},P),{},{isFocused:V&&!r,getRootProps:ge,getInputProps:H,rootRef:_,inputRef:F,open:te(D)})}function f5(e,t){switch(t.type){case"focus":return Et(Et({},e),{},{isFocused:!0});case"blur":return Et(Et({},e),{},{isFocused:!1});case"openDialog":return Et(Et({},Yh),{},{isFileDialogActive:!0});case"closeDialog":return Et(Et({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Et(Et({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Et(Et({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Et({},Yh);default:return e}}function $C(){}const VC=T.createContext([null,()=>{}]),p5=()=>T.useContext(VC),h5=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,m5={csv:Lu,xls:Lu,mov:iv,mp4:iv,xlsx:Lu,pdf:ov,txt:ov,json:HP,mp3:VP},g5=e=>{const[,t]=p5(),[n,r]=T.useState({url:"",type:"",size:""});T.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:h5(l),size:cW(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},s=m5[e.file.name.split(".").at(-1)]??sv,a=n.type==="img"?v.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):v.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return v.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[v.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:a}),v.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[v.jsx("span",{children:e.file.name}),v.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?v.jsx("div",{className:"flex-1 min-w-full",children:v.jsx(e.File,{file:e.file})}):null]}),v.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:v.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:v.jsx(No,{size:16})})})]})},v5=e=>v.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>v.jsx(g5,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),RC=e=>{const t=kt(),n=e.dragging?WP:qP;return v.jsxs("div",{className:"flex flex-col justify-center items-center",children:[v.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:v.jsx(n,{className:"text-primary",size:80})}),v.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[v.jsx("p",{children:t.uploadIdle}),v.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},y5=e=>e.isDragActive?v.jsx(RC,{files:e.files,dragging:!0}):e.files.length>0?v.jsx(v5,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):v.jsx(T.Fragment,{children:e.idle}),b5=v.jsx(RC,{dragging:!1}),x5=e=>{const t=e.item.file,n=e.item.type;return v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),v.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?v.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?v.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?v.jsx("figure",{children:v.jsx("audio",{controls:!0,src:e.item.url})}):null]})},w5=({idle:e=b5,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=kt(),s=T.useState(null),[a,l]=T.useState([]),c=o.files??a,u=()=>s[1](null),d=m=>{r?.(m),l(h=>h.concat(m))},{getRootProps:f,getInputProps:p,isDragActive:g}=LC({onDrop:d});return v.jsxs(VC.Provider,{value:s,children:[v.jsx(Eh,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?v.jsx(x5,{item:s[0]}):null}),v.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[v.jsx("input",{...p(o),name:o.name,id:o.name}),v.jsx(y5,{File:n,onDeleteFile:t,isDragActive:g,idle:e,files:c})]})]})},jC=()=>window.matchMedia("@media (pointer: coarse)"),S5=()=>{const e=T.useRef(Ir()?null:jC()),[t,n]=T.useState(Ir()?!1:e.current?.matches??!1);return T.useEffect(()=>{(e.current===null?jC():e.current).addEventListener("change",o=>n(o.matches))},[]),t},zC=(e,t="overflow-hidden")=>{const n=T.useRef(null),r=S5(),o=T.useRef(Ir()?"":document.documentElement.style.overflowY);return T.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||jy())return;document.documentElement.style.padding=zg(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),T.useEffect(()=>{if(!e)return;const i=new AbortController,s=document.documentElement,a=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(xI(c.style.height)):null,f=ze.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return s.addEventListener("wheel",a,{signal:i.signal,passive:!1}),s.addEventListener("scroll",a,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},E5=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((s,a)=>s===n?a:!1).filter(s=>s!==!1);if(r.length===0)return null;const o=[];if(r.forEach(s=>{let a=s+1;const l=[s];for(let c=1;c<t.length;c++){const u=t[c];if(a=e.indexOf(u,a),a===-1)return;l.push(a),a++}o.push(l)}),o.length===0)return null;const i=o.sort((s,a)=>{if(s.length===1)return s[0]-a[0];const l=s[s.length-1]-s[0],c=a[a.length-1]-a[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},BC=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},HC={basic:/[,[\]]+?/,extend:/[,[\].]+?/},WC=(e,t)=>{const n=BC(t,HC.basic,e);return n!==void 0&&n!==e?n:BC(t,HC.extend,e)},qC=e=>e.replace(/[^0-9]/g,""),Tc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),UC=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?qC(e).includes(qC(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?E5(e,t)!==null:!1,T5=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>UC(e,o,n,r)):UC(e,t,n,r),Zh=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:ze.array(i.value)?i.value.map(Tc):Tc(`${i.value}`)}));return e.forEach(i=>{const s=WC(i,t);o.forEach(a=>{const l=WC(i,a.key);if(!l)return;const c=Tc(`${a.value}`.toLocaleLowerCase()).trim(),u=Tc(`${l}`.toLocaleLowerCase()).trim();if(T5(u,c,a.score,a.match))return void r.set(s,i);ze.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},C5=e=>v.jsx(T.Fragment,{children:e.children}),k5={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},I5=[],P5=T.forwardRef(function(t,n){return v.jsx(Be.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg",children:v.jsx(Dn,{children:t.children})})}),A5=T.forwardRef(function({item:t,context:n,...r},o){return v.jsx(Be.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),O5={List:P5,Item:A5},_i=40,_5=T.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:s,interactive:a,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:g=!1,...m},h)=>{const y=T.useRef(null),b=T.useRef(null),x=T.useRef(null),E=m.value??m.defaultValue??"",S=kt(),[I,w]=T.useState(()=>Math.min(320,_i*o.length)),[C,A]=T.useState(!1),[O,N]=T.useState(""),[L,j]=T.useState(E),[_,F]=T.useState(()=>o.find(H=>H.value===E)?.label??E),[z,M]=T.useState(null),P=T.useRef(I5),R=zC(C,"block-only"),V=g&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...o]:o,G=()=>Po.flushSync(()=>A(!0)),U=O?Zh(V,"value",[{key:"value",value:O},{key:"label",value:O}]):V,B=()=>{A(!1),w(0)},Y=U.filter(H=>H.hidden!==!0),ne=g?void 0:`^(${o.map(H=>`${hd(H.value)}${H.label?"|"+hd(H.label):""}`).join("|")})$`,{x:se,y:oe,strategy:W,refs:q,context:X}=Cr({open:C,transform:!0,onOpenChange:A,placement:"bottom-start",whileElementsMounted:zo,middleware:[Qi(4),Xv({padding:10,elementContext:"reference",apply(H){const re=H.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,me=Hi(q.reference.current,window.innerHeight),Ce=Math.min(re<_i?me:re,me,H.availableHeight),Me=Y.length===0?_i:Math.min(Ce,me,re),Ne=`${b.current.getBoundingClientRect().width}px`;Object.assign(H.elements.floating.style,{width:Ne,maxWidth:Ne,height:Me})}})]}),ue=Dy(X,k5),{getReferenceProps:D,getFloatingProps:ee,getItemProps:Q}=kr([ro(X,{role:"listbox"}),no(X),Ja(X,{cols:0,listRef:P,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);T.useEffect(()=>{if(m.value){const H=o.find($=>$.value===m.value);H&&(F(H.label??H.value),j(m.value))}},[m.value,o.length]),T.useEffect(()=>{if(!C)return w(0);const H=q.reference;if(H.current===null)return;const $=Hi(H.current,window.innerHeight);setTimeout(()=>w(Math.min($,Y.length*_i)),100)},[O,C,q.reference,Y.length]),T.useEffect(()=>{const H=q.reference.current;if(H)return Bi(H)},[]);const fe=(H,$)=>{j(H.value);const re=q.reference.current;if(!re)return;re?.setAttribute("data-value",H.value),re.value=H.value;const me=new Event("change",{bubbles:!1,cancelable:!0});re.dispatchEvent(me),m.onChange&&m.onChange(me),F(H.label??""),B(),N(""),M($)},J=H=>{const $=H.target.value;return N($),!C&&$===""?A(!0):(H.target.name=m.name||"",$?A(!0):m.onChange?.(H))},te=()=>{G(),N(""),q.reference.current?.focus()},ce=()=>{M(H=>H===null?0:H),G(),N("")},ve=()=>{q.reference.current?.setAttribute("data-value",""),N(""),j(""),F(""),jg(q.reference.current),B()},he=m.id||m.name,ge=`${he}-shadow`,ie=Y.length===0;return v.jsxs(os,{...m,left:e,error:t,ref:b,form:m.form,loading:r,name:m.name,feedback:d,hideLeft:f,required:p,title:m.title,container:i,rightLabel:s,interactive:a,id:ge,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:te,children:[v.jsx(Du,{size:20}),v.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),L?v.jsx("button",{type:"button",onClick:ve,className:"p-2 transition-colors link:text-danger md:p-1",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[v.jsx("input",{"data-shadow":"true",...D({...m,onFocus:ce,pattern:ne,onChange:J,id:ge,name:ge,ref:q.setReference,onClick:H=>H.currentTarget.focus(),onKeyDown(H){if(H.key==="Escape")return H.currentTarget.blur(),B();if(C){if(H.key==="ArrowDown"){let $=ze.number(z)?z+1:0;return $>Y.length-1&&($=0),x.current?.scrollIntoView({index:$}),M($)}if(H.key==="ArrowUp"){let $=ze.number(z)?z-1:Y.length-1;return $<0&&($=Y.length-1),x.current?.scrollIntoView({index:$}),M($)}if(H.key==="Enter"){if(z!==null&&Y[z])return H.preventDefault(),fe(Y[z],z);if(Y.length===1)return H.preventDefault(),fe(Y[0],0)}}}}),"data-value":L,"data-error":!!t,"data-name":he,"data-target":he,required:p,value:C?O:o.length===0?"":_||L,"aria-autocomplete":"list",autoComplete:"off",className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",m.className)}),v.jsx("input",{id:he,name:he,type:"hidden","data-origin":he,ref:h,required:p,defaultValue:m.value||L||void 0}),v.jsx(to,{preserveTabOrder:!0,children:C?v.jsx(Ho,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.jsxs(Be.div,{...ee({ref:dr(R,q.setFloating),style:{...ue.styles,left:se,top:oe??0,position:W,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:ie?"auto":I},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!C)return w(0);const $=q.floating.current.querySelectorAll("li").item(0),re=($?$.getBoundingClientRect().height:_i)*Y.length;return Po.flushSync(()=>w(re+10))},children:[ie?v.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||S.autocompleteEmpty})}):null,v.jsx(Mp,{overscan:40,ref:x,hidden:ie,data:Y,defaultItemHeight:_i,components:O5,scrollerRef:H=>{y.current=H},className:"max-h-full overscroll-contain rounded-lg border-floating bg-floating-background p-0 text-foreground",itemContent:(H,$)=>{const re=$.Render??C5,me=L===$.value||L===$.label,Ce=z===H,Me=$.label??$.value;return v.jsx("button",{"data-value":$.value,...Q({ref:Ne=>{P.current[H]=Ne},role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":$.disabled,onClick:()=>fe($,H),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${me?"bg-primary-hover text-primary-foreground":""} ${Ce?"bg-floating-hover text-floating-foreground":""}`}),children:v.jsx(re,{...m,label:$.label,value:$.value,children:Me})})}})]})}):null})]})});class Rn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Rn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new Rn(this);return t?t(n):n}static from(t,n){return new Rn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(Rn.from(t,n).values())}toArray(){return Array.from(this.values())}}const GC=40,D5=e=>v.jsx(T.Fragment,{children:e.children}),M5={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},KC=[],N5=T.forwardRef(function(t,n){return v.jsx(Be.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:v.jsx(Dn,{children:t.children})})}),F5=T.forwardRef(function({item:t,context:n,...r},o){return v.jsx(Be.li,{...r,ref:o,className:"last:rounded-t-lg"})}),L5={List:N5,Item:F5},$5=e=>{const t=kt(),n=T.useRef(null),r=T.Children.count(e.children),[o,i]=T.useState(!1);return T.useEffect(()=>{if(n.current===null)return;const s=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>s.width)return i(!0)},[r]),v.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?v.jsxs(ha,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},V5=T.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:s,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:g=!1,onChangeOptions:m,...h},y)=>{const b=T.useMemo(()=>new Rn(r.map(H=>[H.value,H])),[r]),x=T.useRef(null),E=T.useRef(null),S=h.value??h.defaultValue??KC,I=kt(),[w,C]=T.useState(0),[A,O]=T.useState(!1),[N,L]=T.useState(""),[j,_]=T.useState(()=>{const H=new Rn;return S.forEach($=>{const re=b.get($);return re?H.set($,re):void 0}),H}),F=T.useMemo(()=>Array.from(j.keys()),[j]),[z,M]=T.useState(()=>{const H=new Set(S);return r.reduce(($,re)=>H.has(re.value)?[...$,re.label??re.value]:$,[])??S}),[P,R]=T.useState(null),V=T.useRef(KC),G=g&&N!==""?[{value:N,label:N,"data-dynamic":"true"},...r]:r,U=N.length===0?G:Zh(G,"value",[{key:"value",value:N},{key:"label",value:N}]),B=zC(A,"block-only"),Y=U.filter(H=>H.hidden!==!0),ne=Y.length===0,{x:se,y:oe,strategy:W,refs:q,context:X}=Cr({open:A,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:O,whileElementsMounted:zo,middleware:[Qi(4),Xv({padding:10,elementContext:"reference",apply(H){const re=H.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,me=Hi(q.reference.current,window.innerHeight),Ce=Math.min(re<GC?me:re,me,H.availableHeight),Me=Y.length===0?GC:Math.min(Ce,me,re),Ne=`${x.current.getBoundingClientRect().width}px`;Object.assign(H.elements.floating.style,{width:Ne,maxWidth:Ne,height:Me})}})]}),ue=Dy(X,M5),{getReferenceProps:D,getFloatingProps:ee,getItemProps:Q}=kr([ro(X,{role:"listbox"}),no(X),Ja(X,{cols:0,listRef:V,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:H=>R($=>H??$)})]);T.useEffect(()=>{if(!A)return C(0);const H=q.reference;if(H.current===null)return;const $=Hi(H.current,window.innerHeight);setTimeout(()=>C(Math.min($,Y.length*40)),100)},[N,A,q.reference]),T.useEffect(()=>{h.value&&_(new Rn(h.value.map(H=>[H,b.get(H)])))},[h.value,b]),T.useEffect(()=>{const H=q.reference.current;if(H)return Bi(H)},[]);const fe=(H,$)=>{const re=j.clone(Me=>Me.has(H.value)?Me.remove(H.value):Me.set(H.value,H));_(re);const me=q.reference.current;if(!me)return;const Ce=re.map(Me=>Me.value);me?.setAttribute("data-value",JSON.stringify(Ce)),m&&m(Ce),M(Me=>Me.concat(H.label??"")),L(""),R($)},J=H=>{const $=H.target.value;return L($),!A&&$===""?O(!0):(H.target.name=h.name||"",$?O(!0):void 0)},te=()=>{O(!0),L(""),q.reference.current?.focus()},ce=()=>{O(!0),L("")},ve=()=>{q.reference.current?.setAttribute("data-value","[]"),L(""),O(!1),_(new Rn),m?.([])},he=h.id||h.name,ge=j.map((H,$)=>v.jsx(ha,{size:"small",icon:v.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:re=>{re.preventDefault(),re.stopPropagation(),fe(H,$)},children:v.jsx(No,{size:14})}),children:H.label??H.value},`MultiSelect-${H.value}-x`)),ie={height:ne?"0":j.size===0?w-49:w-86};return v.jsxs(os,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:f,required:p,title:h.title,container:o,rightLabel:i,interactive:s,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:te,children:[v.jsx(Du,{size:20}),v.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),j?v.jsx("button",{type:"button",onClick:ve,className:"transition-colors link:text-danger",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[v.jsxs("ul",{...D({...h,onFocus:ce,id:`${he}-shadow`,name:`${he}-shadow`,ref:q.setReference}),tabIndex:0,role:"button","data-name":he,"data-target":he,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":F.join(","),className:Ie("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:[F.length>0?null:v.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),v.jsx($5,{label:c,children:ge})]}),v.jsx("input",{id:he,name:he,type:"hidden","data-origin":he,ref:y,required:p,defaultValue:h.value||F||void 0}),v.jsx(to,{preserveTabOrder:!0,children:A?v.jsx(Ty,{lockScroll:!0,children:v.jsx(Ho,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.jsxs("div",{...ee({ref:q.setFloating,style:{...ue.styles,top:oe??0,position:W,left:se,height:w-(F.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[v.jsx("input",{autoFocus:!0,value:N,onChange:J,title:h.title,placeholder:I.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:H=>{if(H.key==="ArrowDown"){let $=P+1;return $>Y.length-1&&($=0),E.current?.scrollIntoView({index:$}),R($)}if(H.key==="ArrowUp"){let $=P-1;return $<0&&($=Y.length-1),E.current?.scrollIntoView({index:$}),R($)}if(H.key==="Escape")return H.currentTarget.blur(),O(!1);if(H.key==="Enter"){if(P!==null&&Y[P])return H.preventDefault(),fe(Y[P],P);if(Y.length===1)return H.preventDefault(),fe(Y[0],0)}}}),ne?v.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:a||I.autocompleteEmpty})}):null,ne?null:v.jsx(Be.div,{initial:!1,"data-floating":"true",ref:B,animate:{height:ne?"auto":w},style:ie,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!A)return C(0);const $=q.floating.current.querySelectorAll("li").item(0),re=($?$.getBoundingClientRect().height:40)*Y.length;return Po.flushSync(()=>C(re+2))},children:v.jsx(Mp,{ref:E,hidden:ne,data:Y,components:L5,style:ie,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(H,$)=>{const re=$.Render??D5,me=j.has($.value)||j.has($.label??""),Ce=P===H,Me=$.label??$.value;return v.jsxs("button",{"data-value":$.value,...Q({ref:Ne=>{V.current[H]=Ne},role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":$.disabled,onClick:()=>fe($,H)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${me||Ce?"bg-floating-hover text-floating-foreground":""}`,children:[v.jsx(Kp,{onChange:md,checked:me,"aria-checked":me,onClick:Ne=>{Ne.stopPropagation(),fe($,H)}}),v.jsx(re,{...h,label:$.label,value:$.value,children:Me})]})}})}),v.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:j.size===0?v.jsx(ha,{theme:"muted",size:"small",children:I.autocompleteEmpty}):ge})]})})}):null})]})}),R5=e=>{const[t,n]=T.useState(0);return T.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},j5={Item:T.forwardRef(function(t,n){return v.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:T.forwardRef(function(t,n){return v.jsx("ul",{...t,ref:n,className:"space-y-3"})})},z5=e=>{const t=T.useRef(null),n=R5(t);return v.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[v.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[v.jsx("header",{className:"border-b border-card-border pb-2"}),v.jsxs("div",{className:"px-8 space-y-2",children:[v.jsx(Uo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),v.jsx(Mp,{height:n,useWindowScroll:!0,data:e.source,components:j5,itemContent:(r,o)=>v.jsx(T.Fragment,{children:v.jsx(Kp,{children:v.jsx(e.Item,{data:o})})})})]})]}),v.jsx("div",{children:v.jsx(el,{children:v.jsx(Mu,{})})}),v.jsx("div",{})]})};function B5(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const H5=({children:e,...t})=>{const n=Pr(t.onIntersection),r=T.useRef(null),[o,i]=T.useState(()=>r.current===null?!1:B5(r.current));return T.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return a.observe(s),()=>a.disconnect()},[]),v.jsx("div",{...t,ref:r,children:o?e:null})},W5=e=>{const[t,n]=T.useState(!1),r=()=>n(!0),o=()=>n(!1);return T.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},q5=Ao("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification",{variants:{theme:{default:"border-card-border bg-card-background text-foreground",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border"}},defaultVariants:{theme:"default"}}),YC=T.createContext(()=>{throw new Error("Not implemented")}),U5=()=>T.useContext(YC),ZC={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},G5=T.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",s=q5({theme:t.theme||"default"});return v.jsx(WD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:v.jsx(Be.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:ZC[t.reversedIndex]||ZC.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:v.jsxs("div",{className:s,children:[v.jsxs("div",{className:"flex flex-col p-4",children:[t.title?v.jsx(qD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:t.title}):null,v.jsx(UD,{className:"select-text truncate",children:t.text})]}),r?v.jsx(GD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:v.jsx(No,{className:"size-5"})}):null]})})})});function K5({children:e,max:t=5,duration:n=5e3}){const r=T.useRef(null),o=W5(r),[i,s]=T.useState([]),a=T.useCallback(()=>s([]),[]);T.useEffect(()=>a,[a]);const l=T.useCallback((c,u)=>{const d=window.crypto.randomUUID();return s(p=>{const g=[...p,{...u,id:d,text:c}];return g.length>t?g.slice(g.length-t,g.length+1):g}),{clear:a,close:()=>s(p=>p.filter(g=>g.id!==d))}},[t]);return v.jsxs(BD,{duration:n,swipeThreshold:150,children:[v.jsx(YC.Provider,{value:l,children:e}),v.jsx(Be.ol,{children:v.jsx(Dn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const f=()=>s(p=>p.filter(g=>g.id!==c.id));return T.createElement(G5,{...c,hover:o,index:u,key:c.id,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})})}),v.jsx(HD,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const Y5=/Mac|iPod|iPhone|iPad/,Cc=()=>Y5.test(navigator.userAgent),Z5=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Cc()?"Meta":"Control":n==="Hyper"?Cc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),XC=e=>e.map(t=>t.trim()).join("+");class X5{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=XC(Z5(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const a=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?a.toUpperCase():a.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const s=XC(Array.from(i));this.combinations.forEach(a=>{if(a.key===s)return r.preventDefault(),void a.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const Q5=e=>(e=e.trim(),e==="Alt"?Cc()?v.jsx(KP,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Cc()?v.jsx(BP,{"aria-label":"Command",size:14}):"Ctrl":e),J5=e=>{const t=e.value.trim().split("+");return v.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return v.jsxs(T.Fragment,{children:[v.jsx("kbd",{"aria-label":n,children:Q5(n)}),o?null:v.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},e9=e=>v.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Iu(e.item.title)?v.jsx(e.item.title,{text:e.text}):e.item.title}),t9=T.forwardRef((e,t)=>{const n=T.useId(),r=e.active,o=e.item;return o.type==="group"?v.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:v.jsx(e9,{text:e.text,item:o})}):o.type!=="shortcut"?v.jsx(T.Fragment,{}):v.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[v.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,v.jsx("span",{children:Iu(o.title)?v.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?v.jsx(J5,{value:o.shortcut}):null]})}),n9=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(a=>({...a,title:ze.function(a.title)?a.title({text:t}):a.title})),o=r.reduce((a,l)=>{const c=ze.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&a.push({...l,enabled:c}),a},[]),i=Zh(o,"title",n),s=r.filter(a=>ze.function(a.enabled)?a.enabled({text:t}):!1);return Rn.unique(i.concat(s),a=>a.title)},r9=[0,0,0,0,0],o9=e=>{const t=e.bind??"Mod + k",n=T.useRef([]),r=kt(),[o,i]=T.useState(""),s=Pr(o),a=T.useId(),l=T.useRef(null),[c,u]=T.useState(null),d=Cr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:zo}),f=Ja(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:b=>u(x=>ze.number(b)?b:e.open?x??0:null)}),{getItemProps:p}=kr([f]),g=e.commands.flatMap(b=>b.type==="group"?[b,...b.items]:[b]),m=n9(g,o),h=o===""?g:[{type:"group",title:"Results",items:[]},...m.filter(b=>b.type!=="group")];T.useEffect(()=>{const b=new X5;return b.add(t,()=>e.onChangeVisibility?.(!0)),g.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&b.add(x.shortcut,E=>x.action({event:E,text:s.current,setOpen:e.onChangeVisibility}))}),b.register()},[t]);const y=e.Icon??av;return v.jsx(T.Fragment,{children:v.jsxs(Eh,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[v.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[v.jsx("div",{className:"flex size-10 items-center justify-center",children:v.jsx(y,{Default:av,text:o,size:16})}),v.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:b=>i(b.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:b=>{if((b.key==="ArrowDown"||b.key==="ArrowUp")&&c!==null&&n.current[c]?.scrollIntoView({block:"start",inline:"start"}),b.key==="Enter"){if(c!==null&&h[c]){b.preventDefault();const x=h[c],E=b.currentTarget.value;if(x.type==="shortcut")return x.action({event:b,setOpen:e.onChangeVisibility,text:E})}if(h.length===1){b.preventDefault();const x=h[0],E=b.currentTarget.value;if(x.type==="shortcut")return x.action({event:b,setOpen:e.onChangeVisibility,text:E})}}}})]}),e.loading?v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[v.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),r9.map((b,x)=>v.jsx("li",{className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:$p},`${a}-${x}-skeleton-index`))]}):v.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[h.map((b,x)=>T.createElement(t9,{...p({onMouseEnter:()=>u(x),ref(E){n.current[x]=E},onClick(E){E.preventDefault(),e.onChangeVisibility(!1),d.refs.domReference.current?.focus(),b.type==="shortcut"&&b.action({event:E,setOpen:e.onChangeVisibility,text:o})}}),item:b,text:o,active:c===x,key:`${a}-${b.type}-${x}`})),h.length===1?v.jsx("div",{className:Ie("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&ze.number(c)?v.jsx(e.Preview,{command:h[c],text:o}):null]}),e.footer?v.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},i9=["INPUT","SELECT"],QC=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{i9.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Xh,JC;function Qh(){if(JC)return Xh;JC=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Xh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Xh}var Jh,ek;function tk(){if(ek)return Jh;ek=1;var e=Qh(),t=xg(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,C){return o.set(w,C),w},s=function(w){return o.has(w)},a=function(w){return o.get(w)},l=function(w,C){o.set(w,C)},c=(function(){for(var I=[],w=0;w<256;++w)I.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return I})(),u=function(w){for(;w.length>1;){var C=w.pop(),A=C.obj[C.prop];if(r(A)){for(var O=[],N=0;N<A.length;++N)typeof A[N]<"u"&&O.push(A[N]);C.obj[C.prop]=O}}},d=function(w,C){for(var A=C&&C.plainObjects?{__proto__:null}:{},O=0;O<w.length;++O)typeof w[O]<"u"&&(A[O]=w[O]);return A},f=function I(w,C,A){if(!C)return w;if(typeof C!="object"&&typeof C!="function"){if(r(w))w.push(C);else if(w&&typeof w=="object")if(s(w)){var O=a(w)+1;w[O]=C,l(w,O)}else(A&&(A.plainObjects||A.allowPrototypes)||!n.call(Object.prototype,C))&&(w[C]=!0);else return[w,C];return w}if(!w||typeof w!="object"){if(s(C)){for(var N=Object.keys(C),L=A&&A.plainObjects?{__proto__:null,0:w}:{0:w},j=0;j<N.length;j++){var _=parseInt(N[j],10);L[_+1]=C[N[j]]}return i(L,a(C)+1)}return[w].concat(C)}var F=w;return r(w)&&!r(C)&&(F=d(w,A)),r(w)&&r(C)?(C.forEach(function(z,M){if(n.call(w,M)){var P=w[M];P&&typeof P=="object"&&z&&typeof z=="object"?w[M]=I(P,z,A):w.push(z)}else w[M]=z}),w):Object.keys(C).reduce(function(z,M){var P=C[M];return n.call(z,M)?z[M]=I(z[M],P,A):z[M]=P,z},F)},p=function(w,C){return Object.keys(C).reduce(function(A,O){return A[O]=C[O],A},w)},g=function(I,w,C){var A=I.replace(/\+/g," ");if(C==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch{return A}},m=1024,h=function(w,C,A,O,N){if(w.length===0)return w;var L=w;if(typeof w=="symbol"?L=Symbol.prototype.toString.call(w):typeof w!="string"&&(L=String(w)),A==="iso-8859-1")return escape(L).replace(/%u[0-9a-f]{4}/gi,function(R){return"%26%23"+parseInt(R.slice(2),16)+"%3B"});for(var j="",_=0;_<L.length;_+=m){for(var F=L.length>=m?L.slice(_,_+m):L,z=[],M=0;M<F.length;++M){var P=F.charCodeAt(M);if(P===45||P===46||P===95||P===126||P>=48&&P<=57||P>=65&&P<=90||P>=97&&P<=122||N===e.RFC1738&&(P===40||P===41)){z[z.length]=F.charAt(M);continue}if(P<128){z[z.length]=c[P];continue}if(P<2048){z[z.length]=c[192|P>>6]+c[128|P&63];continue}if(P<55296||P>=57344){z[z.length]=c[224|P>>12]+c[128|P>>6&63]+c[128|P&63];continue}M+=1,P=65536+((P&1023)<<10|F.charCodeAt(M)&1023),z[z.length]=c[240|P>>18]+c[128|P>>12&63]+c[128|P>>6&63]+c[128|P&63]}j+=z.join("")}return j},y=function(w){for(var C=[{obj:{o:w},prop:"o"}],A=[],O=0;O<C.length;++O)for(var N=C[O],L=N.obj[N.prop],j=Object.keys(L),_=0;_<j.length;++_){var F=j[_],z=L[F];typeof z=="object"&&z!==null&&A.indexOf(z)===-1&&(C.push({obj:L,prop:F}),A.push(z))}return u(C),w},b=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},x=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},E=function(w,C,A,O){if(s(w)){var N=a(w)+1;return w[N]=C,l(w,N),w}var L=[].concat(w,C);return L.length>A?i(d(L,{plainObjects:O}),L.length-1):L},S=function(w,C){if(r(w)){for(var A=[],O=0;O<w.length;O+=1)A.push(C(w[O]));return A}return C(w)};return Jh={arrayToObject:d,assign:p,combine:E,compact:y,decode:g,encode:h,isBuffer:x,isOverflow:s,isRegExp:b,maybeMap:S,merge:f},Jh}var em,nk;function s9(){if(nk)return em;nk=1;var e=xg(),t=tk(),n=Qh(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,y){return h+"["+y+"]"},repeat:function(h){return h}},i=Array.isArray,s=Array.prototype.push,a=function(m,h){s.apply(m,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},f={},p=function m(h,y,b,x,E,S,I,w,C,A,O,N,L,j,_,F,z,M){for(var P=h,R=M,V=0,G=!1;(R=R.get(f))!==void 0&&!G;){var U=R.get(h);if(V+=1,typeof U<"u"){if(U===V)throw new RangeError("Cyclic object value");G=!0}typeof R.get(f)>"u"&&(V=0)}if(typeof A=="function"?P=A(y,P):P instanceof Date?P=L(P):b==="comma"&&i(P)&&(P=t.maybeMap(P,function(fe){return fe instanceof Date?L(fe):fe})),P===null){if(S)return C&&!F?C(y,u.encoder,z,"key",j):y;P=""}if(d(P)||t.isBuffer(P)){if(C){var B=F?y:C(y,u.encoder,z,"key",j);return[_(B)+"="+_(C(P,u.encoder,z,"value",j))]}return[_(y)+"="+_(String(P))]}var Y=[];if(typeof P>"u")return Y;var ne;if(b==="comma"&&i(P))F&&C&&(P=t.maybeMap(P,C)),ne=[{value:P.length>0?P.join(",")||null:void 0}];else if(i(A))ne=A;else{var se=Object.keys(P);ne=O?se.sort(O):se}var oe=w?String(y).replace(/\./g,"%2E"):String(y),W=x&&i(P)&&P.length===1?oe+"[]":oe;if(E&&i(P)&&P.length===0)return W+"[]";for(var q=0;q<ne.length;++q){var X=ne[q],ue=typeof X=="object"&&X&&typeof X.value<"u"?X.value:P[X];if(!(I&&ue===null)){var D=N&&w?String(X).replace(/\./g,"%2E"):String(X),ee=i(P)?typeof b=="function"?b(W,D):W:W+(N?"."+D:"["+D+"]");M.set(h,V);var Q=e();Q.set(f,M),a(Y,m(ue,ee,b,x,E,S,I,w,b==="comma"&&F&&i(P)?null:C,A,O,N,L,j,_,F,z,Q))}}return Y},g=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");b=h.format}var x=n.formatters[b],E=u.filter;(typeof h.filter=="function"||i(h.filter))&&(E=h.filter);var S;if(h.arrayFormat in o?S=h.arrayFormat:"indices"in h?S=h.indices?"indices":"repeat":S=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:S,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:E,format:b,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return em=function(m,h){var y=m,b=g(h),x,E;typeof b.filter=="function"?(E=b.filter,y=E("",y)):i(b.filter)&&(E=b.filter,x=E);var S=[];if(typeof y!="object"||y===null)return"";var I=o[b.arrayFormat],w=I==="comma"&&b.commaRoundTrip;x||(x=Object.keys(y)),b.sort&&x.sort(b.sort);for(var C=e(),A=0;A<x.length;++A){var O=x[A],N=y[O];b.skipNulls&&N===null||a(S,p(N,O,I,w,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,C))}var L=S.join(b.delimiter),j=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?j+="utf8=%26%2310003%3B&":j+="utf8=%E2%9C%93&"),L.length>0?j+L:""},em}var tm,rk;function a9(){if(rk)return tm;rk=1;var e=tk(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(g,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,g,m){if(p&&typeof p=="string"&&g.comma&&p.indexOf(",")>-1)return p.split(",");if(g.throwOnLimitExceeded&&m>=g.arrayLimit)throw new RangeError("Array limit exceeded. Only "+g.arrayLimit+" element"+(g.arrayLimit===1?"":"s")+" allowed in an array.");return p},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(g,m){var h={__proto__:null},y=m.ignoreQueryPrefix?g.replace(/^\?/,""):g;y=y.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=m.parameterLimit===1/0?void 0:m.parameterLimit,x=y.split(m.delimiter,m.throwOnLimitExceeded?b+1:b);if(m.throwOnLimitExceeded&&x.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var E=-1,S,I=m.charset;if(m.charsetSentinel)for(S=0;S<x.length;++S)x[S].indexOf("utf8=")===0&&(x[S]===a?I="utf-8":x[S]===s&&(I="iso-8859-1"),E=S,S=x.length);for(S=0;S<x.length;++S)if(S!==E){var w=x[S],C=w.indexOf("]="),A=C===-1?w.indexOf("="):C+1,O,N;if(A===-1?(O=m.decoder(w,r.decoder,I,"key"),N=m.strictNullHandling?null:""):(O=m.decoder(w.slice(0,A),r.decoder,I,"key"),O!==null&&(N=e.maybeMap(i(w.slice(A+1),m,n(h[O])?h[O].length:0),function(j){return m.decoder(j,r.decoder,I,"value")}))),N&&m.interpretNumericEntities&&I==="iso-8859-1"&&(N=o(String(N))),w.indexOf("[]=")>-1&&(N=n(N)?[N]:N),O!==null){var L=t.call(h,O);L&&m.duplicates==="combine"?h[O]=e.combine(h[O],N,m.arrayLimit,m.plainObjects):(!L||m.duplicates==="last")&&(h[O]=N)}}return h},c=function(p,g,m,h){var y=0;if(p.length>0&&p[p.length-1]==="[]"){var b=p.slice(0,-1).join("");y=Array.isArray(g)&&g[b]?g[b].length:0}for(var x=h?g:i(g,m,y),E=p.length-1;E>=0;--E){var S,I=p[E];if(I==="[]"&&m.parseArrays)e.isOverflow(x)?S=x:S=m.allowEmptyArrays&&(x===""||m.strictNullHandling&&x===null)?[]:e.combine([],x,m.arrayLimit,m.plainObjects);else{S=m.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,C=m.decodeDotInKeys?w.replace(/%2E/g,"."):w,A=parseInt(C,10);!m.parseArrays&&C===""?S={0:x}:!isNaN(A)&&I!==C&&String(A)===C&&A>=0&&m.parseArrays&&A<=m.arrayLimit?(S=[],S[A]=x):C!=="__proto__"&&(S[C]=x)}x=S}return x},u=function(g,m){var h=m.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g;if(m.depth<=0)return!m.plainObjects&&t.call(Object.prototype,h)&&!m.allowPrototypes?void 0:[h];var y=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=y.exec(h),E=x?h.slice(0,x.index):h,S=[];if(E){if(!m.plainObjects&&t.call(Object.prototype,E)&&!m.allowPrototypes)return;S.push(E)}for(var I=0;(x=b.exec(h))!==null&&I<m.depth;){I+=1;var w=x[1].slice(1,-1);if(!m.plainObjects&&t.call(Object.prototype,w)&&!m.allowPrototypes)return;S.push(x[1])}if(x){if(m.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+m.depth+" and strictDepth is true");S.push("["+h.slice(x.index)+"]")}return S},d=function(g,m,h,y){if(g){var b=u(g,h);if(b)return c(b,m,h,y)}},f=function(g){if(!g)return r;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.decodeDotInKeys<"u"&&typeof g.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(g.decoder!==null&&typeof g.decoder<"u"&&typeof g.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof g.throwOnLimitExceeded<"u"&&typeof g.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof g.charset>"u"?r.charset:g.charset,h=typeof g.duplicates>"u"?r.duplicates:g.duplicates;if(h!=="combine"&&h!=="first"&&h!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var y=typeof g.allowDots>"u"?g.decodeDotInKeys===!0?!0:r.allowDots:!!g.allowDots;return{allowDots:y,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof g.allowPrototypes=="boolean"?g.allowPrototypes:r.allowPrototypes,allowSparse:typeof g.allowSparse=="boolean"?g.allowSparse:r.allowSparse,arrayLimit:typeof g.arrayLimit=="number"?g.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:r.charsetSentinel,comma:typeof g.comma=="boolean"?g.comma:r.comma,decodeDotInKeys:typeof g.decodeDotInKeys=="boolean"?g.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof g.decoder=="function"?g.decoder:r.decoder,delimiter:typeof g.delimiter=="string"||e.isRegExp(g.delimiter)?g.delimiter:r.delimiter,depth:typeof g.depth=="number"||g.depth===!1?+g.depth:r.depth,duplicates:h,ignoreQueryPrefix:g.ignoreQueryPrefix===!0,interpretNumericEntities:typeof g.interpretNumericEntities=="boolean"?g.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof g.parameterLimit=="number"?g.parameterLimit:r.parameterLimit,parseArrays:g.parseArrays!==!1,plainObjects:typeof g.plainObjects=="boolean"?g.plainObjects:r.plainObjects,strictDepth:typeof g.strictDepth=="boolean"?!!g.strictDepth:r.strictDepth,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof g.throwOnLimitExceeded=="boolean"?g.throwOnLimitExceeded:!1}};return tm=function(p,g){var m=f(g);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var h=typeof p=="string"?l(p,m):p,y=m.plainObjects?{__proto__:null}:{},b=Object.keys(h),x=0;x<b.length;++x){var E=b[x],S=d(E,h[E],m,typeof p=="string");y=e.merge(y,S,m)}return m.allowSparse===!0?y:e.compact(y)},tm}var nm,ok;function l9(){if(ok)return nm;ok=1;var e=s9(),t=a9(),n=Qh();return nm={formats:n,parse:t,stringify:e},nm}var c9=l9(),Ze;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ze||(Ze={}));var ik;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ik||(ik={}));const Ee=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jr=e=>{switch(typeof e){case"undefined":return Ee.undefined;case"string":return Ee.string;case"number":return Number.isNaN(e)?Ee.nan:Ee.number;case"boolean":return Ee.boolean;case"function":return Ee.function;case"bigint":return Ee.bigint;case"symbol":return Ee.symbol;case"object":return Array.isArray(e)?Ee.array:e===null?Ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ee.promise:typeof Map<"u"&&e instanceof Map?Ee.map:typeof Set<"u"&&e instanceof Set?Ee.set:typeof Date<"u"&&e instanceof Date?Ee.date:Ee.object;default:return Ee.unknown}},pe=Ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class vr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof vr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}vr.create=e=>new vr(e);const rm=(e,t)=>{let n;switch(e.code){case pe.invalid_type:e.received===Ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case pe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ze.jsonStringifyReplacer)}`;break;case pe.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ze.joinValues(e.keys,", ")}`;break;case pe.invalid_union:n="Invalid input";break;case pe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ze.joinValues(e.options)}`;break;case pe.invalid_enum_value:n=`Invalid enum value. Expected ${Ze.joinValues(e.options)}, received '${e.received}'`;break;case pe.invalid_arguments:n="Invalid function arguments";break;case pe.invalid_return_type:n="Invalid function return type";break;case pe.invalid_date:n="Invalid date";break;case pe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ze.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case pe.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case pe.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case pe.custom:n="Invalid input";break;case pe.invalid_intersection_types:n="Intersection results could not be merged";break;case pe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case pe.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ze.assertNever(e)}return{message:n}};let u9=rm;function d9(){return u9}const f9=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function ye(e,t){const n=d9(),r=f9({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===rm?void 0:rm].filter(o=>!!o)});e.common.issues.push(r)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return _e;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return hn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return _e;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const _e=Object.freeze({status:"aborted"}),ia=e=>({status:"dirty",value:e}),Cn=e=>({status:"valid",value:e}),sk=e=>e.status==="aborted",ak=e=>e.status==="dirty",Di=e=>e.status==="valid",kc=e=>typeof Promise<"u"&&e instanceof Promise;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Te||(Te={}));class zr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const lk=(e,t)=>{if(Di(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new vr(e.common.issues);return this._error=n,this._error}}};function He(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}class Ue{get description(){return this._def.description}_getType(t){return jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hn,ctx:{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(kc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return lk(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return Di(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Di(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(kc(o)?o:Promise.resolve(o));return lk(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:pe.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Li({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Hr.create(this,this._def)}nullable(){return $i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return lr.create(this)}promise(){return Oc.create(this,this._def)}or(t){return Pc.create([this,t],this._def)}and(t){return Ac.create(this,t,this._def)}transform(t){return new Li({...He(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new sm({...He(this._def),innerType:this,defaultValue:n,typeName:De.ZodDefault})}brand(){return new F9({typeName:De.ZodBranded,type:this,...He(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new am({...He(this._def),innerType:this,catchValue:n,typeName:De.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return lm.create(this,t)}readonly(){return cm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const p9=/^c[^\s-]{8,}$/i,h9=/^[0-9a-z]+$/,m9=/^[0-9A-HJKMNP-TV-Z]{26}$/i,g9=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,v9=/^[a-z0-9_-]{21}$/i,y9=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,b9=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,x9=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,w9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let om;const S9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,E9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,T9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,C9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,k9=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,I9=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ck="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",P9=new RegExp(`^${ck}$`);function uk(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function A9(e){return new RegExp(`^${uk(e)}$`)}function O9(e){let t=`${ck}T${uk(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _9(e,t){return!!((t==="v4"||!t)&&S9.test(e)||(t==="v6"||!t)&&T9.test(e))}function D9(e,t){if(!y9.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function M9(e,t){return!!((t==="v4"||!t)&&E9.test(e)||(t==="v6"||!t)&&C9.test(e))}class Co extends Ue{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ee.string){const i=this._getOrReturnCtx(t);return ye(i,{code:pe.invalid_type,expected:Ee.string,received:i.parsedType}),_e}const r=new hn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?ye(o,{code:pe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ye(o,{code:pe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")x9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"email",code:pe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")om||(om=new RegExp(w9,"u")),om.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"emoji",code:pe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")g9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"uuid",code:pe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")v9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"nanoid",code:pe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")p9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid",code:pe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")h9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid2",code:pe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")m9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ulid",code:pe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ye(o,{validation:"url",code:pe.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"regex",code:pe.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?O9(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?P9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?A9(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?b9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"duration",code:pe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?_9(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ip",code:pe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?D9(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"jwt",code:pe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?M9(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cidr",code:pe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?k9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64",code:pe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?I9.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64url",code:pe.invalid_string,message:i.message}),r.dirty()):Ze.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:pe.invalid_string,...Te.errToObj(r)})}_addCheck(t){return new Co({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Te.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Te.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Te.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Te.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Te.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Te.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Te.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Te.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Te.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Te.errToObj(n)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new Co({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Co({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Co({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Co.create=e=>new Co({checks:[],typeName:De.ZodString,coerce:e?.coerce??!1,...He(e)});function N9(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}class Mi extends Ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ee.number){const i=this._getOrReturnCtx(t);return ye(i,{code:pe.invalid_type,expected:Ee.number,received:i.parsedType}),_e}let r;const o=new hn;for(const i of this._def.checks)i.kind==="int"?Ze.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:pe.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:pe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:pe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?N9(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:pe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:pe.not_finite,message:i.message}),o.dirty()):Ze.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,o){return new Mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(o)}]})}_addCheck(t){return new Mi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ze.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Mi.create=e=>new Mi({checks:[],typeName:De.ZodNumber,coerce:e?.coerce||!1,...He(e)});class sa extends Ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ee.bigint)return this._getInvalidInput(t);let r;const o=new hn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:pe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:pe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:pe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ze.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:pe.invalid_type,expected:Ee.bigint,received:n.parsedType}),_e}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,o){return new sa({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(o)}]})}_addCheck(t){return new sa({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}sa.create=e=>new sa({checks:[],typeName:De.ZodBigInt,coerce:e?.coerce??!1,...He(e)});class dk extends Ue{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ee.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:pe.invalid_type,expected:Ee.boolean,received:r.parsedType}),_e}return Cn(t.data)}}dk.create=e=>new dk({typeName:De.ZodBoolean,coerce:e?.coerce||!1,...He(e)});class Ic extends Ue{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ee.date){const i=this._getOrReturnCtx(t);return ye(i,{code:pe.invalid_type,expected:Ee.date,received:i.parsedType}),_e}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ye(i,{code:pe.invalid_date}),_e}const r=new hn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:pe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ze.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ic({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ic.create=e=>new Ic({checks:[],coerce:e?.coerce||!1,typeName:De.ZodDate,...He(e)});class fk extends Ue{_parse(t){if(this._getType(t)!==Ee.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:pe.invalid_type,expected:Ee.symbol,received:r.parsedType}),_e}return Cn(t.data)}}fk.create=e=>new fk({typeName:De.ZodSymbol,...He(e)});class pk extends Ue{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:pe.invalid_type,expected:Ee.undefined,received:r.parsedType}),_e}return Cn(t.data)}}pk.create=e=>new pk({typeName:De.ZodUndefined,...He(e)});class hk extends Ue{_parse(t){if(this._getType(t)!==Ee.null){const r=this._getOrReturnCtx(t);return ye(r,{code:pe.invalid_type,expected:Ee.null,received:r.parsedType}),_e}return Cn(t.data)}}hk.create=e=>new hk({typeName:De.ZodNull,...He(e)});class mk extends Ue{constructor(){super(...arguments),this._any=!0}_parse(t){return Cn(t.data)}}mk.create=e=>new mk({typeName:De.ZodAny,...He(e)});class gk extends Ue{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Cn(t.data)}}gk.create=e=>new gk({typeName:De.ZodUnknown,...He(e)});class Br extends Ue{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:pe.invalid_type,expected:Ee.never,received:n.parsedType}),_e}}Br.create=e=>new Br({typeName:De.ZodNever,...He(e)});class vk extends Ue{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:pe.invalid_type,expected:Ee.void,received:r.parsedType}),_e}return Cn(t.data)}}vk.create=e=>new vk({typeName:De.ZodVoid,...He(e)});class lr extends Ue{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ee.array)return ye(n,{code:pe.invalid_type,expected:Ee.array,received:n.parsedType}),_e;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(ye(n,{code:s?pe.too_big:pe.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ye(n,{code:pe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ye(n,{code:pe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new zr(n,s,n.path,a)))).then(s=>hn.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new zr(n,s,n.path,a)));return hn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new lr({...this._def,minLength:{value:t,message:Te.toString(n)}})}max(t,n){return new lr({...this._def,maxLength:{value:t,message:Te.toString(n)}})}length(t,n){return new lr({...this._def,exactLength:{value:t,message:Te.toString(n)}})}nonempty(t){return this.min(1,t)}}lr.create=(e,t)=>new lr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...He(t)});function Ni(e){if(e instanceof Rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hr.create(Ni(r))}return new Rt({...e._def,shape:()=>t})}else return e instanceof lr?new lr({...e._def,type:Ni(e.element)}):e instanceof Hr?Hr.create(Ni(e.unwrap())):e instanceof $i?$i.create(Ni(e.unwrap())):e instanceof ko?ko.create(e.items.map(t=>Ni(t))):e}class Rt extends Ue{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ze.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ee.object){const c=this._getOrReturnCtx(t);return ye(c,{code:pe.invalid_type,expected:Ee.object,received:c.parsedType}),_e}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Br&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new zr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(ye(o,{code:pe.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new zr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>hn.mergeObjectSync(r,c)):hn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Te.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:De.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const n={};for(const r of Ze.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Rt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Ze.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Rt({...this._def,shape:()=>n})}deepPartial(){return Ni(this)}partial(t){const n={};for(const r of Ze.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Rt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Ze.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hr;)i=i._def.innerType;n[r]=i}return new Rt({...this._def,shape:()=>n})}keyof(){return wk(Ze.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Br.create(),typeName:De.ZodObject,...He(t)}),Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Br.create(),typeName:De.ZodObject,...He(t)}),Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Br.create(),typeName:De.ZodObject,...He(t)});class Pc extends Ue{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new vr(a.ctx.common.issues));return ye(n,{code:pe.invalid_union,unionErrors:s}),_e}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new vr(l));return ye(n,{code:pe.invalid_union,unionErrors:a}),_e}}get options(){return this._def.options}}Pc.create=(e,t)=>new Pc({options:e,typeName:De.ZodUnion,...He(t)});function im(e,t){const n=jr(e),r=jr(t);if(e===t)return{valid:!0,data:e};if(n===Ee.object&&r===Ee.object){const o=Ze.objectKeys(t),i=Ze.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=im(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===Ee.array&&r===Ee.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=im(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ee.date&&r===Ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ac extends Ue{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(sk(i)||sk(s))return _e;const a=im(i.value,s.value);return a.valid?((ak(i)||ak(s))&&n.dirty(),{status:n.value,value:a.data}):(ye(r,{code:pe.invalid_intersection_types}),_e)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ac.create=(e,t,n)=>new Ac({left:e,right:t,typeName:De.ZodIntersection,...He(n)});class ko extends Ue{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.array)return ye(r,{code:pe.invalid_type,expected:Ee.array,received:r.parsedType}),_e;if(r.data.length<this._def.items.length)return ye(r,{code:pe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:pe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new zr(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>hn.mergeArray(n,s)):hn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ko({...this._def,rest:t})}}ko.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ko({items:e,typeName:De.ZodTuple,rest:null,...He(t)})};class yk extends Ue{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.map)return ye(r,{code:pe.invalid_type,expected:Ee.map,received:r.parsedType}),_e;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new zr(r,a,r.path,[c,"key"])),value:i._parse(new zr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return _e;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return _e;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}yk.create=(e,t,n)=>new yk({valueType:t,keyType:e,typeName:De.ZodMap,...He(n)});class aa extends Ue{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.set)return ye(r,{code:pe.invalid_type,expected:Ee.set,received:r.parsedType}),_e;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ye(r,{code:pe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ye(r,{code:pe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return _e;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new zr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new aa({...this._def,minSize:{value:t,message:Te.toString(n)}})}max(t,n){return new aa({...this._def,maxSize:{value:t,message:Te.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}aa.create=(e,t)=>new aa({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...He(t)});class bk extends Ue{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}bk.create=(e,t)=>new bk({getter:e,typeName:De.ZodLazy,...He(t)});class xk extends Ue{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:pe.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:t.data}}get value(){return this._def.value}}xk.create=(e,t)=>new xk({value:e,typeName:De.ZodLiteral,...He(t)});function wk(e,t){return new Fi({values:e,typeName:De.ZodEnum,...He(t)})}class Fi extends Ue{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:Ze.joinValues(r),received:n.parsedType,code:pe.invalid_type}),_e}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:pe.invalid_enum_value,options:r}),_e}return Cn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Fi.create(t,{...this._def,...n})}exclude(t,n=this._def){return Fi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Fi.create=wk;class Sk extends Ue{_parse(t){const n=Ze.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ee.string&&r.parsedType!==Ee.number){const o=Ze.objectValues(n);return ye(r,{expected:Ze.joinValues(o),received:r.parsedType,code:pe.invalid_type}),_e}if(this._cache||(this._cache=new Set(Ze.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Ze.objectValues(n);return ye(r,{received:r.data,code:pe.invalid_enum_value,options:o}),_e}return Cn(t.data)}get enum(){return this._def.values}}Sk.create=(e,t)=>new Sk({values:e,typeName:De.ZodNativeEnum,...He(t)});class Oc extends Ue{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ee.promise&&n.common.async===!1)return ye(n,{code:pe.invalid_type,expected:Ee.promise,received:n.parsedType}),_e;const r=n.parsedType===Ee.promise?n.data:Promise.resolve(n.data);return Cn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Oc.create=(e,t)=>new Oc({type:e,typeName:De.ZodPromise,...He(t)});class Li extends Ue{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{ye(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return _e;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?_e:l.status==="dirty"||n.value==="dirty"?ia(l.value):l});{if(n.value==="aborted")return _e;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?_e:a.status==="dirty"||n.value==="dirty"?ia(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?_e:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?_e:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Di(s))return _e;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Di(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):_e);Ze.assertNever(o)}}Li.create=(e,t,n)=>new Li({schema:e,typeName:De.ZodEffects,effect:t,...He(n)}),Li.createWithPreprocess=(e,t,n)=>new Li({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...He(n)});class Hr extends Ue{_parse(t){return this._getType(t)===Ee.undefined?Cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hr.create=(e,t)=>new Hr({innerType:e,typeName:De.ZodOptional,...He(t)});class $i extends Ue{_parse(t){return this._getType(t)===Ee.null?Cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$i.create=(e,t)=>new $i({innerType:e,typeName:De.ZodNullable,...He(t)});class sm extends Ue{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}sm.create=(e,t)=>new sm({innerType:e,typeName:De.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...He(t)});class am extends Ue{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return kc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new vr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new vr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}am.create=(e,t)=>new am({innerType:e,typeName:De.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...He(t)});class Ek extends Ue{_parse(t){if(this._getType(t)!==Ee.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:pe.invalid_type,expected:Ee.nan,received:r.parsedType}),_e}return{status:"valid",value:t.data}}}Ek.create=e=>new Ek({typeName:De.ZodNaN,...He(e)});class F9 extends Ue{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class lm extends Ue{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?_e:i.status==="dirty"?(n.dirty(),ia(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?_e:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new lm({in:t,out:n,typeName:De.ZodPipeline})}}class cm extends Ue{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Di(o)&&(o.value=Object.freeze(o.value)),o);return kc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}cm.create=(e,t)=>new cm({innerType:e,typeName:De.ZodReadonly,...He(t)});var De;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(De||(De={})),Br.create,lr.create,Pc.create,Ac.create,ko.create,Fi.create,Oc.create,Hr.create,$i.create;const L9=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},$9=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const s=t[o+1];e[i]=isNaN(Number(s))?{}:[]}e=e[i]}}},Tk=e=>e.replace(/\[(\d+)]/g,".$1").split("."),mn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Tk(t),o=structuredClone(e);return $9(o,r,n),o},V9=(e,t)=>e.localeCompare(t),Vi={},Ck=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return kk(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=Ck(e._def.innerType);return t==="ZodArray"?n??[]:n}},kk=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,Ck(n)])),Ik=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=Ik(i,o):n[r]=o||i)}return n},R9={sort:V9,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},Pk=e=>{const t=new FormData(e),n=new URLSearchParams(t);return c9.parse(n.toString(),R9)},Wr=(e,t)=>Tk(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),qr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),um=e=>{const t=e.dataset.target;if(!t)return qr(e);const n=document.querySelector(`[data-origin="${t}"]`);return qr(n||e)},j9={state:{},loading:!1,useOnChange:!1},Ak=e=>e.dataset.target||e.name,z9=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Hs.LocalStorage.get(t);return L9(n)?n:{}},clear:()=>{Hs.LocalStorage.delete(t)},set:n=>Hs.LocalStorage.set(t,n)}},B9=(e,t,n=j9)=>{const[r,o]=T.useState(null),i=T.useRef({}),[s,a]=T.useState(()=>ze.function(n?.state)?n.state():n?.state??kk(e)??{}),l=T.useCallback(x=>{const E=x.target,S=x.currentTarget;if(E.dataset.optional==="true")return;const w=Ak(E),C=um(E)||(S?qr(S):""),A=Wr(w,e);if(E.setAttribute("data-initialized","true"),A){const O=A.safeParse(C),N=O.success?void 0:O.error.issues[0]?.message??"";o(L=>mn(L??{},w,N))}},[e]),c=T.useCallback(x=>E=>{const S=E.currentTarget,I=Object.values(i.current).reduce((C,A)=>{const O=A.element,N=A.schema.safeParse(qr(O));if(O.dataset.ignore==="ignore"||N.success)return C;const L=N.error.issues[0]?.message;O.setAttribute("data-initialized","true");const j=O.dataset.name||O.name||"";return mn(C,j,L)},{}),w=ze.empty(I)?null:I;o(w),console.error(w),x?.({form:S,errors:w||{}})},[]),u=(x,E=Vi)=>{const S=Wr(x,e),I=w=>{if(!hc(w))return;a(A=>mn(A,x,w.toISOString())),o(A=>mn(A,x,void 0));const C=i.current[x].element;if(C){const A=C.getAttribute("data-origin"),O=document.querySelector(`input[data-target="${A}"]`);O&&O.setCustomValidity("")}E?.onChange?.(w)};return{...E,loading:n.loading,name:x,id:x,onChange:I,form:t,date:ze.string(s[x])?new Date(s[x]):s[x],required:E.required??!S.isOptional(),error:Hn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:S})}}},d=(x,E=Vi)=>{const S=Wr(x,e);return{...E,name:x,id:x,onChange:w=>{const C=w.target.value;a(A=>mn(A,x,C)),E?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),value:Hn(s,x,void 0)??"",required:E.required??!S.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:S}:void 0}},f=(x,E=Vi)=>{const S=Wr(x,e);return{...E,name:x,id:x,onChange:w=>{const C=w.target.checked;a(A=>mn(A??{},x,C)),E?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:E.required??!S.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:S}):void 0}},p=(x,E=Vi)=>{const S=Wr(x,e),I=w=>{w.persist?.();const C=w.target.value;E?.onChange?.(w),a(A=>mn(A,x,C))};return{...E,loading:n.loading,name:x,id:x,onChange:I,form:t,onInvalid:l,error:Hn(r,x,void 0),required:E.required??!S.isOptional(),value:Hn(s,x,void 0)||E?.value||"",type:ze.instance(S,Mi)?"number":E?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:S}}},g=(x,E=Vi)=>{const S=Wr(x,e);return{...E,name:x,id:x,onChangeOptions:w=>{a(C=>mn(C,x,w))},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:E.required??!S.isOptional(),value:Hn(s,x,void 0)||E?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:S})}},m=(x,E=Vi)=>{const S=Wr(x,e),I=S._def.typeName==="ZodNumber";return{...E,name:x,id:x,onChange:C=>{C.persist?.();const A=I?C.target.valueAsNumber:C.target.value;E?.onChange?.(C),a(O=>mn(O,x,A))},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:E.required??!S.isOptional(),type:I?"number":E?.type??"text",value:Hn(s,x,void 0)||E?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:S})}};T.useEffect(()=>{const x=Object.values(i.current).map(S=>{const I=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,w=S.schema.safeParse(qr(I)),C=L=>{const j=Ak(L.target);if(!j)return!1;const _=L.target,F=um(L.target)||(L.relatedTarget?qr(L.relatedTarget):""),z=S.schema.safeParse(F);if(_.setAttribute("value",F),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(ze.null(M))return null;const P=mn(M,j,void 0);return ze.empty(M)||ze.nil(M)||ze.empty(P)?null:P}),!1;if(I.required){const M=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(P=>{if(ze.null(P))return null;const R=mn(P,j,M||void 0);return ze.empty(R)?null:R})}return!1},A=new AbortController,O=I.getAttribute("data-trigger")||"blur";I.addEventListener(O,C,{signal:A.signal});const N=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:S,hasInitialError:N,unsubscribe:()=>A.abort()}});return x.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>x.forEach(S=>S.unsubscribe())});const h=x=>E=>{E.preventDefault();const S=E.currentTarget;let I=Pk(S);Array.from(t?document.querySelectorAll(`[form="${t}"]`):S.elements).forEach(N=>{if(N.tagName==="SELECT"){const L=N;I=mn(I,L.name,L.value)}if(N.tagName==="INPUT"){const L=N,j=um(L)||(L?qr(L):"");I=mn(I,L.dataset.target||L.name,j)}});const C=Ik(I,s),A=e.safeParse(C),O=()=>{QC(S),n.interceptor?.clear()};if(A.success){const N=JSON.stringify(A.data);return S.setAttribute("data-json",N),n.interceptor?.clear(),x?.(E,{form:S,event:E,reset:O,setErrors:o,errors:[],success:!0,data:A.data,json:A.data})}return console.group("useForm error"),console.info(A),console.info(A.error.issues),console.error(A.error),console.groupEnd(),S.reportValidity(),x?.(E,{form:S,json:I,event:E,reset:O,setErrors:o,data:I,success:!1,errors:A.error.issues.map(N=>({message:N.message,path:N.path.map(L=>String(L))}))})},y=x=>pd(s,x)||"",b=x=>({...x,id:t,name:t});return T.useEffect(()=>{n.interceptor&&n.interceptor?.set(s)},[s]),{get:y,input:m,state:s,errors:r,select:d,checkbox:f,onSubmit:h,setState:a,textarea:p,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:g,disabled:r!==null}},H9=e=>e?JSON.parse(e.getAttribute("data-json")):{},W9=e=>{const t=T.useRef(void 0);return T.useEffect(()=>{t.current=e},[e]),t.current},Ok={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},_k={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},Dk={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},q9={name:"dark",zIndex:Dk,rounded:Ok,spacing:_k,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(160,90%,5%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},U9={rounded:Ok,spacing:_k,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:Dk,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(210, 20%, 98%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},G9=q9,K9=U9,Y9=e=>{const t=T.useMemo(()=>({locale:e.locale,tweaks:{...Ta,...e.tweaks},parser:e.parser||wa.hsla,map:{...Ea,...e.map}}),[e]);return v.jsx(Lo.Provider,{value:t,children:e.children})};ae.Alert=Ej,ae.AnimatedList=aj,ae.AnimatedListItem=lj,ae.Autocomplete=_5,ae.Button=el,ae.Calendar=XT,ae.Card=Hl,ae.Checkbox=Kp,ae.ColType=yi,ae.Collapse=zS,ae.CommandPalette=o9,ae.ComponentsProvider=Y9,ae.Context=Lo,ae.DatePicker=tW,ae.Description=C4,ae.Dict=Rn,ae.Dropdown=vi,ae.Empty=IS,ae.Expand=A4,ae.FileUpload=w5,ae.Form=pP,ae.Info=k4,ae.Input=Uo,ae.InputFeedback=zy,ae.InputField=os,ae.Loading=P4,ae.Menu=kj,ae.MenuItem=Cj,ae.Modal=Eh,ae.MultiSelect=V5,ae.Notifications=K5,ae.PageHeader=I4,ae.PageTitle=ET,ae.Paragraph=T4,ae.Polymorph=an,ae.Progress=Y3,ae.Radiobox=Ij,ae.RenderOnView=H5,ae.Select=oo,ae.Slider=YD,ae.Spinner=TT,ae.Stats=Tj,ae.StatsCard=ij,ae.Step=bj,ae.Steps=xj,ae.Switch=ZD,ae.Tab=fj,ae.Table=oj,ae.Tabs=uj,ae.Tag=ha,ae.TaskList=E4,ae.Textarea=Pj,ae.Timeline=Z3,ae.TimelineItem=gc,ae.Toolbar=X3,ae.Tooltip=gd,ae.TransferList=z5,ae.createColumns=IR,ae.createCssProperties=nA,ae.createDesignTokens=lv,ae.createFormStorage=z9,ae.createOptionCols=jp,ae.createStyles=JP,ae.createTheme=tA,ae.createTokenStyles=rA,ae.css=Ie,ae.defaultDarkTheme=G9,ae.defaultLightTheme=K9,ae.defaultTranslations=Ea,ae.defaultTweaks=Ta,ae.dispatchInput=jg,ae.formReset=QC,ae.formToJson=Pk,ae.getCoords=cP,ae.getJsonForm=H9,ae.getModalScrollerRef=DR,ae.getRemainingSize=Hi,ae.getSchemaShape=Wr,ae.hasVerticalScroll=zg,ae.initializeInputDataset=Bi,ae.isMobile=jy,ae.isReactComponent=lP,ae.isReactFC=Iu,ae.isSsr=Ir,ae.mergeRefs=dr,ae.negate=x_,ae.noop=md,ae.parsers=wa,ae.path=pd,ae.reduceTokens=xr,ae.safeRegex=hd,ae.splitInto=Ry,ae.useColorParser=$S,ae.useForm=B9,ae.useLocale=_h,ae.useNotification=U5,ae.usePrevious=W9,ae.useReactive=DS,ae.useStableRef=Pr,ae.useStepContext=RS,ae.useSwipe=qT,ae.useTablePreferences=OR,ae.useTranslations=kt,ae.uuid=qo,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));
|
|
32
|
+
)`}return y.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});process.env.NODE_ENV!=="production"&&(JE.displayName="InternalBackdrop");const eT=I.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=qr(),s=i.useState("mounted"),a=i.useState("modal"),l=i.useState("open");return s||r?y.jsx(Ih.Provider,{value:r,children:y.jsxs(_E,{ref:n,...o,children:[s&&a===!0&&y.jsx(JE,{ref:i.context.internalBackdropRef,inert:QE(!l)}),t.children]})}):null});process.env.NODE_ENV!=="production"&&(eT.displayName="DialogPortal");let tT={},nT={},rT="";function lB(e){if(typeof document>"u")return!1;const t=nn(e);return Ft(t).innerWidth-t.documentElement.clientWidth>0}function cB(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=nn(e).documentElement,o={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY};r.style.scrollbarGutter="stable",r.style.overflowY="scroll";const i=r.offsetWidth;r.style.overflowY="hidden";const s=r.offsetWidth;return Object.assign(r.style,o),i===s}function uB(e){const t=nn(e),n=t.documentElement,r=t.body,o=so(n)?n:r,i=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=i}}function dB(e){const t=nn(e),n=t.documentElement,r=t.body,o=Ft(n);let i=0,s=0,a=!1;const l=ar.create();if(X_&&(o.visualViewport?.scale??1)!==1)return()=>{};function c(){const f=o.getComputedStyle(n),p=o.getComputedStyle(r),g=(f.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,tT={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},rT=n.style.scrollBehavior,nT={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const v=n.scrollHeight>n.clientHeight,b=n.scrollWidth>n.clientWidth,x=f.overflowY==="scroll"||p.overflowY==="scroll",E=f.overflowX==="scroll"||p.overflowX==="scroll",S=Math.max(0,o.innerWidth-r.clientWidth),O=Math.max(0,o.innerHeight-r.clientHeight),w=parseFloat(p.marginTop)+parseFloat(p.marginBottom),C=parseFloat(p.marginLeft)+parseFloat(p.marginRight),P=so(n)?n:r;if(a=cB(e),a){n.style.scrollbarGutter=g,P.style.overflowY="hidden",P.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:g,overflowY:"hidden",overflowX:"hidden"}),(v||x)&&(n.style.overflowY="scroll"),(b||E)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:w||O?`calc(100dvh - ${w+O}px)`:"100dvh",width:C||S?`calc(100vw - ${C+S}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,tT),Object.assign(r.style,nT),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=rT)}function d(){u(),l.request(c)}return c(),o.addEventListener("resize",d),()=>{l.cancel(),u(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",d)}}class fB{lockCount=0;restore=null;timeoutLock=Ur.create();timeoutUnlock=Ur.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=nn(t).documentElement,o=Ft(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=vn;return}const i=yb||!lB(t);this.restore=i?uB(t):dB(t)}}const pB=new fB;function hB(e=!0,t=null){We(()=>{if(e)return pB.acquire(t)},[e,t])}function mB(e){const t=I.useRef(""),n=I.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:I.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function gB(e){const[t,n]=I.useState(null),r=ke((a,l)=>{e||n(l||(yb?"touch":""))}),o=I.useCallback(()=>{n(null)},[]),{onClick:i,onPointerDown:s}=mB(r);return I.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:i,onPointerDown:s}}),[t,o,i,s])}function yB(e){const{store:t,parentContext:n,actionsRef:r}=e,o=t.useState("open"),i=t.useState("disablePointerDismissal"),s=t.useState("modal"),a=t.useState("popupElement"),{openMethod:l,triggerProps:c,reset:u}=gB(o);Xz(t);const{forceUnmount:d}=Qz(o,t,()=>{u()}),f=ke(_=>{const F=Qt(_);return F.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},F}),p=I.useCallback(()=>{t.setOpen(!1,f(M_))},[t,f]);I.useImperativeHandle(r,()=>({unmount:d,close:p}),[d,p]);const h=nB({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,g]=I.useState(0),v=m===0,b=oB(h),x=gz(h,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(_){if("button"in _&&_.button!==0||"touches"in _&&_.touches.length!==1)return!1;const F=pn(_);if(v&&!i){const j=F;return s&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===j||t.context.backdropRef.current===j||bt(j,a)&&!j?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:v});hB(o&&s===!0,a);const{getReferenceProps:E,getFloatingProps:S,getTriggerProps:O}=YE([b,x]);t.useContextCallback("onNestedDialogOpen",_=>{g(_+1)}),t.useContextCallback("onNestedDialogClose",()=>{g(0)}),I.useEffect(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!o&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&o&&n.onNestedDialogClose()}),[o,n,m]);const w=I.useMemo(()=>E(c),[E,c]),C=I.useMemo(()=>O(c),[O,c]),P=I.useMemo(()=>S(),[S]);t.useSyncedValues({openMethod:l,activeTriggerProps:w,inactiveTriggerProps:C,popupProps:P,floatingRootContext:h,nestedOpenDialogCount:m})}const vB={...tB,modal:ft(e=>e.modal),nested:ft(e=>e.nested),nestedOpenDialogCount:ft(e=>e.nestedOpenDialogCount),disablePointerDismissal:ft(e=>e.disablePointerDismissal),openMethod:ft(e=>e.openMethod),descriptionElementId:ft(e=>e.descriptionElementId),titleElementId:ft(e=>e.titleElementId),viewportElement:ft(e=>e.viewportElement),role:ft(e=>e.role)};class bB extends qE{constructor(t){super(xB(t),{popupRef:I.createRef(),backdropRef:I.createRef(),internalBackdropRef:I.createRef(),triggerElements:new GE,onOpenChange:void 0,onOpenChangeComplete:void 0},vB)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const o={open:t},i=n.trigger?.id??null;(i||t)&&(o.activeTriggerId=i,o.activeTriggerElement=n.trigger??null),this.update(o)}}function xB(e={}){return{...eB(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function wB(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,disablePointerDismissal:s=!1,modal:a=!0,actionsRef:l,handle:c,triggerId:u,defaultTriggerId:d=null}=e,f=qr(!0),p=!!f,h=sr(()=>c?.store??new bB({open:n??r,activeTriggerId:u!==void 0?u:d,modal:a,disablePointerDismissal:s,nested:p})).current;h.useControlledProp("open",n,r),h.useControlledProp("activeTriggerId",u,d),h.useSyncedValues({disablePointerDismissal:s,nested:p,modal:a}),h.useContextCallback("onOpenChange",o),h.useContextCallback("onOpenChangeComplete",i);const m=h.useState("payload");yB({store:h,actionsRef:l,parentContext:f?.store.context});const g=I.useMemo(()=>({store:h}),[h]);return y.jsx(fh.Provider,{value:g,children:typeof t=="function"?t({payload:m}):t})}let oT=(function(e){return e[e.open=Kn.open]="open",e[e.closed=Kn.closed]="closed",e[e.startingStyle=Kn.startingStyle]="startingStyle",e[e.endingStyle=Kn.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const SB={...ph,...hc,nested(e){return e?{[oT.nested]:""}:null},nestedDialogOpen(e){return e?{[oT.nestedDialogOpen]:""}:null}},iT=I.forwardRef(function(t,n){const{className:r,render:o,children:i,...s}=t,a=ZE(),{store:l}=qr(),c=l.useState("open"),u=l.useState("nested"),d=l.useState("transitionStatus"),f=l.useState("nestedOpenDialogCount"),p=l.useState("mounted"),h=f>0,m=I.useMemo(()=>({open:c,nested:u,transitionStatus:d,nestedDialogOpen:h}),[c,u,d,h]);return Rt("div",t,{enabled:a||p,state:m,ref:[n,l.useStateSetter("viewportElement")],stateAttributesMapping:SB,props:[{role:"presentation",hidden:!p,children:i},s]})});process.env.NODE_ENV!=="production"&&(iT.displayName="DialogViewport");const sT=I.forwardRef(function(t,n){const{render:r,className:o,id:i,...s}=t,{store:a}=qr(),l=ti(i);return a.useSyncedValueWithCleanup("titleElementId",l),Rt("h2",t,{ref:n,props:[{id:l},s]})});process.env.NODE_ENV!=="production"&&(sT.displayName="DialogTitle");const Oh=I.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,id:a,payload:l,handle:c,...u}=t,d=qr(!0),f=c?.store??d?.store;if(!f)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.":bn(79));const p=ti(a),h=f.useState("floatingRootContext"),m=f.useState("isOpenedByTrigger",p),g=I.useRef(null),{registerTrigger:v,isMountedByThisTrigger:b}=Zz(p,g,f,{payload:l}),{getButtonProps:x,buttonRef:E}=mh({disabled:i,native:s}),S=pz(h,{enabled:h!=null}),O=YE([S]),w=I.useMemo(()=>({disabled:i,open:m}),[i,m]),C=f.useState("triggerProps",b);return Rt("button",t,{state:w,ref:[E,n,v,g],props:[O.getReferenceProps(),C,{[tb]:"",id:p},u,x],stateAttributesMapping:Qj})});process.env.NODE_ENV!=="production"&&(Oh.displayName="DialogTrigger");const EB=(e,t)=>Fr()?t:window.matchMedia(e).matches,TB=(e,t=!0)=>{const[n,r]=T.useState(t);return T.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(EB(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},Dn="500ms",CB={exit:{x:["0%","-30%"],opacity:0,animationDuration:Dn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Dn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Dn}},kB={enter:{x:"0%",opacity:1,animationDuration:Dn},exit:{x:["0%","30%"],opacity:0,animationDuration:Dn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Dn}},Ph={drawer:e=>e==="left"?CB:kB,sheet:{enter:{opacity:1,y:"0%",animationDuration:Dn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Dn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Dn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Dn},enter:{opacity:1,scale:[1.05,1],animationDuration:Dn},initial:{opacity:.5,scale:.95,animationDuration:Dn,transition:{duration:.5,ease:"easeInOut"}}}},IB=Lo("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),Ah={top:0,left:0,right:0,bottom:0},Ec=e=>e*.6,OB=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,p=Ec(f);return d>=p?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,s=e.position==="right"?-r.delta.x:r.delta.x,a=Math.abs(i+s);return e.value.set(a)}};return y.jsx(Ye.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:Ah,whileDrag:{cursor:"grabbing"},className:Me("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?y.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Tc={drawer:"right",sheet:"none",dialog:"none"},PB=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Tc.drawer:Tc[o]:t?Tc[o]:Tc.sheet},_h=T.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:s,ariaTitle:a,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:p=!1,layoutId:h=void 0,overlayClassName:m="",type:g="dialog",position:v,overlayClickClose:b=!1,...x},E)=>{const S=T.useRef(null),O=T.useRef(null),w=T.useRef(null),C=T.useId(),P=T.useId(),_=TB("(min-width: 64rem)"),F=PB(_,p,g,v),j=_||p?Ph[g]:Ph.sheet,L=typeof j=="function"?j(F):j,A=_||p?g:"sheet",D=A!=="dialog",z=o,M=bi(void 0);T.useEffect(()=>M.set(void 0),[A,M]);const k=()=>s(!1);T.useImperativeHandle(E,()=>({floating:w.current}),[w]);const R=(W,oe)=>{const ie=O.current.getBoundingClientRect(),U=M.get()||ie.height,G=Math.abs(U-oe.delta.y),J=window.outerHeight,fe=Ec(J);return G>=fe?M.set(G):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),s?.(!1),setTimeout(()=>M.set(void 0),350))},$=(W,oe)=>{const ae=O.current;if(oe.delta.y<0&&oe.offset.y<0){ae.scrollTo({top:ae.scrollTop+Math.abs(oe.offset.y),behavior:"smooth"});return}const ie=ae.getBoundingClientRect(),U=M.get()||ie.height,G=Math.abs(U-oe.delta.y),J=window.outerHeight,fe=Ec(J);return G>=fe?M.set(G):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),s?.(!1),setTimeout(()=>M.set(void 0),350))},B=A==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:Ah,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:R,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},H=bi(void 0),q=bi(void 0);return y.jsxs(wB,{open:e,onOpenChange:s,disablePointerDismissal:!b,children:[o?y.jsx(T.Fragment,{children:r?y.jsx(Oh,{render:y.jsx(mE,{}),children:z}):y.jsx(Oh,{render:y.jsx(Ye.button,{layoutId:h,type:"button"}),children:z})}):null,y.jsx(Wn,{mode:"wait",initial:!1,children:e?y.jsxs(eT,{keepMounted:!1,children:[y.jsx(vE,{className:Me("fixed inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh]",A==="drawer"?"":"items-start justify-center p-10",m)}),y.jsx(iT,{className:Me("fixed inset-0 flex isolate z-overlay h-[100dvh]",A==="drawer"?"":"items-start justify-center p-10",m),children:y.jsx(ip,{reducedMotion:d?"user":"always",children:y.jsxs(XE,{render:y.jsx(Ye.div,{...x,...t?{"aria-labelledby":C,"aria-describedby":P}:{"aria-label":a},exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:h,variants:L,"data-component":"modal",ref:xr(O,w),style:A==="drawer"?{width:M}:{height:M},className:Me(IB({position:F,type:A}),l,"isolate overscroll-contain fixed",A==="dialog"?"max-w-[calc(100vw-3rem)]":"")}),children:[D&&u?y.jsx(OB,{onChange:s,value:M,sheet:A==="sheet",position:F,parent:O}):null,t?y.jsx(Ye.header,{...B,className:"relative w-full isolate",children:y.jsx(sT,{render:y.jsx("h2",{id:C,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border"}),children:t})}):null,y.jsx(Ye.section,{ref:S,"data-component":"modal-body",dragConstraints:Ah,drag:_?void 0:"y",onDrag:A==="sheet"?_?void 0:$:void 0,className:Me("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:()=>{q.set(void 0),H.set(void 0)},onTouchStart:W=>{const oe=W.changedTouches[0];H.set(oe.pageY),q.set(oe.pageY)},onTouchMove:W=>{const oe=W.changedTouches[0],ae=oe.pageY,ie=H.get();if(ie!==void 0&&ie<ae&&S.current?.scrollTop===0){const J=O.current.getBoundingClientRect(),fe=M.get()||J.height,N=(ie-ae)/10,ne=fe+N,te=window.outerHeight,re=Ec(te);ne<re&&s?.(!1),M.set(ne)}q.set(oe.pageY)},children:i}),n?y.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?y.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:y.jsx(wE,{render:y.jsx("button",{type:"button",onClick:k,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger"}),children:y.jsx(zo,{})})}):null]})})})]}):null})]})}),AB=e=>{const[t,n]=C1();return T.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:u2(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),y.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},_B=e=>y.jsx("p",{...e,className:Me("text-base leading-snug",e.className)}),MB=e=>y.jsx("p",{...e,className:Me("mb-kilo text-sm text-secondary",e.className)}),DB=e=>y.jsx("div",{className:Me(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:y.jsxs(T.Fragment,{children:[y.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),y.jsx("span",{className:`w-fit ${e.disabled?"text-disabled":""} ${e.row?"text-base":"text-lg"}`,children:e.children})]})}),aT=e=>y.jsxs("div",{children:[y.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),y.jsx("p",{className:"text-secondary typography",children:e.children})]}),NB=e=>y.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[y.jsx("div",{children:y.jsx(aT,{title:e.title,children:e.description})}),y.jsx("div",{className:"flex gap-kilo items-center",children:e.children})]}),lT=e=>y.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Me("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),FB=()=>y.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:y.jsx(lT,{})}),LB=e=>{const t=T.useRef(null),n=T.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=T.useState(e.open??!1);T.useEffect(()=>{s(e.open??!1)},[e.open]);const{context:a,refs:l}=Dr({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=fs(a,{enabled:e.disabled??!0}),u=mo(a,{role:"tooltip"}),d=ho(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Nr([c,u,d]);return y.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[y.jsx(ul,{...p(e),as:Ye.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:y.jsx(Ye.span,{layoutId:o,children:e.trigger})}),y.jsx(Wn,{children:i?y.jsx(po,{root:t,children:y.jsx(Zo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:y.jsx(Ye.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},cT=6048e5,VB=864e5,RB=6e4,$B=36e5,jB=1e3,uT=Symbol.for("constructDateFrom");function pt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&uT in e?e[uT](t):e instanceof Date?new e.constructor(t):new Date(t)}function tt(e,t){return pt(t||e,e)}function Cc(e,t,n){const r=tt(e,n?.in);return isNaN(t)?pt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function dT(e,t,n){const r=tt(e,n?.in);if(isNaN(t))return pt(e,NaN);if(!t)return r;const o=r.getDate(),i=pt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Di(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=tt(e,n?.in),d=o||r?dT(u,o+r*12):u,f=s||i?Cc(d,s+i*7):d,p=l+a*60,m=(c+p*60)*1e3;return pt(e,+f+m)}let zB={};function Io(){return zB}function hr(e,t){const n=Io(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=tt(e,t?.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Ni(e,t){return hr(e,{...t,weekStartsOn:1})}function fT(e,t){const n=tt(e,t?.in),r=n.getFullYear(),o=pt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Ni(o),s=pt(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=Ni(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function kc(e){const t=tt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ic(e,...t){const n=pt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Oo(e,t){const n=tt(e,t?.in);return n.setHours(0,0,0,0),n}function BB(e,t,n){const[r,o]=Ic(n?.in,e,t),i=Oo(r),s=Oo(o),a=+i-kc(i),l=+s-kc(s);return Math.round((a-l)/VB)}function HB(e,t){const n=fT(e,t),r=pt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ni(r)}function WB(e){return pt(e,Date.now())}function qB(e,t,n){const[r,o]=Ic(n?.in,e,t);return+Oo(r)==+Oo(o)}function UB(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Oc(e){return!(!UB(e)&&typeof e!="number"||isNaN(+tt(e)))}function GB(e,t){const[n,r]=Ic(e,t.start,t.end);return{start:n,end:r}}function pT(e,t){const{start:n,end:r}=GB(t?.in,e);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(pt(n,s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function hT(e,t){const n=tt(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function YB(e,t){const n=tt(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function KB(e,t){const n=Io(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=tt(e,t?.in),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const ZB={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"}},XB=(e,t,n)=>{let r;const o=ZB[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Mh(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const QB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},JB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},e4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},t4={date:Mh({formats:QB,defaultWidth:"full"}),time:Mh({formats:JB,defaultWidth:"full"}),dateTime:Mh({formats:e4,defaultWidth:"full"})},n4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r4=(e,t,n,r)=>n4[e];function ua(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const o4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},i4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s4={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"]},a4={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"]},l4={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"}},c4={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"}},u4={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ua({values:o4,defaultWidth:"wide"}),quarter:ua({values:i4,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ua({values:s4,defaultWidth:"wide"}),day:ua({values:a4,defaultWidth:"wide"}),dayPeriod:ua({values:l4,defaultWidth:"wide",formattingValues:c4,defaultFormattingWidth:"wide"})};function da(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?f4(a,d=>d.test(s)):d4(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function d4(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function f4(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function p4(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const h4=/^(\d+)(th|st|nd|rd)?/i,m4=/\d+/i,g4={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},y4={any:[/^b/i,/^(a|c)/i]},v4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},b4={any:[/1/i,/2/i,/3/i,/4/i]},x4={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},w4={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]},S4={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},E4={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]},T4={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},C4={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}},k4={ordinalNumber:p4({matchPattern:h4,parsePattern:m4,valueCallback:e=>parseInt(e,10)}),era:da({matchPatterns:g4,defaultMatchWidth:"wide",parsePatterns:y4,defaultParseWidth:"any"}),quarter:da({matchPatterns:v4,defaultMatchWidth:"wide",parsePatterns:b4,defaultParseWidth:"any",valueCallback:e=>e+1}),month:da({matchPatterns:x4,defaultMatchWidth:"wide",parsePatterns:w4,defaultParseWidth:"any"}),day:da({matchPatterns:S4,defaultMatchWidth:"wide",parsePatterns:E4,defaultParseWidth:"any"}),dayPeriod:da({matchPatterns:T4,defaultMatchWidth:"any",parsePatterns:C4,defaultParseWidth:"any"})},mT={code:"en-US",formatDistance:XB,formatLong:t4,formatRelative:r4,localize:u4,match:k4,options:{weekStartsOn:0,firstWeekContainsDate:1}};function I4(e,t){const n=tt(e,t?.in);return BB(n,YB(n))+1}function gT(e,t){const n=tt(e,t?.in),r=+Ni(n)-+HB(n);return Math.round(r/cT)+1}function Dh(e,t){const n=tt(e,t?.in),r=n.getFullYear(),o=Io(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=pt(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=hr(s,t),l=pt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=hr(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function O4(e,t){const n=Io(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Dh(e,t),i=pt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),hr(i,t)}function yT(e,t){const n=tt(e,t?.in),r=+hr(n,t)-+O4(n,t);return Math.round(r/cT)+1}function ht(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Kr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ht(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ht(n+1,2)},d(e,t){return ht(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ht(e.getHours()%12||12,t.length)},H(e,t){return ht(e.getHours(),t.length)},m(e,t){return ht(e.getMinutes(),t.length)},s(e,t){return ht(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ht(o,t.length)}},Fi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vT={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Kr.y(e,t)},Y:function(e,t,n,r){const o=Dh(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return ht(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):ht(i,t.length)},R:function(e,t){const n=fT(e);return ht(n,t.length)},u:function(e,t){const n=e.getFullYear();return ht(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ht(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ht(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Kr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ht(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=yT(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ht(o,t.length)},I:function(e,t,n){const r=gT(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ht(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Kr.d(e,t)},D:function(e,t,n){const r=I4(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ht(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ht(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ht(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ht(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Fi.noon:r===0?o=Fi.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Fi.evening:r>=12?o=Fi.afternoon:r>=4?o=Fi.morning:o=Fi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Kr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Kr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ht(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ht(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Kr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Kr.s(e,t)},S:function(e,t){return Kr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return xT(r);case"XXXX":case"XX":return Po(r);default:return Po(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return xT(r);case"xxxx":case"xx":return Po(r);default:return Po(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bT(r,":");default:return"GMT"+Po(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bT(r,":");default:return"GMT"+Po(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ht(r,t.length)},T:function(e,t,n){return ht(+e,t.length)}};function bT(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+ht(i,2)}function xT(e,t){return e%60===0?(e>0?"-":"+")+ht(Math.abs(e)/60,2):Po(e,t)}function Po(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ht(Math.trunc(r/60),2),i=ht(r%60,2);return n+o+t+i}const wT=(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"})}},ST=(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"})}},Nh={p:ST,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return wT(e,t);let i;switch(r){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}}",wT(r,t)).replace("{{time}}",ST(o,t))}},P4=/^D+$/,A4=/^Y+$/,_4=["D","DD","YY","YYYY"];function ET(e){return P4.test(e)}function TT(e){return A4.test(e)}function Fh(e,t,n){const r=M4(e,t,n);if(console.warn(r),_4.includes(e))throw new RangeError(r)}function M4(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const D4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,N4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,F4=/^'([^]*?)'?$/,L4=/''/g,V4=/[a-zA-Z]/;function Lh(e,t,n){const r=Io(),o=r.locale??mT,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=tt(e,n?.in);if(!Oc(a))throw new RangeError("Invalid time value");let l=t.match(N4).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Nh[d];return f(u,o.formatLong)}return u}).join("").match(D4).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:R4(u)};if(vT[d])return{isToken:!0,value:u};if(d.match(V4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(TT(d)||ET(d))&&Fh(d,t,String(e));const f=vT[d[0]];return f(a,d,o.localize,c)}).join("")}function R4(e){const t=e.match(F4);return t?t[1].replace(L4,"'"):e}function $4(e,t){const n=tt(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=pt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function j4(){return Object.assign({},Io())}function z4(e,t){const n=tt(e,t?.in).getDay();return n===0?7:n}function B4(e,t){return+tt(e)>+tt(t)}function H4(e,t){return+tt(e)<+tt(t)}function W4(e,t){const n=q4(t)?new t(0):pt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function q4(e){return typeof e=="function"&&e.prototype?.constructor===e}const U4=10;class CT{subPriority=0;validate(t,n){return!0}}class G4 extends CT{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Y4 extends CT{priority=U4;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>pt(n,r))}set(t,n){return n.timestampIsSet?t:pt(t,W4(t,this.context))}}class ot{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new G4(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class K4 extends ot{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Lt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},mr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Vt(e,t){return e&&{value:t(e.value),rest:e.rest}}function At(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function gr(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*$B+i*RB+s*jB),rest:t.slice(n[0].length)}}function kT(e){return At(Lt.anyDigitsSigned,e)}function Mt(e,t){switch(e){case 1:return At(Lt.singleDigit,t);case 2:return At(Lt.twoDigits,t);case 3:return At(Lt.threeDigits,t);case 4:return At(Lt.fourDigits,t);default:return At(new RegExp("^\\d{1,"+e+"}"),t)}}function Pc(e,t){switch(e){case 1:return At(Lt.singleDigitSigned,t);case 2:return At(Lt.twoDigitsSigned,t);case 3:return At(Lt.threeDigitsSigned,t);case 4:return At(Lt.fourDigitsSigned,t);default:return At(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Vh(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function IT(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function OT(e){return e%400===0||e%4===0&&e%100!==0}class Z4 extends ot{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Vt(Mt(4,t),o);case"yo":return Vt(r.ordinalNumber(t,{unit:"year"}),o);default:return Vt(Mt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const s=IT(r.year,o);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class X4 extends ot{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Vt(Mt(4,t),o);case"Yo":return Vt(r.ordinalNumber(t,{unit:"year"}),o);default:return Vt(Mt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Dh(t,o);if(r.isTwoDigitYear){const a=IT(r.year,i);return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),hr(t,o)}const s=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),hr(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Q4 extends ot{priority=130;parse(t,n){return Pc(n==="R"?4:n.length,t)}set(t,n,r){const o=pt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Ni(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class J4 extends ot{priority=130;parse(t,n){return Pc(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class eH extends ot{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Mt(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class tH extends ot{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Mt(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class nH extends ot{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Vt(At(Lt.month,t),o);case"MM":return Vt(Mt(2,t),o);case"Mo":return Vt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class rH extends ot{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Vt(At(Lt.month,t),o);case"LL":return Vt(Mt(2,t),o);case"Lo":return Vt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function oH(e,t,n){const r=tt(e,n?.in),o=yT(r,n)-t;return r.setDate(r.getDate()-o*7),tt(r,n?.in)}class iH extends ot{priority=100;parse(t,n,r){switch(n){case"w":return At(Lt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Mt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return hr(oH(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function sH(e,t,n){const r=tt(e,n?.in),o=gT(r,n)-t;return r.setDate(r.getDate()-o*7),r}class aH extends ot{priority=100;parse(t,n,r){switch(n){case"I":return At(Lt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Mt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Ni(sH(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const lH=[31,28,31,30,31,30,31,31,30,31,30,31],cH=[31,29,31,30,31,30,31,31,30,31,30,31];class uH extends ot{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return At(Lt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Mt(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=OT(r),i=t.getMonth();return o?n>=1&&n<=cH[i]:n>=1&&n<=lH[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class dH extends ot{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return At(Lt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Mt(n.length,t)}}validate(t,n){const r=t.getFullYear();return OT(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Rh(e,t,n){const r=Io(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=tt(e,n?.in),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return Cc(i,u,n)}class fH extends ot{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Rh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class pH extends ot{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return Vt(Mt(n.length,t),i);case"eo":return Vt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Rh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class hH extends ot{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return Vt(Mt(n.length,t),i);case"co":return Vt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Rh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function mH(e,t,n){const r=tt(e,n?.in),o=z4(r,n),i=t-o;return Cc(r,i,n)}class gH extends ot{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return Mt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Vt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Vt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Vt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Vt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=mH(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class yH extends ot{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Vh(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class vH extends ot{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Vh(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class bH extends ot{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Vh(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class xH extends ot{priority=70;parse(t,n,r){switch(n){case"h":return At(Lt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Mt(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class wH extends ot{priority=70;parse(t,n,r){switch(n){case"H":return At(Lt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Mt(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class SH extends ot{priority=70;parse(t,n,r){switch(n){case"K":return At(Lt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Mt(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class EH extends ot{priority=70;parse(t,n,r){switch(n){case"k":return At(Lt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Mt(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class TH extends ot{priority=60;parse(t,n,r){switch(n){case"m":return At(Lt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Mt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class CH extends ot{priority=50;parse(t,n,r){switch(n){case"s":return At(Lt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Mt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class kH extends ot{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Vt(Mt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class IH extends ot{priority=10;parse(t,n){switch(n){case"X":return gr(mr.basicOptionalMinutes,t);case"XX":return gr(mr.basic,t);case"XXXX":return gr(mr.basicOptionalSeconds,t);case"XXXXX":return gr(mr.extendedOptionalSeconds,t);default:return gr(mr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:pt(t,t.getTime()-kc(t)-r)}incompatibleTokens=["t","T","x"]}class OH extends ot{priority=10;parse(t,n){switch(n){case"x":return gr(mr.basicOptionalMinutes,t);case"xx":return gr(mr.basic,t);case"xxxx":return gr(mr.basicOptionalSeconds,t);case"xxxxx":return gr(mr.extendedOptionalSeconds,t);default:return gr(mr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:pt(t,t.getTime()-kc(t)-r)}incompatibleTokens=["t","T","X"]}class PH extends ot{priority=40;parse(t){return kT(t)}set(t,n,r){return[pt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class AH extends ot{priority=20;parse(t){return kT(t)}set(t,n,r){return[pt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const _H={G:new K4,y:new Z4,Y:new X4,R:new Q4,u:new J4,Q:new eH,q:new tH,M:new nH,L:new rH,w:new iH,I:new aH,d:new uH,D:new dH,E:new fH,e:new pH,c:new hH,i:new gH,a:new yH,b:new vH,B:new bH,h:new xH,H:new wH,K:new SH,k:new EH,m:new TH,s:new CH,S:new kH,X:new IH,x:new OH,t:new PH,T:new AH},MH=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DH=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,NH=/^'([^]*?)'?$/,FH=/''/g,LH=/\S/,VH=/[a-zA-Z]/;function RH(e,t,n,r){const o=()=>pt(n,NaN),i=j4(),s=i.locale??mT,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():tt(n,r?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},u=[new Y4(r?.in,n)],d=t.match(DH).map(g=>{const v=g[0];if(v in Nh){const b=Nh[v];return b(g,s.formatLong)}return g}).join("").match(MH),f=[];for(let g of d){TT(g)&&Fh(g,t,e),ET(g)&&Fh(g,t,e);const v=g[0],b=_H[v];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const S=f.find(O=>x.includes(O.token)||O.token===v);if(S)throw new RangeError(`The format string mustn't contain \`${S.fullToken}\` and \`${g}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);f.push({token:v,fullToken:g});const E=b.run(e,g,s.match,c);if(!E)return o();u.push(E.setter),e=E.rest}else{if(v.match(VH))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(g==="''"?g="'":v==="'"&&(g=$H(g)),e.indexOf(g)===0)e=e.slice(g.length);else return o()}}if(e.length>0&&LH.test(e))return o();const p=u.map(g=>g.priority).sort((g,v)=>v-g).filter((g,v,b)=>b.indexOf(g)===v).map(g=>u.filter(v=>v.priority===g).sort((v,b)=>b.subPriority-v.subPriority)).map(g=>g[0]);let h=tt(n,r?.in);if(isNaN(+h))return o();const m={};for(const g of p){if(!g.validate(h,c))return o();const v=g.set(h,m,c);Array.isArray(v)?(h=v[0],Object.assign(m,v[1])):h=v}return h}function $H(e){return e.match(NH)[1].replace(FH,"'")}function jH(e,t,n){const[r,o]=Ic(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function zH(e,t){return qB(pt(e,e),WB(e))}function BH(e,t,n){return Cc(e,-t,n)}function HH(e,t,n){const r=tt(e,n?.in),o=r.getFullYear(),i=r.getDate(),s=pt(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const a=$4(s);return r.setMonth(t,Math.min(i,a)),r}function WH(e,t,n){let r=tt(e,n?.in);return isNaN(+r)?pt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=HH(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function qH(e,t,n){const r=tt(e,n?.in);return isNaN(+r)?pt(e,NaN):(r.setFullYear(t),r)}function UH(e,t,n){return dT(e,-t,n)}function fa(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=UH(e,o+r*12,n),d=BH(u,s+i*7,n),f=l+a*60,h=(c+f*60)*1e3;return pt(e,+d-h)}const GH=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function YH(e,t){return T.useRef(GH(e,t)).current}function PT(e,t){const n=T.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const a=i.changedTouches[0].clientX-n.current;Math.abs(a)>t&&e(i,a>0?"right":"left"),n.current=null}}}const KH=/^(?<hour>\d\d):(?<min>\d\d)$/,ZH={type:"spring",bounce:.3,duration:.6},AT=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),_T={enter:AT(1),exit:AT(-1),middle:{x:"0%",opacity:1}},MT={exit:{visibility:"hidden"}},XH=e=>{const t=hr(hT(e));return pT({start:t,end:Di(t,{days:41})})},DT=(e,t)=>e.toLocaleDateString(t,{month:"long"}),QH=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=hT(new Date(1970,o,1).setMonth(o)),s=DT(i,n);return y.jsx("option",{value:s,"data-index":o,children:s},`${e}-${s}`)}),$h={ArrowLeft:(e,t)=>t==="days"?fa(e,{days:1}):fa(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Di(e,{days:1}):Di(e,{months:1}),ArrowUp:(e,t)=>t==="days"?fa(e,{weeks:1}):fa(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Di(e,{weeks:1}):Di(e,{years:1})},NT=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const s=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>s?.focus({preventScroll:!0}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},Ao=e=>e.getFullYear().toString().padStart(4,"0"),JH=(e,t,n)=>e===void 0||n===void 0?!1:B4(t,e)&&H4(t,n),e3=e=>{const t=Nt();return y.jsx(Ye.tbody,{layout:!0,variants:_T,custom:e.direction,onKeyDown:e.onKeyDown,className:Me(e.styles?.week),children:e.zip.map((n,r)=>{const o=Ue.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return y.jsx("tr",{className:o,children:n.map(i=>{const s=i.toISOString(),a=e.rangeMode?s===e.range?.to?.toISOString()||s===e.range?.from?.toISOString():s===(e.date?Oo(e.date).toISOString():void 0),l=zH(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=jH(i,e.stateDate),d=!u||c,f=e.rangeMode?JH(e.range?.from,i,e.range?.to):!1;return y.jsxs("td",{align:"center",className:Me("relative",Ue.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[y.jsxs("button",{type:"button","data-date":s,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Me(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${a?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",Ue.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),a&&e.stateRange.from?.toISOString()===s?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,a&&e.stateRange.to?.toISOString()===s?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?y.jsx(e.RenderOnDay,{date:i}):null]},s)})},`week-${n.length}-${r}`)})})},t3=()=>Oo(new Date),FT=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:s,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:p,...h})=>{const m=T.useRef(Qo()),g=Nt(),v=Al(o),b=T.useRef(null),{date:x,range:E}=h,S=x||new Date,O=T.useRef(null),[w,C]=wp({date:S,isAnimating:!1,year:Ao(S),direction:void 0,range:{from:E?.from,to:E?.to},months:QH(m.current,S,v),selectMode:l?"from":void 0,week:pT({start:hr(S),end:KB(S)})},M=>({onChangeYear:k=>({year:k}),onExitComplete:()=>(NT(O.current||null,b,M.state().date,200),O.current=null,{isAnimating:!1}),date:k=>{const R=k(M.state().date);return{date:R,year:Ao(R)}},nextMonth:k=>{k&&(O.current=k.currentTarget);const R=M.state();if(R.isAnimating)return R;const $=Di(R.date,{months:1});return{date:$,isAnimating:!0,direction:1,year:Ao($)}},previousMonth:k=>{k&&(O.current=k.currentTarget);const R=M.state();if(R.isAnimating)return R;const $=fa(R.date,{months:1});return{date:$,isAnimating:!0,direction:-1,year:Ao($)}},onSelectDate:k=>{const R=M.state(),$=k.currentTarget.dataset.range==="true",B=k.currentTarget.dataset.date||"",H=new Date(B);return{date:H,year:Ao(H),selectMode:R.selectMode===void 0?void 0:R.selectMode==="from"?"to":"from",range:$?{from:R.selectMode==="from"?H:R.range.from,to:R.selectMode==="to"?H:R.range.to}:R.range}},onChangeMonth:k=>{const R=k.target.value,B=Array.from(k.target.options).find(q=>q.value===R),H=M.state();if(B){const q=B.dataset.index||"",W=new Date(M.state().date);return W.setMonth(+q),{...H,date:W,year:Ao(W)}}return H},onKeyDown:k=>{const R=k.key,$=M.state();if(R in $h){(R==="ArrowUp"||R==="ArrowDown")&&k.preventDefault();const B=M.state().date,H=Ue.keyof($h,R)?$h[R](B,k.shiftKey?"month":"days"):null;if(H!==null)return NT(k.target,b,H),{...$,date:H,year:Ao(H)}}return M.state()}}),{props:{onChangeMonth:s,onChangeYear:a},postMiddleware:[(M,k,R)=>((R.method==="onChangeMonth"||R.method==="previousMonth"||R.method==="nextMonth")&&R.props.onChangeMonth?.(M.date),M),(M,k,R)=>(R.method==="onChangeYear"&&R.props.onChangeYear?.(M.date),M),(M,k,R)=>{const $=R.method==="onSelectDate"||R.method==="setToday"||R.method==="onKeyDown";return l&&$&&t?(c?.(M.range),M):($&&t&&c?.(M.date),M)}]}),P=XH(w.date),_=Zv(P,7),F=w.date.toISOString(),j=DT(w.date,v);T.useEffect(()=>{t||c?.(w.date)},[F,t]);const L=YH(M=>C.date(k=>qH(new Date(k),+M)),1200),A=M=>{const k=M.currentTarget.value;C.onChangeYear(k),a?.(new Date(k)),L(k)},D=PT((M,k)=>(M.preventDefault(),k==="right"?C.previousMonth():C.nextMonth()),10),z=()=>{const M=t3();C.date(()=>M),c?.(M)};return y.jsx(ip,{transition:ZH,children:y.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:D.onTouchEnd,onTouchStart:D.onTouchStart,className:Me("relative overflow-hidden",Ue.function(u?.calendar)?u?.calendar(P):u?.calendar),children:[y.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:y.jsx(Wn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:C.onExitComplete,children:y.jsxs(Ye.div,{initial:"enter",animate:"middle",exit:"exit",children:[y.jsxs("header",{className:"relative flex justify-between",children:[y.jsx(Ye.button,{layout:!0,type:"button","data-focustrap":"prev",variants:MT,onClick:C.previousMonth,title:g.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx(VO,{className:"h-4 w-4"})}),y.jsx(Ye.span,{layout:!0,variants:_T,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:y.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[y.jsx("select",{value:j,onChange:C.onChangeMonth,"aria-label":g.calendarMonthLabel,style:{width:`${j.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),y.jsx(uy,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:A,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),y.jsx(Ye.button,{layout:!0,type:"button","data-focustrap":"next",variants:MT,onClick:C.nextMonth,title:g.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx(Yu,{className:"h-4 w-4"})}),y.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),y.jsxs(Ye.table,{className:"mt-2 table min-w-full table-auto border-0",children:[y.jsx("thead",{children:y.jsx("tr",{children:w.week.map(M=>y.jsx("th",{role:"columnheader",className:Me("py-2 text-sm font-medium capitalize",Ue.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(v,{weekday:"short"})},M.toString()))})}),y.jsx(e3,{zip:_,range:E,styles:u,date:x||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},j)})}),f==="datetime"?y.jsx("section",{className:"grid items-center my-4",children:y.jsx(Jo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?Lh(x,"HH:mm"):void 0,title:p||g.calendarDatetimeTitle,onChange:M=>{const k=M.target.value,R=KH.exec(k);if(!R)return;const $=R.groups.hour,B=R.groups.min,H=WH(w.date,{hours:Number($),minutes:Number(B),seconds:0});C.date(()=>H),c?.(H)}})}):null,y.jsx("footer",{className:"mt-2 text-center text-primary",children:y.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:g.calendarToday})})]})})},jh=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(jh.displayName="ProgressRootContext");function n3(){const e=I.useContext(jh);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":bn(51));return e}let zh=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const LT={status(e){return e==="progressing"?{[zh.progressing]:""}:e==="complete"?{[zh.complete]:""}:e==="indeterminate"?{[zh.indeterminate]:""}:null}};function r3(e,t,n){return e==null?"":n?ii(e,t,n):ii(e/100,t,{style:"percent"})}function o3(e,t){return t==null?"indeterminate progress":e||`${t}%`}const VT=I.forwardRef(function(t,n){const{format:r,getAriaValueText:o=o3,locale:i,max:s=100,min:a=0,value:l,render:c,className:u,...d}=t,[f,p]=I.useState(),h=yo(r);let m="indeterminate";Number.isFinite(l)&&(m=l===s?"complete":"progressing");const g=r3(l,i,h.current),v=I.useMemo(()=>({status:m}),[m]),b={"aria-labelledby":f,"aria-valuemax":s,"aria-valuemin":a,"aria-valuenow":l??void 0,"aria-valuetext":o(g,l),role:"progressbar"},x=I.useMemo(()=>({formattedValue:g,max:s,min:a,setLabelId:p,state:v,status:m,value:l}),[g,s,a,p,v,m,l]),E=Rt("div",t,{state:v,ref:n,props:[b,d],stateAttributesMapping:LT});return y.jsx(jh.Provider,{value:x,children:E})});process.env.NODE_ENV!=="production"&&(VT.displayName="ProgressRoot");const RT=I.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:s,min:a,value:l,state:c}=n3(),u=Number.isFinite(l)&&l!==null?El(l,a,s):null,d=I.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return Rt("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:LT})});process.env.NODE_ENV!=="production"&&(RT.displayName="ProgressIndicator");const i3=e=>y.jsxs(VT,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Me("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[y.jsx(RT,{style:{transform:Ue.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Me("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Ue.number(e.percent)?y.jsx("p",{className:Me("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),Ac=e=>y.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[y.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),y.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Ac.Icon=function(t){return y.jsx("header",{...t,className:Me("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Ac.Body=function(t){return y.jsx(gn,{...t,className:Me("min-w-0 flex-1",t.className),children:t.children})},Ac.Right=function(t){return y.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:y.jsx(gn,{...t,type:"button"})})};const s3=e=>y.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),a3=e=>y.jsx(Ye.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),$T=new Date(1970,11,31),Bh={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},jT={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},l3={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Hh=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},c3={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},u3={day:"numeric",month:"numeric",year:"numeric"},d3=T.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:s=!0,type:a,...l},c)=>{const u=Al(t),d=T.useId(),f=Nt(),p=T.useMemo(()=>new Intl.DateTimeFormat(u,a==="datetime"?c3:u3),[u,a]),[h,m]=T.useState(e||void 0),[g,v]=T.useState(!1),b=Hh(p,$T).flatMap(j=>Ue.keyof(Bh,j.type)?Bh[j.type](j.value):[]),x=T.useMemo(()=>Hh(p,$T).reduce((j,L)=>j+(Ue.keyof(jT,L.type)?jT[L.type](L.value):""),""),[p]),E=e?.toISOString(),[S,O]=T.useState(h?Hh(p,h).reduce((j,L)=>j+(Ue.keyof(Bh,L.type)?l3[L.type](h,L.value):""),""):""),w=j=>{const L=j.target.value;if(O(L),b.length===L.length&&b.every((D,z)=>{const M=L.charAt(z);return typeof D=="string"?M===D:D.test(M)})){const D=RH(L,x,new Date),z=a==="datetime"?D:Oo(D);return m(z),r?.(z)}return m(void 0),r?.(void 0)};T.useEffect(()=>{Oc(e)&&(m(e),O(Lh(e,x)))},[E,x]);const C=j=>(m(j),r?.(j),i&&v(!1),O(j?Lh(j,x):"")),P=Oc(h),_=P?h.toISOString():void 0,F=y.jsx(FT,{...l,type:a,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:C,disabledDate:n,date:P?h:void 0});return y.jsx(T.Fragment,{children:y.jsx(Jo,{...l,mask:b,value:S,id:void 0,name:void 0,"data-value":_,formNoValidate:!g,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:g?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:s?y.jsxs(T.Fragment,{children:[y.jsx("input",{"data-origin":l.name,defaultValue:_,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),y.jsx(Pi,{open:g,onChange:v,buttonProps:{"aria-describedby":d},trigger:y.jsxs("span",{"aria-labelledby":d,children:[y.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),y.jsx(LO,{})]}),children:F})]}):null})})}),f3=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],p3=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],h3=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],m3=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],zT=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},BT=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},g3=e=>typeof e=="number"?Math.log(e):BT(e)*Math.log(10),y3=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},HT=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},v3=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function b3(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?m3:h3:t.binary?p3:f3,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return HT(c,t.fixedWidth)}const i=e<0,s=i?"-":t.signed?"+":"";i&&(e=-e);const a=v3(t);let l;if(e<1){const c=zT(e,t.locale,a);l=s+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?g3(e)/Math.log(1024):BT(e)/3),n.length-1);if(e=y3(e,(t.binary?1024:1e3)**c),!a){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=zT(Number(e),t.locale,a),d=n[c];l=s+u+r+d}return HT(l,t.fixedWidth)}var _c={exports:{}},Mc={exports:{}},ct={};var WT;function x3(){if(WT)return ct;WT=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(S){if(typeof S=="object"&&S!==null){var O=S.$$typeof;switch(O){case t:switch(S=S.type,S){case l:case c:case r:case i:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case h:case p:case s:return S;default:return O}}case n:return O}}}function E(S){return x(S)===c}return ct.AsyncMode=l,ct.ConcurrentMode=c,ct.ContextConsumer=a,ct.ContextProvider=s,ct.Element=t,ct.ForwardRef=u,ct.Fragment=r,ct.Lazy=h,ct.Memo=p,ct.Portal=n,ct.Profiler=i,ct.StrictMode=o,ct.Suspense=d,ct.isAsyncMode=function(S){return E(S)||x(S)===l},ct.isConcurrentMode=E,ct.isContextConsumer=function(S){return x(S)===a},ct.isContextProvider=function(S){return x(S)===s},ct.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ct.isForwardRef=function(S){return x(S)===u},ct.isFragment=function(S){return x(S)===r},ct.isLazy=function(S){return x(S)===h},ct.isMemo=function(S){return x(S)===p},ct.isPortal=function(S){return x(S)===n},ct.isProfiler=function(S){return x(S)===i},ct.isStrictMode=function(S){return x(S)===o},ct.isSuspense=function(S){return x(S)===d},ct.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===i||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===p||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===g||S.$$typeof===v||S.$$typeof===b||S.$$typeof===m)},ct.typeOf=x,ct}var ut={};var qT;function w3(){return qT||(qT=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(N){return typeof N=="string"||typeof N=="function"||N===r||N===c||N===i||N===o||N===d||N===f||typeof N=="object"&&N!==null&&(N.$$typeof===h||N.$$typeof===p||N.$$typeof===s||N.$$typeof===a||N.$$typeof===u||N.$$typeof===g||N.$$typeof===v||N.$$typeof===b||N.$$typeof===m)}function E(N){if(typeof N=="object"&&N!==null){var ne=N.$$typeof;switch(ne){case t:var te=N.type;switch(te){case l:case c:case r:case i:case o:case d:return te;default:var re=te&&te.$$typeof;switch(re){case a:case u:case h:case p:case s:return re;default:return ne}}case n:return ne}}}var S=l,O=c,w=a,C=s,P=t,_=u,F=r,j=h,L=p,A=n,D=i,z=o,M=d,k=!1;function R(N){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(N)||E(N)===l}function $(N){return E(N)===c}function B(N){return E(N)===a}function H(N){return E(N)===s}function q(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function W(N){return E(N)===u}function oe(N){return E(N)===r}function ae(N){return E(N)===h}function ie(N){return E(N)===p}function U(N){return E(N)===n}function G(N){return E(N)===i}function J(N){return E(N)===o}function fe(N){return E(N)===d}ut.AsyncMode=S,ut.ConcurrentMode=O,ut.ContextConsumer=w,ut.ContextProvider=C,ut.Element=P,ut.ForwardRef=_,ut.Fragment=F,ut.Lazy=j,ut.Memo=L,ut.Portal=A,ut.Profiler=D,ut.StrictMode=z,ut.Suspense=M,ut.isAsyncMode=R,ut.isConcurrentMode=$,ut.isContextConsumer=B,ut.isContextProvider=H,ut.isElement=q,ut.isForwardRef=W,ut.isFragment=oe,ut.isLazy=ae,ut.isMemo=ie,ut.isPortal=U,ut.isProfiler=G,ut.isStrictMode=J,ut.isSuspense=fe,ut.isValidElementType=x,ut.typeOf=E})()),ut}var UT;function GT(){return UT||(UT=1,process.env.NODE_ENV==="production"?Mc.exports=x3():Mc.exports=w3()),Mc.exports}var Wh,YT;function S3(){if(YT)return Wh;YT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Wh=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Wh}var qh,KT;function Uh(){if(KT)return qh;KT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qh=e,qh}var Gh,ZT;function XT(){return ZT||(ZT=1,Gh=Function.call.bind(Object.prototype.hasOwnProperty)),Gh}var Yh,QT;function E3(){if(QT)return Yh;QT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Uh(),n={},r=XT();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+a+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Yh=o,Yh}var Kh,JT;function T3(){if(JT)return Kh;JT=1;var e=GT(),t=S3(),n=Uh(),r=XT(),o=E3(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Kh=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d($){var B=$&&(c&&$[c]||$[u]);if(typeof B=="function")return B}var f="<<anonymous>>",p={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:x,element:E(),elementType:S(),instanceOf:O,node:_(),objectOf:C,oneOf:w,oneOfType:P,shape:j,exact:L};function h($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function m($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function g($){if(process.env.NODE_ENV!=="production")var B={},H=0;function q(oe,ae,ie,U,G,J,fe){if(U=U||f,J=J||ie,fe!==n){if(l){var N=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 N.name="Invariant Violation",N}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=U+":"+ie;!B[ne]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[ne]=!0,H++)}}return ae[ie]==null?oe?ae[ie]===null?new m("The "+G+" `"+J+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new m("The "+G+" `"+J+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:$(ae,ie,U,G,J)}var W=q.bind(null,!1);return W.isRequired=q.bind(null,!0),W}function v($){function B(H,q,W,oe,ae,ie){var U=H[q],G=z(U);if(G!==$){var J=M(U);return new m("Invalid "+oe+" `"+ae+"` of type "+("`"+J+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return g(B)}function b(){return g(s)}function x($){function B(H,q,W,oe,ae){if(typeof $!="function")return new m("Property `"+ae+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var ie=H[q];if(!Array.isArray(ie)){var U=z(ie);return new m("Invalid "+oe+" `"+ae+"` of type "+("`"+U+"` supplied to `"+W+"`, expected an array."))}for(var G=0;G<ie.length;G++){var J=$(ie,G,W,oe,ae+"["+G+"]",n);if(J instanceof Error)return J}return null}return g(B)}function E(){function $(B,H,q,W,oe){var ae=B[H];if(!a(ae)){var ie=z(ae);return new m("Invalid "+W+" `"+oe+"` of type "+("`"+ie+"` supplied to `"+q+"`, expected a single ReactElement."))}return null}return g($)}function S(){function $(B,H,q,W,oe){var ae=B[H];if(!e.isValidElementType(ae)){var ie=z(ae);return new m("Invalid "+W+" `"+oe+"` of type "+("`"+ie+"` supplied to `"+q+"`, expected a single ReactElement type."))}return null}return g($)}function O($){function B(H,q,W,oe,ae){if(!(H[q]instanceof $)){var ie=$.name||f,U=R(H[q]);return new m("Invalid "+oe+" `"+ae+"` of type "+("`"+U+"` supplied to `"+W+"`, expected ")+("instance of `"+ie+"`."))}return null}return g(B)}function w($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function B(H,q,W,oe,ae){for(var ie=H[q],U=0;U<$.length;U++)if(h(ie,$[U]))return null;var G=JSON.stringify($,function(fe,N){var ne=M(N);return ne==="symbol"?String(N):N});return new m("Invalid "+oe+" `"+ae+"` of value `"+String(ie)+"` "+("supplied to `"+W+"`, expected one of "+G+"."))}return g(B)}function C($){function B(H,q,W,oe,ae){if(typeof $!="function")return new m("Property `"+ae+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var ie=H[q],U=z(ie);if(U!=="object")return new m("Invalid "+oe+" `"+ae+"` of type "+("`"+U+"` supplied to `"+W+"`, expected an object."));for(var G in ie)if(r(ie,G)){var J=$(ie,G,W,oe,ae+"."+G,n);if(J instanceof Error)return J}return null}return g(B)}function P($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var B=0;B<$.length;B++){var H=$[B];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(H)+" at index "+B+"."),s}function q(W,oe,ae,ie,U){for(var G=[],J=0;J<$.length;J++){var fe=$[J],N=fe(W,oe,ae,ie,U,n);if(N==null)return null;N.data&&r(N.data,"expectedType")&&G.push(N.data.expectedType)}var ne=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new m("Invalid "+ie+" `"+U+"` supplied to "+("`"+ae+"`"+ne+"."))}return g(q)}function _(){function $(B,H,q,W,oe){return A(B[H])?null:new m("Invalid "+W+" `"+oe+"` supplied to "+("`"+q+"`, expected a ReactNode."))}return g($)}function F($,B,H,q,W){return new m(($||"React class")+": "+B+" type `"+H+"."+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function j($){function B(H,q,W,oe,ae){var ie=H[q],U=z(ie);if(U!=="object")return new m("Invalid "+oe+" `"+ae+"` of type `"+U+"` "+("supplied to `"+W+"`, expected `object`."));for(var G in $){var J=$[G];if(typeof J!="function")return F(W,oe,ae,G,M(J));var fe=J(ie,G,W,oe,ae+"."+G,n);if(fe)return fe}return null}return g(B)}function L($){function B(H,q,W,oe,ae){var ie=H[q],U=z(ie);if(U!=="object")return new m("Invalid "+oe+" `"+ae+"` of type `"+U+"` "+("supplied to `"+W+"`, expected `object`."));var G=t({},H[q],$);for(var J in G){var fe=$[J];if(r($,J)&&typeof fe!="function")return F(W,oe,ae,J,M(fe));if(!fe)return new m("Invalid "+oe+" `"+ae+"` key `"+J+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(H[q],null," ")+`
|
|
33
|
+
Valid keys: `+JSON.stringify(Object.keys($),null," "));var N=fe(ie,J,W,oe,ae+"."+J,n);if(N)return N}return null}return g(B)}function A($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(A);if($===null||a($))return!0;var B=d($);if(B){var H=B.call($),q;if(B!==$.entries){for(;!(q=H.next()).done;)if(!A(q.value))return!1}else for(;!(q=H.next()).done;){var W=q.value;if(W&&!A(W[1]))return!1}}else return!1;return!0;default:return!1}}function D($,B){return $==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function z($){var B=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":D(B,$)?"symbol":B}function M($){if(typeof $>"u"||$===null)return""+$;var B=z($);if(B==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return B}function k($){var B=M($);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function R($){return!$.constructor||!$.constructor.name?f:$.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},Kh}var Zh,eC;function C3(){if(eC)return Zh;eC=1;var e=Uh();function t(){}function n(){}return n.resetWarningCache=t,Zh=function(){function r(s,a,l,c,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Zh}var tC;function k3(){if(tC)return _c.exports;if(tC=1,process.env.NODE_ENV!=="production"){var e=GT(),t=!0;_c.exports=T3()(e.isElement,t)}else _c.exports=C3()();return _c.exports}var I3=k3();const wt=Lm(I3);function _o(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const O3=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Li(e,t,n){const r=P3(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&nC(r,"path",i),nC(r,"relativePath",i),r}function P3(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=O3.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function nC(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const A3=[".DS_Store","Thumbs.db"];function _3(e){return _o(this,void 0,void 0,function*(){return Dc(e)&&M3(e.dataTransfer)?L3(e.dataTransfer,e.type):D3(e)?N3(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?F3(e):[]})}function M3(e){return Dc(e)}function D3(e){return Dc(e)&&Dc(e.target)}function Dc(e){return typeof e=="object"&&e!==null}function N3(e){return Xh(e.target.files).map(t=>Li(t))}function F3(e){return _o(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Li(n))})}function L3(e,t){return _o(this,void 0,void 0,function*(){if(e.items){const n=Xh(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(V3));return rC(oC(r))}return rC(Xh(e.files).map(n=>Li(n)))})}function rC(e){return e.filter(t=>A3.indexOf(t.name)===-1)}function Xh(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function V3(e){if(typeof e.webkitGetAsEntry!="function")return iC(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?sC(t):iC(e,t)}function oC(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?oC(n):[n]],[])}function iC(e,t){return _o(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const s=yield i.getFile();return s.handle=i,Li(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Li(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function R3(e){return _o(this,void 0,void 0,function*(){return e.isDirectory?sC(e):$3(e)})}function sC(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(s=>_o(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(R3));o.push(a),i()}else try{const a=yield Promise.all(o);n(a)}catch(a){r(a)}}),s=>{r(s)})}i()})}function $3(e){return _o(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Li(r,e.fullPath);t(o)},r=>{n(r)})})})}var Nc={},aC;function j3(){return aC||(aC=1,Nc.__esModule=!0,Nc.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0}),Nc}var z3=j3();const Qh=Lm(z3);function lC(e){return W3(e)||H3(e)||fC(e)||B3()}function B3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
34
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function W3(e){if(Array.isArray(e))return Jh(e)}function cC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cC(Object(n),!0).forEach(function(r){dC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pa(e,t){return G3(e)||U3(e,t)||fC(e,t)||q3()}function q3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
35
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fC(e,t){if(e){if(typeof e=="string")return Jh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jh(e,t)}}function Jh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U3(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function G3(e){if(Array.isArray(e))return e}var Y3=typeof Qh=="function"?Qh:Qh.default,K3="file-invalid-type",Z3="file-too-large",X3="file-too-small",Q3="too-many-files",J3=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:K3,message:"File type must be ".concat(r)}},pC=function(t){return{code:Z3,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},hC=function(t){return{code:X3,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},eW={code:Q3,message:"Too many files"};function mC(e,t){var n=e.type==="application/x-moz-file"||Y3(e,t);return[n,n?null:J3(t)]}function gC(e,t,n){if(Mo(e.size))if(Mo(t)&&Mo(n)){if(e.size>n)return[!1,pC(n)];if(e.size<t)return[!1,hC(t)]}else{if(Mo(t)&&e.size<t)return[!1,hC(t)];if(Mo(n)&&e.size>n)return[!1,pC(n)]}return[!0,null]}function Mo(e){return e!=null}function tW(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=mC(l,n),u=pa(c,1),d=u[0],f=gC(l,r,o),p=pa(f,1),h=p[0],m=a?a(l):null;return d&&h&&!m})}function Fc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Lc(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function yC(e){e.preventDefault()}function nW(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function rW(e){return e.indexOf("Edge/")!==-1}function oW(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return nW(e)||rW(e)}function yr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!Fc(r)&&a&&a.apply(void 0,[r].concat(i)),Fc(r)})}}function iW(){return"showOpenFilePicker"in window}function sW(e){if(Mo(e)){var t=Object.entries(e).filter(function(n){var r=pa(n,2),o=r[0],i=r[1],s=!0;return vC(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(bC))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=pa(r,2),i=o[0],s=o[1];return uC(uC({},n),{},dC({},i,s))},{});return[{description:"Files",accept:t}]}return e}function aW(e){if(Mo(e))return Object.entries(e).reduce(function(t,n){var r=pa(n,2),o=r[0],i=r[1];return[].concat(lC(t),[o],lC(i))},[]).filter(function(t){return vC(t)||bC(t)}).join(",")}function lW(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function cW(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function vC(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function bC(e){return/^.*\.[\w]+$/.test(e)}var uW=["children"],dW=["open"],fW=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],pW=["refKey","onChange","onClick"];function hW(e){return yW(e)||gW(e)||xC(e)||mW()}function mW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
36
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yW(e){if(Array.isArray(e))return tm(e)}function em(e,t){return xW(e)||bW(e,t)||xC(e,t)||vW()}function vW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
37
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xC(e,t){if(e){if(typeof e=="string")return tm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tm(e,t)}}function tm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function xW(e){if(Array.isArray(e))return e}function wC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wC(Object(n),!0).forEach(function(r){nm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vc(e,t){if(e==null)return{};var n=wW(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wW(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var rm=T.forwardRef(function(e,t){var n=e.children,r=Vc(e,uW),o=EC(r),i=o.open,s=Vc(o,dW);return T.useImperativeHandle(t,function(){return{open:i}},[i]),T.createElement(T.Fragment,null,n(_t(_t({},s),{},{open:i})))});rm.displayName="Dropzone";var SC={disabled:!1,getFilesFromEvent:_3,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};rm.defaultProps=SC,rm.propTypes={children:wt.func,accept:wt.objectOf(wt.arrayOf(wt.string)),multiple:wt.bool,preventDropOnDocument:wt.bool,noClick:wt.bool,noKeyboard:wt.bool,noDrag:wt.bool,noDragEventsBubbling:wt.bool,minSize:wt.number,maxSize:wt.number,maxFiles:wt.number,disabled:wt.bool,getFilesFromEvent:wt.func,onFileDialogCancel:wt.func,onFileDialogOpen:wt.func,useFsAccessApi:wt.bool,autoFocus:wt.bool,onDragEnter:wt.func,onDragLeave:wt.func,onDragOver:wt.func,onDrop:wt.func,onDropAccepted:wt.func,onDropRejected:wt.func,onError:wt.func,validator:wt.func};var om={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function EC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_t(_t({},SC),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,E=t.noClick,S=t.noKeyboard,O=t.noDrag,w=t.noDragEventsBubbling,C=t.onError,P=t.validator,_=T.useMemo(function(){return aW(n)},[n]),F=T.useMemo(function(){return sW(n)},[n]),j=T.useMemo(function(){return typeof g=="function"?g:TC},[g]),L=T.useMemo(function(){return typeof m=="function"?m:TC},[m]),A=T.useRef(null),D=T.useRef(null),z=T.useReducer(SW,om),M=em(z,2),k=M[0],R=M[1],$=k.isFocused,B=k.isFileDialogActive,H=T.useRef(typeof window<"u"&&window.isSecureContext&&v&&iW()),q=function(){!H.current&&B&&setTimeout(function(){if(D.current){var X=D.current.files;X.length||(R({type:"closeDialog"}),L())}},300)};T.useEffect(function(){return window.addEventListener("focus",q,!1),function(){window.removeEventListener("focus",q,!1)}},[D,B,L,H]);var W=T.useRef([]),oe=function(X){A.current&&A.current.contains(X.target)||(X.preventDefault(),W.current=[])};T.useEffect(function(){return x&&(document.addEventListener("dragover",yC,!1),document.addEventListener("drop",oe,!1)),function(){x&&(document.removeEventListener("dragover",yC),document.removeEventListener("drop",oe))}},[A,x]),T.useEffect(function(){return!r&&b&&A.current&&A.current.focus(),function(){}},[A,b,r]);var ae=T.useCallback(function(V){C?C(V):console.error(V)},[C]),ie=T.useCallback(function(V){V.preventDefault(),V.persist(),pe(V),W.current=[].concat(hW(W.current),[V.target]),Lc(V)&&Promise.resolve(o(V)).then(function(X){if(!(Fc(V)&&!w)){var de=X.length,he=de>0&&tW({files:X,accept:_,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:P}),Se=de>0&&!he;R({isDragAccept:he,isDragReject:Se,isDragActive:!0,type:"setDraggedFiles"}),c&&c(V)}}).catch(function(X){return ae(X)})},[o,c,ae,w,_,s,i,a,l,P]),U=T.useCallback(function(V){V.preventDefault(),V.persist(),pe(V);var X=Lc(V);if(X&&V.dataTransfer)try{V.dataTransfer.dropEffect="copy"}catch{}return X&&d&&d(V),!1},[d,w]),G=T.useCallback(function(V){V.preventDefault(),V.persist(),pe(V);var X=W.current.filter(function(he){return A.current&&A.current.contains(he)}),de=X.indexOf(V.target);de!==-1&&X.splice(de,1),W.current=X,!(X.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Lc(V)&&u&&u(V))},[A,u,w]),J=T.useCallback(function(V,X){var de=[],he=[];V.forEach(function(Se){var be=mC(Se,_),Ae=em(be,2),qe=Ae[0],gt=Ae[1],yt=gC(Se,s,i),Bt=em(yt,2),$e=Bt[0],K=Bt[1],ee=P?P(Se):null;if(qe&&$e&&!ee)de.push(Se);else{var _e=[gt,K];ee&&(_e=_e.concat(ee)),he.push({file:Se,errors:_e.filter(function(Ze){return Ze})})}}),(!a&&de.length>1||a&&l>=1&&de.length>l)&&(de.forEach(function(Se){he.push({file:Se,errors:[eW]})}),de.splice(0)),R({acceptedFiles:de,fileRejections:he,isDragReject:he.length>0,type:"setFiles"}),f&&f(de,he,X),he.length>0&&h&&h(he,X),de.length>0&&p&&p(de,X)},[R,a,_,s,i,l,f,p,h,P]),fe=T.useCallback(function(V){V.preventDefault(),V.persist(),pe(V),W.current=[],Lc(V)&&Promise.resolve(o(V)).then(function(X){Fc(V)&&!w||J(X,V)}).catch(function(X){return ae(X)}),R({type:"reset"})},[o,J,ae,w]),N=T.useCallback(function(){if(H.current){R({type:"openDialog"}),j();var V={multiple:a,types:F};window.showOpenFilePicker(V).then(function(X){return o(X)}).then(function(X){J(X,null),R({type:"closeDialog"})}).catch(function(X){lW(X)?(L(X),R({type:"closeDialog"})):cW(X)?(H.current=!1,D.current?(D.current.value=null,D.current.click()):ae(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ae(X)});return}D.current&&(R({type:"openDialog"}),j(),D.current.value=null,D.current.click())},[R,j,L,v,J,ae,F,a]),ne=T.useCallback(function(V){!A.current||!A.current.isEqualNode(V.target)||(V.key===" "||V.key==="Enter"||V.keyCode===32||V.keyCode===13)&&(V.preventDefault(),N())},[A,N]),te=T.useCallback(function(){R({type:"focus"})},[]),re=T.useCallback(function(){R({type:"blur"})},[]),Q=T.useCallback(function(){E||(oW()?setTimeout(N,0):N())},[E,N]),Z=function(X){return r?null:X},le=function(X){return S?null:Z(X)},ce=function(X){return O?null:Z(X)},pe=function(X){w&&X.stopPropagation()},ge=T.useMemo(function(){return function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=V.refKey,de=X===void 0?"ref":X,he=V.role,Se=V.onKeyDown,be=V.onFocus,Ae=V.onBlur,qe=V.onClick,gt=V.onDragEnter,yt=V.onDragOver,Bt=V.onDragLeave,$e=V.onDrop,K=Vc(V,fW);return _t(_t(nm({onKeyDown:le(yr(Se,ne)),onFocus:le(yr(be,te)),onBlur:le(yr(Ae,re)),onClick:Z(yr(qe,Q)),onDragEnter:ce(yr(gt,ie)),onDragOver:ce(yr(yt,U)),onDragLeave:ce(yr(Bt,G)),onDrop:ce(yr($e,fe)),role:typeof he=="string"&&he!==""?he:"presentation"},de,A),!r&&!S?{tabIndex:0}:{}),K)}},[A,ne,te,re,Q,ie,U,G,fe,S,O,r]),se=T.useCallback(function(V){V.stopPropagation()},[]),Y=T.useMemo(function(){return function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=V.refKey,de=X===void 0?"ref":X,he=V.onChange,Se=V.onClick,be=Vc(V,pW),Ae=nm({accept:_,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Z(yr(he,fe)),onClick:Z(yr(Se,se)),tabIndex:-1},de,D);return _t(_t({},Ae),be)}},[D,n,a,fe,r]);return _t(_t({},k),{},{isFocused:$&&!r,getRootProps:ge,getInputProps:Y,rootRef:A,inputRef:D,open:Z(N)})}function SW(e,t){switch(t.type){case"focus":return _t(_t({},e),{},{isFocused:!0});case"blur":return _t(_t({},e),{},{isFocused:!1});case"openDialog":return _t(_t({},om),{},{isFileDialogActive:!0});case"closeDialog":return _t(_t({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _t(_t({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _t(_t({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _t({},om);default:return e}}function TC(){}const CC=T.createContext([null,()=>{}]),EW=()=>T.useContext(CC),TW=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,CW={csv:Xu,xls:Xu,mov:gy,mp4:gy,xlsx:Xu,pdf:my,txt:my,json:jO,mp3:FO},kW=e=>{const[,t]=EW(),[n,r]=T.useState({url:"",type:"",size:""});T.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:TW(l),size:b3(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},s=CW[e.file.name.split(".").at(-1)]??yy,a=n.type==="img"?y.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):y.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return y.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[y.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:a}),y.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[y.jsx("span",{children:e.file.name}),y.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?y.jsx("div",{className:"flex-1 min-w-full",children:y.jsx(e.File,{file:e.file})}):null]}),y.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:y.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:y.jsx(zo,{size:16})})})]})},IW=e=>y.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>y.jsx(kW,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),kC=e=>{const t=Nt(),n=e.dragging?zO:BO;return y.jsxs("div",{className:"flex flex-col justify-center items-center",children:[y.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:y.jsx(n,{className:"text-primary",size:80})}),y.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[y.jsx("p",{children:t.uploadIdle}),y.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},OW=e=>e.isDragActive?y.jsx(kC,{files:e.files,dragging:!0}):e.files.length>0?y.jsx(IW,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):y.jsx(T.Fragment,{children:e.idle}),PW=y.jsx(kC,{dragging:!1}),AW=e=>{const t=e.item.file,n=e.item.type;return y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),y.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?y.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?y.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?y.jsx("figure",{children:y.jsx("audio",{controls:!0,src:e.item.url})}):null]})},_W=({idle:e=PW,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Nt(),s=T.useState(null),[a,l]=T.useState([]),c=o.files??a,u=()=>s[1](null),d=m=>{r?.(m),l(g=>g.concat(m))},{getRootProps:f,getInputProps:p,isDragActive:h}=EC({onDrop:d});return y.jsxs(CC.Provider,{value:s,children:[y.jsx(_h,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?y.jsx(AW,{item:s[0]}):null}),y.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[y.jsx("input",{...p(o),name:o.name,id:o.name}),y.jsx(OW,{File:n,onDeleteFile:t,isDragActive:h,idle:e,files:c})]})]})},IC=()=>window.matchMedia("@media (pointer: coarse)"),MW=()=>{const e=T.useRef(Fr()?null:IC()),[t,n]=T.useState(Fr()?!1:e.current?.matches??!1);return T.useEffect(()=>{(e.current===null?IC():e.current).addEventListener("change",o=>n(o.matches))},[]),t},OC=(e,t="overflow-hidden")=>{const n=T.useRef(null),r=MW(),o=T.useRef(Fr()?"":document.documentElement.style.overflowY);return T.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||Xv())return;document.documentElement.style.padding=Qg(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),T.useEffect(()=>{if(!e)return;const i=new AbortController,s=document.documentElement,a=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(yI(c.style.height)):null,f=Ue.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return s.addEventListener("wheel",a,{signal:i.signal,passive:!1}),s.addEventListener("scroll",a,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},DW=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((s,a)=>s===n?a:!1).filter(s=>s!==!1);if(r.length===0)return null;const o=[];if(r.forEach(s=>{let a=s+1;const l=[s];for(let c=1;c<t.length;c++){const u=t[c];if(a=e.indexOf(u,a),a===-1)return;l.push(a),a++}o.push(l)}),o.length===0)return null;const i=o.sort((s,a)=>{if(s.length===1)return s[0]-a[0];const l=s[s.length-1]-s[0],c=a[a.length-1]-a[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},PC=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},AC={basic:/[,[\]]+?/,extend:/[,[\].]+?/},_C=(e,t)=>{const n=PC(t,AC.basic,e);return n!==void 0&&n!==e?n:PC(t,AC.extend,e)},MC=e=>e.replace(/[^0-9]/g,""),Rc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),DC=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?MC(e).includes(MC(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?DW(e,t)!==null:!1,NW=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>DC(e,o,n,r)):DC(e,t,n,r),im=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Ue.array(i.value)?i.value.map(Rc):Rc(`${i.value}`)}));return e.forEach(i=>{const s=_C(i,t);o.forEach(a=>{const l=_C(i,a.key);if(!l)return;const c=Rc(`${a.value}`.toLocaleLowerCase()).trim(),u=Rc(`${l}`.toLocaleLowerCase()).trim();if(NW(u,c,a.score,a.match))return void r.set(s,i);Ue.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},FW=e=>y.jsx(T.Fragment,{children:e.children}),LW={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},VW=[],RW=T.forwardRef(function(t,n){return y.jsx(Ye.ul,{...t,ref:n,className:"overscroll-contain w-full rounded-lg",children:y.jsx(Wn,{children:t.children})})}),$W=T.forwardRef(function({item:t,context:n,...r},o){return y.jsx(Ye.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),jW={List:RW,Item:$W},Vi=40,zW=T.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:s,interactive:a,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:h=!1,...m},g)=>{const v=T.useRef(null),b=T.useRef(null),x=T.useRef(null),E=m.value??m.defaultValue??"",S=Nt(),[O,w]=T.useState(()=>Math.min(320,Vi*o.length)),[C,P]=T.useState(!1),[_,F]=T.useState(""),[j,L]=T.useState(E),[A,D]=T.useState(()=>o.find(Y=>Y.value===E)?.label??E),[z,M]=T.useState(null),k=T.useRef(VW),R=OC(C,"block-only"),$=h&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,B=()=>Ki.flushSync(()=>P(!0)),H=_?im($,"value",[{key:"value",value:_},{key:"label",value:_}]):$,q=()=>{P(!1),w(0)},W=H.filter(Y=>Y.hidden!==!0),oe=h?void 0:`^(${o.map(Y=>`${Pd(Y.value)}${Y.label?"|"+Pd(Y.label):""}`).join("|")})$`,{x:ae,y:ie,strategy:U,refs:G,context:J}=Dr({open:C,transform:!0,onOpenChange:P,placement:"bottom-start",whileElementsMounted:Yo,middleware:[as(4),lv({padding:10,elementContext:"reference",apply(Y){const X=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,de=Qi(G.reference.current,window.innerHeight),he=Math.min(X<Vi?de:X,de,Y.availableHeight),Se=W.length===0?Vi:Math.min(he,de,X),be=`${b.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:be,maxWidth:be,height:Se})}})]}),fe=Hv(J,LW),{getReferenceProps:N,getFloatingProps:ne,getItemProps:te}=Nr([mo(J,{role:"listbox"}),ho(J),cl(J,{cols:0,listRef:k,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);T.useEffect(()=>{if(m.value){const Y=o.find(V=>V.value===m.value);Y&&(D(Y.label??Y.value),L(m.value))}},[m.value,o.length]),T.useEffect(()=>{if(!C)return w(0);const Y=G.reference;if(Y.current===null)return;const V=Qi(Y.current,window.innerHeight);setTimeout(()=>w(Math.min(V,W.length*Vi)),100)},[_,C,G.reference,W.length]),T.useEffect(()=>{const Y=G.reference.current;if(Y)return Xi(Y)},[]);const re=(Y,V)=>{L(Y.value);const X=G.reference.current;if(!X)return;X?.setAttribute("data-value",Y.value),X.value=Y.value;const de=new Event("change",{bubbles:!1,cancelable:!0});X.dispatchEvent(de),m.onChange&&m.onChange(de),D(Y.label??""),q(),F(""),M(V)},Q=Y=>{const V=Y.target.value;return F(V),!C&&V===""?P(!0):(Y.target.name=m.name||"",V?P(!0):m.onChange?.(Y))},Z=()=>{B(),F(""),G.reference.current?.focus()},le=()=>{M(Y=>Y===null?0:Y),B(),F("")},ce=()=>{G.reference.current?.setAttribute("data-value",""),F(""),L(""),D(""),Xg(G.reference.current),q()},pe=m.id||m.name,ge=`${pe}-shadow`,se=W.length===0;return y.jsxs(ps,{...m,left:e,error:t,ref:b,form:m.form,loading:r,name:m.name,feedback:d,hideLeft:f,required:p,title:m.title,container:i,rightLabel:s,interactive:a,id:ge,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:y.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,y.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:Z,children:[y.jsx(Gu,{size:20}),y.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),j?y.jsx("button",{type:"button",onClick:ce,className:"p-2 transition-colors md:p-1 link:text-danger",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[y.jsx("input",{"data-shadow":"true",...N({...m,onFocus:le,pattern:oe,onChange:Q,id:ge,name:ge,ref:G.setReference,onClick:Y=>Y.currentTarget.focus(),onKeyDown(Y){if(Y.key==="Escape")return Y.currentTarget.blur(),q();if(C){if(Y.key==="ArrowDown"){let V=Ue.number(z)?z+1:0;return V>W.length-1&&(V=0),x.current?.scrollIntoView({index:V}),M(V)}if(Y.key==="ArrowUp"){let V=Ue.number(z)?z-1:W.length-1;return V<0&&(V=W.length-1),x.current?.scrollIntoView({index:V}),M(V)}if(Y.key==="Enter"){if(z!==null&&W[z])return Y.preventDefault(),re(W[z],z);if(W.length===1)return Y.preventDefault(),re(W[0],0)}}}}),"data-value":j,"data-error":!!t,"data-name":pe,"data-target":pe,required:p,value:C?_:o.length===0?"":A||j,"aria-autocomplete":"list",autoComplete:"off",className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",m.className)}),y.jsx("input",{id:pe,name:pe,type:"hidden","data-origin":pe,ref:g,required:p,defaultValue:m.value||j||void 0}),y.jsx(po,{preserveTabOrder:!0,children:C?y.jsx(Zo,{modal:!0,guards:!0,returnFocus:!1,context:J,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs(Ye.div,{...ne({ref:xr(R,G.setFloating),style:{...fe.styles,left:ae,top:ie??0,position:U,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:se?"auto":O},className:"overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",onAnimationComplete:()=>{if(!C)return w(0);const V=G.floating.current.querySelectorAll("li").item(0),X=(V?V.getBoundingClientRect().height:Vi)*W.length;return Ki.flushSync(()=>w(X+10))},children:[se?y.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:y.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||S.autocompleteEmpty})}):null,y.jsx(Zp,{overscan:40,ref:x,hidden:se,data:W,defaultItemHeight:Vi,components:jW,scrollerRef:Y=>{v.current=Y},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(Y,V)=>{const X=V.Render??FW,de=j===V.value||j===V.label,he=z===Y,Se=V.label??V.value;return y.jsx("button",{"data-value":V.value,...te({ref:be=>{k.current[Y]=be},role:"option",type:"button","aria-checked":de,"aria-current":de,"aria-selected":de,"aria-busy":V.disabled,onClick:()=>re(V,Y),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${de?"bg-primary-hover text-primary-foreground":""} ${he?"bg-floating-hover text-floating-foreground":""}`}),children:y.jsx(X,{...m,label:V.label,value:V.value,children:Se})})}})]})}):null})]})});class Zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Zn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new Zn(this);return t?t(n):n}static from(t,n){return new Zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(Zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const NC=40,BW=e=>y.jsx(T.Fragment,{children:e.children}),HW={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},FC=[],WW=T.forwardRef(function(t,n){return y.jsx(Ye.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:y.jsx(Wn,{children:t.children})})}),qW=T.forwardRef(function({item:t,context:n,...r},o){return y.jsx(Ye.li,{...r,ref:o,className:"last:rounded-t-lg"})}),UW={List:WW,Item:qW},GW=e=>{const t=Nt(),n=T.useRef(null),r=T.Children.count(e.children),[o,i]=T.useState(!1);return T.useEffect(()=>{if(n.current===null)return;const s=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>s.width)return i(!0)},[r]),y.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?y.jsxs(Ta,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},YW=T.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:s,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:h=!1,onChangeOptions:m,...g},v)=>{const b=T.useMemo(()=>new Zn(r.map(Y=>[Y.value,Y])),[r]),x=T.useRef(null),E=T.useRef(null),S=g.value??g.defaultValue??FC,O=Nt(),[w,C]=T.useState(0),[P,_]=T.useState(!1),[F,j]=T.useState(""),[L,A]=T.useState(()=>{const Y=new Zn;return S.forEach(V=>{const X=b.get(V);return X?Y.set(V,X):void 0}),Y}),D=T.useMemo(()=>Array.from(L.keys()),[L]),[z,M]=T.useState(()=>{const Y=new Set(S);return r.reduce((V,X)=>Y.has(X.value)?[...V,X.label??X.value]:V,[])??S}),[k,R]=T.useState(null),$=T.useRef(FC),B=h&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,H=F.length===0?B:im(B,"value",[{key:"value",value:F},{key:"label",value:F}]),q=OC(P,"block-only"),W=H.filter(Y=>Y.hidden!==!0),oe=W.length===0,{x:ae,y:ie,strategy:U,refs:G,context:J}=Dr({open:P,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Yo,middleware:[as(4),lv({padding:10,elementContext:"reference",apply(Y){const X=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,de=Qi(G.reference.current,window.innerHeight),he=Math.min(X<NC?de:X,de,Y.availableHeight),Se=W.length===0?NC:Math.min(he,de,X),be=`${x.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:be,maxWidth:be,height:Se})}})]}),fe=Hv(J,HW),{getReferenceProps:N,getFloatingProps:ne,getItemProps:te}=Nr([mo(J,{role:"listbox"}),ho(J),cl(J,{cols:0,listRef:$,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Y=>R(V=>Y??V)})]);T.useEffect(()=>{if(!P)return C(0);const Y=G.reference;if(Y.current===null)return;const V=Qi(Y.current,window.innerHeight);setTimeout(()=>C(Math.min(V,W.length*40)),100)},[F,P,G.reference]),T.useEffect(()=>{g.value&&A(new Zn(g.value.map(Y=>[Y,b.get(Y)])))},[g.value,b]),T.useEffect(()=>{const Y=G.reference.current;if(Y)return Xi(Y)},[]);const re=(Y,V)=>{const X=L.clone(Se=>Se.has(Y.value)?Se.remove(Y.value):Se.set(Y.value,Y));A(X);const de=G.reference.current;if(!de)return;const he=X.map(Se=>Se.value);de?.setAttribute("data-value",JSON.stringify(he)),m&&m(he),M(Se=>Se.concat(Y.label??"")),j(""),R(V)},Q=Y=>{const V=Y.target.value;return j(V),!P&&V===""?_(!0):(Y.target.name=g.name||"",V?_(!0):void 0)},Z=()=>{_(!0),j(""),G.reference.current?.focus()},le=()=>{_(!0),j("")},ce=()=>{G.reference.current?.setAttribute("data-value","[]"),j(""),_(!1),A(new Zn),m?.([])},pe=g.id||g.name,ge=L.map((Y,V)=>y.jsx(Ta,{size:"small",icon:y.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:X=>{X.preventDefault(),X.stopPropagation(),re(Y,V)},children:y.jsx(zo,{size:14})}),children:Y.label??Y.value},`MultiSelect-${Y.value}-x`)),se={height:oe?"0":L.size===0?w-49:w-86};return y.jsxs(ps,{...g,left:e,error:t,ref:x,form:g.form,name:g.name,feedback:d,hideLeft:f,required:p,title:g.title,container:o,rightLabel:i,interactive:s,id:g.name||g.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:y.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,y.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Z,children:[y.jsx(Gu,{size:20}),y.jsx("span",{className:"sr-only",children:O.inputCaretDown})]}),L?y.jsx("button",{type:"button",onClick:ce,className:"transition-colors link:text-danger",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[y.jsxs("ul",{...N({...g,onFocus:le,id:`${pe}-shadow`,name:`${pe}-shadow`,ref:G.setReference}),tabIndex:0,role:"button","data-name":pe,"data-target":pe,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),className:Me("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",g.className),children:[D.length>0?null:y.jsx("li",{className:"text-input-placeholder",children:g.placeholder}),y.jsx(GW,{label:c,children:ge})]}),y.jsx("input",{id:pe,name:pe,type:"hidden","data-origin":pe,ref:v,required:p,defaultValue:g.value||D||void 0}),y.jsx(po,{preserveTabOrder:!0,children:P?y.jsx(Fv,{lockScroll:!0,children:y.jsx(Zo,{modal:!0,guards:!0,returnFocus:!1,context:J,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs("div",{...ne({ref:G.setFloating,style:{...fe.styles,top:ie??0,position:U,left:ae,height:w-(D.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[y.jsx("input",{autoFocus:!0,value:F,onChange:Q,title:g.title,placeholder:O.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:Y=>{if(Y.key==="ArrowDown"){let V=k+1;return V>W.length-1&&(V=0),E.current?.scrollIntoView({index:V}),R(V)}if(Y.key==="ArrowUp"){let V=k-1;return V<0&&(V=W.length-1),E.current?.scrollIntoView({index:V}),R(V)}if(Y.key==="Escape")return Y.currentTarget.blur(),_(!1);if(Y.key==="Enter"){if(k!==null&&W[k])return Y.preventDefault(),re(W[k],k);if(W.length===1)return Y.preventDefault(),re(W[0],0)}}}),oe?y.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:y.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:a||O.autocompleteEmpty})}):null,oe?null:y.jsx(Ye.div,{initial:!1,"data-floating":"true",ref:q,animate:{height:oe?"auto":w},style:se,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!P)return C(0);const V=G.floating.current.querySelectorAll("li").item(0),X=(V?V.getBoundingClientRect().height:40)*W.length;return Ki.flushSync(()=>C(X+2))},children:y.jsx(Zp,{ref:E,hidden:oe,data:W,components:UW,style:se,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(Y,V)=>{const X=V.Render??BW,de=L.has(V.value)||L.has(V.label??""),he=k===Y,Se=V.label??V.value;return y.jsxs("button",{"data-value":V.value,...te({ref:be=>{$.current[Y]=be},role:"option",type:"button","aria-checked":de,"aria-current":de,"aria-selected":de,"aria-busy":V.disabled,onClick:()=>re(V,Y)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${de||he?"bg-floating-hover text-floating-foreground":""}`,children:[y.jsx(dh,{onChange:Ad,checked:de,"aria-checked":de,onClick:be=>{be.stopPropagation(),re(V,Y)}}),y.jsx(X,{...g,label:V.label,value:V.value,children:Se})]})}})}),y.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:L.size===0?y.jsx(Ta,{theme:"muted",size:"small",children:O.autocompleteEmpty}):ge})]})})}):null})]})}),KW=e=>{const[t,n]=T.useState(0);return T.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},ZW={Item:T.forwardRef(function(t,n){return y.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:T.forwardRef(function(t,n){return y.jsx("ul",{...t,ref:n,className:"space-y-3"})})},XW=e=>{const t=T.useRef(null),n=KW(t);return y.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[y.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[y.jsx("header",{className:"border-b border-card-border pb-2"}),y.jsxs("div",{className:"px-8 space-y-2",children:[y.jsx(Jo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),y.jsx(Zp,{height:n,useWindowScroll:!0,data:e.source,components:ZW,itemContent:(r,o)=>y.jsx(T.Fragment,{children:y.jsx(dh,{children:y.jsx(e.Item,{data:o})})})})]})]}),y.jsx("div",{children:y.jsx(ul,{children:y.jsx(Yu,{})})}),y.jsx("div",{})]})};function QW(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const JW=({children:e,...t})=>{const n=Lr(t.onIntersection),r=T.useRef(null),[o,i]=T.useState(()=>r.current===null?!1:QW(r.current));return T.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return a.observe(s),()=>a.disconnect()},[]),y.jsx("div",{...t,ref:r,children:o?e:null})};let LC=0;function e5(e){return LC+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${LC}`}const $c=I.createContext(void 0);process.env.NODE_ENV!=="production"&&($c.displayName="ToastContext");function sm(){const e=I.useContext($c);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":bn(73));return e}function am(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const VC=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,[s,a]=I.useState([]),[l,c]=I.useState(!1),[u,d]=I.useState(!1),[f,p]=I.useState(null);s.length===0&&(l&&c(!1),u&&d(!1));const h=l||u,m=I.useRef(new Map),g=I.useRef(null),v=I.useRef(!0),b=I.useRef(!1);function x(L){const A=In(nn(g.current));if(!g.current||!bt(g.current,A)||!Bd(A))return;const D=s.findIndex(k=>k.id===L);let z=null,M=D+1;for(;M<s.length;){if(s[M].transitionStatus!=="ending"){z=s[M];break}M+=1}if(!z)for(M=D-1;M>=0;){if(s[M].transitionStatus!=="ending"){z=s[M];break}M-=1}z?z.ref?.current?.focus():f?.focus({preventScroll:!0})}const E=ke(()=>{b.current||(b.current=!0,m.current.forEach(L=>{if(L.timeout){L.timeout.clear();const A=Date.now()-L.start,D=L.delay-A;L.remaining=D>0?D:0}}))}),S=ke(()=>{b.current&&(b.current=!1,m.current.forEach((L,A)=>{L.remaining=L.remaining>0?L.remaining:L.delay,L.timeout??=Ur.create(),L.timeout.start(L.remaining,()=>{m.current.delete(A),L.callback()}),L.start=Date.now()}))}),O=ke(L=>{a(z=>{const M=z.map(R=>R.id===L?{...R,transitionStatus:"ending",height:0}:R),k=M.filter(R=>R.transitionStatus!=="ending");return M.map(R=>{if(R.transitionStatus==="ending")return R;const $=k.indexOf(R)>=o;return{...R,limited:$}})});const A=m.current.get(L);A&&A.timeout&&(A.timeout.clear(),m.current.delete(L)),s.find(z=>z.id===L)?.onClose?.(),x(L),s.length===1&&(c(!1),d(!1))}),w=ke(L=>{a(D=>D.filter(z=>z.id!==L)),s.find(D=>D.id===L)?.onRemove?.()}),C=ke((L,A,D)=>{const z=Date.now(),M=v.current&&!l&&!u,k=M?Ur.create():void 0;k?.start(A,()=>{m.current.delete(L),D()}),m.current.set(L,{timeout:k,start:M?z:0,delay:A,remaining:A,callback:D})}),P=ke(L=>{const A=L.id||e5("toast"),D={...L,id:A,transitionStatus:"starting"};a(M=>{const k=[D,...M],R=k.filter($=>$.transitionStatus!=="ending");if(R.length>o){const $=R.length-o,B=R.slice(-$);return k.map(H=>B.some(q=>q.id===H.id)?{...H,limited:!0}:{...H,limited:!1})}return k.map($=>({...$,limited:!1}))});const z=D.timeout??r;return D.type!=="loading"&&z>0&&C(A,z,()=>O(A)),(l||u||!v.current)&&E(),A}),_=ke((L,A)=>{const D=s.find(W=>W.id===L)??null,z=D?{...D,...A}:null;if(Xn.flushSync(()=>{a(W=>W.map(oe=>oe.id===L?{...oe,...A}:oe))}),!z)return;const M=z.timeout??r,k=D?.timeout??r,R=Object.hasOwn(A,"timeout"),$=z.transitionStatus!=="ending"&&z.type!=="loading"&&M>0,B=m.current.has(L),H=k!==M,q=D?.type==="loading";if(!$&&B){m.current.get(L)?.timeout?.clear(),m.current.delete(L);return}if($&&(!B||H||R||q)){const W=m.current.get(L);W&&(W.timeout?.clear(),m.current.delete(L)),C(L,M,()=>O(L)),(l||u||!v.current)&&E()}}),F=ke((L,A)=>{const D=am(A.loading),z=P({...D,type:"loading"}),M=L.then(k=>{const R=am(A.success,k);return _(z,{...R,type:"success",timeout:R.timeout}),k}).catch(k=>{const R=am(A.error,k);return _(z,{...R,type:"error",timeout:R.timeout}),Promise.reject(k)});return{}.hasOwnProperty.call(A,"setPromise")&&A.setPromise(M),M});I.useEffect(function(){return i?i[" subscribe"](({action:D,options:z})=>{const M=z.id;D==="promise"&&z.promise?F(z.promise,z):D==="update"&&M?_(M,z):D==="close"&&M?O(M):P(z)}):void 0},[P,_,C,r,i,F,O]);const j=I.useMemo(()=>({toasts:s,setToasts:a,hovering:l,setHovering:c,focused:u,setFocused:d,expanded:h,add:P,close:O,remove:w,update:_,promise:F,pauseTimers:E,resumeTimers:S,prevFocusElement:f,setPrevFocusElement:p,viewportRef:g,scheduleTimer:C,windowFocusedRef:v}),[P,O,u,l,h,E,f,F,w,S,C,s,_]);return y.jsx($c.Provider,{value:j,children:n})};process.env.NODE_ENV!=="production"&&(VC.displayName="ToastProvider");const RC=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(RC.displayName="ToastViewportContext");let t5=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const $C=I.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,{toasts:a,pauseTimers:l,resumeTimers:c,setHovering:u,setFocused:d,viewportRef:f,windowFocusedRef:p,prevFocusElement:h,setPrevFocusElement:m,expanded:g,focused:v}=sm(),b=I.useRef(!1),x=I.useRef(!1),E=a.length,S=a[0]?.height??0,O=I.useMemo(()=>a.some(k=>k.transitionStatus==="ending"),[a]);I.useEffect(()=>{if(!f.current)return;function k($){E!==0&&$.key==="F6"&&$.target!==f.current&&($.preventDefault(),m(In(nn(f.current))),f.current?.focus({preventScroll:!0}),l(),d(!0))}const R=Ft(f.current);return R.addEventListener("keydown",k),()=>{R.removeEventListener("keydown",k)}},[l,d,m,E,f]),I.useEffect(()=>{if(!f.current||!E)return;const k=Ft(f.current);function R(B){B.target===k&&(p.current=!1,l())}function $(B){if(B.relatedTarget||B.target===k)return;const H=pn(B),q=In(nn(f.current));(!bt(f.current,H)||!Bd(q))&&c(),setTimeout(()=>{p.current=!0})}return k.addEventListener("blur",R,!0),k.addEventListener("focus",$,!0),()=>{k.removeEventListener("blur",R,!0),k.removeEventListener("focus",$,!0)}},[l,c,f,p,d,E]),I.useEffect(()=>{const k=f.current;if(!k||E===0)return;const R=nn(k);function $(B){if(B.pointerType!=="touch")return;const H=pn(B);bt(k,H)||(c(),u(!1),d(!1))}return R.addEventListener("pointerdown",$,!0),()=>{R.removeEventListener("pointerdown",$,!0)}},[E,c,d,u,f]);function w(k){f.current&&(b.current=!0,k.relatedTarget===f.current?a[0]?.ref?.current?.focus():h?.focus({preventScroll:!0}))}function C(k){k.key==="Tab"&&k.shiftKey&&k.target===f.current&&(k.preventDefault(),h?.focus({preventScroll:!0}),c())}I.useEffect(()=>{!p.current||O||!x.current||(c(),u(!1),x.current=!1)},[O,c,u,p]);function P(){l(),u(!0),x.current=!1}function _(){a.some(k=>k.transitionStatus==="ending")?x.current=!0:(c(),u(!1))}function F(){if(b.current){b.current=!1;return}v||Bd(nn(f.current).activeElement)&&(d(!0),l())}function j(k){!v||bt(f.current,k.relatedTarget)||(d(!1),c())}const L={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:P,onMouseMove:P,onMouseLeave:_,onFocus:F,onBlur:j,onKeyDown:C,onClick:F},A=I.useMemo(()=>({expanded:g}),[g]),D=Rt("div",t,{ref:[n,f],state:A,props:[L,{style:{[t5.frontmostHeight]:S?`${S}px`:void 0}},s,{children:y.jsxs(I.Fragment,{children:[E>0&&h&&y.jsx(Gr,{onFocus:w}),i,E>0&&h&&y.jsx(Gr,{onFocus:w})]})}]}),z=I.useMemo(()=>({viewportRef:f}),[f]),M=I.useMemo(()=>a.filter(k=>k.priority==="high"),[a]);return y.jsxs(RC.Provider,{value:z,children:[E>0&&h&&y.jsx(Gr,{onFocus:w}),D,!v&&M.length>0&&y.jsx("div",{style:xs,children:M.map(k=>y.jsxs("div",{role:"alert","aria-atomic":!0,children:[y.jsx("div",{children:k.title}),y.jsx("div",{children:k.description})]},k.id))})]})});process.env.NODE_ENV!=="production"&&($C.displayName="ToastViewport");const lm=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(lm.displayName="ToastRootContext");function Ri(){const e=I.useContext(lm);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":bn(66));return e}let Do=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const n5={...hc,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},ha=40,r5=10,Zr=.5,o5=1;function jC(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function i5(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const s=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(s){const a=s[1].split(", ").map(parseFloat);a.length===6?(r=a[4],o=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(r=a[12],o=a[13],i=a[0])}}return{x:r,y:o,scale:i}}const zC=I.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:s=["down","right"],...a}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(s)?s:[s]);const u=c.length>0,{toasts:d,focused:f,close:p,remove:h,setToasts:m,pauseTimers:g,expanded:v,setHovering:b}=sm(),[x,E]=I.useState(void 0),[S,O]=I.useState(!1),[w,C]=I.useState(!1),[P,_]=I.useState(!1),[F,j]=I.useState({x:0,y:0}),[L,A]=I.useState({x:0,y:0,scale:1}),[D,z]=I.useState(),[M,k]=I.useState(),[R,$]=I.useState(null),B=I.useRef(null),H=I.useRef({x:0,y:0}),q=I.useRef({x:0,y:0,scale:1}),W=I.useRef(void 0),oe=I.useRef(0),ae=I.useRef(!1),ie=I.useRef({x:0,y:0}),U=I.useRef(!1),G=I.useMemo(()=>d.indexOf(r),[r,d]),J=I.useMemo(()=>d.filter(V=>V.transitionStatus!=="ending").indexOf(r),[r,d]),fe=I.useMemo(()=>d.slice(0,d.indexOf(r)).reduce((V,X)=>V+(X.height||0),0),[d,r]);kh({open:r.transitionStatus!=="ending",ref:B,onComplete(){r.transitionStatus==="ending"&&h(r.id)}});const N=ke((V=!1)=>{const X=B.current;if(!X)return;const de=X.style.height;X.style.height="auto";const he=X.offsetHeight;X.style.height=de;function Se(){m(be=>be.map(Ae=>Ae.id===r.id?{...Ae,ref:B,height:he,transitionStatus:void 0}:Ae))}V?Xn.flushSync(Se):Se()});We(N,[N]);function ne(V,X){let de=V,he=X;return!c.includes("left")&&!c.includes("right")?de=V>0?V**Zr:-(Math.abs(V)**Zr):(!c.includes("right")&&V>0&&(de=V**Zr),!c.includes("left")&&V<0&&(de=-(Math.abs(V)**Zr))),!c.includes("up")&&!c.includes("down")?he=X>0?X**Zr:-(Math.abs(X)**Zr):(!c.includes("down")&&X>0&&(he=X**Zr),!c.includes("up")&&X<0&&(he=-(Math.abs(X)**Zr))),{x:de,y:he}}function te(V){if(V.button!==0)return;V.pointerType==="touch"&&g();const X=pn(V.nativeEvent);if(!(X&&X.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(ae.current=!1,W.current=void 0,oe.current=0,H.current={x:V.clientX,y:V.clientY},ie.current=H.current,B.current){const he=i5(B.current);q.current=he,A(he),j({x:he.x,y:he.y})}b(!0),O(!0),C(!1),$(null),U.current=!0,B.current?.setPointerCapture(V.pointerId)}}function re(V){if(!S)return;V.preventDefault(),U.current&&(H.current={x:V.clientX,y:V.clientY},U.current=!1);const{clientY:X,clientX:de,movementX:he,movementY:Se}=V;(Se<0&&X>ie.current.y||Se>0&&X<ie.current.y)&&(ie.current={x:ie.current.x,y:X}),(he<0&&de>ie.current.x||he>0&&de<ie.current.x)&&(ie.current={x:de,y:ie.current.y});const be=de-H.current.x,Ae=X-H.current.y,qe=X-ie.current.y,gt=de-ie.current.x;if(!w&&Math.sqrt(be*be+Ae*Ae)>=o5&&(C(!0),R===null)){const _e=c.includes("left")||c.includes("right"),Ze=c.includes("up")||c.includes("down");if(_e&&Ze){const Qe=Math.abs(be),Fe=Math.abs(Ae);$(Qe>Fe?"horizontal":"vertical")}}let yt;if(!W.current)R==="vertical"?Ae>0?yt="down":Ae<0&&(yt="up"):R==="horizontal"?be>0?yt="right":be<0&&(yt="left"):Math.abs(be)>=Math.abs(Ae)?yt=be>0?"right":"left":yt=Ae>0?"down":"up",yt&&c.includes(yt)&&(W.current=yt,oe.current=jC(yt,be,Ae),E(yt));else{const ee=W.current,_e=jC(ee,gt,qe);_e>ha?(ae.current=!1,E(ee)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&oe.current-_e>=r5&&(ae.current=!0)}const Bt=ne(be,Ae);let $e=q.current.x,K=q.current.y;R==="horizontal"?(c.includes("left")||c.includes("right"))&&($e+=Bt.x):(R==="vertical"||(c.includes("left")||c.includes("right"))&&($e+=Bt.x),(c.includes("up")||c.includes("down"))&&(K+=Bt.y)),j({x:$e,y:K})}function Q(V){if(!S)return;if(O(!1),C(!1),$(null),B.current?.releasePointerCapture(V.pointerId),ae.current){j({x:L.x,y:L.y}),E(void 0);return}let X=!1;const de=F.x-L.x,he=F.y-L.y;let Se;for(const be of c){switch(be){case"right":de>ha&&(X=!0,Se="right");break;case"left":de<-ha&&(X=!0,Se="left");break;case"down":he>ha&&(X=!0,Se="down");break;case"up":he<-ha&&(X=!0,Se="up");break}if(X)break}X?(E(Se),_(!0),p(r.id)):(j({x:L.x,y:L.y}),E(void 0))}function Z(V){if(V.key==="Escape"){if(!B.current||!bt(B.current,In(nn(B.current))))return;p(r.id)}}I.useEffect(()=>{if(!u)return;const V=B.current;if(!V)return;function X(de){bt(V,de.target)&&de.preventDefault()}return V.addEventListener("touchmove",X,{passive:!1}),()=>{V.removeEventListener("touchmove",X)}},[u]);function le(){if(!S&&F.x===L.x&&F.y===L.y&&!P)return{[Do.swipeMovementX]:"0px",[Do.swipeMovementY]:"0px"};const V=F.x-L.x,X=F.y-L.y;return{transition:S?"none":void 0,transform:S?`translateX(${F.x}px) translateY(${F.y}px) scale(${L.scale})`:void 0,[Do.swipeMovementX]:`${V}px`,[Do.swipeMovementY]:`${X}px`}}const ce=r.priority==="high",pe={role:ce?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":D,"aria-describedby":M,"aria-hidden":ce&&!f?!0:void 0,onPointerDown:u?te:void 0,onPointerMove:u?re:void 0,onPointerUp:u?Q:void 0,onKeyDown:Z,inert:QE(r.limited),style:{...le(),[Do.index]:r.transitionStatus==="ending"?G:J,[Do.offsetY]:`${fe}px`,[Do.height]:r.height?`${r.height}px`:void 0}},ge=I.useMemo(()=>({rootRef:B,toast:r,titleId:D,setTitleId:z,descriptionId:M,setDescriptionId:k,swiping:S,swipeDirection:x,recalculateHeight:N,index:G,visibleIndex:J,expanded:v}),[r,D,M,S,x,N,G,J,v]),se=I.useMemo(()=>({transitionStatus:r.transitionStatus,expanded:v,limited:r.limited||!1,type:r.type,swiping:ge.swiping,swipeDirection:ge.swipeDirection}),[v,r.transitionStatus,r.limited,r.type,ge.swiping,ge.swipeDirection]),Y=Rt("div",t,{ref:[n,ge.rootRef],state:se,stateAttributesMapping:n5,props:[pe,a]});return y.jsx(lm.Provider,{value:ge,children:Y})});process.env.NODE_ENV!=="production"&&(zC.displayName="ToastRoot");const BC=I.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:s,expanded:a,recalculateHeight:l}=Ri(),c=I.useRef(null);We(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const h=new ResizeObserver(()=>l(!0)),m=new MutationObserver(()=>l(!0));return h.observe(p),m.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{h.disconnect(),m.disconnect()}},[l]);const u=s>0,d=I.useMemo(()=>({expanded:a,behind:u}),[a,u]);return Rt("div",t,{ref:[n,c],state:d,props:i})});process.env.NODE_ENV!=="production"&&(BC.displayName="ToastContent");const HC=I.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l}=Ri(),c=s??l.description,u=!!c,d=ei(i),{setDescriptionId:f}=Ri();We(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=I.useMemo(()=>({type:l.type}),[l.type]),h=Rt("p",t,{ref:n,state:p,props:{...a,id:d,children:c}});return u?h:null});process.env.NODE_ENV!=="production"&&(HC.displayName="ToastDescription");const WC=I.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l}=Ri(),c=s??l.title,u=!!c,d=ei(i),{setTitleId:f}=Ri();We(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=I.useMemo(()=>({type:l.type}),[l.type]),h=Rt("h2",t,{ref:n,state:p,props:{...a,id:d,children:c}});return u?h:null});process.env.NODE_ENV!=="production"&&(WC.displayName="ToastTitle");const qC=I.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:s=!0,...a}=t,{close:l,expanded:c}=sm(),{toast:u}=Ri(),[d,f]=I.useState(!1),{getButtonProps:p,buttonRef:h}=mh({disabled:i,native:s}),m=I.useMemo(()=>({type:u.type}),[u.type]);return Rt("button",t,{ref:[n,h],state:m,props:[{"aria-hidden":!c&&!d,onClick(){l(u.id)},onFocus(){f(!0)},onBlur(){f(!1)}},a,p]})});process.env.NODE_ENV!=="production"&&(qC.displayName="ToastClose");const UC=I.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,...a}=t,{portalNode:l,portalSubtree:c}=AE({container:o,ref:n,componentProps:t,elementProps:a});return!c&&!l?null:y.jsxs(I.Fragment,{children:[c,l&&Xn.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(UC.displayName="FloatingPortalLite");const s5=UC;function GC(){const e=I.useContext($c);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":bn(73));const{toasts:t,add:n,close:r,update:o,promise:i}=e;return I.useMemo(()=>({toasts:t,add:n,close:r,update:o,promise:i}),[t,n,r,o,i])}const a5=e=>{const[t,n]=T.useState(!1),r=()=>n(!0),o=()=>n(!1);return T.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},l5=Lo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification",{variants:{theme:{default:"border-card-border bg-card-background text-foreground",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border"}},defaultVariants:{theme:"default"}}),YC=T.createContext(()=>{throw new Error("Not implemented")}),c5=()=>T.useContext(YC),KC={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}};function u5(e){const t=e.toast.data?.closable??!0,n=e.hover?"hover":e.isLast?"isLast":"other",r=l5({theme:e.toast.data?.theme||"default"});return y.jsx(zC,{toast:e.toast,swipeDirection:["down","right"],children:y.jsx(Ye.li,{layout:!0,layoutScroll:!0,animate:n,"data-index":e.index,initial:{y:-100,zIndex:-1},className:"absolute top-0 right-0 w-80 pointer-events-auto text-select",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:KC[e.reversedIndex]||KC.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:y.jsxs(BC,{className:r,children:[y.jsxs("div",{className:"flex flex-col p-4",children:[e.toast.title?y.jsx(WC,{className:"text-lg font-medium leading-relaxed select-text truncate"}):null,y.jsx(HC,{className:"select-text truncate"})]}),t?y.jsx(qC,{className:"absolute top-2 right-2 p-1 rounded-full transition text-foreground hover:bg-danger/10 hover:text-danger-hover",children:y.jsx(zo,{className:"size-5"})}):null]})})})}function d5({max:e=5}){const t=T.useRef(null),n=a5(t),o=GC().toasts.slice(-e);return y.jsx($C,{ref:t,"data-items":o.length,style:{justifyContent:"start",height:`${(n?o.length:Math.min(1,o.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20",children:y.jsx(Ye.ol,{className:"flex flex-col gap-4",children:y.jsx(Wn,{presenceAffectsLayout:!0,mode:"popLayout",children:o.reverse().map((i,s,a)=>y.jsx(u5,{toast:i,hover:n,index:s,isLast:a.length-1===s,reversedIndex:a.length-(s+1)},i.id))})})})}function f5({children:e,max:t=5}){const n=GC(),r=T.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=T.useCallback((i,s)=>{const a=n.add({description:i,title:s?.title,timeout:s?.timeout,data:{theme:s?.theme,closable:s?.closable}});return{close:()=>n.close(a),clear:r}},[n,r]);return y.jsxs(YC.Provider,{value:o,children:[e,y.jsx(s5,{children:y.jsx(d5,{max:t})})]})}function p5({children:e,max:t=5,timeout:n=5e3}){return y.jsx(VC,{limit:t,timeout:n,children:y.jsx(f5,{max:t,children:e})})}const h5=/Mac|iPod|iPhone|iPad/,jc=()=>h5.test(navigator.userAgent),m5=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?jc()?"Meta":"Control":n==="Hyper"?jc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),ZC=e=>e.map(t=>t.trim()).join("+");class g5{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=ZC(m5(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const a=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?a.toUpperCase():a.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const s=ZC(Array.from(i));this.combinations.forEach(a=>{if(a.key===s)return r.preventDefault(),void a.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const y5=e=>(e=e.trim(),e==="Alt"?jc()?y.jsx(qO,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?jc()?y.jsx($O,{"aria-label":"Command",size:14}):"Ctrl":e),v5=e=>{const t=e.value.trim().split("+");return y.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return y.jsxs(T.Fragment,{children:[y.jsx("kbd",{"aria-label":n,children:y5(n)}),o?null:y.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},b5=e=>y.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Bu(e.item.title)?y.jsx(e.item.title,{text:e.text}):e.item.title}),x5=T.forwardRef((e,t)=>{const n=T.useId(),r=e.active,o=e.item;return o.type==="group"?y.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:y.jsx(b5,{text:e.text,item:o})}):o.type!=="shortcut"?y.jsx(T.Fragment,{}):y.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Me("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[y.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,y.jsx("span",{children:Bu(o.title)?y.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?y.jsx(v5,{value:o.shortcut}):null]})}),w5=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(a=>({...a,title:Ue.function(a.title)?a.title({text:t}):a.title})),o=r.reduce((a,l)=>{const c=Ue.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&a.push({...l,enabled:c}),a},[]),i=im(o,"title",n),s=r.filter(a=>Ue.function(a.enabled)?a.enabled({text:t}):!1);return Zn.unique(i.concat(s),a=>a.title)},S5=[0,0,0,0,0],E5=e=>{const t=e.bind??"Mod + k",n=T.useRef([]),r=Nt(),[o,i]=T.useState(""),s=Lr(o),a=T.useId(),l=T.useRef(null),[c,u]=T.useState(null),d=Dr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Yo}),f=cl(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:b=>u(x=>Ue.number(b)?b:e.open?x??0:null)}),{getItemProps:p}=Nr([f]),h=e.commands.flatMap(b=>b.type==="group"?[b,...b.items]:[b]),m=w5(h,o),g=o===""?h:[{type:"group",title:"Results",items:[]},...m.filter(b=>b.type!=="group")];T.useEffect(()=>{const b=new g5;return b.add(t,()=>e.onChangeVisibility?.(!0)),h.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&b.add(x.shortcut,E=>x.action({event:E,text:s.current,setOpen:e.onChangeVisibility}))}),b.register()},[t]);const v=e.Icon??vy;return y.jsx(T.Fragment,{children:y.jsxs(_h,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[y.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[y.jsx("div",{className:"flex size-10 items-center justify-center",children:y.jsx(v,{Default:vy,text:o,size:16})}),y.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:b=>i(b.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:b=>{if((b.key==="ArrowDown"||b.key==="ArrowUp")&&c!==null&&n.current[c]?.scrollIntoView({block:"start",inline:"start"}),b.key==="Enter"){if(c!==null&&g[c]){b.preventDefault();const x=g[c],E=b.currentTarget.value;if(x.type==="shortcut")return x.action({event:b,setOpen:e.onChangeVisibility,text:E})}if(g.length===1){b.preventDefault();const x=g[0],E=b.currentTarget.value;if(x.type==="shortcut")return x.action({event:b,setOpen:e.onChangeVisibility,text:E})}}}})]}),e.loading?y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[y.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),S5.map((b,x)=>y.jsx("li",{className:Me("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:eh},`${a}-${x}-skeleton-index`))]}):y.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[g.map((b,x)=>T.createElement(x5,{...p({onMouseEnter:()=>u(x),ref(E){n.current[x]=E},onClick(E){E.preventDefault(),e.onChangeVisibility(!1),d.refs.domReference.current?.focus(),b.type==="shortcut"&&b.action({event:E,setOpen:e.onChangeVisibility,text:o})}}),item:b,text:o,active:c===x,key:`${a}-${b.type}-${x}`})),g.length===1?y.jsx("div",{className:Me("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Ue.number(c)?y.jsx(e.Preview,{command:g[c],text:o}):null]}),e.footer?y.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},T5=["INPUT","SELECT"],XC=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{T5.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var cm,QC;function um(){if(QC)return cm;QC=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return cm={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},cm}var dm,JC;function ek(){if(JC)return dm;JC=1;var e=um(),t=_g(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,C){return o.set(w,C),w},s=function(w){return o.has(w)},a=function(w){return o.get(w)},l=function(w,C){o.set(w,C)},c=(function(){for(var O=[],w=0;w<256;++w)O.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return O})(),u=function(w){for(;w.length>1;){var C=w.pop(),P=C.obj[C.prop];if(r(P)){for(var _=[],F=0;F<P.length;++F)typeof P[F]<"u"&&_.push(P[F]);C.obj[C.prop]=_}}},d=function(w,C){for(var P=C&&C.plainObjects?{__proto__:null}:{},_=0;_<w.length;++_)typeof w[_]<"u"&&(P[_]=w[_]);return P},f=function O(w,C,P){if(!C)return w;if(typeof C!="object"&&typeof C!="function"){if(r(w))w.push(C);else if(w&&typeof w=="object")if(s(w)){var _=a(w)+1;w[_]=C,l(w,_)}else(P&&(P.plainObjects||P.allowPrototypes)||!n.call(Object.prototype,C))&&(w[C]=!0);else return[w,C];return w}if(!w||typeof w!="object"){if(s(C)){for(var F=Object.keys(C),j=P&&P.plainObjects?{__proto__:null,0:w}:{0:w},L=0;L<F.length;L++){var A=parseInt(F[L],10);j[A+1]=C[F[L]]}return i(j,a(C)+1)}return[w].concat(C)}var D=w;return r(w)&&!r(C)&&(D=d(w,P)),r(w)&&r(C)?(C.forEach(function(z,M){if(n.call(w,M)){var k=w[M];k&&typeof k=="object"&&z&&typeof z=="object"?w[M]=O(k,z,P):w.push(z)}else w[M]=z}),w):Object.keys(C).reduce(function(z,M){var k=C[M];return n.call(z,M)?z[M]=O(z[M],k,P):z[M]=k,z},D)},p=function(w,C){return Object.keys(C).reduce(function(P,_){return P[_]=C[_],P},w)},h=function(O,w,C){var P=O.replace(/\+/g," ");if(C==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},m=1024,g=function(w,C,P,_,F){if(w.length===0)return w;var j=w;if(typeof w=="symbol"?j=Symbol.prototype.toString.call(w):typeof w!="string"&&(j=String(w)),P==="iso-8859-1")return escape(j).replace(/%u[0-9a-f]{4}/gi,function(R){return"%26%23"+parseInt(R.slice(2),16)+"%3B"});for(var L="",A=0;A<j.length;A+=m){for(var D=j.length>=m?j.slice(A,A+m):j,z=[],M=0;M<D.length;++M){var k=D.charCodeAt(M);if(k===45||k===46||k===95||k===126||k>=48&&k<=57||k>=65&&k<=90||k>=97&&k<=122||F===e.RFC1738&&(k===40||k===41)){z[z.length]=D.charAt(M);continue}if(k<128){z[z.length]=c[k];continue}if(k<2048){z[z.length]=c[192|k>>6]+c[128|k&63];continue}if(k<55296||k>=57344){z[z.length]=c[224|k>>12]+c[128|k>>6&63]+c[128|k&63];continue}M+=1,k=65536+((k&1023)<<10|D.charCodeAt(M)&1023),z[z.length]=c[240|k>>18]+c[128|k>>12&63]+c[128|k>>6&63]+c[128|k&63]}L+=z.join("")}return L},v=function(w){for(var C=[{obj:{o:w},prop:"o"}],P=[],_=0;_<C.length;++_)for(var F=C[_],j=F.obj[F.prop],L=Object.keys(j),A=0;A<L.length;++A){var D=L[A],z=j[D];typeof z=="object"&&z!==null&&P.indexOf(z)===-1&&(C.push({obj:j,prop:D}),P.push(z))}return u(C),w},b=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},x=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},E=function(w,C,P,_){if(s(w)){var F=a(w)+1;return w[F]=C,l(w,F),w}var j=[].concat(w,C);return j.length>P?i(d(j,{plainObjects:_}),j.length-1):j},S=function(w,C){if(r(w)){for(var P=[],_=0;_<w.length;_+=1)P.push(C(w[_]));return P}return C(w)};return dm={arrayToObject:d,assign:p,combine:E,compact:v,decode:h,encode:g,isBuffer:x,isOverflow:s,isRegExp:b,maybeMap:S,merge:f},dm}var fm,tk;function C5(){if(tk)return fm;tk=1;var e=_g(),t=ek(),n=um(),r=Object.prototype.hasOwnProperty,o={brackets:function(g){return g+"[]"},comma:"comma",indices:function(g,v){return g+"["+v+"]"},repeat:function(g){return g}},i=Array.isArray,s=Array.prototype.push,a=function(m,g){s.apply(m,i(g)?g:[g])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(g){return l.call(g)},skipNulls:!1,strictNullHandling:!1},d=function(g){return typeof g=="string"||typeof g=="number"||typeof g=="boolean"||typeof g=="symbol"||typeof g=="bigint"},f={},p=function m(g,v,b,x,E,S,O,w,C,P,_,F,j,L,A,D,z,M){for(var k=g,R=M,$=0,B=!1;(R=R.get(f))!==void 0&&!B;){var H=R.get(g);if($+=1,typeof H<"u"){if(H===$)throw new RangeError("Cyclic object value");B=!0}typeof R.get(f)>"u"&&($=0)}if(typeof P=="function"?k=P(v,k):k instanceof Date?k=j(k):b==="comma"&&i(k)&&(k=t.maybeMap(k,function(re){return re instanceof Date?j(re):re})),k===null){if(S)return C&&!D?C(v,u.encoder,z,"key",L):v;k=""}if(d(k)||t.isBuffer(k)){if(C){var q=D?v:C(v,u.encoder,z,"key",L);return[A(q)+"="+A(C(k,u.encoder,z,"value",L))]}return[A(v)+"="+A(String(k))]}var W=[];if(typeof k>"u")return W;var oe;if(b==="comma"&&i(k))D&&C&&(k=t.maybeMap(k,C)),oe=[{value:k.length>0?k.join(",")||null:void 0}];else if(i(P))oe=P;else{var ae=Object.keys(k);oe=_?ae.sort(_):ae}var ie=w?String(v).replace(/\./g,"%2E"):String(v),U=x&&i(k)&&k.length===1?ie+"[]":ie;if(E&&i(k)&&k.length===0)return U+"[]";for(var G=0;G<oe.length;++G){var J=oe[G],fe=typeof J=="object"&&J&&typeof J.value<"u"?J.value:k[J];if(!(O&&fe===null)){var N=F&&w?String(J).replace(/\./g,"%2E"):String(J),ne=i(k)?typeof b=="function"?b(U,N):U:U+(F?"."+N:"["+N+"]");M.set(g,$);var te=e();te.set(f,M),a(W,m(fe,ne,b,x,E,S,O,w,b==="comma"&&D&&i(k)?null:C,P,_,F,j,L,A,D,z,te))}}return W},h=function(g){if(!g)return u;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.encodeDotInKeys<"u"&&typeof g.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(g.encoder!==null&&typeof g.encoder<"u"&&typeof g.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=g.charset||u.charset;if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof g.format<"u"){if(!r.call(n.formatters,g.format))throw new TypeError("Unknown format option provided.");b=g.format}var x=n.formatters[b],E=u.filter;(typeof g.filter=="function"||i(g.filter))&&(E=g.filter);var S;if(g.arrayFormat in o?S=g.arrayFormat:"indices"in g?S=g.indices?"indices":"repeat":S=u.arrayFormat,"commaRoundTrip"in g&&typeof g.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var O=typeof g.allowDots>"u"?g.encodeDotInKeys===!0?!0:u.allowDots:!!g.allowDots;return{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:u.addQueryPrefix,allowDots:O,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:S,charset:v,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!g.commaRoundTrip,delimiter:typeof g.delimiter>"u"?u.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:u.encode,encodeDotInKeys:typeof g.encodeDotInKeys=="boolean"?g.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof g.encoder=="function"?g.encoder:u.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:u.encodeValuesOnly,filter:E,format:b,formatter:x,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:u.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:u.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:u.strictNullHandling}};return fm=function(m,g){var v=m,b=h(g),x,E;typeof b.filter=="function"?(E=b.filter,v=E("",v)):i(b.filter)&&(E=b.filter,x=E);var S=[];if(typeof v!="object"||v===null)return"";var O=o[b.arrayFormat],w=O==="comma"&&b.commaRoundTrip;x||(x=Object.keys(v)),b.sort&&x.sort(b.sort);for(var C=e(),P=0;P<x.length;++P){var _=x[P],F=v[_];b.skipNulls&&F===null||a(S,p(F,_,O,w,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,C))}var j=S.join(b.delimiter),L=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?L+="utf8=%26%2310003%3B&":L+="utf8=%E2%9C%93&"),j.length>0?L+j:""},fm}var pm,nk;function k5(){if(nk)return pm;nk=1;var e=ek(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(h,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,h,m){if(p&&typeof p=="string"&&h.comma&&p.indexOf(",")>-1)return p.split(",");if(h.throwOnLimitExceeded&&m>=h.arrayLimit)throw new RangeError("Array limit exceeded. Only "+h.arrayLimit+" element"+(h.arrayLimit===1?"":"s")+" allowed in an array.");return p},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(h,m){var g={__proto__:null},v=m.ignoreQueryPrefix?h.replace(/^\?/,""):h;v=v.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=m.parameterLimit===1/0?void 0:m.parameterLimit,x=v.split(m.delimiter,m.throwOnLimitExceeded?b+1:b);if(m.throwOnLimitExceeded&&x.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var E=-1,S,O=m.charset;if(m.charsetSentinel)for(S=0;S<x.length;++S)x[S].indexOf("utf8=")===0&&(x[S]===a?O="utf-8":x[S]===s&&(O="iso-8859-1"),E=S,S=x.length);for(S=0;S<x.length;++S)if(S!==E){var w=x[S],C=w.indexOf("]="),P=C===-1?w.indexOf("="):C+1,_,F;if(P===-1?(_=m.decoder(w,r.decoder,O,"key"),F=m.strictNullHandling?null:""):(_=m.decoder(w.slice(0,P),r.decoder,O,"key"),_!==null&&(F=e.maybeMap(i(w.slice(P+1),m,n(g[_])?g[_].length:0),function(L){return m.decoder(L,r.decoder,O,"value")}))),F&&m.interpretNumericEntities&&O==="iso-8859-1"&&(F=o(String(F))),w.indexOf("[]=")>-1&&(F=n(F)?[F]:F),_!==null){var j=t.call(g,_);j&&m.duplicates==="combine"?g[_]=e.combine(g[_],F,m.arrayLimit,m.plainObjects):(!j||m.duplicates==="last")&&(g[_]=F)}}return g},c=function(p,h,m,g){var v=0;if(p.length>0&&p[p.length-1]==="[]"){var b=p.slice(0,-1).join("");v=Array.isArray(h)&&h[b]?h[b].length:0}for(var x=g?h:i(h,m,v),E=p.length-1;E>=0;--E){var S,O=p[E];if(O==="[]"&&m.parseArrays)e.isOverflow(x)?S=x:S=m.allowEmptyArrays&&(x===""||m.strictNullHandling&&x===null)?[]:e.combine([],x,m.arrayLimit,m.plainObjects);else{S=m.plainObjects?{__proto__:null}:{};var w=O.charAt(0)==="["&&O.charAt(O.length-1)==="]"?O.slice(1,-1):O,C=m.decodeDotInKeys?w.replace(/%2E/g,"."):w,P=parseInt(C,10);!m.parseArrays&&C===""?S={0:x}:!isNaN(P)&&O!==C&&String(P)===C&&P>=0&&m.parseArrays&&P<=m.arrayLimit?(S=[],S[P]=x):C!=="__proto__"&&(S[C]=x)}x=S}return x},u=function(h,m){var g=m.allowDots?h.replace(/\.([^.[]+)/g,"[$1]"):h;if(m.depth<=0)return!m.plainObjects&&t.call(Object.prototype,g)&&!m.allowPrototypes?void 0:[g];var v=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=v.exec(g),E=x?g.slice(0,x.index):g,S=[];if(E){if(!m.plainObjects&&t.call(Object.prototype,E)&&!m.allowPrototypes)return;S.push(E)}for(var O=0;(x=b.exec(g))!==null&&O<m.depth;){O+=1;var w=x[1].slice(1,-1);if(!m.plainObjects&&t.call(Object.prototype,w)&&!m.allowPrototypes)return;S.push(x[1])}if(x){if(m.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+m.depth+" and strictDepth is true");S.push("["+g.slice(x.index)+"]")}return S},d=function(h,m,g,v){if(h){var b=u(h,g);if(b)return c(b,m,g,v)}},f=function(h){if(!h)return r;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.decodeDotInKeys<"u"&&typeof h.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(h.decoder!==null&&typeof h.decoder<"u"&&typeof h.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof h.throwOnLimitExceeded<"u"&&typeof h.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof h.charset>"u"?r.charset:h.charset,g=typeof h.duplicates>"u"?r.duplicates:h.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof h.allowDots>"u"?h.decodeDotInKeys===!0?!0:r.allowDots:!!h.allowDots;return{allowDots:v,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof h.allowPrototypes=="boolean"?h.allowPrototypes:r.allowPrototypes,allowSparse:typeof h.allowSparse=="boolean"?h.allowSparse:r.allowSparse,arrayLimit:typeof h.arrayLimit=="number"?h.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:r.charsetSentinel,comma:typeof h.comma=="boolean"?h.comma:r.comma,decodeDotInKeys:typeof h.decodeDotInKeys=="boolean"?h.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof h.decoder=="function"?h.decoder:r.decoder,delimiter:typeof h.delimiter=="string"||e.isRegExp(h.delimiter)?h.delimiter:r.delimiter,depth:typeof h.depth=="number"||h.depth===!1?+h.depth:r.depth,duplicates:g,ignoreQueryPrefix:h.ignoreQueryPrefix===!0,interpretNumericEntities:typeof h.interpretNumericEntities=="boolean"?h.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof h.parameterLimit=="number"?h.parameterLimit:r.parameterLimit,parseArrays:h.parseArrays!==!1,plainObjects:typeof h.plainObjects=="boolean"?h.plainObjects:r.plainObjects,strictDepth:typeof h.strictDepth=="boolean"?!!h.strictDepth:r.strictDepth,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof h.throwOnLimitExceeded=="boolean"?h.throwOnLimitExceeded:!1}};return pm=function(p,h){var m=f(h);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,v=m.plainObjects?{__proto__:null}:{},b=Object.keys(g),x=0;x<b.length;++x){var E=b[x],S=d(E,g[E],m,typeof p=="string");v=e.merge(v,S,m)}return m.allowSparse===!0?v:e.compact(v)},pm}var hm,rk;function I5(){if(rk)return hm;rk=1;var e=C5(),t=k5(),n=um();return hm={formats:n,parse:t,stringify:e},hm}var O5=I5(),nt;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(nt||(nt={}));var ok;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ok||(ok={}));const Ie=nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xr=e=>{switch(typeof e){case"undefined":return Ie.undefined;case"string":return Ie.string;case"number":return Number.isNaN(e)?Ie.nan:Ie.number;case"boolean":return Ie.boolean;case"function":return Ie.function;case"bigint":return Ie.bigint;case"symbol":return Ie.symbol;case"object":return Array.isArray(e)?Ie.array:e===null?Ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ie.promise:typeof Map<"u"&&e instanceof Map?Ie.map:typeof Set<"u"&&e instanceof Set?Ie.set:typeof Date<"u"&&e instanceof Date?Ie.date:Ie.object;default:return Ie.unknown}},ve=nt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class kr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof kr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}kr.create=e=>new kr(e);const mm=(e,t)=>{let n;switch(e.code){case ve.invalid_type:e.received===Ie.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,nt.jsonStringifyReplacer)}`;break;case ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${nt.joinValues(e.keys,", ")}`;break;case ve.invalid_union:n="Invalid input";break;case ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${nt.joinValues(e.options)}`;break;case ve.invalid_enum_value:n=`Invalid enum value. Expected ${nt.joinValues(e.options)}, received '${e.received}'`;break;case ve.invalid_arguments:n="Invalid function arguments";break;case ve.invalid_return_type:n="Invalid function return type";break;case ve.invalid_date:n="Invalid date";break;case ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:nt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ve.custom:n="Invalid input";break;case ve.invalid_intersection_types:n="Intersection results could not be merged";break;case ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,nt.assertNever(e)}return{message:n}};let P5=mm;function A5(){return P5}const _5=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function xe(e,t){const n=A5(),r=_5({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mm?void 0:mm].filter(o=>!!o)});e.common.issues.push(r)}class En{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Ve;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return En.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return Ve;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const Ve=Object.freeze({status:"aborted"}),ma=e=>({status:"dirty",value:e}),Nn=e=>({status:"valid",value:e}),ik=e=>e.status==="aborted",sk=e=>e.status==="dirty",$i=e=>e.status==="valid",zc=e=>typeof Promise<"u"&&e instanceof Promise;var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Oe||(Oe={}));class Qr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ak=(e,t)=>{if($i(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new kr(e.common.issues);return this._error=n,this._error}}};function Ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}class Je{get description(){return this._def.description}_getType(t){return Xr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new En,ctx:{common:t.parent.common,data:t.data,parsedType:Xr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(zc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return ak(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return $i(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>$i(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(zc(o)?o:Promise.resolve(o));return ak(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:ve.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Hi({schema:this,typeName:Re.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return eo.create(this,this._def)}nullable(){return Wi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return vr.create(this)}promise(){return qc.create(this,this._def)}or(t){return Hc.create([this,t],this._def)}and(t){return Wc.create(this,t,this._def)}transform(t){return new Hi({...Ke(this._def),schema:this,typeName:Re.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new vm({...Ke(this._def),innerType:this,defaultValue:n,typeName:Re.ZodDefault})}brand(){return new e9({typeName:Re.ZodBranded,type:this,...Ke(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new bm({...Ke(this._def),innerType:this,catchValue:n,typeName:Re.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return xm.create(this,t)}readonly(){return wm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const M5=/^c[^\s-]{8,}$/i,D5=/^[0-9a-z]+$/,N5=/^[0-9A-HJKMNP-TV-Z]{26}$/i,F5=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,L5=/^[a-z0-9_-]{21}$/i,V5=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,R5=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,$5=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,j5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let gm;const z5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,B5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,H5=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,W5=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,q5=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,U5=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,lk="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",G5=new RegExp(`^${lk}$`);function ck(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Y5(e){return new RegExp(`^${ck(e)}$`)}function K5(e){let t=`${lk}T${ck(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Z5(e,t){return!!((t==="v4"||!t)&&z5.test(e)||(t==="v6"||!t)&&H5.test(e))}function X5(e,t){if(!V5.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function Q5(e,t){return!!((t==="v4"||!t)&&B5.test(e)||(t==="v6"||!t)&&W5.test(e))}class No extends Je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ie.string){const i=this._getOrReturnCtx(t);return xe(i,{code:ve.invalid_type,expected:Ie.string,received:i.parsedType}),Ve}const r=new En;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?xe(o,{code:ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&xe(o,{code:ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")$5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"email",code:ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")gm||(gm=new RegExp(j5,"u")),gm.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"emoji",code:ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")F5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"uuid",code:ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")L5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"nanoid",code:ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")M5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid",code:ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")D5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid2",code:ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")N5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ulid",code:ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),xe(o,{validation:"url",code:ve.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"regex",code:ve.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?K5(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?G5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Y5(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?R5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:ve.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Z5(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ip",code:ve.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?X5(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"jwt",code:ve.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Q5(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cidr",code:ve.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?q5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:ve.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?U5.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:ve.invalid_string,message:i.message}),r.dirty()):nt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ve.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new No({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Oe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Oe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Oe.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Oe.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Oe.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new No({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new No({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new No({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}No.create=e=>new No({checks:[],typeName:Re.ZodString,coerce:e?.coerce??!1,...Ke(e)});function J5(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}class ji extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ie.number){const i=this._getOrReturnCtx(t);return xe(i,{code:ve.invalid_type,expected:Ie.number,received:i.parsedType}),Ve}let r;const o=new En;for(const i of this._def.checks)i.kind==="int"?nt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ve.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ve.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ve.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?J5(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ve.not_finite,message:i.message}),o.dirty()):nt.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,o){return new ji({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(o)}]})}_addCheck(t){return new ji({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&nt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ji.create=e=>new ji({checks:[],typeName:Re.ZodNumber,coerce:e?.coerce||!1,...Ke(e)});class ga extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ie.bigint)return this._getInvalidInput(t);let r;const o=new En;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ve.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ve.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):nt.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ve.invalid_type,expected:Ie.bigint,received:n.parsedType}),Ve}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,o){return new ga({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(o)}]})}_addCheck(t){return new ga({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ga.create=e=>new ga({checks:[],typeName:Re.ZodBigInt,coerce:e?.coerce??!1,...Ke(e)});class uk extends Je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ie.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:ve.invalid_type,expected:Ie.boolean,received:r.parsedType}),Ve}return Nn(t.data)}}uk.create=e=>new uk({typeName:Re.ZodBoolean,coerce:e?.coerce||!1,...Ke(e)});class Bc extends Je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ie.date){const i=this._getOrReturnCtx(t);return xe(i,{code:ve.invalid_type,expected:Ie.date,received:i.parsedType}),Ve}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return xe(i,{code:ve.invalid_date}),Ve}const r=new En;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ve.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):nt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Bc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Bc.create=e=>new Bc({checks:[],coerce:e?.coerce||!1,typeName:Re.ZodDate,...Ke(e)});class dk extends Je{_parse(t){if(this._getType(t)!==Ie.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:ve.invalid_type,expected:Ie.symbol,received:r.parsedType}),Ve}return Nn(t.data)}}dk.create=e=>new dk({typeName:Re.ZodSymbol,...Ke(e)});class fk extends Je{_parse(t){if(this._getType(t)!==Ie.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ve.invalid_type,expected:Ie.undefined,received:r.parsedType}),Ve}return Nn(t.data)}}fk.create=e=>new fk({typeName:Re.ZodUndefined,...Ke(e)});class pk extends Je{_parse(t){if(this._getType(t)!==Ie.null){const r=this._getOrReturnCtx(t);return xe(r,{code:ve.invalid_type,expected:Ie.null,received:r.parsedType}),Ve}return Nn(t.data)}}pk.create=e=>new pk({typeName:Re.ZodNull,...Ke(e)});class hk extends Je{constructor(){super(...arguments),this._any=!0}_parse(t){return Nn(t.data)}}hk.create=e=>new hk({typeName:Re.ZodAny,...Ke(e)});class mk extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Nn(t.data)}}mk.create=e=>new mk({typeName:Re.ZodUnknown,...Ke(e)});class Jr extends Je{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ve.invalid_type,expected:Ie.never,received:n.parsedType}),Ve}}Jr.create=e=>new Jr({typeName:Re.ZodNever,...Ke(e)});class gk extends Je{_parse(t){if(this._getType(t)!==Ie.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ve.invalid_type,expected:Ie.void,received:r.parsedType}),Ve}return Nn(t.data)}}gk.create=e=>new gk({typeName:Re.ZodVoid,...Ke(e)});class vr extends Je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ie.array)return xe(n,{code:ve.invalid_type,expected:Ie.array,received:n.parsedType}),Ve;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(xe(n,{code:s?ve.too_big:ve.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(xe(n,{code:ve.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(xe(n,{code:ve.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Qr(n,s,n.path,a)))).then(s=>En.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Qr(n,s,n.path,a)));return En.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new vr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new vr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new vr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}vr.create=(e,t)=>new vr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Re.ZodArray,...Ke(t)});function zi(e){if(e instanceof Ut){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=eo.create(zi(r))}return new Ut({...e._def,shape:()=>t})}else return e instanceof vr?new vr({...e._def,type:zi(e.element)}):e instanceof eo?eo.create(zi(e.unwrap())):e instanceof Wi?Wi.create(zi(e.unwrap())):e instanceof Fo?Fo.create(e.items.map(t=>zi(t))):e}class Ut extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=nt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ie.object){const c=this._getOrReturnCtx(t);return xe(c,{code:ve.invalid_type,expected:Ie.object,received:c.parsedType}),Ve}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Jr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Qr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Jr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(xe(o,{code:ve.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Qr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>En.mergeObjectSync(r,c)):En.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new Ut({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Oe.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Ut({...this._def,unknownKeys:"strip"})}passthrough(){return new Ut({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ut({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ut({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Re.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ut({...this._def,catchall:t})}pick(t){const n={};for(const r of nt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Ut({...this._def,shape:()=>n})}omit(t){const n={};for(const r of nt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Ut({...this._def,shape:()=>n})}deepPartial(){return zi(this)}partial(t){const n={};for(const r of nt.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Ut({...this._def,shape:()=>n})}required(t){const n={};for(const r of nt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof eo;)i=i._def.innerType;n[r]=i}return new Ut({...this._def,shape:()=>n})}keyof(){return xk(nt.objectKeys(this.shape))}}Ut.create=(e,t)=>new Ut({shape:()=>e,unknownKeys:"strip",catchall:Jr.create(),typeName:Re.ZodObject,...Ke(t)}),Ut.strictCreate=(e,t)=>new Ut({shape:()=>e,unknownKeys:"strict",catchall:Jr.create(),typeName:Re.ZodObject,...Ke(t)}),Ut.lazycreate=(e,t)=>new Ut({shape:e,unknownKeys:"strip",catchall:Jr.create(),typeName:Re.ZodObject,...Ke(t)});class Hc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new kr(a.ctx.common.issues));return xe(n,{code:ve.invalid_union,unionErrors:s}),Ve}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new kr(l));return xe(n,{code:ve.invalid_union,unionErrors:a}),Ve}}get options(){return this._def.options}}Hc.create=(e,t)=>new Hc({options:e,typeName:Re.ZodUnion,...Ke(t)});function ym(e,t){const n=Xr(e),r=Xr(t);if(e===t)return{valid:!0,data:e};if(n===Ie.object&&r===Ie.object){const o=nt.objectKeys(t),i=nt.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=ym(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===Ie.array&&r===Ie.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=ym(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ie.date&&r===Ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Wc extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(ik(i)||ik(s))return Ve;const a=ym(i.value,s.value);return a.valid?((sk(i)||sk(s))&&n.dirty(),{status:n.value,value:a.data}):(xe(r,{code:ve.invalid_intersection_types}),Ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Wc.create=(e,t,n)=>new Wc({left:e,right:t,typeName:Re.ZodIntersection,...Ke(n)});class Fo extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ie.array)return xe(r,{code:ve.invalid_type,expected:Ie.array,received:r.parsedType}),Ve;if(r.data.length<this._def.items.length)return xe(r,{code:ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ve;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Qr(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>En.mergeArray(n,s)):En.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Fo({...this._def,rest:t})}}Fo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fo({items:e,typeName:Re.ZodTuple,rest:null,...Ke(t)})};class yk extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ie.map)return xe(r,{code:ve.invalid_type,expected:Ie.map,received:r.parsedType}),Ve;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Qr(r,a,r.path,[c,"key"])),value:i._parse(new Qr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ve;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ve;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}yk.create=(e,t,n)=>new yk({valueType:t,keyType:e,typeName:Re.ZodMap,...Ke(n)});class ya extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ie.set)return xe(r,{code:ve.invalid_type,expected:Ie.set,received:r.parsedType}),Ve;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(xe(r,{code:ve.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(xe(r,{code:ve.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ve;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Qr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new ya({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new ya({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ya.create=(e,t)=>new ya({valueType:e,minSize:null,maxSize:null,typeName:Re.ZodSet,...Ke(t)});class vk extends Je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}vk.create=(e,t)=>new vk({getter:e,typeName:Re.ZodLazy,...Ke(t)});class bk extends Je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:ve.invalid_literal,expected:this._def.value}),Ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}bk.create=(e,t)=>new bk({value:e,typeName:Re.ZodLiteral,...Ke(t)});function xk(e,t){return new Bi({values:e,typeName:Re.ZodEnum,...Ke(t)})}class Bi extends Je{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:nt.joinValues(r),received:n.parsedType,code:ve.invalid_type}),Ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:ve.invalid_enum_value,options:r}),Ve}return Nn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Bi.create(t,{...this._def,...n})}exclude(t,n=this._def){return Bi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Bi.create=xk;class wk extends Je{_parse(t){const n=nt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ie.string&&r.parsedType!==Ie.number){const o=nt.objectValues(n);return xe(r,{expected:nt.joinValues(o),received:r.parsedType,code:ve.invalid_type}),Ve}if(this._cache||(this._cache=new Set(nt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=nt.objectValues(n);return xe(r,{received:r.data,code:ve.invalid_enum_value,options:o}),Ve}return Nn(t.data)}get enum(){return this._def.values}}wk.create=(e,t)=>new wk({values:e,typeName:Re.ZodNativeEnum,...Ke(t)});class qc extends Je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ie.promise&&n.common.async===!1)return xe(n,{code:ve.invalid_type,expected:Ie.promise,received:n.parsedType}),Ve;const r=n.parsedType===Ie.promise?n.data:Promise.resolve(n.data);return Nn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}qc.create=(e,t)=>new qc({type:e,typeName:Re.ZodPromise,...Ke(t)});class Hi extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{xe(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Ve;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?Ve:l.status==="dirty"||n.value==="dirty"?ma(l.value):l});{if(n.value==="aborted")return Ve;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?Ve:a.status==="dirty"||n.value==="dirty"?ma(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ve:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Ve:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!$i(s))return Ve;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>$i(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):Ve);nt.assertNever(o)}}Hi.create=(e,t,n)=>new Hi({schema:e,typeName:Re.ZodEffects,effect:t,...Ke(n)}),Hi.createWithPreprocess=(e,t,n)=>new Hi({schema:t,effect:{type:"preprocess",transform:e},typeName:Re.ZodEffects,...Ke(n)});class eo extends Je{_parse(t){return this._getType(t)===Ie.undefined?Nn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}eo.create=(e,t)=>new eo({innerType:e,typeName:Re.ZodOptional,...Ke(t)});class Wi extends Je{_parse(t){return this._getType(t)===Ie.null?Nn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wi.create=(e,t)=>new Wi({innerType:e,typeName:Re.ZodNullable,...Ke(t)});class vm extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ie.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}vm.create=(e,t)=>new vm({innerType:e,typeName:Re.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});class bm extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return zc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new kr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new kr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}bm.create=(e,t)=>new bm({innerType:e,typeName:Re.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});class Sk extends Je{_parse(t){if(this._getType(t)!==Ie.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:ve.invalid_type,expected:Ie.nan,received:r.parsedType}),Ve}return{status:"valid",value:t.data}}}Sk.create=e=>new Sk({typeName:Re.ZodNaN,...Ke(e)});class e9 extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class xm extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ve:i.status==="dirty"?(n.dirty(),ma(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ve:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new xm({in:t,out:n,typeName:Re.ZodPipeline})}}class wm extends Je{_parse(t){const n=this._def.innerType._parse(t),r=o=>($i(o)&&(o.value=Object.freeze(o.value)),o);return zc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}wm.create=(e,t)=>new wm({innerType:e,typeName:Re.ZodReadonly,...Ke(t)});var Re;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Re||(Re={})),Jr.create,vr.create,Hc.create,Wc.create,Fo.create,Bi.create,qc.create,eo.create,Wi.create;const t9=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},n9=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const s=t[o+1];e[i]=isNaN(Number(s))?{}:[]}e=e[i]}}},Ek=e=>e.replace(/\[(\d+)]/g,".$1").split("."),Tn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Ek(t),o=structuredClone(e);return n9(o,r,n),o},r9=(e,t)=>e.localeCompare(t),qi={},Tk=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return Ck(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=Tk(e._def.innerType);return t==="ZodArray"?n??[]:n}},Ck=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,Tk(n)])),kk=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=kk(i,o):n[r]=o||i)}return n},o9={sort:r9,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},Ik=e=>{const t=new FormData(e),n=new URLSearchParams(t);return O5.parse(n.toString(),o9)},to=(e,t)=>Ek(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),no=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Sm=e=>{const t=e.dataset.target;if(!t)return no(e);const n=document.querySelector(`[data-origin="${t}"]`);return no(n||e)},i9={state:{},loading:!1,useOnChange:!1},Ok=e=>e.dataset.target||e.name,s9=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=oa.LocalStorage.get(t);return t9(n)?n:{}},clear:()=>{oa.LocalStorage.delete(t)},set:n=>oa.LocalStorage.set(t,n)}},a9=(e,t,n=i9)=>{const[r,o]=T.useState(null),i=T.useRef({}),[s,a]=T.useState(()=>Ue.function(n?.state)?n.state():n?.state??Ck(e)??{}),l=T.useCallback(x=>{const E=x.target,S=x.currentTarget;if(E.dataset.optional==="true")return;const w=Ok(E),C=Sm(E)||(S?no(S):""),P=to(w,e);if(E.setAttribute("data-initialized","true"),P){const _=P.safeParse(C),F=_.success?void 0:_.error.issues[0]?.message??"";o(j=>Tn(j??{},w,F))}},[e]),c=T.useCallback(x=>E=>{const S=E.currentTarget,O=Object.values(i.current).reduce((C,P)=>{const _=P.element,F=P.schema.safeParse(no(_));if(_.dataset.ignore==="ignore"||F.success)return C;const j=F.error.issues[0]?.message;_.setAttribute("data-initialized","true");const L=_.dataset.name||_.name||"";return Tn(C,L,j)},{}),w=Ue.empty(O)?null:O;o(w),console.error(w),x?.({form:S,errors:w||{}})},[]),u=(x,E=qi)=>{const S=to(x,e),O=w=>{if(!Oc(w))return;a(P=>Tn(P,x,w.toISOString())),o(P=>Tn(P,x,void 0));const C=i.current[x].element;if(C){const P=C.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${P}"]`);_&&_.setCustomValidity("")}E?.onChange?.(w)};return{...E,loading:n.loading,name:x,id:x,onChange:O,form:t,date:Ue.string(s[x])?new Date(s[x]):s[x],required:E.required??!S.isOptional(),error:Qn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:S})}}},d=(x,E=qi)=>{const S=to(x,e);return{...E,name:x,id:x,onChange:w=>{const C=w.target.value;a(P=>Tn(P,x,C)),E?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Qn(r,x,void 0),value:Qn(s,x,void 0)??"",required:E.required??!S.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:S}:void 0}},f=(x,E=qi)=>{const S=to(x,e);return{...E,name:x,id:x,onChange:w=>{const C=w.target.checked;a(P=>Tn(P??{},x,C)),E?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Qn(r,x,void 0),required:E.required??!S.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:S}):void 0}},p=(x,E=qi)=>{const S=to(x,e),O=w=>{w.persist?.();const C=w.target.value;E?.onChange?.(w),a(P=>Tn(P,x,C))};return{...E,loading:n.loading,name:x,id:x,onChange:O,form:t,onInvalid:l,error:Qn(r,x,void 0),required:E.required??!S.isOptional(),value:Qn(s,x,void 0)||E?.value||"",type:Ue.instance(S,ji)?"number":E?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:S}}},h=(x,E=qi)=>{const S=to(x,e);return{...E,name:x,id:x,onChangeOptions:w=>{a(C=>Tn(C,x,w))},form:t,loading:n.loading,onInvalid:l,error:Qn(r,x,void 0),required:E.required??!S.isOptional(),value:Qn(s,x,void 0)||E?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:S})}},m=(x,E=qi)=>{const S=to(x,e),O=S._def.typeName==="ZodNumber";return{...E,name:x,id:x,onChange:C=>{C.persist?.();const P=O?C.target.valueAsNumber:C.target.value;E?.onChange?.(C),a(_=>Tn(_,x,P))},form:t,loading:n.loading,onInvalid:l,error:Qn(r,x,void 0),required:E.required??!S.isOptional(),type:O?"number":E?.type??"text",value:Qn(s,x,void 0)||E?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:S})}};T.useEffect(()=>{const x=Object.values(i.current).map(S=>{const O=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,w=S.schema.safeParse(no(O)),C=j=>{const L=Ok(j.target);if(!L)return!1;const A=j.target,D=Sm(j.target)||(j.relatedTarget?no(j.relatedTarget):""),z=S.schema.safeParse(D);if(A.setAttribute("value",D),z.success)return O.setCustomValidity&&O.setCustomValidity(""),o(M=>{if(Ue.null(M))return null;const k=Tn(M,L,void 0);return Ue.empty(M)||Ue.nil(M)||Ue.empty(k)?null:k}),!1;if(O.required){const M=z.error.issues[0]?.message||"";O.setCustomValidity&&O.setCustomValidity(M),o(k=>{if(Ue.null(k))return null;const R=Tn(k,L,M||void 0);return Ue.empty(R)?null:R})}return!1},P=new AbortController,_=O.getAttribute("data-trigger")||"blur";O.addEventListener(_,C,{signal:P.signal});const F=O.dataset.shadow?!1:O.required?!w.success:!1;return{input:S,hasInitialError:F,unsubscribe:()=>P.abort()}});return x.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>x.forEach(S=>S.unsubscribe())});const g=x=>E=>{E.preventDefault();const S=E.currentTarget;let O=Ik(S);Array.from(t?document.querySelectorAll(`[form="${t}"]`):S.elements).forEach(F=>{if(F.tagName==="SELECT"){const j=F;O=Tn(O,j.name,j.value)}if(F.tagName==="INPUT"){const j=F,L=Sm(j)||(j?no(j):"");O=Tn(O,j.dataset.target||j.name,L)}});const C=kk(O,s),P=e.safeParse(C),_=()=>{XC(S),n.interceptor?.clear()};if(P.success){const F=JSON.stringify(P.data);return S.setAttribute("data-json",F),n.interceptor?.clear(),x?.(E,{form:S,event:E,reset:_,setErrors:o,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),S.reportValidity(),x?.(E,{form:S,json:O,event:E,reset:_,setErrors:o,data:O,success:!1,errors:P.error.issues.map(F=>({message:F.message,path:F.path.map(j=>String(j))}))})},v=x=>Od(s,x)||"",b=x=>({...x,id:t,name:t});return T.useEffect(()=>{n.interceptor&&n.interceptor?.set(s)},[s]),{get:v,input:m,state:s,errors:r,select:d,checkbox:f,onSubmit:g,setState:a,textarea:p,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:h,disabled:r!==null}},l9=e=>e?JSON.parse(e.getAttribute("data-json")):{},c9=e=>{const t=T.useRef(void 0);return T.useEffect(()=>{t.current=e},[e]),t.current},Pk={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},Ak={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},_k={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},u9={name:"dark",zIndex:_k,rounded:Pk,spacing:Ak,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(160,90%,5%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},d9={rounded:Pk,spacing:Ak,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:_k,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(210, 20%, 98%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},f9=u9,p9=d9,h9=e=>{const t=T.useMemo(()=>({locale:e.locale,tweaks:{...Na,...e.tweaks},parser:e.parser||_a.hsla,map:{...Da,...e.map}}),[e]);return y.jsx(Ho.Provider,{value:t,children:e.children})};ue.Alert=_j,ue.AnimatedList=mj,ue.AnimatedListItem=gj,ue.Autocomplete=zW,ue.Button=ul,ue.Calendar=FT,ue.Card=fc,ue.Checkbox=dh,ue.ColType=Ai,ue.Collapse=fE,ue.CommandPalette=E5,ue.ComponentsProvider=h9,ue.Context=Ho,ue.DatePicker=d3,ue.Description=MB,ue.Dict=Zn,ue.Dropdown=Pi,ue.Empty=QS,ue.Expand=LB,ue.FileUpload=_W,ue.Form=uO,ue.Info=DB,ue.Input=Jo,ue.InputFeedback=Qv,ue.InputField=ps,ue.Loading=FB,ue.Menu=Hj,ue.MenuItem=Bj,ue.Modal=_h,ue.MultiSelect=YW,ue.Notifications=p5,ue.PageHeader=NB,ue.PageTitle=aT,ue.Paragraph=_B,ue.Polymorph=gn,ue.Progress=i3,ue.Radiobox=Wj,ue.RenderOnView=JW,ue.Select=go,ue.Slider=rD,ue.Spinner=lT,ue.Stats=Mj,ue.StatsCard=pj,ue.Step=Ij,ue.Steps=Oj,ue.Switch=oD,ue.Tab=xj,ue.Table=fj,ue.Tabs=vj,ue.Tag=Ta,ue.TaskList=AB,ue.Textarea=qj,ue.Timeline=s3,ue.TimelineItem=Ac,ue.Toolbar=a3,ue.Tooltip=_d,ue.TransferList=XW,ue.createColumns=F$,ue.createCssProperties=JO,ue.createDesignTokens=by,ue.createFormStorage=s9,ue.createOptionCols=rh,ue.createStyles=ZO,ue.createTheme=QO,ue.createTokenStyles=eP,ue.css=Me,ue.defaultDarkTheme=f9,ue.defaultLightTheme=p9,ue.defaultTranslations=Da,ue.defaultTweaks=Na,ue.dispatchInput=Xg,ue.formReset=XC,ue.formToJson=Ik,ue.getCoords=sO,ue.getJsonForm=l9,ue.getModalScrollerRef=j$,ue.getRemainingSize=Qi,ue.getSchemaShape=to,ue.hasVerticalScroll=Qg,ue.initializeInputDataset=Xi,ue.isMobile=Xv,ue.isReactComponent=iO,ue.isReactFC=Bu,ue.isSsr=Fr,ue.mergeRefs=xr,ue.negate=y_,ue.noop=Ad,ue.parsers=_a,ue.path=Od,ue.reduceTokens=Or,ue.safeRegex=Pd,ue.splitInto=Zv,ue.useColorParser=lE,ue.useForm=a9,ue.useLocale=Al,ue.useNotification=c5,ue.usePrevious=c9,ue.useReactive=rE,ue.useStableRef=Lr,ue.useStepContext=uE,ue.useSwipe=PT,ue.useTablePreferences=R$,ue.useTranslations=Nt,ue.uuid=Qo,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})}));
|
|
41
38
|
//# sourceMappingURL=index.umd.js.map
|