@g4rcez/components 2.0.25 → 2.0.27

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/index.umd.js CHANGED
@@ -1,247 +1,24 @@
1
- (function(ee,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(ee=typeof globalThis<"u"?globalThis:ee||self,S(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,S,h,uo){"use strict";function Hp(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=Hp(S),vi=Hp(uo);function Wp(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=Wp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wp(e))&&(r&&(r+=" "),r+=t);return r}const Up=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yp=qp,fo=(e,t)=>n=>{var r;if(t?.variants==null)return Yp(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const p=Up(u)||Up(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(b=>{let[g,m]=b;return Array.isArray(m)?m.includes({...i,...s}[g]):{...i,...s}[g]===m})?[...c,d,p]:c},[]);return Yp(e,a,l,n?.class,n?.className)};var Kp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fT(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 Il,Zp;function po(){return Zp||(Zp=1,Il=TypeError),Il}const pT=fT(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var _l,Xp;function Ea(){if(Xp)return _l;Xp=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,a=o&&i&&typeof i.get=="function"?i.get:null,s=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,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,E=RegExp.prototype.test,k=Array.prototype.concat,C=Array.prototype.join,O=Array.prototype.slice,_=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,H=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function P(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||E.call(/e/,K))return K;var Fe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var tt=W<0?-_(-W):_(W);if(tt!==W){var ot=String(tt),Me=y.call(K,ot.length+1);return x.call(ot,Fe,"$&_")+"."+x.call(x.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(K,Fe,"$&_")}var $=pT,F=$.custom,U=le(F)?F:null,G={__proto__:null,double:'"',single:"'"},B={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};_l=function W(K,Fe,tt,ot){var Me=Fe||{};if(de(Me,"quoteStyle")&&!de(G,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(de(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Nr=de(Me,"customInspect")?Me.customInspect:!0;if(typeof Nr!="boolean"&&Nr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(de(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(de(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var co=Me.numericSeparator;if(typeof K>"u")return"undefined";if(K===null)return"null";if(typeof K=="boolean")return K?"true":"false";if(typeof K=="string")return we(K,Me);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var un=String(K);return co?P(K,un):un}if(typeof K=="bigint"){var Lr=String(K)+"n";return co?P(K,Lr):Lr}var Lp=typeof Me.depth>"u"?5:Me.depth;if(typeof tt>"u"&&(tt=0),tt>=Lp&&Lp>0&&typeof K=="object")return J(K)?"[Array]":"[Object]";var mi=Kn(Me,tt);if(typeof ot>"u")ot=[];else if(Te(ot,K)>=0)return"[Circular]";function _n(gi,Al,A4){if(Al&&(ot=O.call(ot),ot.push(Al)),A4){var dT={depth:Me.depth};return de(Me,"quoteStyle")&&(dT.quoteStyle=Me.quoteStyle),W(gi,dT,tt+1,ot)}return W(gi,Me,tt+1,ot)}if(typeof K=="function"&&!q(K)){var oT=Oe(K),iT=In(K,_n);return"[Function"+(oT?": "+oT:" (anonymous)")+"]"+(iT.length>0?" { "+C.call(iT,", ")+" }":"")}if(le(K)){var aT=A?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):z.call(K);return typeof K=="object"&&!A?Ze(aT):aT}if(ce(K)){for(var Ta="<"+w.call(String(K.nodeName)),Fp=K.attributes||[],Pl=0;Pl<Fp.length;Pl++)Ta+=" "+Fp[Pl].name+"="+Z(te(Fp[Pl].value),"double",Me);return Ta+=">",K.childNodes&&K.childNodes.length&&(Ta+="..."),Ta+="</"+w.call(String(K.nodeName))+">",Ta}if(J(K)){if(K.length===0)return"[]";var Vp=In(K,_n);return mi&&!Kt(Vp)?"["+An(Vp,mi)+"]":"[ "+C.call(Vp,", ")+" ]"}if(X(K)){var $p=In(K,_n);return!("cause"in Error.prototype)&&"cause"in K&&!H.call(K,"cause")?"{ ["+String(K)+"] "+C.call(k.call("[cause]: "+_n(K.cause),$p),", ")+" }":$p.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+C.call($p,", ")+" }"}if(typeof K=="object"&&Nr){if(U&&typeof K[U]=="function"&&$)return $(K,{depth:Lp-tt});if(Nr!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(Re(K)){var sT=[];return r&&r.call(K,function(gi,Al){sT.push(_n(Al,K,!0)+" => "+_n(gi,K))}),xt("Map",n.call(K),sT,mi)}if(V(K)){var lT=[];return s&&s.call(K,function(gi){lT.push(_n(gi,K))}),xt("Set",a.call(K),lT,mi)}if(ue(K))return Ft("WeakMap");if(Q(K))return Ft("WeakSet");if(Y(K))return Ft("WeakRef");if(j(K))return Ze(_n(Number(K)));if(he(K))return Ze(_n(L.call(K)));if(se(K))return Ze(b.call(K));if(oe(K))return Ze(_n(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof Kp<"u"&&K===Kp)return"{ [object globalThis] }";if(!R(K)&&!q(K)){var jp=In(K,_n),cT=M?M(K)===Object.prototype:K instanceof Object||K.constructor===Object,zp=K instanceof Object?"":"null prototype",uT=!cT&&N&&Object(K)===K&&N in K?y.call(Pe(K),8,-1):zp?"Object":"",P4=cT||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",Bp=P4+(uT||zp?"["+C.call(k.call([],uT||[],zp||[]),": ")+"] ":"");return jp.length===0?Bp+"{}":mi?Bp+"{"+An(jp,mi)+"}":Bp+"{ "+C.call(jp,", ")+" }"}return String(K)};function Z(W,K,Fe){var tt=Fe.quoteStyle||K,ot=G[tt];return ot+W+ot}function te(W){return x.call(String(W),/"/g,"&quot;")}function ne(W){return!N||!(typeof W=="object"&&(N in W||typeof W[N]<"u"))}function J(W){return Pe(W)==="[object Array]"&&ne(W)}function R(W){return Pe(W)==="[object Date]"&&ne(W)}function q(W){return Pe(W)==="[object RegExp]"&&ne(W)}function X(W){return Pe(W)==="[object Error]"&&ne(W)}function oe(W){return Pe(W)==="[object String]"&&ne(W)}function j(W){return Pe(W)==="[object Number]"&&ne(W)}function se(W){return Pe(W)==="[object Boolean]"&&ne(W)}function le(W){if(A)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!z)return!1;try{return z.call(W),!0}catch{}return!1}function he(W){if(!W||typeof W!="object"||!L)return!1;try{return L.call(W),!0}catch{}return!1}var xe=Object.prototype.hasOwnProperty||function(W){return W in this};function de(W,K){return xe.call(W,K)}function Pe(W){return g.call(W)}function Oe(W){if(W.name)return W.name;var K=v.call(m.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function Te(W,K){if(W.indexOf)return W.indexOf(K);for(var Fe=0,tt=W.length;Fe<tt;Fe++)if(W[Fe]===K)return Fe;return-1}function Re(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function Y(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function V(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function Q(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function ce(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function we(W,K){if(W.length>K.maxStringLength){var Fe=W.length-K.maxStringLength,tt="... "+Fe+" more character"+(Fe>1?"s":"");return we(y.call(W,0,K.maxStringLength),K)+tt}var ot=B[K.quoteStyle||"single"];ot.lastIndex=0;var Me=x.call(x.call(W,ot,"\\$1"),/[\x00-\x1f]/g,Le);return Z(Me,"single",K)}function Le(W){var K=W.charCodeAt(0),Fe={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Fe?"\\"+Fe:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function Ze(W){return"Object("+W+")"}function Ft(W){return W+" { ? }"}function xt(W,K,Fe,tt){var ot=tt?An(Fe,tt):C.call(Fe,", ");return W+" ("+K+") {"+ot+"}"}function Kt(W){for(var K=0;K<W.length;K++)if(Te(W[K],`
2
- `)>=0)return!1;return!0}function Kn(W,K){var Fe;if(W.indent===" ")Fe=" ";else if(typeof W.indent=="number"&&W.indent>0)Fe=C.call(Array(W.indent+1)," ");else return null;return{base:Fe,prev:C.call(Array(K+1),Fe)}}function An(W,K){if(W.length===0)return"";var Fe=`
3
- `+K.prev+K.base;return Fe+C.call(W,","+Fe)+`
4
- `+K.prev}function In(W,K){var Fe=J(W),tt=[];if(Fe){tt.length=W.length;for(var ot=0;ot<W.length;ot++)tt[ot]=de(W,ot)?K(W[ot],W):""}var Me=typeof D=="function"?D(W):[],Nr;if(A){Nr={};for(var co=0;co<Me.length;co++)Nr["$"+Me[co]]=Me[co]}for(var un in W)de(W,un)&&(Fe&&String(Number(un))===un&&un<W.length||A&&Nr["$"+un]instanceof Symbol||(E.call(/[^\w$]/,un)?tt.push(K(un,W)+": "+K(W[un],W)):tt.push(un+": "+K(W[un],W))));if(typeof D=="function")for(var Lr=0;Lr<Me.length;Lr++)H.call(W,Me[Lr])&&tt.push("["+K(Me[Lr])+"]: "+K(W[Me[Lr]],W));return tt}return _l}var Ol,Qp;function hT(){if(Qp)return Ol;Qp=1;var e=Ea(),t=po(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Ol=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,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},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},Ol}var Ml,Jp;function eh(){return Jp||(Jp=1,Ml=Object),Ml}var Dl,th;function mT(){return th||(th=1,Dl=Error),Dl}var Nl,nh;function gT(){return nh||(nh=1,Nl=EvalError),Nl}var Ll,rh;function vT(){return rh||(rh=1,Ll=RangeError),Ll}var Fl,oh;function yT(){return oh||(oh=1,Fl=ReferenceError),Fl}var Vl,ih;function bT(){return ih||(ih=1,Vl=SyntaxError),Vl}var $l,ah;function xT(){return ah||(ah=1,$l=URIError),$l}var jl,sh;function wT(){return sh||(sh=1,jl=Math.abs),jl}var zl,lh;function ST(){return lh||(lh=1,zl=Math.floor),zl}var Bl,ch;function TT(){return ch||(ch=1,Bl=Math.max),Bl}var Rl,uh;function ET(){return uh||(uh=1,Rl=Math.min),Rl}var Hl,dh;function kT(){return dh||(dh=1,Hl=Math.pow),Hl}var Wl,fh;function CT(){return fh||(fh=1,Wl=Math.round),Wl}var ql,ph;function PT(){return ph||(ph=1,ql=Number.isNaN||function(t){return t!==t}),ql}var Ul,hh;function AT(){if(hh)return Ul;hh=1;var e=PT();return Ul=function(n){return e(n)||n===0?n:n<0?-1:1},Ul}var Yl,mh;function IT(){return mh||(mh=1,Yl=Object.getOwnPropertyDescriptor),Yl}var Kl,gh;function vh(){if(gh)return Kl;gh=1;var e=IT();if(e)try{e([],"length")}catch{e=null}return Kl=e,Kl}var Gl,yh;function _T(){if(yh)return Gl;yh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Gl=e,Gl}var Zl,bh;function OT(){return bh||(bh=1,Zl=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 a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),Zl}var Xl,xh;function MT(){if(xh)return Xl;xh=1;var e=typeof Symbol<"u"&&Symbol,t=OT();return Xl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Xl}var Ql,wh;function Sh(){return wh||(wh=1,Ql=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ql}var Jl,Th;function Eh(){if(Th)return Jl;Th=1;var e=eh();return Jl=e.getPrototypeOf||null,Jl}var ec,kh;function DT(){if(kh)return ec;kh=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 p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return ec=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,p=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))},f=n(0,c.length-u.length),b=[],g=0;g<f;g++)b[g]="$"+g;if(d=Function("binder","return function ("+a(b,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},ec}var tc,Ch;function ka(){if(Ch)return tc;Ch=1;var e=DT();return tc=Function.prototype.bind||e,tc}var nc,Ph;function rc(){return Ph||(Ph=1,nc=Function.prototype.call),nc}var oc,Ah;function Ih(){return Ah||(Ah=1,oc=Function.prototype.apply),oc}var ic,_h;function NT(){return _h||(_h=1,ic=typeof Reflect<"u"&&Reflect&&Reflect.apply),ic}var ac,Oh;function LT(){if(Oh)return ac;Oh=1;var e=ka(),t=Ih(),n=rc(),r=NT();return ac=r||e.call(n,t),ac}var sc,Mh;function Dh(){if(Mh)return sc;Mh=1;var e=ka(),t=po(),n=rc(),r=LT();return sc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},sc}var lc,Nh;function FT(){if(Nh)return lc;Nh=1;var e=Dh(),t=vh(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return lc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,lc}var cc,Lh;function VT(){if(Lh)return cc;Lh=1;var e=Sh(),t=Eh(),n=FT();return cc=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,cc}var uc,Fh;function $T(){if(Fh)return uc;Fh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=ka();return uc=n.call(e,t),uc}var dc,Vh;function fc(){if(Vh)return dc;Vh=1;var e,t=eh(),n=mT(),r=gT(),o=vT(),i=yT(),a=bT(),s=po(),l=xT(),c=wT(),u=ST(),d=TT(),p=ET(),f=kT(),b=CT(),g=AT(),m=Function,v=function(q){try{return m('"use strict"; return ('+q+").constructor;")()}catch{}},y=vh(),x=_T(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,E=MT()(),k=VT(),C=Eh(),O=Sh(),_=Ih(),L=rc(),D={},z=typeof Uint8Array>"u"||!k?e:k(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&k?k([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%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%":m,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!k?e:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%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"||!E||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&k?k(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":z,"%TypeError%":s,"%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%":L,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":b,"%Math.sign%":g,"%Reflect.getPrototypeOf%":O};if(k)try{null.error}catch(q){var N=k(k(q));A["%Error.prototype%"]=N}var H=function q(X){var oe;if(X==="%AsyncFunction%")oe=v("async function () {}");else if(X==="%GeneratorFunction%")oe=v("function* () {}");else if(X==="%AsyncGeneratorFunction%")oe=v("async function* () {}");else if(X==="%AsyncGenerator%"){var j=q("%AsyncGeneratorFunction%");j&&(oe=j.prototype)}else if(X==="%AsyncIteratorPrototype%"){var se=q("%AsyncGenerator%");se&&k&&(oe=k(se.prototype))}return A[X]=oe,oe},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=ka(),$=$T(),F=P.call(L,Array.prototype.concat),U=P.call(_,Array.prototype.splice),G=P.call(L,String.prototype.replace),B=P.call(L,String.prototype.slice),Z=P.call(L,RegExp.prototype.exec),te=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,J=function(X){var oe=B(X,0,1),j=B(X,-1);if(oe==="%"&&j!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&oe!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var se=[];return G(X,te,function(le,he,xe,de){se[se.length]=xe?G(de,ne,"$1"):he||le}),se},R=function(X,oe){var j=X,se;if($(M,j)&&(se=M[j],j="%"+se[0]+"%"),$(A,j)){var le=A[j];if(le===D&&(le=H(j)),typeof le>"u"&&!oe)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:se,name:j,value:le}}throw new a("intrinsic "+X+" does not exist!")};return dc=function(X,oe){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof oe!="boolean")throw new s('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=J(X),se=j.length>0?j[0]:"",le=R("%"+se+"%",oe),he=le.name,xe=le.value,de=!1,Pe=le.alias;Pe&&(se=Pe[0],U(j,F([0,1],Pe)));for(var Oe=1,Te=!0;Oe<j.length;Oe+=1){var Re=j[Oe],ue=B(Re,0,1),Y=B(Re,-1);if((ue==='"'||ue==="'"||ue==="`"||Y==='"'||Y==="'"||Y==="`")&&ue!==Y)throw new a("property names with quotes must have matching quotes");if((Re==="constructor"||!Te)&&(de=!0),se+="."+Re,he="%"+se+"%",$(A,he))xe=A[he];else if(xe!=null){if(!(Re in xe)){if(!oe)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(y&&Oe+1>=j.length){var V=y(xe,Re);Te=!!V,Te&&"get"in V&&!("originalValue"in V.get)?xe=V.get:xe=xe[Re]}else Te=$(xe,Re),xe=xe[Re];Te&&!de&&(A[he]=xe)}}return xe},dc}var pc,$h;function jh(){if($h)return pc;$h=1;var e=fc(),t=Dh(),n=t([e("%String.prototype.indexOf%")]);return pc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},pc}var hc,zh;function Bh(){if(zh)return hc;zh=1;var e=fc(),t=jh(),n=Ea(),r=po(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return hc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var b=l(d,f);return c(d)===0&&(d=void 0),b}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,b){d||(d=new o),a(d,f,b)}};return p},hc}var mc,Rh;function jT(){if(Rh)return mc;Rh=1;var e=fc(),t=jh(),n=Ea(),r=Bh(),o=po(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return mc=i?function(){var d,p,f={assert:function(b){if(!f.has(b))throw new o("Side channel does not contain "+n(b))},delete:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(d)return c(d,b)}else if(r&&p)return p.delete(b);return!1},get:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?a(d,b):p&&p.get(b)},has:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?l(d,b):!!p&&p.has(b)},set:function(b,g){i&&b&&(typeof b=="object"||typeof b=="function")?(d||(d=new i),s(d,b,g)):r&&(p||(p=r()),p.set(b,g))}};return f}:r,mc}var gc,Hh;function zT(){if(Hh)return gc;Hh=1;var e=po(),t=Ea(),n=hT(),r=Bh(),o=jT(),i=o||r||n;return gc=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},gc}var Wh=e=>Array.isArray(e),vc=e=>e===void 0,yc=e=>e===null,BT=Function.bind.call(Function.call,Object.prototype.toString),RT=e=>!!e&&BT(e)==="[object Error]"||e instanceof Error,qh=(e,t)=>e instanceof t,HT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},WT=e=>Object.prototype.toString.call(e)==="[object Date]"&&qh(e,Date),je={array:Wh,date:WT,empty:e=>yc(e)||vc(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:qh,isError:RT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>yc(e)||vc(e),null:yc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Wh(e)&&typeof e=="object",primitive:HT,string:e=>typeof e=="string",undefined:vc},qT=e=>Object.keys(e),On=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},UT=e=>e.replace(/[^0-9]/g,"");const bc="-",YT=e=>{const t=GT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(bc);return s[0]===""&&s.length!==1&&s.shift(),Uh(s,t)||KT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Uh=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Uh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(bc);return t.validators.find(({validator:a})=>a(i))?.classGroupId},Yh=/^\[(.+)\]$/,KT=e=>{if(Yh.test(e)){const t=Yh.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},GT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)xc(n[o],r,o,t);return r},xc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Kh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(ZT(o)){xc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{xc(a,Kh(t,i),n,r)})})},Kh=(e,t)=>{let n=e;return t.split(bc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ZT=e=>e.isThemeGetter,XT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},wc="!",Sc=":",QT=Sc.length,JT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let b=0;b<o.length;b++){let g=o[b];if(a===0&&s===0){if(g===Sc){i.push(o.slice(l,b)),l=b+QT;continue}if(g==="/"){c=b;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=eE(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+Sc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},eE=e=>e.endsWith(wc)?e.substring(0,e.length-1):e.startsWith(wc)?e.substring(1):e,tE=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},nE=e=>({cache:XT(e.cacheSize),parseClassName:JT(e),sortModifiers:tE(e),...YT(e)}),rE=/\s+/,oE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(rE);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!g,v=r(m?b.substring(0,g):b);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(b),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const y=i(p).join(":"),x=f?y+wc:y,T=x+v;if(a.includes(T))continue;a.push(T);const w=o(v,m);for(let E=0;E<w.length;++E){const k=w[E];a.push(x+k)}l=u+(l.length>0?" "+l:l)}return l};function iE(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Gh(t))&&(r&&(r+=" "),r+=n);return r}const Gh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Gh(e[r]))&&(n&&(n+=" "),n+=t);return n};function aE(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=nE(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=oE(l,n);return o(l,u),u}return function(){return i(iE.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Zh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sE=/^\d+\/\d+$/,lE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cE=/\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$/,uE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>sE.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),sr=e=>!!e&&Number.isInteger(Number(e)),Tc=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),Gn=e=>lE.test(e),pE=()=>!0,hE=e=>cE.test(e)&&!uE.test(e),Qh=()=>!1,mE=e=>dE.test(e),gE=e=>fE.test(e),vE=e=>!me(e)&&!ge(e),yE=e=>mo(e,rm,Qh),me=e=>Zh.test(e),Fr=e=>mo(e,om,hE),Ec=e=>mo(e,TE,Ve),Jh=e=>mo(e,tm,Qh),bE=e=>mo(e,nm,gE),Ca=e=>mo(e,im,mE),ge=e=>Xh.test(e),yi=e=>go(e,om),xE=e=>go(e,EE),em=e=>go(e,tm),wE=e=>go(e,rm),SE=e=>go(e,nm),Pa=e=>go(e,im,!0),mo=(e,t,n)=>{const r=Zh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=Xh.exec(e);return r?r[1]?t(r[1]):n:!1},tm=e=>e==="position"||e==="percentage",nm=e=>e==="image"||e==="url",rm=e=>e==="length"||e==="size"||e==="bg-size",om=e=>e==="length",TE=e=>e==="number",EE=e=>e==="family-name",im=e=>e==="shadow",kE=aE(()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("text-shadow"),f=It("drop-shadow"),b=It("blur"),g=It("perspective"),m=It("aspect"),v=It("ease"),y=It("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...T(),ge,me],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[ge,me,l],O=()=>[ho,"full","auto",...C()],_=()=>[sr,"none","subgrid",ge,me],L=()=>["auto",{span:["full",sr,ge,me]},sr,ge,me],D=()=>[sr,"auto",ge,me],z=()=>["auto","min","max","fr",ge,me],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...C()],M=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],P=()=>[e,ge,me],$=()=>[...T(),em,Jh,{position:[ge,me]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",wE,yE,{size:[ge,me]}],G=()=>[Tc,yi,Fr],B=()=>["","none","full",c,ge,me],Z=()=>["",Ve,yi,Fr],te=()=>["solid","dashed","dotted","double"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Ve,Tc,em,Jh],R=()=>["","none",b,ge,me],q=()=>["none",Ve,ge,me],X=()=>["none",Ve,ge,me],oe=()=>[Ve,ge,me],j=()=>[ho,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gn],breakpoint:[Gn],color:[pE],container:[Gn],"drop-shadow":[Gn],ease:["in","out","in-out"],font:[vE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gn],shadow:[Gn],spacing:["px",Ve],text:[Gn],"text-shadow":[Gn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,me,ge,m]}],container:["container"],columns:[{columns:[Ve,me,ge,s]}],"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:w()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[sr,"auto",ge,me]}],basis:[{basis:[ho,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,ho,"auto","initial","none",me]}],grow:[{grow:["",Ve,ge,me]}],shrink:[{shrink:["",Ve,ge,me]}],order:[{order:[sr,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],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:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"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:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...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,yi,Fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Ec]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tc,me]}],"font-family":[{font:[xE,me,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,ge,me]}],"line-clamp":[{"line-clamp":[Ve,"none",ge,Ec]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"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:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",ge,Fr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Ve,"auto",ge,me]}],"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",ge,me]}],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",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},sr,ge,me],radial:["",ge,me],conic:[sr,ge,me]},SE,bE]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"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:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"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:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,ge,me]}],"outline-w":[{outline:["",Ve,yi,Fr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,Pa,Ca]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,Pa,Ca]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Ve,Fr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,Pa,Ca]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Ve,ge,me]}],"mix-blend":[{"mix-blend":[...ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ne()}],"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":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"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":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"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":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"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":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"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":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"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":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"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":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[ge,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"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:$()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,me]}],filter:[{filter:["","none",ge,me]}],blur:[{blur:R()}],brightness:[{brightness:[Ve,ge,me]}],contrast:[{contrast:[Ve,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",f,Pa,Ca]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",Ve,ge,me]}],"hue-rotate":[{"hue-rotate":[Ve,ge,me]}],invert:[{invert:["",Ve,ge,me]}],saturate:[{saturate:[Ve,ge,me]}],sepia:[{sepia:["",Ve,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Ve,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,ge,me]}],"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",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",ge,me]}],ease:[{ease:["linear","initial",v,ge,me]}],delay:[{delay:[Ve,ge,me]}],animate:[{animate:["none",y,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ge,me]}],"perspective-origin":[{"perspective-origin":w()}],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:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:j()}],"translate-x":[{"translate-x":j()}],"translate-y":[{"translate-y":j()}],"translate-z":[{"translate-z":j()}],"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",ge,me]}],"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",ge,me]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[Ve,yi,Fr,Ec]}],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"]}}),Zn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},CE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),kc=e=>je.function(e),Se=(...e)=>kE(qp(e)),am=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)},sm=e=>e.scrollHeight>e.clientHeight,xi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},PE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},en=S.forwardRef(function(t,n){const r=t.as||"span";return h.jsx(r,{ref:n,...t,as:void 0})}),AE={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"}},IE=fo("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"}}}),_E=fo("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:AE,defaultVariants:{theme:"primary",size:"default"}}),Aa=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return h.jsxs(en,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Se(_E({size:a,theme:o?"loading":i}),t),children:[n?h.jsx("span",{"aria-hidden":"true",className:IE({theme:n})}):null,r,s.children]})}),OE=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return h.jsx("form",{...e,onSubmit:t})};var wt=function(){return wt=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},wt.apply(this,arguments)};function Cc(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 Pc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var wi=function(e){return e.replace(new RegExp(" ","g")," ")},lm=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)},ME=function(e){return e.replace(/^0+([0-9]+)/,"$1")},cm=function(e,t,n){var r=e.length-2,o=ME(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},um=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ia=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},DE=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ac=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},NE=function(e){return e==="money"||e==="currency"},LE=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return wt(wt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},_a=function(e,t){var n=lm(um(e),t.fraction.length),r="".concat(t.currency).concat(cm(n,t.group,t.decimal));return wi(r)},FE=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=Cc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var b=LE(r,i,s);return b.currency=wi("".concat(b.currency.trim()," ")),b.literal=wi(b.literal.trim()),b},[r,i]),p=function(b){var g=_a(b.target.value,d),m=Ia(g);b.target.value=g,b.target.setAttribute("data-number",m.toString()),l?.(b),m!==0&&(u.current.selectionEnd=g.length)};S.useEffect(function(){if(u.current!==null){var b=u.current.value;if(b!==""){var g=_a(b,d),m=Ia(g);u.current.value=g,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l?.(wt(wt({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?_a(c.defaultValue,d):void 0;return S.createElement("input",wt({},c,{value:typeof c.value=="string"?_a(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),VE=1,$E=function(e){return e==="percentage"||e==="percent"||e==="percentual"},jE=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return wt(wt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Oa=function(e,t){var n=lm(um(e),t.fraction.length),r="".concat(cm(n,t.group,t.decimal)," ").concat(t.percentSign);return wi(r)},zE=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=Cc(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=Pc(S.useState(function(){var v,y;return(y=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var v,y=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Oa(y,d))},[a.value]);var d=S.useMemo(function(){var v=jE(r);return v.percentSign=wi("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-VE,f=function(v){var y,x=s.current;x&&(x.setSelectionRange(p,p),v&&((y=a.onFocus)===null||y===void 0||y.call(a,v)))},b=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var x=y.selectionStart,T=y.selectionEnd,w=x!==T,E=p<x;!w&&E&&f()}i?.(v)},g=function(v){var y=Oa(v.target.value,d),x=Ia(y);u(y),v.target.value=y,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var y=Oa(v,d),x=Ia(y);u(y),s.current.value=y,s.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(wt(wt({},T),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return f()},[c]);var m=a.defaultValue?Oa(a.defaultValue,d):void 0;return S.createElement("input",wt({},a,{defaultValue:m,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:b,ref:s,type:"text"}))}),Si={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},BE=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=Ma[i];a===void 0?r.push(i.replace(Si.dots,"\\.").replace(Si.openParenthesis,"\\(").replace(Si.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Si.leadingBars,"\\")},Ti=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Ic(o,n);var i=BE(o);return n?"^".concat(i,"$"):i},RE=function(e){return e.replace(Si.escape,"\\$&")},Ic=function(e,t){var n=e.map(function(r){return typeof r=="string"?RE(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ma={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]/}},HE=/\d/,dm="(dd) 9dddd-dddd",fm="(dd) dddd-dddd",pm="ddd.ddd.ddd-dd",hm="dd.ddd.ddd/dddd-dd",Da=function(e){return e.replace(/\D/g,"")},WE=["2",/[0-3]/,":",/[0-5]/,/\d/],qE=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Gt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:pm,isoDate:"dddd-dd-dd",cnpj:hm,telephone:fm,cellphone:dm,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Da(e).length<=11?pm:hm},int:function(e){return e===void 0&&(e=""),HE.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=Da(e);return t.length<11?fm:dm},time:function(e){var t=Da(e),n=t[0];return n==="2"?WE:qE}},Zt=function(e,t,n){var r;return n===void 0&&(n={}),wt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Ti(e,"",!0),infinity:n.infinity},n)},Rt={cellTelephone:Zt(Gt.cellTelephone,"tel"),cellphone:Zt(Gt.cellphone,"tel"),cep:Zt(Gt.cep,"decimal"),cnpj:Zt(Gt.cnpj,"decimal"),color:Zt(Gt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Zt(Gt.cpf,"decimal"),cpfCnpj:Zt(Gt.cpfCnpj,"decimal",{transform:Da}),creditCard:Zt(Gt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Zt(Gt.date,"decimal"),int:Zt(Gt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Zt(Gt.isoDate,"decimal"),telephone:Zt(Gt.telephone,"tel"),time:Zt(Gt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Zt(Gt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function mm(e,t,n,r){var o,i;r===void 0&&(r=Ma);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var gm=function(e){return e},UE=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ti(e,n,t));return r.test(n)};function YE(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var KE=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=Cc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),b=S.useRef(null);S.useImperativeHandle(t,function(){return b.current});var g=Ac(s),m=Ac(d),v=Ac(u),y=S.useRef(UE(u,i,f.value||f.defaultValue)),x=p??"input",T=Pc(S.useState(""),2),w=T[0],E=T[1],k=YE(w),C=S.useCallback(function(N,H){var M,P,$=(M=N??H)!==null&&M!==void 0?M:"";if(u===void 0)return $;var F=(P=$?.toString())!==null&&P!==void 0?P:"";return mm(F,typeof u=="function"?u(F):u,a??gm,c??Ma)},[a,u,c]),O=Pc(S.useState(function(){return C(f.value,f.defaultValue)}),2),_=O[0],L=O[1],D=C(f.defaultValue,f.defaultValue),z=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(_);return Array.isArray(N)?Ic(N,i):Ti(u,_,i)}return typeof u=="string"?Ti(u,_,i):Ic(u,i)},[l,_,i,u]);S.useEffect(function(){if(f.value!==void 0){var N=C(f.value,f.defaultValue);L(N),b.current!==null&&(b.current.value=N)}},[f.value,u,a,f.defaultValue]);var A=function(N){var H,M,P,$,F,U=N.currentTarget,G=N.target.value;if(v.current===void 0)return L(G),(H=m.current)===null||H===void 0||H.call(m,G),(M=g.current)===null||M===void 0||M.call(g,N),d?.(G);var B=new RegExp(Ti(v.current,G,i)),Z=(P=U.selectionEnd)!==null&&P!==void 0?P:0,te=function(X,oe,j){if(X.type!=="number")return X.setSelectionRange(oe,j)};if(r&&y.current&&G.length>=_.length)return U.value=_,te(U,Z-1,Z-1);var ne=!1;G.length<k.length&&(y.current=!1,ne=!0),B.test(G)&&(y.current=!0);var J=Z,R=G[J-1],q=mm(G,typeof v.current=="function"?v.current(G):v.current,a??gm,c??Ma);for(U.value=q,L(q);J<q.length&&q.charAt(J-1)!==R;)J+=1;ne?te(U,Z,Z):te(U,J,J),N.target.value=q,E(q),($=m.current)===null||$===void 0||$.call(m,q),(F=g.current)===null||F===void 0||F.call(g,N)};return S.createElement(x,wt({},f,{ref:b,pattern:z,onChange:A,defaultValue:vm(f.defaultValue)?D:void 0,value:vm(f.value)?C(f.value,f.value):f.value}))}),vm=function(e){return typeof e=="string"},ym=S.forwardRef(function(e,t){return NE(e.mask)?S.createElement(FE,wt({},e,{mask:void 0,ref:t})):$E(e.mask)?S.createElement(zE,wt({},e,{mask:void 0,ref:t})):S.createElement(KE,wt({},e,{ref:t}))}),Xt=function(e){return function(t){return S.createElement(ym,wt({},e,t))}};Xt(Rt.cellTelephone),Xt(Rt.cellphone),Xt(Rt.cep),Xt(Rt.cnpj),Xt(Rt.color),Xt(Rt.cpf),Xt(Rt.cpfCnpj),Xt(Rt.creditCard),Xt(Rt.date),Xt(Rt.int),Xt(Rt.isoDate),Xt(Rt.telephone),Xt(Rt.time),Xt(Rt.uuid);var bm=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&DE(Rt,t.mask)?Rt[t.mask]:{mask:t.mask}},[t.mask]),o=wt(wt({},t),r);return S.createElement(ym,wt({},o,{ref:n}))});/**
5
- * @license lucide-react v0.523.0 - ISC
6
- *
7
- * This source code is licensed under the ISC license.
8
- * See the LICENSE file in the root directory of this source tree.
9
- */const GE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ZE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),xm=e=>{const t=ZE(e);return t.charAt(0).toUpperCase()+t.slice(1)},wm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),XE=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
10
- * @license lucide-react v0.523.0 - ISC
11
- *
12
- * This source code is licensed under the ISC license.
13
- * See the LICENSE file in the root directory of this source tree.
14
- */var QE={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"};/**
15
- * @license lucide-react v0.523.0 - ISC
16
- *
17
- * This source code is licensed under the ISC license.
18
- * See the LICENSE file in the root directory of this source tree.
19
- */const JE=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>S.createElement("svg",{ref:l,...QE,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:wm("lucide",o),...!i&&!XE(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
20
- * @license lucide-react v0.523.0 - ISC
21
- *
22
- * This source code is licensed under the ISC license.
23
- * See the LICENSE file in the root directory of this source tree.
24
- */const Xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(JE,{ref:i,iconNode:t,className:wm(`lucide-${GE(xm(e))}`,`lucide-${e}`,r),...o}));return n.displayName=xm(e),n};/**
25
- * @license lucide-react v0.523.0 - ISC
26
- *
27
- * This source code is licensed under the ISC license.
28
- * See the LICENSE file in the root directory of this source tree.
29
- */const ek=Xe("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"}]]);/**
30
- * @license lucide-react v0.523.0 - ISC
31
- *
32
- * This source code is licensed under the ISC license.
33
- * See the LICENSE file in the root directory of this source tree.
34
- */const tk=Xe("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"}]]);/**
35
- * @license lucide-react v0.523.0 - ISC
36
- *
37
- * This source code is licensed under the ISC license.
38
- * See the LICENSE file in the root directory of this source tree.
39
- */const Sm=Xe("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"}]]);/**
40
- * @license lucide-react v0.523.0 - ISC
41
- *
42
- * This source code is licensed under the ISC license.
43
- * See the LICENSE file in the root directory of this source tree.
44
- */const nk=Xe("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"}]]);/**
45
- * @license lucide-react v0.523.0 - ISC
46
- *
47
- * This source code is licensed under the ISC license.
48
- * See the LICENSE file in the root directory of this source tree.
49
- */const rk=Xe("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"}]]);/**
50
- * @license lucide-react v0.523.0 - ISC
51
- *
52
- * This source code is licensed under the ISC license.
53
- * See the LICENSE file in the root directory of this source tree.
54
- */const _c=Xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
55
- * @license lucide-react v0.523.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */const ok=Xe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
60
- * @license lucide-react v0.523.0 - ISC
61
- *
62
- * This source code is licensed under the ISC license.
63
- * See the LICENSE file in the root directory of this source tree.
64
- */const Oc=Xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
65
- * @license lucide-react v0.523.0 - ISC
66
- *
67
- * This source code is licensed under the ISC license.
68
- * See the LICENSE file in the root directory of this source tree.
69
- */const Tm=Xe("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"}]]);/**
70
- * @license lucide-react v0.523.0 - ISC
71
- *
72
- * This source code is licensed under the ISC license.
73
- * See the LICENSE file in the root directory of this source tree.
74
- */const ik=Xe("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"}]]);/**
75
- * @license lucide-react v0.523.0 - ISC
76
- *
77
- * This source code is licensed under the ISC license.
78
- * See the LICENSE file in the root directory of this source tree.
79
- */const ak=Xe("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"}]]);/**
80
- * @license lucide-react v0.523.0 - ISC
81
- *
82
- * This source code is licensed under the ISC license.
83
- * See the LICENSE file in the root directory of this source tree.
84
- */const sk=Xe("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["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"}]]);/**
85
- * @license lucide-react v0.523.0 - ISC
86
- *
87
- * This source code is licensed under the ISC license.
88
- * See the LICENSE file in the root directory of this source tree.
89
- */const Em=Xe("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
90
- * @license lucide-react v0.523.0 - ISC
91
- *
92
- * This source code is licensed under the ISC license.
93
- * See the LICENSE file in the root directory of this source tree.
94
- */const km=Xe("file-video-2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);/**
95
- * @license lucide-react v0.523.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */const Cm=Xe("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
100
- * @license lucide-react v0.523.0 - ISC
101
- *
102
- * This source code is licensed under the ISC license.
103
- * See the LICENSE file in the root directory of this source tree.
104
- */const lk=Xe("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"}]]);/**
105
- * @license lucide-react v0.523.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */const ck=Xe("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"}]]);/**
110
- * @license lucide-react v0.523.0 - ISC
111
- *
112
- * This source code is licensed under the ISC license.
113
- * See the LICENSE file in the root directory of this source tree.
114
- */const Pm=Xe("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"}]]);/**
115
- * @license lucide-react v0.523.0 - ISC
116
- *
117
- * This source code is licensed under the ISC license.
118
- * See the LICENSE file in the root directory of this source tree.
119
- */const uk=Xe("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"}]]);/**
120
- * @license lucide-react v0.523.0 - ISC
121
- *
122
- * This source code is licensed under the ISC license.
123
- * See the LICENSE file in the root directory of this source tree.
124
- */const Mc=Xe("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
125
- * @license lucide-react v0.523.0 - ISC
126
- *
127
- * This source code is licensed under the ISC license.
128
- * See the LICENSE file in the root directory of this source tree.
129
- */const dk=Xe("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
130
- * @license lucide-react v0.523.0 - ISC
131
- *
132
- * This source code is licensed under the ISC license.
133
- * See the LICENSE file in the root directory of this source tree.
134
- */const fk=Xe("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/**
135
- * @license lucide-react v0.523.0 - ISC
136
- *
137
- * This source code is licensed under the ISC license.
138
- * See the LICENSE file in the root directory of this source tree.
139
- */const Dc=Xe("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
140
- * @license lucide-react v0.523.0 - ISC
141
- *
142
- * This source code is licensed under the ISC license.
143
- * See the LICENSE file in the root directory of this source tree.
144
- */const pk=Xe("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"}]]);/**
145
- * @license lucide-react v0.523.0 - ISC
146
- *
147
- * This source code is licensed under the ISC license.
148
- * See the LICENSE file in the root directory of this source tree.
149
- */const hk=Xe("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"}]]);/**
150
- * @license lucide-react v0.523.0 - ISC
151
- *
152
- * This source code is licensed under the ISC license.
153
- * See the LICENSE file in the root directory of this source tree.
154
- */const Nc=Xe("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"}]]);/**
155
- * @license lucide-react v0.523.0 - ISC
156
- *
157
- * This source code is licensed under the ISC license.
158
- * See the LICENSE file in the root directory of this source tree.
159
- */const Na=Xe("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
160
- * @license lucide-react v0.523.0 - ISC
161
- *
162
- * This source code is licensed under the ISC license.
163
- * See the LICENSE file in the root directory of this source tree.
164
- */const mk=Xe("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"}]]);/**
165
- * @license lucide-react v0.523.0 - ISC
166
- *
167
- * This source code is licensed under the ISC license.
168
- * See the LICENSE file in the root directory of this source tree.
169
- */const gk=Xe("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"}]]);/**
170
- * @license lucide-react v0.523.0 - ISC
171
- *
172
- * This source code is licensed under the ISC license.
173
- * See the LICENSE file in the root directory of this source tree.
174
- */const vo=Xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),La={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>)`},lr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(lr(a,t,n,s))},[]),Am=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:Am(a,t,n,s)}},{}),Im={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Fa=(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)},vk={default:e=>Fa(e,{result:Im.default}),dark:e=>Fa(e,{result:Im.dark})},yo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},yk=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Lc=(e,t)=>{const n=lr(e.colors,yo(t?.colors)),r=lr(e.spacing,yo(t?.spacing)),o=lr(e.rounded,yo(t?.rounded)),i=lr(e.shadow,yo(t?.rounded)),a=lr(e.zIndex,yo(t?.zIndex??yk)),s=e.custom?lr(e.custom,yo(t?.customTokens)):[];return n.concat(r,o,s,a,i)},bk=(e,t)=>Fa(Lc(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),xk=(e,t)=>Lc(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),wk=(e,t)=>Fa(Lc(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),Va={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=>h.jsxs(S.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"},$a={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},bo=S.createContext({tweaks:$a,parser:La.hsla,map:Va,locale:void 0}),St=()=>{const e=S.useContext(bo);return e?e.map:Va},Fc=()=>{const e=S.useContext(bo);return e?e.tweaks:$a};function ja(){return typeof window<"u"}function cr(e){return Vc(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(Vc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vc(e){return ja()?e instanceof Node||e instanceof qt(e).Node:!1}function it(e){return ja()?e instanceof Element||e instanceof qt(e).Element:!1}function Tt(e){return ja()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function za(e){return!ja()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const Sk=new Set(["inline","contents"]);function Ei(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=tn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Sk.has(o)}const Tk=new Set(["table","td","th"]);function Ek(e){return Tk.has(cr(e))}const kk=[":popover-open",":modal"];function Ba(e){return kk.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ck=["transform","translate","scale","rotate","perspective"],Pk=["transform","translate","scale","rotate","perspective","filter"],Ak=["paint","layout","strict","content"];function $c(e){const t=Ra(),n=it(e)?tn(e):e;return Ck.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)||Pk.some(r=>(n.willChange||"").includes(r))||Ak.some(r=>(n.contain||"").includes(r))}function Ik(e){let t=Qn(e);for(;Tt(t)&&!Xn(t);){if($c(t))return t;if(Ba(t))return null;t=Qn(t)}return null}function Ra(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _k=new Set(["html","body","#document"]);function Xn(e){return _k.has(cr(e))}function tn(e){return qt(e).getComputedStyle(e)}function Ha(e){return it(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qn(e){if(cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||za(e)&&e.host||Mn(e);return za(t)?t.host:t}function _m(e){const t=Qn(e);return Xn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(t)&&Ei(t)?t:_m(t)}function ur(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_m(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=jc(a);return t.concat(a,a.visualViewport||[],Ei(o)?o:[],s&&n?ur(s):[])}return t.concat(o,ur(o,[],n))}function jc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ok=["top","right","bottom","left"],Om=["start","end"],Mm=Ok.reduce((e,t)=>e.concat(t,t+"-"+Om[0],t+"-"+Om[1]),[]),dr=Math.min,nn=Math.max,Wa=Math.round,xo=Math.floor,Dn=e=>({x:e,y:e}),Mk={left:"right",right:"left",bottom:"top",top:"bottom"},Dk={start:"end",end:"start"};function zc(e,t,n){return nn(e,dr(t,n))}function Vr(e,t){return typeof e=="function"?e(t):e}function Nn(e){return e.split("-")[0]}function bn(e){return e.split("-")[1]}function Dm(e){return e==="x"?"y":"x"}function Bc(e){return e==="y"?"height":"width"}const Nk=new Set(["top","bottom"]);function Jn(e){return Nk.has(Nn(e))?"y":"x"}function Rc(e){return Dm(Jn(e))}function Nm(e,t,n){n===void 0&&(n=!1);const r=bn(e),o=Rc(e),i=Bc(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ua(a)),[a,Ua(a)]}function Lk(e){const t=Ua(e);return[qa(e),t,qa(t)]}function qa(e){return e.replace(/start|end/g,t=>Dk[t])}const Lm=["left","right"],Fm=["right","left"],Fk=["top","bottom"],Vk=["bottom","top"];function $k(e,t,n){switch(e){case"top":case"bottom":return n?t?Fm:Lm:t?Lm:Fm;case"left":case"right":return t?Fk:Vk;default:return[]}}function jk(e,t,n,r){const o=bn(e);let i=$k(Nn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(qa)))),i}function Ua(e){return e.replace(/left|right|bottom|top/g,t=>Mk[t])}function zk(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vm(e){return typeof e!="number"?zk(e):{top:e,right:e,bottom:e,left:e}}function Ya(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}}/*!
175
- * tabbable 6.2.0
176
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
177
- */var Bk=["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])"],Ka=Bk.join(","),$m=typeof Element>"u",wo=$m?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ga=!$m&&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},Za=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",a=i||n&&t&&e(t.parentNode);return a},Rk=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},jm=function(t,n,r){if(Za(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ka));return n&&wo.call(t,Ka)&&o.unshift(t),o=o.filter(r),o},zm=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Za(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=wo.call(a,Ka);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Za(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},Bm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Rk(t))&&!Bm(t)?0:t.tabIndex},Hk=function(t,n){var r=Rm(t);return r<0&&n&&!Bm(t)?0:r},Wk=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Hm=function(t){return t.tagName==="INPUT"},qk=function(t){return Hm(t)&&t.type==="hidden"},Uk=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Yk=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Kk=function(t){if(!t.name)return!0;var n=t.form||Ga(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},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(a){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",a.message),!1}var i=Yk(o,t.form);return!i||i===t},Gk=function(t){return Hm(t)&&t.type==="radio"},Zk=function(t){return Gk(t)&&!Kk(t)},Xk=function(t){var n,r=t&&Ga(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Ga(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},Wm=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Qk=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=wo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(wo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ga(t);if(l&&!l.shadowRoot&&o(l)===!0)return Wm(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(Xk(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Wm(t);return!1},Jk=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 wo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Hc=function(t,n){return!(n.disabled||Za(n)||qk(n)||Qk(n,t)||Uk(n)||Jk(n))},Wc=function(t,n){return!(Zk(n)||Rm(n)<0||!Hc(t,n))},eC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},tC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=Hk(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(Wk).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Xa=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zm([t],n.includeContainer,{filter:Wc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:eC}):r=jm(t,n.includeContainer,Wc.bind(null,n)),tC(r)},nC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zm([t],n.includeContainer,{filter:Hc.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=jm(t,n.includeContainer,Hc.bind(null,n)),r},qm=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wo.call(t,Ka)===!1?!1:Wc(n,t)};function qc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Um(){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 Ym(){return/apple/i.test(navigator.vendor)}function Uc(){const e=/android/i;return e.test(qc())||e.test(Um())}function rC(){return qc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Km(){return Um().includes("jsdom/")}const Gm="data-floating-ui-focusable",oC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Yc="ArrowLeft",Kc="ArrowRight",iC="ArrowUp",aC="ArrowDown";function Ln(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 Nt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&za(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Fn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Gc(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 sC(e){return e.matches("html,body")}function Vt(e){return e?.ownerDocument||document}function Zc(e){return Tt(e)&&e.matches(oC)}function Xc(e){return e?e.getAttribute("role")==="combobox"&&Zc(e):!1}function lC(e){if(!e||Km())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Qa(e){return e?e.hasAttribute(Gm)?e:e.querySelector("["+Gm+"]")||e:null}function $r(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,...$r(e,o.id,n)])}function cC(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),$r(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function Zm(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(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function $t(e){e.preventDefault(),e.stopPropagation()}function uC(e){return"nativeEvent"in e}function Xm(e){return e.mozInputSource===0&&e.isTrusted?!0:Uc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Qm(e){return Km()?!1:!Uc()&&e.width===0&&e.height===0||Uc()&&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 So(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var dC=typeof document<"u",fC=function(){},Ke=dC?S.useLayoutEffect:fC;const pC={...I};function Lt(e){const t=I.useRef(e);return Ke(()=>{t.current=e}),t}const hC=pC.useInsertionEffect||(e=>e());function ht(e){const t=I.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hC(()=>{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 Ja(e,t,n){return Math.floor(e/t)!==n}function ki(e,t){return t<0||t>=e.current.length}function Qc(e,t){return Ht(e,{disabledIndices:t})}function Jm(e,t){return Ht(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ht(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,a=n;do a+=r?-i:i;while(a>=0&&a<=e.current.length-1&&es(e,a,o));return a}function mC(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,p=u;if(n.key===iC){if(d&&$t(n),u===-1)p=c;else if(p=Ht(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||p<0)){const f=u%a,b=c%a,g=c-(b-f);b===f?p=c:p=b>f?g:g-a}ki(e,p)&&(p=u)}if(n.key===aC&&(d&&$t(n),u===-1?p=l:(p=Ht(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(p=Ht(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),ki(e,p)&&(p=u)),r==="both"){const f=xo(u/a);n.key===(i?Yc:Kc)&&(d&&$t(n),u%a!==a-1?(p=Ht(e,{startingIndex:u,disabledIndices:s}),o&&Ja(p,a,f)&&(p=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(p=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s})),Ja(p,a,f)&&(p=u)),n.key===(i?Kc:Yc)&&(d&&$t(n),u%a!==0?(p=Ht(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Ja(p,a,f)&&(p=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(p=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Ja(p,a,f)&&(p=u));const b=xo(c/a)===f;ki(e,p)&&(o&&b?p=n.key===(i?Kc:Yc)?c:Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}):p=u)}return p}function gC(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function vC(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function yC(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function es(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 Ci=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eg(e,t){const n=Xa(e,Ci()),r=n.length;if(r===0)return;const o=Ln(Vt(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function tg(e){return eg(Vt(e).body,1)||e}function ng(e){return eg(Vt(e).body,-1)||e}function Pi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Nt(n,r)}function bC(e){Xa(e,Ci()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function rg(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 og(e,t,n){let{reference:r,floating:o}=e;const i=Jn(t),a=Rc(t),s=Bc(a),l=Nn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(bn(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const xC=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=og(c,r,l),p=r,f={},b=0;for(let g=0;g<s.length;g++){const{name:m,fn:v}=s[g],{x:y,y:x,data:T,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,f={...f,[m]:{...f[m],...T}},w&&b<=50&&(b++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=og(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function ts(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Vr(t,e),b=Vm(f),m=s[p?d==="floating"?"reference":"floating":d],v=Ya(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=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},w=Ya(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-w.top+b.top)/T.y,bottom:(w.bottom-v.bottom+b.bottom)/T.y,left:(v.left-w.left+b.left)/T.x,right:(w.right-v.right+b.right)/T.x}}const wC=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Vr(e,t)||{};if(c==null)return{};const d=Vm(u),p={x:n,y:r},f=Rc(o),b=Bc(f),g=await a.getDimensions(c),m=f==="y",v=m?"top":"left",y=m?"bottom":"right",x=m?"clientHeight":"clientWidth",T=i.reference[b]+i.reference[f]-p[f]-i.floating[b],w=p[f]-i.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let k=E?E[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=s.floating[x]||i.floating[b]);const C=T/2-w/2,O=k/2-g[b]/2-1,_=dr(d[v],O),L=dr(d[y],O),D=_,z=k-g[b]-L,A=k/2-g[b]/2+C,N=zc(D,A,z),H=!l.arrow&&bn(o)!=null&&A!==N&&i.reference[b]/2-(A<D?_:L)-g[b]/2<0,M=H?A<D?A-D:A-z:0;return{[f]:p[f]+M,data:{[f]:N,centerOffset:A-N-M,...H&&{alignmentOffset:M}},reset:H}}});function SC(e,t,n){return(e?[...n.filter(o=>bn(o)===e),...n.filter(o=>bn(o)!==e)]:n.filter(o=>Nn(o)===o)).filter(o=>e?bn(o)===e||(t?qa(o)!==o:!1):!0)}const TC=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:a,placement:s,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=Mm,autoAlignment:f=!0,...b}=Vr(e,t),g=d!==void 0||p===Mm?SC(d||null,f,p):p,m=await ts(t,b),v=((n=a.autoPlacement)==null?void 0:n.index)||0,y=g[v];if(y==null)return{};const x=Nm(y,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==y)return{reset:{placement:g[0]}};const T=[m[Nn(y)],m[x[0]],m[x[1]]],w=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:T}],E=g[v+1];if(E)return{data:{index:v+1,overflows:w},reset:{placement:E}};const k=w.map(_=>{const L=bn(_.placement);return[_.placement,L&&u?_.overflows.slice(0,2).reduce((D,z)=>D+z,0):_.overflows[0],_.overflows]}).sort((_,L)=>_[1]-L[1]),O=((o=k.filter(_=>_[2].slice(0,bn(_[0])?2:3).every(L=>L<=0))[0])==null?void 0:o[0])||k[0][0];return O!==s?{data:{index:v+1,overflows:w},reset:{placement:O}}:{}}}},EC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...m}=Vr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Nn(o),y=Jn(s),x=Nn(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(x||!g?[Ua(s)]:Lk(s)),E=b!=="none";!p&&E&&w.push(...jk(s,g,b,T));const k=[s,...w],C=await ts(t,m),O=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&O.push(C[v]),d){const A=Nm(o,a,T);O.push(C[A[0]],C[A[1]])}if(_=[..._,{placement:o,overflows:O}],!O.every(A=>A<=0)){var L,D;const A=(((L=i.flip)==null?void 0:L.index)||0)+1,N=k[A];if(N&&(!(d==="alignment"?y!==Jn(N):!1)||_.every(P=>Jn(P.placement)===y?P.overflows[0]>0:!0)))return{data:{index:A,overflows:_},reset:{placement:N}};let H=(D=_.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:D.placement;if(!H)switch(f){case"bestFit":{var z;const M=(z=_.filter(P=>{if(E){const $=Jn(P.placement);return $===y||$==="y"}return!0}).map(P=>[P.placement,P.overflows.filter($=>$>0).reduce(($,F)=>$+F,0)]).sort((P,$)=>P[1]-$[1])[0])==null?void 0:z[0];M&&(H=M);break}case"initialPlacement":H=s;break}if(o!==H)return{reset:{placement:H}}}return{}}}},kC=new Set(["left","top"]);async function CC(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Nn(n),s=bn(n),l=Jn(n)==="y",c=kC.has(a)?-1:1,u=i&&l?-1:1,d=Vr(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof b=="number"&&(f=s==="end"?b*-1:b),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const PC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await CC(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},AC=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:a=!1,limiter:s={fn:m=>{let{x:v,y}=m;return{x:v,y}}},...l}=Vr(e,t),c={x:n,y:r},u=await ts(t,l),d=Jn(Nn(o)),p=Dm(d);let f=c[p],b=c[d];if(i){const m=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+u[m],x=f-u[v];f=zc(y,f,x)}if(a){const m=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=b+u[m],x=b-u[v];b=zc(y,b,x)}const g=s.fn({...t,[p]:f,[d]:b});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[d]:a}}}}}},IC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Vr(e,t),u=await ts(t,c),d=Nn(o),p=bn(o),f=Jn(o)==="y",{width:b,height:g}=i.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,m=p==="end"?"top":"bottom");const y=g-u.top-u.bottom,x=b-u.left-u.right,T=dr(g-u[m],y),w=dr(b-u[v],x),E=!t.middlewareData.shift;let k=T,C=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),E&&!p){const _=nn(u.left,0),L=nn(u.right,0),D=nn(u.top,0),z=nn(u.bottom,0);f?C=b-2*(_!==0||L!==0?_+L:nn(u.left,u.right)):k=g-2*(D!==0||z!==0?D+z:nn(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:k});const O=await a.getDimensions(s.floating);return b!==O.width||g!==O.height?{reset:{rects:!0}}:{}}}};function ig(e){const t=tn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Wa(n)!==i||Wa(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Jc(e){return it(e)?e:e.contextElement}function To(e){const t=Jc(e);if(!Tt(t))return Dn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ig(t);let a=(i?Wa(n.width):n.width)/r,s=(i?Wa(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const _C=Dn(0);function ag(e){const t=qt(e);return!Ra()||!t.visualViewport?_C:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function OC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function jr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Jc(e);let a=Dn(1);t&&(r?it(r)&&(a=To(r)):a=To(e));const s=OC(i,n,r)?ag(i):Dn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=qt(i),f=r&&it(r)?qt(r):r;let b=p,g=jc(b);for(;g&&r&&f!==b;){const m=To(g),v=g.getBoundingClientRect(),y=tn(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*m.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=T,b=qt(g),g=jc(b)}}return Ya({width:u,height:d,x:l,y:c})}function eu(e,t){const n=Ha(e).scrollLeft;return t?t.left+n:jr(Mn(e)).left+n}function sg(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:eu(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function MC(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Mn(r),s=t?Ba(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Dn(1);const u=Dn(0),d=Tt(r);if((d||!d&&!i)&&((cr(r)!=="body"||Ei(a))&&(l=Ha(r)),Tt(r))){const f=jr(r);c=To(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const p=a&&!d&&!i?sg(a,l,!0):Dn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function DC(e){return Array.from(e.getClientRects())}function NC(e){const t=Mn(e),n=Ha(e),r=e.ownerDocument.body,o=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+eu(e);const s=-n.scrollTop;return tn(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function LC(e,t){const n=qt(e),r=Mn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=Ra();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}const FC=new Set(["absolute","fixed"]);function VC(e,t){const n=jr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Tt(e)?To(e):Dn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function lg(e,t,n){let r;if(t==="viewport")r=LC(e,n);else if(t==="document")r=NC(Mn(e));else if(it(t))r=VC(t,n);else{const o=ag(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ya(r)}function cg(e,t){const n=Qn(e);return n===t||!it(n)||Xn(n)?!1:tn(n).position==="fixed"||cg(n,t)}function $C(e,t){const n=t.get(e);if(n)return n;let r=ur(e,[],!1).filter(s=>it(s)&&cr(s)!=="body"),o=null;const i=tn(e).position==="fixed";let a=i?Qn(e):e;for(;it(a)&&!Xn(a);){const s=tn(a),l=$c(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&FC.has(o.position)||Ei(a)&&!l&&cg(e,a))?r=r.filter(u=>u!==a):o=s,a=Qn(a)}return t.set(e,r),r}function jC(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ba(t)?[]:$C(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=lg(t,u,o);return c.top=nn(d.top,c.top),c.right=dr(d.right,c.right),c.bottom=dr(d.bottom,c.bottom),c.left=nn(d.left,c.left),c},lg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function zC(e){const{width:t,height:n}=ig(e);return{width:t,height:n}}function BC(e,t,n){const r=Tt(t),o=Mn(t),i=n==="fixed",a=jr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Dn(0);function c(){l.x=eu(o)}if(r||!r&&!i)if((cr(t)!=="body"||Ei(o))&&(s=Ha(t)),r){const f=jr(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?sg(o,s):Dn(0),d=a.left+s.scrollLeft-l.x-u.x,p=a.top+s.scrollTop-l.y-u.y;return{x:d,y:p,width:a.width,height:a.height}}function tu(e){return tn(e).position==="static"}function ug(e,t){if(!Tt(e)||tn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mn(e)===n&&(n=n.ownerDocument.body),n}function dg(e,t){const n=qt(e);if(Ba(e))return n;if(!Tt(e)){let o=Qn(e);for(;o&&!Xn(o);){if(it(o)&&!tu(o))return o;o=Qn(o)}return n}let r=ug(e,t);for(;r&&Ek(r)&&tu(r);)r=ug(r,t);return r&&Xn(r)&&tu(r)&&!$c(r)?n:r||Ik(e)||n}const RC=async function(e){const t=this.getOffsetParent||dg,n=this.getDimensions,r=await n(e.floating);return{reference:BC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function HC(e){return tn(e).direction==="rtl"}const WC={convertOffsetParentRelativeRectToViewportRelativeRect:MC,getDocumentElement:Mn,getClippingRect:jC,getOffsetParent:dg,getElementRects:RC,getClientRects:DC,getDimensions:zC,getScale:To,isElement:it,isRTL:HC};function fg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qC(e,t){let n=null,r;const o=Mn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const b=xo(d),g=xo(o.clientWidth-(u+p)),m=xo(o.clientHeight-(d+f)),v=xo(u),x={rootMargin:-b+"px "+-g+"px "+-m+"px "+-v+"px",threshold:nn(0,dr(1,l))||1};let T=!0;function w(E){const k=E[0].intersectionRatio;if(k!==l){if(!T)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!fg(c,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(w,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,x)}n.observe(e)}return a(!0),i}function Eo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Jc(e),u=o||i?[...c?ur(c):[],...ur(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?qC(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let b,g=l?jr(e):null;l&&m();function m(){const v=jr(e);g&&!fg(g,v)&&n(),g=v,b=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(b)}}const UC=PC,YC=TC,KC=AC,GC=EC,ZC=IC,pg=wC,XC=(e,t,n)=>{const r=new Map,o={platform:WC,...n},i={...o.platform,_c:r};return xC(e,t,{...o,platform:i})};var QC=typeof document<"u",JC=function(){},ns=QC?S.useLayoutEffect:JC;function rs(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(!rs(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)&&!rs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mg(e,t){const n=hg(e);return Math.round(t*n)/n}function nu(e){const t=I.useRef(e);return ns(()=>{t.current=e}),t}function eP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=I.useState(r);rs(p,r)||f(r);const[b,g]=I.useState(null),[m,v]=I.useState(null),y=I.useCallback(P=>{P!==E.current&&(E.current=P,g(P))},[]),x=I.useCallback(P=>{P!==k.current&&(k.current=P,v(P))},[]),T=i||b,w=a||m,E=I.useRef(null),k=I.useRef(null),C=I.useRef(u),O=l!=null,_=nu(l),L=nu(o),D=nu(c),z=I.useCallback(()=>{if(!E.current||!k.current)return;const P={placement:t,strategy:n,middleware:p};L.current&&(P.platform=L.current),XC(E.current,k.current,P).then($=>{const F={...$,isPositioned:D.current!==!1};A.current&&!rs(C.current,F)&&(C.current=F,vi.flushSync(()=>{d(F)}))})},[p,t,n,L,D]);ns(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);const A=I.useRef(!1);ns(()=>(A.current=!0,()=>{A.current=!1}),[]),ns(()=>{if(T&&(E.current=T),w&&(k.current=w),T&&w){if(_.current)return _.current(T,w,z);z()}},[T,w,z,_,O]);const N=I.useMemo(()=>({reference:E,floating:k,setReference:y,setFloating:x}),[y,x]),H=I.useMemo(()=>({reference:T,floating:w}),[T,w]),M=I.useMemo(()=>{const P={position:n,left:0,top:0};if(!H.floating)return P;const $=mg(H.floating,u.x),F=mg(H.floating,u.y);return s?{...P,transform:"translate("+$+"px, "+F+"px)",...hg(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:F}},[n,s,H.floating,u.x,u.y]);return I.useMemo(()=>({...u,update:z,refs:N,elements:H,floatingStyles:M}),[u,z,N,H,M])}const tP=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?pg({element:r.current,padding:o}).fn(n):{}:r?pg({element:r,padding:o}).fn(n):{}}}},Ai=(e,t)=>({...UC(e),options:[e,t]}),ru=(e,t)=>({...KC(e),options:[e,t]}),ou=(e,t)=>({...GC(e),options:[e,t]}),gg=(e,t)=>({...ZC(e),options:[e,t]}),nP=(e,t)=>({...YC(e),options:[e,t]}),vg=(e,t)=>({...tP(e),options:[e,t]});function rP(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 yg=I.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function oP(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=I.useState(()=>new Set),a=I.useCallback(c=>{i(u=>new Set(u).add(c))},[]),s=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(rP).forEach((d,p)=>{c.set(d,p)}),c},[o]);return h.jsx(yg.Provider,{value:I.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function bg(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=I.useContext(yg),[s,l]=I.useState(null),c=I.useRef(null),u=I.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d?.textContent)!=null?p:null}},[s,i,a,t]);return Ke(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ke(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),I.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const iP="data-floating-ui-focusable",xg="active",wg="selected",Ii="ArrowLeft",_i="ArrowRight",Sg="ArrowUp",os="ArrowDown",aP={...I};let Tg=!1,sP=0;const Eg=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+sP++;function lP(){const[e,t]=I.useState(()=>Tg?Eg():void 0);return Ke(()=>{e==null&&t(Eg())},[]),I.useEffect(()=>{Tg=!0},[]),e}const Oi=aP.useId||lP;let Mi;process.env.NODE_ENV!=="production"&&(Mi=new Set);function is(){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=Mi)!=null&&e.has(o))){var i;(i=Mi)==null||i.add(o),console.warn(o)}}function cP(){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=Mi)!=null&&e.has(o))){var i;(i=Mi)==null||i.add(o),console.error(o)}}const kg=I.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:p,d:f,style:{transform:b,...g}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||is("The `ref` prop is required for `FloatingArrow`."));const v=Oi(),[y,x]=I.useState(!1);if(Ke(()=>{if(!o)return;tn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,w]=r.split("-"),E=T==="top"||T==="bottom";let k=d;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(k=null);const C=u*2,O=C/2,_=s/2*(c/-8+1),L=l/2*c/4,D=!!f,z=k&&w==="end"?"bottom":"top";let A=k&&w==="end"?"right":"left";k&&y&&(A=w==="end"?"left":"right");const N=i?.x!=null?k||i.x:"",H=i?.y!=null?k||i.y:"",M=f||"M0,0"+(" H"+s)+(" L"+(s-_)+","+(l-L))+(" Q"+s/2+","+l+" "+_+","+(l-L))+" Z",P={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[T];return h.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:D?s:s+C,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[A]:N,[z]:H,[T]:E||D?"100%":"calc(100% - "+C/2+"px)",transform:[P,b].filter($=>!!$).join(" "),...g},children:[C>0&&h.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:p,strokeWidth:C+(f?0:1),d:M}),h.jsx("path",{stroke:C&&!f?m.fill:"none",d:M}),h.jsx("clipPath",{id:v,children:h.jsx("rect",{x:-O,y:O*(D?-1:1),width:s+C,height:s})})]})});function Cg(){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 Pg=I.createContext(null),Ag=I.createContext(null),fr=()=>{var e;return((e=I.useContext(Pg))==null?void 0:e.id)||null},pr=()=>I.useContext(Ag);function uP(e){const t=Oi(),n=pr(),o=fr();return Ke(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function dP(e){const{children:t,id:n}=e,r=fr();return h.jsx(Pg.Provider,{value:I.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function fP(e){const{children:t}=e,n=I.useRef([]),r=I.useCallback(a=>{n.current=[...n.current,a]},[]),o=I.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),[i]=I.useState(()=>Cg());return h.jsx(Ag.Provider,{value:I.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function zr(e){return"data-floating-ui-"+e}function jt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Ig=zr("safe-polygon");function iu(e,t,n){if(n&&!So(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 au(e){return typeof e=="function"?e():e}function _g(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=pr(),b=fr(),g=Lt(c),m=Lt(l),v=Lt(n),y=Lt(d),x=I.useRef(),T=I.useRef(-1),w=I.useRef(),E=I.useRef(-1),k=I.useRef(!0),C=I.useRef(!1),O=I.useRef(()=>{}),_=I.useRef(!1),L=ht(()=>{var M;const P=(M=o.current.openEvent)==null?void 0:M.type;return P?.includes("mouse")&&P!=="mousedown"});I.useEffect(()=>{if(!s)return;function M(P){let{open:$}=P;$||(jt(T),jt(E),k.current=!0,_.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),I.useEffect(()=>{if(!s||!g.current||!n)return;function M($){L()&&r(!1,$,"hover")}const P=Vt(a.floating).documentElement;return P.addEventListener("mouseleave",M),()=>{P.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,L]);const D=I.useCallback(function(M,P,$){P===void 0&&(P=!0),$===void 0&&($="hover");const F=iu(m.current,"close",x.current);F&&!w.current?(jt(T),T.current=window.setTimeout(()=>r(!1,M,$),F)):P&&(jt(T),r(!1,M,$))},[m,r]),z=ht(()=>{O.current(),w.current=void 0}),A=ht(()=>{if(C.current){const M=Vt(a.floating).body;M.style.pointerEvents="",M.removeAttribute(Ig),C.current=!1}}),N=ht(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);I.useEffect(()=>{if(!s)return;function M(G){if(jt(T),k.current=!1,u&&!So(x.current)||au(y.current)>0&&!iu(m.current,"open"))return;const B=iu(m.current,"open",x.current);B?T.current=window.setTimeout(()=>{v.current||r(!0,G,"hover")},B):n||r(!0,G,"hover")}function P(G){if(N()){A();return}O.current();const B=Vt(a.floating);if(jt(E),_.current=!1,g.current&&o.current.floatingContext){n||jt(T),w.current=g.current({...o.current.floatingContext,tree:f,x:G.clientX,y:G.clientY,onClose(){A(),z(),N()||D(G,!0,"safe-polygon")}});const te=w.current;B.addEventListener("mousemove",te),O.current=()=>{B.removeEventListener("mousemove",te)};return}(x.current==="touch"?!Nt(a.floating,G.relatedTarget):!0)&&D(G)}function $(G){N()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:G.clientX,y:G.clientY,onClose(){A(),z(),N()||D(G)}})(G))}function F(){jt(T)}function U(G){N()||D(G,!1)}if(it(a.domReference)){const G=a.domReference,B=a.floating;return n&&G.addEventListener("mouseleave",$),p&&G.addEventListener("mousemove",M,{once:!0}),G.addEventListener("mouseenter",M),G.addEventListener("mouseleave",P),B&&(B.addEventListener("mouseleave",$),B.addEventListener("mouseenter",F),B.addEventListener("mouseleave",U)),()=>{n&&G.removeEventListener("mouseleave",$),p&&G.removeEventListener("mousemove",M),G.removeEventListener("mouseenter",M),G.removeEventListener("mouseleave",P),B&&(B.removeEventListener("mouseleave",$),B.removeEventListener("mouseenter",F),B.removeEventListener("mouseleave",U))}}},[a,s,e,u,p,D,z,A,r,n,v,f,m,g,o,N,y]),Ke(()=>{var M;if(s&&n&&(M=g.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&L()){C.current=!0;const $=a.floating;if(it(a.domReference)&&$){var P;const F=Vt(a.floating).body;F.setAttribute(Ig,"");const U=a.domReference,G=f==null||(P=f.nodesRef.current.find(B=>B.id===b))==null||(P=P.context)==null?void 0:P.elements.floating;return G&&(G.style.pointerEvents=""),F.style.pointerEvents="none",U.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{F.style.pointerEvents="",U.style.pointerEvents="",$.style.pointerEvents=""}}}},[s,n,b,a,f,g,L]),Ke(()=>{n||(x.current=void 0,_.current=!1,z(),A())},[n,z,A]),I.useEffect(()=>()=>{z(),jt(T),jt(E),A()},[s,a.domReference,z,A]);const H=I.useMemo(()=>{function M(P){x.current=P.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(P){const{nativeEvent:$}=P;function F(){!k.current&&!v.current&&r(!0,$,"hover")}u&&!So(x.current)||n||au(y.current)===0||_.current&&P.movementX**2+P.movementY**2<2||(jt(E),x.current==="touch"?F():(_.current=!0,E.current=window.setTimeout(F,au(y.current))))}}},[u,r,n,v,y]);return I.useMemo(()=>s?{reference:H}:{},[s,H])}let Og=0;function Br(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Og);const i=()=>e?.focus({preventScroll:n});o?i():Og=requestAnimationFrame(i)}function su(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&za(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function pP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function hP(e){return e?.ownerDocument||document}const ko={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Mg(e){return e==="inert"?ko.inert:e==="aria-hidden"?ko["aria-hidden"]:ko.none}let as=new WeakSet,ss={},lu=0;const mP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Dg=e=>e&&(e.host||Dg(e.parentNode)),gP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Dg(n);return e.contains(r)?r:null}).filter(n=>n!=null);function vP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=gP(t,e),s=new Set,l=new Set(a),c=[];ss[o]||(ss[o]=new WeakMap);const u=ss[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,b=>{if(cr(b)!=="script")if(s.has(b))p(b);else{const g=i?b.getAttribute(i):null,m=g!==null&&g!=="false",v=Mg(i),y=(v.get(b)||0)+1,x=(u.get(b)||0)+1;v.set(b,y),u.set(b,x),c.push(b),y===1&&m&&as.add(b),x===1&&b.setAttribute(o,""),!m&&i&&b.setAttribute(i,i==="inert"?"":"true")}})}return lu++,()=>{c.forEach(f=>{const b=Mg(i),m=(b.get(f)||0)-1,v=(u.get(f)||0)-1;b.set(f,m),u.set(f,v),m||(!as.has(f)&&i&&f.removeAttribute(i),as.delete(f)),v||f.removeAttribute(o)}),lu--,lu||(ko.inert=new WeakMap,ko["aria-hidden"]=new WeakMap,ko.none=new WeakMap,as=new WeakSet,ss={})}}function Ng(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=hP(e[0]).body;return vP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const ls={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},cs=I.forwardRef(function(t,n){const[r,o]=I.useState();Ke(()=>{Ym()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[zr("focus-guard")]:"",style:ls};return h.jsx("span",{...t,...i})}),Lg=I.createContext(null),Fg=zr("portal");function yP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Oi(),o=Vg(),[i,a]=I.useState(null),s=I.useRef(null);return Ke(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),Ke(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Fg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Ke(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!Vc(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(Fg,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function hr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=yP({id:n,root:r}),[a,s]=I.useState(null),l=I.useRef(null),c=I.useRef(null),u=I.useRef(null),d=I.useRef(null),p=a?.modal,f=a?.open,b=!!a&&!a.modal&&a.open&&o&&!!(r||i);return I.useEffect(()=>{if(!i||!o||p)return;function g(m){i&&Pi(m)&&(m.type==="focusin"?rg:bC)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,p]),I.useEffect(()=>{i&&(f||rg(i))},[f,i]),h.jsxs(Lg.Provider,{value:I.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[b&&i&&h.jsx(cs,{"data-type":"outside",ref:l,onFocus:g=>{if(Pi(g,i)){var m;(m=u.current)==null||m.focus()}else{const v=a?a.domReference:null,y=ng(v);y?.focus()}}}),b&&i&&h.jsx("span",{"aria-owns":i.id,style:ls}),i&&vi.createPortal(t,i),b&&i&&h.jsx(cs,{"data-type":"outside",ref:c,onFocus:g=>{if(Pi(g,i)){var m;(m=d.current)==null||m.focus()}else{const v=a?a.domReference:null,y=tg(v);y?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const Vg=()=>I.useContext(Lg);function $g(e){return I.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const bP=20;let mr=[];function cu(){mr=mr.filter(e=>e.isConnected)}function xP(e){cu(),e&&cr(e)!=="body"&&(mr.push(e),mr.length>bP&&(mr=mr.slice(-20)))}function jg(){return cu(),mr[mr.length-1]}function wP(e){const t=Ci();return qm(e,t)?e:Xa(e,t)[0]||e}function zg(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Ci(),i=nC(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return qm(s,r)||s.hasAttribute("data-tabindex")&&!l.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const SP=I.forwardRef(function(t,n){return h.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:ls})});function Rr(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:p=!1,getInsideElements:f=()=>[]}=e,{open:b,onOpenChange:g,events:m,dataRef:v,elements:{domReference:y,floating:x}}=t,T=ht(()=>{var j;return(j=v.current.floatingContext)==null?void 0:j.nodeId}),w=ht(f),E=typeof a=="number"&&a<0,k=Xc(y)&&E,C=mP(),O=C?i:!0,_=!O||C&&p,L=Lt(o),D=Lt(a),z=Lt(s),A=pr(),N=Vg(),H=I.useRef(null),M=I.useRef(null),P=I.useRef(!1),$=I.useRef(!1),F=I.useRef(-1),U=I.useRef(-1),G=N!=null,B=Qa(x),Z=ht(function(j){return j===void 0&&(j=B),j?Xa(j,Ci()):[]}),te=ht(j=>{const se=Z(j);return L.current.map(le=>y&&le==="reference"?y:B&&le==="floating"?B:se).filter(Boolean).flat()});I.useEffect(()=>{if(r||!c)return;function j(le){if(le.key==="Tab"){Nt(B,Ln(Vt(B)))&&Z().length===0&&!k&&$t(le);const he=te(),xe=Fn(le);L.current[0]==="reference"&&xe===y&&($t(le),le.shiftKey?Br(he[he.length-1]):Br(he[1])),L.current[1]==="floating"&&xe===B&&le.shiftKey&&($t(le),Br(he[0]))}}const se=Vt(B);return se.addEventListener("keydown",j),()=>{se.removeEventListener("keydown",j)}},[r,y,B,c,L,k,Z,te]),I.useEffect(()=>{if(r||!x)return;function j(se){const le=Fn(se),xe=Z().indexOf(le);xe!==-1&&(F.current=xe)}return x.addEventListener("focusin",j),()=>{x.removeEventListener("focusin",j)}},[r,x,Z]),I.useEffect(()=>{if(r||!d)return;function j(){$.current=!0,setTimeout(()=>{$.current=!1})}function se(xe){const de=xe.relatedTarget,Pe=xe.currentTarget,Oe=Fn(xe);queueMicrotask(()=>{const Te=T(),Re=!(Nt(y,de)||Nt(x,de)||Nt(de,x)||Nt(N?.portalNode,de)||de!=null&&de.hasAttribute(zr("focus-guard"))||A&&($r(A.nodesRef.current,Te).find(ue=>{var Y,V;return Nt((Y=ue.context)==null?void 0:Y.elements.floating,de)||Nt((V=ue.context)==null?void 0:V.elements.domReference,de)})||Zm(A.nodesRef.current,Te).find(ue=>{var Y,V,Q;return[(Y=ue.context)==null?void 0:Y.elements.floating,Qa((V=ue.context)==null?void 0:V.elements.floating)].includes(de)||((Q=ue.context)==null?void 0:Q.elements.domReference)===de})));if(Pe===y&&B&&zg(B,L),l&&Pe!==y&&!(Oe!=null&&Oe.isConnected)&&Ln(Vt(B))===Vt(B).body){Tt(B)&&B.focus();const ue=F.current,Y=Z(),V=Y[ue]||Y[Y.length-1]||B;Tt(V)&&V.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(k||!c)&&de&&Re&&!$.current&&de!==jg()&&(P.current=!0,g(!1,xe,"focus-out"))})}const le=!!(!A&&N);function he(){jt(U),v.current.insideReactTree=!0,U.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&Tt(y))return y.addEventListener("focusout",se),y.addEventListener("pointerdown",j),x.addEventListener("focusout",se),le&&x.addEventListener("focusout",he,!0),()=>{y.removeEventListener("focusout",se),y.removeEventListener("pointerdown",j),x.removeEventListener("focusout",se),le&&x.removeEventListener("focusout",he,!0)}},[r,y,x,B,c,A,N,g,d,l,Z,k,T,L,v]);const ne=I.useRef(null),J=I.useRef(null),R=$g([ne,N?.beforeInsideRef]),q=$g([J,N?.afterInsideRef]);I.useEffect(()=>{var j,se;if(r||!x)return;const le=Array.from((N==null||(j=N.portalNode)==null?void 0:j.querySelectorAll("["+zr("portal")+"]"))||[]),xe=(se=(A?Zm(A.nodesRef.current,T()):[]).find(Oe=>{var Te;return Xc(((Te=Oe.context)==null?void 0:Te.elements.domReference)||null)}))==null||(se=se.context)==null?void 0:se.elements.domReference,de=[x,xe,...le,...w(),H.current,M.current,ne.current,J.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,L.current.includes("reference")||k?y:null].filter(Oe=>Oe!=null),Pe=c||k?Ng(de,!_,_):Ng(de);return()=>{Pe()}},[r,y,x,c,L,N,k,O,_,A,T,w]),Ke(()=>{if(r||!Tt(B))return;const j=Vt(B),se=Ln(j);queueMicrotask(()=>{const le=te(B),he=D.current,xe=(typeof he=="number"?le[he]:he.current)||B,de=Nt(B,se);!E&&!de&&b&&Br(xe,{preventScroll:xe===B})})},[r,b,B,E,te,D]),Ke(()=>{if(r||!B)return;const j=Vt(B),se=Ln(j);xP(se);function le(de){let{reason:Pe,event:Oe,nested:Te}=de;if(["hover","safe-polygon"].includes(Pe)&&Oe.type==="mouseleave"&&(P.current=!0),Pe==="outside-press")if(Te)P.current=!1;else if(Xm(Oe)||Qm(Oe))P.current=!1;else{let Re=!1;document.createElement("div").focus({get preventScroll(){return Re=!0,!1}}),Re?P.current=!1:P.current=!0}}m.on("openchange",le);const he=j.createElement("span");he.setAttribute("tabindex","-1"),he.setAttribute("aria-hidden","true"),Object.assign(he.style,ls),G&&y&&y.insertAdjacentElement("afterend",he);function xe(){if(typeof z.current=="boolean"){const de=y||jg();return de&&de.isConnected?de:he}return z.current.current||he}return()=>{m.off("openchange",le);const de=Ln(j),Pe=Nt(x,de)||A&&$r(A.nodesRef.current,T(),!1).some(Te=>{var Re;return Nt((Re=Te.context)==null?void 0:Re.elements.floating,de)}),Oe=xe();queueMicrotask(()=>{const Te=wP(Oe);z.current&&!P.current&&Tt(Te)&&(!(Te!==de&&de!==j.body)||Pe)&&Te.focus({preventScroll:!0}),he.remove()})}},[r,x,B,z,v,m,A,G,y,T]),I.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(cu)}),[r]),Ke(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:b,onOpenChange:g,domReference:y}),()=>{N.setFocusManagerState(null)}},[r,N,c,b,g,d,y]),Ke(()=>{r||B&&zg(B,L)},[r,B,L]);function X(j){return r||!u||!c?null:h.jsx(SP,{ref:j==="start"?H:M,onClick:se=>g(!1,se.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const oe=!r&&O&&(c?!k:!0)&&(G||c);return h.jsxs(h.Fragment,{children:[oe&&h.jsx(cs,{"data-type":"inside",ref:R,onFocus:j=>{if(c){const le=te();Br(o[0]==="reference"?le[0]:le[le.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(P.current=!1,Pi(j,N.portalNode)){const le=tg(y);le?.focus()}else{var se;(se=N.beforeOutsideRef.current)==null||se.focus()}}}),!k&&X("start"),n,X("end"),oe&&h.jsx(cs,{"data-type":"inside",ref:q,onFocus:j=>{if(c)Br(te()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(P.current=!0),Pi(j,N.portalNode)){const le=ng(y);le?.focus()}else{var se;(se=N.afterOutsideRef.current)==null||se.focus()}}})]})}let us=0;const Bg="--floating-ui-scrollbar-width";function TP(){const e=qc(),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,a=n.left?parseFloat(n.left):window.scrollX,s=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Bg,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:-(s-Math.floor(d))+"px",left:-(a-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(Bg),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let Rg=()=>{};const uu=I.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Ke(()=>{if(r)return us++,us===1&&(Rg=TP()),()=>{us--,us===0&&Rg()}},[r]),h.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Hg(e){return Tt(e.target)&&e.target.tagName==="BUTTON"}function EP(e){return Tt(e.target)&&e.target.tagName==="A"}function Wg(e){return Zc(e)}function Co(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,p=I.useRef(),f=I.useRef(!1),b=I.useMemo(()=>({onPointerDown(g){p.current=g.pointerType},onMouseDown(g){const m=p.current;g.button===0&&s!=="click"&&(So(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){const m=p.current;if(s==="mousedown"&&p.current){p.current=void 0;return}So(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){p.current=void 0,!(g.defaultPrevented||!u||Hg(g))&&(g.key===" "&&!Wg(i)&&(g.preventDefault(),f.current=!0),!EP(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||Hg(g)||Wg(i)||g.key===" "&&f.current&&(f.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return I.useMemo(()=>a?{reference:b}:{},[a,b])}function kP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function qg(e){return e!=null&&e.clientX!=null}function CP(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=I.useRef(!1),p=I.useRef(null),[f,b]=I.useState(),[g,m]=I.useState([]),v=ht((E,k)=>{d.current||r.current.openEvent&&!qg(r.current.openEvent)||a.setPositionReference(kP(i,{x:E,y:k,axis:l,dataRef:r,pointerType:f}))}),y=ht(E=>{c!=null||u!=null||(n?p.current||m([]):v(E.clientX,E.clientY))}),x=So(f)?o:n,T=I.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const E=qt(o);function k(C){const O=Fn(C);Nt(o,O)?(E.removeEventListener("mousemove",k),p.current=null):v(C.clientX,C.clientY)}if(!r.current.openEvent||qg(r.current.openEvent)){E.addEventListener("mousemove",k);const C=()=>{E.removeEventListener("mousemove",k),p.current=null};return p.current=C,C}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);I.useEffect(()=>T(),[T,g]),I.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),I.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Ke(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=I.useMemo(()=>{function E(k){let{pointerType:C}=k;b(C)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return I.useMemo(()=>s?{reference:w}:{},[s,w])}const PP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},AP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ug=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 gr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:b}=t,g=pr(),m=ht(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,y=I.useRef(!1),{escapeKey:x,outsidePress:T}=Ug(f),{escapeKey:w,outsidePress:E}=Ug(b),k=I.useRef(!1),C=ht(A=>{var N;if(!n||!a||!s||A.key!=="Escape"||k.current)return;const H=(N=i.current.floatingContext)==null?void 0:N.nodeId,M=g?$r(g.nodesRef.current,H):[];if(!x&&(A.stopPropagation(),M.length>0)){let P=!0;if(M.forEach($=>{var F;if((F=$.context)!=null&&F.open&&!$.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,uC(A)?A.nativeEvent:A,"escape-key")}),O=ht(A=>{var N;const H=()=>{var M;C(A),(M=Fn(A))==null||M.removeEventListener("keydown",H)};(N=Fn(A))==null||N.addEventListener("keydown",H)}),_=ht(A=>{var N;const H=i.current.insideReactTree;i.current.insideReactTree=!1;const M=y.current;if(y.current=!1,c==="click"&&M||H||typeof v=="function"&&!v(A))return;const P=Fn(A),$="["+zr("inert")+"]",F=Vt(o.floating).querySelectorAll($);let U=it(P)?P:null;for(;U&&!Xn(U);){const te=Qn(U);if(Xn(te)||!it(te))break;U=te}if(F.length&&it(P)&&!sC(P)&&!Nt(P,o.floating)&&Array.from(F).every(te=>!Nt(U,te)))return;if(Tt(P)&&z){const te=Xn(P),ne=tn(P),J=/auto|scroll/,R=te||J.test(ne.overflowX),q=te||J.test(ne.overflowY),X=R&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,oe=q&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,j=ne.direction==="rtl",se=oe&&(j?A.offsetX<=P.offsetWidth-P.clientWidth:A.offsetX>P.clientWidth),le=X&&A.offsetY>P.clientHeight;if(se||le)return}const G=(N=i.current.floatingContext)==null?void 0:N.nodeId,B=g&&$r(g.nodesRef.current,G).some(te=>{var ne;return Gc(A,(ne=te.context)==null?void 0:ne.elements.floating)});if(Gc(A,o.floating)||Gc(A,o.domReference)||B)return;const Z=g?$r(g.nodesRef.current,G):[];if(Z.length>0){let te=!0;if(Z.forEach(ne=>{var J;if((J=ne.context)!=null&&J.open&&!ne.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}r(!1,A,"outside-press")}),L=ht(A=>{var N;const H=()=>{var M;_(A),(M=Fn(A))==null||M.removeEventListener(c,H)};(N=Fn(A))==null||N.addEventListener(c,H)});I.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let A=-1;function N(F){r(!1,F,"ancestor-scroll")}function H(){window.clearTimeout(A),k.current=!0}function M(){A=window.setTimeout(()=>{k.current=!1},Ra()?5:0)}const P=Vt(o.floating);s&&(P.addEventListener("keydown",w?O:C,w),P.addEventListener("compositionstart",H),P.addEventListener("compositionend",M)),v&&P.addEventListener(c,E?L:_,E);let $=[];return p&&(it(o.domReference)&&($=ur(o.domReference)),it(o.floating)&&($=$.concat(ur(o.floating))),!it(o.reference)&&o.reference&&o.reference.contextElement&&($=$.concat(ur(o.reference.contextElement)))),$=$.filter(F=>{var U;return F!==((U=P.defaultView)==null?void 0:U.visualViewport)}),$.forEach(F=>{F.addEventListener("scroll",N,{passive:!0})}),()=>{s&&(P.removeEventListener("keydown",w?O:C,w),P.removeEventListener("compositionstart",H),P.removeEventListener("compositionend",M)),v&&P.removeEventListener(c,E?L:_,E),$.forEach(F=>{F.removeEventListener("scroll",N)}),window.clearTimeout(A)}},[i,o,s,v,c,n,r,p,a,x,T,C,w,O,_,E,L]),I.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const D=I.useMemo(()=>({onKeyDown:C,...u&&{[PP[d]]:A=>{r(!1,A.nativeEvent,"reference-press")},...d!=="click"&&{onClick(A){r(!1,A.nativeEvent,"reference-press")}}}}),[C,r,u,d]),z=I.useMemo(()=>({onKeyDown:C,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[AP[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return I.useMemo(()=>a?{reference:D,floating:z}:{},[a,D,z])}function IP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Oi(),i=I.useRef({}),[a]=I.useState(()=>Cg()),s=fr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!it(f)&&cP("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=ht((f,b,g)=>{i.current.openEvent=f?b:void 0,a.emit("openchange",{open:f,event:b,reason:g,nested:s}),n?.(f,b,g)}),d=I.useMemo(()=>({setPositionReference:c}),[]),p=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:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function er(e){e===void 0&&(e={});const{nodeId:t}=e,n=IP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=I.useState(null),[s,l]=I.useState(null),u=o?.domReference||i,d=I.useRef(null),p=pr();Ke(()=>{u&&(d.current=u)},[u]);const f=eP({...e,elements:{...o,...s&&{reference:s}}}),b=I.useCallback(x=>{const T=it(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),f.refs.setReference(T)},[f.refs]),g=I.useCallback(x=>{(it(x)||x===null)&&(d.current=x,a(x)),(it(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!it(x))&&f.refs.setReference(x)},[f.refs]),m=I.useMemo(()=>({...f.refs,setReference:g,setPositionReference:b,domReference:d}),[f.refs,g,b]),v=I.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=I.useMemo(()=>({...f,...r,refs:m,elements:v,nodeId:t}),[f,m,v,t,r]);return Ke(()=>{r.dataRef.current.floatingContext=y;const x=p?.nodesRef.current.find(T=>T.id===t);x&&(x.context=y)}),I.useMemo(()=>({...f,context:y,refs:m,elements:v}),[f,m,v,y])}function du(){return rC()&&Ym()}function _P(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=I.useRef(!1),u=I.useRef(-1),d=I.useRef(!0);I.useEffect(()=>{if(!s)return;const f=qt(a.domReference);function b(){!n&&Tt(a.domReference)&&a.domReference===Ln(Vt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}function m(){d.current=!1}return f.addEventListener("blur",b),du()&&(f.addEventListener("keydown",g,!0),f.addEventListener("pointerdown",m,!0)),()=>{f.removeEventListener("blur",b),du()&&(f.removeEventListener("keydown",g,!0),f.removeEventListener("pointerdown",m,!0))}},[a.domReference,n,s]),I.useEffect(()=>{if(!s)return;function f(b){let{reason:g}=b;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),I.useEffect(()=>()=>{jt(u)},[]);const p=I.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const b=Fn(f.nativeEvent);if(l&&it(b)){if(du()&&!f.relatedTarget){if(!d.current&&!Zc(b))return}else if(!lC(b))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const b=f.relatedTarget,g=f.nativeEvent,m=it(b)&&b.hasAttribute(zr("focus-guard"))&&b.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=Ln(a.domReference?a.domReference.ownerDocument:document);!b&&y===a.domReference||Nt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||Nt(a.domReference,y)||m||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return I.useMemo(()=>s?{reference:p}:{},[s,p])}function fu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[xg]:a,[wg]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[iP]:""},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[xg,wg].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),a[c]=function(){for(var p,f=arguments.length,b=new Array(f),g=0;g<f;g++)b[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(m=>m(...b)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function tr(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=I.useCallback(s=>fu(s,e,"reference"),t),i=I.useCallback(s=>fu(s,e,"floating"),n),a=I.useCallback(s=>fu(s,e,"item"),r);return I.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const OP="Escape";function ds(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function fs(e,t){return ds(t,e===Sg||e===os,e===Ii||e===_i)}function pu(e,t,n){return ds(t,e===os,n?e===Ii:e===_i)||e==="Enter"||e===" "||e===""}function Yg(e,t,n){return ds(t,n?e===Ii:e===_i,e===os)}function Kg(e,t,n,r){const o=n?e===_i:e===Ii,i=e===Sg;return t==="both"||t==="horizontal"&&r&&r>1?e===OP:ds(t,o,i)}function ps(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:p=!1,nested:f=!1,rtl:b=!1,virtual:g=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:w,cols:E=1,scrollItemIntoView:k=!0,virtualItemRef:C,itemSizes:O,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(p||is("`useListNavigation` looping must be enabled to allow escaping."),g||is("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&E>1&&is("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const L=Qa(o.floating),D=Lt(L),z=fr(),A=pr();Ke(()=>{e.dataRef.current.orientation=T},[e,T]);const N=ht(()=>{l(P.current===-1?null:P.current)}),H=Xc(o.domReference),M=I.useRef(m),P=I.useRef(u??-1),$=I.useRef(null),F=I.useRef(!0),U=I.useRef(N),G=I.useRef(!!o.floating),B=I.useRef(n),Z=I.useRef(!1),te=I.useRef(!1),ne=Lt(x),J=Lt(n),R=Lt(k),q=Lt(u),[X,oe]=I.useState(),[j,se]=I.useState(),le=ht(()=>{function ue(ce){if(g){var we;(we=ce.id)!=null&&we.endsWith("-fui-option")&&(ce.id=i+"-"+Math.random().toString(16).slice(2,10)),oe(ce.id),A?.events.emit("virtualfocus",ce),C&&(C.current=ce)}else Br(ce,{sync:Z.current,preventScroll:!0})}const Y=a.current[P.current],V=te.current;Y&&ue(Y),(Z.current?ce=>ce():requestAnimationFrame)(()=>{const ce=a.current[P.current]||Y;if(!ce)return;Y||ue(ce);const we=R.current;we&&xe&&(V||!F.current)&&(ce.scrollIntoView==null||ce.scrollIntoView(typeof we=="boolean"?{block:"nearest",inline:"nearest"}:we))})});Ke(()=>{c&&(n&&o.floating?M.current&&u!=null&&(te.current=!0,P.current=u,N()):G.current&&(P.current=-1,U.current()))},[c,n,o.floating,u,N]),Ke(()=>{if(c&&n&&o.floating)if(s==null){if(Z.current=!1,q.current!=null)return;if(G.current&&(P.current=-1,le()),(!B.current||!G.current)&&M.current&&($.current!=null||M.current===!0&&$.current==null)){let ue=0;const Y=()=>{a.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Y),ue++):(P.current=$.current==null||pu($.current,T,b)||f?Qc(a,ne.current):Jm(a,ne.current),$.current=null,N())};Y()}}else ki(a,s)||(P.current=s,le(),te.current=!1)},[c,n,o.floating,s,q,f,a,T,b,N,le,ne]),Ke(()=>{var ue;if(!c||o.floating||!A||g||!G.current)return;const Y=A.nodesRef.current,V=(ue=Y.find(we=>we.id===z))==null||(ue=ue.context)==null?void 0:ue.elements.floating,Q=Ln(Vt(o.floating)),ce=Y.some(we=>we.context&&Nt(we.context.elements.floating,Q));V&&!ce&&F.current&&V.focus({preventScroll:!0})},[c,o.floating,A,z,g]),Ke(()=>{if(!c||!A||!g||z)return;function ue(Y){se(Y.id),C&&(C.current=Y)}return A.events.on("virtualfocus",ue),()=>{A.events.off("virtualfocus",ue)}},[c,A,g,z,C]),Ke(()=>{U.current=N,B.current=n,G.current=!!o.floating}),Ke(()=>{n||($.current=null,M.current=m)},[n,m]);const he=s!=null,xe=I.useMemo(()=>{function ue(V){if(!J.current)return;const Q=a.current.indexOf(V);Q!==-1&&P.current!==Q&&(P.current=Q,N())}return{onFocus(V){let{currentTarget:Q}=V;Z.current=!0,ue(Q)},onClick:V=>{let{currentTarget:Q}=V;return Q.focus({preventScroll:!0})},onMouseMove(V){let{currentTarget:Q}=V;Z.current=!0,te.current=!1,v&&ue(Q)},onPointerLeave(V){let{pointerType:Q}=V;if(!(!F.current||Q==="touch")&&(Z.current=!0,!!v&&(P.current=-1,N(),!g))){var ce;(ce=D.current)==null||ce.focus({preventScroll:!0})}}}},[J,D,v,a,N,g]),de=I.useCallback(()=>{var ue;return w??(A==null||(ue=A.nodesRef.current.find(Y=>Y.id===z))==null||(ue=ue.context)==null||(ue=ue.dataRef)==null?void 0:ue.current.orientation)},[z,A,w]),Pe=ht(ue=>{if(F.current=!1,Z.current=!0,ue.which===229||!J.current&&ue.currentTarget===D.current)return;if(f&&Kg(ue.key,T,b,E)){fs(ue.key,de())||$t(ue),r(!1,ue.nativeEvent,"list-navigation"),Tt(o.domReference)&&(g?A?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const Y=P.current,V=Qc(a,x),Q=Jm(a,x);if(H||(ue.key==="Home"&&($t(ue),P.current=V,N()),ue.key==="End"&&($t(ue),P.current=Q,N())),E>1){const ce=O||Array.from({length:a.current.length},()=>({width:1,height:1})),we=gC(ce,E,_),Le=we.findIndex(xt=>xt!=null&&!es(a,xt,x)),Ze=we.reduce((xt,Kt,Kn)=>Kt!=null&&!es(a,Kt,x)?Kn:xt,-1),Ft=we[mC({current:we.map(xt=>xt!=null?a.current[xt]:null)},{event:ue,orientation:T,loop:p,rtl:b,cols:E,disabledIndices:yC([...(typeof x!="function"?x:null)||a.current.map((xt,Kt)=>es(a,Kt,x)?Kt:void 0),void 0],we),minIndex:Le,maxIndex:Ze,prevIndex:vC(P.current>Q?V:P.current,ce,we,E,ue.key===os?"bl":ue.key===(b?Ii:_i)?"tr":"tl"),stopEvent:!0})];if(Ft!=null&&(P.current=Ft,N()),T==="both")return}if(fs(ue.key,T)){if($t(ue),n&&!g&&Ln(ue.currentTarget.ownerDocument)===ue.currentTarget){P.current=pu(ue.key,T,b)?V:Q,N();return}pu(ue.key,T,b)?p?P.current=Y>=Q?d&&Y!==a.current.length?-1:V:Ht(a,{startingIndex:Y,disabledIndices:x}):P.current=Math.min(Q,Ht(a,{startingIndex:Y,disabledIndices:x})):p?P.current=Y<=V?d&&Y!==-1?a.current.length:Q:Ht(a,{startingIndex:Y,decrement:!0,disabledIndices:x}):P.current=Math.max(V,Ht(a,{startingIndex:Y,decrement:!0,disabledIndices:x})),ki(a,P.current)&&(P.current=-1),N()}}),Oe=I.useMemo(()=>g&&n&&he&&{"aria-activedescendant":j||X},[g,n,he,j,X]),Te=I.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...H?{}:Oe,onKeyDown:Pe,onPointerMove(){F.current=!0}}),[Oe,Pe,T,H]),Re=I.useMemo(()=>{function ue(V){m==="auto"&&Xm(V.nativeEvent)&&(M.current=!0)}function Y(V){M.current=m,m==="auto"&&Qm(V.nativeEvent)&&(M.current=!0)}return{...Oe,onKeyDown(V){F.current=!1;const Q=V.key.startsWith("Arrow"),ce=["Home","End"].includes(V.key),we=Q||ce,Le=Yg(V.key,T,b),Ze=Kg(V.key,T,b,E),Ft=Yg(V.key,de(),b),xt=fs(V.key,T),Kt=(f?Ft:xt)||V.key==="Enter"||V.key.trim()==="";if(g&&n){const W=A?.nodesRef.current.find(Fe=>Fe.parentId==null),K=A&&W?cC(A.nodesRef.current,W.id):null;if(we&&K&&C){const Fe=new KeyboardEvent("keydown",{key:V.key,bubbles:!0});if(Le||Ze){var Kn,An;const tt=((Kn=K.context)==null?void 0:Kn.elements.domReference)===V.currentTarget,ot=Ze&&!tt?(An=K.context)==null?void 0:An.elements.domReference:Le?a.current.find(Me=>Me?.id===X):null;ot&&($t(V),ot.dispatchEvent(Fe),se(void 0))}if((xt||ce)&&K.context&&K.context.open&&K.parentId&&V.currentTarget!==K.context.elements.domReference){var In;$t(V),(In=K.context.elements.domReference)==null||In.dispatchEvent(Fe);return}}return Pe(V)}if(!(!n&&!y&&Q)){if(Kt){const W=fs(V.key,de());$.current=f&&W?null:V.key}if(f){Ft&&($t(V),n?(P.current=Qc(a,ne.current),N()):r(!0,V.nativeEvent,"list-navigation"));return}xt&&(u!=null&&(P.current=u),$t(V),!n&&y?r(!0,V.nativeEvent,"list-navigation"):Pe(V),n&&N())}},onFocus(){n&&!g&&(P.current=-1,N())},onPointerDown:Y,onPointerEnter:Y,onMouseDown:ue,onClick:ue}},[X,Oe,E,Pe,ne,m,a,f,N,r,n,y,T,de,b,u,A,g,C]);return I.useMemo(()=>c?{reference:Re,floating:Te,item:xe}:{},[c,Re,Te,xe])}const MP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function vr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,c=Oi(),u=((n=i.domReference)==null?void 0:n.id)||c,d=I.useMemo(()=>{var y;return((y=Qa(i.floating))==null?void 0:y.id)||a},[i.floating,a]),p=(r=MP.get(l))!=null?r:l,b=fr()!=null,g=I.useMemo(()=>p==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":o?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:u},...p==="menu"&&b&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,o,u,l]),m=I.useMemo(()=>{const y={id:d,...p&&{role:p}};return p==="tooltip"||l==="label"?y:{...y,...p==="menu"&&{"aria-labelledby":u}}},[p,d,u,l]),v=I.useCallback(y=>{let{active:x,selected:T}=y;const w={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...w,"aria-selected":T}}return{}},[d,l]);return I.useMemo(()=>s?{reference:g,floating:m,item:v}:{},[s,g,m,v])}const Gg=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Po(e,t){return typeof e=="function"?e(t):e}function DP(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 NP(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=I.useState("unmounted"),c=DP(n,a);return!c&&s==="close"&&l("unmounted"),Ke(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{vi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Zg(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=I.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,b]=I.useState(()=>({...Po(i,c),...Po(n,c)})),{isMounted:g,status:m}=NP(e,{duration:a}),v=Lt(n),y=Lt(r),x=Lt(o),T=Lt(i);return Ke(()=>{const w=Po(v.current,c),E=Po(x.current,c),k=Po(T.current,c),C=Po(y.current,c)||Object.keys(w).reduce((O,_)=>(O[_]="",O),{});if(m==="initial"&&b(O=>({transitionProperty:O.transitionProperty,...k,...w})),m==="open"&&b({transitionProperty:Object.keys(C).map(Gg).join(","),transitionDuration:d+"ms",...k,...C}),m==="close"){const O=E||w;b({transitionProperty:Object.keys(O).map(Gg).join(","),transitionDuration:p+"ms",...k,...O})}},[p,x,v,y,T,d,m,c]),{isMounted:g,styles:f}}function LP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,b=I.useRef(-1),g=I.useRef(""),m=I.useRef((n=f??a)!=null?n:-1),v=I.useRef(null),y=ht(s),x=ht(l),T=Lt(u),w=Lt(p);Ke(()=>{r&&(jt(b),v.current=null,g.current="")},[r]),Ke(()=>{if(r&&g.current===""){var _;m.current=(_=f??a)!=null?_:-1}},[r,f,a]);const E=ht(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),k=ht(_=>{function L(H,M,P){const $=T.current?T.current(M,P):M.find(F=>F?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return $?H.indexOf($):-1}const D=i.current;if(g.current.length>0&&g.current[0]!==" "&&(L(D,D,g.current)===-1?E(!1):_.key===" "&&$t(_)),D==null||w.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&($t(_),E(!0)),D.every(H=>{var M,P;return H?((M=H[0])==null?void 0:M.toLocaleLowerCase())!==((P=H[1])==null?void 0:P.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",m.current=v.current),g.current+=_.key,jt(b),b.current=window.setTimeout(()=>{g.current="",m.current=v.current,E(!1)},d);const A=m.current,N=L(D,[...D.slice((A||0)+1),...D.slice(0,(A||0)+1)],g.current);N!==-1?(y(N),v.current=N):_.key!==" "&&(g.current="",E(!1))}),C=I.useMemo(()=>({onKeyDown:k}),[k]),O=I.useMemo(()=>({onKeyDown:k,onKeyUp(_){_.key===" "&&E(!1)}}),[k,E]);return I.useMemo(()=>c?{reference:C,floating:O}:{},[c,C,O])}function Xg(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,...Xg(e,o.id,n)])}function Qg(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function FP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Jg(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,a=null,s=null,l=typeof performance<"u"?performance.now():0;function c(d,p){const f=performance.now(),b=f-l;if(a===null||s===null||b===0)return a=d,s=p,l=f,null;const g=d-a,m=p-s,y=Math.sqrt(g*g+m*m)/b;return a=d,s=p,l=f,y}const u=d=>{let{x:p,y:f,placement:b,elements:g,onClose:m,nodeId:v,tree:y}=d;return function(T){function w(){jt(o),m()}if(jt(o),!g.domReference||!g.floating||b==null||p==null||f==null)return;const{clientX:E,clientY:k}=T,C=[E,k],O=pP(T),_=T.type==="mouseleave",L=su(g.floating,O),D=su(g.domReference,O),z=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),N=b.split("-")[0],H=p>A.right-A.width/2,M=f>A.bottom-A.height/2,P=FP(C,z),$=A.width>z.width,F=A.height>z.height,U=($?z:A).left,G=($?z:A).right,B=(F?z:A).top,Z=(F?z:A).bottom;if(L&&(i=!0,!_))return;if(D&&(i=!1),D&&!_){i=!0;return}if(_&&it(T.relatedTarget)&&su(g.floating,T.relatedTarget)||y&&Xg(y.nodesRef.current,v).length)return;if(N==="top"&&f>=z.bottom-1||N==="bottom"&&f<=z.top+1||N==="left"&&p>=z.right-1||N==="right"&&p<=z.left+1)return w();let te=[];switch(N){case"top":te=[[U,z.top+1],[U,A.bottom-1],[G,A.bottom-1],[G,z.top+1]];break;case"bottom":te=[[U,A.top+1],[U,z.bottom-1],[G,z.bottom-1],[G,A.top+1]];break;case"left":te=[[A.right-1,Z],[A.right-1,B],[z.left+1,B],[z.left+1,Z]];break;case"right":te=[[z.right-1,Z],[z.right-1,B],[A.left+1,B],[A.left+1,Z]];break}function ne(J){let[R,q]=J;switch(N){case"top":{const X=[$?R+t/2:H?R+t*4:R-t*4,q+t+1],oe=[$?R-t/2:H?R+t*4:R-t*4,q+t+1],j=[[A.left,H||$?A.bottom-t:A.top],[A.right,H?$?A.bottom-t:A.top:A.bottom-t]];return[X,oe,...j]}case"bottom":{const X=[$?R+t/2:H?R+t*4:R-t*4,q-t],oe=[$?R-t/2:H?R+t*4:R-t*4,q-t],j=[[A.left,H||$?A.top+t:A.bottom],[A.right,H?$?A.top+t:A.bottom:A.top+t]];return[X,oe,...j]}case"left":{const X=[R+t+1,F?q+t/2:M?q+t*4:q-t*4],oe=[R+t+1,F?q-t/2:M?q+t*4:q-t*4];return[...[[M||F?A.right-t:A.left,A.top],[M?F?A.right-t:A.left:A.right-t,A.bottom]],X,oe]}case"right":{const X=[R-t,F?q+t/2:M?q+t*4:q-t*4],oe=[R-t,F?q-t/2:M?q+t*4:q-t*4],j=[[M||F?A.left+t:A.right,A.top],[M?F?A.left+t:A.right:A.left+t,A.bottom]];return[X,oe,...j]}}}if(!Qg([E,k],te)){if(i&&!P)return w();if(!_&&r){const J=c(T.clientX,T.clientY);if(J!==null&&J<.1)return w()}Qg([E,k],ne([p,f]))?!i&&r&&(o.current=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const ev=200,VP=500,Ao=()=>{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)}`},tv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),nv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},hu=(e,t)=>{const n=tv(t,nv.basic,e)||tv(t,nv.extend,e);return n===void 0||n===e?void 0:n},yr=()=>typeof window>"u",mu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),rv=(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},$P=e=>!e,gu=()=>{},ov=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},vu=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,onChange:u=gu,followCursor:d=!1,...p},f){const[b,g]=S.useState(n??!1),m=S.useRef(null),v=t||"span",y=A=>{g(A),u?.(A)},{refs:x,floatingStyles:T,context:w}=er({placement:i,open:b,whileElementsMounted:Eo,onOpenChange:n?void 0:y,middleware:[ru(),Ai(5),nP(),vg({padding:5,element:m}),ou({fallbackAxisSideDirection:"start"})]}),E=gr(w,{enabled:l}),k=vr(w,{role:"tooltip",enabled:l}),C=_P(w,{enabled:l?a:!1}),O=Co(w,{enabled:l?c:!1}),_=CP(w,{enabled:!!l&&!!d}),L=_g(w,{move:!0,delay:{open:ev},enabled:l?s:!1,handleClose:c?Jg():null}),{getReferenceProps:D,getFloatingProps:z}=tr([k,E,_,a?C:void 0,s?L:void 0,c?O:void 0]);return S.useEffect(()=>g(n===void 0?!1:n),[n]),h.jsxs(S.Fragment,{children:[h.jsx(v,{...D(p),ref:Zn(x.setReference,f),children:r}),b&&h.jsx(hr,{children:h.jsxs(en,{...z(),ref:x.setFloating,style:T,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[h.jsx(kg,{ref:m,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),iv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>h.jsxs("span",{className:Se("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:h.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:[a,e||o?h.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?h.jsx(vu,{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:h.jsx("span",{className:"cursor-help",children:h.jsx(Mc,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:h.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?h.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[h.jsx(Tm,{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}),h.jsx(ik,{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]}),Di=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:b,componentName:g,placeholder:m,hideLeft:v=!1,required:y,disabled:x,reportStatus:T},w)=>{const E=Fc(),k=T!==void 0?T:E.input.iconFeedback,C=d??f,O=St(),_=e??O.inputOptionalLabel;return h.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Se("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[h.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:[h.jsx(iv,{info:s,hideLeft:v,reportStatus:k,title:b,placeholder:m,children:_||n?h.jsxs(S.Fragment,{children:[y?null:h.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?h.jsx(S.Fragment,{children:n}):null]}):null}),h.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 ${p}`,children:[t?h.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?h.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),h.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}),h.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})]})}),av=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:b="text",labelClassName:g,feedback:m=null,hideLeft:v=!1,loading:y,...x},T)=>{const w=e,E=x.id??x.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const C=k.current,O=bi(k.current),_=r?.(C),L=D=>{const z=D;if(z.key==="Enter"&&C.enterKeyHint==="next"){const A=C.getAttribute("data-next");if(A){const N=document.getElementById(A);if(N)return N.focus(),void z.preventDefault()}}};return C.addEventListener("keydown",L),()=>{_?.(),O(),C.removeEventListener("keydown",L)}},[]),h.jsx(Di,{...n,info:i,left:a,error:l,right:c,loading:y,form:x.form,name:x.name,feedback:m,hideLeft:v,title:x.title,container:Se(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:h.jsx(w,{...n,...x,id:E,name:E,type:b,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Zn(T,k),className:Se("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)})})}),Io=av(bm,"input",{type:"text"}),jP=fo("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"}}),hs=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return h.jsxs(en,{...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:Se(jP({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Hr=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:b,...g},m)=>{const v=St(),y=S.useRef(null),x=g.id??g.name;S.useImperativeHandle(m,()=>y.current),S.useEffect(()=>{if(y.current===null)return;const w=new AbortController,E=y.current,k=bi(y.current);return E.addEventListener("change",()=>E.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{k(),w.abort()}},[]);const T=()=>y.current?.focus();return h.jsx(Di,{info:n,left:f,error:b,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:h.jsxs("label",{htmlFor:x,children:[p,h.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[h.jsx(_c,{size:20}),h.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:h.jsxs("select",{...g,id:x,name:x,required:e,ref:Zn(m,y),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Se("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",g.className),children:[h.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>S.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})});function sv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lv(...e){return t=>{let n=!1;const r=e.map(o=>{const i=sv(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():sv(e[o],null)}}}}function rn(...e){return I.useCallback(lv(...e),e)}function ms(e){const t=zP(e),n=I.forwardRef((r,o)=>{const{children:i,...a}=r,s=I.Children.toArray(i),l=s.find(RP);if(l){const c=l.props.children,u=s.map(d=>d===l?I.Children.count(c)>1?I.Children.only(null):I.isValidElement(c)?c.props.children:null:d);return h.jsx(t,{...a,ref:o,children:I.isValidElement(c)?I.cloneElement(c,void 0,u):null})}return h.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var cv=ms("Slot");function zP(e){const t=I.forwardRef((n,r)=>{const{children:o,...i}=n;if(I.isValidElement(o)){const a=WP(o),s=HP(i,o.props);return o.type!==I.Fragment&&(s.ref=r?lv(r,a):a),I.cloneElement(o,s)}return I.Children.count(o)>1?I.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var BP=Symbol("radix.slottable");function RP(e){return I.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BP}function HP(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]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function WP(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 qP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zt=qP.reduce((e,t)=>{const n=ms(`Primitive.${t}`),r=I.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function uv(e,t){e&&vi.flushSync(()=>e.dispatchEvent(t))}var UP=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"}),YP="VisuallyHidden",yu=I.forwardRef((e,t)=>h.jsx(zt.span,{...e,ref:t,style:{...UP,...e.style}}));yu.displayName=YP;function gs(e,t=[]){let n=[];function r(i,a){const s=I.createContext(a),l=n.length;n=[...n,a];const c=d=>{const{scope:p,children:f,...b}=d,g=p?.[e]?.[l]||s,m=I.useMemo(()=>b,Object.values(b));return h.jsx(g.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){const f=p?.[e]?.[l]||s,b=I.useContext(f);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>I.createContext(a));return function(s){const l=s?.[e]||i;return I.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,KP(o,...t)]}function KP(...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 a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return I.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function dv(e){const t=e+"CollectionProvider",[n,r]=gs(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:m,children:v}=g,y=S.useRef(null),x=S.useRef(new Map).current;return h.jsx(o,{scope:m,itemMap:x,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=ms(s),c=S.forwardRef((g,m)=>{const{scope:v,children:y}=g,x=i(s,v),T=rn(m,x.collectionRef);return h.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=ms(u),f=S.forwardRef((g,m)=>{const{scope:v,children:y,...x}=g,T=S.useRef(null),w=rn(m,T),E=i(u,v);return S.useEffect(()=>(E.itemMap.set(T,{ref:T,...x}),()=>void E.itemMap.delete(T))),h.jsx(p,{[d]:"",ref:w,children:y})});f.displayName=u;function b(g){const m=i(e+"CollectionConsumer",g);return S.useCallback(()=>{const y=m.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((E,k)=>x.indexOf(E.ref.current)-x.indexOf(k.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},b,r]}function _t(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var _o=globalThis?.document?I.useLayoutEffect:()=>{},GP=I[" useInsertionEffect ".trim().toString()]||_o;function fv({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=ZP({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=I.useRef(e!==void 0);I.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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=s},[s,r])}const c=I.useCallback(u=>{if(s){const d=XP(u)?u(e):u;d!==e&&a.current?.(d)}else i(u)},[s,e,i,a]);return[l,c]}function ZP({defaultProp:e,onChange:t}){const[n,r]=I.useState(e),o=I.useRef(n),i=I.useRef(t);return GP(()=>{i.current=t},[t]),I.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function XP(e){return typeof e=="function"}function QP(e,t){return I.useReducer((n,r)=>t[n][r]??n,e)}var pv=e=>{const{present:t,children:n}=e,r=JP(t),o=typeof n=="function"?n({present:r.isPresent}):I.Children.only(n),i=rn(r.ref,eA(o));return typeof n=="function"||r.isPresent?I.cloneElement(o,{ref:i}):null};pv.displayName="Presence";function JP(e){const[t,n]=I.useState(),r=I.useRef(null),o=I.useRef(e),i=I.useRef("none"),a=e?"mounted":"unmounted",[s,l]=QP(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I.useEffect(()=>{const c=vs(r.current);i.current=s==="mounted"?c:"none"},[s]),_o(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=vs(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),_o(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=vs(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=f=>{f.target===t&&(i.current=vs(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:I.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function vs(e){return e?.animationName||"none"}function eA(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 tA=I.createContext(void 0);function nA(e){const t=I.useContext(tA);return e||t||"ltr"}function Wr(e){const t=I.useRef(e);return I.useEffect(()=>{t.current=e}),I.useMemo(()=>(...n)=>t.current?.(...n),[])}function rA(e,t=globalThis?.document){const n=Wr(e);I.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 oA="DismissableLayer",bu="dismissableLayer.update",iA="dismissableLayer.pointerDownOutside",aA="dismissableLayer.focusOutside",hv,mv=I.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gv=I.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=I.useContext(mv),[u,d]=I.useState(null),p=u?.ownerDocument??globalThis?.document,[,f]=I.useState({}),b=rn(t,k=>d(k)),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(m),y=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=lA(k=>{const C=k.target,O=[...c.branches].some(_=>_.contains(C));!T||O||(o?.(k),a?.(k),k.defaultPrevented||s?.())},p),E=cA(k=>{const C=k.target;[...c.branches].some(_=>_.contains(C))||(i?.(k),a?.(k),k.defaultPrevented||s?.())},p);return rA(k=>{y===c.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},p),I.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(hv=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),yv(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=hv)}},[u,p,n,c]),I.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),yv())},[u,c]),I.useEffect(()=>{const k=()=>f({});return document.addEventListener(bu,k),()=>document.removeEventListener(bu,k)},[]),h.jsx(zt.div,{...l,ref:b,style:{pointerEvents:x?T?"auto":"none":void 0,...e.style},onFocusCapture:_t(e.onFocusCapture,E.onFocusCapture),onBlurCapture:_t(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:_t(e.onPointerDownCapture,w.onPointerDownCapture)})});gv.displayName=oA;var sA="DismissableLayerBranch",vv=I.forwardRef((e,t)=>{const n=I.useContext(mv),r=I.useRef(null),o=rn(t,r);return I.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),h.jsx(zt.div,{...e,ref:o})});vv.displayName=sA;function lA(e,t=globalThis?.document){const n=Wr(e),r=I.useRef(!1),o=I.useRef(()=>{});return I.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){bv(iA,n,c,{discrete:!0})};const c={originalEvent:s};s.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},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cA(e,t=globalThis?.document){const n=Wr(e),r=I.useRef(!1);return I.useEffect(()=>{const o=i=>{i.target&&!r.current&&bv(aA,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 yv(){const e=new CustomEvent(bu);document.dispatchEvent(e)}function bv(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?uv(o,i):o.dispatchEvent(i)}var uA=gv,dA=vv,fA="Portal",xv=I.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=I.useState(!1);_o(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?uo.createPortal(h.jsx(zt.div,{...r,ref:t}),a):null});xv.displayName=fA;function qr(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function pA(e){const t=I.useRef({value:e,previous:e});return I.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function hA(e){const[t,n]=I.useState(void 0);return _o(()=>{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 a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function wv(e,[t,n]){return Math.min(n,Math.max(t,e))}var xu="Progress",wu=100,[mA,d3]=gs(xu),[gA,vA]=mA(xu),Sv=I.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=yA,...a}=e;(o||o===0)&&!Cv(o)&&console.error(bA(`${o}`,"Progress"));const s=Cv(o)?o:wu;r!==null&&!Pv(r,s)&&console.error(xA(`${r}`,"Progress"));const l=Pv(r,s)?r:null,c=ys(l)?i(l,s):void 0;return h.jsx(gA,{scope:n,value:l,max:s,children:h.jsx(zt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":ys(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":kv(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});Sv.displayName=xu;var Tv="ProgressIndicator",Ev=I.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=vA(Tv,n);return h.jsx(zt.div,{"data-state":kv(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Ev.displayName=Tv;function yA(e,t){return`${Math.round(e/t*100)}%`}function kv(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ys(e){return typeof e=="number"}function Cv(e){return ys(e)&&!isNaN(e)&&e>0}function Pv(e,t){return ys(e)&&!isNaN(e)&&e<=t&&e>=0}function bA(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${wu}\`.`}function xA(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
1
+ (function(J,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(J=typeof globalThis<"u"?globalThis:J||self,S(J.components={},J.React,J["react/jsx-runtime"],J.ReactDOM))})(this,(function(J,S,p,uo){"use strict";function Zp(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 O=Zp(S),vi=Zp(uo);function Xp(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=Xp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Xp(e))&&(r&&(r+=" "),r+=t);return r}const Jp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,eh=Qp,fo=(e,t)=>n=>{var r;if(t?.variants==null)return eh(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const h=Jp(u)||Jp(d);return o[c][h]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...g}=u;return Object.entries(g).every(v=>{let[m,f]=v;return Array.isArray(f)?f.includes({...i,...s}[m]):{...i,...s}[m]===f})?[...c,d,h]:c},[]);return eh(e,a,l,n?.class,n?.className)};var th=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $T(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 Nl,rh;function po(){return rh||(rh=1,Nl=TypeError),Nl}const jT=$T(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Fl,oh;function Aa(){if(oh)return Fl;oh=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,a=o&&i&&typeof i.get=="function"?i.get:null,s=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,h=typeof WeakRef=="function"&&WeakRef.prototype,g=h?WeakRef.prototype.deref:null,v=Boolean.prototype.valueOf,m=Object.prototype.toString,f=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,k=String.prototype.toUpperCase,T=String.prototype.toLowerCase,P=RegExp.prototype.test,w=Array.prototype.concat,E=Array.prototype.join,A=Array.prototype.slice,I=Math.floor,D=typeof BigInt=="function"?BigInt.prototype.valueOf:null,F=Object.getOwnPropertySymbols,j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=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(W){return W.__proto__}:null);function C(W,G){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||P.call(/e/,G))return G;var Ve=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var tt=W<0?-I(-W):I(W);if(tt!==W){var it=String(tt),Me=b.call(G,it.length+1);return x.call(it,Ve,"$&_")+"."+x.call(x.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(G,Ve,"$&_")}var $=jT,L=$.custom,q=ae(L)?L:null,Y={__proto__:null,double:'"',single:"'"},R={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Fl=function W(G,Ve,tt,it){var Me=Ve||{};if(se(Me,"quoteStyle")&&!se(Y,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Fr=se(Me,"customInspect")?Me.customInspect:!0;if(typeof Fr!="boolean"&&Fr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var co=Me.numericSeparator;if(typeof G>"u")return"undefined";if(G===null)return"null";if(typeof G=="boolean")return G?"true":"false";if(typeof G=="string")return Ee(G,Me);if(typeof G=="number"){if(G===0)return 1/0/G>0?"0":"-0";var un=String(G);return co?C(G,un):un}if(typeof G=="bigint"){var Lr=String(G)+"n";return co?C(G,Lr):Lr}var Rp=typeof Me.depth>"u"?5:Me.depth;if(typeof tt>"u"&&(tt=0),tt>=Rp&&Rp>0&&typeof G=="object")return ee(G)?"[Array]":"[Object]";var mi=Kn(Me,tt);if(typeof it>"u")it=[];else if(ve(it,G)>=0)return"[Circular]";function On(gi,Dl,c4){if(Dl&&(it=A.call(it),it.push(Dl)),c4){var VT={depth:Me.depth};return se(Me,"quoteStyle")&&(VT.quoteStyle=Me.quoteStyle),W(gi,VT,tt+1,it)}return W(gi,Me,tt+1,it)}if(typeof G=="function"&&!K(G)){var _T=Ae(G),OT=_n(G,On);return"[Function"+(_T?": "+_T:" (anonymous)")+"]"+(OT.length>0?" { "+E.call(OT,", ")+" }":"")}if(ae(G)){var MT=_?x.call(String(G),/^(Symbol\(.*\))_[^)]*$/,"$1"):j.call(G);return typeof G=="object"&&!_?Ze(MT):MT}if(de(G)){for(var Pa="<"+T.call(String(G.nodeName)),Hp=G.attributes||[],Ml=0;Ml<Hp.length;Ml++)Pa+=" "+Hp[Ml].name+"="+Z(te(Hp[Ml].value),"double",Me);return Pa+=">",G.childNodes&&G.childNodes.length&&(Pa+="..."),Pa+="</"+T.call(String(G.nodeName))+">",Pa}if(ee(G)){if(G.length===0)return"[]";var Wp=_n(G,On);return mi&&!Kt(Wp)?"["+In(Wp,mi)+"]":"[ "+E.call(Wp,", ")+" ]"}if(X(G)){var qp=_n(G,On);return!("cause"in Error.prototype)&&"cause"in G&&!z.call(G,"cause")?"{ ["+String(G)+"] "+E.call(w.call("[cause]: "+On(G.cause),qp),", ")+" }":qp.length===0?"["+String(G)+"]":"{ ["+String(G)+"] "+E.call(qp,", ")+" }"}if(typeof G=="object"&&Fr){if(q&&typeof G[q]=="function"&&$)return $(G,{depth:Rp-tt});if(Fr!=="symbol"&&typeof G.inspect=="function")return G.inspect()}if(Re(G)){var DT=[];return r&&r.call(G,function(gi,Dl){DT.push(On(Dl,G,!0)+" => "+On(gi,G))}),xt("Map",n.call(G),DT,mi)}if(V(G)){var NT=[];return s&&s.call(G,function(gi){NT.push(On(gi,G))}),xt("Set",a.call(G),NT,mi)}if(fe(G))return Lt("WeakMap");if(Q(G))return Lt("WeakSet");if(U(G))return Lt("WeakRef");if(B(G))return Ze(On(Number(G)));if(ue(G))return Ze(On(D.call(G)));if(oe(G))return Ze(v.call(G));if(ie(G))return Ze(On(String(G)));if(typeof window<"u"&&G===window)return"{ [object Window] }";if(typeof globalThis<"u"&&G===globalThis||typeof th<"u"&&G===th)return"{ [object globalThis] }";if(!H(G)&&!K(G)){var Up=_n(G,On),FT=M?M(G)===Object.prototype:G instanceof Object||G.constructor===Object,Yp=G instanceof Object?"":"null prototype",LT=!FT&&N&&Object(G)===G&&N in G?b.call(ge(G),8,-1):Yp?"Object":"",l4=FT||typeof G.constructor!="function"?"":G.constructor.name?G.constructor.name+" ":"",Gp=l4+(LT||Yp?"["+E.call(w.call([],LT||[],Yp||[]),": ")+"] ":"");return Up.length===0?Gp+"{}":mi?Gp+"{"+In(Up,mi)+"}":Gp+"{ "+E.call(Up,", ")+" }"}return String(G)};function Z(W,G,Ve){var tt=Ve.quoteStyle||G,it=Y[tt];return it+W+it}function te(W){return x.call(String(W),/"/g,"&quot;")}function ne(W){return!N||!(typeof W=="object"&&(N in W||typeof W[N]<"u"))}function ee(W){return ge(W)==="[object Array]"&&ne(W)}function H(W){return ge(W)==="[object Date]"&&ne(W)}function K(W){return ge(W)==="[object RegExp]"&&ne(W)}function X(W){return ge(W)==="[object Error]"&&ne(W)}function ie(W){return ge(W)==="[object String]"&&ne(W)}function B(W){return ge(W)==="[object Number]"&&ne(W)}function oe(W){return ge(W)==="[object Boolean]"&&ne(W)}function ae(W){if(_)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!j)return!1;try{return j.call(W),!0}catch{}return!1}function ue(W){if(!W||typeof W!="object"||!D)return!1;try{return D.call(W),!0}catch{}return!1}var pe=Object.prototype.hasOwnProperty||function(W){return W in this};function se(W,G){return pe.call(W,G)}function ge(W){return m.call(W)}function Ae(W){if(W.name)return W.name;var G=y.call(f.call(W),/^function\s*([\w$]+)/);return G?G[1]:null}function ve(W,G){if(W.indexOf)return W.indexOf(G);for(var Ve=0,tt=W.length;Ve<tt;Ve++)if(W[Ve]===G)return Ve;return-1}function Re(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function fe(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function U(W){if(!g||!W||typeof W!="object")return!1;try{return g.call(W),!0}catch{}return!1}function V(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function Q(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function de(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function Ee(W,G){if(W.length>G.maxStringLength){var Ve=W.length-G.maxStringLength,tt="... "+Ve+" more character"+(Ve>1?"s":"");return Ee(b.call(W,0,G.maxStringLength),G)+tt}var it=R[G.quoteStyle||"single"];it.lastIndex=0;var Me=x.call(x.call(W,it,"\\$1"),/[\x00-\x1f]/g,Le);return Z(Me,"single",G)}function Le(W){var G=W.charCodeAt(0),Ve={8:"b",9:"t",10:"n",12:"f",13:"r"}[G];return Ve?"\\"+Ve:"\\x"+(G<16?"0":"")+k.call(G.toString(16))}function Ze(W){return"Object("+W+")"}function Lt(W){return W+" { ? }"}function xt(W,G,Ve,tt){var it=tt?In(Ve,tt):E.call(Ve,", ");return W+" ("+G+") {"+it+"}"}function Kt(W){for(var G=0;G<W.length;G++)if(ve(W[G],`
2
+ `)>=0)return!1;return!0}function Kn(W,G){var Ve;if(W.indent===" ")Ve=" ";else if(typeof W.indent=="number"&&W.indent>0)Ve=E.call(Array(W.indent+1)," ");else return null;return{base:Ve,prev:E.call(Array(G+1),Ve)}}function In(W,G){if(W.length===0)return"";var Ve=`
3
+ `+G.prev+G.base;return Ve+E.call(W,","+Ve)+`
4
+ `+G.prev}function _n(W,G){var Ve=ee(W),tt=[];if(Ve){tt.length=W.length;for(var it=0;it<W.length;it++)tt[it]=se(W,it)?G(W[it],W):""}var Me=typeof F=="function"?F(W):[],Fr;if(_){Fr={};for(var co=0;co<Me.length;co++)Fr["$"+Me[co]]=Me[co]}for(var un in W)se(W,un)&&(Ve&&String(Number(un))===un&&un<W.length||_&&Fr["$"+un]instanceof Symbol||(P.call(/[^\w$]/,un)?tt.push(G(un,W)+": "+G(W[un],W)):tt.push(un+": "+G(W[un],W))));if(typeof F=="function")for(var Lr=0;Lr<Me.length;Lr++)z.call(W,Me[Lr])&&tt.push("["+G(Me[Lr])+"]: "+G(W[Me[Lr]],W));return tt}return Fl}var Ll,ih;function zT(){if(ih)return Ll;ih=1;var e=Aa(),t=po(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Ll=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,h=a(l,u);return h&&d&&d===h&&(l=void 0),!!h},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},Ll}var Vl,ah;function sh(){return ah||(ah=1,Vl=Object),Vl}var $l,lh;function BT(){return lh||(lh=1,$l=Error),$l}var jl,ch;function RT(){return ch||(ch=1,jl=EvalError),jl}var zl,uh;function HT(){return uh||(uh=1,zl=RangeError),zl}var Bl,dh;function WT(){return dh||(dh=1,Bl=ReferenceError),Bl}var Rl,fh;function qT(){return fh||(fh=1,Rl=SyntaxError),Rl}var Hl,ph;function UT(){return ph||(ph=1,Hl=URIError),Hl}var Wl,hh;function YT(){return hh||(hh=1,Wl=Math.abs),Wl}var ql,mh;function GT(){return mh||(mh=1,ql=Math.floor),ql}var Ul,gh;function KT(){return gh||(gh=1,Ul=Math.max),Ul}var Yl,vh;function ZT(){return vh||(vh=1,Yl=Math.min),Yl}var Gl,yh;function XT(){return yh||(yh=1,Gl=Math.pow),Gl}var Kl,bh;function QT(){return bh||(bh=1,Kl=Math.round),Kl}var Zl,xh;function JT(){return xh||(xh=1,Zl=Number.isNaN||function(t){return t!==t}),Zl}var Xl,wh;function eE(){if(wh)return Xl;wh=1;var e=JT();return Xl=function(n){return e(n)||n===0?n:n<0?-1:1},Xl}var Ql,Sh;function tE(){return Sh||(Sh=1,Ql=Object.getOwnPropertyDescriptor),Ql}var Jl,Th;function Eh(){if(Th)return Jl;Th=1;var e=tE();if(e)try{e([],"length")}catch{e=null}return Jl=e,Jl}var ec,kh;function nE(){if(kh)return ec;kh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ec=e,ec}var tc,Ch;function rE(){return Ch||(Ch=1,tc=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 a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),tc}var nc,Ph;function oE(){if(Ph)return nc;Ph=1;var e=typeof Symbol<"u"&&Symbol,t=rE();return nc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},nc}var rc,Ah;function Ih(){return Ah||(Ah=1,rc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),rc}var oc,_h;function Oh(){if(_h)return oc;_h=1;var e=sh();return oc=e.getPrototypeOf||null,oc}var ic,Mh;function iE(){if(Mh)return ic;Mh=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 h=0;h<c.length;h+=1)u[h+l.length]=c[h];return u},i=function(l,c){for(var u=[],d=c,h=0;d<l.length;d+=1,h+=1)u[h]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return ic=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,h=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))},g=n(0,c.length-u.length),v=[],m=0;m<g;m++)v[m]="$"+m;if(d=Function("binder","return function ("+a(v,",")+"){ return binder.apply(this,arguments); }")(h),c.prototype){var f=function(){};f.prototype=c.prototype,d.prototype=new f,f.prototype=null}return d},ic}var ac,Dh;function Ia(){if(Dh)return ac;Dh=1;var e=iE();return ac=Function.prototype.bind||e,ac}var sc,Nh;function lc(){return Nh||(Nh=1,sc=Function.prototype.call),sc}var cc,Fh;function Lh(){return Fh||(Fh=1,cc=Function.prototype.apply),cc}var uc,Vh;function aE(){return Vh||(Vh=1,uc=typeof Reflect<"u"&&Reflect&&Reflect.apply),uc}var dc,$h;function sE(){if($h)return dc;$h=1;var e=Ia(),t=Lh(),n=lc(),r=aE();return dc=r||e.call(n,t),dc}var fc,jh;function zh(){if(jh)return fc;jh=1;var e=Ia(),t=po(),n=lc(),r=sE();return fc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},fc}var pc,Bh;function lE(){if(Bh)return pc;Bh=1;var e=zh(),t=Eh(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return pc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,pc}var hc,Rh;function cE(){if(Rh)return hc;Rh=1;var e=Ih(),t=Oh(),n=lE();return hc=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,hc}var mc,Hh;function uE(){if(Hh)return mc;Hh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ia();return mc=n.call(e,t),mc}var gc,Wh;function vc(){if(Wh)return gc;Wh=1;var e,t=sh(),n=BT(),r=RT(),o=HT(),i=WT(),a=qT(),s=po(),l=UT(),c=YT(),u=GT(),d=KT(),h=ZT(),g=XT(),v=QT(),m=eE(),f=Function,y=function(K){try{return f('"use strict"; return ('+K+").constructor;")()}catch{}},b=Eh(),x=nE(),k=function(){throw new s},T=b?(function(){try{return arguments.callee,k}catch{try{return b(arguments,"callee").get}catch{return k}}})():k,P=oE()(),w=cE(),E=Oh(),A=Ih(),I=Lh(),D=lc(),F={},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%":P&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%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%":f,"%GeneratorFunction%":F,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":P&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!P||!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"||!P||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":P&&w?w(""[Symbol.iterator]()):e,"%Symbol%":P?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":T,"%TypedArray%":j,"%TypeError%":s,"%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%":D,"%Function.prototype.apply%":I,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":g,"%Math.round%":v,"%Math.sign%":m,"%Reflect.getPrototypeOf%":A};if(w)try{null.error}catch(K){var N=w(w(K));_["%Error.prototype%"]=N}var z=function K(X){var ie;if(X==="%AsyncFunction%")ie=y("async function () {}");else if(X==="%GeneratorFunction%")ie=y("function* () {}");else if(X==="%AsyncGeneratorFunction%")ie=y("async function* () {}");else if(X==="%AsyncGenerator%"){var B=K("%AsyncGeneratorFunction%");B&&(ie=B.prototype)}else if(X==="%AsyncIteratorPrototype%"){var oe=K("%AsyncGenerator%");oe&&w&&(ie=w(oe.prototype))}return _[X]=ie,ie},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"]},C=Ia(),$=uE(),L=C.call(D,Array.prototype.concat),q=C.call(I,Array.prototype.splice),Y=C.call(D,String.prototype.replace),R=C.call(D,String.prototype.slice),Z=C.call(D,RegExp.prototype.exec),te=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,ee=function(X){var ie=R(X,0,1),B=R(X,-1);if(ie==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var oe=[];return Y(X,te,function(ae,ue,pe,se){oe[oe.length]=pe?Y(se,ne,"$1"):ue||ae}),oe},H=function(X,ie){var B=X,oe;if($(M,B)&&(oe=M[B],B="%"+oe[0]+"%"),$(_,B)){var ae=_[B];if(ae===F&&(ae=z(B)),typeof ae>"u"&&!ie)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:oe,name:B,value:ae}}throw new a("intrinsic "+X+" does not exist!")};return gc=function(X,ie){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=ee(X),oe=B.length>0?B[0]:"",ae=H("%"+oe+"%",ie),ue=ae.name,pe=ae.value,se=!1,ge=ae.alias;ge&&(oe=ge[0],q(B,L([0,1],ge)));for(var Ae=1,ve=!0;Ae<B.length;Ae+=1){var Re=B[Ae],fe=R(Re,0,1),U=R(Re,-1);if((fe==='"'||fe==="'"||fe==="`"||U==='"'||U==="'"||U==="`")&&fe!==U)throw new a("property names with quotes must have matching quotes");if((Re==="constructor"||!ve)&&(se=!0),oe+="."+Re,ue="%"+oe+"%",$(_,ue))pe=_[ue];else if(pe!=null){if(!(Re in pe)){if(!ie)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(b&&Ae+1>=B.length){var V=b(pe,Re);ve=!!V,ve&&"get"in V&&!("originalValue"in V.get)?pe=V.get:pe=pe[Re]}else ve=$(pe,Re),pe=pe[Re];ve&&!se&&(_[ue]=pe)}}return pe},gc}var yc,qh;function Uh(){if(qh)return yc;qh=1;var e=vc(),t=zh(),n=t([e("%String.prototype.indexOf%")]);return yc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},yc}var bc,Yh;function Gh(){if(Yh)return bc;Yh=1;var e=vc(),t=Uh(),n=Aa(),r=po(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return bc=!!o&&function(){var d,h={assert:function(g){if(!h.has(g))throw new r("Side channel does not contain "+n(g))},delete:function(g){if(d){var v=l(d,g);return c(d)===0&&(d=void 0),v}return!1},get:function(g){if(d)return i(d,g)},has:function(g){return d?s(d,g):!1},set:function(g,v){d||(d=new o),a(d,g,v)}};return h},bc}var xc,Kh;function dE(){if(Kh)return xc;Kh=1;var e=vc(),t=Uh(),n=Aa(),r=Gh(),o=po(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return xc=i?function(){var d,h,g={assert:function(v){if(!g.has(v))throw new o("Side channel does not contain "+n(v))},delete:function(v){if(i&&v&&(typeof v=="object"||typeof v=="function")){if(d)return c(d,v)}else if(r&&h)return h.delete(v);return!1},get:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?a(d,v):h&&h.get(v)},has:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?l(d,v):!!h&&h.has(v)},set:function(v,m){i&&v&&(typeof v=="object"||typeof v=="function")?(d||(d=new i),s(d,v,m)):r&&(h||(h=r()),h.set(v,m))}};return g}:r,xc}var wc,Zh;function Xh(){if(Zh)return wc;Zh=1;var e=po(),t=Aa(),n=zT(),r=Gh(),o=dE(),i=o||r||n;return wc=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},wc}var Qh=e=>Array.isArray(e),Sc=e=>e===void 0,Tc=e=>e===null,fE=Function.bind.call(Function.call,Object.prototype.toString),pE=e=>!!e&&fE(e)==="[object Error]"||e instanceof Error,Jh=(e,t)=>e instanceof t,hE=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},mE=e=>Object.prototype.toString.call(e)==="[object Date]"&&Jh(e,Date),je={array:Qh,date:mE,empty:e=>Tc(e)||Sc(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:Jh,isError:pE,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Tc(e)||Sc(e),null:Tc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Qh(e)&&typeof e=="object",primitive:hE,string:e=>typeof e=="string",undefined:Sc},gE=e=>Object.keys(e),Mn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},vE=e=>e.replace(/[^0-9]/g,"");const yE=(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},bE=(e,t)=>({classGroupId:e,validator:t}),em=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),_a="-",tm=[],xE="arbitrary..",wE=e=>{const t=TE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return SE(a);const s=a.split(_a),l=s[0]===""&&s.length>1?1:0;return nm(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],c=n[a];return l?c?yE(c,l):l:c||tm}return n[a]||tm}}},nm=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=nm(e,t+1,i);if(c)return c}const a=n.validators;if(a===null)return;const s=t===0?e.join(_a):e.slice(t).join(_a),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},SE=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?xE+r:void 0})(),TE=e=>{const{theme:t,classGroups:n}=e;return EE(n,t)},EE=(e,t)=>{const n=em();for(const r in e){const o=e[r];Ec(o,n,r,t)}return n},Ec=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];kE(a,t,n,r)}},kE=(e,t,n,r)=>{if(typeof e=="string"){CE(e,t,n);return}if(typeof e=="function"){PE(e,t,n,r);return}AE(e,t,n,r)},CE=(e,t,n)=>{const r=e===""?t:rm(t,e);r.classGroupId=n},PE=(e,t,n,r)=>{if(IE(e)){Ec(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bE(n,e))},AE=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];Ec(l,rm(t,s),n,r)}},rm=(e,t)=>{let n=e;const r=t.split(_a),o=r.length;for(let i=0;i<o;i++){const a=r[i];let s=n.nextPart.get(a);s||(s=em(),n.nextPart.set(a,s)),n=s}return n},IE=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_E=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},kc="!",om=":",OE=[],im=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ME=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;const u=o.length;for(let m=0;m<u;m++){const f=o[m];if(a===0&&s===0){if(f===om){i.push(o.slice(l,m)),l=m+1;continue}if(f==="/"){c=m;continue}}f==="["?a++:f==="]"?a--:f==="("?s++:f===")"&&s--}const d=i.length===0?o:o.slice(l);let h=d,g=!1;d.endsWith(kc)?(h=d.slice(0,-1),g=!0):d.startsWith(kc)&&(h=d.slice(1),g=!0);const v=c&&c>l?c-l:void 0;return im(i,g,h,v)};if(t){const o=t+om,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):im(OE,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},DE=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 a=n[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},NE=e=>({cache:_E(e.cacheSize),parseClassName:ME(e),sortModifiers:DE(e),...wE(e)}),FE=/\s+/,LE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(FE);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:h,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:m}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let f=!!m,y=r(f?v.substring(0,m):v);if(!y){if(!f){l=u+(l.length>0?" "+l:l);continue}if(y=r(v),!y){l=u+(l.length>0?" "+l:l);continue}f=!1}const b=h.length===0?"":h.length===1?h[0]:i(h).join(":"),x=g?b+kc:b,k=x+y;if(a.indexOf(k)>-1)continue;a.push(k);const T=o(y,f);for(let P=0;P<T.length;++P){const w=T[P];a.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},VE=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=am(n))&&(o&&(o+=" "),o+=r);return o},am=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=am(e[r]))&&(n&&(n+=" "),n+=t);return n},$E=(e,...t)=>{let n,r,o,i;const a=l=>{const c=t.reduce((u,d)=>d(u),e());return n=NE(c),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const c=r(l);if(c)return c;const u=LE(l,n);return o(l,u),u};return i=a,(...l)=>i(VE(...l))},jE=[],It=e=>{const t=n=>n[e]||jE;return t.isThemeGetter=!0,t},sm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zE=/^\d+\/\d+$/,BE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RE=/\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$/,HE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,WE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>zE.test(e),$e=e=>!!e&&!Number.isNaN(Number(e)),sr=e=>!!e&&Number.isInteger(Number(e)),Cc=e=>e.endsWith("%")&&$e(e.slice(0,-1)),Zn=e=>BE.test(e),UE=()=>!0,YE=e=>RE.test(e)&&!HE.test(e),cm=()=>!1,GE=e=>WE.test(e),KE=e=>qE.test(e),ZE=e=>!ye(e)&&!be(e),XE=e=>mo(e,hm,cm),ye=e=>sm.test(e),Vr=e=>mo(e,mm,YE),Pc=e=>mo(e,nk,$e),um=e=>mo(e,fm,cm),QE=e=>mo(e,pm,KE),Oa=e=>mo(e,gm,GE),be=e=>lm.test(e),yi=e=>go(e,mm),JE=e=>go(e,rk),dm=e=>go(e,fm),ek=e=>go(e,hm),tk=e=>go(e,pm),Ma=e=>go(e,gm,!0),mo=(e,t,n)=>{const r=sm.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=lm.exec(e);return r?r[1]?t(r[1]):n:!1},fm=e=>e==="position"||e==="percentage",pm=e=>e==="image"||e==="url",hm=e=>e==="length"||e==="size"||e==="bg-size",mm=e=>e==="length",nk=e=>e==="number",rk=e=>e==="family-name",gm=e=>e==="shadow",ok=$E(()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),h=It("text-shadow"),g=It("drop-shadow"),v=It("blur"),m=It("perspective"),f=It("aspect"),y=It("ease"),b=It("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...k(),be,ye],P=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],E=()=>[be,ye,l],A=()=>[ho,"full","auto",...E()],I=()=>[sr,"none","subgrid",be,ye],D=()=>["auto",{span:["full",sr,be,ye]},sr,be,ye],F=()=>[sr,"auto",be,ye],j=()=>["auto","min","max","fr",be,ye],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...E()],M=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],C=()=>[e,be,ye],$=()=>[...k(),dm,um,{position:[be,ye]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",ek,XE,{size:[be,ye]}],Y=()=>[Cc,yi,Vr],R=()=>["","none","full",c,be,ye],Z=()=>["",$e,yi,Vr],te=()=>["solid","dashed","dotted","double"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[$e,Cc,dm,um],H=()=>["","none",v,be,ye],K=()=>["none",$e,be,ye],X=()=>["none",$e,be,ye],ie=()=>[$e,be,ye],B=()=>[ho,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zn],breakpoint:[Zn],color:[UE],container:[Zn],"drop-shadow":[Zn],ease:["in","out","in-out"],font:[ZE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zn],shadow:[Zn],spacing:["px",$e],text:[Zn],"text-shadow":[Zn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,ye,be,f]}],container:["container"],columns:[{columns:[$e,ye,be,s]}],"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:T()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],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:[sr,"auto",be,ye]}],basis:[{basis:[ho,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$e,ho,"auto","initial","none",ye]}],grow:[{grow:["",$e,be,ye]}],shrink:[{shrink:["",$e,be,ye]}],order:[{order:[sr,"first","last","none",be,ye]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],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":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...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,yi,Vr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,be,Pc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cc,ye]}],"font-family":[{font:[JE,ye,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,be,ye]}],"line-clamp":[{"line-clamp":[$e,"none",be,Pc]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",be,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[$e,"from-font","auto",be,Vr]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[$e,"auto",be,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ye]}],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",be,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},sr,be,ye],radial:["",be,ye],conic:[sr,be,ye]},tk,QE]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$e,be,ye]}],"outline-w":[{outline:["",$e,yi,Vr]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,Ma,Oa]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,Ma,Oa]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[$e,Vr]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,Ma,Oa]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[$e,be,ye]}],"mix-blend":[{"mix-blend":[...ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ne()}],"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":[$e]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[be,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[$e]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ye]}],filter:[{filter:["","none",be,ye]}],blur:[{blur:H()}],brightness:[{brightness:[$e,be,ye]}],contrast:[{contrast:[$e,be,ye]}],"drop-shadow":[{"drop-shadow":["","none",g,Ma,Oa]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",$e,be,ye]}],"hue-rotate":[{"hue-rotate":[$e,be,ye]}],invert:[{invert:["",$e,be,ye]}],saturate:[{saturate:[$e,be,ye]}],sepia:[{sepia:["",$e,be,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ye]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[$e,be,ye]}],"backdrop-contrast":[{"backdrop-contrast":[$e,be,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$e,be,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$e,be,ye]}],"backdrop-invert":[{"backdrop-invert":["",$e,be,ye]}],"backdrop-opacity":[{"backdrop-opacity":[$e,be,ye]}],"backdrop-saturate":[{"backdrop-saturate":[$e,be,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",$e,be,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$e,"initial",be,ye]}],ease:[{ease:["linear","initial",y,be,ye]}],delay:[{delay:[$e,be,ye]}],animate:[{animate:["none",b,be,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,be,ye]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[be,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"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",be,ye]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",be,ye]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[$e,yi,Vr,Pc]}],stroke:[{stroke:["none",...C()]}],"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"]}}),Xn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},ik=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Ac=e=>je.function(e),ke=(...e)=>ok(Qp(e)),vm=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)},ym=e=>e.scrollHeight>e.clientHeight,xi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},ak=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},en=S.forwardRef(function(t,n){const r=t.as||"span";return p.jsx(r,{ref:n,...t,as:void 0})}),sk={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"}},lk=fo("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"}}}),ck=fo("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:sk,defaultVariants:{theme:"primary",size:"default"}}),Da=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return p.jsxs(en,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:ke(ck({size:a,theme:o?"loading":i}),t),children:[n?p.jsx("span",{"aria-hidden":"true",className:lk({theme:n})}):null,r,s.children]})}),uk=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return p.jsx("form",{...e,onSubmit:t})};var wt=function(){return wt=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},wt.apply(this,arguments)};function Ic(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 _c(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var wi=function(e){return e.replace(new RegExp(" ","g")," ")},bm=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)},dk=function(e){return e.replace(/^0+([0-9]+)/,"$1")},xm=function(e,t,n){var r=e.length-2,o=dk(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},wm=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Na=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},fk=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Oc=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},pk=function(e){return e==="money"||e==="currency"},hk=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return wt(wt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Fa=function(e,t){var n=bm(wm(e),t.fraction.length),r="".concat(t.currency).concat(xm(n,t.group,t.decimal));return wi(r)},mk=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=Ic(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var v=hk(r,i,s);return v.currency=wi("".concat(v.currency.trim()," ")),v.literal=wi(v.literal.trim()),v},[r,i]),h=function(v){var m=Fa(v.target.value,d),f=Na(m);v.target.value=m,v.target.setAttribute("data-number",f.toString()),l?.(v),f!==0&&(u.current.selectionEnd=m.length)};S.useEffect(function(){if(u.current!==null){var v=u.current.value;if(v!==""){var m=Fa(v,d),f=Na(m);u.current.value=m,u.current.setAttribute("data-number",f.toString());var y=new InputEvent("change",{});l?.(wt(wt({},y),{target:u.current,currentTarget:u.current})),f!==0&&(u.current.selectionEnd=m.length)}}},[d]);var g=c.defaultValue?Fa(c.defaultValue,d):void 0;return S.createElement("input",wt({},c,{value:typeof c.value=="string"?Fa(c.value,d):c.value,defaultValue:g,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),gk=1,vk=function(e){return e==="percentage"||e==="percent"||e==="percentual"},yk=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return wt(wt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},La=function(e,t){var n=bm(wm(e),t.fraction.length),r="".concat(xm(n,t.group,t.decimal)," ").concat(t.percentSign);return wi(r)},bk=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=Ic(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=_c(S.useState(function(){var y,b;return(b=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var y,b=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(La(b,d))},[a.value]);var d=S.useMemo(function(){var y=yk(r);return y.percentSign=wi("".concat(y.percentSign)),y},[r]),h=c.length-d.percentSign.length-gk,g=function(y){var b,x=s.current;x&&(x.setSelectionRange(h,h),y&&((b=a.onFocus)===null||b===void 0||b.call(a,y)))},v=function(y){var b=y.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,k=b.selectionEnd,T=x!==k,P=h<x;!T&&P&&g()}i?.(y)},m=function(y){var b=La(y.target.value,d),x=Na(b);u(b),y.target.value=b,y.target.setAttribute("data-number",x.toString()),o?.(y)};S.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var b=La(y,d),x=Na(b);u(b),s.current.value=b,s.current.setAttribute("data-number",x.toString());var k=new InputEvent("change",{});o?.(wt(wt({},k),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return g()},[c]);var f=a.defaultValue?La(a.defaultValue,d):void 0;return S.createElement("input",wt({},a,{defaultValue:f,inputMode:"decimal",onChange:m,onFocus:g,onKeyUp:v,ref:s,type:"text"}))}),Si={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},xk=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=Va[i];a===void 0?r.push(i.replace(Si.dots,"\\.").replace(Si.openParenthesis,"\\(").replace(Si.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Si.leadingBars,"\\")},Ti=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Mc(o,n);var i=xk(o);return n?"^".concat(i,"$"):i},wk=function(e){return e.replace(Si.escape,"\\$&")},Mc=function(e,t){var n=e.map(function(r){return typeof r=="string"?wk(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Va={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]/}},Sk=/\d/,Sm="(dd) 9dddd-dddd",Tm="(dd) dddd-dddd",Em="ddd.ddd.ddd-dd",km="dd.ddd.ddd/dddd-dd",$a=function(e){return e.replace(/\D/g,"")},Tk=["2",/[0-3]/,":",/[0-5]/,/\d/],Ek=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Zt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Em,isoDate:"dddd-dd-dd",cnpj:km,telephone:Tm,cellphone:Sm,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return $a(e).length<=11?Em:km},int:function(e){return e===void 0&&(e=""),Sk.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=$a(e);return t.length<11?Tm:Sm},time:function(e){var t=$a(e),n=t[0];return n==="2"?Tk:Ek}},Xt=function(e,t,n){var r;return n===void 0&&(n={}),wt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Ti(e,"",!0),infinity:n.infinity},n)},Rt={cellTelephone:Xt(Zt.cellTelephone,"tel"),cellphone:Xt(Zt.cellphone,"tel"),cep:Xt(Zt.cep,"decimal"),cnpj:Xt(Zt.cnpj,"decimal"),color:Xt(Zt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Xt(Zt.cpf,"decimal"),cpfCnpj:Xt(Zt.cpfCnpj,"decimal",{transform:$a}),creditCard:Xt(Zt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Xt(Zt.date,"decimal"),int:Xt(Zt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Xt(Zt.isoDate,"decimal"),telephone:Xt(Zt.telephone,"tel"),time:Xt(Zt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Xt(Zt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Cm(e,t,n,r){var o,i;r===void 0&&(r=Va);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],h=a[c];if(d===void 0){s+=u,h===u&&(c+=1),l+=1;continue}var g=d instanceof RegExp?{regex:d}:d;g.regex.test(h)&&(s+=(i=(o=g.parse)===null||o===void 0?void 0:o.call(g,h))!==null&&i!==void 0?i:h),c+=1,l+=1}return s}var Pm=function(e){return e},kk=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ti(e,n,t));return r.test(n)};function Ck(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var Pk=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,h=e.as,g=Ic(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),v=S.useRef(null);S.useImperativeHandle(t,function(){return v.current});var m=Oc(s),f=Oc(d),y=Oc(u),b=S.useRef(kk(u,i,g.value||g.defaultValue)),x=h??"input",k=_c(S.useState(""),2),T=k[0],P=k[1],w=Ck(T),E=S.useCallback(function(N,z){var M,C,$=(M=N??z)!==null&&M!==void 0?M:"";if(u===void 0)return $;var L=(C=$?.toString())!==null&&C!==void 0?C:"";return Cm(L,typeof u=="function"?u(L):u,a??Pm,c??Va)},[a,u,c]),A=_c(S.useState(function(){return E(g.value,g.defaultValue)}),2),I=A[0],D=A[1],F=E(g.defaultValue,g.defaultValue),j=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(I);return Array.isArray(N)?Mc(N,i):Ti(u,I,i)}return typeof u=="string"?Ti(u,I,i):Mc(u,i)},[l,I,i,u]);S.useEffect(function(){if(g.value!==void 0){var N=E(g.value,g.defaultValue);D(N),v.current!==null&&(v.current.value=N)}},[g.value,u,a,g.defaultValue]);var _=function(N){var z,M,C,$,L,q=N.currentTarget,Y=N.target.value;if(y.current===void 0)return D(Y),(z=f.current)===null||z===void 0||z.call(f,Y),(M=m.current)===null||M===void 0||M.call(m,N),d?.(Y);var R=new RegExp(Ti(y.current,Y,i)),Z=(C=q.selectionEnd)!==null&&C!==void 0?C:0,te=function(X,ie,B){if(X.type!=="number")return X.setSelectionRange(ie,B)};if(r&&b.current&&Y.length>=I.length)return q.value=I,te(q,Z-1,Z-1);var ne=!1;Y.length<w.length&&(b.current=!1,ne=!0),R.test(Y)&&(b.current=!0);var ee=Z,H=Y[ee-1],K=Cm(Y,typeof y.current=="function"?y.current(Y):y.current,a??Pm,c??Va);for(q.value=K,D(K);ee<K.length&&K.charAt(ee-1)!==H;)ee+=1;ne?te(q,Z,Z):te(q,ee,ee),N.target.value=K,P(K),($=f.current)===null||$===void 0||$.call(f,K),(L=m.current)===null||L===void 0||L.call(m,N)};return S.createElement(x,wt({},g,{ref:v,pattern:j,onChange:_,defaultValue:Am(g.defaultValue)?F:void 0,value:Am(g.value)?E(g.value,g.value):g.value}))}),Am=function(e){return typeof e=="string"},Im=S.forwardRef(function(e,t){return pk(e.mask)?S.createElement(mk,wt({},e,{mask:void 0,ref:t})):vk(e.mask)?S.createElement(bk,wt({},e,{mask:void 0,ref:t})):S.createElement(Pk,wt({},e,{ref:t}))}),Qt=function(e){return function(t){return S.createElement(Im,wt({},e,t))}};Qt(Rt.cellTelephone),Qt(Rt.cellphone),Qt(Rt.cep),Qt(Rt.cnpj),Qt(Rt.color),Qt(Rt.cpf),Qt(Rt.cpfCnpj),Qt(Rt.creditCard),Qt(Rt.date),Qt(Rt.int),Qt(Rt.isoDate),Qt(Rt.telephone),Qt(Rt.time),Qt(Rt.uuid);var _m=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&fk(Rt,t.mask)?Rt[t.mask]:{mask:t.mask}},[t.mask]),o=wt(wt({},t),r);return S.createElement(Im,wt({},o,{ref:n}))});const Ak=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ik=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Om=e=>{const t=Ik(e);return t.charAt(0).toUpperCase()+t.slice(1)},Mm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),_k=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ok={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 Mk=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>S.createElement("svg",{ref:l,...Ok,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Mm("lucide",o),...!i&&!_k(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const Xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(Mk,{ref:i,iconNode:t,className:Mm(`lucide-${Ak(Om(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Om(e),n};const Dk=Xe("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 Nk=Xe("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 Dm=Xe("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 Fk=Xe("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 Lk=Xe("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 Dc=Xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Vk=Xe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Nc=Xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Nm=Xe("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 $k=Xe("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 jk=Xe("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 zk=Xe("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 Fm=Xe("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 Lm=Xe("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 Vm=Xe("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 Bk=Xe("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 Rk=Xe("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 $m=Xe("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 Hk=Xe("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 Fc=Xe("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 Wk=Xe("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const qk=Xe("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const Lc=Xe("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Uk=Xe("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 Yk=Xe("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 Vc=Xe("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 ja=Xe("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 Gk=Xe("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 Kk=Xe("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 vo=Xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),za={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>)`},lr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(lr(a,t,n,s))},[]),jm=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:jm(a,t,n,s)}},{}),zm={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Ba=(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)},Zk={default:e=>Ba(e,{result:zm.default}),dark:e=>Ba(e,{result:zm.dark})},yo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},Xk=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),$c=(e,t)=>{const n=lr(e.colors,yo(t?.colors)),r=lr(e.spacing,yo(t?.spacing)),o=lr(e.rounded,yo(t?.rounded)),i=lr(e.shadow,yo(t?.rounded)),a=lr(e.zIndex,yo(t?.zIndex??Xk)),s=e.custom?lr(e.custom,yo(t?.customTokens)):[];return n.concat(r,o,s,a,i)},Qk=(e,t)=>Ba($c(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),Jk=(e,t)=>$c(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),eC=(e,t)=>Ba($c(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),Ra={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=>p.jsxs(S.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"},Ha={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},bo=S.createContext({tweaks:Ha,parser:za.hsla,map:Ra,locale:void 0}),St=()=>{const e=S.useContext(bo);return e?e.map:Ra},jc=()=>{const e=S.useContext(bo);return e?e.tweaks:Ha};function Wa(){return typeof window<"u"}function cr(e){return zc(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Dn(e){var t;return(t=(zc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zc(e){return Wa()?e instanceof Node||e instanceof qt(e).Node:!1}function at(e){return Wa()?e instanceof Element||e instanceof qt(e).Element:!1}function Tt(e){return Wa()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function qa(e){return!Wa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const tC=new Set(["inline","contents"]);function Ei(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=tn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!tC.has(o)}const nC=new Set(["table","td","th"]);function rC(e){return nC.has(cr(e))}const oC=[":popover-open",":modal"];function Ua(e){return oC.some(t=>{try{return e.matches(t)}catch{return!1}})}const iC=["transform","translate","scale","rotate","perspective"],aC=["transform","translate","scale","rotate","perspective","filter"],sC=["paint","layout","strict","content"];function Bc(e){const t=Ya(),n=at(e)?tn(e):e;return iC.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)||aC.some(r=>(n.willChange||"").includes(r))||sC.some(r=>(n.contain||"").includes(r))}function lC(e){let t=Jn(e);for(;Tt(t)&&!Qn(t);){if(Bc(t))return t;if(Ua(t))return null;t=Jn(t)}return null}function Ya(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const cC=new Set(["html","body","#document"]);function Qn(e){return cC.has(cr(e))}function tn(e){return qt(e).getComputedStyle(e)}function Ga(e){return at(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jn(e){if(cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qa(e)&&e.host||Dn(e);return qa(t)?t.host:t}function Bm(e){const t=Jn(e);return Qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(t)&&Ei(t)?t:Bm(t)}function ur(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Bm(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=Rc(a);return t.concat(a,a.visualViewport||[],Ei(o)?o:[],s&&n?ur(s):[])}return t.concat(o,ur(o,[],n))}function Rc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const uC=["top","right","bottom","left"],Rm=["start","end"],Hm=uC.reduce((e,t)=>e.concat(t,t+"-"+Rm[0],t+"-"+Rm[1]),[]),dr=Math.min,nn=Math.max,Ka=Math.round,xo=Math.floor,Nn=e=>({x:e,y:e}),dC={left:"right",right:"left",bottom:"top",top:"bottom"},fC={start:"end",end:"start"};function Hc(e,t,n){return nn(e,dr(t,n))}function $r(e,t){return typeof e=="function"?e(t):e}function Fn(e){return e.split("-")[0]}function yn(e){return e.split("-")[1]}function Wm(e){return e==="x"?"y":"x"}function Wc(e){return e==="y"?"height":"width"}const pC=new Set(["top","bottom"]);function er(e){return pC.has(Fn(e))?"y":"x"}function qc(e){return Wm(er(e))}function qm(e,t,n){n===void 0&&(n=!1);const r=yn(e),o=qc(e),i=Wc(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Xa(a)),[a,Xa(a)]}function hC(e){const t=Xa(e);return[Za(e),t,Za(t)]}function Za(e){return e.replace(/start|end/g,t=>fC[t])}const Um=["left","right"],Ym=["right","left"],mC=["top","bottom"],gC=["bottom","top"];function vC(e,t,n){switch(e){case"top":case"bottom":return n?t?Ym:Um:t?Um:Ym;case"left":case"right":return t?mC:gC;default:return[]}}function yC(e,t,n,r){const o=yn(e);let i=vC(Fn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Za)))),i}function Xa(e){return e.replace(/left|right|bottom|top/g,t=>dC[t])}function bC(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gm(e){return typeof e!="number"?bC(e):{top:e,right:e,bottom:e,left:e}}function Qa(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 xC=["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])"],Ja=xC.join(","),Km=typeof Element>"u",wo=Km?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,es=!Km&&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},ts=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",a=i||n&&t&&e(t.parentNode);return a},wC=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Zm=function(t,n,r){if(ts(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ja));return n&&wo.call(t,Ja)&&o.unshift(t),o=o.filter(r),o},Xm=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!ts(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=wo.call(a,Ja);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),h=!ts(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&h){var g=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scopeParent:a,candidates:g})}else i.unshift.apply(i,a.children)}}return o},Qm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Jm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||wC(t))&&!Qm(t)?0:t.tabIndex},SC=function(t,n){var r=Jm(t);return r<0&&n&&!Qm(t)?0:r},TC=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},eg=function(t){return t.tagName==="INPUT"},EC=function(t){return eg(t)&&t.type==="hidden"},kC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},CC=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},PC=function(t){if(!t.name)return!0;var n=t.form||es(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},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(a){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",a.message),!1}var i=CC(o,t.form);return!i||i===t},AC=function(t){return eg(t)&&t.type==="radio"},IC=function(t){return AC(t)&&!PC(t)},_C=function(t){var n,r=t&&es(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=es(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},tg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},OC=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=wo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(wo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=es(t);if(l&&!l.shadowRoot&&o(l)===!0)return tg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(_C(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return tg(t);return!1},MC=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 wo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Uc=function(t,n){return!(n.disabled||ts(n)||EC(n)||OC(n,t)||kC(n)||MC(n))},Yc=function(t,n){return!(IC(n)||Jm(n)<0||!Uc(t,n))},DC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},NC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=SC(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(TC).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ns=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Xm([t],n.includeContainer,{filter:Yc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DC}):r=Zm(t,n.includeContainer,Yc.bind(null,n)),NC(r)},FC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Xm([t],n.includeContainer,{filter:Uc.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Zm(t,n.includeContainer,Uc.bind(null,n)),r},ng=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wo.call(t,Ja)===!1?!1:Yc(n,t)};function Gc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function rg(){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 og(){return/apple/i.test(navigator.vendor)}function Kc(){const e=/android/i;return e.test(Gc())||e.test(rg())}function LC(){return Gc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function ig(){return rg().includes("jsdom/")}const ag="data-floating-ui-focusable",VC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Zc="ArrowLeft",Xc="ArrowRight",$C="ArrowUp",jC="ArrowDown";function Ln(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 Nt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&qa(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Vn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Qc(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 zC(e){return e.matches("html,body")}function Vt(e){return e?.ownerDocument||document}function Jc(e){return Tt(e)&&e.matches(VC)}function eu(e){return e?e.getAttribute("role")==="combobox"&&Jc(e):!1}function BC(e){if(!e||ig())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function rs(e){return e?e.hasAttribute(ag)?e:e.querySelector("["+ag+"]")||e:null}function jr(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,...jr(e,o.id,n)])}function RC(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),jr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function sg(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(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function $t(e){e.preventDefault(),e.stopPropagation()}function HC(e){return"nativeEvent"in e}function lg(e){return e.mozInputSource===0&&e.isTrusted?!0:Kc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function cg(e){return ig()?!1:!Kc()&&e.width===0&&e.height===0||Kc()&&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 So(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var WC=typeof document<"u",qC=function(){},Ge=WC?S.useLayoutEffect:qC;const UC={...O};function Ft(e){const t=O.useRef(e);return Ge(()=>{t.current=e}),t}const YC=UC.useInsertionEffect||(e=>e());function mt(e){const t=O.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return YC(()=>{t.current=e}),O.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 os(e,t,n){return Math.floor(e/t)!==n}function ki(e,t){return t<0||t>=e.current.length}function tu(e,t){return Ht(e,{disabledIndices:t})}function ug(e,t){return Ht(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ht(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,a=n;do a+=r?-i:i;while(a>=0&&a<=e.current.length-1&&is(e,a,o));return a}function GC(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,h=u;if(n.key===$C){if(d&&$t(n),u===-1)h=c;else if(h=Ht(e,{startingIndex:h,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||h<0)){const g=u%a,v=c%a,m=c-(v-g);v===g?h=c:h=v>g?m:m-a}ki(e,h)&&(h=u)}if(n.key===jC&&(d&&$t(n),u===-1?h=l:(h=Ht(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(h=Ht(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),ki(e,h)&&(h=u)),r==="both"){const g=xo(u/a);n.key===(i?Zc:Xc)&&(d&&$t(n),u%a!==a-1?(h=Ht(e,{startingIndex:u,disabledIndices:s}),o&&os(h,a,g)&&(h=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(h=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s})),os(h,a,g)&&(h=u)),n.key===(i?Xc:Zc)&&(d&&$t(n),u%a!==0?(h=Ht(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&os(h,a,g)&&(h=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(h=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),os(h,a,g)&&(h=u));const v=xo(c/a)===g;ki(e,h)&&(o&&v?h=n.key===(i?Xc:Zc)?c:Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}):h=u)}return h}function KC(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let h=0;h<l;h++)u.push(o+d+h*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function ZC(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function XC(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function is(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 Ci=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function dg(e,t){const n=ns(e,Ci()),r=n.length;if(r===0)return;const o=Ln(Vt(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function fg(e){return dg(Vt(e).body,1)||e}function pg(e){return dg(Vt(e).body,-1)||e}function Pi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Nt(n,r)}function QC(e){ns(e,Ci()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function hg(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 mg(e,t,n){let{reference:r,floating:o}=e;const i=er(t),a=qc(t),s=Wc(a),l=Fn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let g;switch(l){case"top":g={x:u,y:r.y-o.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:d};break;case"left":g={x:r.x-o.width,y:d};break;default:g={x:r.x,y:r.y}}switch(yn(t)){case"start":g[a]-=h*(n&&c?-1:1);break;case"end":g[a]+=h*(n&&c?-1:1);break}return g}const JC=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=mg(c,r,l),h=r,g={},v=0;for(let m=0;m<s.length;m++){const{name:f,fn:y}=s[m],{x:b,y:x,data:k,reset:T}=await y({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=x??d,g={...g,[f]:{...g[f],...k}},T&&v<=50&&(v++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(c=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=mg(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:g}};async function as(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:g=0}=$r(t,e),v=Gm(g),f=s[h?d==="floating"?"reference":"floating":d],y=Qa(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(f)))==null||n?f:f.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),k=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},T=Qa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-T.top+v.top)/k.y,bottom:(T.bottom-y.bottom+v.bottom)/k.y,left:(y.left-T.left+v.left)/k.x,right:(T.right-y.right+v.right)/k.x}}const eP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=$r(e,t)||{};if(c==null)return{};const d=Gm(u),h={x:n,y:r},g=qc(o),v=Wc(g),m=await a.getDimensions(c),f=g==="y",y=f?"top":"left",b=f?"bottom":"right",x=f?"clientHeight":"clientWidth",k=i.reference[v]+i.reference[g]-h[g]-i.floating[v],T=h[g]-i.reference[g],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let w=P?P[x]:0;(!w||!await(a.isElement==null?void 0:a.isElement(P)))&&(w=s.floating[x]||i.floating[v]);const E=k/2-T/2,A=w/2-m[v]/2-1,I=dr(d[y],A),D=dr(d[b],A),F=I,j=w-m[v]-D,_=w/2-m[v]/2+E,N=Hc(F,_,j),z=!l.arrow&&yn(o)!=null&&_!==N&&i.reference[v]/2-(_<F?I:D)-m[v]/2<0,M=z?_<F?_-F:_-j:0;return{[g]:h[g]+M,data:{[g]:N,centerOffset:_-N-M,...z&&{alignmentOffset:M}},reset:z}}});function tP(e,t,n){return(e?[...n.filter(o=>yn(o)===e),...n.filter(o=>yn(o)!==e)]:n.filter(o=>Fn(o)===o)).filter(o=>e?yn(o)===e||(t?Za(o)!==o:!1):!0)}const nP=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:a,placement:s,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:h=Hm,autoAlignment:g=!0,...v}=$r(e,t),m=d!==void 0||h===Hm?tP(d||null,g,h):h,f=await as(t,v),y=((n=a.autoPlacement)==null?void 0:n.index)||0,b=m[y];if(b==null)return{};const x=qm(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==b)return{reset:{placement:m[0]}};const k=[f[Fn(b)],f[x[0]],f[x[1]]],T=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:k}],P=m[y+1];if(P)return{data:{index:y+1,overflows:T},reset:{placement:P}};const w=T.map(I=>{const D=yn(I.placement);return[I.placement,D&&u?I.overflows.slice(0,2).reduce((F,j)=>F+j,0):I.overflows[0],I.overflows]}).sort((I,D)=>I[1]-D[1]),A=((o=w.filter(I=>I[2].slice(0,yn(I[0])?2:3).every(D=>D<=0))[0])==null?void 0:o[0])||w[0][0];return A!==s?{data:{index:y+1,overflows:T},reset:{placement:A}}:{}}}},rP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...f}=$r(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Fn(o),b=er(s),x=Fn(s)===s,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=h||(x||!m?[Xa(s)]:hC(s)),P=v!=="none";!h&&P&&T.push(...yC(s,m,v,k));const w=[s,...T],E=await as(t,f),A=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(E[y]),d){const _=qm(o,a,k);A.push(E[_[0]],E[_[1]])}if(I=[...I,{placement:o,overflows:A}],!A.every(_=>_<=0)){var D,F;const _=(((D=i.flip)==null?void 0:D.index)||0)+1,N=w[_];if(N&&(!(d==="alignment"?b!==er(N):!1)||I.every(C=>er(C.placement)===b?C.overflows[0]>0:!0)))return{data:{index:_,overflows:I},reset:{placement:N}};let z=(F=I.filter(M=>M.overflows[0]<=0).sort((M,C)=>M.overflows[1]-C.overflows[1])[0])==null?void 0:F.placement;if(!z)switch(g){case"bestFit":{var j;const M=(j=I.filter(C=>{if(P){const $=er(C.placement);return $===b||$==="y"}return!0}).map(C=>[C.placement,C.overflows.filter($=>$>0).reduce(($,L)=>$+L,0)]).sort((C,$)=>C[1]-$[1])[0])==null?void 0:j[0];M&&(z=M);break}case"initialPlacement":z=s;break}if(o!==z)return{reset:{placement:z}}}return{}}}},oP=new Set(["left","top"]);async function iP(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Fn(n),s=yn(n),l=er(n)==="y",c=oP.has(a)?-1:1,u=i&&l?-1:1,d=$r(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(g=s==="end"?v*-1:v),l?{x:g*u,y:h*c}:{x:h*c,y:g*u}}const aP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await iP(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},sP=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:a=!1,limiter:s={fn:f=>{let{x:y,y:b}=f;return{x:y,y:b}}},...l}=$r(e,t),c={x:n,y:r},u=await as(t,l),d=er(Fn(o)),h=Wm(d);let g=c[h],v=c[d];if(i){const f=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=g+u[f],x=g-u[y];g=Hc(b,g,x)}if(a){const f=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=v+u[f],x=v-u[y];v=Hc(b,v,x)}const m=s.fn({...t,[h]:g,[d]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[d]:a}}}}}},lP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=$r(e,t),u=await as(t,c),d=Fn(o),h=yn(o),g=er(o)==="y",{width:v,height:m}=i.floating;let f,y;d==="top"||d==="bottom"?(f=d,y=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,f=h==="end"?"top":"bottom");const b=m-u.top-u.bottom,x=v-u.left-u.right,k=dr(m-u[f],b),T=dr(v-u[y],x),P=!t.middlewareData.shift;let w=k,E=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),P&&!h){const I=nn(u.left,0),D=nn(u.right,0),F=nn(u.top,0),j=nn(u.bottom,0);g?E=v-2*(I!==0||D!==0?I+D:nn(u.left,u.right)):w=m-2*(F!==0||j!==0?F+j:nn(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:w});const A=await a.getDimensions(s.floating);return v!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function gg(e){const t=tn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ka(n)!==i||Ka(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function nu(e){return at(e)?e:e.contextElement}function To(e){const t=nu(e);if(!Tt(t))return Nn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=gg(t);let a=(i?Ka(n.width):n.width)/r,s=(i?Ka(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const cP=Nn(0);function vg(e){const t=qt(e);return!Ya()||!t.visualViewport?cP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function zr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=nu(e);let a=Nn(1);t&&(r?at(r)&&(a=To(r)):a=To(e));const s=uP(i,n,r)?vg(i):Nn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const h=qt(i),g=r&&at(r)?qt(r):r;let v=h,m=Rc(v);for(;m&&r&&g!==v;){const f=To(m),y=m.getBoundingClientRect(),b=tn(m),x=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*f.x,k=y.top+(m.clientTop+parseFloat(b.paddingTop))*f.y;l*=f.x,c*=f.y,u*=f.x,d*=f.y,l+=x,c+=k,v=qt(m),m=Rc(v)}}return Qa({width:u,height:d,x:l,y:c})}function ss(e,t){const n=Ga(e).scrollLeft;return t?t.left+n:zr(Dn(e)).left+n}function yg(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ss(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function dP(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Dn(r),s=t?Ua(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Nn(1);const u=Nn(0),d=Tt(r);if((d||!d&&!i)&&((cr(r)!=="body"||Ei(a))&&(l=Ga(r)),Tt(r))){const g=zr(r);c=To(r),u.x=g.x+r.clientLeft,u.y=g.y+r.clientTop}const h=a&&!d&&!i?yg(a,l):Nn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function fP(e){return Array.from(e.getClientRects())}function pP(e){const t=Dn(e),n=Ga(e),r=e.ownerDocument.body,o=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ss(e);const s=-n.scrollTop;return tn(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const bg=25;function hP(e,t){const n=qt(e),r=Dn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=Ya();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=ss(r);if(c<=0){const u=r.ownerDocument,d=u.body,h=getComputedStyle(d),g=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-g);v<=bg&&(i-=v)}else c<=bg&&(i+=c);return{width:i,height:a,x:s,y:l}}const mP=new Set(["absolute","fixed"]);function gP(e,t){const n=zr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Tt(e)?To(e):Nn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function xg(e,t,n){let r;if(t==="viewport")r=hP(e,n);else if(t==="document")r=pP(Dn(e));else if(at(t))r=gP(t,n);else{const o=vg(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Qa(r)}function wg(e,t){const n=Jn(e);return n===t||!at(n)||Qn(n)?!1:tn(n).position==="fixed"||wg(n,t)}function vP(e,t){const n=t.get(e);if(n)return n;let r=ur(e,[],!1).filter(s=>at(s)&&cr(s)!=="body"),o=null;const i=tn(e).position==="fixed";let a=i?Jn(e):e;for(;at(a)&&!Qn(a);){const s=tn(a),l=Bc(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&mP.has(o.position)||Ei(a)&&!l&&wg(e,a))?r=r.filter(u=>u!==a):o=s,a=Jn(a)}return t.set(e,r),r}function yP(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ua(t)?[]:vP(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=xg(t,u,o);return c.top=nn(d.top,c.top),c.right=dr(d.right,c.right),c.bottom=dr(d.bottom,c.bottom),c.left=nn(d.left,c.left),c},xg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function bP(e){const{width:t,height:n}=gg(e);return{width:t,height:n}}function xP(e,t,n){const r=Tt(t),o=Dn(t),i=n==="fixed",a=zr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Nn(0);function c(){l.x=ss(o)}if(r||!r&&!i)if((cr(t)!=="body"||Ei(o))&&(s=Ga(t)),r){const g=zr(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?yg(o,s):Nn(0),d=a.left+s.scrollLeft-l.x-u.x,h=a.top+s.scrollTop-l.y-u.y;return{x:d,y:h,width:a.width,height:a.height}}function ru(e){return tn(e).position==="static"}function Sg(e,t){if(!Tt(e)||tn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Dn(e)===n&&(n=n.ownerDocument.body),n}function Tg(e,t){const n=qt(e);if(Ua(e))return n;if(!Tt(e)){let o=Jn(e);for(;o&&!Qn(o);){if(at(o)&&!ru(o))return o;o=Jn(o)}return n}let r=Sg(e,t);for(;r&&rC(r)&&ru(r);)r=Sg(r,t);return r&&Qn(r)&&ru(r)&&!Bc(r)?n:r||lC(e)||n}const wP=async function(e){const t=this.getOffsetParent||Tg,n=this.getDimensions,r=await n(e.floating);return{reference:xP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function SP(e){return tn(e).direction==="rtl"}const TP={convertOffsetParentRelativeRectToViewportRelativeRect:dP,getDocumentElement:Dn,getClippingRect:yP,getOffsetParent:Tg,getElementRects:wP,getClientRects:fP,getDimensions:bP,getScale:To,isElement:at,isRTL:SP};function Eg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function EP(e,t){let n=null,r;const o=Dn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:g}=c;if(s||t(),!h||!g)return;const v=xo(d),m=xo(o.clientWidth-(u+h)),f=xo(o.clientHeight-(d+g)),y=xo(u),x={rootMargin:-v+"px "+-m+"px "+-f+"px "+-y+"px",threshold:nn(0,dr(1,l))||1};let k=!0;function T(P){const w=P[0].intersectionRatio;if(w!==l){if(!k)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w===1&&!Eg(c,e.getBoundingClientRect())&&a(),k=!1}try{n=new IntersectionObserver(T,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return a(!0),i}function Eo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=nu(e),u=o||i?[...c?ur(c):[],...ur(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?EP(c,n):null;let h=-1,g=null;a&&(g=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),c&&!l&&g.observe(c),g.observe(t));let v,m=l?zr(e):null;l&&f();function f(){const y=zr(e);m&&!Eg(m,y)&&n(),m=y,v=requestAnimationFrame(f)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(y=g)==null||y.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const kP=aP,CP=nP,PP=sP,AP=rP,IP=lP,kg=eP,_P=(e,t,n)=>{const r=new Map,o={platform:TP,...n},i={...o.platform,_c:r};return JC(e,t,{...o,platform:i})};var OP=typeof document<"u",MP=function(){},ls=OP?S.useLayoutEffect:MP;function cs(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(!cs(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)&&!cs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Cg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pg(e,t){const n=Cg(e);return Math.round(t*n)/n}function ou(e){const t=O.useRef(e);return ls(()=>{t.current=e}),t}function DP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=O.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=O.useState(r);cs(h,r)||g(r);const[v,m]=O.useState(null),[f,y]=O.useState(null),b=O.useCallback(C=>{C!==P.current&&(P.current=C,m(C))},[]),x=O.useCallback(C=>{C!==w.current&&(w.current=C,y(C))},[]),k=i||v,T=a||f,P=O.useRef(null),w=O.useRef(null),E=O.useRef(u),A=l!=null,I=ou(l),D=ou(o),F=ou(c),j=O.useCallback(()=>{if(!P.current||!w.current)return;const C={placement:t,strategy:n,middleware:h};D.current&&(C.platform=D.current),_P(P.current,w.current,C).then($=>{const L={...$,isPositioned:F.current!==!1};_.current&&!cs(E.current,L)&&(E.current=L,vi.flushSync(()=>{d(L)}))})},[h,t,n,D,F]);ls(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const _=O.useRef(!1);ls(()=>(_.current=!0,()=>{_.current=!1}),[]),ls(()=>{if(k&&(P.current=k),T&&(w.current=T),k&&T){if(I.current)return I.current(k,T,j);j()}},[k,T,j,I,A]);const N=O.useMemo(()=>({reference:P,floating:w,setReference:b,setFloating:x}),[b,x]),z=O.useMemo(()=>({reference:k,floating:T}),[k,T]),M=O.useMemo(()=>{const C={position:n,left:0,top:0};if(!z.floating)return C;const $=Pg(z.floating,u.x),L=Pg(z.floating,u.y);return s?{...C,transform:"translate("+$+"px, "+L+"px)",...Cg(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:L}},[n,s,z.floating,u.x,u.y]);return O.useMemo(()=>({...u,update:j,refs:N,elements:z,floatingStyles:M}),[u,j,N,z,M])}const NP=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?kg({element:r.current,padding:o}).fn(n):{}:r?kg({element:r,padding:o}).fn(n):{}}}},Ai=(e,t)=>({...kP(e),options:[e,t]}),iu=(e,t)=>({...PP(e),options:[e,t]}),au=(e,t)=>({...AP(e),options:[e,t]}),Ag=(e,t)=>({...IP(e),options:[e,t]}),FP=(e,t)=>({...CP(e),options:[e,t]}),Ig=(e,t)=>({...NP(e),options:[e,t]});function LP(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 _g=O.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function VP(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=O.useState(()=>new Set),a=O.useCallback(c=>{i(u=>new Set(u).add(c))},[]),s=O.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=O.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(LP).forEach((d,h)=>{c.set(d,h)}),c},[o]);return p.jsx(_g.Provider,{value:O.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function Og(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=O.useContext(_g),[s,l]=O.useState(null),c=O.useRef(null),u=O.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var h;const g=t!==void 0;a.current[s]=g?t:(h=d?.textContent)!=null?h:null}},[s,i,a,t]);return Ge(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ge(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),O.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const $P="data-floating-ui-focusable",Mg="active",Dg="selected",Ii="ArrowLeft",_i="ArrowRight",Ng="ArrowUp",us="ArrowDown",jP={...O};let Fg=!1,zP=0;const Lg=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+zP++;function BP(){const[e,t]=O.useState(()=>Fg?Lg():void 0);return Ge(()=>{e==null&&t(Lg())},[]),O.useEffect(()=>{Fg=!0},[]),e}const Oi=jP.useId||BP;let Mi;process.env.NODE_ENV!=="production"&&(Mi=new Set);function ds(){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=Mi)!=null&&e.has(o))){var i;(i=Mi)==null||i.add(o),console.warn(o)}}function RP(){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=Mi)!=null&&e.has(o))){var i;(i=Mi)==null||i.add(o),console.error(o)}}const Vg=O.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:h,d:g,style:{transform:v,...m}={},...f}=t;process.env.NODE_ENV!=="production"&&(n||ds("The `ref` prop is required for `FloatingArrow`."));const y=Oi(),[b,x]=O.useState(!1);if(Ge(()=>{if(!o)return;tn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[k,T]=r.split("-"),P=k==="top"||k==="bottom";let w=d;(P&&a!=null&&a.x||!P&&a!=null&&a.y)&&(w=null);const E=u*2,A=E/2,I=s/2*(c/-8+1),D=l/2*c/4,F=!!g,j=w&&T==="end"?"bottom":"top";let _=w&&T==="end"?"right":"left";w&&b&&(_=T==="end"?"left":"right");const N=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=g||"M0,0"+(" H"+s)+(" L"+(s-I)+","+(l-D))+(" Q"+s/2+","+l+" "+I+","+(l-D))+" Z",C={top:F?"rotate(180deg)":"",left:F?"rotate(90deg)":"rotate(-90deg)",bottom:F?"":"rotate(180deg)",right:F?"rotate(-90deg)":"rotate(90deg)"}[k];return p.jsxs("svg",{...f,"aria-hidden":!0,ref:n,width:F?s:s+E,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[_]:N,[j]:z,[k]:P||F?"100%":"calc(100% - "+E/2+"px)",transform:[C,v].filter($=>!!$).join(" "),...m},children:[E>0&&p.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:h,strokeWidth:E+(g?0:1),d:M}),p.jsx("path",{stroke:E&&!g?f.fill:"none",d:M}),p.jsx("clipPath",{id:y,children:p.jsx("rect",{x:-A,y:A*(F?-1:1),width:s+E,height:s})})]})});function $g(){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 jg=O.createContext(null),zg=O.createContext(null),fr=()=>{var e;return((e=O.useContext(jg))==null?void 0:e.id)||null},pr=()=>O.useContext(zg);function HP(e){const t=Oi(),n=pr(),o=fr();return Ge(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function WP(e){const{children:t,id:n}=e,r=fr();return p.jsx(jg.Provider,{value:O.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function qP(e){const{children:t}=e,n=O.useRef([]),r=O.useCallback(a=>{n.current=[...n.current,a]},[]),o=O.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),[i]=O.useState(()=>$g());return p.jsx(zg.Provider,{value:O.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function Br(e){return"data-floating-ui-"+e}function jt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Bg=Br("safe-polygon");function su(e,t,n){if(n&&!So(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 lu(e){return typeof e=="function"?e():e}function Rg(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:h=!0}=t,g=pr(),v=fr(),m=Ft(c),f=Ft(l),y=Ft(n),b=Ft(d),x=O.useRef(),k=O.useRef(-1),T=O.useRef(),P=O.useRef(-1),w=O.useRef(!0),E=O.useRef(!1),A=O.useRef(()=>{}),I=O.useRef(!1),D=mt(()=>{var M;const C=(M=o.current.openEvent)==null?void 0:M.type;return C?.includes("mouse")&&C!=="mousedown"});O.useEffect(()=>{if(!s)return;function M(C){let{open:$}=C;$||(jt(k),jt(P),w.current=!0,I.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),O.useEffect(()=>{if(!s||!m.current||!n)return;function M($){D()&&r(!1,$,"hover")}const C=Vt(a.floating).documentElement;return C.addEventListener("mouseleave",M),()=>{C.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,m,D]);const F=O.useCallback(function(M,C,$){C===void 0&&(C=!0),$===void 0&&($="hover");const L=su(f.current,"close",x.current);L&&!T.current?(jt(k),k.current=window.setTimeout(()=>r(!1,M,$),L)):C&&(jt(k),r(!1,M,$))},[f,r]),j=mt(()=>{A.current(),T.current=void 0}),_=mt(()=>{if(E.current){const M=Vt(a.floating).body;M.style.pointerEvents="",M.removeAttribute(Bg),E.current=!1}}),N=mt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);O.useEffect(()=>{if(!s)return;function M(Y){if(jt(k),w.current=!1,u&&!So(x.current)||lu(b.current)>0&&!su(f.current,"open"))return;const R=su(f.current,"open",x.current);R?k.current=window.setTimeout(()=>{y.current||r(!0,Y,"hover")},R):n||r(!0,Y,"hover")}function C(Y){if(N()){_();return}A.current();const R=Vt(a.floating);if(jt(P),I.current=!1,m.current&&o.current.floatingContext){n||jt(k),T.current=m.current({...o.current.floatingContext,tree:g,x:Y.clientX,y:Y.clientY,onClose(){_(),j(),N()||F(Y,!0,"safe-polygon")}});const te=T.current;R.addEventListener("mousemove",te),A.current=()=>{R.removeEventListener("mousemove",te)};return}(x.current!=="touch"||!Nt(a.floating,Y.relatedTarget))&&F(Y)}function $(Y){N()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:g,x:Y.clientX,y:Y.clientY,onClose(){_(),j(),N()||F(Y)}})(Y))}function L(){jt(k)}function q(Y){N()||F(Y,!1)}if(at(a.domReference)){const Y=a.domReference,R=a.floating;return n&&Y.addEventListener("mouseleave",$),h&&Y.addEventListener("mousemove",M,{once:!0}),Y.addEventListener("mouseenter",M),Y.addEventListener("mouseleave",C),R&&(R.addEventListener("mouseleave",$),R.addEventListener("mouseenter",L),R.addEventListener("mouseleave",q)),()=>{n&&Y.removeEventListener("mouseleave",$),h&&Y.removeEventListener("mousemove",M),Y.removeEventListener("mouseenter",M),Y.removeEventListener("mouseleave",C),R&&(R.removeEventListener("mouseleave",$),R.removeEventListener("mouseenter",L),R.removeEventListener("mouseleave",q))}}},[a,s,e,u,h,F,j,_,r,n,y,g,f,m,o,N,b]),Ge(()=>{var M;if(s&&n&&(M=m.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&D()){E.current=!0;const $=a.floating;if(at(a.domReference)&&$){var C;const L=Vt(a.floating).body;L.setAttribute(Bg,"");const q=a.domReference,Y=g==null||(C=g.nodesRef.current.find(R=>R.id===v))==null||(C=C.context)==null?void 0:C.elements.floating;return Y&&(Y.style.pointerEvents=""),L.style.pointerEvents="none",q.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{L.style.pointerEvents="",q.style.pointerEvents="",$.style.pointerEvents=""}}}},[s,n,v,a,g,m,D]),Ge(()=>{n||(x.current=void 0,I.current=!1,j(),_())},[n,j,_]),O.useEffect(()=>()=>{j(),jt(k),jt(P),_()},[s,a.domReference,j,_]);const z=O.useMemo(()=>{function M(C){x.current=C.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(C){const{nativeEvent:$}=C;function L(){!w.current&&!y.current&&r(!0,$,"hover")}u&&!So(x.current)||n||lu(b.current)===0||I.current&&C.movementX**2+C.movementY**2<2||(jt(P),x.current==="touch"?L():(I.current=!0,P.current=window.setTimeout(L,lu(b.current))))}}},[u,r,n,y,b]);return O.useMemo(()=>s?{reference:z}:{},[s,z])}let Hg=0;function Rr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Hg);const i=()=>e?.focus({preventScroll:n});o?i():Hg=requestAnimationFrame(i)}function cu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&qa(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function UP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function YP(e){return e?.ownerDocument||document}const ko={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Wg(e){return e==="inert"?ko.inert:e==="aria-hidden"?ko["aria-hidden"]:ko.none}let fs=new WeakSet,ps={},uu=0;const GP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,qg=e=>e&&(e.host||qg(e.parentNode)),KP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=qg(n);return e.contains(r)?r:null}).filter(n=>n!=null);function ZP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=KP(t,e),s=new Set,l=new Set(a),c=[];ps[o]||(ps[o]=new WeakMap);const u=ps[o];a.forEach(d),h(t),s.clear();function d(g){!g||s.has(g)||(s.add(g),g.parentNode&&d(g.parentNode))}function h(g){!g||l.has(g)||[].forEach.call(g.children,v=>{if(cr(v)!=="script")if(s.has(v))h(v);else{const m=i?v.getAttribute(i):null,f=m!==null&&m!=="false",y=Wg(i),b=(y.get(v)||0)+1,x=(u.get(v)||0)+1;y.set(v,b),u.set(v,x),c.push(v),b===1&&f&&fs.add(v),x===1&&v.setAttribute(o,""),!f&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return uu++,()=>{c.forEach(g=>{const v=Wg(i),f=(v.get(g)||0)-1,y=(u.get(g)||0)-1;v.set(g,f),u.set(g,y),f||(!fs.has(g)&&i&&g.removeAttribute(i),fs.delete(g)),y||g.removeAttribute(o)}),uu--,uu||(ko.inert=new WeakMap,ko["aria-hidden"]=new WeakMap,ko.none=new WeakMap,fs=new WeakSet,ps={})}}function Ug(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=YP(e[0]).body;return ZP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const hs={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},ms=O.forwardRef(function(t,n){const[r,o]=O.useState();Ge(()=>{og()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Br("focus-guard")]:"",style:hs};return p.jsx("span",{...t,...i})}),Yg=O.createContext(null),Gg=Br("portal");function XP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Oi(),o=Kg(),[i,a]=O.useState(null),s=O.useRef(null);return Ge(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),Ge(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Gg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Ge(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!zc(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(Gg,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function hr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=XP({id:n,root:r}),[a,s]=O.useState(null),l=O.useRef(null),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),h=a?.modal,g=a?.open,v=!!a&&!a.modal&&a.open&&o&&!!(r||i);return O.useEffect(()=>{if(!i||!o||h)return;function m(f){i&&Pi(f)&&(f.type==="focusin"?hg:QC)(i)}return i.addEventListener("focusin",m,!0),i.addEventListener("focusout",m,!0),()=>{i.removeEventListener("focusin",m,!0),i.removeEventListener("focusout",m,!0)}},[i,o,h]),O.useEffect(()=>{i&&(g||hg(i))},[g,i]),p.jsxs(Yg.Provider,{value:O.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[v&&i&&p.jsx(ms,{"data-type":"outside",ref:l,onFocus:m=>{if(Pi(m,i)){var f;(f=u.current)==null||f.focus()}else{const y=a?a.domReference:null,b=pg(y);b?.focus()}}}),v&&i&&p.jsx("span",{"aria-owns":i.id,style:hs}),i&&vi.createPortal(t,i),v&&i&&p.jsx(ms,{"data-type":"outside",ref:c,onFocus:m=>{if(Pi(m,i)){var f;(f=d.current)==null||f.focus()}else{const y=a?a.domReference:null,b=fg(y);b?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const Kg=()=>O.useContext(Yg);function Zg(e){return O.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const QP=20;let mr=[];function du(){mr=mr.filter(e=>e.isConnected)}function JP(e){du(),e&&cr(e)!=="body"&&(mr.push(e),mr.length>QP&&(mr=mr.slice(-20)))}function Xg(){return du(),mr[mr.length-1]}function eA(e){const t=Ci();return ng(e,t)?e:ns(e,t)[0]||e}function Qg(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Ci(),i=FC(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return ng(s,r)||s.hasAttribute("data-tabindex")&&!l.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const tA=O.forwardRef(function(t,n){return p.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:hs})});function Hr(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:h=!1,getInsideElements:g=()=>[]}=e,{open:v,onOpenChange:m,events:f,dataRef:y,elements:{domReference:b,floating:x}}=t,k=mt(()=>{var B;return(B=y.current.floatingContext)==null?void 0:B.nodeId}),T=mt(g),P=typeof a=="number"&&a<0,w=eu(b)&&P,E=GP(),A=E?i:!0,I=!A||E&&h,D=Ft(o),F=Ft(a),j=Ft(s),_=pr(),N=Kg(),z=O.useRef(null),M=O.useRef(null),C=O.useRef(!1),$=O.useRef(!1),L=O.useRef(-1),q=O.useRef(-1),Y=N!=null,R=rs(x),Z=mt(function(B){return B===void 0&&(B=R),B?ns(B,Ci()):[]}),te=mt(B=>{const oe=Z(B);return D.current.map(ae=>b&&ae==="reference"?b:R&&ae==="floating"?R:oe).filter(Boolean).flat()});O.useEffect(()=>{if(r||!c)return;function B(ae){if(ae.key==="Tab"){Nt(R,Ln(Vt(R)))&&Z().length===0&&!w&&$t(ae);const ue=te(),pe=Vn(ae);D.current[0]==="reference"&&pe===b&&($t(ae),ae.shiftKey?Rr(ue[ue.length-1]):Rr(ue[1])),D.current[1]==="floating"&&pe===R&&ae.shiftKey&&($t(ae),Rr(ue[0]))}}const oe=Vt(R);return oe.addEventListener("keydown",B),()=>{oe.removeEventListener("keydown",B)}},[r,b,R,c,D,w,Z,te]),O.useEffect(()=>{if(r||!x)return;function B(oe){const ae=Vn(oe),pe=Z().indexOf(ae);pe!==-1&&(L.current=pe)}return x.addEventListener("focusin",B),()=>{x.removeEventListener("focusin",B)}},[r,x,Z]),O.useEffect(()=>{if(r||!d)return;function B(){$.current=!0,setTimeout(()=>{$.current=!1})}function oe(pe){const se=pe.relatedTarget,ge=pe.currentTarget,Ae=Vn(pe);queueMicrotask(()=>{const ve=k(),Re=!(Nt(b,se)||Nt(x,se)||Nt(se,x)||Nt(N?.portalNode,se)||se!=null&&se.hasAttribute(Br("focus-guard"))||_&&(jr(_.nodesRef.current,ve).find(fe=>{var U,V;return Nt((U=fe.context)==null?void 0:U.elements.floating,se)||Nt((V=fe.context)==null?void 0:V.elements.domReference,se)})||sg(_.nodesRef.current,ve).find(fe=>{var U,V,Q;return[(U=fe.context)==null?void 0:U.elements.floating,rs((V=fe.context)==null?void 0:V.elements.floating)].includes(se)||((Q=fe.context)==null?void 0:Q.elements.domReference)===se})));if(ge===b&&R&&Qg(R,D),l&&ge!==b&&!(Ae!=null&&Ae.isConnected)&&Ln(Vt(R))===Vt(R).body){Tt(R)&&R.focus();const fe=L.current,U=Z(),V=U[fe]||U[U.length-1]||R;Tt(V)&&V.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(w||!c)&&se&&Re&&!$.current&&se!==Xg()&&(C.current=!0,m(!1,pe,"focus-out"))})}const ae=!!(!_&&N);function ue(){jt(q),y.current.insideReactTree=!0,q.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(x&&Tt(b))return b.addEventListener("focusout",oe),b.addEventListener("pointerdown",B),x.addEventListener("focusout",oe),ae&&x.addEventListener("focusout",ue,!0),()=>{b.removeEventListener("focusout",oe),b.removeEventListener("pointerdown",B),x.removeEventListener("focusout",oe),ae&&x.removeEventListener("focusout",ue,!0)}},[r,b,x,R,c,_,N,m,d,l,Z,w,k,D,y]);const ne=O.useRef(null),ee=O.useRef(null),H=Zg([ne,N?.beforeInsideRef]),K=Zg([ee,N?.afterInsideRef]);O.useEffect(()=>{var B,oe;if(r||!x)return;const ae=Array.from((N==null||(B=N.portalNode)==null?void 0:B.querySelectorAll("["+Br("portal")+"]"))||[]),pe=(oe=(_?sg(_.nodesRef.current,k()):[]).find(Ae=>{var ve;return eu(((ve=Ae.context)==null?void 0:ve.elements.domReference)||null)}))==null||(oe=oe.context)==null?void 0:oe.elements.domReference,se=[x,pe,...ae,...T(),z.current,M.current,ne.current,ee.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,D.current.includes("reference")||w?b:null].filter(Ae=>Ae!=null),ge=c||w?Ug(se,!I,I):Ug(se);return()=>{ge()}},[r,b,x,c,D,N,w,A,I,_,k,T]),Ge(()=>{if(r||!Tt(R))return;const B=Vt(R),oe=Ln(B);queueMicrotask(()=>{const ae=te(R),ue=F.current,pe=(typeof ue=="number"?ae[ue]:ue.current)||R,se=Nt(R,oe);!P&&!se&&v&&Rr(pe,{preventScroll:pe===R})})},[r,v,R,P,te,F]),Ge(()=>{if(r||!R)return;const B=Vt(R),oe=Ln(B);JP(oe);function ae(se){let{reason:ge,event:Ae,nested:ve}=se;if(["hover","safe-polygon"].includes(ge)&&Ae.type==="mouseleave"&&(C.current=!0),ge==="outside-press")if(ve)C.current=!1;else if(lg(Ae)||cg(Ae))C.current=!1;else{let Re=!1;document.createElement("div").focus({get preventScroll(){return Re=!0,!1}}),Re?C.current=!1:C.current=!0}}f.on("openchange",ae);const ue=B.createElement("span");ue.setAttribute("tabindex","-1"),ue.setAttribute("aria-hidden","true"),Object.assign(ue.style,hs),Y&&b&&b.insertAdjacentElement("afterend",ue);function pe(){if(typeof j.current=="boolean"){const se=b||Xg();return se&&se.isConnected?se:ue}return j.current.current||ue}return()=>{f.off("openchange",ae);const se=Ln(B),ge=Nt(x,se)||_&&jr(_.nodesRef.current,k(),!1).some(ve=>{var Re;return Nt((Re=ve.context)==null?void 0:Re.elements.floating,se)}),Ae=pe();queueMicrotask(()=>{const ve=eA(Ae);j.current&&!C.current&&Tt(ve)&&(!(ve!==se&&se!==B.body)||ge)&&ve.focus({preventScroll:!0}),ue.remove()})}},[r,x,R,j,y,f,_,Y,b,k]),O.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(du)}),[r]),Ge(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:m,domReference:b}),()=>{N.setFocusManagerState(null)}},[r,N,c,v,m,d,b]),Ge(()=>{r||R&&Qg(R,D)},[r,R,D]);function X(B){return r||!u||!c?null:p.jsx(tA,{ref:B==="start"?z:M,onClick:oe=>m(!1,oe.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const ie=!r&&A&&(c?!w:!0)&&(Y||c);return p.jsxs(p.Fragment,{children:[ie&&p.jsx(ms,{"data-type":"inside",ref:H,onFocus:B=>{if(c){const ae=te();Rr(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(C.current=!1,Pi(B,N.portalNode)){const ae=fg(b);ae?.focus()}else{var oe;(oe=N.beforeOutsideRef.current)==null||oe.focus()}}}),!w&&X("start"),n,X("end"),ie&&p.jsx(ms,{"data-type":"inside",ref:K,onFocus:B=>{if(c)Rr(te()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(C.current=!0),Pi(B,N.portalNode)){const ae=pg(b);ae?.focus()}else{var oe;(oe=N.afterOutsideRef.current)==null||oe.focus()}}})]})}let gs=0;const Jg="--floating-ui-scrollbar-width";function nA(){const e=Gc(),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,a=n.left?parseFloat(n.left):window.scrollX,s=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Jg,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:-(s-Math.floor(d))+"px",left:-(a-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(Jg),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let ev=()=>{};const fu=O.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Ge(()=>{if(r)return gs++,gs===1&&(ev=nA()),()=>{gs--,gs===0&&ev()}},[r]),p.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function tv(e){return Tt(e.target)&&e.target.tagName==="BUTTON"}function rA(e){return Tt(e.target)&&e.target.tagName==="A"}function nv(e){return Jc(e)}function Co(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,h=O.useRef(),g=O.useRef(!1),v=O.useMemo(()=>({onPointerDown(m){h.current=m.pointerType},onMouseDown(m){const f=h.current;m.button===0&&s!=="click"&&(So(f,!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 f=h.current;if(s==="mousedown"&&h.current){h.current=void 0;return}So(f,!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){h.current=void 0,!(m.defaultPrevented||!u||tv(m))&&(m.key===" "&&!nv(i)&&(m.preventDefault(),g.current=!0),!rA(m)&&m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||tv(m)||nv(i)||m.key===" "&&g.current&&(g.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return O.useMemo(()=>a?{reference:v}:{},[a,v])}function oA(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,h=a.x,g=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),h-=n||0,g-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,h=s&&t.x!=null?t.x:h,g=l&&t.y!=null?t.y:g):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:h,y:g,top:g,right:h+u,bottom:g+d,left:h}}}}function rv(e){return e!=null&&e.clientX!=null}function iA(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=O.useRef(!1),h=O.useRef(null),[g,v]=O.useState(),[m,f]=O.useState([]),y=mt((P,w)=>{d.current||r.current.openEvent&&!rv(r.current.openEvent)||a.setPositionReference(oA(i,{x:P,y:w,axis:l,dataRef:r,pointerType:g}))}),b=mt(P=>{c!=null||u!=null||(n?h.current||f([]):y(P.clientX,P.clientY))}),x=So(g)?o:n,k=O.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const P=qt(o);function w(E){const A=Vn(E);Nt(o,A)?(P.removeEventListener("mousemove",w),h.current=null):y(E.clientX,E.clientY)}if(!r.current.openEvent||rv(r.current.openEvent)){P.addEventListener("mousemove",w);const E=()=>{P.removeEventListener("mousemove",w),h.current=null};return h.current=E,E}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,y]);O.useEffect(()=>k(),[k,m]),O.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),O.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Ge(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const T=O.useMemo(()=>{function P(w){let{pointerType:E}=w;v(E)}return{onPointerDown:P,onPointerEnter:P,onMouseMove:b,onMouseEnter:b}},[b]);return O.useMemo(()=>s?{reference:T}:{},[s,T])}const aA={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},sA={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ov=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 gr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:h=!1,bubbles:g,capture:v}=t,m=pr(),f=mt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?f:l,b=O.useRef(!1),{escapeKey:x,outsidePress:k}=ov(g),{escapeKey:T,outsidePress:P}=ov(v),w=O.useRef(!1),E=mt(_=>{var N;if(!n||!a||!s||_.key!=="Escape"||w.current)return;const z=(N=i.current.floatingContext)==null?void 0:N.nodeId,M=m?jr(m.nodesRef.current,z):[];if(!x&&(_.stopPropagation(),M.length>0)){let C=!0;if(M.forEach($=>{var L;if((L=$.context)!=null&&L.open&&!$.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,HC(_)?_.nativeEvent:_,"escape-key")}),A=mt(_=>{var N;const z=()=>{var M;E(_),(M=Vn(_))==null||M.removeEventListener("keydown",z)};(N=Vn(_))==null||N.addEventListener("keydown",z)}),I=mt(_=>{var N;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 C=Vn(_),$="["+Br("inert")+"]",L=Vt(o.floating).querySelectorAll($);let q=at(C)?C:null;for(;q&&!Qn(q);){const te=Jn(q);if(Qn(te)||!at(te))break;q=te}if(L.length&&at(C)&&!zC(C)&&!Nt(C,o.floating)&&Array.from(L).every(te=>!Nt(q,te)))return;if(Tt(C)&&j){const te=Qn(C),ne=tn(C),ee=/auto|scroll/,H=te||ee.test(ne.overflowX),K=te||ee.test(ne.overflowY),X=H&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,ie=K&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,B=ne.direction==="rtl",oe=ie&&(B?_.offsetX<=C.offsetWidth-C.clientWidth:_.offsetX>C.clientWidth),ae=X&&_.offsetY>C.clientHeight;if(oe||ae)return}const Y=(N=i.current.floatingContext)==null?void 0:N.nodeId,R=m&&jr(m.nodesRef.current,Y).some(te=>{var ne;return Qc(_,(ne=te.context)==null?void 0:ne.elements.floating)});if(Qc(_,o.floating)||Qc(_,o.domReference)||R)return;const Z=m?jr(m.nodesRef.current,Y):[];if(Z.length>0){let te=!0;if(Z.forEach(ne=>{var ee;if((ee=ne.context)!=null&&ee.open&&!ne.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}r(!1,_,"outside-press")}),D=mt(_=>{var N;const z=()=>{var M;I(_),(M=Vn(_))==null||M.removeEventListener(c,z)};(N=Vn(_))==null||N.addEventListener(c,z)});O.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=k;let _=-1;function N(L){r(!1,L,"ancestor-scroll")}function z(){window.clearTimeout(_),w.current=!0}function M(){_=window.setTimeout(()=>{w.current=!1},Ya()?5:0)}const C=Vt(o.floating);s&&(C.addEventListener("keydown",T?A:E,T),C.addEventListener("compositionstart",z),C.addEventListener("compositionend",M)),y&&C.addEventListener(c,P?D:I,P);let $=[];return h&&(at(o.domReference)&&($=ur(o.domReference)),at(o.floating)&&($=$.concat(ur(o.floating))),!at(o.reference)&&o.reference&&o.reference.contextElement&&($=$.concat(ur(o.reference.contextElement)))),$=$.filter(L=>{var q;return L!==((q=C.defaultView)==null?void 0:q.visualViewport)}),$.forEach(L=>{L.addEventListener("scroll",N,{passive:!0})}),()=>{s&&(C.removeEventListener("keydown",T?A:E,T),C.removeEventListener("compositionstart",z),C.removeEventListener("compositionend",M)),y&&C.removeEventListener(c,P?D:I,P),$.forEach(L=>{L.removeEventListener("scroll",N)}),window.clearTimeout(_)}},[i,o,s,y,c,n,r,h,a,x,k,E,T,A,I,P,D]),O.useEffect(()=>{i.current.insideReactTree=!1},[i,y,c]);const F=O.useMemo(()=>({onKeyDown:E,...u&&{[aA[d]]:_=>{r(!1,_.nativeEvent,"reference-press")},...d!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}}}}),[E,r,u,d]),j=O.useMemo(()=>({onKeyDown:E,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[sA[c]]:()=>{i.current.insideReactTree=!0}}),[E,c,i]);return O.useMemo(()=>a?{reference:F,floating:j}:{},[a,F,j])}function lA(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Oi(),i=O.useRef({}),[a]=O.useState(()=>$g()),s=fr()!=null;if(process.env.NODE_ENV!=="production"){const g=r.reference;g&&!at(g)&&RP("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]=O.useState(r.reference),u=mt((g,v,m)=>{i.current.openEvent=g?v:void 0,a.emit("openchange",{open:g,event:v,reason:m,nested:s}),n?.(g,v,m)}),d=O.useMemo(()=>({setPositionReference:c}),[]),h=O.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return O.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:a,floatingId:o,refs:d}),[t,u,h,a,o,d])}function tr(e){e===void 0&&(e={});const{nodeId:t}=e,n=lA({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=O.useState(null),[s,l]=O.useState(null),u=o?.domReference||i,d=O.useRef(null),h=pr();Ge(()=>{u&&(d.current=u)},[u]);const g=DP({...e,elements:{...o,...s&&{reference:s}}}),v=O.useCallback(x=>{const k=at(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(k),g.refs.setReference(k)},[g.refs]),m=O.useCallback(x=>{(at(x)||x===null)&&(d.current=x,a(x)),(at(g.refs.reference.current)||g.refs.reference.current===null||x!==null&&!at(x))&&g.refs.setReference(x)},[g.refs]),f=O.useMemo(()=>({...g.refs,setReference:m,setPositionReference:v,domReference:d}),[g.refs,m,v]),y=O.useMemo(()=>({...g.elements,domReference:u}),[g.elements,u]),b=O.useMemo(()=>({...g,...r,refs:f,elements:y,nodeId:t}),[g,f,y,t,r]);return Ge(()=>{r.dataRef.current.floatingContext=b;const x=h?.nodesRef.current.find(k=>k.id===t);x&&(x.context=b)}),O.useMemo(()=>({...g,context:b,refs:f,elements:y}),[g,f,y,b])}function pu(){return LC()&&og()}function cA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=O.useRef(!1),u=O.useRef(-1),d=O.useRef(!0);O.useEffect(()=>{if(!s)return;const g=qt(a.domReference);function v(){!n&&Tt(a.domReference)&&a.domReference===Ln(Vt(a.domReference))&&(c.current=!0)}function m(){d.current=!0}function f(){d.current=!1}return g.addEventListener("blur",v),pu()&&(g.addEventListener("keydown",m,!0),g.addEventListener("pointerdown",f,!0)),()=>{g.removeEventListener("blur",v),pu()&&(g.removeEventListener("keydown",m,!0),g.removeEventListener("pointerdown",f,!0))}},[a.domReference,n,s]),O.useEffect(()=>{if(!s)return;function g(v){let{reason:m}=v;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",g),()=>{o.off("openchange",g)}},[o,s]),O.useEffect(()=>()=>{jt(u)},[]);const h=O.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(g){if(c.current)return;const v=Vn(g.nativeEvent);if(l&&at(v)){if(pu()&&!g.relatedTarget){if(!d.current&&!Jc(v))return}else if(!BC(v))return}r(!0,g.nativeEvent,"focus")},onBlur(g){c.current=!1;const v=g.relatedTarget,m=g.nativeEvent,f=at(v)&&v.hasAttribute(Br("focus-guard"))&&v.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const b=Ln(a.domReference?a.domReference.ownerDocument:document);!v&&b===a.domReference||Nt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,b)||Nt(a.domReference,b)||f||r(!1,m,"focus")})}}),[i,a.domReference,r,l]);return O.useMemo(()=>s?{reference:h}:{},[s,h])}function hu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Mg]:a,[Dg]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[$P]:""},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[Mg,Dg].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),a[c]=function(){for(var h,g=arguments.length,v=new Array(g),m=0;m<g;m++)v[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(f=>f(...v)).find(f=>f!==void 0)}}}else a[c]=u}),a),{})}}function nr(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=O.useCallback(s=>hu(s,e,"reference"),t),i=O.useCallback(s=>hu(s,e,"floating"),n),a=O.useCallback(s=>hu(s,e,"item"),r);return O.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const uA="Escape";function vs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function ys(e,t){return vs(t,e===Ng||e===us,e===Ii||e===_i)}function mu(e,t,n){return vs(t,e===us,n?e===Ii:e===_i)||e==="Enter"||e===" "||e===""}function iv(e,t,n){return vs(t,n?e===Ii:e===_i,e===us)}function av(e,t,n,r){const o=n?e===_i:e===Ii,i=e===Ng;return t==="both"||t==="horizontal"&&r&&r>1?e===uA:vs(t,o,i)}function bs(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:h=!1,nested:g=!1,rtl:v=!1,virtual:m=!1,focusItemOnOpen:f="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:k="vertical",parentOrientation:T,cols:P=1,scrollItemIntoView:w=!0,virtualItemRef:E,itemSizes:A,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(h||ds("`useListNavigation` looping must be enabled to allow escaping."),m||ds("`useListNavigation` must be virtual to allow escaping.")),k==="vertical"&&P>1&&ds("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const D=rs(o.floating),F=Ft(D),j=fr(),_=pr();Ge(()=>{e.dataRef.current.orientation=k},[e,k]);const N=mt(()=>{l(C.current===-1?null:C.current)}),z=eu(o.domReference),M=O.useRef(f),C=O.useRef(u??-1),$=O.useRef(null),L=O.useRef(!0),q=O.useRef(N),Y=O.useRef(!!o.floating),R=O.useRef(n),Z=O.useRef(!1),te=O.useRef(!1),ne=Ft(x),ee=Ft(n),H=Ft(w),K=Ft(u),[X,ie]=O.useState(),[B,oe]=O.useState(),ae=mt(()=>{function fe(de){if(m){var Ee;(Ee=de.id)!=null&&Ee.endsWith("-fui-option")&&(de.id=i+"-"+Math.random().toString(16).slice(2,10)),ie(de.id),_?.events.emit("virtualfocus",de),E&&(E.current=de)}else Rr(de,{sync:Z.current,preventScroll:!0})}const U=a.current[C.current],V=te.current;U&&fe(U),(Z.current?de=>de():requestAnimationFrame)(()=>{const de=a.current[C.current]||U;if(!de)return;U||fe(de);const Ee=H.current;Ee&&pe&&(V||!L.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof Ee=="boolean"?{block:"nearest",inline:"nearest"}:Ee))})});Ge(()=>{c&&(n&&o.floating?M.current&&u!=null&&(te.current=!0,C.current=u,N()):Y.current&&(C.current=-1,q.current()))},[c,n,o.floating,u,N]),Ge(()=>{if(c&&n&&o.floating)if(s==null){if(Z.current=!1,K.current!=null)return;if(Y.current&&(C.current=-1,ae()),(!R.current||!Y.current)&&M.current&&($.current!=null||M.current===!0&&$.current==null)){let fe=0;const U=()=>{a.current[0]==null?(fe<2&&(fe?requestAnimationFrame:queueMicrotask)(U),fe++):(C.current=$.current==null||mu($.current,k,v)||g?tu(a,ne.current):ug(a,ne.current),$.current=null,N())};U()}}else ki(a,s)||(C.current=s,ae(),te.current=!1)},[c,n,o.floating,s,K,g,a,k,v,N,ae,ne]),Ge(()=>{var fe;if(!c||o.floating||!_||m||!Y.current)return;const U=_.nodesRef.current,V=(fe=U.find(Ee=>Ee.id===j))==null||(fe=fe.context)==null?void 0:fe.elements.floating,Q=Ln(Vt(o.floating)),de=U.some(Ee=>Ee.context&&Nt(Ee.context.elements.floating,Q));V&&!de&&L.current&&V.focus({preventScroll:!0})},[c,o.floating,_,j,m]),Ge(()=>{if(!c||!_||!m||j)return;function fe(U){oe(U.id),E&&(E.current=U)}return _.events.on("virtualfocus",fe),()=>{_.events.off("virtualfocus",fe)}},[c,_,m,j,E]),Ge(()=>{q.current=N,R.current=n,Y.current=!!o.floating}),Ge(()=>{n||($.current=null,M.current=f)},[n,f]);const ue=s!=null,pe=O.useMemo(()=>{function fe(V){if(!ee.current)return;const Q=a.current.indexOf(V);Q!==-1&&C.current!==Q&&(C.current=Q,N())}return{onFocus(V){let{currentTarget:Q}=V;Z.current=!0,fe(Q)},onClick:V=>{let{currentTarget:Q}=V;return Q.focus({preventScroll:!0})},onMouseMove(V){let{currentTarget:Q}=V;Z.current=!0,te.current=!1,y&&fe(Q)},onPointerLeave(V){let{pointerType:Q}=V;if(!(!L.current||Q==="touch")&&(Z.current=!0,!!y&&(C.current=-1,N(),!m))){var de;(de=F.current)==null||de.focus({preventScroll:!0})}}}},[ee,F,y,a,N,m]),se=O.useCallback(()=>{var fe;return T??(_==null||(fe=_.nodesRef.current.find(U=>U.id===j))==null||(fe=fe.context)==null||(fe=fe.dataRef)==null?void 0:fe.current.orientation)},[j,_,T]),ge=mt(fe=>{if(L.current=!1,Z.current=!0,fe.which===229||!ee.current&&fe.currentTarget===F.current)return;if(g&&av(fe.key,k,v,P)){ys(fe.key,se())||$t(fe),r(!1,fe.nativeEvent,"list-navigation"),Tt(o.domReference)&&(m?_?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const U=C.current,V=tu(a,x),Q=ug(a,x);if(z||(fe.key==="Home"&&($t(fe),C.current=V,N()),fe.key==="End"&&($t(fe),C.current=Q,N())),P>1){const de=A||Array.from({length:a.current.length},()=>({width:1,height:1})),Ee=KC(de,P,I),Le=Ee.findIndex(xt=>xt!=null&&!is(a,xt,x)),Ze=Ee.reduce((xt,Kt,Kn)=>Kt!=null&&!is(a,Kt,x)?Kn:xt,-1),Lt=Ee[GC({current:Ee.map(xt=>xt!=null?a.current[xt]:null)},{event:fe,orientation:k,loop:h,rtl:v,cols:P,disabledIndices:XC([...(typeof x!="function"?x:null)||a.current.map((xt,Kt)=>is(a,Kt,x)?Kt:void 0),void 0],Ee),minIndex:Le,maxIndex:Ze,prevIndex:ZC(C.current>Q?V:C.current,de,Ee,P,fe.key===us?"bl":fe.key===(v?Ii:_i)?"tr":"tl"),stopEvent:!0})];if(Lt!=null&&(C.current=Lt,N()),k==="both")return}if(ys(fe.key,k)){if($t(fe),n&&!m&&Ln(fe.currentTarget.ownerDocument)===fe.currentTarget){C.current=mu(fe.key,k,v)?V:Q,N();return}mu(fe.key,k,v)?h?C.current=U>=Q?d&&U!==a.current.length?-1:V:Ht(a,{startingIndex:U,disabledIndices:x}):C.current=Math.min(Q,Ht(a,{startingIndex:U,disabledIndices:x})):h?C.current=U<=V?d&&U!==-1?a.current.length:Q:Ht(a,{startingIndex:U,decrement:!0,disabledIndices:x}):C.current=Math.max(V,Ht(a,{startingIndex:U,decrement:!0,disabledIndices:x})),ki(a,C.current)&&(C.current=-1),N()}}),Ae=O.useMemo(()=>m&&n&&ue&&{"aria-activedescendant":B||X},[m,n,ue,B,X]),ve=O.useMemo(()=>({"aria-orientation":k==="both"?void 0:k,...z?{}:Ae,onKeyDown:ge,onPointerMove(){L.current=!0}}),[Ae,ge,k,z]),Re=O.useMemo(()=>{function fe(V){f==="auto"&&lg(V.nativeEvent)&&(M.current=!0)}function U(V){M.current=f,f==="auto"&&cg(V.nativeEvent)&&(M.current=!0)}return{...Ae,onKeyDown(V){L.current=!1;const Q=V.key.startsWith("Arrow"),de=["Home","End"].includes(V.key),Ee=Q||de,Le=iv(V.key,k,v),Ze=av(V.key,k,v,P),Lt=iv(V.key,se(),v),xt=ys(V.key,k),Kt=(g?Lt:xt)||V.key==="Enter"||V.key.trim()==="";if(m&&n){const W=_?.nodesRef.current.find(Ve=>Ve.parentId==null),G=_&&W?RC(_.nodesRef.current,W.id):null;if(Ee&&G&&E){const Ve=new KeyboardEvent("keydown",{key:V.key,bubbles:!0});if(Le||Ze){var Kn,In;const tt=((Kn=G.context)==null?void 0:Kn.elements.domReference)===V.currentTarget,it=Ze&&!tt?(In=G.context)==null?void 0:In.elements.domReference:Le?a.current.find(Me=>Me?.id===X):null;it&&($t(V),it.dispatchEvent(Ve),oe(void 0))}if((xt||de)&&G.context&&G.context.open&&G.parentId&&V.currentTarget!==G.context.elements.domReference){var _n;$t(V),(_n=G.context.elements.domReference)==null||_n.dispatchEvent(Ve);return}}return ge(V)}if(!(!n&&!b&&Q)){if(Kt){const W=ys(V.key,se());$.current=g&&W?null:V.key}if(g){Lt&&($t(V),n?(C.current=tu(a,ne.current),N()):r(!0,V.nativeEvent,"list-navigation"));return}xt&&(u!=null&&(C.current=u),$t(V),!n&&b?r(!0,V.nativeEvent,"list-navigation"):ge(V),n&&N())}},onFocus(){n&&!m&&(C.current=-1,N())},onPointerDown:U,onPointerEnter:U,onMouseDown:fe,onClick:fe}},[X,Ae,P,ge,ne,f,a,g,N,r,n,b,k,se,v,u,_,m,E]);return O.useMemo(()=>c?{reference:Re,floating:ve,item:pe}:{},[c,Re,ve,pe])}const dA=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function vr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,c=Oi(),u=((n=i.domReference)==null?void 0:n.id)||c,d=O.useMemo(()=>{var b;return((b=rs(i.floating))==null?void 0:b.id)||a},[i.floating,a]),h=(r=dA.get(l))!=null?r:l,v=fr()!=null,m=O.useMemo(()=>h==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":h==="alertdialog"?"dialog":h,"aria-controls":o?d:void 0,...h==="listbox"&&{role:"combobox"},...h==="menu"&&{id:u},...h==="menu"&&v&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[h,d,v,o,u,l]),f=O.useMemo(()=>{const b={id:d,...h&&{role:h}};return h==="tooltip"||l==="label"?b:{...b,...h==="menu"&&{"aria-labelledby":u}}},[h,d,u,l]),y=O.useCallback(b=>{let{active:x,selected:k}=b;const T={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...T,"aria-selected":k}}return{}},[d,l]);return O.useMemo(()=>s?{reference:m,floating:f,item:y}:{},[s,m,f,y])}const sv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Po(e,t){return typeof e=="function"?e(t):e}function fA(e,t){const[n,r]=O.useState(e);return e&&!n&&r(!0),O.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function pA(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=O.useState("unmounted"),c=fA(n,a);return!c&&s==="close"&&l("unmounted"),Ge(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{vi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function lv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=O.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,h=(u?a:a.close)||0,[g,v]=O.useState(()=>({...Po(i,c),...Po(n,c)})),{isMounted:m,status:f}=pA(e,{duration:a}),y=Ft(n),b=Ft(r),x=Ft(o),k=Ft(i);return Ge(()=>{const T=Po(y.current,c),P=Po(x.current,c),w=Po(k.current,c),E=Po(b.current,c)||Object.keys(T).reduce((A,I)=>(A[I]="",A),{});if(f==="initial"&&v(A=>({transitionProperty:A.transitionProperty,...w,...T})),f==="open"&&v({transitionProperty:Object.keys(E).map(sv).join(","),transitionDuration:d+"ms",...w,...E}),f==="close"){const A=P||T;v({transitionProperty:Object.keys(A).map(sv).join(","),transitionDuration:h+"ms",...w,...A})}},[h,x,y,b,k,d,f,c]),{isMounted:m,styles:g}}function hA(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:h=[],selectedIndex:g=null}=t,v=O.useRef(-1),m=O.useRef(""),f=O.useRef((n=g??a)!=null?n:-1),y=O.useRef(null),b=mt(s),x=mt(l),k=Ft(u),T=Ft(h);Ge(()=>{r&&(jt(v),y.current=null,m.current="")},[r]),Ge(()=>{if(r&&m.current===""){var I;f.current=(I=g??a)!=null?I:-1}},[r,g,a]);const P=mt(I=>{I?o.current.typing||(o.current.typing=I,x(I)):o.current.typing&&(o.current.typing=I,x(I))}),w=mt(I=>{function D(z,M,C){const $=k.current?k.current(M,C):M.find(L=>L?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return $?z.indexOf($):-1}const F=i.current;if(m.current.length>0&&m.current[0]!==" "&&(D(F,F,m.current)===-1?P(!1):I.key===" "&&$t(I)),F==null||T.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&($t(I),P(!0)),F.every(z=>{var M,C;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((C=z[1])==null?void 0:C.toLocaleLowerCase()):!0})&&m.current===I.key&&(m.current="",f.current=y.current),m.current+=I.key,jt(v),v.current=window.setTimeout(()=>{m.current="",f.current=y.current,P(!1)},d);const _=f.current,N=D(F,[...F.slice((_||0)+1),...F.slice(0,(_||0)+1)],m.current);N!==-1?(b(N),y.current=N):I.key!==" "&&(m.current="",P(!1))}),E=O.useMemo(()=>({onKeyDown:w}),[w]),A=O.useMemo(()=>({onKeyDown:w,onKeyUp(I){I.key===" "&&P(!1)}}),[w,P]);return O.useMemo(()=>c?{reference:E,floating:A}:{},[c,E,A])}function cv(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,...cv(e,o.id,n)])}function uv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function mA(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function dv(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,a=null,s=null,l=typeof performance<"u"?performance.now():0;function c(d,h){const g=performance.now(),v=g-l;if(a===null||s===null||v===0)return a=d,s=h,l=g,null;const m=d-a,f=h-s,b=Math.sqrt(m*m+f*f)/v;return a=d,s=h,l=g,b}const u=d=>{let{x:h,y:g,placement:v,elements:m,onClose:f,nodeId:y,tree:b}=d;return function(k){function T(){jt(o),f()}if(jt(o),!m.domReference||!m.floating||v==null||h==null||g==null)return;const{clientX:P,clientY:w}=k,E=[P,w],A=UP(k),I=k.type==="mouseleave",D=cu(m.floating,A),F=cu(m.domReference,A),j=m.domReference.getBoundingClientRect(),_=m.floating.getBoundingClientRect(),N=v.split("-")[0],z=h>_.right-_.width/2,M=g>_.bottom-_.height/2,C=mA(E,j),$=_.width>j.width,L=_.height>j.height,q=($?j:_).left,Y=($?j:_).right,R=(L?j:_).top,Z=(L?j:_).bottom;if(D&&(i=!0,!I))return;if(F&&(i=!1),F&&!I){i=!0;return}if(I&&at(k.relatedTarget)&&cu(m.floating,k.relatedTarget)||b&&cv(b.nodesRef.current,y).length)return;if(N==="top"&&g>=j.bottom-1||N==="bottom"&&g<=j.top+1||N==="left"&&h>=j.right-1||N==="right"&&h<=j.left+1)return T();let te=[];switch(N){case"top":te=[[q,j.top+1],[q,_.bottom-1],[Y,_.bottom-1],[Y,j.top+1]];break;case"bottom":te=[[q,_.top+1],[q,j.bottom-1],[Y,j.bottom-1],[Y,_.top+1]];break;case"left":te=[[_.right-1,Z],[_.right-1,R],[j.left+1,R],[j.left+1,Z]];break;case"right":te=[[j.right-1,Z],[j.right-1,R],[_.left+1,R],[_.left+1,Z]];break}function ne(ee){let[H,K]=ee;switch(N){case"top":{const X=[$?H+t/2:z?H+t*4:H-t*4,K+t+1],ie=[$?H-t/2:z?H+t*4:H-t*4,K+t+1],B=[[_.left,z||$?_.bottom-t:_.top],[_.right,z?$?_.bottom-t:_.top:_.bottom-t]];return[X,ie,...B]}case"bottom":{const X=[$?H+t/2:z?H+t*4:H-t*4,K-t],ie=[$?H-t/2:z?H+t*4:H-t*4,K-t],B=[[_.left,z||$?_.top+t:_.bottom],[_.right,z?$?_.top+t:_.bottom:_.top+t]];return[X,ie,...B]}case"left":{const X=[H+t+1,L?K+t/2:M?K+t*4:K-t*4],ie=[H+t+1,L?K-t/2:M?K+t*4:K-t*4];return[...[[M||L?_.right-t:_.left,_.top],[M?L?_.right-t:_.left:_.right-t,_.bottom]],X,ie]}case"right":{const X=[H-t,L?K+t/2:M?K+t*4:K-t*4],ie=[H-t,L?K-t/2:M?K+t*4:K-t*4],B=[[M||L?_.left+t:_.right,_.top],[M?L?_.left+t:_.right:_.left+t,_.bottom]];return[X,ie,...B]}}}if(!uv([P,w],te)){if(i&&!C)return T();if(!I&&r){const ee=c(k.clientX,k.clientY);if(ee!==null&&ee<.1)return T()}uv([P,w],ne([h,g]))?!i&&r&&(o.current=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const fv=200,gA=500,Ao=()=>{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)}`},pv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),hv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},gu=(e,t)=>{const n=pv(t,hv.basic,e)||pv(t,hv.extend,e);return n===void 0||n===e?void 0:n},yr=()=>typeof window>"u",vu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),mv=(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},vA=e=>!e,yu=()=>{},gv=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},bu=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,onChange:u=yu,followCursor:d=!1,...h},g){const[v,m]=S.useState(n??!1),f=S.useRef(null),y=t||"span",b=_=>{m(_),u?.(_)},{refs:x,floatingStyles:k,context:T}=tr({placement:i,open:v,whileElementsMounted:Eo,onOpenChange:n?void 0:b,middleware:[iu(),Ai(5),FP(),Ig({padding:5,element:f}),au({fallbackAxisSideDirection:"start"})]}),P=gr(T,{enabled:l}),w=vr(T,{role:"tooltip",enabled:l}),E=cA(T,{enabled:l?a:!1}),A=Co(T,{enabled:l?c:!1}),I=iA(T,{enabled:!!l&&!!d}),D=Rg(T,{move:!0,delay:{open:fv},enabled:l?s:!1,handleClose:c?dv():null}),{getReferenceProps:F,getFloatingProps:j}=nr([w,P,I,a?E:void 0,s?D:void 0,c?A:void 0]);return S.useEffect(()=>m(n===void 0?!1:n),[n]),p.jsxs(S.Fragment,{children:[p.jsx(y,{...F(h),ref:Xn(x.setReference,g),children:r}),v&&p.jsx(hr,{children:p.jsxs(en,{...j(),ref:x.setFloating,style:k,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[p.jsx(Vg,{ref:f,context:T,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),vv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>p.jsxs("span",{className:ke("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:p.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:[a,e||o?p.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?p.jsx(bu,{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:p.jsx("span",{className:"cursor-help",children:p.jsx(Fc,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:p.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?p.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[p.jsx(Nm,{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}),p.jsx($k,{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]}),Di=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:h="",name:g,title:v,componentName:m,placeholder:f,hideLeft:y=!1,required:b,disabled:x,reportStatus:k},T)=>{const P=jc(),w=k!==void 0?k:P.input.iconFeedback,E=d??g,A=St(),I=e??A.inputOptionalLabel;return p.jsxs("fieldset",{ref:T,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":m,"data-interactive":!!i,className:ke("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[p.jsxs("label",{form:u,htmlFor:E,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:[p.jsx(vv,{info:s,hideLeft:y,reportStatus:w,title:v,placeholder:f,children:I||n?p.jsxs(S.Fragment,{children:[b?null:p.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:I}),n?p.jsx(S.Fragment,{children:n}):null]}):null}),p.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 ${h}`,children:[t?p.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?p.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),p.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}),p.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})]})}),yv=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:h,optionalText:g,type:v="text",labelClassName:m,feedback:f=null,hideLeft:y=!1,loading:b,...x},k)=>{const T=e,P=x.id??x.name,w=S.useRef(null);return S.useEffect(()=>{if(w.current===null)return;const E=w.current,A=bi(w.current),I=r?.(E),D=F=>{const j=F;if(j.key==="Enter"&&E.enterKeyHint==="next"){const _=E.getAttribute("data-next");if(_){const N=document.getElementById(_);if(N)return N.focus(),void j.preventDefault()}}};return E.addEventListener("keydown",D),()=>{I?.(),A(),E.removeEventListener("keydown",D)}},[]),p.jsx(Di,{...n,info:i,left:a,error:l,right:c,loading:b,form:x.form,name:x.name,feedback:f,hideLeft:y,title:x.title,container:ke(u,n.container),rightLabel:d,disabled:x.disabled,interactive:h,required:x.required,componentName:t,id:x.name||x.id,optionalText:g,labelClassName:m,placeholder:x.placeholder,children:p.jsx(T,{...n,...x,id:P,name:P,type:v,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Xn(k,w),className:ke("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)})})}),Io=yv(_m,"input",{type:"text"}),yA=fo("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"}}),xs=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return p.jsxs(en,{...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:ke(yA({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Wr=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:h,left:g,error:v,...m},f)=>{const y=St(),b=S.useRef(null),x=m.id??m.name;S.useImperativeHandle(f,()=>b.current),S.useEffect(()=>{if(b.current===null)return;const T=new AbortController,P=b.current,w=bi(b.current);return P.addEventListener("change",()=>P.setAttribute("data-selected","true"),{once:!0,signal:T.signal}),()=>{w(),T.abort()}},[]);const k=()=>b.current?.focus();return p.jsx(Di,{info:n,left:g,error:v,form:m.form,loading:l,name:m.name,feedback:o,hideLeft:d,required:e,title:m.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:m.name||m.id,optionalText:c,labelClassName:i,placeholder:m.placeholder,right:p.jsxs("label",{htmlFor:x,children:[h,p.jsxs("button",{onClick:k,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[p.jsx(Dc,{size:20}),p.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:p.jsxs("select",{...m,id:x,name:x,required:e,ref:Xn(f,b),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:ke("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:[p.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(T=>S.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${x}-select-option-${T.value}`}))]})})});function bv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xv(...e){return t=>{let n=!1;const r=e.map(o=>{const i=bv(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():bv(e[o],null)}}}}function rn(...e){return O.useCallback(xv(...e),e)}function ws(e){const t=bA(e),n=O.forwardRef((r,o)=>{const{children:i,...a}=r,s=O.Children.toArray(i),l=s.find(wA);if(l){const c=l.props.children,u=s.map(d=>d===l?O.Children.count(c)>1?O.Children.only(null):O.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...a,ref:o,children:O.isValidElement(c)?O.cloneElement(c,void 0,u):null})}return p.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var wv=ws("Slot");function bA(e){const t=O.forwardRef((n,r)=>{const{children:o,...i}=n;if(O.isValidElement(o)){const a=TA(o),s=SA(i,o.props);return o.type!==O.Fragment&&(s.ref=r?xv(r,a):a),O.cloneElement(o,s)}return O.Children.count(o)>1?O.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xA=Symbol("radix.slottable");function wA(e){return O.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xA}function SA(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]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function TA(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 EA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zt=EA.reduce((e,t)=>{const n=ws(`Primitive.${t}`),r=O.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Sv(e,t){e&&vi.flushSync(()=>e.dispatchEvent(t))}var kA=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"}),CA="VisuallyHidden",xu=O.forwardRef((e,t)=>p.jsx(zt.span,{...e,ref:t,style:{...kA,...e.style}}));xu.displayName=CA;function Ss(e,t=[]){let n=[];function r(i,a){const s=O.createContext(a),l=n.length;n=[...n,a];const c=d=>{const{scope:h,children:g,...v}=d,m=h?.[e]?.[l]||s,f=O.useMemo(()=>v,Object.values(v));return p.jsx(m.Provider,{value:f,children:g})};c.displayName=i+"Provider";function u(d,h){const g=h?.[e]?.[l]||s,v=O.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>O.createContext(a));return function(s){const l=s?.[e]||i;return O.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,PA(o,...t)]}function PA(...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 a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return O.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Tv(e){const t=e+"CollectionProvider",[n,r]=Ss(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:f,children:y}=m,b=S.useRef(null),x=S.useRef(new Map).current;return p.jsx(o,{scope:f,itemMap:x,collectionRef:b,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=ws(s),c=S.forwardRef((m,f)=>{const{scope:y,children:b}=m,x=i(s,y),k=rn(f,x.collectionRef);return p.jsx(l,{ref:k,children:b})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=ws(u),g=S.forwardRef((m,f)=>{const{scope:y,children:b,...x}=m,k=S.useRef(null),T=rn(f,k),P=i(u,y);return S.useEffect(()=>(P.itemMap.set(k,{ref:k,...x}),()=>{P.itemMap.delete(k)})),p.jsx(h,{[d]:"",ref:T,children:b})});g.displayName=u;function v(m){const f=i(e+"CollectionConsumer",m);return S.useCallback(()=>{const b=f.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(f.itemMap.values()).sort((P,w)=>x.indexOf(P.ref.current)-x.indexOf(w.ref.current))},[f.collectionRef,f.itemMap])}return[{Provider:a,Slot:c,ItemSlot:g},v,r]}function _t(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var _o=globalThis?.document?O.useLayoutEffect:()=>{},AA=O[" useInsertionEffect ".trim().toString()]||_o;function Ev({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=IA({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=O.useRef(e!==void 0);O.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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=s},[s,r])}const c=O.useCallback(u=>{if(s){const d=_A(u)?u(e):u;d!==e&&a.current?.(d)}else i(u)},[s,e,i,a]);return[l,c]}function IA({defaultProp:e,onChange:t}){const[n,r]=O.useState(e),o=O.useRef(n),i=O.useRef(t);return AA(()=>{i.current=t},[t]),O.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function _A(e){return typeof e=="function"}function OA(e,t){return O.useReducer((n,r)=>t[n][r]??n,e)}var kv=e=>{const{present:t,children:n}=e,r=MA(t),o=typeof n=="function"?n({present:r.isPresent}):O.Children.only(n),i=rn(r.ref,DA(o));return typeof n=="function"||r.isPresent?O.cloneElement(o,{ref:i}):null};kv.displayName="Presence";function MA(e){const[t,n]=O.useState(),r=O.useRef(null),o=O.useRef(e),i=O.useRef("none"),a=e?"mounted":"unmounted",[s,l]=OA(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect(()=>{const c=Ts(r.current);i.current=s==="mounted"?c:"none"},[s]),_o(()=>{const c=r.current,u=o.current;if(u!==e){const h=i.current,g=Ts(c);e?l("MOUNT"):g==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),_o(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=g=>{const m=Ts(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!o.current)){const f=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=f)})}},h=g=>{g.target===t&&(i.current=Ts(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:O.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Ts(e){return e?.animationName||"none"}function DA(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 NA=O.createContext(void 0);function FA(e){const t=O.useContext(NA);return e||t||"ltr"}function qr(e){const t=O.useRef(e);return O.useEffect(()=>{t.current=e}),O.useMemo(()=>(...n)=>t.current?.(...n),[])}function LA(e,t=globalThis?.document){const n=qr(e);O.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 VA="DismissableLayer",wu="dismissableLayer.update",$A="dismissableLayer.pointerDownOutside",jA="dismissableLayer.focusOutside",Cv,Pv=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Av=O.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=O.useContext(Pv),[u,d]=O.useState(null),h=u?.ownerDocument??globalThis?.document,[,g]=O.useState({}),v=rn(t,w=>d(w)),m=Array.from(c.layers),[f]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(f),b=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,T=BA(w=>{const E=w.target,A=[...c.branches].some(I=>I.contains(E));!k||A||(o?.(w),a?.(w),w.defaultPrevented||s?.())},h),P=RA(w=>{const E=w.target;[...c.branches].some(I=>I.contains(E))||(i?.(w),a?.(w),w.defaultPrevented||s?.())},h);return LA(w=>{b===c.layers.size-1&&(r?.(w),!w.defaultPrevented&&s&&(w.preventDefault(),s()))},h),O.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Cv=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),_v(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Cv)}},[u,h,n,c]),O.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),_v())},[u,c]),O.useEffect(()=>{const w=()=>g({});return document.addEventListener(wu,w),()=>document.removeEventListener(wu,w)},[]),p.jsx(zt.div,{...l,ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:_t(e.onFocusCapture,P.onFocusCapture),onBlurCapture:_t(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:_t(e.onPointerDownCapture,T.onPointerDownCapture)})});Av.displayName=VA;var zA="DismissableLayerBranch",Iv=O.forwardRef((e,t)=>{const n=O.useContext(Pv),r=O.useRef(null),o=rn(t,r);return O.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(zt.div,{...e,ref:o})});Iv.displayName=zA;function BA(e,t=globalThis?.document){const n=qr(e),r=O.useRef(!1),o=O.useRef(()=>{});return O.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Ov($A,n,c,{discrete:!0})};const c={originalEvent:s};s.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},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function RA(e,t=globalThis?.document){const n=qr(e),r=O.useRef(!1);return O.useEffect(()=>{const o=i=>{i.target&&!r.current&&Ov(jA,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 _v(){const e=new CustomEvent(wu);document.dispatchEvent(e)}function Ov(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?Sv(o,i):o.dispatchEvent(i)}var HA=Av,WA=Iv,qA="Portal",Mv=O.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=O.useState(!1);_o(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?uo.createPortal(p.jsx(zt.div,{...r,ref:t}),a):null});Mv.displayName=qA;function Ur(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function UA(e){const t=O.useRef({value:e,previous:e});return O.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function YA(e){const[t,n]=O.useState(void 0);return _o(()=>{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 a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Dv(e,[t,n]){return Math.min(n,Math.max(t,e))}var Su="Progress",Tu=100,[GA,U4]=Ss(Su),[KA,ZA]=GA(Su),Nv=O.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=XA,...a}=e;(o||o===0)&&!$v(o)&&console.error(QA(`${o}`,"Progress"));const s=$v(o)?o:Tu;r!==null&&!jv(r,s)&&console.error(JA(`${r}`,"Progress"));const l=jv(r,s)?r:null,c=Es(l)?i(l,s):void 0;return p.jsx(KA,{scope:n,value:l,max:s,children:p.jsx(zt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Es(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":Vv(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});Nv.displayName=Su;var Fv="ProgressIndicator",Lv=O.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=ZA(Fv,n);return p.jsx(zt.div,{"data-state":Vv(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Lv.displayName=Fv;function XA(e,t){return`${Math.round(e/t*100)}%`}function Vv(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Es(e){return typeof e=="number"}function $v(e){return Es(e)&&!isNaN(e)&&e>0}function jv(e,t){return Es(e)&&!isNaN(e)&&e<=t&&e>=0}function QA(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Tu}\`.`}function JA(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
178
5
  - a positive number
179
- - less than the value passed to \`max\` (or ${wu} if no \`max\` prop is set)
6
+ - less than the value passed to \`max\` (or ${Tu} if no \`max\` prop is set)
180
7
  - \`null\` or \`undefined\` if the progress is indeterminate.
181
8
 
182
- Defaulting to \`null\`.`}var wA=Sv,SA=Ev,Av=["PageUp","PageDown"],Iv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_v={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Oo="Slider",[Su,TA,EA]=dv(Oo),[Ov,f3]=gs(Oo,[EA]),[kA,bs]=Ov(Oo),Mv=I.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:b,...g}=e,m=I.useRef(new Set),v=I.useRef(0),x=a==="horizontal"?CA:PA,[T=[],w]=fv({prop:u,defaultProp:c,onChange:L=>{[...m.current][v.current]?.focus(),d(L)}}),E=I.useRef(T);function k(L){const D=MA(T,L);_(L,D)}function C(L){_(L,v.current)}function O(){const L=E.current[v.current];T[v.current]!==L&&p(T)}function _(L,D,{commit:z}={commit:!1}){const A=FA(i),N=VA(Math.round((L-r)/i)*i+r,A),H=wv(N,[r,o]);w((M=[])=>{const P=_A(M,H,D);if(LA(P,l*i)){v.current=P.indexOf(H);const $=String(P)!==String(M);return $&&z&&p(P),$?P:M}else return M})}return h.jsx(kA,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:m.current,values:T,orientation:a,form:b,children:h.jsx(Su.Provider,{scope:e.__scopeSlider,children:h.jsx(Su.Slot,{scope:e.__scopeSlider,children:h.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:_t(g.onPointerDown,()=>{s||(E.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:k,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:O,onHomeKeyDown:()=>!s&&_(r,0,{commit:!0}),onEndKeyDown:()=>!s&&_(o,T.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:D})=>{if(!s){const N=Av.includes(L.key)||L.shiftKey&&Iv.includes(L.key)?10:1,H=v.current,M=T[H],P=i*N*D;_(M+P,H,{commit:!0})}}})})})})});Mv.displayName=Oo;var[Dv,Nv]=Ov(Oo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),CA=I.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=I.useState(null),f=rn(t,x=>p(x)),b=I.useRef(void 0),g=nA(o),m=g==="ltr",v=m&&!i||!m&&i;function y(x){const T=b.current||d.getBoundingClientRect(),w=[0,T.width],k=ku(w,v?[n,r]:[r,n]);return b.current=T,k(x-T.left)}return h.jsx(Dv,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:h.jsx(Lv,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const T=y(x.clientX);a?.(T)},onSlideMove:x=>{const T=y(x.clientX);s?.(T)},onSlideEnd:()=>{b.current=void 0,l?.()},onStepKeyDown:x=>{const w=_v[v?"from-left":"from-right"].includes(x.key);c?.({event:x,direction:w?-1:1})}})})}),PA=I.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=I.useRef(null),d=rn(t,u),p=I.useRef(void 0),f=!o;function b(g){const m=p.current||u.current.getBoundingClientRect(),v=[0,m.height],x=ku(v,f?[r,n]:[n,r]);return p.current=m,x(g-m.top)}return h.jsx(Dv,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:h.jsx(Lv,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=b(g.clientY);i?.(m)},onSlideMove:g=>{const m=b(g.clientY);a?.(m)},onSlideEnd:()=>{p.current=void 0,s?.()},onStepKeyDown:g=>{const v=_v[f?"from-bottom":"from-top"].includes(g.key);l?.({event:g,direction:v?-1:1})}})})}),Lv=I.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=bs(Oo,n);return h.jsx(zt.span,{...c,ref:t,onKeyDown:_t(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Av.concat(Iv).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:_t(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:_t(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:_t(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),Fv="SliderTrack",Vv=I.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=bs(Fv,n);return h.jsx(zt.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Vv.displayName=Fv;var Tu="SliderRange",$v=I.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=bs(Tu,n),i=Nv(Tu,n),a=I.useRef(null),s=rn(t,a),l=o.values.length,c=o.values.map(p=>Bv(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return h.jsx(zt.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});$v.displayName=Tu;var Eu="SliderThumb",jv=I.forwardRef((e,t)=>{const n=TA(e.__scopeSlider),[r,o]=I.useState(null),i=rn(t,s=>o(s)),a=I.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return h.jsx(AA,{...e,ref:i,index:a})}),AA=I.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=bs(Eu,n),s=Nv(Eu,n),[l,c]=I.useState(null),u=rn(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=hA(l),f=a.values[r],b=f===void 0?0:Bv(f,a.min,a.max),g=OA(r,a.values.length),m=p?.[s.size],v=m?DA(m,b,s.direction):0;return I.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),h.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${b}% + ${v}px)`},children:[h.jsx(Su.ItemSlot,{scope:e.__scopeSlider,children:h.jsx(zt.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:_t(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&h.jsx(zv,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});jv.displayName=Eu;var IA="RadioBubbleInput",zv=I.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=I.useRef(null),i=rn(o,r),a=pA(t);return I.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),h.jsx(zt.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});zv.displayName=IA;function _A(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function Bv(e,t,n){const i=100/(n-t)*(e-t);return wv(i,[0,100])}function OA(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function MA(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 DA(e,t,n){const r=e/2,i=ku([0,50],[0,r]);return(r-i(t)*n)*n}function NA(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function LA(e,t){if(t>0){const n=NA(e);return Math.min(...n)>=t}return!0}function ku(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 FA(e){return(String(e).split(".")[1]||"").length}function VA(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var $A=Mv,jA=Vv,zA=$v,BA=jv,Cu="ToastProvider",[Pu,RA,HA]=dv("Toast"),[Rv,p3]=gs("Toast",[HA]),[WA,xs]=Rv(Cu),Hv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=I.useState(null),[c,u]=I.useState(0),d=I.useRef(!1),p=I.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Cu}\`. Expected non-empty \`string\`.`),h.jsx(Pu.Provider,{scope:t,children:h.jsx(WA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:I.useCallback(()=>u(f=>f+1),[]),onToastRemove:I.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Hv.displayName=Cu;var Wv="ToastViewport",qA=["F8"],Au="toast.viewportPause",Iu="toast.viewportResume",qv=I.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=qA,label:o="Notifications ({hotkey})",...i}=e,a=xs(Wv,n),s=RA(n),l=I.useRef(null),c=I.useRef(null),u=I.useRef(null),d=I.useRef(null),p=rn(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;I.useEffect(()=>{const m=v=>{r.length!==0&&r.every(x=>v[x]||v.code===x)&&d.current?.focus()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),I.useEffect(()=>{const m=l.current,v=d.current;if(b&&m&&v){const y=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Au);v.dispatchEvent(E),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(Iu);v.dispatchEvent(E),a.isClosePausedRef.current=!1}},T=E=>{!m.contains(E.relatedTarget)&&x()},w=()=>{m.contains(document.activeElement)||x()};return m.addEventListener("focusin",y),m.addEventListener("focusout",T),m.addEventListener("pointermove",y),m.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{m.removeEventListener("focusin",y),m.removeEventListener("focusout",T),m.removeEventListener("pointermove",y),m.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[b,a.isClosePausedRef]);const g=I.useCallback(({tabbingDirection:m})=>{const y=s().map(x=>{const T=x.ref.current,w=[T,...iI(T)];return m==="forwards"?w:w.reverse()});return(m==="forwards"?y.reverse():y).flat()},[s]);return I.useEffect(()=>{const m=d.current;if(m){const v=y=>{const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const w=document.activeElement,E=y.shiftKey;if(y.target===m&&E){c.current?.focus();return}const O=g({tabbingDirection:E?"backwards":"forwards"}),_=O.findIndex(L=>L===w);Mu(O.slice(_+1))?y.preventDefault():E?c.current?.focus():u.current?.focus()}};return m.addEventListener("keydown",v),()=>m.removeEventListener("keydown",v)}},[s,g]),h.jsxs(dA,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&h.jsx(_u,{ref:c,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"forwards"});Mu(m)}}),h.jsx(Pu.Slot,{scope:n,children:h.jsx(zt.ol,{tabIndex:-1,...i,ref:p})}),b&&h.jsx(_u,{ref:u,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"backwards"});Mu(m)}})]})});qv.displayName=Wv;var Uv="ToastFocusProxy",_u=I.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=xs(Uv,n);return h.jsx(yu,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&r()}})});_u.displayName=Uv;var Ni="Toast",UA="toast.swipeStart",YA="toast.swipeMove",KA="toast.swipeCancel",GA="toast.swipeEnd",Yv=I.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=fv({prop:r,defaultProp:o??!0,onChange:i,caller:Ni});return h.jsx(pv,{present:n||s,children:h.jsx(QA,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Wr(e.onPause),onResume:Wr(e.onResume),onSwipeStart:_t(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_t(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:_t(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:_t(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)})})})});Yv.displayName=Ni;var[ZA,XA]=Rv(Ni,{onClose(){}}),QA=I.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...b}=e,g=xs(Ni,n),[m,v]=I.useState(null),y=rn(t,A=>v(A)),x=I.useRef(null),T=I.useRef(null),w=o||g.duration,E=I.useRef(0),k=I.useRef(w),C=I.useRef(0),{onToastAdd:O,onToastRemove:_}=g,L=Wr(()=>{m?.contains(document.activeElement)&&g.viewport?.focus(),a()}),D=I.useCallback(A=>{!A||A===1/0||(window.clearTimeout(C.current),E.current=new Date().getTime(),C.current=window.setTimeout(L,A))},[L]);I.useEffect(()=>{const A=g.viewport;if(A){const N=()=>{D(k.current),c?.()},H=()=>{const M=new Date().getTime()-E.current;k.current=k.current-M,window.clearTimeout(C.current),l?.()};return A.addEventListener(Au,H),A.addEventListener(Iu,N),()=>{A.removeEventListener(Au,H),A.removeEventListener(Iu,N)}}},[g.viewport,w,l,c,D]),I.useEffect(()=>{i&&!g.isClosePausedRef.current&&D(w)},[i,w,g.isClosePausedRef,D]),I.useEffect(()=>(O(),()=>_()),[O,_]);const z=I.useMemo(()=>m?Jv(m):null,[m]);return g.viewport?h.jsxs(h.Fragment,{children:[z&&h.jsx(JA,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),h.jsx(ZA,{scope:n,onClose:L,children:vi.createPortal(h.jsx(Pu.ItemSlot,{scope:n,children:h.jsx(uA,{asChild:!0,onEscapeKeyDown:_t(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||L(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:h.jsx(zt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_t(e.onKeyDown,A=>{A.key==="Escape"&&(s?.(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:_t(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:_t(e.onPointerMove,A=>{if(!x.current)return;const N=A.clientX-x.current.x,H=A.clientY-x.current.y,M=!!T.current,P=["left","right"].includes(g.swipeDirection),$=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,F=P?$(0,N):0,U=P?0:$(0,H),G=A.pointerType==="touch"?10:2,B={x:F,y:U},Z={originalEvent:A,delta:B};M?(T.current=B,ws(YA,d,Z,{discrete:!1})):ey(B,g.swipeDirection,G)?(T.current=B,ws(UA,u,Z,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(N)>G||Math.abs(H)>G)&&(x.current=null)}),onPointerUp:_t(e.onPointerUp,A=>{const N=T.current,H=A.target;if(H.hasPointerCapture(A.pointerId)&&H.releasePointerCapture(A.pointerId),T.current=null,x.current=null,N){const M=A.currentTarget,P={originalEvent:A,delta:N};ey(N,g.swipeDirection,g.swipeThreshold)?ws(GA,f,P,{discrete:!0}):ws(KA,p,P,{discrete:!0}),M.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),JA=e=>{const{__scopeToast:t,children:n,...r}=e,o=xs(Ni,t),[i,a]=I.useState(!1),[s,l]=I.useState(!1);return rI(()=>a(!0)),I.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:h.jsx(xv,{asChild:!0,children:h.jsx(yu,{...r,children:i&&h.jsxs(h.Fragment,{children:[o.label," ",n]})})})},eI="ToastTitle",Kv=I.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return h.jsx(zt.div,{...r,ref:t})});Kv.displayName=eI;var tI="ToastDescription",Gv=I.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return h.jsx(zt.div,{...r,ref:t})});Gv.displayName=tI;var Zv="ToastAction",nI=I.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?h.jsx(Qv,{altText:n,asChild:!0,children:h.jsx(Ou,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Zv}\`. Expected non-empty \`string\`.`),null)});nI.displayName=Zv;var Xv="ToastClose",Ou=I.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=XA(Xv,n);return h.jsx(Qv,{asChild:!0,children:h.jsx(zt.button,{type:"button",...r,ref:t,onClick:_t(e.onClick,o.onClose)})})});Ou.displayName=Xv;var Qv=I.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return h.jsx(zt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Jv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),oI(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Jv(r))}}),t}function ws(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?uv(o,i):o.dispatchEvent(i)}var ey=(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 rI(e=()=>{}){const t=Wr(e);_o(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function oI(e){return e.nodeType===e.ELEMENT_NODE}function iI(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 Mu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var aI=Hv,sI=qv,lI=Yv,cI=Kv,uI=Gv,dI=Ou;const fI=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));je.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(je.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),h.jsx(vu,{title:"",ref:r,as:BA,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})},pI=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Ao()),s=r||o||[];return h.jsxs($A,{...i,defaultValue:r,value:o,className:Se("relative flex h-5 w-full touch-none select-none items-center",n),children:[h.jsx(jA,{className:"relative h-2 rounded-full grow bg-background",children:h.jsx(zA,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>h.jsx(fI,{tooltip:t??!1},`${a.current}-${c}`))]})},br=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},hI=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=S.useId(),[s,l]=S.useState(o.checked??!1),c=s,u=S.useRef(null),d=br(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},b=u.current;return b.addEventListener("change",f),()=>b?.removeEventListener("change",f)}},[]);const p=()=>{const f=!u.current?.checked;l(f),o?.onCheck?.(f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return h.jsxs("fieldset",{className:Se("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[h.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[h.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),h.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-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:h.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"})}),h.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:h.jsx("span",{className:"font-medium text-foreground",children:e})})]}),h.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Li=S.createContext({});function xn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Du=typeof window<"u",Ss=Du?S.useLayoutEffect:S.useEffect,Ts=S.createContext(null);function Nu(e,t){e.indexOf(t)===-1&&e.push(t)}function Es(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function mI([...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 nr=(e,t,n)=>n>t?t:n<e?e:n;let Mo=()=>{},on=()=>{};process.env.NODE_ENV!=="production"&&(Mo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},on=(e,t)=>{if(!e)throw new Error(t)});const rr={},ty=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ny(e){return typeof e=="object"&&e!==null}const ry=e=>/^0[^.\s]+$/u.test(e);function Lu(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,gI=(e,t)=>n=>t(e(n)),Fi=(...e)=>e.reduce(gI),Do=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fu{constructor(){this.subscriptions=[]}add(t){return Nu(this.subscriptions,t),()=>Es(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 a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const fn=e=>e*1e3,Vn=e=>e/1e3;function oy(e,t){return t?e*(1e3/t):0}const iy=new Set;function Vu(e,t,n){e||iy.has(t)||(console.warn(t),iy.add(t))}const vI=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},ay=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,yI=1e-7,bI=12;function xI(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=ay(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>yI&&++s<bI);return a}function Vi(e,t,n,r){if(e===t&&n===r)return dn;const o=i=>xI(i,0,1,e,n);return i=>i===0||i===1?i:ay(o(i),t,r)}const sy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ly=e=>t=>1-e(1-t),cy=Vi(.33,1.53,.69,.99),$u=ly(cy),uy=sy($u),dy=e=>(e*=2)<1?.5*$u(e):.5*(2-Math.pow(2,-10*(e-1))),ju=e=>1-Math.sin(Math.acos(e)),fy=ly(ju),py=sy(ju),wI=Vi(.42,0,1,1),SI=Vi(0,0,.58,1),hy=Vi(.42,0,.58,1),my=e=>Array.isArray(e)&&typeof e[0]!="number";function gy(e,t){return my(e)?e[vI(0,e.length,t)]:e}const vy=e=>Array.isArray(e)&&typeof e[0]=="number",yy={linear:dn,easeIn:wI,easeInOut:hy,easeOut:SI,circIn:ju,circInOut:py,circOut:fy,backIn:$u,backInOut:uy,backOut:cy,anticipate:dy},TI=e=>typeof e=="string",zu=e=>{if(vy(e)){on(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Vi(t,n,r,o)}else if(TI(e))return on(yy[e]!==void 0,`Invalid easing type '${e}'`),yy[e];return e},ks=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function EI(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,p=!1)=>{const b=p&&o?n:r;return d&&a.add(u),b.has(u)||b.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=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 kI=40;function by(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ks.reduce((x,T)=>(x[T]=EI(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:p,render:f,postRender:b}=a,g=()=>{const x=rr.useManualTiming?o.timestamp:performance.now();n=!1,rr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,kI),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),f.process(o),b.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},m=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:ks.reduce((x,T)=>{const w=a[T];return x[T]=(E,k=!1,C=!1)=>(n||m(),w.schedule(E,k,C)),x},{}),cancel:x=>{for(let T=0;T<ks.length;T++)a[ks[T]].cancel(x)},state:o,steps:a}}const{schedule:ct,cancel:or,state:Bt,steps:Bu}=by(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0);let Cs;function CI(){Cs=void 0}const Qt={now:()=>(Cs===void 0&&Qt.set(Bt.isProcessing||rr.useManualTiming?Bt.timestamp:performance.now()),Cs),set:e=>{Cs=e,queueMicrotask(CI)}},xy=e=>t=>typeof t=="string"&&t.startsWith(e),Ru=xy("--"),PI=xy("var(--"),Hu=e=>PI(e)?AI.test(e.split("/*")[0].trim()):!1,AI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,No={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$i={...No,transform:e=>nr(0,1,e)},Ps={...No,default:1},ji=e=>Math.round(e*1e5)/1e5,Wu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function II(e){return e==null}const _I=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qu=(e,t)=>n=>!!(typeof n=="string"&&_I.test(n)&&n.startsWith(e)||t&&!II(n)&&Object.prototype.hasOwnProperty.call(n,t)),wy=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Wu);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},OI=e=>nr(0,255,e),Uu={...No,transform:e=>Math.round(OI(e))},Ur={test:qu("rgb","red"),parse:wy("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Uu.transform(e)+", "+Uu.transform(t)+", "+Uu.transform(n)+", "+ji($i.transform(r))+")"};function MI(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 Yu={test:qu("#"),parse:MI,transform:Ur.transform},zi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xr=zi("deg"),$n=zi("%"),Ee=zi("px"),DI=zi("vh"),NI=zi("vw"),Sy={...$n,parse:e=>$n.parse(e)/100,transform:e=>$n.transform(e*100)},Lo={test:qu("hsl","hue"),parse:wy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$n.transform(ji(t))+", "+$n.transform(ji(n))+", "+ji($i.transform(r))+")"},Pt={test:e=>Ur.test(e)||Yu.test(e)||Lo.test(e),parse:e=>Ur.test(e)?Ur.parse(e):Lo.test(e)?Lo.parse(e):Yu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ur.transform(e):Lo.transform(e),getAnimatableNone:e=>{const t=Pt.parse(e);return t.alpha=0,Pt.transform(t)}},LI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function FI(e){return isNaN(e)&&typeof e=="string"&&(e.match(Wu)?.length||0)+(e.match(LI)?.length||0)>0}const Ty="number",Ey="color",VI="var",$I="var(",ky="${}",jI=/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 Bi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(jI,l=>(Pt.test(l)?(r.color.push(i),o.push(Ey),n.push(Pt.parse(l))):l.startsWith($I)?(r.var.push(i),o.push(VI),n.push(l)):(r.number.push(i),o.push(Ty),n.push(parseFloat(l))),++i,ky)).split(ky);return{values:n,split:s,indexes:r,types:o}}function Cy(e){return Bi(e).values}function Py(e){const{split:t,types:n}=Bi(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===Ty?i+=ji(o[a]):s===Ey?i+=Pt.transform(o[a]):i+=o[a]}return i}}const zI=e=>typeof e=="number"?0:Pt.test(e)?Pt.getAnimatableNone(e):e;function BI(e){const t=Cy(e);return Py(e)(t.map(zI))}const wr={test:FI,parse:Cy,createTransformer:Py,getAnimatableNone:BI};function Ku(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 RI({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=Ku(l,s,e+1/3),i=Ku(l,s,e),a=Ku(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function As(e,t){return n=>n>0?t:e}const ut=(e,t,n)=>e+(t-e)*n,Gu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},HI=[Yu,Ur,Lo],WI=e=>HI.find(t=>t.test(e));function Ay(e){const t=WI(e);if(Mo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Lo&&(n=RI(n)),n}const Iy=(e,t)=>{const n=Ay(e),r=Ay(t);if(!n||!r)return As(e,t);const o={...n};return i=>(o.red=Gu(n.red,r.red,i),o.green=Gu(n.green,r.green,i),o.blue=Gu(n.blue,r.blue,i),o.alpha=ut(n.alpha,r.alpha,i),Ur.transform(o))},Zu=new Set(["none","hidden"]);function qI(e,t){return Zu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function UI(e,t){return n=>ut(e,t,n)}function Xu(e){return typeof e=="number"?UI:typeof e=="string"?Hu(e)?As:Pt.test(e)?Iy:GI:Array.isArray(e)?_y:typeof e=="object"?Pt.test(e)?Iy:YI:As}function _y(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Xu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function YI(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Xu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function KI(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],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}const GI=(e,t)=>{const n=wr.createTransformer(t),r=Bi(e),o=Bi(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?Zu.has(e)&&!o.values.length||Zu.has(t)&&!r.values.length?qI(e,t):Fi(_y(KI(r,o),o.values),n):(Mo(!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.`),As(e,t))};function Oy(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ut(e,t,n):Xu(e)(e,t)}const ZI=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ct.update(t,n),stop:()=>or(t),now:()=>Bt.isProcessing?Bt.timestamp:Qt.now()}},My=(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)})`},Is=2e4;function Qu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Is;)t+=n,r=e.next(t);return t>=Is?1/0:t}function Dy(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Qu(r),Is);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Vn(o)}}const XI=5;function Ny(e,t,n){const r=Math.max(t-XI,0);return oy(n-e(r),t-r)}const mt={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},Ju=.001;function QI({duration:e=mt.duration,bounce:t=mt.bounce,velocity:n=mt.velocity,mass:r=mt.mass}){let o,i;Mo(e<=fn(mt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=nr(mt.minDamping,mt.maxDamping,a),e=nr(mt.minDuration,mt.maxDuration,Vn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=ed(c,a),b=Math.exp(-d);return Ju-p/f*b},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,b=Math.exp(-d),g=ed(Math.pow(c,2),a);return(-o(c)+Ju>0?-1:1)*((p-f)*b)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Ju+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=e_(o,i,s);if(e=fn(e),isNaN(l))return{stiffness:mt.stiffness,damping:mt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const JI=12;function e_(e,t,n){let r=n;for(let o=1;o<JI;o++)r=r-e(r)/t(r);return r}function ed(e,t){return e*Math.sqrt(1-t*t)}const t_=["duration","bounce"],n_=["stiffness","damping","mass"];function Ly(e,t){return t.some(n=>e[n]!==void 0)}function r_(e){let t={velocity:mt.velocity,stiffness:mt.stiffness,damping:mt.damping,mass:mt.mass,isResolvedFromDuration:!1,...e};if(!Ly(e,n_)&&Ly(e,t_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*nr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:mt.mass,stiffness:o,damping:i}}else{const n=QI(e);t={...t,...n,mass:mt.mass},t.isResolvedFromDuration=!0}return t}function Ri(e=mt.visualDuration,t=mt.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],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=r_({...n,velocity:-Vn(n.velocity||0)}),b=p||0,g=c/(2*Math.sqrt(l*u)),m=a-i,v=Vn(Math.sqrt(l/u)),y=Math.abs(m)<5;r||(r=y?mt.restSpeed.granular:mt.restSpeed.default),o||(o=y?mt.restDelta.granular:mt.restDelta.default);let x;if(g<1){const w=ed(v,g);x=E=>{const k=Math.exp(-g*v*E);return a-k*((b+g*v*m)/w*Math.sin(w*E)+m*Math.cos(w*E))}}else if(g===1)x=w=>a-Math.exp(-v*w)*(m+(b+v*m)*w);else{const w=v*Math.sqrt(g*g-1);x=E=>{const k=Math.exp(-g*v*E),C=Math.min(w*E,300);return a-k*((b+g*v*m)*Math.sinh(C)+w*m*Math.cosh(C))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const E=x(w);if(f)s.done=w>=d;else{let k=w===0?b:0;g<1&&(k=w===0?fn(b):Ny(x,w,E));const C=Math.abs(k)<=r,O=Math.abs(a-E)<=o;s.done=C&&O}return s.value=s.done?a:E,s},toString:()=>{const w=Math.min(Qu(T),Is),E=My(k=>T.next(w*k).value,w,30);return w+"ms "+E},toTransition:()=>{}};return T}Ri.applyToOptions=e=>{const t=Dy(e,100,Ri);return e.ease=t.ease,e.duration=fn(t.duration),e.type="keyframes",e};function td({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=C=>s!==void 0&&C<s||l!==void 0&&C>l,b=C=>s===void 0?l:l===void 0||Math.abs(s-C)<Math.abs(l-C)?s:l;let g=n*t;const m=d+g,v=a===void 0?m:a(m);v!==m&&(g=v-d);const y=C=>-g*Math.exp(-C/r),x=C=>v+y(C),T=C=>{const O=y(C),_=x(C);p.done=Math.abs(O)<=c,p.value=p.done?v:_};let w,E;const k=C=>{f(p.value)&&(w=C,E=Ri({keyframes:[p.value,b(p.value)],velocity:Ny(x,C,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let O=!1;return!E&&w===void 0&&(O=!0,T(C),k(C)),w!==void 0&&C>=w?E.next(C-w):(!O&&T(C),p)}}}function o_(e,t,n){const r=[],o=n||rr.mix||Oy,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||dn:t;s=Fi(l,s)}r.push(s)}return r}function Fy(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(on(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=o_(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=Do(e[d],e[d+1],u);return s[d](p)};return n?u=>c(nr(e[0],e[i-1],u)):c}function Vy(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Do(0,t,r);e.push(ut(n,1,o))}}function $y(e){const t=[0];return Vy(t,e.length-1),t}function i_(e,t){return e.map(n=>n*t)}function a_(e,t){return e.map(()=>t||hy).splice(0,e.length-1)}function Fo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=my(r)?r.map(zu):zu(r),i={done:!1,value:t[0]},a=i_(n&&n.length===t.length?n:$y(t),e),s=Fy(a,t,{ease:Array.isArray(o)?o:a_(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const s_=e=>e!==null;function nd(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(s_),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const l_={decay:td,inertia:td,tween:Fo,keyframes:Fo,spring:Ri};function jy(e){typeof e.type=="string"&&(e.type=l_[e.type])}class rd{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 c_=e=>e/100;class od extends rd{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!==Qt.now()&&this.tick(Qt.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;jy(t);const{type:n=Fo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||Fo;process.env.NODE_ENV!=="production"&&l!==Fo&&on(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),l!==Fo&&typeof s[0]!="number"&&(this.mixKeyframes=Fi(c_,Oy(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Qu(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:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:p,repeatDelay:f,type:b,onUpdate:g,finalKeyframe:m}=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),y=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,T=r;if(d){const C=Math.min(this.currentTime,o)/s;let O=Math.floor(C),_=C%1;!_&&C>=1&&(_=1),_===1&&O--,O=Math.min(O,d+1),!!(O%2)&&(p==="reverse"?(_=1-_,f&&(_-=f/s)):p==="mirror"&&(T=a)),x=nr(0,1,_)*s}const w=y?{done:!1,value:u[0]}:T.next(x);i&&(w.value=i(w.value));let{done:E}=w;!y&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&b!==td&&(w.value=nd(u,this.options,m,this.speed)),g&&g(w.value),k&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return Vn(this.calculatedDuration)}get time(){return Vn(this.currentTime)}set time(t){t=fn(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(Qt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Vn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ZI,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(Qt.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 u_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Yr=e=>e*180/Math.PI,id=e=>{const t=Yr(Math.atan2(e[1],e[0]));return ad(t)},d_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:id,rotateZ:id,skewX:e=>Yr(Math.atan(e[1])),skewY:e=>Yr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ad=e=>(e=e%360,e<0&&(e+=360),e),zy=id,By=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ry=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),f_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:By,scaleY:Ry,scale:e=>(By(e)+Ry(e))/2,rotateX:e=>ad(Yr(Math.atan2(e[6],e[5]))),rotateY:e=>ad(Yr(Math.atan2(-e[2],e[0]))),rotateZ:zy,rotate:zy,skewX:e=>Yr(Math.atan(e[4])),skewY:e=>Yr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sd(e){return e.includes("scale")?1:0}function ld(e,t){if(!e||e==="none")return sd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=f_,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=d_,o=s}if(!o)return sd(t);const i=r[t],a=o[1].split(",").map(h_);return typeof i=="function"?i(a):a[i]}const p_=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ld(n,t)};function h_(e){return parseFloat(e.trim())}const Vo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$o=new Set(Vo),Hy=e=>e===No||e===Ee,m_=new Set(["x","y","z"]),g_=Vo.filter(e=>!m_.has(e));function v_(e){const t=[];return g_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Kr={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})=>ld(t,"x"),y:(e,{transform:t})=>ld(t,"y")};Kr.translateX=Kr.x,Kr.translateY=Kr.y;const Gr=new Set;let cd=!1,ud=!1,dd=!1;function Wy(){if(ud){const e=Array.from(Gr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=v_(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,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ud=!1,cd=!1,Gr.forEach(e=>e.complete(dd)),Gr.clear()}function qy(){Gr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ud=!0)})}function y_(){dd=!0,qy(),Wy(),dd=!1}class fd{constructor(t,n,r,o,i,a=!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=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Gr.add(this),cd||(cd=!0,ct.read(qy),ct.resolveKeyframes(Wy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}u_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Gr.delete(this)}cancel(){this.state==="scheduled"&&(Gr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const b_=e=>e.startsWith("--");function x_(e,t,n){b_(t)?e.style.setProperty(t,n):e.style[t]=n}const w_=Lu(()=>window.ScrollTimeline!==void 0),S_={};function T_(e,t){const n=Lu(e);return()=>S_[t]??n()}const Uy=T_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Yy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hi([0,.65,.55,1]),circOut:Hi([.55,0,1,.45]),backIn:Hi([.31,.01,.66,-.59]),backOut:Hi([.33,1.53,.69,.99])};function Ky(e,t){if(e)return typeof e=="function"?Uy()?My(e,t):"ease-out":vy(e)?Hi(e):Array.isArray(e)?e.map(n=>Ky(n,t)||Yy.easeOut):Yy[e]}function E_(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Ky(s,o);Array.isArray(d)&&(u.easing=d);const p={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),e.animate(u,p)}function pd(e){return typeof e=="function"&&"applyToOptions"in e}function k_({type:e,...t}){return pd(e)&&Uy()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class C_ extends rd{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,on(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=k_(t);this.animation=E_(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=nd(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):x_(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(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 Vn(Number(t))}get time(){return Vn(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=fn(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&w_()?(this.animation.timeline=t,dn):n(this)}}const Gy={anticipate:dy,backInOut:uy,circInOut:py};function P_(e){return e in Gy}function A_(e){typeof e.ease=="string"&&P_(e.ease)&&(e.ease=Gy[e.ease])}const Zy=10;class I_ extends C_{constructor(t){A_(t),jy(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new od({...a,autoplay:!1}),l=fn(this.finishedTime??this.time);n.setWithVelocity(s.sample(l-Zy).value,s.sample(l).value,Zy),s.stop()}}const Xy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(wr.test(e)||e==="0")&&!e.startsWith("url("));function __(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 O_(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],a=Xy(o,t),s=Xy(i,t);return Mo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:__(e)||(n==="spring"||pd(n))&&r}function hd(e){return ny(e)&&"offsetHeight"in e}const M_=new Set(["opacity","clipPath","filter","transform"]),D_=Lu(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function N_(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!hd(t?.owner?.current))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return D_()&&n&&M_.has(n)&&(n!=="transform"||!l)&&!s&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const L_=40;class F_ extends rd{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Qt.now();const p={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},f=u?.KeyframeResolver||fd;this.keyframeResolver=new f(s,(b,g,m)=>this.onKeyframesResolved(b,g,p,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Qt.now(),O_(t,i,a,s)||((rr.instantAnimations||!l)&&u?.(nd(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const p={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>L_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!c&&N_(p)?new I_({...p,element:p.motionValue.owner.current}):new od(p);f.finished.then(()=>this.notifyFinished()).catch(dn),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}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(),y_()),this._animation}get duration(){return this.animation.duration}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 V_{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(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class $_ extends V_{then(t,n){return this.finished.finally(t).then(()=>{})}}const j_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function z_(e){const t=j_.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const B_=4;function Qy(e,t,n=1){on(n<=B_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=z_(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return ty(a)?parseFloat(a):a}return Hu(o)?Qy(o,t,n+1):o}function md(e,t){return e?.[t]??e?.default??e}const Jy=new Set(["width","height","top","left","right","bottom",...Vo]),R_={test:e=>e==="auto",parse:e=>e},eb=e=>t=>t.test(e),tb=[No,Ee,$n,xr,NI,DI,R_],nb=e=>tb.find(eb(e));function H_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ry(e):!0}const W_=new Set(["brightness","contrast","saturate","opacity"]);function q_(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Wu)||[];if(!r)return e;const o=n.replace(r,"");let i=W_.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const U_=/\b([a-z-]*)\(.*?\)/gu,gd={...wr,getAnimatableNone:e=>{const t=e.match(U_);return t?t.map(q_).join(" "):e}},rb={...No,transform:Math.round},vd={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:xr,rotateX:xr,rotateY:xr,rotateZ:xr,scale:Ps,scaleX:Ps,scaleY:Ps,scaleZ:Ps,skew:xr,skewX:xr,skewY:xr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:$i,originX:Sy,originY:Sy,originZ:Ee},zIndex:rb,fillOpacity:$i,strokeOpacity:$i,numOctaves:rb},Y_={...vd,color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:gd,WebkitFilter:gd},ob=e=>Y_[e];function ib(e,t){let n=ob(e);return n!==gd&&(n=wr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const K_=new Set(["auto","none","0"]);function G_(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!K_.has(i)&&Bi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=ib(n,o)}class Z_ extends fd{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 l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Hu(c))){const u=Qy(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Jy.has(r)||t.length!==2)return;const[o,i]=t,a=nb(o),s=nb(i);if(a!==s)if(Hy(a)&&Hy(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Kr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||H_(t[o]))&&r.push(o);r.length&&G_(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=Kr[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,a=r[i];r[i]=Kr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}function ab(e,t,n){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)}const sb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,lb=30,X_=e=>!isNaN(parseFloat(e)),Wi={current:void 0};class Q_{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Qt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty();o&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=X_(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Vu(!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 Fu);const r=this.events[t].add(n);return t==="change"?()=>{r(),ct.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}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 Wi.current&&Wi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Qt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>lb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,lb);return oy(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 Zr(e,t){return new Q_(e,t)}const{schedule:yd}=by(queueMicrotask,!1),wn={x:!1,y:!1};function cb(){return wn.x||wn.y}function J_(e){return e==="x"||e==="y"?wn[e]?null:(wn[e]=!0,()=>{wn[e]=!1}):wn.x||wn.y?null:(wn.x=wn.y=!0,()=>{wn.x=wn.y=!1})}function ub(e,t){const n=ab(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function db(e){return!(e.pointerType==="touch"||cb())}function eO(e,t,n={}){const[r,o,i]=ub(e,n),a=s=>{if(!db(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{db(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const fb=(e,t)=>t?e===t?!0:fb(e,t.parentElement):!1,bd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,tO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function nO(e){return tO.has(e.tagName)||e.tabIndex!==-1}const _s=new WeakSet;function pb(e){return t=>{t.key==="Enter"&&e(t)}}function xd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const rO=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=pb(()=>{if(_s.has(n))return;xd(n,"down");const o=pb(()=>{xd(n,"up")}),i=()=>xd(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 hb(e){return bd(e)&&!cb()}function oO(e,t,n={}){const[r,o,i]=ub(e,n),a=s=>{const l=s.currentTarget;if(!hb(s))return;_s.add(l);const c=t(l,s),u=(f,b)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),_s.has(l)&&_s.delete(l),hb(f)&&typeof c=="function"&&c(f,{success:b})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||fb(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),hd(s)&&(s.addEventListener("focus",c=>rO(c,o)),!nO(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function wd(e){return ny(e)&&"ownerSVGElement"in e}function mb(e){return wd(e)&&e.tagName==="svg"}function iO(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=Fy(o,i,a);return t?s(r):s}const Ot=e=>!!(e&&e.getVelocity),aO=[...tb,Pt,wr],sO=e=>aO.find(eb(e)),jo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class lO extends I.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=hd(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function cO({children:e,isPresent:t,anchorX:n}){const r=S.useId(),o=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(jo);return S.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
183
- [data-motion-pop-id="${r}"] {
9
+ Defaulting to \`null\`.`}var eI=Nv,tI=Lv,zv=["PageUp","PageDown"],Bv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Rv={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Oo="Slider",[Eu,nI,rI]=Tv(Oo),[Hv,Y4]=Ss(Oo,[rI]),[oI,ks]=Hv(Oo),Wv=O.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:g=!1,form:v,...m}=e,f=O.useRef(new Set),y=O.useRef(0),x=a==="horizontal"?iI:aI,[k=[],T]=Ev({prop:u,defaultProp:c,onChange:D=>{[...f.current][y.current]?.focus(),d(D)}}),P=O.useRef(k);function w(D){const F=dI(k,D);I(D,F)}function E(D){I(D,y.current)}function A(){const D=P.current[y.current];k[y.current]!==D&&h(k)}function I(D,F,{commit:j}={commit:!1}){const _=mI(i),N=gI(Math.round((D-r)/i)*i+r,_),z=Dv(N,[r,o]);T((M=[])=>{const C=cI(M,z,F);if(hI(C,l*i)){y.current=C.indexOf(z);const $=String(C)!==String(M);return $&&j&&h(C),$?C:M}else return M})}return p.jsx(oI,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:f.current,values:k,orientation:a,form:v,children:p.jsx(Eu.Provider,{scope:e.__scopeSlider,children:p.jsx(Eu.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:_t(m.onPointerDown,()=>{s||(P.current=k)}),min:r,max:o,inverted:g,onSlideStart:s?void 0:w,onSlideMove:s?void 0:E,onSlideEnd:s?void 0:A,onHomeKeyDown:()=>!s&&I(r,0,{commit:!0}),onEndKeyDown:()=>!s&&I(o,k.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:F})=>{if(!s){const N=zv.includes(D.key)||D.shiftKey&&Bv.includes(D.key)?10:1,z=y.current,M=k[z],C=i*N*F;I(M+C,z,{commit:!0})}}})})})})});Wv.displayName=Oo;var[qv,Uv]=Hv(Oo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),iI=O.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,h]=O.useState(null),g=rn(t,x=>h(x)),v=O.useRef(void 0),m=FA(o),f=m==="ltr",y=f&&!i||!f&&i;function b(x){const k=v.current||d.getBoundingClientRect(),T=[0,k.width],w=Pu(T,y?[n,r]:[r,n]);return v.current=k,w(x-k.left)}return p.jsx(qv,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:p.jsx(Yv,{dir:m,"data-orientation":"horizontal",...u,ref:g,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const k=b(x.clientX);a?.(k)},onSlideMove:x=>{const k=b(x.clientX);s?.(k)},onSlideEnd:()=>{v.current=void 0,l?.()},onStepKeyDown:x=>{const T=Rv[y?"from-left":"from-right"].includes(x.key);c?.({event:x,direction:T?-1:1})}})})}),aI=O.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=O.useRef(null),d=rn(t,u),h=O.useRef(void 0),g=!o;function v(m){const f=h.current||u.current.getBoundingClientRect(),y=[0,f.height],x=Pu(y,g?[r,n]:[n,r]);return h.current=f,x(m-f.top)}return p.jsx(qv,{scope:e.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:p.jsx(Yv,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const f=v(m.clientY);i?.(f)},onSlideMove:m=>{const f=v(m.clientY);a?.(f)},onSlideEnd:()=>{h.current=void 0,s?.()},onStepKeyDown:m=>{const y=Rv[g?"from-bottom":"from-top"].includes(m.key);l?.({event:m,direction:y?-1:1})}})})}),Yv=O.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=ks(Oo,n);return p.jsx(zt.span,{...c,ref:t,onKeyDown:_t(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):zv.concat(Bv).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:_t(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(h)?h.focus():r(d)}),onPointerMove:_t(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:_t(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),i(d))})})}),Gv="SliderTrack",Kv=O.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ks(Gv,n);return p.jsx(zt.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Kv.displayName=Gv;var ku="SliderRange",Zv=O.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ks(ku,n),i=Uv(ku,n),a=O.useRef(null),s=rn(t,a),l=o.values.length,c=o.values.map(h=>Jv(h,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return p.jsx(zt.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});Zv.displayName=ku;var Cu="SliderThumb",Xv=O.forwardRef((e,t)=>{const n=nI(e.__scopeSlider),[r,o]=O.useState(null),i=rn(t,s=>o(s)),a=O.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return p.jsx(sI,{...e,ref:i,index:a})}),sI=O.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=ks(Cu,n),s=Uv(Cu,n),[l,c]=O.useState(null),u=rn(t,b=>c(b)),d=l?a.form||!!l.closest("form"):!0,h=YA(l),g=a.values[r],v=g===void 0?0:Jv(g,a.min,a.max),m=uI(r,a.values.length),f=h?.[s.size],y=f?fI(f,v,s.direction):0;return O.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${v}% + ${y}px)`},children:[p.jsx(Eu.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(zt.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":g,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:g===void 0?{display:"none"}:e.style,onFocus:_t(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&p.jsx(Qv,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:g},r)]})});Xv.displayName=Cu;var lI="RadioBubbleInput",Qv=O.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=O.useRef(null),i=rn(o,r),a=UA(t);return O.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),p.jsx(zt.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});Qv.displayName=lI;function cI(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function Jv(e,t,n){const i=100/(n-t)*(e-t);return Dv(i,[0,100])}function uI(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function dI(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 fI(e,t,n){const r=e/2,i=Pu([0,50],[0,r]);return(r-i(t)*n)*n}function pI(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function hI(e,t){if(t>0){const n=pI(e);return Math.min(...n)>=t}return!0}function Pu(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 mI(e){return(String(e).split(".")[1]||"").length}function gI(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var vI=Wv,yI=Kv,bI=Zv,xI=Xv,Au="ToastProvider",[Iu,wI,SI]=Tv("Toast"),[ey,G4]=Ss("Toast",[SI]),[TI,Cs]=ey(Au),ty=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=O.useState(null),[c,u]=O.useState(0),d=O.useRef(!1),h=O.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Au}\`. Expected non-empty \`string\`.`),p.jsx(Iu.Provider,{scope:t,children:p.jsx(TI,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:O.useCallback(()=>u(g=>g+1),[]),onToastRemove:O.useCallback(()=>u(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:a})})};ty.displayName=Au;var ny="ToastViewport",EI=["F8"],_u="toast.viewportPause",Ou="toast.viewportResume",ry=O.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=EI,label:o="Notifications ({hotkey})",...i}=e,a=Cs(ny,n),s=wI(n),l=O.useRef(null),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),h=rn(t,d,a.onViewportChange),g=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;O.useEffect(()=>{const f=y=>{r.length!==0&&r.every(x=>y[x]||y.code===x)&&d.current?.focus()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[r]),O.useEffect(()=>{const f=l.current,y=d.current;if(v&&f&&y){const b=()=>{if(!a.isClosePausedRef.current){const P=new CustomEvent(_u);y.dispatchEvent(P),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const P=new CustomEvent(Ou);y.dispatchEvent(P),a.isClosePausedRef.current=!1}},k=P=>{!f.contains(P.relatedTarget)&&x()},T=()=>{f.contains(document.activeElement)||x()};return f.addEventListener("focusin",b),f.addEventListener("focusout",k),f.addEventListener("pointermove",b),f.addEventListener("pointerleave",T),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{f.removeEventListener("focusin",b),f.removeEventListener("focusout",k),f.removeEventListener("pointermove",b),f.removeEventListener("pointerleave",T),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[v,a.isClosePausedRef]);const m=O.useCallback(({tabbingDirection:f})=>{const b=s().map(x=>{const k=x.ref.current,T=[k,...$I(k)];return f==="forwards"?T:T.reverse()});return(f==="forwards"?b.reverse():b).flat()},[s]);return O.useEffect(()=>{const f=d.current;if(f){const y=b=>{const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const T=document.activeElement,P=b.shiftKey;if(b.target===f&&P){c.current?.focus();return}const A=m({tabbingDirection:P?"backwards":"forwards"}),I=A.findIndex(D=>D===T);Nu(A.slice(I+1))?b.preventDefault():P?c.current?.focus():u.current?.focus()}};return f.addEventListener("keydown",y),()=>f.removeEventListener("keydown",y)}},[s,m]),p.jsxs(WA,{ref:l,role:"region","aria-label":o.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&p.jsx(Mu,{ref:c,onFocusFromOutsideViewport:()=>{const f=m({tabbingDirection:"forwards"});Nu(f)}}),p.jsx(Iu.Slot,{scope:n,children:p.jsx(zt.ol,{tabIndex:-1,...i,ref:h})}),v&&p.jsx(Mu,{ref:u,onFocusFromOutsideViewport:()=>{const f=m({tabbingDirection:"backwards"});Nu(f)}})]})});ry.displayName=ny;var oy="ToastFocusProxy",Mu=O.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Cs(oy,n);return p.jsx(xu,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&r()}})});Mu.displayName=oy;var Ni="Toast",kI="toast.swipeStart",CI="toast.swipeMove",PI="toast.swipeCancel",AI="toast.swipeEnd",iy=O.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=Ev({prop:r,defaultProp:o??!0,onChange:i,caller:Ni});return p.jsx(kv,{present:n||s,children:p.jsx(OI,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:qr(e.onPause),onResume:qr(e.onResume),onSwipeStart:_t(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_t(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:_t(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:_t(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)})})})});iy.displayName=Ni;var[II,_I]=ey(Ni,{onClose(){}}),OI=O.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:g,...v}=e,m=Cs(Ni,n),[f,y]=O.useState(null),b=rn(t,_=>y(_)),x=O.useRef(null),k=O.useRef(null),T=o||m.duration,P=O.useRef(0),w=O.useRef(T),E=O.useRef(0),{onToastAdd:A,onToastRemove:I}=m,D=qr(()=>{f?.contains(document.activeElement)&&m.viewport?.focus(),a()}),F=O.useCallback(_=>{!_||_===1/0||(window.clearTimeout(E.current),P.current=new Date().getTime(),E.current=window.setTimeout(D,_))},[D]);O.useEffect(()=>{const _=m.viewport;if(_){const N=()=>{F(w.current),c?.()},z=()=>{const M=new Date().getTime()-P.current;w.current=w.current-M,window.clearTimeout(E.current),l?.()};return _.addEventListener(_u,z),_.addEventListener(Ou,N),()=>{_.removeEventListener(_u,z),_.removeEventListener(Ou,N)}}},[m.viewport,T,l,c,F]),O.useEffect(()=>{i&&!m.isClosePausedRef.current&&F(T)},[i,T,m.isClosePausedRef,F]),O.useEffect(()=>(A(),()=>I()),[A,I]);const j=O.useMemo(()=>f?dy(f):null,[f]);return m.viewport?p.jsxs(p.Fragment,{children:[j&&p.jsx(MI,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:j}),p.jsx(II,{scope:n,onClose:D,children:vi.createPortal(p.jsx(Iu.ItemSlot,{scope:n,children:p.jsx(HA,{asChild:!0,onEscapeKeyDown:_t(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||D(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(zt.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...v,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_t(e.onKeyDown,_=>{_.key==="Escape"&&(s?.(_.nativeEvent),_.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:_t(e.onPointerDown,_=>{_.button===0&&(x.current={x:_.clientX,y:_.clientY})}),onPointerMove:_t(e.onPointerMove,_=>{if(!x.current)return;const N=_.clientX-x.current.x,z=_.clientY-x.current.y,M=!!k.current,C=["left","right"].includes(m.swipeDirection),$=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,L=C?$(0,N):0,q=C?0:$(0,z),Y=_.pointerType==="touch"?10:2,R={x:L,y:q},Z={originalEvent:_,delta:R};M?(k.current=R,Ps(CI,d,Z,{discrete:!1})):fy(R,m.swipeDirection,Y)?(k.current=R,Ps(kI,u,Z,{discrete:!1}),_.target.setPointerCapture(_.pointerId)):(Math.abs(N)>Y||Math.abs(z)>Y)&&(x.current=null)}),onPointerUp:_t(e.onPointerUp,_=>{const N=k.current,z=_.target;if(z.hasPointerCapture(_.pointerId)&&z.releasePointerCapture(_.pointerId),k.current=null,x.current=null,N){const M=_.currentTarget,C={originalEvent:_,delta:N};fy(N,m.swipeDirection,m.swipeThreshold)?Ps(AI,g,C,{discrete:!0}):Ps(PI,h,C,{discrete:!0}),M.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),MI=e=>{const{__scopeToast:t,children:n,...r}=e,o=Cs(Ni,t),[i,a]=O.useState(!1),[s,l]=O.useState(!1);return LI(()=>a(!0)),O.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:p.jsx(Mv,{asChild:!0,children:p.jsx(xu,{...r,children:i&&p.jsxs(p.Fragment,{children:[o.label," ",n]})})})},DI="ToastTitle",ay=O.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(zt.div,{...r,ref:t})});ay.displayName=DI;var NI="ToastDescription",sy=O.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(zt.div,{...r,ref:t})});sy.displayName=NI;var ly="ToastAction",FI=O.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?p.jsx(uy,{altText:n,asChild:!0,children:p.jsx(Du,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ly}\`. Expected non-empty \`string\`.`),null)});FI.displayName=ly;var cy="ToastClose",Du=O.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=_I(cy,n);return p.jsx(uy,{asChild:!0,children:p.jsx(zt.button,{type:"button",...r,ref:t,onClick:_t(e.onClick,o.onClose)})})});Du.displayName=cy;var uy=O.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return p.jsx(zt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function dy(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),VI(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...dy(r))}}),t}function Ps(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?Sv(o,i):o.dispatchEvent(i)}var fy=(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 LI(e=()=>{}){const t=qr(e);_o(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function VI(e){return e.nodeType===e.ELEMENT_NODE}function $I(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 Nu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var jI=ty,zI=ry,BI=iy,RI=ay,HI=sy,WI=Du;const qI=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));je.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(je.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),p.jsx(bu,{title:"",ref:r,as:xI,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})},UI=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Ao()),s=r||o||[];return p.jsxs(vI,{...i,defaultValue:r,value:o,className:ke("relative flex h-5 w-full touch-none select-none items-center",n),children:[p.jsx(yI,{className:"relative h-2 rounded-full grow bg-background",children:p.jsx(bI,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>p.jsx(qI,{tooltip:t??!1},`${a.current}-${c}`))]})},br=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},YI=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=S.useId(),[s,l]=S.useState(o.checked??!1),c=s,u=S.useRef(null),d=br(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const g=m=>{d.current&&d.current(m)},v=u.current;return v.addEventListener("change",g),()=>v?.removeEventListener("change",g)}},[]);const h=()=>{const g=!u.current?.checked;l(g),o?.onCheck?.(g),u.current!==null&&(u.current.checked=g,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return p.jsxs("fieldset",{className:ke("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[p.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[p.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:g=>l(g.target.checked)}),p.jsx("button",{type:"button",role:"switch",onClick:h,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-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:p.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"})}),p.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:p.jsx("span",{className:"font-medium text-foreground",children:e})})]}),p.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Fi=S.createContext({});function bn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const py=typeof window<"u",As=py?S.useLayoutEffect:S.useEffect,Is=S.createContext(null);function Fu(e,t){e.indexOf(t)===-1&&e.push(t)}function Li(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function GI([...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 $n=(e,t,n)=>n>t?t:n<e?e:n;function Lu(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Mo=()=>{},on=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Mo=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Lu(t,n))},on=(e,t,n)=>{if(!e)throw new Error(Lu(t,n))});const rr={},hy=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function my(e){return typeof e=="object"&&e!==null}const gy=e=>/^0[^.\s]+$/u.test(e);function Vu(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,KI=(e,t)=>n=>t(e(n)),Vi=(...e)=>e.reduce(KI),Do=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class $u{constructor(){this.subscriptions=[]}add(t){return Fu(this.subscriptions,t),()=>Li(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 a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xn=e=>e*1e3,fn=e=>e/1e3;function vy(e,t){return t?e*(1e3/t):0}const yy=new Set;function ju(e,t,n){e||yy.has(t)||(console.warn(Lu(t,n)),yy.add(t))}const ZI=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},by=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,XI=1e-7,QI=12;function JI(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=by(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>XI&&++s<QI);return a}function $i(e,t,n,r){if(e===t&&n===r)return dn;const o=i=>JI(i,0,1,e,n);return i=>i===0||i===1?i:by(o(i),t,r)}const xy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wy=e=>t=>1-e(1-t),Sy=$i(.33,1.53,.69,.99),zu=wy(Sy),Ty=xy(zu),Ey=e=>(e*=2)<1?.5*zu(e):.5*(2-Math.pow(2,-10*(e-1))),Bu=e=>1-Math.sin(Math.acos(e)),ky=wy(Bu),Cy=xy(Bu),e_=$i(.42,0,1,1),t_=$i(0,0,.58,1),Py=$i(.42,0,.58,1),Ay=e=>Array.isArray(e)&&typeof e[0]!="number";function Iy(e,t){return Ay(e)?e[ZI(0,e.length,t)]:e}const _y=e=>Array.isArray(e)&&typeof e[0]=="number",Oy={linear:dn,easeIn:e_,easeInOut:Py,easeOut:t_,circIn:Bu,circInOut:Cy,circOut:ky,backIn:zu,backInOut:Ty,backOut:Sy,anticipate:Ey},n_=e=>typeof e=="string",Ru=e=>{if(_y(e)){on(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return $i(t,n,r,o)}else if(n_(e))return on(Oy[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Oy[e];return e},_s=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function r_(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,h=!1)=>{const v=h&&o?n:r;return d&&a.add(u),v.has(u)||v.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=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 o_=40;function My(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=_s.reduce((x,k)=>(x[k]=r_(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:g,postRender:v}=a,m=()=>{const x=rr.useManualTiming?o.timestamp:performance.now();n=!1,rr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,o_),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),g.process(o),v.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},f=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:_s.reduce((x,k)=>{const T=a[k];return x[k]=(P,w=!1,E=!1)=>(n||f(),T.schedule(P,w,E)),x},{}),cancel:x=>{for(let k=0;k<_s.length;k++)a[_s[k]].cancel(x)},state:o,steps:a}}const{schedule:st,cancel:or,state:Bt,steps:Hu}=My(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0);let Os;function i_(){Os=void 0}const Ut={now:()=>(Os===void 0&&Ut.set(Bt.isProcessing||rr.useManualTiming?Bt.timestamp:performance.now()),Os),set:e=>{Os=e,queueMicrotask(i_)}},Dy=e=>t=>typeof t=="string"&&t.startsWith(e),Ny=Dy("--"),a_=Dy("var(--"),Wu=e=>a_(e)?s_.test(e.split("/*")[0].trim()):!1,s_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Fy(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const No={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ji={...No,transform:e=>$n(0,1,e)},Ms={...No,default:1},zi=e=>Math.round(e*1e5)/1e5,qu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function l_(e){return e==null}const c_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Uu=(e,t)=>n=>!!(typeof n=="string"&&c_.test(n)&&n.startsWith(e)||t&&!l_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ly=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(qu);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},u_=e=>$n(0,255,e),Yu={...No,transform:e=>Math.round(u_(e))},Yr={test:Uu("rgb","red"),parse:Ly("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Yu.transform(e)+", "+Yu.transform(t)+", "+Yu.transform(n)+", "+zi(ji.transform(r))+")"};function d_(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 Gu={test:Uu("#"),parse:d_,transform:Yr.transform},Bi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xr=Bi("deg"),jn=Bi("%"),xe=Bi("px"),f_=Bi("vh"),p_=Bi("vw"),Vy={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},Fo={test:Uu("hsl","hue"),parse:Ly("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(zi(t))+", "+jn.transform(zi(n))+", "+zi(ji.transform(r))+")"},Ct={test:e=>Yr.test(e)||Gu.test(e)||Fo.test(e),parse:e=>Yr.test(e)?Yr.parse(e):Fo.test(e)?Fo.parse(e):Gu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Yr.transform(e):Fo.transform(e),getAnimatableNone:e=>{const t=Ct.parse(e);return t.alpha=0,Ct.transform(t)}},h_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function m_(e){return isNaN(e)&&typeof e=="string"&&(e.match(qu)?.length||0)+(e.match(h_)?.length||0)>0}const $y="number",jy="color",g_="var",v_="var(",zy="${}",y_=/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 Ri(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(y_,l=>(Ct.test(l)?(r.color.push(i),o.push(jy),n.push(Ct.parse(l))):l.startsWith(v_)?(r.var.push(i),o.push(g_),n.push(l)):(r.number.push(i),o.push($y),n.push(parseFloat(l))),++i,zy)).split(zy);return{values:n,split:s,indexes:r,types:o}}function By(e){return Ri(e).values}function Ry(e){const{split:t,types:n}=Ri(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===$y?i+=zi(o[a]):s===jy?i+=Ct.transform(o[a]):i+=o[a]}return i}}const b_=e=>typeof e=="number"?0:Ct.test(e)?Ct.getAnimatableNone(e):e;function x_(e){const t=By(e);return Ry(e)(t.map(b_))}const wr={test:m_,parse:By,createTransformer:Ry,getAnimatableNone:x_};function Ku(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 w_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=Ku(l,s,e+1/3),i=Ku(l,s,e),a=Ku(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Ds(e,t){return n=>n>0?t:e}const ct=(e,t,n)=>e+(t-e)*n,Zu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},S_=[Gu,Yr,Fo],T_=e=>S_.find(t=>t.test(e));function Hy(e){const t=T_(e);if(Mo(!!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===Fo&&(n=w_(n)),n}const Wy=(e,t)=>{const n=Hy(e),r=Hy(t);if(!n||!r)return Ds(e,t);const o={...n};return i=>(o.red=Zu(n.red,r.red,i),o.green=Zu(n.green,r.green,i),o.blue=Zu(n.blue,r.blue,i),o.alpha=ct(n.alpha,r.alpha,i),Yr.transform(o))},Xu=new Set(["none","hidden"]);function E_(e,t){return Xu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function k_(e,t){return n=>ct(e,t,n)}function Qu(e){return typeof e=="number"?k_:typeof e=="string"?Wu(e)?Ds:Ct.test(e)?Wy:A_:Array.isArray(e)?qy:typeof e=="object"?Ct.test(e)?Wy:C_:Ds}function qy(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Qu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function C_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Qu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function P_(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],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}const A_=(e,t)=>{const n=wr.createTransformer(t),r=Ri(e),o=Ri(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?Xu.has(e)&&!o.values.length||Xu.has(t)&&!r.values.length?E_(e,t):Vi(qy(P_(r,o),o.values),n):(Mo(!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"),Ds(e,t))};function Uy(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ct(e,t,n):Qu(e)(e,t)}const I_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>st.update(t,n),stop:()=>or(t),now:()=>Bt.isProcessing?Bt.timestamp:Ut.now()}},Yy=(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)})`},Ns=2e4;function Ju(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ns;)t+=n,r=e.next(t);return t>=Ns?1/0:t}function Gy(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Ju(r),Ns);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:fn(o)}}const __=5;function Ky(e,t,n){const r=Math.max(t-__,0);return vy(n-e(r),t-r)}const gt={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},ed=.001;function O_({duration:e=gt.duration,bounce:t=gt.bounce,velocity:n=gt.velocity,mass:r=gt.mass}){let o,i;Mo(e<=xn(gt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=$n(gt.minDamping,gt.maxDamping,a),e=$n(gt.minDuration,gt.maxDuration,fn(e)),a<1?(o=c=>{const u=c*a,d=u*e,h=u-n,g=td(c,a),v=Math.exp(-d);return ed-h/g*v},i=c=>{const d=c*a*e,h=d*n+n,g=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),m=td(Math.pow(c,2),a);return(-o(c)+ed>0?-1:1)*((h-g)*v)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-ed+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=D_(o,i,s);if(e=xn(e),isNaN(l))return{stiffness:gt.stiffness,damping:gt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const M_=12;function D_(e,t,n){let r=n;for(let o=1;o<M_;o++)r=r-e(r)/t(r);return r}function td(e,t){return e*Math.sqrt(1-t*t)}const N_=["duration","bounce"],F_=["stiffness","damping","mass"];function Zy(e,t){return t.some(n=>e[n]!==void 0)}function L_(e){let t={velocity:gt.velocity,stiffness:gt.stiffness,damping:gt.damping,mass:gt.mass,isResolvedFromDuration:!1,...e};if(!Zy(e,F_)&&Zy(e,N_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*$n(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:gt.mass,stiffness:o,damping:i}}else{const n=O_(e);t={...t,...n,mass:gt.mass},t.isResolvedFromDuration=!0}return t}function Hi(e=gt.visualDuration,t=gt.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],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:g}=L_({...n,velocity:-fn(n.velocity||0)}),v=h||0,m=c/(2*Math.sqrt(l*u)),f=a-i,y=fn(Math.sqrt(l/u)),b=Math.abs(f)<5;r||(r=b?gt.restSpeed.granular:gt.restSpeed.default),o||(o=b?gt.restDelta.granular:gt.restDelta.default);let x;if(m<1){const T=td(y,m);x=P=>{const w=Math.exp(-m*y*P);return a-w*((v+m*y*f)/T*Math.sin(T*P)+f*Math.cos(T*P))}}else if(m===1)x=T=>a-Math.exp(-y*T)*(f+(v+y*f)*T);else{const T=y*Math.sqrt(m*m-1);x=P=>{const w=Math.exp(-m*y*P),E=Math.min(T*P,300);return a-w*((v+m*y*f)*Math.sinh(E)+T*f*Math.cosh(E))/T}}const k={calculatedDuration:g&&d||null,next:T=>{const P=x(T);if(g)s.done=T>=d;else{let w=T===0?v:0;m<1&&(w=T===0?xn(v):Ky(x,T,P));const E=Math.abs(w)<=r,A=Math.abs(a-P)<=o;s.done=E&&A}return s.value=s.done?a:P,s},toString:()=>{const T=Math.min(Ju(k),Ns),P=Yy(w=>k.next(T*w).value,T,30);return T+"ms "+P},toTransition:()=>{}};return k}Hi.applyToOptions=e=>{const t=Gy(e,100,Hi);return e.ease=t.ease,e.duration=xn(t.duration),e.type="keyframes",e};function nd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},g=E=>s!==void 0&&E<s||l!==void 0&&E>l,v=E=>s===void 0?l:l===void 0||Math.abs(s-E)<Math.abs(l-E)?s:l;let m=n*t;const f=d+m,y=a===void 0?f:a(f);y!==f&&(m=y-d);const b=E=>-m*Math.exp(-E/r),x=E=>y+b(E),k=E=>{const A=b(E),I=x(E);h.done=Math.abs(A)<=c,h.value=h.done?y:I};let T,P;const w=E=>{g(h.value)&&(T=E,P=Hi({keyframes:[h.value,v(h.value)],velocity:Ky(x,E,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:E=>{let A=!1;return!P&&T===void 0&&(A=!0,k(E),w(E)),T!==void 0&&E>=T?P.next(E-T):(!A&&k(E),h)}}}function V_(e,t,n){const r=[],o=n||rr.mix||Uy,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||dn:t;s=Vi(l,s)}r.push(s)}return r}function Xy(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(on(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 a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=V_(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=Do(e[d],e[d+1],u);return s[d](h)};return n?u=>c($n(e[0],e[i-1],u)):c}function Qy(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Do(0,t,r);e.push(ct(n,1,o))}}function Jy(e){const t=[0];return Qy(t,e.length-1),t}function $_(e,t){return e.map(n=>n*t)}function j_(e,t){return e.map(()=>t||Py).splice(0,e.length-1)}function Lo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Ay(r)?r.map(Ru):Ru(r),i={done:!1,value:t[0]},a=$_(n&&n.length===t.length?n:Jy(t),e),s=Xy(a,t,{ease:Array.isArray(o)?o:j_(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const z_=e=>e!==null;function rd(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(z_),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const B_={decay:nd,inertia:nd,tween:Lo,keyframes:Lo,spring:Hi};function eb(e){typeof e.type=="string"&&(e.type=B_[e.type])}class od{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 R_=e=>e/100;class id extends od{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!==Ut.now()&&this.tick(Ut.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;eb(t);const{type:n=Lo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||Lo;process.env.NODE_ENV!=="production"&&l!==Lo&&on(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`,"spring-two-frames"),l!==Lo&&typeof s[0]!="number"&&(this.mixKeyframes=Vi(R_,Uy(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Ju(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:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:g,type:v,onUpdate:m,finalKeyframe:f}=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,k=r;if(d){const E=Math.min(this.currentTime,o)/s;let A=Math.floor(E),I=E%1;!I&&E>=1&&(I=1),I===1&&A--,A=Math.min(A,d+1),A%2&&(h==="reverse"?(I=1-I,g&&(I-=g/s)):h==="mirror"&&(k=a)),x=$n(0,1,I)*s}const T=b?{done:!1,value:u[0]}:k.next(x);i&&(T.value=i(T.value));let{done:P}=T;!b&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return w&&v!==nd&&(T.value=rd(u,this.options,f,this.speed)),m&&m(T.value),w&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return fn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fn(t)}get time(){return fn(this.currentTime)}set time(t){t=xn(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(Ut.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=fn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=I_,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(Ut.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 H_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Gr=e=>e*180/Math.PI,ad=e=>{const t=Gr(Math.atan2(e[1],e[0]));return sd(t)},W_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ad,rotateZ:ad,skewX:e=>Gr(Math.atan(e[1])),skewY:e=>Gr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},sd=e=>(e=e%360,e<0&&(e+=360),e),tb=ad,nb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),q_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nb,scaleY:rb,scale:e=>(nb(e)+rb(e))/2,rotateX:e=>sd(Gr(Math.atan2(e[6],e[5]))),rotateY:e=>sd(Gr(Math.atan2(-e[2],e[0]))),rotateZ:tb,rotate:tb,skewX:e=>Gr(Math.atan(e[4])),skewY:e=>Gr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ld(e){return e.includes("scale")?1:0}function cd(e,t){if(!e||e==="none")return ld(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=q_,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=W_,o=s}if(!o)return ld(t);const i=r[t],a=o[1].split(",").map(Y_);return typeof i=="function"?i(a):a[i]}const U_=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return cd(n,t)};function Y_(e){return parseFloat(e.trim())}const Vo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$o=new Set(Vo),ob=e=>e===No||e===xe,G_=new Set(["x","y","z"]),K_=Vo.filter(e=>!G_.has(e));function Z_(e){const t=[];return K_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Sr={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})=>cd(t,"x"),y:(e,{transform:t})=>cd(t,"y")};Sr.translateX=Sr.x,Sr.translateY=Sr.y;const Kr=new Set;let ud=!1,dd=!1,fd=!1;function ib(){if(dd){const e=Array.from(Kr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Z_(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,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}dd=!1,ud=!1,Kr.forEach(e=>e.complete(fd)),Kr.clear()}function ab(){Kr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(dd=!0)})}function X_(){fd=!0,ab(),ib(),fd=!1}class pd{constructor(t,n,r,o,i,a=!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=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Kr.add(this),ud||(ud=!0,st.read(ab),st.resolveKeyframes(ib))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}H_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Kr.delete(this)}cancel(){this.state==="scheduled"&&(Kr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Q_=e=>e.startsWith("--");function J_(e,t,n){Q_(t)?e.style.setProperty(t,n):e.style[t]=n}const eO=Vu(()=>window.ScrollTimeline!==void 0),tO={};function nO(e,t){const n=Vu(e);return()=>tO[t]??n()}const sb=nO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,lb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wi([0,.65,.55,1]),circOut:Wi([.55,0,1,.45]),backIn:Wi([.31,.01,.66,-.59]),backOut:Wi([.33,1.53,.69,.99])};function cb(e,t){if(e)return typeof e=="function"?sb()?Yy(e,t):"ease-out":_y(e)?Wi(e):Array.isArray(e)?e.map(n=>cb(n,t)||lb.easeOut):lb[e]}function rO(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=cb(s,o);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function hd(e){return typeof e=="function"&&"applyToOptions"in e}function oO({type:e,...t}){return hd(e)&&sb()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class iO extends od{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:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,on(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=oO(t);this.animation=rO(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=rd(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):J_(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 fn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fn(t)}get time(){return fn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=xn(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&&eO()?(this.animation.timeline=t,dn):n(this)}}const ub={anticipate:Ey,backInOut:Ty,circInOut:Cy};function aO(e){return e in ub}function sO(e){typeof e.ease=="string"&&aO(e.ease)&&(e.ease=ub[e.ease])}const md=10;class lO extends iO{constructor(t){sO(t),eb(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,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new id({...a,autoplay:!1}),l=Math.max(md,Ut.now()-this.startTime),c=$n(0,md,l-md);n.setWithVelocity(s.sample(Math.max(0,l-c)).value,s.sample(l).value,c),s.stop()}}const db=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(wr.test(e)||e==="0")&&!e.startsWith("url("));function cO(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 uO(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],a=db(o,t),s=db(i,t);return Mo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!a||!s?!1:cO(e)||(n==="spring"||hd(n))&&r}function gd(e){e.duration=0,e.type="keyframes"}const dO=new Set(["opacity","clipPath","filter","transform"]),fO=Vu(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pO(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return fO()&&n&&dO.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const hO=40;class mO extends od{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ut.now();const h={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},g=u?.KeyframeResolver||pd;this.keyframeResolver=new g(s,(v,m,f)=>this.onKeyframesResolved(v,m,h,!f),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Ut.now(),uO(t,i,a,s)||((rr.instantAnimations||!l)&&u?.(rd(t,r,n)),t[0]=t[t.length-1],gd(r),r.repeat=0);const h={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>hO?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!c&&pO(h),v=h.motionValue?.owner?.current,m=g?new lO({...h,element:v}):new id(h);m.finished.then(()=>{this.notifyFinished()}).catch(dn),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(),X_()),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 gO{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 fb(this.animations,"duration")}get iterationDuration(){return fb(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 fb(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 vO extends gO{then(t,n){return this.finished.finally(t).then(()=>{})}}function pb(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:s-i*r}const yO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bO(e){const t=yO.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const xO=4;function hb(e,t,n=1){on(n<=xO,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=bO(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return hy(a)?parseFloat(a):a}return Wu(o)?hb(o,t,n+1):o}const wO={type:"spring",stiffness:500,damping:25,restSpeed:10},SO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),TO={type:"keyframes",duration:.8},EO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kO=(e,{keyframes:t})=>t.length>2?TO:$o.has(e)?e.startsWith("scale")?SO(t[1]):wO:EO,CO=e=>e!==null;function PO(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(CO),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function vd(e,t){return e?.[t]??e?.default??e}function AO({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const yd=(e,t,n,r={},o,i)=>a=>{const s=vd(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-xn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};AO(s)||Object.assign(u,kO(e,u)),u.duration&&(u.duration=xn(u.duration)),u.repeatDelay&&(u.repeatDelay=xn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(gd(u),u.delay===0&&(d=!0)),(rr.instantAnimations||rr.skipAnimations)&&(d=!0,gd(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const h=PO(u.keyframes,s);if(h!==void 0){st.update(()=>{u.onUpdate(h),u.onComplete()});return}}return s.isSync?new id(u):new mO(u)};function mb(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function bd(e,t,n,r){if(typeof t=="function"){const[o,i]=mb(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]=mb(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function jo(e,t,n){const r=e.getProps();return bd(r,t,n!==void 0?n:r.custom,e)}const gb=new Set(["width","height","top","left","right","bottom",...Vo]),vb=30,IO=e=>!isNaN(parseFloat(e)),qi={current:void 0};class _O{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Ut.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=Ut.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=IO(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ju(!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 $u);const r=this.events[t].add(n);return t==="change"?()=>{r(),st.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 qi.current&&qi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ut.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vb);return vy(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 Zr(e,t){return new _O(e,t)}const xd=e=>Array.isArray(e);function OO(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zr(n))}function MO(e){return xd(e)?e[e.length-1]||0:e}function DO(e,t){const n=jo(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=MO(i[a]);OO(e,a,s)}}const Ot=e=>!!(e&&e.getVelocity);function NO(e){return!!(Ot(e)&&e.add)}function wd(e,t){const n=e.getValue("willChange");if(NO(n))return n.add(t);if(!n&&rr.WillChange){const r=new rr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Sd(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const yb="data-"+Sd("framerAppearId");function bb(e){return e.props[yb]}function FO({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Td(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),h=s[u];if(h===void 0||c&&FO(c,u))continue;const g={delay:n,...vd(i||{},u)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===v&&!g.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=bb(e);if(y){const b=window.MotionHandoffAnimation(y,u,st);b!==null&&(g.startTime=b,m=!0)}}wd(e,u),d.start(yd(u,d,h,e.shouldReduceMotion&&gb.has(u)?{type:!1}:g,e,m));const f=d.animation;f&&l.push(f)}return a&&Promise.all(l).then(()=>{st.update(()=>{a&&DO(e,a)})}),l}function Ed(e,t,n={}){const r=jo(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(Td(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return LO(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(n.delay)])}function LO(e,t,n=0,r=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(Ed(l,t,{...a,delay:n+(typeof r=="function"?0:r)+pb(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function VO(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Ed(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Ed(e,t,n);else{const o=typeof t=="function"?jo(e,t,n.custom):t;r=Promise.all(Td(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const $O={test:e=>e==="auto",parse:e=>e},xb=e=>t=>t.test(e),wb=[No,xe,jn,xr,p_,f_,$O],Sb=e=>wb.find(xb(e));function jO(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gy(e):!0}const zO=new Set(["brightness","contrast","saturate","opacity"]);function BO(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(qu)||[];if(!r)return e;const o=n.replace(r,"");let i=zO.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const RO=/\b([a-z-]*)\(.*?\)/gu,kd={...wr,getAnimatableNone:e=>{const t=e.match(RO);return t?t.map(BO).join(" "):e}},Tb={...No,transform:Math.round},Cd={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,radius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,top:xe,right:xe,bottom:xe,left:xe,inset:xe,insetBlock:xe,insetBlockStart:xe,insetBlockEnd:xe,insetInline:xe,insetInlineStart:xe,insetInlineEnd:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,paddingBlock:xe,paddingBlockStart:xe,paddingBlockEnd:xe,paddingInline:xe,paddingInlineStart:xe,paddingInlineEnd:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,marginBlock:xe,marginBlockStart:xe,marginBlockEnd:xe,marginInline:xe,marginInlineStart:xe,marginInlineEnd:xe,backgroundPositionX:xe,backgroundPositionY:xe,...{rotate:xr,rotateX:xr,rotateY:xr,rotateZ:xr,scale:Ms,scaleX:Ms,scaleY:Ms,scaleZ:Ms,skew:xr,skewX:xr,skewY:xr,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:ji,originX:Vy,originY:Vy,originZ:xe},zIndex:Tb,fillOpacity:ji,strokeOpacity:ji,numOctaves:Tb},HO={...Cd,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:kd,WebkitFilter:kd},Eb=e=>HO[e];function kb(e,t){let n=Eb(e);return n!==kd&&(n=wr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const WO=new Set(["auto","none","0"]);function qO(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!WO.has(i)&&Ri(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=kb(n,o)}class UO extends pd{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(),Wu(d))){const h=hb(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!gb.has(r)||t.length!==2)return;const[o,i]=t,a=Sb(o),s=Sb(i),l=Fy(o),c=Fy(i);if(l!==c&&Sr[r]){this.needsMeasurement=!0;return}if(a!==s)if(ob(a)&&ob(s))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Sr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||jO(t[o]))&&r.push(o);r.length&&qO(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=Sr[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,a=r[i];r[i]=Sr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}function Cb(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 Pb=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Pd(e){return my(e)&&"offsetHeight"in e}const{schedule:Ad}=My(queueMicrotask,!1),wn={x:!1,y:!1};function Ab(){return wn.x||wn.y}function YO(e){return e==="x"||e==="y"?wn[e]?null:(wn[e]=!0,()=>{wn[e]=!1}):wn.x||wn.y?null:(wn.x=wn.y=!0,()=>{wn.x=wn.y=!1})}function Ib(e,t){const n=Cb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function _b(e){return!(e.pointerType==="touch"||Ab())}function GO(e,t,n={}){const[r,o,i]=Ib(e,n),a=s=>{if(!_b(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{_b(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const Ob=(e,t)=>t?e===t?!0:Ob(e,t.parentElement):!1,Id=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,KO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Mb(e){return KO.has(e.tagName)||e.isContentEditable===!0}const Fs=new WeakSet;function Db(e){return t=>{t.key==="Enter"&&e(t)}}function _d(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ZO=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Db(()=>{if(Fs.has(n))return;_d(n,"down");const o=Db(()=>{_d(n,"up")}),i=()=>_d(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 Nb(e){return Id(e)&&!Ab()}function XO(e,t,n={}){const[r,o,i]=Ib(e,n),a=s=>{const l=s.currentTarget;if(!Nb(s))return;Fs.add(l);const c=t(l,s),u=(g,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Fs.has(l)&&Fs.delete(l),Nb(g)&&typeof c=="function"&&c(g,{success:v})},d=g=>{u(g,l===window||l===document||n.useGlobalTarget||Ob(l,g.target))},h=g=>{u(g,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",h,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),Pd(s)&&(s.addEventListener("focus",c=>ZO(c,o)),!Mb(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function Od(e){return my(e)&&"ownerSVGElement"in e}function Fb(e){return Od(e)&&e.tagName==="svg"}function QO(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function JO(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:QO(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Ru(r)(l/c)*c}return t+l}}function eM(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=Xy(o,i,a);return t?s(r):s}const tM=[...wb,Ct,wr],nM=e=>tM.find(xb(e)),Lb=()=>({translate:0,scale:1,origin:0,originPoint:0}),zo=()=>({x:Lb(),y:Lb()}),Vb=()=>({min:0,max:0}),Pt=()=>({x:Vb(),y:Vb()}),Md={current:null},$b={current:!1},rM=typeof window<"u";function oM(){if($b.current=!0,!!rM)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Md.current=e.matches;e.addEventListener("change",t),t()}else Md.current=!1}const Ui=new WeakMap;function Ls(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Yi(e){return typeof e=="string"||Array.isArray(e)}const Dd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Nd=["initial",...Dd];function Vs(e){return Ls(e.animate)||Nd.some(t=>Yi(e[t]))}function jb(e){return!!(Vs(e)||e.variants)}function iM(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Ot(o))e.addValue(r,o);else if(Ot(i))e.addValue(r,Zr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Zr(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const zb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let $s={};function Bb(e){$s=e}function aM(){return $s}class Rb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pd,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 h=Ut.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,st.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;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=s,this.blockInitialAnimation=!!i,this.isControllingVariants=Vs(n),this.isVariantNode=jb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const g=d[h];l[h]!==void 0&&Ot(g)&&g.set(l[h])}}mount(t){this.current=t,Ui.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:($b.current||oM(),this.shouldReduceMotion=Md.current),process.env.NODE_ENV!=="production"&&ju(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(),or(this.notifyUpdate),or(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=$o.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&st.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 $s){const n=$s[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):Pt()}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<zb.length;r++){const o=zb[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=iM(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=Zr(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"&&(hy(r)||gy(r))?r=parseFloat(r):!nM(r)&&wr.test(n)&&(r=kb(t,n)),this.setBaseTarget(t,Ot(r)?r.get():r)),Ot(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=bd(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&&!Ot(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 $u),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ad.render(this.render)}}class Hb extends Rb{constructor(){super(...arguments),this.KeyframeResolver=UO}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;Ot(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Tr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Wb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function sM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function lM(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 Fd(e){return e===void 0||e===1}function Ld({scale:e,scaleX:t,scaleY:n}){return!Fd(e)||!Fd(t)||!Fd(n)}function Xr(e){return Ld(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return Ub(e.x)||Ub(e.y)}function Ub(e){return e&&e!=="0%"}function js(e,t,n){const r=e-n,o=t*r;return n+o}function Yb(e,t,n,r,o){return o!==void 0&&(e=js(e,o,r)),js(e,n,r)+t}function Vd(e,t=0,n=1,r,o){e.min=Yb(e.min,t,n,r,o),e.max=Yb(e.max,t,n,r,o)}function Gb(e,{x:t,y:n}){Vd(e.x,t.translate,t.scale,t.originPoint),Vd(e.y,n.translate,n.scale,n.originPoint)}const Kb=.999999999999,Zb=1.0000000000001;function cM(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=n[s],a=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&&Ro(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Gb(e,a)),r&&Xr(i.latestValues)&&Ro(e,i.latestValues))}t.x<Zb&&t.x>Kb&&(t.x=1),t.y<Zb&&t.y>Kb&&(t.y=1)}function Bo(e,t){e.min=e.min+t,e.max=e.max+t}function Xb(e,t,n,r,o=.5){const i=ct(e.min,e.max,o);Vd(e,t,n,i,r)}function Ro(e,t){Xb(e.x,t.x,t.scaleX,t.scale,t.originX),Xb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Wb(lM(e.getBoundingClientRect(),t))}function uM(e,t,n){const r=Qb(e,n),{scroll:o}=t;return o&&(Bo(r.x,o.offset.x),Bo(r.y,o.offset.y)),r}const dM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fM=Vo.length;function pM(e,t,n){let r="",o=!0;for(let i=0;i<fM;i++){const a=Vo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=Pb(s,Cd[a]);if(!l){o=!1;const u=dM[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function $d(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const c=t[l];if($o.has(l)){a=!0;continue}else if(Ny(l)){o[l]=c;continue}else{const u=Pb(c,Cd[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=pM(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function Jb(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function ex(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=ex(e,t.target.x),r=ex(e,t.target.y);return`${n}% ${r}%`}},hM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=wr.parse(e);if(o.length>5)return r;const i=wr.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=ct(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}},jd={borderRadius:{...Gi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gi,borderTopRightRadius:Gi,borderBottomLeftRadius:Gi,borderBottomRightRadius:Gi,boxShadow:hM};function tx(e,{layout:t,layoutId:n}){return $o.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!jd[e]||e==="opacity")}function zd(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(Ot(r[a])||o&&Ot(o[a])||tx(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function mM(e){return window.getComputedStyle(e)}class nx extends Hb{constructor(){super(...arguments),this.type="html",this.renderInstance=Jb}readValueFromInstance(t,n){if($o.has(n))return this.projection?.isProjecting?ld(n):U_(t,n);{const r=mM(t),o=(Ny(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){$d(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zd(t,n,r)}}function gM(e,t){return e in t}class vM extends Rb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(gM(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 Pt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const yM={offset:"stroke-dashoffset",array:"stroke-dasharray"},bM={offset:"strokeDashoffset",array:"strokeDasharray"};function xM(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?yM:bM;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const wM=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function rx(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if($d(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const g of wM)d[g]!==void 0&&(h[g]=d[g],delete d[g]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&xM(d,o,i,a,!1)}const ox=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"]),ix=e=>typeof e=="string"&&e.toLowerCase()==="svg";function SM(e,t,n,r){Jb(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ox.has(o)?o:Sd(o),t.attrs[o])}function ax(e,t,n){const r=zd(e,t,n);for(const o in e)if(Ot(e[o])||Ot(t[o])){const i=Vo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class sx extends Hb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($o.has(n)){const r=Eb(n);return r&&r.default||0}return n=ox.has(n)?n:Sd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ax(t,n,r)}build(t,n,r){rx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){SM(t,n,r,o)}mount(t){this.isSVGTag=ix(t.tagName),super.mount(t)}}const TM=Nd.length;function lx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?lx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<TM;n++){const r=Nd[n],o=e.props[r];(Yi(o)||o===!1)&&(t[r]=o)}return t}function cx(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 EM=[...Dd].reverse(),kM=Dd.length;function CM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>VO(e,n,r)))}function PM(e){let t=CM(e),n=ux(),r=!0;const o=l=>(c,u)=>{const d=jo(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:h,transitionEnd:g,...v}=d;c={...c,...v,...g}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=lx(e.parent)||{},d=[],h=new Set;let g={},v=1/0;for(let f=0;f<kM;f++){const y=EM[f],b=n[y],x=c[y]!==void 0?c[y]:u[y],k=Yi(x),T=y===l?b.isActive:null;T===!1&&(v=f);let P=x===u[y]&&x!==c[y]&&k;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),b.protectedKeys={...g},!b.isActive&&T===null||!x&&!b.prevProp||Ls(x)||typeof x=="boolean")continue;const w=AM(b.prevProp,x);let E=w||y===l&&b.isActive&&!P&&k||f>v&&k,A=!1;const I=Array.isArray(x)?x:[x];let D=I.reduce(o(y),{});T===!1&&(D={});const{prevResolvedValues:F={}}=b,j={...F,...D},_=M=>{E=!0,h.has(M)&&(A=!0,h.delete(M)),b.needsAnimating[M]=!0;const C=e.getValue(M);C&&(C.liveStyle=!1)};for(const M in j){const C=D[M],$=F[M];if(g.hasOwnProperty(M))continue;let L=!1;xd(C)&&xd($)?L=!cx(C,$):L=C!==$,L?C!=null?_(M):h.add(M):C!==void 0&&h.has(M)?_(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=D,b.isActive&&(g={...g,...D}),r&&e.blockInitialAnimation&&(E=!1);const N=P&&w;E&&(!N||A)&&d.push(...I.map(M=>{const C={type:y};if(typeof M=="string"&&r&&!N&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,L=jo($,M);if($.enteringChildren&&L){const{delayChildren:q}=L.transition||{};C.delay=pb($.enteringChildren,e,q)}}return{animation:M,options:C}}))}if(h.size){const f={};if(typeof c.initial!="boolean"){const y=jo(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(f.transition=y.transition)}h.forEach(y=>{const b=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),f[y]=b??null}),d.push({animation:f})}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 s(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=a(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=ux()}}}function AM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!cx(t,e):!1}function Qr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ux(){return{animate:Qr(!0),whileInView:Qr(),whileHover:Qr(),whileTap:Qr(),whileDrag:Qr(),whileFocus:Qr(),exit:Qr()}}function dx(e,t){e.min=t.min,e.max=t.max}function Sn(e,t){dx(e.x,t.x),dx(e.y,t.y)}function fx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const px=1e-4,IM=1-px,_M=1+px,hx=.01,OM=0-hx,MM=0+hx;function Yt(e){return e.max-e.min}function DM(e,t,n){return Math.abs(e-t)<=n}function mx(e,t,n,r=.5){e.origin=r,e.originPoint=ct(t.min,t.max,e.origin),e.scale=Yt(n)/Yt(t),e.translate=ct(n.min,n.max,e.origin)-e.originPoint,(e.scale>=IM&&e.scale<=_M||isNaN(e.scale))&&(e.scale=1),(e.translate>=OM&&e.translate<=MM||isNaN(e.translate))&&(e.translate=0)}function Ki(e,t,n,r){mx(e.x,t.x,n.x,r?r.originX:void 0),mx(e.y,t.y,n.y,r?r.originY:void 0)}function gx(e,t,n){e.min=n.min+t.min,e.max=e.min+Yt(t)}function NM(e,t,n){gx(e.x,t.x,n.x),gx(e.y,t.y,n.y)}function vx(e,t,n){e.min=t.min-n.min,e.max=e.min+Yt(t)}function zs(e,t,n){vx(e.x,t.x,n.x),vx(e.y,t.y,n.y)}function yx(e,t,n,r,o){return e-=t,e=js(e,1/n,r),o!==void 0&&(e=js(e,1/o,r)),e}function FM(e,t=0,n=1,r=.5,o,i=e,a=e){if(jn.test(t)&&(t=parseFloat(t),t=ct(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ct(i.min,i.max,r);e===i&&(s-=t),e.min=yx(e.min,t,n,s,o),e.max=yx(e.max,t,n,s,o)}function bx(e,t,[n,r,o],i,a){FM(e,t[n],t[r],t[o],t.scale,i,a)}const LM=["x","scaleX","originX"],VM=["y","scaleY","originY"];function xx(e,t,n,r){bx(e.x,t,LM,n?n.x:void 0,r?r.x:void 0),bx(e.y,t,VM,n?n.y:void 0,r?r.y:void 0)}function wx(e){return e.translate===0&&e.scale===1}function Sx(e){return wx(e.x)&&wx(e.y)}function Tx(e,t){return e.min===t.min&&e.max===t.max}function $M(e,t){return Tx(e.x,t.x)&&Tx(e.y,t.y)}function Ex(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kx(e,t){return Ex(e.x,t.x)&&Ex(e.y,t.y)}function Cx(e){return Yt(e.x)/Yt(e.y)}function Px(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function pn(e){return[e("x"),e("y")]}function jM(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:g,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const Ax=["TopLeft","TopRight","BottomLeft","BottomRight"],zM=Ax.length,Ix=e=>typeof e=="string"?parseFloat(e):e,_x=e=>typeof e=="number"||xe.test(e);function BM(e,t,n,r,o,i){o?(e.opacity=ct(0,n.opacity??1,RM(r)),e.opacityExit=ct(t.opacity??1,0,HM(r))):i&&(e.opacity=ct(t.opacity??1,n.opacity??1,r));for(let a=0;a<zM;a++){const s=`border${Ax[a]}Radius`;let l=Ox(t,s),c=Ox(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||_x(l)===_x(c)?(e[s]=Math.max(ct(Ix(l),Ix(c),r),0),(jn.test(c)||jn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ct(t.rotate||0,n.rotate||0,r))}function Ox(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const RM=Mx(0,.5,ky),HM=Mx(.5,.95,dn);function Mx(e,t,n){return r=>r<e?0:r>t?1:n(Do(e,t,r))}function Dx(e,t,n){const r=Ot(e)?e:Zr(e);return r.start(yd("",r,t,n)),r.animation}function Zi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const WM=(e,t)=>e.depth-t.depth;class qM{constructor(){this.children=[],this.isDirty=!1}add(t){Fu(this.children,t),this.isDirty=!0}remove(t){Li(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(WM),this.isDirty=!1,this.children.forEach(t)}}function UM(e,t){const n=Ut.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(or(r),e(i-t))};return st.setup(r,!0),()=>or(r)}function Bs(e){return Ot(e)?e.get():e}class YM{constructor(){this.members=[]}add(t){Fu(this.members,t),t.scheduleRender()}remove(t){if(Li(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 Rs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Bd=["","X","Y","Z"],GM=1e3;let KM=0;function Rd(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Nx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=bb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",st,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Nx(r)}function Fx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=KM++,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(QM),this.nodes.forEach(nD),this.nodes.forEach(rD),this.nodes.forEach(JM)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new qM)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new $u),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Od(a)&&!Fb(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,d=0;const h=()=>this.root.updateBlockedByResize=!1;st.read(()=>{d=window.innerWidth}),e(a,()=>{const g=window.innerWidth;g!==d&&(d=g,this.root.updateBlockedByResize=!0,u&&u(),u=UM(h,250),Rs.hasAnimatedSinceResize&&(Rs.hasAnimatedSinceResize=!1,this.nodes.forEach($x)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||lD,{onLayoutAnimationStart:m,onLayoutAnimationComplete:f}=c.getProps(),y=!this.targetLayout||!kx(this.targetLayout,g),b=!d&&h;if(this.options.layoutRoot||this.resumeFrom||b||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...vd(v,"layout"),onPlay:m,onComplete:f};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||$x(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),or(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(oD),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nx(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:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Lx);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Vx);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tD),this.nodes.forEach(ZM),this.nodes.forEach(XM)):this.nodes.forEach(Vx),this.clearAllSnapshots();const s=Ut.now();Bt.delta=$n(0,1e3/60,s-Bt.timestamp),Bt.timestamp=s,Bt.isProcessing=!0,Hu.update.process(Bt),Hu.preRender.process(Bt),Hu.render.process(Bt),Bt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ad.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eD),this.sharedNodes.forEach(iD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,st.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){st.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Yt(this.snapshot.measuredBox.x)&&!Yt(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 a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Pt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!Sx(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||Xr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),cD(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Pt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(uD))){const{scroll:c}=this.root;c&&(Bo(s.x,c.offset.x),Bo(s.y,c.offset.y))}return s}removeElementScroll(a){const s=Pt();if(Sn(s,a),this.scroll?.wasRoot)return s;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&&Sn(s,a),Bo(s.x,u.offset.x),Bo(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=Pt();Sn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ro(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Xr(u.latestValues)&&Ro(l,u.latestValues)}return Xr(this.latestValues)&&Ro(l,this.latestValues),l}removeTransform(a){const s=Pt();Sn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Xr(c.latestValues))continue;Ld(c.latestValues)&&c.updateSnapshot();const u=Pt(),d=c.measurePageBox();Sn(u,d),xx(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Xr(this.latestValues)&&xx(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Bt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||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=Bt.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pt(),this.targetWithTransforms=Pt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Sn(this.target,this.layout.layoutBox),Gb(this.target,this.targetDelta)):Sn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ld(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,s,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pt(),this.relativeTargetOrigin=Pt(),zs(this.relativeTargetOrigin,s,l),Sn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Bt.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;Sn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;cM(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Pt());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fx(this.prevProjectionDelta.x,this.projectionDelta.x),fx(this.prevProjectionDelta.y,this.projectionDelta.y)),Ki(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Px(this.projectionDelta.x,this.prevProjectionDelta.x)||!Px(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zo(),this.projectionDelta=zo(),this.projectionDeltaWithTransform=zo()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=zo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const h=Pt(),g=l?l.source:void 0,v=this.layout?this.layout.source:void 0,m=g!==v,f=this.getStack(),y=!f||f.members.length<=1,b=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(sD));this.animationProgress=0;let x;this.mixTargetDelta=k=>{const T=k/1e3;jx(d.x,a.x,T),jx(d.y,a.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zs(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aD(this.relativeTarget,this.relativeTargetOrigin,h,T),x&&$M(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Pt()),Sn(x,this.relativeTarget)),m&&(this.animationValues=u,BM(u,c,this.latestValues,T,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(or(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=st.update(()=>{Rs.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zr(0)),this.currentAnimation=Dx(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(GM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&Wx(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Pt();const d=Yt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const h=Yt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+h}Sn(s,l),Ro(s,u),Ki(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new YM),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Rd("z",a,c,this.animationValues);for(let u=0;u<Bd.length;u++)Rd(`rotate${Bd[u]}`,a,c,this.animationValues),Rd(`skew${Bd[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=Bs(s?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=Bs(s?.pointerEvents)||""),this.hasProjected&&!Xr(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=jM(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:h,y:g}=this.projectionDelta;a.transformOrigin=`${h.origin*100}% ${g.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in jd){if(u[v]===void 0)continue;const{correct:m,applyTo:f,isCSSVariable:y}=jd[v],b=d==="none"?u[v]:m(u[v],c);if(f){const x=f.length;for(let k=0;k<x;k++)a[f[k]]=b}else y?this.options.visualElement.renderState.vars[v]=b:a[v]=b}this.options.layoutId&&(a.pointerEvents=c===this?Bs(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Lx),this.root.sharedNodes.clear()}}}function ZM(e){e.updateLayout()}function XM(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"?pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],h=Yt(d);d.min=n[u].min,d.max=d.min+h}):Wx(o,t.layoutBox,n)&&pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],h=Yt(n[u]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=zo();Ki(a,n,t.layoutBox);const s=zo();i?Ki(s,e.applyTransform(r,!0),t.measuredBox):Ki(s,n,t.layoutBox);const l=!Sx(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const g=Pt();zs(g,t.layoutBox,d.layoutBox);const v=Pt();zs(v,n,h.layoutBox),kx(g,v)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function QM(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 JM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eD(e){e.clearSnapshot()}function Lx(e){e.clearMeasurements()}function Vx(e){e.isLayoutDirty=!1}function tD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function $x(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function nD(e){e.resolveTargetDelta()}function rD(e){e.calcProjection()}function oD(e){e.resetSkewAndRotation()}function iD(e){e.removeLeadSnapshot()}function jx(e,t,n){e.translate=ct(t.translate,0,n),e.scale=ct(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zx(e,t,n,r){e.min=ct(t.min,n.min,r),e.max=ct(t.max,n.max,r)}function aD(e,t,n,r){zx(e.x,t.x,n.x,r),zx(e.y,t.y,n.y,r)}function sD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lD={duration:.45,ease:[.4,0,.1,1]},Bx=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rx=Bx("applewebkit/")&&!Bx("chrome/")?Math.round:dn;function Hx(e){e.min=Rx(e.min),e.max=Rx(e.max)}function cD(e){Hx(e.x),Hx(e.y)}function Wx(e,t,n){return e==="position"||e==="preserve-aspect"&&!DM(Cx(t),Cx(n),.2)}function uD(e){return e!==e.root&&e.scroll?.wasRoot}const dD=Fx({attachResizeListener:(e,t)=>Zi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),fD=e=>!e.isLayoutDirty&&e.willUpdate(!1);function qx(){const e=new Set,t=new WeakMap,n=()=>e.forEach(fD);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 Hd={current:void 0},Ux=Fx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hd.current){const e=new dD({});e.mount(window),e.setOptions({layoutScroll:!0}),Hd.current=e}return Hd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ho=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Yx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pD(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Yx(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():Yx(e[o],null)}}}}function hD(...e){return O.useCallback(pD(...e),e)}class mD extends O.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Pd(r)&&r.offsetWidth||0,i=Pd(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function gD({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){const i=S.useId(),a=S.useRef(null),s=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=S.useContext(Ho),c=e.props?.ref??e?.ref,u=hD(a,c);return S.useInsertionEffect(()=>{const{width:d,height:h,top:g,left:v,right:m,bottom:f}=s.current;if(t||!a.current||!d||!h)return;const y=n==="left"?`left: ${v}`:`right: ${m}`,b=r==="bottom"?`bottom: ${f}`:`top: ${g}`;a.current.dataset.motionPopId=i;const x=document.createElement("style");l&&(x.nonce=l);const k=o??document.head;return k.appendChild(x),x.sheet&&x.sheet.insertRule(`
10
+ [data-motion-pop-id="${i}"] {
184
11
  position: absolute !important;
185
- width: ${s}px !important;
186
- height: ${l}px !important;
187
- ${p}px !important;
188
- top: ${c}px !important;
12
+ width: ${d}px !important;
13
+ height: ${h}px !important;
14
+ ${y}px !important;
15
+ ${b}px !important;
189
16
  }
190
- `),()=>{document.head.contains(f)&&document.head.removeChild(f)}},[t]),h.jsx(lO,{isPresent:t,childRef:o,sizeRef:i,children:I.cloneElement(e,{ref:o})})}const uO=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=xn(dO),c=S.useId();let u=!0,d=S.useMemo(()=>(u=!1,{id:c,initial:t,isPresent:n,custom:o,onExitComplete:p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},register:p=>(l.set(p,!1),()=>l.delete(p))}),[n,l,r]);return i&&u&&(d={...d}),S.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),I.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=h.jsx(cO,{isPresent:n,anchorX:s,children:e})),h.jsx(Ts.Provider,{value:d,children:e})};function dO(){return new Map}function gb(e=!0){const t=S.useContext(Ts);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const a=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Os=e=>e.key||"";function vb(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Sn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=gb(a),u=S.useMemo(()=>vb(e),[e]),d=a&&!l?[]:u.map(Os),p=S.useRef(!0),f=S.useRef(u),b=xn(()=>new Map),[g,m]=S.useState(u),[v,y]=S.useState(u);Ss(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const E=Os(v[w]);d.includes(E)?b.delete(E):b.get(E)!==!0&&b.set(E,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let E=0;E<v.length;E++){const k=v[E],C=Os(k);d.includes(C)||(w.splice(E,0,k),x.push(k))}return i==="wait"&&x.length&&(w=x),y(vb(w)),m(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.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:T}=S.useContext(Li);return h.jsx(h.Fragment,{children:v.map(w=>{const E=Os(w),k=a&&!l?!1:u===v||d.includes(E),C=()=>{if(b.has(E))b.set(E,!0);else return;let O=!0;b.forEach(_=>{_||(O=!1)}),O&&(T?.(),y(f.current),a&&c?.(),r&&r())};return h.jsx(uO,{isPresent:k,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:k?void 0:C,anchorX:s,children:w},E)})})},fO=S.createContext(null);function pO(){const e=S.useRef(!1);return Ss(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function hO(){const e=pO(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ct.postRender(r),[r]),t]}const mO=e=>!e.isLayoutDirty&&e.willUpdate(!1);function yb(){const e=new Set,t=new WeakMap,n=()=>e.forEach(mO);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 bb=e=>e===!0,gO=e=>bb(e===!0)||e==="id",vO=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(Li),o=S.useContext(fO),[i,a]=hO(),s=S.useRef(null),l=r.id||o;s.current===null&&(gO(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:bb(n)&&r.group||yb()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return h.jsx(Li.Provider,{value:c,children:e})},xb=S.createContext({strict:!1}),wb={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"]},zo={};for(const e in wb)zo[e]={isEnabled:t=>wb[e].some(n=>!!t[n])};function yO(e){for(const t in e)zo[t]={...zo[t],...e[t]}}const bO=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 Ms(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||bO.has(e)}let Sb=e=>!Ms(e);function Tb(e){typeof e=="function"&&(Sb=t=>t.startsWith("on")?!Ms(t):e(t))}try{Tb(require("@emotion/is-prop-valid").default)}catch{}function xO(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Sb(o)||n===!0&&Ms(o)||!t&&!Ms(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Sd({children:e,isValidProp:t,...n}){t&&Tb(t),n={...S.useContext(jo),...n},n.isStatic=xn(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return h.jsx(jo.Provider,{value:r,children:e})}function wO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Vu(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Ds=S.createContext({});function Ns(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function qi(e){return typeof e=="string"||Array.isArray(e)}const Td=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ed=["initial",...Td];function Ls(e){return Ns(e.animate)||Ed.some(t=>qi(e[t]))}function Eb(e){return!!(Ls(e)||e.variants)}function SO(e,t){if(Ls(e)){const{initial:n,animate:r}=e;return{initial:n===!1||qi(n)?n:void 0,animate:qi(r)?r:void 0}}return e.inherit!==!1?t:{}}function TO(e){const{initial:t,animate:n}=SO(e,S.useContext(Ds));return S.useMemo(()=>({initial:t,animate:n}),[kb(t),kb(n)])}function kb(e){return Array.isArray(e)?e.join(" "):e}const EO=Symbol.for("motionComponentSymbol");function Bo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kO(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Bo(n)&&(n.current=r))},[t])}const kd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cb="data-"+kd("framerAppearId"),Pb=S.createContext({});function CO(e,t,n,r,o){const{visualElement:i}=S.useContext(Ds),a=S.useContext(xb),s=S.useContext(Ts),l=S.useContext(jo).reducedMotion,c=S.useRef(null);r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=S.useContext(Pb);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&PO(c.current,n,o,d);const p=S.useRef(!1);S.useInsertionEffect(()=>{u&&p.current&&u.update(n,s)});const f=n[Cb],b=S.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Ss(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),yd.render(u.render),b.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(!b.current&&u.animationState&&u.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),b.current=!1))}),u}function PO(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ab(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&Bo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Ab(e){if(e)return e.options.allowProjection!==!1?e.projection:Ab(e.parent)}function AO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&yO(e);function i(s,l){let c;const u={...S.useContext(jo),...s,layoutId:IO(s)},{isStatic:d}=u,p=TO(s),f=r(s,d);if(!d&&Du){_O(u,e);const b=OO(u);c=b.MeasureLayout,p.visualElement=CO(o,f,u,t,b.ProjectionNode)}return h.jsxs(Ds.Provider,{value:p,children:[c&&p.visualElement?h.jsx(c,{visualElement:p.visualElement,...u}):null,n(o,s,kO(f,p.visualElement,l),f,d,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=S.forwardRef(i);return a[EO]=o,a}function IO({layoutId:e}){const t=S.useContext(Li).id;return t&&e!==void 0?t+"-"+e:e}function _O(e,t){const n=S.useContext(xb).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?Mo(!1,r):on(!1,r)}}function OO(e){const{drag:t,layout:n}=zo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Ui={};function MO(e){for(const t in e)Ui[t]=e[t],Ru(t)&&(Ui[t].isCSSVariable=!0)}function Ib(e,{layout:t,layoutId:n}){return $o.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ui[e]||e==="opacity")}const DO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},NO=Vo.length;function LO(e,t,n){let r="",o=!0;for(let i=0;i<NO;i++){const a=Vo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=sb(s,vd[a]);if(!l){o=!1;const u=DO[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Cd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const c=t[l];if($o.has(l)){a=!0;continue}else if(Ru(l)){o[l]=c;continue}else{const u=sb(c,vd[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=LO(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const Pd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _b(e,t,n){for(const r in t)!Ot(t[r])&&!Ib(r,n)&&(e[r]=t[r])}function FO({transformTemplate:e},t){return S.useMemo(()=>{const n=Pd();return Cd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function VO(e,t){const n=e.style||{},r={};return _b(r,n,e),Object.assign(r,FO(e,t)),r}function $O(e,t){const n={},r=VO(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 jO={offset:"stroke-dashoffset",array:"stroke-dasharray"},zO={offset:"strokeDashoffset",array:"strokeDasharray"};function BO(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?jO:zO;e[i.offset]=Ee.transform(-r);const a=Ee.transform(t),s=Ee.transform(n);e[i.array]=`${a} ${s}`}function Ob(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(Cd(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&BO(d,o,i,a,!1)}const Mb=()=>({...Pd(),attrs:{}}),Db=e=>typeof e=="string"&&e.toLowerCase()==="svg";function RO(e,t,n,r){const o=S.useMemo(()=>{const i=Mb();return Ob(i,t,Db(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};_b(i,e.style,e),o.style={...i,...o.style}}return o}const HO=["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 Ad(e){return typeof e!="string"||e.includes("-")?!1:!!(HO.indexOf(e)>-1||/[A-Z]/u.test(e))}function WO(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Ad(n)?RO:$O)(r,i,a,n),c=xO(r,typeof n=="string",e),u=n!==S.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=S.useMemo(()=>Ot(d)?d.get():d,[d]);return S.createElement(n,{...u,children:p})}}function Nb(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Id(e,t,n,r){if(typeof t=="function"){const[o,i]=Nb(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]=Nb(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Fs(e){return Ot(e)?e.get():e}function qO({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:UO(n,r,o,e),renderState:t()}}const Lb=e=>(t,n)=>{const r=S.useContext(Ds),o=S.useContext(Ts),i=()=>qO(e,t,r,o);return n?i():xn(i)};function UO(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Fs(i[p]);let{initial:a,animate:s}=e;const l=Ls(e),c=Eb(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!Ns(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const b=Id(e,p[f]);if(b){const{transitionEnd:g,transition:m,...v}=b;for(const y in v){let x=v[y];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[y]=x)}for(const y in g)o[y]=g[y]}}}return o}function _d(e,t,n){const{style:r}=e,o={};for(const i in r)(Ot(r[i])||t.style&&Ot(t.style[i])||Ib(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const YO={useVisualState:Lb({scrapeMotionValuesFromProps:_d,createRenderState:Pd})};function Fb(e,t,n){const r=_d(e,t,n);for(const o in e)if(Ot(e[o])||Ot(t[o])){const i=Vo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const KO={useVisualState:Lb({scrapeMotionValuesFromProps:Fb,createRenderState:Mb})};function GO(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Ad(r)?KO:YO,preloadedFeatures:e,useRender:WO(o),createVisualElement:t,Component:r};return AO(a)}}function Yi(e,t,n){const r=e.getProps();return Id(r,t,n!==void 0?n:r.custom,e)}const Od=e=>Array.isArray(e);function ZO(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zr(n))}function XO(e){return Od(e)?e[e.length-1]||0:e}function QO(e,t){const n=Yi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=XO(i[a]);ZO(e,a,s)}}function JO(e){return!!(Ot(e)&&e.add)}function Md(e,t){const n=e.getValue("willChange");if(JO(n))return n.add(t);if(!n&&rr.WillChange){const r=new rr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Vb(e){return e.props[Cb]}const eM=e=>e!==null;function tM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(eM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const nM={type:"spring",stiffness:500,damping:25,restSpeed:10},rM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),oM={type:"keyframes",duration:.8},iM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aM=(e,{keyframes:t})=>t.length>2?oM:$o.has(e)?e.startsWith("scale")?rM(t[1]):nM:iM;function sM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Dd=(e,t,n,r={},o,i)=>a=>{const s=md(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-fn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};sM(s)||Object.assign(u,aM(e,u)),u.duration&&(u.duration=fn(u.duration)),u.repeatDelay&&(u.repeatDelay=fn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(rr.instantAnimations||rr.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=tM(u.keyframes,s);if(p!==void 0){ct.update(()=>{u.onUpdate(p),u.onComplete()});return}}return s.isSync?new od(u):new F_(u)};function lM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nd(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),p=s[u];if(p===void 0||c&&lM(c,u))continue;const f={delay:n,...md(i||{},u)},b=d.get();if(b!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===b&&!f.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const v=Vb(e);if(v){const y=window.MotionHandoffAnimation(v,u,ct);y!==null&&(f.startTime=y,g=!0)}}Md(e,u),d.start(Dd(u,d,p,e.shouldReduceMotion&&Jy.has(u)?{type:!1}:f,e,g));const m=d.animation;m&&l.push(m)}return a&&Promise.all(l).then(()=>{ct.update(()=>{a&&QO(e,a)})}),l}function Ld(e,t,n={}){const r=Yi(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(Nd(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return cM(e,t,c+l,u,d,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(n.delay)])}function cM(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(uM).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Ld(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function uM(e,t){return e.sortNodePosition(t)}function dM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Ld(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Ld(e,t,n);else{const o=typeof t=="function"?Yi(e,t,n.custom):t;r=Promise.all(Nd(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function $b(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 fM=Ed.length;function jb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?jb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<fM;n++){const r=Ed[n],o=e.props[r];(qi(o)||o===!1)&&(t[r]=o)}return t}const pM=[...Td].reverse(),hM=Td.length;function mM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>dM(e,n,r)))}function gM(e){let t=mM(e),n=zb(),r=!0;const o=l=>(c,u)=>{const d=Yi(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:p,transitionEnd:f,...b}=d;c={...c,...b,...f}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=jb(e.parent)||{},d=[],p=new Set;let f={},b=1/0;for(let m=0;m<hM;m++){const v=pM[m],y=n[v],x=c[v]!==void 0?c[v]:u[v],T=qi(x),w=v===l?y.isActive:null;w===!1&&(b=m);let E=x===u[v]&&x!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...f},!y.isActive&&w===null||!x&&!y.prevProp||Ns(x)||typeof x=="boolean")continue;const k=vM(y.prevProp,x);let C=k||v===l&&y.isActive&&!E&&T||m>b&&T,O=!1;const _=Array.isArray(x)?x:[x];let L=_.reduce(o(v),{});w===!1&&(L={});const{prevResolvedValues:D={}}=y,z={...D,...L},A=M=>{C=!0,p.has(M)&&(O=!0,p.delete(M)),y.needsAnimating[M]=!0;const P=e.getValue(M);P&&(P.liveStyle=!1)};for(const M in z){const P=L[M],$=D[M];if(f.hasOwnProperty(M))continue;let F=!1;Od(P)&&Od($)?F=!$b(P,$):F=P!==$,F?P!=null?A(M):p.add(M):P!==void 0&&p.has(M)?A(M):y.protectedKeys[M]=!0}y.prevProp=x,y.prevResolvedValues=L,y.isActive&&(f={...f,...L}),r&&e.blockInitialAnimation&&(C=!1),C&&(!(E&&k)||O)&&d.push(..._.map(M=>({animation:M,options:{type:v}})))}if(p.size){const m={};if(typeof c.initial!="boolean"){const v=Yi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}p.forEach(v=>{const y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),m[v]=y??null}),d.push({animation:m})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(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=a(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=zb(),r=!0}}}function vM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$b(t,e):!1}function Xr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zb(){return{animate:Xr(!0),whileInView:Xr(),whileHover:Xr(),whileTap:Xr(),whileDrag:Xr(),whileFocus:Xr(),exit:Xr()}}class Sr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class yM extends Sr{constructor(t){super(t),t.animationState||(t.animationState=gM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ns(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 bM=0;class xM extends Sr{constructor(){super(...arguments),this.id=bM++}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 wM={animation:{Feature:yM},exit:{Feature:xM}};function Ki(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Gi(e){return{point:{x:e.pageX,y:e.pageY}}}const SM=e=>t=>bd(t)&&e(t,Gi(t));function Zi(e,t,n,r){return Ki(e,t,SM(n),r)}function Bb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function TM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function EM(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}}const Rb=1e-4,kM=1-Rb,CM=1+Rb,Hb=.01,PM=0-Hb,AM=0+Hb;function Ut(e){return e.max-e.min}function IM(e,t,n){return Math.abs(e-t)<=n}function Wb(e,t,n,r=.5){e.origin=r,e.originPoint=ut(t.min,t.max,e.origin),e.scale=Ut(n)/Ut(t),e.translate=ut(n.min,n.max,e.origin)-e.originPoint,(e.scale>=kM&&e.scale<=CM||isNaN(e.scale))&&(e.scale=1),(e.translate>=PM&&e.translate<=AM||isNaN(e.translate))&&(e.translate=0)}function Xi(e,t,n,r){Wb(e.x,t.x,n.x,r?r.originX:void 0),Wb(e.y,t.y,n.y,r?r.originY:void 0)}function qb(e,t,n){e.min=n.min+t.min,e.max=e.min+Ut(t)}function _M(e,t,n){qb(e.x,t.x,n.x),qb(e.y,t.y,n.y)}function Ub(e,t,n){e.min=t.min-n.min,e.max=e.min+Ut(t)}function Qi(e,t,n){Ub(e.x,t.x,n.x),Ub(e.y,t.y,n.y)}const Yb=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ro=()=>({x:Yb(),y:Yb()}),Kb=()=>({min:0,max:0}),yt=()=>({x:Kb(),y:Kb()});function pn(e){return[e("x"),e("y")]}function Fd(e){return e===void 0||e===1}function Vd({scale:e,scaleX:t,scaleY:n}){return!Fd(e)||!Fd(t)||!Fd(n)}function Qr(e){return Vd(e)||Gb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Gb(e){return Zb(e.x)||Zb(e.y)}function Zb(e){return e&&e!=="0%"}function Vs(e,t,n){const r=e-n,o=t*r;return n+o}function Xb(e,t,n,r,o){return o!==void 0&&(e=Vs(e,o,r)),Vs(e,n,r)+t}function $d(e,t=0,n=1,r,o){e.min=Xb(e.min,t,n,r,o),e.max=Xb(e.max,t,n,r,o)}function Qb(e,{x:t,y:n}){$d(e.x,t.translate,t.scale,t.originPoint),$d(e.y,n.translate,n.scale,n.originPoint)}const Jb=.999999999999,ex=1.0000000000001;function OM(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=n[s],a=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&&Wo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Qb(e,a)),r&&Qr(i.latestValues)&&Wo(e,i.latestValues))}t.x<ex&&t.x>Jb&&(t.x=1),t.y<ex&&t.y>Jb&&(t.y=1)}function Ho(e,t){e.min=e.min+t,e.max=e.max+t}function tx(e,t,n,r,o=.5){const i=ut(e.min,e.max,o);$d(e,t,n,i,r)}function Wo(e,t){tx(e.x,t.x,t.scaleX,t.scale,t.originX),tx(e.y,t.y,t.scaleY,t.scale,t.originY)}function nx(e,t){return Bb(EM(e.getBoundingClientRect(),t))}function MM(e,t,n){const r=nx(e,n),{scroll:o}=t;return o&&(Ho(r.x,o.offset.x),Ho(r.y,o.offset.y)),r}const rx=({current:e})=>e?e.ownerDocument.defaultView:null,ox=(e,t)=>Math.abs(e-t);function DM(e,t){const n=ox(e.x,t.x),r=ox(e.y,t.y);return Math.sqrt(n**2+r**2)}class ix{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=zd(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=DM(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:b}=d,{timestamp:g}=Bt;this.history.push({...b,timestamp:g});const{onStart:m,onMove:v}=this.handlers;p||(m&&m(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=jd(p,this.transformPagePoint),ct.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:b,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=zd(d.type==="pointercancel"?this.lastMoveEventInfo:jd(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,m),b&&b(d,m)},!bd(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Gi(t),s=jd(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Bt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,zd(s,this.history)),this.removeListeners=Fi(Zi(this.contextWindow,"pointermove",this.handlePointerMove),Zi(this.contextWindow,"pointerup",this.handlePointerUp),Zi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),or(this.updatePoint)}}function jd(e,t){return t?{point:t(e.point)}:e}function ax(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zd({point:e},t){return{point:e,delta:ax(e,sx(t)),offset:ax(e,NM(t)),velocity:LM(t,.1)}}function NM(e){return e[0]}function sx(e){return e[e.length-1]}function LM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=sx(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>fn(t)));)n--;if(!r)return{x:0,y:0};const i=Vn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function FM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ut(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ut(n,e,r.max):Math.min(e,n)),e}function lx(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 VM(e,{top:t,left:n,bottom:r,right:o}){return{x:lx(e.x,n,o),y:lx(e.y,t,r)}}function cx(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 $M(e,t){return{x:cx(e.x,t.x),y:cx(e.y,t.y)}}function jM(e,t){let n=.5;const r=Ut(e),o=Ut(t);return o>r?n=Do(t.min,t.max-r,e.min):r>o&&(n=Do(e.min,e.max-o,t.min)),nr(0,1,n)}function zM(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 Bd=.35;function BM(e=Bd){return e===!1?e=0:e===!0&&(e=Bd),{x:ux(e,"left","right"),y:ux(e,"top","bottom")}}function ux(e,t,n){return{min:dx(e,t),max:dx(e,n)}}function dx(e,t){return typeof e=="number"?e:e[t]||0}const RM=new WeakMap;class HM{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=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Gi(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:b}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J_(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pn(m=>{let v=this.getAxisMotionValue(m).get()||0;if($n.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[m];x&&(v=Ut(x)*(parseFloat(v)/100))}}this.originPoint[m]=v}),b&&ct.postRender(()=>b(u,d)),Md(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:b,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=d;if(f&&this.currentDirection===null){this.currentDirection=WM(m),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",d.point,m),this.updateAxis("y",d.point,m),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>pn(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ix(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:rx(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&ct.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!$s(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=FM(a,this.constraints[t],this.elastic[t])),i.set(a)}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&&Bo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=VM(r.layoutBox,t):this.constraints=!1,this.elastic=BM(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=zM(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bo(t))return!1;const r=t.current;on(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=MM(r,o.root,this.visualElement.getTransformPagePoint());let a=$M(o.layout.layoutBox,i);if(n){const s=n(TM(a));this.hasMutatedConstraints=!!s,s&&(a=Bb(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=pn(u=>{if(!$s(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,b={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,b)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Md(this.visualElement,t),r.start(Dd(t,r,0,n,this.visualElement,!1))}stopAnimation(){pn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pn(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){pn(n=>{const{drag:r}=this.getProps();if(!$s(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-ut(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Bo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=jM({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pn(a=>{if(!$s(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ut(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;RM.set(this.visualElement,this);const t=this.visualElement.current,n=Zi(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Bo(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()),ct.read(r);const a=Ki(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Bd,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function $s(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function WM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class qM extends Sr{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new HM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const fx=e=>(t,n)=>{e&&ct.postRender(()=>e(t,n))};class UM extends Sr{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new ix(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:fx(t),onStart:fx(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&ct.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Zi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const js={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function px(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ji={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=px(e,t.target.x),r=px(e,t.target.y);return`${n}% ${r}%`}},YM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=wr.parse(e);if(o.length>5)return r;const i=wr.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=ut(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class KM extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;MO(GM),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),js.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||ct.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;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 hx(e){const[t,n]=gb(),r=S.useContext(Li);return h.jsx(KM,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Pb),isPresent:t,safeToRemove:n})}const GM={borderRadius:{...Ji,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ji,borderTopRightRadius:Ji,borderBottomLeftRadius:Ji,borderBottomRightRadius:Ji,boxShadow:YM};function mx(e,t,n){const r=Ot(e)?e:Zr(e);return r.start(Dd("",r,t,n)),r.animation}const ZM=(e,t)=>e.depth-t.depth;class XM{constructor(){this.children=[],this.isDirty=!1}add(t){Nu(this.children,t),this.isDirty=!0}remove(t){Es(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ZM),this.isDirty=!1,this.children.forEach(t)}}function QM(e,t){const n=Qt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(or(r),e(i-t))};return ct.setup(r,!0),()=>or(r)}const gx=["TopLeft","TopRight","BottomLeft","BottomRight"],JM=gx.length,vx=e=>typeof e=="string"?parseFloat(e):e,yx=e=>typeof e=="number"||Ee.test(e);function eD(e,t,n,r,o,i){o?(e.opacity=ut(0,n.opacity??1,tD(r)),e.opacityExit=ut(t.opacity??1,0,nD(r))):i&&(e.opacity=ut(t.opacity??1,n.opacity??1,r));for(let a=0;a<JM;a++){const s=`border${gx[a]}Radius`;let l=bx(t,s),c=bx(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||yx(l)===yx(c)?(e[s]=Math.max(ut(vx(l),vx(c),r),0),($n.test(c)||$n.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ut(t.rotate||0,n.rotate||0,r))}function bx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const tD=xx(0,.5,fy),nD=xx(.5,.95,dn);function xx(e,t,n){return r=>r<e?0:r>t?1:n(Do(e,t,r))}function wx(e,t){e.min=t.min,e.max=t.max}function hn(e,t){wx(e.x,t.x),wx(e.y,t.y)}function Sx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Tx(e,t,n,r,o){return e-=t,e=Vs(e,1/n,r),o!==void 0&&(e=Vs(e,1/o,r)),e}function rD(e,t=0,n=1,r=.5,o,i=e,a=e){if($n.test(t)&&(t=parseFloat(t),t=ut(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ut(i.min,i.max,r);e===i&&(s-=t),e.min=Tx(e.min,t,n,s,o),e.max=Tx(e.max,t,n,s,o)}function Ex(e,t,[n,r,o],i,a){rD(e,t[n],t[r],t[o],t.scale,i,a)}const oD=["x","scaleX","originX"],iD=["y","scaleY","originY"];function kx(e,t,n,r){Ex(e.x,t,oD,n?n.x:void 0,r?r.x:void 0),Ex(e.y,t,iD,n?n.y:void 0,r?r.y:void 0)}function Cx(e){return e.translate===0&&e.scale===1}function Px(e){return Cx(e.x)&&Cx(e.y)}function Ax(e,t){return e.min===t.min&&e.max===t.max}function aD(e,t){return Ax(e.x,t.x)&&Ax(e.y,t.y)}function Ix(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _x(e,t){return Ix(e.x,t.x)&&Ix(e.y,t.y)}function Ox(e){return Ut(e.x)/Ut(e.y)}function Mx(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class sD{constructor(){this.members=[]}add(t){Nu(this.members,t),t.scheduleRender()}remove(t){if(Es(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)}}function lD(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:b}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),b&&(r+=`skewY(${b}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const Rd=["","X","Y","Z"],cD={visibility:"hidden"},uD=1e3;let dD=0;function Hd(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Dx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ct,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Dx(r)}function Nx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=dD++,this.animationId=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.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(hD),this.nodes.forEach(bD),this.nodes.forEach(xD),this.nodes.forEach(mD)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new XM)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Fu),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=wd(a)&&!mb(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=QM(d,250),js.hasAnimatedSinceResize&&(js.hasAnimatedSinceResize=!1,this.nodes.forEach(Fx))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||c.getDefaultTransition()||kD,{onLayoutAnimationStart:g,onLayoutAnimationComplete:m}=c.getProps(),v=!this.targetLayout||!_x(this.targetLayout,f),y=!d&&p;if(this.options.layoutRoot||this.resumeFrom||y||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...md(b,"layout"),onPlay:g,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else d||Fx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),or(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(wD),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Dx(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:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Lx);return}this.isUpdating||this.nodes.forEach(vD),this.isUpdating=!1,this.nodes.forEach(yD),this.nodes.forEach(fD),this.nodes.forEach(pD),this.clearAllSnapshots();const s=Qt.now();Bt.delta=nr(0,1e3/60,s-Bt.timestamp),Bt.timestamp=s,Bt.isProcessing=!0,Bu.update.process(Bt),Bu.preRender.process(Bt),Bu.render.process(Bt),Bt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gD),this.sharedNodes.forEach(SD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ut(this.snapshot.measuredBox.x)&&!Ut(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 a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!Px(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||Qr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),CD(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return yt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(PD))){const{scroll:c}=this.root;c&&(Ho(s.x,c.offset.x),Ho(s.y,c.offset.y))}return s}removeElementScroll(a){const s=yt();if(hn(s,a),this.scroll?.wasRoot)return s;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(s,a),Ho(s.x,u.offset.x),Ho(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=yt();hn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Wo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Qr(u.latestValues)&&Wo(l,u.latestValues)}return Qr(this.latestValues)&&Wo(l,this.latestValues),l}removeTransform(a){const s=yt();hn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Qr(c.latestValues))continue;Vd(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();hn(u,d),kx(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Qr(this.latestValues)&&kx(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Bt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||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))){if(this.resolvedRelativeTargetAt=Bt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Qi(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_M(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hn(this.target,this.layout.layoutBox),Qb(this.target,this.targetDelta)):hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Qi(this.relativeTargetOrigin,this.target,p.target),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Vd(this.parent.latestValues)||Gb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Bt.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,p=this.treeScale.y;OM(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=yt());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sx(this.prevProjectionDelta.x,this.projectionDelta.x),Sx(this.prevProjectionDelta.y,this.projectionDelta.y)),Xi(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==p||!Mx(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mx(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ro(),this.projectionDelta=Ro(),this.projectionDeltaWithTransform=Ro()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ro();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=yt(),f=l?l.source:void 0,b=this.layout?this.layout.source:void 0,g=f!==b,m=this.getStack(),v=!m||m.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(ED));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const w=T/1e3;Vx(d.x,a.x,w),Vx(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),TD(this.relativeTarget,this.relativeTargetOrigin,p,w),x&&aD(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),hn(x,this.relativeTarget)),g&&(this.animationValues=u,eD(u,c,this.latestValues,w,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(or(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ct.update(()=>{js.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zr(0)),this.currentAnimation=mx(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&Rx(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();const d=Ut(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=Ut(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}hn(s,l),Wo(s,u),Xi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new sD),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Hd("z",a,c,this.animationValues);for(let u=0;u<Rd.length;u++)Hd(`rotate${Rd[u]}`,a,c,this.animationValues),Hd(`skew${Rd[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return cD;const s={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Fs(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Fs(a?.pointerEvents)||""),this.hasProjected&&!Qr(this.latestValues)&&(f.transform=l?l({},""):"none",this.hasProjected=!1),f}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=lD(this.projectionDeltaWithTransform,this.treeScale,u),l&&(s.transform=l(u,s.transform));const{x:d,y:p}=this.projectionDelta;s.transformOrigin=`${d.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 f in Ui){if(u[f]===void 0)continue;const{correct:b,applyTo:g,isCSSVariable:m}=Ui[f],v=s.transform==="none"?u[f]:b(u[f],c);if(g){const y=g.length;for(let x=0;x<y;x++)s[g[x]]=v}else m?this.options.visualElement.renderState.vars[f]=v:s[f]=v}return this.options.layoutId&&(s.pointerEvents=c===this?Fs(a?.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Lx),this.root.sharedNodes.clear()}}}function fD(e){e.updateLayout()}function pD(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"?pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],p=Ut(d);d.min=n[u].min,d.max=d.min+p}):Rx(o,t.layoutBox,n)&&pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],p=Ut(n[u]);d.max=d.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+p)});const a=Ro();Xi(a,n,t.layoutBox);const s=Ro();i?Xi(s,e.applyTransform(r,!0),t.measuredBox):Xi(s,n,t.layoutBox);const l=!Px(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:p}=u;if(d&&p){const f=yt();Qi(f,t.layoutBox,d.layoutBox);const b=yt();Qi(b,n,p.layoutBox),_x(f,b)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=f,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function hD(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 mD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gD(e){e.clearSnapshot()}function Lx(e){e.clearMeasurements()}function vD(e){e.isLayoutDirty=!1}function yD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Fx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function bD(e){e.resolveTargetDelta()}function xD(e){e.calcProjection()}function wD(e){e.resetSkewAndRotation()}function SD(e){e.removeLeadSnapshot()}function Vx(e,t,n){e.translate=ut(t.translate,0,n),e.scale=ut(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $x(e,t,n,r){e.min=ut(t.min,n.min,r),e.max=ut(t.max,n.max,r)}function TD(e,t,n,r){$x(e.x,t.x,n.x,r),$x(e.y,t.y,n.y,r)}function ED(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const kD={duration:.45,ease:[.4,0,.1,1]},jx=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),zx=jx("applewebkit/")&&!jx("chrome/")?Math.round:dn;function Bx(e){e.min=zx(e.min),e.max=zx(e.max)}function CD(e){Bx(e.x),Bx(e.y)}function Rx(e,t,n){return e==="position"||e==="preserve-aspect"&&!IM(Ox(t),Ox(n),.2)}function PD(e){return e!==e.root&&e.scroll?.wasRoot}const AD=Nx({attachResizeListener:(e,t)=>Ki(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wd={current:void 0},Hx=Nx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wd.current){const e=new AD({});e.mount(window),e.setOptions({layoutScroll:!0}),Wd.current=e}return Wd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ID={pan:{Feature:UM},drag:{Feature:qM,ProjectionNode:Hx,MeasureLayout:hx}};function Wx(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&&ct.postRender(()=>i(t,Gi(t)))}class _D extends Sr{mount(){const{current:t}=this.node;t&&(this.unmount=eO(t,(n,r)=>(Wx(this.node,r,"Start"),o=>Wx(this.node,o,"End"))))}unmount(){}}class OD extends Sr{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=Fi(Ki(this.node.current,"focus",()=>this.onFocus()),Ki(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function qx(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&&ct.postRender(()=>i(t,Gi(t)))}class MD extends Sr{mount(){const{current:t}=this.node;t&&(this.unmount=oO(t,(n,r)=>(qx(this.node,r,"Start"),(o,{success:i})=>qx(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const qd=new WeakMap,Ud=new WeakMap,DD=e=>{const t=qd.get(e.target);t&&t(e)},ND=e=>{e.forEach(DD)};function LD({root:e,...t}){const n=e||document;Ud.has(n)||Ud.set(n,{});const r=Ud.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(ND,{root:e,...t})),r[o]}function FD(e,t,n){const r=LD(t);return qd.set(e,n),r.observe(e),()=>{qd.delete(e),r.unobserve(e)}}const VD={some:0,all:1};class $D extends Sr{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,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:VD[o]},s=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(),p=c?u:d;p&&p(l)};return FD(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(jD(t,n))&&this.startObserver()}unmount(){}}function jD({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const zD={inView:{Feature:$D},tap:{Feature:MD},focus:{Feature:OD},hover:{Feature:_D}},BD={layout:{ProjectionNode:Hx,MeasureLayout:hx}},Yd={current:null},Ux={current:!1};function RD(){if(Ux.current=!0,!!Du)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Yd.current=e.matches;e.addListener(t),t()}else Yd.current=!1}const ea=new WeakMap;function HD(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Ot(o))e.addValue(r,o);else if(Ot(i))e.addValue(r,Zr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Zr(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Yx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Kx{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fd,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 p=Qt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ct.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;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=s,this.blockInitialAnimation=!!i,this.isControllingVariants=Ls(n),this.isVariantNode=Eb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in d){const f=d[p];l[p]!==void 0&&Ot(f)&&f.set(l[p],!1)}}mount(t){this.current=t,ea.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)),Ux.current||RD(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Yd.current,process.env.NODE_ENV!=="production"&&Vu(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),or(this.notifyUpdate),or(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=$o.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ct.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),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 zo){const n=zo[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):yt()}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<Yx.length;r++){const o=Yx[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=HD(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=Zr(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"&&(ty(r)||ry(r))?r=parseFloat(r):!sO(r)&&wr.test(n)&&(r=ib(t,n)),this.setBaseTarget(t,Ot(r)?r.get():r)),Ot(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=Id(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&&!Ot(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 Fu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Gx extends Kx{constructor(){super(...arguments),this.KeyframeResolver=Z_}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[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;Ot(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Zx(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}function WD(e){return window.getComputedStyle(e)}class Xx extends Gx{constructor(){super(...arguments),this.type="html",this.renderInstance=Zx}readValueFromInstance(t,n){if($o.has(n))return this.projection?.isProjecting?sd(n):p_(t,n);{const r=WD(t),o=(Ru(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return nx(t,n)}build(t,n,r){Cd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return _d(t,n,r)}}const Qx=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"]);function qD(e,t,n,r){Zx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Qx.has(o)?o:kd(o),t.attrs[o])}class Jx extends Gx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($o.has(n)){const r=ob(n);return r&&r.default||0}return n=Qx.has(n)?n:kd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Fb(t,n,r)}build(t,n,r){Ob(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){qD(t,n,r,o)}mount(t){this.isSVGTag=Db(t.tagName),super.mount(t)}}const UD=(e,t)=>Ad(e)?new Jx(t):new Xx(t,{allowProjection:e!==S.Fragment}),YD=GO({...wM,...zD,...ID,...BD},UD),ze=wO(YD);function KD(e){return S.useEffect(()=>()=>e(),[])}function qo(e){const t=xn(()=>Zr(e)),{isStatic:n}=S.useContext(jo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function e0(e,t){const n=qo(t()),r=()=>n.set(t());return r(),Ss(()=>{const o=()=>ct.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),or(r)}}),n}function GD(e){Wi.current=[],e();const t=e0(Wi.current,e);return Wi.current=void 0,t}function ZD(e,t,n,r){if(typeof e=="function")return GD(e);const o=typeof t=="function"?t:iO(t,n,r);return Array.isArray(e)?t0(e,o):t0([e],([i])=>o(i))}function t0(e,t){const n=xn(()=>[]);return e0(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Kd(e){return typeof e=="object"&&!Array.isArray(e)}function n0(e,t,n,r){return typeof e=="string"&&Kd(t)?ab(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function XD(e,t,n){return e*(t+1)}function r0(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 QD(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Es(e,o),r--)}}function JD(e,t,n,r,o,i){QD(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ut(o,i,r[a]),easing:gy(n,a)})}function eN(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function tN(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const nN="easeInOut",rN=20;function oN(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const b=e[f];if(typeof b=="string"){c.set(b,d);continue}else if(!Array.isArray(b)){c.set(b.name,r0(d,b.at,u,c));continue}let[g,m,v={}]=b;v.at!==void 0&&(d=r0(d,v.at,u,c));let y=0;const x=(T,w,E,k=0,C=0)=>{const O=iN(T),{delay:_=0,times:L=$y(O),type:D="keyframes",repeat:z,repeatType:A,repeatDelay:N=0,...H}=w;let{ease:M=t.ease||"easeOut",duration:P}=w;const $=typeof _=="function"?_(k,C):_,F=O.length,U=pd(D)?D:o?.[D||"keyframes"];if(F<=2&&U){let te=100;if(F===2&&lN(O)){const R=O[1]-O[0];te=Math.abs(R)}const ne={...H};P!==void 0&&(ne.duration=fn(P));const J=Dy(ne,te,U);M=J.ease,P=J.duration}P??(P=i);const G=d+$;L.length===1&&L[0]===0&&(L[1]=1);const B=L.length-O.length;if(B>0&&Vy(L,B),O.length===1&&O.unshift(null),z){on(z<rN,"Repeat count too high, must be less than 20"),P=XD(P,z);const te=[...O],ne=[...L];M=Array.isArray(M)?[...M]:[M];const J=[...M];for(let R=0;R<z;R++){O.push(...te);for(let q=0;q<te.length;q++)L.push(ne[q]+(R+1)),M.push(q===0?"linear":gy(J,q-1))}eN(L,z)}const Z=G+P;JD(E,O,M,L,G,Z),y=Math.max($+P,y),p=Math.max(Z,p)};if(Ot(g)){const T=o0(g,s);x(m,v,i0("default",T))}else{const T=n0(g,m,r,l),w=T.length;for(let E=0;E<w;E++){m=m,v=v;const k=T[E],C=o0(k,s);for(const O in m)x(m[O],aN(v,O),i0(O,C),E,w)}}u=d,d+=y}return s.forEach((f,b)=>{for(const g in f){const m=f[g];m.sort(tN);const v=[],y=[],x=[];for(let w=0;w<m.length;w++){const{at:E,value:k,easing:C}=m[w];v.push(k),y.push(Do(0,p,E)),x.push(C||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(nN)),y[y.length-1]!==1&&(y.push(1),v.push(null)),a.has(b)||a.set(b,{keyframes:{},transition:{}});const T=a.get(b);T.keyframes[g]=v,T.transition[g]={...t,duration:p,ease:x,times:y,...n}}}),a}function o0(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function i0(e,t){return t[e]||(t[e]=[]),t[e]}function iN(e){return Array.isArray(e)?e:[e]}function aN(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const sN=e=>typeof e=="number",lN=e=>e.every(sN);function cN(e,t){return e in t}class uN extends Kx{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(cN(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 yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function dN(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=wd(e)&&!mb(e)?new Jx(t):new Xx(t);n.mount(e),ea.set(e,n)}function fN(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new uN(t);n.mount(e),ea.set(e,n)}function pN(e,t){return Ot(e)||typeof e=="number"||typeof e=="string"&&!Kd(t)}function a0(e,t,n,r){const o=[];if(pN(e,t))o.push(mx(e,Kd(t)&&t.default||t,n&&(n.default||n)));else{const i=n0(e,t,r),a=i.length;on(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?dN:fN;ea.has(l)||c(l);const u=ea.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...Nd(u,{...t,transition:d},{}))}}return o}function hN(e,t,n){const r=[];return oN(e,t,n,{spring:Ri}).forEach(({keyframes:i,transition:a},s)=>{r.push(...a0(s,i,a))}),r}function mN(e){return Array.isArray(e)&&e.some(Array.isArray)}function gN(e){function t(n,r,o){let i=[];mN(n)?i=hN(n,r,e):i=a0(n,r,o,e);const a=new $_(i);return e&&e.animations.push(a),a}return t}function s0(){const e=xn(()=>({current:null,animations:[]})),t=xn(()=>gN(e));return KD(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class vN{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)})}}const yN=()=>new vN;function bN(){return xn(yN)}const l0=S.createContext(null);function xN(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,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=ut(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?mI(e,o,o+i):e}function wN({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=xn(()=>ze[t]),l=[],c=S.useRef(!1);on(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(b=>d===b.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(TN)},updateOrder:(d,p,f)=>{if(c.current)return;const b=xN(l,d,p,f);l!==b&&(c.current=!0,r(b.map(SN).filter(g=>o.indexOf(g)!==-1)))}};return S.useEffect(()=>{c.current=!1}),h.jsx(s,{...i,ref:a,ignoreStrict:!0,children:h.jsx(l0.Provider,{value:u,children:e})})}const c0=S.forwardRef(wN);function SN(e){return e.value}function TN(e,t){return e.layout.min-t.layout.min}function u0(e,t=0){return Ot(e)?e:qo(t)}function EN({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=xn(()=>ze[r]),c=S.useContext(l0),u={x:u0(t.x),y:u0(t.y)},d=ZD([u.x,u.y],([g,m])=>g||m?1:"unset");on(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:b}=c;return h.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,m)=>{const{velocity:v}=m;v[p]&&b(n,u[p].get(),v[p]),o&&o(g,m)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const d0=S.forwardRef(EN);function kN(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function CN(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:kN(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=zu(r)(l/c)*c}return t+l}}var zs={exports:{}},Gd={},Bs={exports:{}},Zd={};/**
191
- * @license React
192
- * use-sync-external-store-shim.production.js
193
- *
194
- * Copyright (c) Meta Platforms, Inc. and affiliates.
195
- *
196
- * This source code is licensed under the MIT license found in the
197
- * LICENSE file in the root directory of this source tree.
198
- */var f0;function PN(){if(f0)return Zd;f0=1;var e=S;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),b=r({inst:{value:f,getSnapshot:p}}),g=b[0].inst,m=b[1];return i(function(){g.value=f,g.getSnapshot=p,l(g)&&m({inst:g})},[d,f,p]),o(function(){return l(g)&&m({inst:g}),d(function(){l(g)&&m({inst:g})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Zd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Zd}var Xd={};/**
199
- * @license React
200
- * use-sync-external-store-shim.development.js
201
- *
202
- * Copyright (c) Meta Platforms, Inc. and affiliates.
203
- *
204
- * This source code is licensed under the MIT license found in the
205
- * LICENSE file in the root directory of this source tree.
206
- */var p0;function AN(){return p0||(p0=1,process.env.NODE_ENV!=="production"&&function(){function e(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}function t(f,b){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 g=b();if(!d){var m=b();i(g,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=a({inst:{value:g,getSnapshot:b}});var v=m[0].inst,y=m[1];return l(function(){v.value=g,v.getSnapshot=b,n(v)&&y({inst:v})},[f,g,b]),s(function(){return n(v)&&y({inst:v}),f(function(){n(v)&&y({inst:v})})},[f]),c(g),g}function n(f){var b=f.getSnapshot;f=f.value;try{var g=b();return!i(f,g)}catch{return!0}}function r(f,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Xd.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Xd}var h0;function m0(){return h0||(h0=1,process.env.NODE_ENV==="production"?Bs.exports=PN():Bs.exports=AN()),Bs.exports}/**
207
- * @license React
208
- * use-sync-external-store-shim/with-selector.production.js
209
- *
210
- * Copyright (c) Meta Platforms, Inc. and affiliates.
211
- *
212
- * This source code is licensed under the MIT license found in the
213
- * LICENSE file in the root directory of this source tree.
214
- */var g0;function IN(){if(g0)return Gd;g0=1;var e=S,t=m0();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,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Gd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=s(function(){function v(E){if(!y){if(y=!0,x=E,E=p(E),f!==void 0&&g.hasValue){var k=g.value;if(f(k,E))return T=k}return T=E}if(k=T,r(x,E))return k;var C=p(E);return f!==void 0&&f(k,C)?(x=E,k):(x=E,T=C)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var m=o(c,b[0],b[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},Gd}var Qd={};/**
215
- * @license React
216
- * use-sync-external-store-shim/with-selector.development.js
217
- *
218
- * Copyright (c) Meta Platforms, Inc. and affiliates.
219
- *
220
- * This source code is licensed under the MIT license found in the
221
- * LICENSE file in the root directory of this source tree.
222
- */var v0;function _N(){return v0||(v0=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=S,n=m0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Qd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=s(function(){function v(E){if(!y){if(y=!0,x=E,E=p(E),f!==void 0&&g.hasValue){var k=g.value;if(f(k,E))return T=k}return T=E}if(k=T,r(x,E))return k;var C=p(E);return f!==void 0&&f(k,C)?(x=E,k):(x=E,T=C)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var m=o(c,b[0],b[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Qd}var y0;function ON(){return y0||(y0=1,process.env.NODE_ENV==="production"?zs.exports=IN():zs.exports=_N()),zs.exports}ON();var Uo=function(){return Uo=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},Uo.apply(this,arguments)};function ta(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function b0(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 Yo=function(e){var t=S.useRef(e??{});return S.useEffect(function(){return void(t.current=e)},[e]),t},MN=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},DN=function(e){return Object.entries(e)},x0=function(e){return e instanceof Promise},w0=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)},Uo(Uo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},NN=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,b0([],ta(a),!1)),u=function(d,p){return n(function(f){return w0(d,f,i,p)})};return x0(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))}},LN=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,b0([],ta(a),!1)),c=function(u){return n(function(d){return w0(u,d,i,o.current)})};return x0(l)?l.then(function(u){return c(u)}):c(l)}},Jd=function(e,t,n){var r,o,i,a=ta(S.useState(function(){return e}),2),s=a[0],l=a[1],c=Yo(s),u=Yo((r=n?.props)!==null&&r!==void 0?r:{}),d=Yo(t),p=Yo((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),f=Yo((i=n?.interceptor)!==null&&i!==void 0?i:[]),b=S.useRef(e),g=MN(s),m=Yo(g),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var T=v.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var y=ta(S.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:b.current,previousState:function(){return m.current}});return DN(w).reduce(function(E,k){var C,O=ta(k,2),_=O[0],L=O[1];return Uo(Uo({},E),(C={},C[_]=n?.debug?NN(_,L,l,T,v,f.current):LN(_,L,l,T,v,f.current),C))},{})}),1),x=y[0];return[s,x,u.current]},FN=Object.defineProperty,S0=Object.getOwnPropertySymbols,VN=Object.prototype.hasOwnProperty,$N=Object.prototype.propertyIsEnumerable,T0=(e,t,n)=>t in e?FN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jN=(e,t)=>{for(var n in t||(t={}))VN.call(t,n)&&T0(e,n,t[n]);if(S0)for(var n of S0(t))$N.call(t,n)&&T0(e,n,t[n]);return e},ef=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},zN=(e,t,n,r)=>Hs(ef,e,t,n,r),Ko=e=>typeof e=="object",Tr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Ko(e)&&!Ko(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=>Tr(e[r],t[r]))},BN=(e,t)=>(Ko(e)||Array.isArray(e))&&t?e[t]:e,RN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Rs=e=>/[0-9.]+/.test(e),E0=e=>["string","number"].includes(typeof e),k0=e=>e==null||e?.length===0||e==="",C0={eq:Tr,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:k0,notEmpty:e=>!k0(e),in:(e,t)=>ef(t,n=>Tr(e,n)),notIn:(e,t)=>P0(t,n=>!Tr(e,n))},HN=e=>{if(e in C0)return C0[e];throw new Error("Linq - Symbol not found")},Go=(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},Hs=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=HN(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},WN=(e,t,n,r)=>Hs(Go,e,t,n,r),P0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},qN=(e,t,n,r)=>Hs(P0,e,t,n,r),A0=e=>{if(e===null)return null;const t=jN({},e);return Object.keys(t).forEach(n=>t[n]=Ko(e[n])?A0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},I0=(e,t)=>{if(Ko(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Tr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Tr(t,r))return!0}return!1},UN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},YN=e=>Go(e,(t,n,r)=>Ko(t)?n===r.findIndex(o=>Tr(o,t)):n===r.indexOf(t)),KN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},_0=(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())},GN=(e,t)=>_0(e,n=>n[t]),O0=(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},ZN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},XN=(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 Rs(e)&&Rs(t)?r.map(a=>Number.parseInt(a)):r},tf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Rs(e)&&Rs(t)){const o=[],[i,a]=ZN(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return XN(e,t,r)},QN=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?tf(r,o,1):tf(r,i,Number.parseInt(o,10))}return E0(e)&&E0(t)?tf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},nf=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},M0=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},JN=(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)},e2=(e,t,n,r)=>Hs(JN,e,t,n,r),D0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(RN(t))},N0=(e=>(e.Asc="asc",e.Desc="desc",e))(N0||{}),t2=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),n2=(e,t)=>e.sort(t2(t)),r2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Go(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},o2=class Rp{constructor(t=[]){this.array=t}static Range(...t){return QN(...t)}static New(t){return new Rp(t)}Where(t,n,r){return this.array=WN(this.array,t,n,r),this}Some(t,n,r){return zN(this.array,t,n,r)}All(t,n,r){return qN(this.array,t,n,r)}Reverse(){return this.array=M0(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=e2(this.array,t,n,r),this}Distinct(){return this.array=YN(this.array),this}First(t){return t===void 0?this.array[0]:KN(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?nf((n,r)=>n+r,0,this.array):nf((n,r)=>n+BN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return GN(this.array,t)}GroupWith(t){return _0(this.array,t)}Except(t){return Go(this.array,n=>!I0(t,n))}Intersect(t){return Go(this.array,n=>I0(t,n))}OrderBy(t,n){let r;return r=t?D0(this.array,t):this.array.toSorted(),this.array=n==="desc"?M0(r):r,this}Includes(t){return ef(this.array,n=>Tr(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 nf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(O0(this.array,n=>[t,n]))}Zip(t,n){return O0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Go(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Rp(A0(this.array))}ToObject(t){return UN(this.array,t)}Sort(t){return Array.isArray(t)?n2(this.array,t):D0(this.array,t)}Unique(t){return r2(this.array,t)}},L0=o2;const Ws=0,Er=1,Zo=2,F0=4;function V0(e){return()=>e}function i2(e){e()}function na(e,t){return n=>e(t(n))}function $0(e,t){return()=>e(t)}function a2(e,t){return n=>e(t,n)}function rf(e){return e!==void 0}function s2(...e){return()=>{e.map(i2)}}function Xo(){}function qs(e,t){return t(e),e}function l2(e,t){return t(e)}function dt(...e){return e}function Qe(e,t){return e(Er,t)}function De(e,t){e(Ws,t)}function of(e){e(Zo)}function Et(e){return e(F0)}function be(e,t){return Qe(e,a2(t,Ws))}function Tn(e,t){const n=e(Er,r=>{n(),t(r)});return n}function j0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function z0(e,t){return e===t}function ft(e=z0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>na(t,e)}function jn(e){return t=>()=>{t(e)}}function re(e,...t){const n=c2(...t);return(r,o)=>{switch(r){case Zo:of(e);return;case Er:return Qe(e,n(o))}}}function zn(e,t){return n=>r=>{n(t=e(t,r))}}function Jr(e){return t=>n=>{e>0?e--:t(n)}}function ir(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function $e(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function c2(...e){return t=>e.reduceRight(l2,t)}function u2(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Er:return i?n===i?void 0:(r(),n=i,t=Qe(e,i),t):(r(),Xo);case Zo:r(),n=null;return}}}function ae(e){let t=e;const n=He();return(r,o)=>{switch(r){case Ws:t=o;break;case Er:{o(t);break}case F0:return t}return n(r,o)}}function Wt(e,t){return qs(ae(t),n=>be(e,n))}function He(){const e=[];return(t,n)=>{switch(t){case Ws:e.slice().forEach(r=>{r(n)});return;case Zo:e.splice(0,e.length);return;case Er:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function an(e){return qs(He(),t=>be(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:d2(),singleton:n}}const d2=()=>Symbol();function f2(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function At(...e){const t=He(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{n[a]=l,r=r|s,r===o&&De(t,n)})}),function(i,a){switch(i){case Zo:{of(t);return}case Er:return r===o&&a(n),Qe(t,a)}}}function ke(e,t=z0){return re(e,ft(t))}function af(...e){return function(t,n){switch(t){case Zo:return;case Er:return s2(...e.map(r=>Qe(r,n)))}}}var Jt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Jt||{});const p2={0:"debug",3:"error",1:"log",2:"warn"},h2=()=>typeof globalThis>"u"?window:globalThis,kr=qe(()=>{const e=ae(3);return{log:ae((t,n,r=1)=>{var o;const i=(o=h2().VIRTUOSO_LOG_LEVEL)!=null?o:Et(e);r>=i&&console[p2[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Bn(e,t,n){return sf(e,t,n).callbackRef}function sf(e,t,n){const r=S.useRef(null);let o=a=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return o=a=>{a&&t?(i?.observe(a),r.current=a):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function B0(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=m2(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let b;f&&(b=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?b.scrollX||b.document.documentElement.scrollLeft:b.scrollY||b.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:f?s?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?b.innerWidth:b.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:v}),i?.(s?R0("column-gap",getComputedStyle(u).columnGap,o):R0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return sf(c,n,l)}function m2(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},Jt.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 R0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}function lf(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),b=c.top-f.top;p=f.height-Math.max(0,b),d=b+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=sf(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const Yt=qe(()=>{const e=He(),t=He(),n=ae(0),r=He(),o=ae(0),i=He(),a=He(),s=ae(0),l=ae(0),c=ae(0),u=ae(0),d=He(),p=He(),f=ae(!1),b=ae(!1),g=ae(!1);return be(re(e,pe(({scrollTop:m})=>m)),t),be(re(e,pe(({scrollHeight:m})=>m)),a),be(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:b,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ra={lvl:0};function H0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function at(e){return e===ra}function oa(e,t){if(!at(e))return t===e.k?e.v:t<e.k?oa(e.l,t):oa(e.r,t)}function En(e,t,n="k"){if(at(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=En(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return En(e.l,t,n)}function sn(e,t,n){return at(e)?U0(t,n,1):t===e.k?Mt(e,{k:t,v:n}):t<e.k?Y0(Mt(e,{l:sn(e.l,t,n)})):Y0(Mt(e,{r:sn(e.r,t,n)}))}function Qo(){return ra}function Us(e,t,n){if(at(e))return[];const r=En(e,t)[0];return g2(uf(e,r,n))}function cf(e,t){if(at(e))return ra;const{k:n,l:r,r:o}=e;if(t===n){if(at(r))return o;if(at(o))return r;{const[i,a]=q0(r);return Ys(Mt(e,{k:i,l:W0(r),v:a}))}}else return t<n?Ys(Mt(e,{l:cf(r,t)})):Ys(Mt(e,{r:cf(o,t)}))}function eo(e){return at(e)?[]:[...eo(e.l),{k:e.k,v:e.v},...eo(e.r)]}function uf(e,t,n){if(at(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(uf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(uf(i,t,n))),s}function Ys(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(df(t))return K0(Mt(e,{lvl:n-1}));if(!at(t)&&!at(t.r))return Mt(t.r,{l:Mt(t,{r:t.r.l}),lvl:n,r:Mt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(df(e))return ff(Mt(e,{lvl:n-1}));if(!at(r)&&!at(r.l)){const o=r.l,i=df(o)?r.lvl-1:r.lvl;return Mt(o,{l:Mt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:ff(Mt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Mt(e,t){return U0(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 W0(e){return at(e.r)?e.l:Ys(Mt(e,{r:W0(e.r)}))}function df(e){return at(e)||e.lvl>e.r.lvl}function q0(e){return at(e.r)?[e.k,e.v]:q0(e.r)}function U0(e,t,n,r=ra,o=ra){return{k:e,l:r,lvl:n,r:o,v:t}}function Y0(e){return ff(K0(e))}function K0(e){const{l:t}=e;return!at(t)&&t.lvl===e.lvl?Mt(t,{r:Mt(e,{l:t.r})}):e}function ff(e){const{lvl:t,r:n}=e;return!at(n)&&!at(n.r)&&n.lvl===t&&n.r.lvl===t?Mt(n,{l:Mt(e,{r:n.l}),lvl:t+1}):e}function g2(e){return H0(e,({k:t,v:n})=>({index:t,value:n}))}function G0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ia(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const pf=qe(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function Z0(e,t,n){return e[Ks(e,t,n)]}function Ks(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-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 v2(e,t,n,r){const o=Ks(e,t,r),i=Ks(e,n,r,o);return e.slice(o,i+1)}function kn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Gs(e){return!at(e.groupOffsetTree)}function hf({index:e},t){return t===e?0:t<e?-1:1}function y2(){return{groupIndices:[],groupOffsetTree:Qo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Qo()}}function b2(e,t){let n=at(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),at(e)){e=sn(e,0,i);continue}const s=Us(e,a-1,o+1);if(s.some(C2(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=cf(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=sn(e,o+1,p));c&&(e=sn(e,a,i))}return[e,n]}function x2(e){return typeof e.groupIndex<"u"}function w2({offset:e},t){return t===e?0:t<e?-1:1}function aa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=Z0(t,e,hf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function X0(e,t){if(!Gs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Q0(e,t,n){if(x2(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=X0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function S2(e,t,n,r=0){return r>0&&(t=Math.max(t,Z0(e,r,hf).offset)),H0(v2(e,t,n,w2),k2)}function T2(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Jt.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&at(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((b,g)=>sn(sn(b,g,p),g+1,f),a)}else[a,s]=b2(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=mf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>sn(p,f,aa(f,d,o)),Qo()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function E2(e){return eo(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 J0(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 mf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Ks(o,t-1,hf),s=o[l].offset;const c=En(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===En(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Us(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function k2(e){return{index:e.index,value:e}}function C2(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 P2={offsetHeight:"height",offsetWidth:"width"},Rn=qe(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),o=Wt(r,0),i=He(),a=He(),s=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((w,E)=>kn(w,P2[E])),p=ae(void 0),f=ae(0),b=y2(),g=Wt(re(n,$e(l,e,f),zn(T2,b),ft()),b),m=Wt(re(l,ft(),zn((w,E)=>({current:E,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);be(re(l,Ce(w=>w.length>0),$e(g,f),pe(([w,E,k])=>{const C=w.reduce((O,_,L)=>sn(O,_,aa(_,E.offsetTree,k)||L),Qo());return{...E,groupIndices:w,groupOffsetTree:C}})),g),be(re(r,$e(g),Ce(([w,{lastIndex:E}])=>w<E),pe(([w,{lastIndex:E,lastSize:k}])=>[{endIndex:E,size:k,startIndex:w}])),n),be(c,u);const v=Wt(re(c,pe(w=>w===void 0)),!0);be(re(u,Ce(w=>w!==void 0&&at(Et(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=an(re(n,$e(g),zn(({sizes:w},[E,k])=>({changed:k!==w,sizes:k}),{changed:!1,sizes:b}),pe(w=>w.changed)));Qe(re(s,zn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:E}=Et(g);if(w>0)De(t,!0),De(i,w+J0(w,E));else if(w<0){const k=Et(m);k.length>0&&(w-=J0(-w,k)),De(a,w)}}),Qe(re(s,$e(e)),([w,E])=>{w<0&&E("`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:s},Jt.ERROR)});const x=an(i);be(re(i,$e(g),pe(([w,E])=>{const k=E.groupIndices.length>0,C=[],O=E.lastSize;if(k){const _=oa(E.sizeTree,0);let L=0,D=0;for(;L<w;){const A=E.groupIndices[D],N=E.groupIndices.length===D+1?1/0:E.groupIndices[D+1]-A-1;C.push({endIndex:A,size:_,startIndex:A}),C.push({endIndex:A+1+N-1,size:O,startIndex:A+1}),D++,L+=N+1}const z=eo(E.sizeTree);return L!==w&&z.shift(),z.reduce((A,{k:N,v:H})=>{let M=A.ranges;return A.prevSize!==0&&(M=[...A.ranges,{endIndex:N+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:N+w,prevSize:H,ranges:M}},{prevIndex:w,prevSize:0,ranges:C}).ranges}return eo(E.sizeTree).reduce((_,{k:L,v:D})=>({prevIndex:L+w,prevSize:D,ranges:[..._.ranges,{endIndex:L+w-1,size:_.prevSize,startIndex:_.prevIndex}]}),{prevIndex:0,prevSize:O,ranges:[]}).ranges})),n);const T=an(re(a,$e(g,f),pe(([w,{offsetTree:E},k])=>{const C=-w;return aa(C,E,k)})));return be(re(a,$e(g,f),pe(([w,E,k])=>{if(E.groupIndices.length>0){if(at(E.sizeTree))return E;let C=Qo();const O=Et(m);let _=0,L=0,D=0;for(;_<-w;){D=O[L];const z=O[L+1]-D-1;L++,_+=z+1}if(C=eo(E.sizeTree).reduce((z,{k:A,v:N})=>sn(z,Math.max(0,A+w),N),C),_!==-w){const z=oa(E.sizeTree,D);C=sn(C,0,z);const A=En(E.sizeTree,-w+1)[1];C=sn(C,1,A)}return{...E,sizeTree:C,...mf(E.offsetTree,0,C,k)}}else{const C=eo(E.sizeTree).reduce((O,{k:_,v:L})=>sn(O,Math.max(0,_+w),L),Qo());return{...E,sizeTree:C,...mf(E.offsetTree,0,C,k)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},dt(kr,pf),{singleton:!0});function A2(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const ew=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=He(),a=He(),s=an(re(i,pe(A2)));return be(re(s,pe(l=>l.totalCount)),n),be(re(s,pe(l=>l.groupIndices)),e),be(re(At(o,t,r),Ce(([l,c])=>Gs(c)),pe(([l,c,u])=>En(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ft(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},dt(Rn,Yt)),Cr=qe(([{log:e}])=>{const t=ae(!1),n=an(re(t,Ce(r=>r),ft()));return Qe(t,r=>{r&&Et(e)("props updated",{},Jt.DEBUG)}),{didMount:n,propsReady:t}},dt(kr),{singleton:!0}),I2=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function tw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!I2)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const sa=qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=He(),b=He(),g=ae(0);let m=null,v=null,y=null;function x(){m&&(m(),m=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),De(l,!1)}return be(re(f,$e(n,d,r,g,s,a,p),$e(e,i,o),pe(([[T,w,E,k,C,O,_,L],D,z,A])=>{const N=tw(T),{align:H,behavior:M,offset:P}=N,$=k-1,F=Q0(N,w,$);let U=aa(F,w.offsetTree,D)+O;H==="end"?(U+=z+En(w.sizeTree,F)[1]-E+A,F===$&&(U+=_)):H==="center"?U+=(z+En(w.sizeTree,F)[1]-E+A)/2:U-=C,P&&(U+=P);const G=B=>{x(),B?(L("retrying to scroll to",{location:T},Jt.DEBUG),De(f,T)):(De(b,!0),L("list did not change, scroll successful",{},Jt.DEBUG))};if(x(),M==="smooth"){let B=!1;y=Qe(t,Z=>{B=B||Z}),m=Tn(u,()=>{G(B)})}else m=Tn(re(t,_2(150)),G);return v=setTimeout(()=>{x()},1200),De(l,!0),L("scrolling from index to",{behavior:M,index:F,top:U},Jt.DEBUG),{behavior:M,top:U}})),c),{scrollTargetReached:b,scrollToIndex:f,topListHeight:g}},dt(Rn,Yt,kr),{singleton:!0});function _2(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function gf(e,t){e==0?t():requestAnimationFrame(()=>{gf(e-1,t)})}function vf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const la=qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=ae(!0),l=ae(0),c=ae(!0);return be(re(a,$e(l),Ce(([u,d])=>!!d),jn(!1)),s),be(re(a,$e(l),Ce(([u,d])=>!!d),jn(!1)),c),Qe(re(At(t,a),$e(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,b])=>u&&(!at(p)||rf(f))&&!d&&!b),$e(l)),([,u])=>{Tn(o,()=>{De(c,!0)}),gf(4,()=>{Tn(r,()=>{De(s,!0)}),De(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},dt(Rn,Yt,sa,Cr),{singleton:!0});function nw(e,t){return Math.abs(e-t)<1.01}const ca="up",ua="down",O2="none",M2={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},D2=0,da=qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=ae(!1),s=ae(!0),l=He(),c=He(),u=ae(4),d=ae(D2),p=Wt(re(af(re(ke(o),Jr(1),jn(!0)),re(ke(o),Jr(1),jn(!1),j0(100))),ft()),!1),f=Wt(re(af(re(n,jn(!0)),re(n,jn(!1),j0(200))),ft()),!1);be(re(At(ke(o),ke(d)),pe(([y,x])=>y<=x),ft()),s),be(re(s,ir(50)),c);const b=an(re(At(r,ke(i),ke(t),ke(e),ke(u)),zn((y,[{scrollHeight:x,scrollTop:T},w,E,k,C])=>{const O=T+w-x>-C,_={scrollHeight:x,scrollTop:T,viewportHeight:w};if(O){let D,z;return T>y.state.scrollTop?(D="SCROLLED_DOWN",z=y.state.scrollTop-T):(D="SIZE_DECREASED",z=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:D,scrollTopDelta:z,state:_}}let L;return _.scrollHeight>y.state.scrollHeight?L="SIZE_INCREASED":w<y.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:_}},M2),ft((y,x)=>y&&y.atBottom===x.atBottom))),g=Wt(re(r,zn((y,{scrollHeight:x,scrollTop:T,viewportHeight:w})=>{if(nw(y.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const E=x-(T+w)<1;return y.scrollTop!==T&&E?{changed:!0,jump:y.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(y=>y.changed),pe(y=>y.jump)),0);be(re(b,pe(y=>y.atBottom)),a),be(re(a,ir(50)),l);const m=ae(ua);be(re(r,pe(({scrollTop:y})=>y),ft(),zn((y,x)=>Et(f)?{direction:y.direction,prevScrollTop:x}:{direction:x<y.prevScrollTop?ca:ua,prevScrollTop:x},{direction:ua,prevScrollTop:0}),pe(y=>y.direction)),m),be(re(r,ir(50),jn(O2)),m);const v=ae(0);return be(re(p,Ce(y=>!y),jn(0)),v),be(re(o,ir(100),$e(p),Ce(([y,x])=>!!x),zn(([y,x],[T])=>[x,T],[0,0]),pe(([y,x])=>x-y)),v),{atBottomState:b,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:v}},dt(Yt)),Zs="top",Xs="bottom",rw="none";function ow(e,t,n){return typeof e=="number"?n===ca&&t===Zs||n===ua&&t===Xs?e:0:n===ca?t===Zs?e.main:e.reverse:t===Xs?e.main:e.reverse}function iw(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const yf=qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=He(),a=ae(0),s=ae(0),l=ae(0),c=Wt(re(At(ke(r),ke(o),ke(n),ke(i,ia),ke(l),ke(a),ke(t),ke(e),ke(s)),pe(([u,d,p,[f,b],g,m,v,y,x])=>{const T=u-y,w=m+v,E=Math.max(p-T,0);let k=rw;const C=iw(x,Zs),O=iw(x,Xs);return f-=y,f+=p+v,b+=p+v,b-=y,f>u+w-C&&(k=ca),b<u-E+d+O&&(k=ua),k!==rw?[Math.max(T-p-ow(g,Zs,k)-C,0),T-E-v+d+ow(g,Xs,k)+O]:null}),Ce(u=>u!=null),ft(ia)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},dt(Yt),{singleton:!0});function N2(e,t,n){if(Gs(t)){const r=X0(e,t);return[{index:En(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 bf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Qs(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,b=p-u;return{bottom:u,firstItemIndex:i,items:sw(e,o,i),offsetBottom:b,offsetTop:c,top:f,topItems:sw(t,o,i),topListHeight:t.reduce((g,m)=>m.size+g,0),totalCount:n}}function aw(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=vf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Qs(c,[],s,o,n,r)}function sw(e,t,n){if(e.length===0)return[];if(!Gs(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=[],a=Us(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.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}const to=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:b}])=>{const g=ae([]),m=ae(0),v=He();be(i.topItemsIndexes,g);const y=Wt(re(At(f,b,ke(l,ia),ke(o),ke(r),ke(c),u,ke(g),ke(t),ke(n),e),Ce(([E,k,,C,,,,,,,O])=>{const _=O&&O.length!==C;return E&&!k&&!_}),pe(([,,[E,k],C,O,_,L,D,z,A,N])=>{const H=O,{offsetTree:M,sizeTree:P}=H,$=Et(m);if(C===0)return{...bf,totalCount:C};if(E===0&&k===0)return $===0?{...bf,totalCount:C}:aw($,_,O,z,A,N||[]);if(at(P))return $>0?null:Qs(N2(vf(_,C),H,N),[],C,A,H,z);const F=[];if(D.length>0){const te=D[0],ne=D[D.length-1];let J=0;for(const R of Us(P,te,ne)){const q=R.value,X=Math.max(R.start,te),oe=Math.min(R.end,ne);for(let j=X;j<=oe;j++)F.push({data:N?.[j],index:j,offset:J,size:q}),J+=q}}if(!L)return Qs([],F,C,A,H,z);const U=D.length>0?D[D.length-1]+1:0,G=S2(M,E,k,U);if(G.length===0)return null;const B=C-1,Z=qs([],te=>{for(const ne of G){const J=ne.value;let R=J.offset,q=ne.start;const X=J.size;if(J.offset<E){q+=Math.floor((E-J.offset+A)/(X+A));const j=q-ne.start;R+=j*X+j*A}q<U&&(R+=(U-q)*X,q=U);const oe=Math.min(ne.end,B);for(let j=q;j<=oe&&!(R>=k);j++)te.push({data:N?.[j],index:j,offset:R,size:X}),R+=X+A}});return Qs(Z,F,C,A,H,z)}),Ce(E=>E!==null),ft()),bf);be(re(e,Ce(rf),pe(E=>E?.length)),o),be(re(y,pe(E=>E.topListHeight)),d),be(d,s),be(re(y,pe(E=>[E.top,E.bottom])),a),be(re(y,pe(E=>E.items)),v);const x=an(re(y,Ce(({items:E})=>E.length>0),$e(o,e),Ce(([{items:E},k])=>E[E.length-1].originalIndex===k-1),pe(([,E,k])=>[E-1,k]),ft(ia),pe(([E])=>E))),T=an(re(y,ir(200),Ce(({items:E,topItems:k})=>E.length>0&&E[0].originalIndex===k.length),pe(({items:E})=>E[0].index),ft())),w=an(re(y,Ce(({items:E})=>E.length>0),pe(({items:E})=>{let k=0,C=E.length-1;for(;E[k].type==="group"&&k<C;)k++;for(;E[C].type==="group"&&C>k;)C--;return{endIndex:E[C].index,startIndex:E[k].index}}),ft(G0)));return{endReached:x,initialItemCount:m,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},dt(Rn,ew,yf,la,sa,da,Cr,pf),{singleton:!0}),lw=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=He(),a=Wt(re(At(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(ke(a),i),{totalListHeight:a,totalListHeightChanged:i}},dt(Yt,to),{singleton:!0}),L2=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),r=Wt(re(At(n,e,t),Ce(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),ir(0),ft()),0);return{alignToBottom:n,paddingTopAddition:r}},dt(Yt,lw),{singleton:!0}),cw=qe(()=>({context:ae(null)})),F2=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,uw=qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=He();return be(re(u,$e(t,l,n,i,o,r,s),$e(e),pe(([[d,p,f,b,g,m,v,y],x])=>{const{align:T,behavior:w,calculateViewLocation:E=F2,done:k,...C}=d,O=Q0(d,p,b-1),_=aa(O,p.offsetTree,x)+g+m,L=_+En(p.sizeTree,O)[1],D=y+m,z=y+f-v,A=E({itemBottom:L,itemTop:_,locationParams:{align:T,behavior:w,...C},viewportBottom:z,viewportTop:D});return A?k&&Tn(re(a,Ce(N=>!N),Jr(Et(a)?1:2)),k):k&&k(),A}),Ce(d=>d!==null)),c),{scrollIntoView:u}},dt(Rn,Yt,sa,to,kr),{singleton:!0});function dw(e){return e?e==="smooth"?"smooth":"auto":!1}const V2=(e,t)=>typeof e=="function"?dw(e(t)):t&&dw(e),$2=qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:p},{scrollIntoView:f}])=>{const b=ae(!1),g=He();let m=null;function v(w){De(a,{align:"end",behavior:w,index:"LAST"})}Qe(re(At(re(ke(t),Jr(1)),l),$e(ke(b),i,s,d),pe(([[w,E],k,C,O,_])=>{let L=E&&O,D="auto";return L&&(D=V2(k,C||_),L=L&&!!D),{followOutputBehavior:D,shouldFollow:L,totalCount:w}}),Ce(({shouldFollow:w})=>w)),({followOutputBehavior:w,totalCount:E})=>{m&&(m(),m=null),Et(n)?requestAnimationFrame(()=>{Et(u)("following output to ",{totalCount:E},Jt.DEBUG),v(w)}):m=Tn(e,()=>{Et(u)("following output to ",{totalCount:E},Jt.DEBUG),v(w),m=null})});function y(w){const E=Tn(o,k=>{w&&!k.atBottom&&k.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Et(u)("scrolling to bottom due to increased size",{},Jt.DEBUG),v("auto"))});setTimeout(E,100)}Qe(re(At(ke(b),t,c),Ce(([w,,E])=>w&&E),zn(({value:w},[,E])=>({refreshed:w===E,value:E}),{refreshed:!1,value:0}),Ce(({refreshed:w})=>w),$e(b,t)),([,w])=>{Et(s)&&y(w!==!1)}),Qe(g,()=>{y(Et(b)!==!1)}),Qe(At(ke(b),o),([w,E])=>{w&&!E.atBottom&&E.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const x=ae(null),T=He();return be(af(re(ke(r),pe(w=>{var E;return(E=w?.length)!=null?E:0})),re(ke(t))),T),Qe(re(At(re(T,Jr(1)),l),$e(ke(x),s,d,p),pe(([[w,E],k,C,O,_])=>E&&C&&k?.({context:_,totalCount:w,scrollingInProgress:O})),Ce(w=>!!w),ir(0)),w=>{m&&(m(),m=null),Et(n)?requestAnimationFrame(()=>{Et(u)("scrolling into view",{}),De(f,w)}):m=Tn(e,()=>{Et(u)("scrolling into view",{}),De(f,w),m=null})}),{autoscrollToBottom:g,followOutput:b,scrollIntoViewOnChange:x}},dt(Rn,da,sa,la,Cr,kr,Yt,cw,uw)),j2=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(re(s,$e(i),Ce(([,l])=>l!==0),$e(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>aw(l,c,u,d,p,f))),a),{}),dt(Rn,la,to,Cr),{singleton:!0}),z2=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ae(0);return Qe(re(e,$e(r),Ce(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Tn(re(n,Jr(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{De(t,o)})})}),{initialScrollTop:r}},dt(Cr,Yt,to),{singleton:!0}),fw=qe(([{scrollVelocity:e}])=>{const t=ae(!1),n=He(),r=ae(!1);return be(re(e,$e(r,t,n),Ce(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),ft()),t),Qe(re(At(t,e,n),$e(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},dt(da),{singleton:!0}),xf=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),o=He(),i=ae(!1),a=ae(void 0);return be(re(At(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(re(t,$e(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},dt(Yt)),B2=qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=He(),u=ae(void 0),d=ae(null),p=ae(null);return be(s,d),be(l,p),Qe(re(c,$e(t,r,a,d,p,n)),([f,b,g,m,v,y,x])=>{const T=E2(b.sizeTree);m&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=x,f({ranges:T,scrollTop:g})}),be(re(u,Ce(rf),pe(R2)),o),be(re(i,$e(u),Ce(([,f])=>f!==void 0),ft(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},dt(Rn,Yt,la,Cr,xf));function R2(e){return{align:"start",index:0,offset:e.scrollTop}}const H2=qe(([{topItemsIndexes:e}])=>{const t=ae(0);return be(re(t,Ce(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},dt(to));function pw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const W2=pw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),q2=qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:b}])=>{const g=an(re(l,$e(a),zn(([,v,y,x],[{bottom:T,items:w,offsetBottom:E,totalCount:k},C])=>{const O=T+E;let _=0;return y===k&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(_=O-x,_!==0&&(_+=C))),[_,w,k,O]},[0,[],0,0]),Ce(([v])=>v!==0),$e(r,s,n,o,f,b),Ce(([,v,y,x,,,T])=>!T&&!x&&v!==0&&y===ca),pe(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},Jt.DEBUG),v))));function m(v){v>0?(De(t,{behavior:"auto",top:-v}),De(e,0)):(De(e,0),De(t,{behavior:"auto",top:-v}))}return Qe(re(g,$e(e,i)),([v,y,x])=>{x&&W2()?De(e,y-v):m(-v)}),Qe(re(At(Wt(i,!1),e,b),Ce(([v,y,x])=>!v&&!x&&y!==0),pe(([v,y])=>y),ir(1)),m),be(re(d,pe(v=>({top:-v}))),t),Qe(re(c,$e(p,u),pe(([v,{groupIndices:y,lastSize:x,sizeTree:T},w])=>{function E(k){return k*(x+w)}if(y.length===0)return E(v);{let k=0;const C=oa(T,0);let O=0,_=0;for(;O<v;){O++,k+=C;let L=y.length===_+1?1/0:y[_+1]-y[_]-1;O+L>v&&(k-=C,L=v-O+1),O+=L,k+=E(L),_++}return k}})),v=>{De(e,v),requestAnimationFrame(()=>{De(t,{top:v}),requestAnimationFrame(()=>{De(e,0),De(b,!1)})})}),{deviation:e}},dt(Yt,da,to,Rn,kr,pf)),U2=qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),dt(yf,j2,Cr,fw,lw,z2,L2,xf,uw,kr,cw)),hw=qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:b},g,m,v,{listState:y,topItemsIndexes:x,...T},{scrollToIndex:w},E,{topItemCount:k},{groupCounts:C},O])=>(be(T.rangeChanged,O.scrollSeekRangeChanged),be(re(O.windowViewportRect,pe(_=>_.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:C,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:b,sizeRanges:s,topItemCount:k,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...O,...g,sizes:l,...m}),dt(Rn,la,Yt,B2,$2,to,sa,q2,H2,ew,U2));function Y2(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const Js=typeof document<"u"?S.useLayoutEffect:S.useEffect;function wf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=S.createContext({});function l(m,v){m.propsReady&&De(m.propsReady,!1);for(const y of r){const x=m[t.required[y]];De(x,v[y])}for(const y of o)if(y in v){const x=m[t.optional[y]];De(x,v[y])}m.propsReady&&De(m.propsReady,!0)}function c(m){return i.reduce((v,y)=>(v[y]=x=>{const T=m[t.methods[y]];De(T,x)},v),{})}function u(m){return a.reduce((v,y)=>(v[y]=u2(m[t.events[y]]),v),{})}const d=S.forwardRef((m,v)=>{const{children:y,...x}=m,[T]=S.useState(()=>qs(f2(e),k=>{l(k,x)})),[w]=S.useState($0(u,T));Js(()=>{for(const k of a)k in x&&Qe(w[k],x[k]);return()=>{Object.values(w).map(of)}},[x,w,T]),Js(()=>{l(T,x)}),S.useImperativeHandle(v,V0(c(T)));const E=n;return h.jsx(s.Provider,{value:T,children:n?h.jsx(E,{...Y2([...r,...o,...a],x),children:y}):y})}),p=m=>{const v=S.useContext(s);return S.useCallback(y=>{De(v[m],y)},[v,m])},f=m=>{const v=S.useContext(s)[m],y=S.useCallback(x=>Qe(v,x),[v]);return S.useSyncExternalStore(y,()=>Et(v),()=>Et(v))},b=m=>{const v=S.useContext(s)[m],[y,x]=S.useState($0(Et,v));return Js(()=>Qe(v,T=>{T!==y&&x(V0(T))}),[v,y]),y},g=S.version.startsWith("18")?f:b;return{Component:d,useEmitter:(m,v)=>{const y=S.useContext(s)[m];Js(()=>Qe(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const el=S.createContext(void 0),mw=S.createContext(void 0),gw=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Sf(e){return"self"in e}function K2(e){return"body"in e}function vw(e,t,n,r=Xo,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(p=>{let f,b,g;const m=p.target;if(K2(m)||Sf(m)){const y=Sf(m)?m:m.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,b=i?y.innerWidth:y.innerHeight}else g=i?m.scrollLeft:m.scrollTop,f=i?m.scrollWidth:m.scrollHeight,b=i?m.offsetWidth:m.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:b})};p.suppressFlushSync?v():uo.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-b)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const b=p.behavior==="smooth";let g,m,v;Sf(f)?(m=Math.max(kn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(m=f[i?"scrollWidth":"scrollHeight"],g=kn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=m-g;if(p.top=Math.ceil(Math.max(Math.min(y,p.top),0)),nw(g,m)||p.top===v){e({scrollHeight:m,scrollTop:v,viewportHeight:g}),b&&t(!0);return}b?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const Tf="-webkit-sticky",yw="sticky",Ef=pw(()=>{if(typeof document>"u")return yw;const e=document.createElement("div");return e.style.position=Tf,e.style.position===Tf?Tf:yw});function kf(e){return e}const G2=qe(()=>{const e=ae(s=>`Item ${s}`),t=ae(s=>`Group ${s}`),n=ae({}),r=ae(kf),o=ae("div"),i=ae(Xo),a=(s,l=null)=>Wt(re(n,pe(c=>c[s]),ft()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),Z2=qe(([e,t])=>({...e,...t}),dt(hw,G2)),X2=({height:e})=>h.jsx("div",{style:{height:e}}),Q2={overflowAnchor:"none",position:Ef(),zIndex:1},bw={overflowAnchor:"none"},J2={...bw,display:"inline-block",height:"100%"},xw=S.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=mn("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=mn("windowScrollContainerState"),a=mn("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),b=mn("gap"),g=Ae("horizontalDirection"),{callbackRef:m}=B0(n,p,d,e?Xo:s,f,b,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,y]=S.useState(0);Af("deviation",A=>{v!==A&&y(A)});const x=Ae("EmptyPlaceholder"),T=Ae("ScrollSeekPlaceholder")||X2,w=Ae("ListComponent"),E=Ae("ItemComponent"),k=Ae("GroupComponent"),C=Ae("computeItemKey"),O=Ae("isSeeking"),_=Ae("groupIndices").length>0,L=Ae("alignToBottom"),D=Ae("initialItemFinalLocationReached"),z=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:L?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:L?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...D?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?h.jsx(x,{...lt(x,c)}):h.jsx(w,{...lt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:z,children:(e?t.topItems:t.items).map(A=>{const N=A.originalIndex,H=C(N+t.firstItemIndex,A.data,c);return O?S.createElement(T,{...lt(T,c),height:A.size,index:A.index,key:H,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?S.createElement(k,{...lt(k,c),"data-index":N,"data-item-index":A.index,"data-known-size":A.size,key:H,style:Q2},u(A.index,c)):S.createElement(E,{...lt(E,c),...ww(E,A.data),"data-index":N,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:H,style:g?J2:bw},_?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),eL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},tL={outline:"none",overflowX:"auto",position:"relative"},Jo=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),nL={position:Ef(),top:0,width:"100%",zIndex:1};function lt(e,t){if(typeof e!="string")return{context:t}}function ww(e,t){return{item:typeof e=="string"?void 0:t}}const rL=S.memo(function(){const e=Ae("HeaderComponent"),t=mn("headerHeight"),n=Ae("HeaderFooterTag"),r=Bn(S.useMemo(()=>i=>{t(kn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...lt(e,o)})}):null}),oL=S.memo(function(){const e=Ae("FooterComponent"),t=mn("footerHeight"),n=Ae("HeaderFooterTag"),r=Bn(S.useMemo(()=>i=>{t(kn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...lt(e,o)})}):null});function Cf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:b}=vw(a,l,s,c,void 0,d);return e("scrollTo",b),e("scrollBy",p),h.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?tL:eL,...o},tabIndex:0,...i,...lt(s,u),children:r})})}function Pf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=S.useRef(null),b=t("scrollerRef"),{scrollByCallback:g,scrollerRef:m,scrollToCallback:v}=vw(a,l,s,b,d);return gw(()=>{var y;return m.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{m.current=null}},[m,d]),e("windowScrollTo",v),e("scrollBy",g),h.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...lt(s,p),children:r})})}const iL=({children:e})=>{const t=S.useContext(el),n=mn("viewportHeight"),r=mn("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=S.useMemo(()=>na(n,l=>kn(l,i?"width":"height")),[n,i]),s=Bn(a,!0,Ae("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),h.jsx("div",{"data-viewport-type":"element",ref:s,style:Jo(o),children:e})},aL=({children:e})=>{const t=S.useContext(el),n=mn("windowViewportRect"),r=mn("fixedItemHeight"),o=Ae("customScrollParent"),i=lf(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),h.jsx("div",{"data-viewport-type":"window",ref:i,style:Jo(a),children:e})},sL=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...nL,marginTop:`${n}px`},o=Ae("context");return h.jsx(t,{style:r,...lt(t,o),children:e})},lL=S.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?dL:uL,a=r||t?aL:iL;return h.jsxs(i,{...e,...lt(i,o),children:[n&&h.jsx(sL,{children:h.jsx(xw,{showTopList:!0})}),h.jsxs(a,{children:[h.jsx(rL,{}),h.jsx(xw,{}),h.jsx(oL,{})]})]})}),{Component:cL,useEmitter:Af,useEmitterValue:Ae,usePublisher:mn}=wf(Z2,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",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"}},lL),uL=Cf({useEmitter:Af,useEmitterValue:Ae,usePublisher:mn}),dL=Pf({useEmitter:Af,useEmitterValue:Ae,usePublisher:mn}),If=cL,fL=qe(()=>{const e=ae(c=>h.jsxs("td",{children:["Item $",c]})),t=ae(null),n=ae(c=>h.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=ae(null),o=ae(null),i=ae({}),a=ae(kf),s=ae(Xo),l=(c,u=null)=>Wt(re(i,pe(d=>d[c]),ft()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,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")}}),pL=qe(([e,t])=>({...e,...t}),dt(hw,fL)),hL=({height:e})=>h.jsx("tr",{children:h.jsx("td",{style:{height:e}})}),mL=({height:e})=>h.jsx("tr",{children:h.jsx("td",{style:{border:0,height:e,padding:0}})}),gL={overflowAnchor:"none"},Sw={position:Ef(),zIndex:2,overflowAnchor:"none"},Tw=S.memo(function({showTopList:e=!1}){const t=Ne("listState"),n=Ne("computeItemKey"),r=Ne("firstItemIndex"),o=Ne("context"),i=Ne("isSeeking"),a=Ne("fixedHeaderHeight"),s=Ne("groupIndices").length>0,l=Ne("itemContent"),c=Ne("groupContent"),u=Ne("ScrollSeekPlaceholder")||hL,d=Ne("GroupComponent"),p=Ne("TableRowComponent"),f=(e?t.topItems:[]).reduce((g,m,v)=>(v===0?g.push(m.size):g.push(g[v-1]+m.size),g),[]),b=(e?t.topItems:t.items).map(g=>{const m=g.originalIndex,v=n(m+r,g.data,o),y=e?m===0?0:f[m-1]:0;return i?S.createElement(u,{...lt(u,o),height:g.size,index:g.index,key:v,type:g.type||"item"}):g.type==="group"?S.createElement(d,{...lt(d,o),"data-index":m,"data-item-index":g.index,"data-known-size":g.size,key:v,style:{...Sw,top:a}},c(g.index,o)):S.createElement(p,{...lt(p,o),...ww(p,g.data),"data-index":m,"data-item-index":g.index,"data-known-size":g.size,"data-item-group-index":g.groupIndex,key:v,style:e?{...Sw,top:a+y}:gL},s?l(g.index,g.groupIndex,g.data,o):l(g.index,g.data,o))});return h.jsx(h.Fragment,{children:b})}),vL=S.memo(function(){const e=Ne("listState"),t=Ne("topItemsIndexes").length>0,n=Cn("sizeRanges"),r=Ne("useWindowScroll"),o=Ne("customScrollParent"),i=Cn("windowScrollContainerState"),a=Cn("scrollContainerState"),s=o||r?i:a,l=Ne("trackItemSizes"),c=Ne("itemSize"),u=Ne("log"),{callbackRef:d,ref:p}=B0(n,c,l,s,u,void 0,o,!1,Ne("skipAnimationFrameInResizeObserver")),[f,b]=S.useState(0);_f("deviation",_=>{f!==_&&(p.current.style.marginTop=`${_}px`,b(_))});const g=Ne("EmptyPlaceholder"),m=Ne("FillerRow")||mL,v=Ne("TableBodyComponent"),y=Ne("paddingTopAddition"),x=Ne("statefulTotalCount"),T=Ne("context");if(x===0&&g)return h.jsx(g,{...lt(g,T)});const w=(t?e.topItems:[]).reduce((_,L)=>_+L.size,0),E=e.offsetTop+y+f-w,k=e.offsetBottom,C=E>0?h.jsx(m,{context:T,height:E},"padding-top"):null,O=k>0?h.jsx(m,{context:T,height:k},"padding-bottom"):null;return h.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...lt(v,T),children:[C,t&&h.jsx(Tw,{showTopList:!0}),h.jsx(Tw,{}),O]})}),yL=({children:e})=>{const t=S.useContext(el),n=Cn("viewportHeight"),r=Cn("fixedItemHeight"),o=Bn(S.useMemo(()=>na(n,i=>kn(i,"height")),[n]),!0,Ne("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),h.jsx("div",{"data-viewport-type":"element",ref:o,style:Jo(!1),children:e})},bL=({children:e})=>{const t=S.useContext(el),n=Cn("windowViewportRect"),r=Cn("fixedItemHeight"),o=Ne("customScrollParent"),i=lf(n,o,Ne("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),h.jsx("div",{"data-viewport-type":"window",ref:i,style:Jo(!1),children:e})},xL=S.memo(function(e){const t=Ne("useWindowScroll"),n=Ne("customScrollParent"),r=Cn("fixedHeaderHeight"),o=Cn("fixedFooterHeight"),i=Ne("fixedHeaderContent"),a=Ne("fixedFooterContent"),s=Ne("context"),l=Bn(S.useMemo(()=>na(r,v=>kn(v,"height")),[r]),!0,Ne("skipAnimationFrameInResizeObserver")),c=Bn(S.useMemo(()=>na(o,v=>kn(v,"height")),[o]),!0,Ne("skipAnimationFrameInResizeObserver")),u=n||t?TL:SL,d=n||t?bL:yL,p=Ne("TableComponent"),f=Ne("TableHeadComponent"),b=Ne("TableFooterComponent"),g=i?h.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...lt(f,s),children:i()},"TableHead"):null,m=a?h.jsx(b,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...lt(b,s),children:a()},"TableFoot"):null;return h.jsx(u,{...e,...lt(u,s),children:h.jsx(d,{children:h.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...lt(p,s),children:[g,h.jsx(vL,{},"TableBody"),m]})})})}),{Component:wL,useEmitter:_f,useEmitterValue:Ne,usePublisher:Cn}=wf(pL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",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"}},xL),SL=Cf({useEmitter:_f,useEmitterValue:Ne,usePublisher:Cn}),TL=Pf({useEmitter:_f,useEmitterValue:Ne,usePublisher:Cn}),EL=wL,Ew={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},kL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:kw,floor:tl,max:fa,min:Of,round:Cw}=Math;function Pw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function CL(e){return{...kL,items:e}}function nl(e,t){return e&&e.width===t.width&&e.height===t.height}function PL(e,t){return e&&e.column===t.column&&e.row===t.row}const AL=qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:b,propsReady:g},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T},w])=>{const E=ae(0),k=ae(0),C=ae(Ew),O=ae({height:0,width:0}),_=ae({height:0,width:0}),L=He(),D=He(),z=ae(0),A=ae(null),N=ae({column:0,row:0}),H=He(),M=He(),P=ae(!1),$=ae(0),F=ae(!0),U=ae(!1),G=ae(!1);Qe(re(b,$e($),Ce(([R,q])=>!!q)),()=>{De(F,!1)}),Qe(re(At(b,F,_,O,$,U),Ce(([R,q,X,oe,,j])=>R&&!q&&X.height!==0&&oe.height!==0&&!j)),([,,,,R])=>{De(U,!0),gf(1,()=>{De(L,R)}),Tn(re(c),()=>{De(t,[0,0]),De(F,!0)})}),be(re(M,Ce(R=>R!=null&&R.scrollTop>0),jn(0)),k),Qe(re(b,$e(M),Ce(([,R])=>R!=null)),([,R])=>{R&&(De(O,R.viewport),De(_,R.item),De(N,R.gap),R.scrollTop>0&&(De(P,!0),Tn(re(c,Jr(1)),q=>{De(P,!1)}),De(l,{top:R.scrollTop})))}),be(re(O,pe(({height:R})=>R)),d),be(re(At(ke(O,nl),ke(_,nl),ke(N,(R,q)=>R&&R.column===q.column&&R.row===q.row),ke(c)),pe(([R,q,X,oe])=>({gap:X,item:q,scrollTop:oe,viewport:R}))),H),be(re(At(ke(E),r,ke(N,PL),ke(_,nl),ke(O,nl),ke(A),ke(k),ke(P),ke(F),ke($)),Ce(([,,,,,,,R])=>!R),pe(([R,[q,X],oe,j,se,le,he,,xe,de])=>{const{column:Pe,row:Oe}=oe,{height:Te,width:Re}=j,{width:ue}=se;if(he===0&&(R===0||ue===0))return Ew;if(Re===0){const xt=vf(de,R),Kt=xt+Math.max(he-1,0);return CL(Pw(xt,Kt,le))}const Y=Aw(ue,Re,Pe);let V,Q;xe?q===0&&X===0&&he>0?(V=0,Q=he-1):(V=Y*tl((q+Oe)/(Te+Oe)),Q=Y*kw((X+Oe)/(Te+Oe))-1,Q=Of(R-1,fa(Q,Y-1)),V=Of(Q,fa(0,V))):(V=0,Q=-1);const ce=Pw(V,Q,le),{bottom:we,top:Le}=Iw(se,oe,j,ce),Ze=kw(R/Y),Ft=Ze*Te+(Ze-1)*Oe-we;return{bottom:we,itemHeight:Te,items:ce,itemWidth:Re,offsetBottom:Ft,offsetTop:Le,top:Le}})),C),be(re(A,Ce(R=>R!==null),pe(R=>R.length)),E),be(re(At(O,_,C,N),Ce(([R,q,{items:X}])=>X.length>0&&q.height!==0&&R.height!==0),pe(([R,q,{items:X},oe])=>{const{bottom:j,top:se}=Iw(R,oe,q,X);return[se,j]}),ft(ia)),t);const B=ae(!1);be(re(c,$e(B),pe(([R,q])=>q||R!==0)),B);const Z=an(re(At(C,E),Ce(([{items:R}])=>R.length>0),$e(B),Ce(([[R,q],X])=>{const oe=R.items[R.items.length-1].index===q-1;return(X||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===q)&&oe}),pe(([[,R]])=>R-1),ft())),te=an(re(ke(C),Ce(({items:R})=>R.length>0&&R[0].index===0),jn(0),ft())),ne=an(re(ke(C),$e(P),Ce(([{items:R},q])=>R.length>0&&!q),pe(([{items:R}])=>({endIndex:R[R.length-1].index,startIndex:R[0].index})),ft(G0),ir(0)));be(ne,f.scrollSeekRangeChanged),be(re(L,$e(O,_,E,N),pe(([R,q,X,oe,j])=>{const se=tw(R),{align:le,behavior:he,offset:xe}=se;let de=se.index;de==="LAST"&&(de=oe-1),de=fa(0,de,Of(oe-1,de));let Pe=Mf(q,j,X,de);return le==="end"?Pe=Cw(Pe-q.height+X.height):le==="center"&&(Pe=Cw(Pe-q.height/2+X.height/2)),xe&&(Pe+=xe),{behavior:he,top:Pe}})),l);const J=Wt(re(C,pe(R=>R.offsetBottom+R.bottom)),0);return be(re(T,pe(R=>({height:R.visibleHeight,width:R.visibleWidth}))),O),{customScrollParent:m,data:A,deviation:z,footerHeight:o,gap:N,headerHeight:i,increaseViewportBy:e,initialItemCount:k,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:D,scrollTo:l,scrollToIndex:L,scrollTop:c,smoothScrollTargetReached:u,totalCount:E,useWindowScroll:v,viewportDimensions:O,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T,...f,gridState:C,horizontalDirection:G,initialTopMostItemIndex:$,totalListHeight:J,...p,endReached:Z,propsReady:g,rangeChanged:ne,startReached:te,stateChanged:H,stateRestoreInProgress:P,...w}},dt(yf,Yt,da,fw,Cr,xf,kr));function Aw(e,t,n){return fa(1,tl((e+n)/(tl(t)+n)))}function Iw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Mf(e,t,n,r[0].index);return{bottom:Mf(e,t,n,r[r.length-1].index)+o,top:i}}function Mf(e,t,n,r){const o=Aw(e.width,n.width,t.column),i=tl(r/o),a=i*n.height+fa(0,i-1)*t.row;return a>0?a+t.row:a}const IL=qe(()=>{const e=ae(d=>`Item ${d}`),t=ae({}),n=ae(null),r=ae("virtuoso-grid-item"),o=ae("virtuoso-grid-list"),i=ae(kf),a=ae("div"),s=ae(Xo),l=(d,p=null)=>Wt(re(t,pe(f=>f[d]),ft()),p),c=ae(!1),u=ae(!1);return be(ke(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),_L=qe(([e,t])=>({...e,...t}),dt(AL,IL)),OL=S.memo(function(){const e=pt("gridState"),t=pt("listClassName"),n=pt("itemClassName"),r=pt("itemContent"),o=pt("computeItemKey"),i=pt("isSeeking"),a=gn("scrollHeight"),s=pt("ItemComponent"),l=pt("ListComponent"),c=pt("ScrollSeekPlaceholder"),u=pt("context"),d=gn("itemDimensions"),p=gn("gap"),f=pt("log"),b=pt("stateRestoreInProgress"),g=gn("reportReadyState"),m=Bn(S.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const x=v.firstChild;if(x){const{height:T,width:w}=x.getBoundingClientRect();d({height:T,width:w})}p({column:Ow("column-gap",getComputedStyle(v).columnGap,f),row:Ow("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return gw(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),b?null:h.jsx(l,{className:t,ref:m,...lt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?h.jsx(c,{...lt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):S.createElement(s,{...lt(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),ML=S.memo(function(){const e=pt("HeaderComponent"),t=gn("headerHeight"),n=pt("headerFooterTag"),r=Bn(S.useMemo(()=>i=>{t(kn(i,"height"))},[t]),!0,!1),o=pt("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...lt(e,o)})}):null}),DL=S.memo(function(){const e=pt("FooterComponent"),t=gn("footerHeight"),n=pt("headerFooterTag"),r=Bn(S.useMemo(()=>i=>{t(kn(i,"height"))},[t]),!0,!1),o=pt("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...lt(e,o)})}):null}),NL=({children:e})=>{const t=S.useContext(mw),n=gn("itemDimensions"),r=gn("viewportDimensions"),o=Bn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),h.jsx("div",{ref:o,style:Jo(!1),children:e})},LL=({children:e})=>{const t=S.useContext(mw),n=gn("windowViewportRect"),r=gn("itemDimensions"),o=pt("customScrollParent"),i=lf(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),h.jsx("div",{ref:i,style:Jo(!1),children:e})},FL=S.memo(function({...e}){const t=pt("useWindowScroll"),n=pt("customScrollParent"),r=n||t?$L:VL,o=n||t?LL:NL,i=pt("context");return h.jsx(r,{...e,...lt(r,i),children:h.jsxs(o,{children:[h.jsx(ML,{}),h.jsx(OL,{}),h.jsx(DL,{})]})})}),{useEmitter:_w,useEmitterValue:pt,usePublisher:gn}=wf(_L,{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"}},FL),VL=Cf({useEmitter:_w,useEmitterValue:pt,usePublisher:gn}),$L=Pf({useEmitter:_w,useEmitterValue:pt,usePublisher:gn});function Ow(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}const Mw=e=>{const t=e.Icon??Cm,n=St();return h.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[h.jsx(t,{size:64,className:"text-disabled"}),h.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Df=h.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),pa=e=>h.jsx(en,{...e,as:e.as||"span",className:Se("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function jL(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 s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const zL=e=>{const t=S.useId(),n=St(),r=S.useMemo(()=>jL(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return h.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:[h.jsx("p",{children:h.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?h.jsxs(S.Fragment,{children:[h.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),h.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=>h.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),h.jsx("nav",{children:h.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?h.jsx("li",{children:h.jsx(en,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:h.jsx(S.Fragment,{children:typeof i=="string"?h.jsx("li",{children:"..."}):h.jsx("li",{children:h.jsx(en,{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?h.jsx("li",{children:h.jsx(en,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},BL=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),h.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"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:h.jsx("div",{ref:n,className:"block isolate",children:e.children})})},RL=(e,t,n)=>{const r=n.cols,o=n.loading;return h.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=hu(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,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?h.jsx(BL,{children:h.jsx(p,{col:i,row:t,rowIndex:e})}):null,h.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),h.jsx("span",{className:"relative",children:o?Df:c?h.jsx(S.Fragment,{children:h.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):h.jsx(S.Fragment,{children:je.nil(l)?"":l})}))})})},ei=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[Ai(10),ou({fallbackAxisSideDirection:"end"}),ru(),vg({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=er({open:n,middleware:i,transform:!0,whileElementsMounted:Eo,onOpenChange:(b,g)=>{const m=g?.relatedTarget;m&&m.dataset.floating==="true"&&!b||(r(b),e.onChange?.(b))}}),c=Co(l),u=gr(l),d=vr(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=tr([c,u,d]);return h.jsxs(S.Fragment,{children:[h.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&h.jsx(hr,{preserveTabOrder:!0,id:`${t}-portal`,children:h.jsx(Rr,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:h.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:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[h.jsx(kg,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),h.jsx("header",{className:"mb-2",children:h.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})};var Nf={},Dw;function HL(){return Dw||(Dw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,v)=>{try{Object.keys(m).forEach(v)}catch(y){window.console.log(y)}},n=m=>m==null,r=m=>{const v=typeof m;return v==="string"||v==="number"||v==="boolean"||n(m)},o=(m,v)=>{const y=v.getItem(m);try{return JSON.parse(y)}catch{return y??null}},i=m=>Object.keys(m).reduce((v,y)=>({...v,[y]:o(y,m)}),{}),a=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,v)=>(m[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(v=>v(m))},d=[{name:"expires",parse:m=>`expires=${a(m.expires??s)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${a(m.expires??s)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const v=m.domain??"";return v===""?"":`domain=${m.multiDomain?".":""}${v}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],p={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(v=>v.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const v=p.json()[m];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,v,y={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,E)=>{const k=E.parse(y);return k===""?w:w.concat(k)},[`${encodeURIComponent(m)}=${x}`]).join(";");document.cookie=T,u()}},f=m=>{const v=new Set,y=x=>{m().removeItem(x);const T=i(m());v.forEach(w=>w(T))};return{delete:y,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(m()):m(),has:x=>{const T=m().getItem(x);return!n(T)},deleteAll:()=>{t(m(),y),v.forEach(x=>x(m()))},get:x=>o(x,m()),set:(x,T)=>{m().setItem(x,JSON.stringify(T)),v.forEach(w=>w(m()))}}},b=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=b,e.createStorage=f}(Nf)),Nf}var ha=HL();const Lf=e=>e.headerLabel??e.thead??e.id,Ff=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ti=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ti||{});const Vf=e=>e.type==="number"?e.valueAsNumber:e.value,WL=e=>{let t=[];return e({add:(a,s,l)=>t.push({...l,id:a,thead:s}),remove:a=>t=t.filter(s=>s.id!==a),getAll:()=>Array.from(t),filter:a=>t=Array.from(t.filter(a))}),t},qL={},UL=(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 a=r.get(o.id);return a===void 0?e[i]:a})},YL=(e,t,n=qL)=>{const r=yr()?null:ha.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Jd({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:UL(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return yr()||ha.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},KL=e=>{const t=br(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-tableheader="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},GL=()=>yr()?void 0:document.querySelector('[data-component="modal-body"]'),ZL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),XL=(e,t)=>e.toSorted(ZL(t)),Nw=(e,t,n)=>({label:t,id:Ao(),type:n,value:e.id}),QL=e=>{const t=St(),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,Nw(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return h.jsx(S.Fragment,{children:h.jsx(ei,{title:t.tableSortDropdownTitle,trigger:h.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[h.jsx(Sm,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:h.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>h.jsxs("li",{className:"flex flex-nowrap gap-3",children:[h.jsx(Hr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),h.jsx(Hr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),h.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:h.jsx(Na,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[h.jsx(Dc,{size:14})," ",t.tableSortAddButton]})})]})})})},JL=e=>{const t=St(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=Nw(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Lf(e.col);return h.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[h.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?h.jsx(tk,{size:14}):null,n==="desc"?h.jsx(ek,{size:14}):null,n==="undefined"?h.jsx(Sm,{size:14}):null]})},Lw=S.createContext({}),eF=Lw.Provider,tF=()=>S.useContext(Lw),$f=(e,t,n,r={})=>{const o=e.id,i=e.type??ti.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Ao(),operation:l,label:Lf(e),name:o,type:i,value:"",...r}},jf=()=>{const e=St(),t=S.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:S.useMemo(()=>({[ti.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ti.Boolean]:[t.is,t.isNot],[ti.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},nF=e=>{const t=St(),n=jf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,$f(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(b=>u===b.id);return $f(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=Vf(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return h.jsx(S.Fragment,{children:h.jsx(ei,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:h.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[h.jsx(dk,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:h.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return h.jsxs("li",{className:"flex flex-nowrap gap-3",children:[h.jsx(Hr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),h.jsx(Hr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),h.jsx(Io,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),h.jsx("div",{className:"flex justify-center items-center mt-5",children:h.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:h.jsx(Na,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[h.jsx(Dc,{size:14})," ",t.tableFilterNewFilter]})})]})})})},rF=({filter:e,onDelete:t,set:n})=>{const r=St(),o=jf(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=Vf(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return h.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[h.jsx(Hr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),h.jsx(Io,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),h.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:h.jsx(Na,{className:"text-danger",size:14})})]})},oF={top:0,left:0,right:0,bottom:-1},iF=e=>{const t=Fc(),n=St(),r=e.filters.filter(g=>g.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=jf(),l=o?pk:hk,c=S.useRef(null),u=g=>{const m=g.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(y=>y.id!==m))},d=S.useCallback(g=>{if(g===null)return;c.current=g;const m=new AbortController;return g.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:m.signal}),()=>m.abort()},[]),p=e.sorters.find(g=>e.header.id===g.value),f=p?.type?p.type===N0.Asc?"ascending":"descending":"none",b=Lf(e.header);return h.jsxs(d0,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,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:[h.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:h.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?h.jsx(ei,{arrow:!0,trigger:h.jsxs("span",{children:[h.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",b]}),h.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:h.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",h.jsx("span",{className:"font-medium",children:b})]}),children:h.jsxs("ul",{className:"font-medium",children:[r.length===0?null:h.jsx(S.Fragment,{children:r.map(g=>h.jsx("li",{className:"my-1",children:h.jsx(rF,{onDelete:u,filter:g,set:e.setFilters})},`thead-filter-${g.id}`))}),h.jsx("li",{children:h.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(g=>g.concat($f(e.header,s.options,s.operations))),children:[h.jsx(Dc,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,h.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?h.jsx(JL,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:h.jsx(ze.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:oF,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:g=>void g.currentTarget.focus(),onKeyDown:g=>{if(g.key==="ArrowLeft"||g.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const m=c.current.getBoundingClientRect().width,y=(g.shiftKey?50:10)*(g.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(m+y)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(g,m)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,y=m.delta.x;c.current.style.width=`${Math.abs(v+y)}px`}})]})},aF=e=>{const[t,n]=KL(e.setCols);return h.jsx(c0,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:h.jsx(Sn,{children:e.headers.map((r,o)=>h.jsx(iF,{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}`))})})},sF=S.forwardRef(({context:e,className:t="",...n},r)=>h.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:h.jsx(Sn,{children:n.children})})),lF=S.forwardRef(({context:e,className:t="",...n},r)=>h.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??""}`})),cF=S.forwardRef(({context:e,...t},n)=>{const r=tF(),o={...t?.style,top:je.number(r.sticky)?`${r.sticky}px`:void 0};return h.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),uF=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return h.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??""}`})}),dF=S.forwardRef((e,t)=>e.context.loadingMore?h.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:h.jsx("tr",{role:"row",className:"bg-card-background",children:h.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:h.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),fF={TableRow:uF,TableFoot:dF,TableHead:cF,Table:lF,TableBody:sF},pF=[0,0,0,0,0,0,0,0,0,0],hF=e=>h.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Df:h.jsx(Mw,{})}),mF=()=>h.jsx(S.Fragment,{}),gF=[],Fw=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!0,pagination:c=null,useControl:u=!1,...d})=>{const p=S.useRef(null),[f,b]=S.useState(!1),g=br(a),m=br(d.loadingMore),v=S.useMemo(()=>{if(d.loading)return pF;if(u)return d.rows;const T=new L0(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:T.Where(w.name,w.operation.symbol,w.value)),r.length===0?T.Select():XL(T.Select(),r)},[d.loading,d.rows,u,t,r]);S.useEffect(()=>{if(p.current===null)return()=>{};const T=p.current,w=new IntersectionObserver(E=>E[E.length-1].isIntersecting&&m.current?(g.current?.(),void b(!0)):b(!1));return w.observe(T),()=>w.disconnect()},[m,g]);const y=v.length===0,x={cols:e,Aside:d.Aside,loading:d.loading,getRowProps:d.getRowProps,loadingMore:d.loadingMore};return h.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[h.jsx(EL,{context:x,components:fF,totalCount:v.length,itemContent:y?mF:RL,data:y?gF:v,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>h.jsx(aF,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),y?h.jsx(hF,{loading:d.loading}):null,h.jsx("div",{"aria-hidden":"true",ref:p,className:"w-full h-0.5"}),c!==null?h.jsx(zL,{...c}):null]})},vF=({item:e,onPointerDown:t})=>{const n=qo(0);return h.jsxs(d0,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[h.jsx("button",{type:"button",className:"cursor-grab",children:h.jsx(uk,{size:14})}),h.jsx("span",{children:e.groupName})]},e.groupId)},yF=e=>{const t=St(),n=Ff(e.cols),r=bN(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,p=c.options.item(d)?.label||"";i(p);const f=new L0(e.rows).GroupBy(u),b=e.cols.find(g=>g.id===u);e.setGroups(qT(f).map((g,m)=>{const v=f[g];return{...b,groupId:Ao(),groupKey:u,index:m,rows:v,groupName:g}}))},s=()=>e.setGroups([]);return h.jsx(S.Fragment,{children:h.jsxs(ei,{arrow:!1,title:t.tableGroupLabel,trigger:h.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[h.jsx(gk,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[h.jsxs("div",{className:"flex flex-nowrap items-center",children:[h.jsx(Hr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),h.jsx(hs,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:h.jsx(Na,{size:16,className:"text-danger"})})]}),e.groups.length>0?h.jsxs("section",{className:"my-4",children:[h.jsx("header",{children:h.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),h.jsx(vO,{children:h.jsx(c0,{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=>h.jsx(vF,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},bF=e=>h.jsx("header",{className:"min-w-full mb-1",children:h.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[h.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[h.jsx("span",{children:h.jsx(nF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),h.jsx("span",{children:h.jsx(QL,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),h.jsx("span",{children:h.jsx(yF,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),h.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=>h.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[h.jsxs("span",{children:[h.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),h.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[h.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),h.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=Vf(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),xF=(e,t)=>typeof t=="function"?t(e):t,rl=(e,t,n)=>e===t?void 0:n?.(t),wF=e=>{const t=Fc(),n=S.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=S.useMemo(()=>Ff(e.cols),[e.cols]),[i,a]=Jd({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:xF(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),rl(l?.filters??[],s.filters??[],e.setFilters),rl(l?.sorters??[],s.sorters??[],e.setSorters),rl(l?.groups??[],s.groups??[],e.setGroups),rl(l?.cols??[],s.cols??[],e.setCols),s)]});return h.jsx(eF,{value:n,children:h.jsxs(Sn,{initial:!1,children:[r?h.jsx(bF,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?h.jsx(Fw,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):h.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>h.jsx("div",{className:"min-w-full",children:h.jsx(Fw,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},ol=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>h.jsxs(en,{...s,as:r||"div","data-component":"card",className:Se("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4",i),children:[e?h.jsx("header",{"data-component":"card-title",className:Se("mb-2 w-full border-b border-card-border px-6 pb-4 text-xl font-medium",a),children:e}):o,h.jsx("div",{"data-component":"card-body",className:Se("min-w-full px-6",s.className),children:t?h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx(pa,{className:"w-full"}),h.jsx(pa,{className:"w-8/12"}),h.jsx(pa,{className:"w-10/12"}),h.jsx(pa,{className:"w-1/2"})]}):n})]});ol.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return h.jsxs(i,{...o,title:je.string(o.title)?o.title:void 0,className:Se("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[h.jsx(a,{className:"font-semibold",children:o.title}),r?h.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const SF=e=>{const t=e.interactive??!0,n=e.Icon??Mc;return h.jsx(ol,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:h.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:[h.jsx("div",{className:Se("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:h.jsx(n,{size:48})}),h.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[h.jsx("p",{className:"text-lg",children:e.title}),e.loading?h.jsx(pa,{className:"h-10"}):h.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},TF=({item:e,context:t,setter:n,get:r,refs:o})=>h.jsx(hr,{children:h.jsx(Sd,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:h.jsxs(Sn,{presenceAffectsLayout:!0,children:[e?h.jsx(ze.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?h.jsx(uu,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:h.jsx(Rr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:h.jsxs(ze.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:[h.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:h.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:h.jsx(vo,{})})}),h.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[h.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),h.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),EF=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=er({open:t!==null,transform:!0,onOpenChange:p=>p?void 0:n(null)}),a=Co(o),s=vr(o,{role:"dialog"}),l=gr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=tr([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return h.jsxs(S.Fragment,{children:[h.jsx(TF,{refs:i,context:o,get:c,item:t,setter:u}),h.jsx("ul",{role:"list",children:d.map((p,f)=>{const b=p.props,g=`${r}-${f}`,m=()=>n({...b,id:g}),v=b.leading;return h.jsx(ze.li,{layout:!0,layoutId:`item-${g}`,className:"border-b border-card-border py-2 last:border-transparent",children:h.jsx(ze.div,{layoutId:`toast-${g}`,className:"relative",children:h.jsx("div",{className:"relative flex items-start space-x-3",children:h.jsxs(S.Fragment,{children:[b.avatar?h.jsx("div",{children:h.jsx("div",{className:"relative px-1",children:h.jsx("button",{onClick:m,className:"flex size-10 items-center justify-center ring-primary",children:b.avatar})})}):null,h.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:h.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[h.jsxs("button",{onClick:m,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[h.jsx("h3",{children:b.title}),h.jsx("p",{className:"text-sm leading-snug text-secondary",children:b.description})]}),v?h.jsx(v,{open:m}):null]})})]})})})},g)})})]})},kF=e=>h.jsx(S.Fragment,{children:e.children}),Vw=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},$w={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},jw=S.createContext(""),CF=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",zf=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!CF(a))return a}return n==="backward"?zf(e,e.length-1,"backward"):zf(e,-1,"forward")},zw=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=zf(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Bw={[$w.ArrowLeft]:(e,t)=>zw(t,"backward"),[$w.ArrowRight]:(e,t)=>zw(t,"forward")},PF=e=>{const[t,n]=Vw(e.active),r=S.useRef(null),o=br(e.onChange);S.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]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(je.keyof(Bw,c)){const u=Bw[c],d=u(l,r.current);if(d===null)return;n(d)}};return h.jsx(jw.Provider,{value:t,children:h.jsx(ol,{className:e.className,container:Se("pt-0 max-w-full w-full min-w-0",e.container),header:h.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[h.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),h.jsx("nav",{className:"min-w-0",children:h.jsx("ul",{onKeyDown:s,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 h.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Se("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:h.jsx(en,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},AF=()=>S.useContext(jw),IF=e=>{const t=AF();return h.jsx(S.Fragment,{children:e.id===t?e.children:null})},Rw=()=>{const e=S.useContext(bo);return e?e.parser:La.hsla},Bf=.3,ma={duration:Bf,type:"tween",ease:"easeInOut"},Hw=S.createContext(null),Rf={delay:.2,duration:.3,type:"tween",ease:"easeOut"},ni={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},_F=e=>h.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx(ze.path,{className:"currentColor",initial:ni.initial,animate:ni.animate,transition:Rf,d:"M18 6 6 18"}),h.jsx(ze.path,{className:"currentColor",initial:ni.initial,animate:ni.animate,transition:Rf,d:"m6 6 12 12"})]}),OF=e=>h.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:h.jsx(ze.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:ni.animate,initial:ni.initial,transition:Rf})}),MF={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},DF={duration:.6,delay:.2,type:"tween",ease:"circOut"},NF=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",LF=(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,Ww=()=>S.useContext(Hw),FF=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=Rw(),s=Ww(),[l,c]=S.useState(t);S.useEffect(()=>{if(!s){c(t);return}const d=LF(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const p=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(p)},[t,s,e]);const u=NF(e,l,n);return h.jsxs(ze.button,{...i,type:"button","data-step":e,animate:u,className:"relative w-auto text-center flex items-center justify-center",children:[h.jsx(ze.div,{variants:MF,transition:DF,className:`absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),h.jsx(ze.div,{initial:!1,animate:u,transition:ma,className:"flex relative justify-center items-center w-10 h-10 font-semibold rounded-full",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:ma,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:ma,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:ma,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:h.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?h.jsx(OF,{className:"size-6 text-primary-foreground"}):u==="error"?h.jsx(_F,{className:"size-6 text-danger-foreground"}):h.jsx(S.Fragment,{children:h.jsx("span",{children:e})})})}),r&&u==="active"?h.jsx("span",{className:`h-full flex items-center px-4 ${o}`,children:r}):null]})},VF=e=>{const[t,n]=s0(),r=S.useRef(e.currentStep),[o,i]=S.useState(e.currentStep);S.useEffect(()=>{if(e.currentStep===0)return;const s=t.current,l=s.querySelectorAll("[data-step]")[0],c=s.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`},ma)}},[e.currentStep]),S.useEffect(()=>{r.current=o;const s=setTimeout(()=>{i(e.currentStep)},Bf*1e3);return()=>clearTimeout(s)},[e.currentStep]);const a={currentStep:e.currentStep,previousStep:r.current,progressBarDuration:Bf};return h.jsx(Hw.Provider,{value:a,children:h.jsxs("div",{className:"flex relative justify-between",ref:t,children:[h.jsx("div",{className:"absolute top-1/2 h-1 w-[calc(100%)] bg-card-border"}),h.jsx("div",{"data-name":"progress",className:"absolute top-1/2 w-0 h-1 bg-success"}),e.children]})})},qw={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},$F={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Uw=e=>h.jsx(ze.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:qw,exit:qw.false,transition:$F,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Se("aria-hidden:pointer-events-none",e.className),children:e.children}),jF=fo("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"}}),zF=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return h.jsx(Sn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?h.jsx(ze.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Se("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:h.jsx(Uw,{"data-open":!!i,open:!!i,children:h.jsxs(en,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Se(jF({theme:n}),t),children:[h.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?h.jsx(Tm,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?h.jsx(Mc,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?h.jsx(mk,{"aria-hidden":"true",size:20}):null,r,h.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:a.title})]}),a.children,o!==void 0&&i?h.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:h.jsx(vo,{size:20})}):null]})})}):null})}),BF=e=>h.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[h.jsxs("header",{className:"flex items-start gap-4 p-6",children:[h.jsx("div",{className:Se("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:h.jsx("div",{children:h.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("header",{children:h.jsx("h3",{className:"text-base leading-none",children:e.title})}),h.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?h.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Yw=(e="")=>Se("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),Hf=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Kw=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[p,f]=S.useState(!1),[b,g]=S.useState(null),m=S.useRef([]),v=S.useRef([]),y=S.useContext(Hf),x=fr(),T=pr(),w=uP(),E=bg(),k=x!==null,{floatingStyles:C,refs:O,context:_}=er({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Eo,placement:k?"right":"bottom-start",middleware:[Ai({mainAxis:k?0:4,alignmentAxis:k?-4:0}),ou(),ru()]}),L=vr(_,{role:"menu"}),D=gr(_,{bubbles:!0}),z=_g(_,{move:!1,enabled:n,delay:{open:ev},handleClose:Jg({blockPointerEvents:!0,requireIntent:!1})}),A=Co(_,{toggle:!k,event:"mousedown",ignoreMouse:k,keyboardHandlers:!0}),N=ps(_,{loop:!0,activeIndex:b,nested:k,listRef:m,onNavigate:g}),H=LP(_,{activeIndex:b,listRef:v,resetMs:VP,onMatch:u?g:void 0}),{getReferenceProps:M,getFloatingProps:P,getItemProps:$}=tr([z,A,L,D,N,H]);S.useEffect(()=>{if(!T)return;const U=()=>d(!1),G=B=>{B.nodeId!==w&&B.parentId===x&&d(!1)};return T.events.on("click",U),T.events.on("menuopen",G),()=>{T.events.off("click",U),T.events.off("menuopen",G)}},[T,w,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:w})},[T,u,w,x]);const F=o?l.className:Se(Yw(l.className));return h.jsxs(dP,{id:w,children:[h.jsx(S.Fragment,{children:l.asChild?h.jsx(cv,{...M(y.getItemProps({...l,onFocus(U){l.onFocus?.(U),f(!1),y.setHasFocusInside(!0)}})),children:s,className:F,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Zn(O.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0}):h.jsxs("button",{type:"button",className:F,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Zn(O.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0,...M(y.getItemProps({...l,onFocus(U){l.onFocus?.(U),f(!1),y.setHasFocusInside(!0)}})),children:[s,k&&h.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[h.jsx("span",{className:"sr-only",children:"Next menu"}),h.jsx(Oc,{size:14})]})]})}),h.jsx(Hf.Provider,{value:{activeIndex:b,setActiveIndex:g,getItemProps:$,setHasFocusInside:f,isOpen:u},children:h.jsx(oP,{elementsRef:m,labelsRef:v,children:u&&h.jsx(hr,{children:h.jsx(Rr,{context:_,modal:!1,initialFocus:k?-1:0,returnFocus:o?i:!k,children:h.jsx(t,{...P(),ref:O.setFloating,style:{...l.style,...C},className:Se("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",a),children:e})})})})})]})}),RF=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(Hf),s=bg({label:n?null:e}),l=pr(),c=s.index===a.activeIndex;return h.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Zn(s.ref,i),className:Yw(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),a.setHasFocusInside(!0)}}),children:[r,t?h.jsx(t,{size:16}):null]})}),HF=S.forwardRef((e,t)=>fr()===null?h.jsx(fP,{children:h.jsx(Kw,{...e,isParent:!0,ref:t})}):h.jsx(Kw,{...e,isParent:!1,ref:t})),Wf=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return h.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Se("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[h.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Se("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,h.jsx("span",{"data-name":"checkbox-label",className:Se("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),WF=({children:e,className:t="",size:n,...r})=>h.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:[h.jsx("input",{...r,type:"radio",className:Se("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]}),qF=av("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
223
- `);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)}),UF=(e,t)=>yr()?t:window.matchMedia(e).matches,YF=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(UF(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},KF=cv,vn="500ms",GF={exit:{x:["0%","-30%"],opacity:0,animationDuration:vn},enter:{x:["-30%","0%"],opacity:1,animationDuration:vn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:vn}},ZF={enter:{x:"0%",opacity:1,animationDuration:vn},exit:{x:["0%","30%"],opacity:0,animationDuration:vn},initial:{x:["30%","0%"],opacity:.8,animationDuration:vn}},qf={drawer:e=>e==="left"?GF:ZF,sheet:{enter:{opacity:1,y:"0%",animationDuration:vn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:vn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:vn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn},initial:{opacity:.5,scale:.95,animationDuration:vn,transition:{duration:.5,ease:"easeInOut"}}}},XF=fo("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%)] relative 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"}}),Uf={top:0,left:0,right:0,bottom:0},il=e=>e*.6,QF=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),p=window.outerHeight,f=il(p);return d>=f?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,a=e.position==="right"?-r.delta.x:r.delta.x,s=Math.abs(i+a);return e.value.set(s)}};return h.jsx(ze.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:Uf,whileDrag:{cursor:"grabbing"},className:Se("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?h.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},al={drawer:"right",sheet:"none",dialog:"none"},JF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??al.drawer:al[o]:t?al[o]:al.sheet},eV=[],Yf=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:b=void 0,overlayClassName:g="",type:m="dialog",position:v,overlayClickClose:y=!1,role:x="dialog",interactions:T=eV,...w},E)=>{const k=S.useRef(null),C=S.useRef(null),O=S.useId(),_=S.useId(),L=YF("(min-width: 64rem)"),D=JF(L,f,m,v),z=L||f?qf[m]:qf.sheet,A=typeof z=="function"?z(D):z,N=L||f?m:"sheet",H=N!=="dialog",M=er({open:e,onOpenChange:a}),P=Co(M.context,{}),$=vr(M.context,{role:x}),F=gr(M.context,{escapeKey:!0,outsidePress:y}),U=tr([P,$,F].concat(T)),G=o,B=qo(void 0);S.useEffect(()=>B.set(void 0),[N]);const Z=()=>a(!1);S.useImperativeHandle(E,()=>({context:M.context,floating:C.current}),[M.context,C]);const te=(X,oe)=>{const se=M.refs.floating.current.getBoundingClientRect(),le=B.get()||se.height,he=Math.abs(le-oe.delta.y),xe=window.outerHeight,de=il(xe);return he>=de?B.set(he):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>B.set(void 0),350))},ne=(X,oe)=>{const j=M.refs.floating.current;if(oe.delta.y<0&&oe.offset.y<0){j.scrollTo({top:j.scrollTop+Math.abs(oe.offset.y),behavior:"smooth"});return}const se=j.getBoundingClientRect(),le=B.get()||se.height,he=Math.abs(le-oe.delta.y),xe=window.outerHeight,de=il(xe);return he>=de?B.set(he):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>B.set(void 0),350))},J=N==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:Uf,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:te,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},R=qo(void 0),q=qo(void 0);return h.jsxs(S.Fragment,{children:[o?h.jsx(S.Fragment,{children:r?h.jsx(KF,{ref:M.refs.setReference,...U.getReferenceProps({layoutId:b}),children:G}):h.jsx(ze.button,{ref:M.refs.setReference,...U.getReferenceProps(),layoutId:b,type:"button",children:G})}):null,h.jsx(hr,{preserveTabOrder:!0,children:h.jsx(Sn,{presenceAffectsLayout:!0,propagate:!0,mode:"wait",initial:!1,children:e?h.jsx(uu,{lockScroll:!0,className:Se("inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70",N==="drawer"?"":"flex items-start justify-center p-10",g),children:h.jsx(Sd,{reducedMotion:d?"user":"always",children:h.jsx(Rr,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:M.context,children:h.jsxs(ze.div,{...w,...t?{"aria-labelledby":O,"aria-describedby":_}:{"aria-label":s},...U.getFloatingProps({"aria-modal":e,ref:Zn(M.refs.setFloating,C),className:Se(XF({position:D,type:N}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:b,variants:A,"data-component":"modal",style:N==="drawer"?{width:B}:{height:B},children:[H&&u?h.jsx(QF,{onChange:a,value:B,sheet:N==="sheet",position:D,parent:M.refs.floating}):null,t?h.jsx(ze.header,{...J,className:"relative w-full isolate",children:t?h.jsx("h2",{id:O,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,h.jsx(ze.section,{ref:k,"data-component":"modal-body",dragConstraints:Uf,drag:L?void 0:"y",onDrag:N==="sheet"?L?void 0:ne:void 0,className:Se("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:()=>{q.set(void 0),R.set(void 0)},onTouchStart:X=>{const oe=X.changedTouches[0];R.set(oe.pageY),q.set(oe.pageY)},onTouchMove:X=>{const oe=X.changedTouches[0],j=oe.pageY,se=R.get();if(se<j&&k.current?.scrollTop===0){const xe=M.refs.floating.current.getBoundingClientRect(),de=B.get()||xe.height,Pe=(se-j)/10,Oe=de+Pe,Te=window.outerHeight,Re=il(Te);Oe<Re&&a?.(!1),B.set(Oe)}q.set(oe.pageY)},children:i}),n?h.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?h.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:h.jsx("button",{type:"button",onClick:Z,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:h.jsx(vo,{})})}):null]})})})}):null},O)})]})}),tV=e=>{const[t,n]=s0();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:CN(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),h.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},nV=e=>h.jsx("p",{...e,className:Se("text-base leading-snug",e.className)}),rV=e=>h.jsx("p",{...e,className:Se("mb-kilo text-sm text-secondary",e.className)}),oV=e=>h.jsx("div",{className:Se(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:h.jsxs(S.Fragment,{children:[h.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),h.jsx("span",{className:`w-fit ${e.disabled?"text-disabled":""} ${e.row?"text-base":"text-lg"}`,children:e.children})]})}),Gw=e=>h.jsxs("div",{children:[h.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),h.jsx("p",{className:"text-secondary typography",children:e.children})]}),iV=e=>h.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[h.jsx("div",{children:h.jsx(Gw,{title:e.title,children:e.description})}),h.jsx("div",{className:"flex gap-kilo items-center",children:e.children})]}),Zw=e=>h.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Se("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),aV=()=>h.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:h.jsx(Zw,{})}),sV=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=er({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Co(s,{enabled:e.disabled??!0}),u=vr(s,{role:"tooltip"}),d=gr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=tr([c,u,d]);return h.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[h.jsx(hs,{...f(e),as:ze.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:h.jsx(ze.span,{layoutId:o,children:e.trigger})}),h.jsx(Sn,{children:i?h.jsx(hr,{root:t,children:h.jsx(Rr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:h.jsx(ze.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Xw=6048e5,lV=864e5,cV=6e4,uV=36e5,dV=1e3,Qw=Symbol.for("constructDateFrom");function nt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Qw in e?e[Qw](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ue(e,t){return nt(t||e,e)}function sl(e,t,n){const r=Ue(e,n?.in);return isNaN(t)?nt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Jw(e,t,n){const r=Ue(e,n?.in);if(isNaN(t))return nt(e,NaN);if(!t)return r;const o=r.getDate(),i=nt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function ri(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Ue(e,n?.in),d=o||r?Jw(u,o+r*12):u,p=a||i?sl(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return nt(e,+p+g)}let fV={};function no(){return fV}function Hn(e,t){const n=no(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ue(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function oi(e,t){return Hn(e,{...t,weekStartsOn:1})}function e1(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),o=nt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=oi(o),a=nt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=oi(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ll(e){const t=Ue(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 cl(e,...t){const n=nt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ro(e,t){const n=Ue(e,t?.in);return n.setHours(0,0,0,0),n}function pV(e,t,n){const[r,o]=cl(n?.in,e,t),i=ro(r),a=ro(o),s=+i-ll(i),l=+a-ll(a);return Math.round((s-l)/lV)}function hV(e,t){const n=e1(e,t),r=nt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),oi(r)}function mV(e){return nt(e,Date.now())}function gV(e,t,n){const[r,o]=cl(n?.in,e,t);return+ro(r)==+ro(o)}function vV(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ul(e){return!(!vV(e)&&typeof e!="number"||isNaN(+Ue(e)))}function yV(e,t){const[n,r]=cl(e,t.start,t.end);return{start:n,end:r}}function t1(e,t){const{start:n,end:r}=yV(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(nt(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function n1(e,t){const n=Ue(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function bV(e,t){const n=Ue(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function xV(e,t){const n=no(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ue(e,t?.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const wV={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"}},SV=(e,t,n)=>{let r;const o=wV[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 Kf(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const TV={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},EV={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kV={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CV={date:Kf({formats:TV,defaultWidth:"full"}),time:Kf({formats:EV,defaultWidth:"full"}),dateTime:Kf({formats:kV,defaultWidth:"full"})},PV={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},AV=(e,t,n,r)=>PV[e];function ga(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const IV={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_V={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},OV={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"]},MV={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"]},DV={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"}},NV={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"}},LV={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:ga({values:IV,defaultWidth:"wide"}),quarter:ga({values:_V,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ga({values:OV,defaultWidth:"wide"}),day:ga({values:MV,defaultWidth:"wide"}),dayPeriod:ga({values:DV,defaultWidth:"wide",formattingValues:NV,defaultFormattingWidth:"wide"})};function va(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 a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?VV(s,d=>d.test(a)):FV(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function FV(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function VV(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function $V(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 a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const jV=/^(\d+)(th|st|nd|rd)?/i,zV=/\d+/i,BV={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},RV={any:[/^b/i,/^(a|c)/i]},HV={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WV={any:[/1/i,/2/i,/3/i,/4/i]},qV={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},UV={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]},YV={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},KV={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]},GV={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},ZV={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}},XV={ordinalNumber:$V({matchPattern:jV,parsePattern:zV,valueCallback:e=>parseInt(e,10)}),era:va({matchPatterns:BV,defaultMatchWidth:"wide",parsePatterns:RV,defaultParseWidth:"any"}),quarter:va({matchPatterns:HV,defaultMatchWidth:"wide",parsePatterns:WV,defaultParseWidth:"any",valueCallback:e=>e+1}),month:va({matchPatterns:qV,defaultMatchWidth:"wide",parsePatterns:UV,defaultParseWidth:"any"}),day:va({matchPatterns:YV,defaultMatchWidth:"wide",parsePatterns:KV,defaultParseWidth:"any"}),dayPeriod:va({matchPatterns:GV,defaultMatchWidth:"any",parsePatterns:ZV,defaultParseWidth:"any"})},r1={code:"en-US",formatDistance:SV,formatLong:CV,formatRelative:AV,localize:LV,match:XV,options:{weekStartsOn:0,firstWeekContainsDate:1}};function QV(e,t){const n=Ue(e,t?.in);return pV(n,bV(n))+1}function o1(e,t){const n=Ue(e,t?.in),r=+oi(n)-+hV(n);return Math.round(r/Xw)+1}function Gf(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),o=no(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=nt(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Hn(a,t),l=nt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Hn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function JV(e,t){const n=no(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Gf(e,t),i=nt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Hn(i,t)}function i1(e,t){const n=Ue(e,t?.in),r=+Hn(n,t)-+JV(n,t);return Math.round(r/Xw)+1}function rt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Pr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return rt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):rt(n+1,2)},d(e,t){return rt(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];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return rt(e.getHours()%12||12,t.length)},H(e,t){return rt(e.getHours(),t.length)},m(e,t){return rt(e.getMinutes(),t.length)},s(e,t){return rt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return rt(o,t.length)}},ii={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},a1={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"});case"GGGG":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 Pr.y(e,t)},Y:function(e,t,n,r){const o=Gf(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return rt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):rt(i,t.length)},R:function(e,t){const n=e1(e);return rt(n,t.length)},u:function(e,t){const n=e.getFullYear();return rt(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 rt(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"});case"QQQQ":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 rt(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"});case"qqqq":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 Pr.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"});case"MMMM":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 rt(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"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=i1(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):rt(o,t.length)},I:function(e,t,n){const r=o1(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):rt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Pr.d(e,t)},D:function(e,t,n){const r=QV(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):rt(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"});case"EEEE":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 rt(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"});case"eeee":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 rt(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"});case"cccc":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 rt(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"});case"iiii":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"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=ii.noon:r===0?o=ii.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"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=ii.evening:r>=12?o=ii.afternoon:r>=4?o=ii.morning:o=ii.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"});case"BBBB":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 Pr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Pr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Pr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Pr.s(e,t)},S:function(e,t){return Pr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return l1(r);case"XXXX":case"XX":return oo(r);case"XXXXX":case"XXX":default:return oo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return l1(r);case"xxxx":case"xx":return oo(r);case"xxxxx":case"xxx":default:return oo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+s1(r,":");case"OOOO":default:return"GMT"+oo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+s1(r,":");case"zzzz":default:return"GMT"+oo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return rt(r,t.length)},T:function(e,t,n){return rt(+e,t.length)}};function s1(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+rt(i,2)}function l1(e,t){return e%60===0?(e>0?"-":"+")+rt(Math.abs(e)/60,2):oo(e,t)}function oo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=rt(Math.trunc(r/60),2),i=rt(r%60,2);return n+o+t+i}const c1=(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"});case"PPPP":default:return t.date({width:"full"})}},u1=(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"});case"pppp":default:return t.time({width:"full"})}},Zf={p:u1,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return c1(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;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",c1(r,t)).replace("{{time}}",u1(o,t))}},e$=/^D+$/,t$=/^Y+$/,n$=["D","DD","YY","YYYY"];function d1(e){return e$.test(e)}function f1(e){return t$.test(e)}function Xf(e,t,n){const r=r$(e,t,n);if(console.warn(r),n$.includes(e))throw new RangeError(r)}function r$(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 o$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,i$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,a$=/^'([^]*?)'?$/,s$=/''/g,l$=/[a-zA-Z]/;function Qf(e,t,n){const r=no(),o=r.locale??r1,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Ue(e,n?.in);if(!ul(s))throw new RangeError("Invalid time value");let l=t.match(i$).map(u=>{const d=u[0];if(d==="p"||d==="P"){const p=Zf[d];return p(u,o.formatLong)}return u}).join("").match(o$).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:c$(u)};if(a1[d])return{isToken:!0,value:u};if(d.match(l$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(f1(d)||d1(d))&&Xf(d,t,String(e));const p=a1[d[0]];return p(s,d,o.localize,c)}).join("")}function c$(e){const t=e.match(a$);return t?t[1].replace(s$,"'"):e}function u$(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=nt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function d$(){return Object.assign({},no())}function f$(e,t){const n=Ue(e,t?.in).getDay();return n===0?7:n}function p$(e,t){return+Ue(e)>+Ue(t)}function h$(e,t){return+Ue(e)<+Ue(t)}function m$(e,t){const n=g$(t)?new t(0):nt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function g$(e){return typeof e=="function"&&e.prototype?.constructor===e}const v$=10;class p1{subPriority=0;validate(t,n){return!0}}class y$ extends p1{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 b$ extends p1{priority=v$;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>nt(n,r))}set(t,n){return n.timestampIsSet?t:nt(t,m$(t,this.context))}}class Ge{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new y$(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class x$ extends Ge{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"});case"GGGG":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 kt={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}/},Wn={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 Ct(e,t){return e&&{value:t(e.value),rest:e.rest}}function gt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function qn(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,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*uV+i*cV+a*dV),rest:t.slice(n[0].length)}}function h1(e){return gt(kt.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return gt(kt.singleDigit,t);case 2:return gt(kt.twoDigits,t);case 3:return gt(kt.threeDigits,t);case 4:return gt(kt.fourDigits,t);default:return gt(new RegExp("^\\d{1,"+e+"}"),t)}}function dl(e,t){switch(e){case 1:return gt(kt.singleDigitSigned,t);case 2:return gt(kt.twoDigitsSigned,t);case 3:return gt(kt.threeDigitsSigned,t);case 4:return gt(kt.fourDigitsSigned,t);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Jf(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function m1(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function g1(e){return e%400===0||e%4===0&&e%100!==0}class w$ extends Ge{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 Ct(bt(4,t),o);case"yo":return Ct(r.ordinalNumber(t,{unit:"year"}),o);default:return Ct(bt(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 a=m1(r.year,o);return t.setFullYear(a,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 S$ extends Ge{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Ct(bt(4,t),o);case"Yo":return Ct(r.ordinalNumber(t,{unit:"year"}),o);default:return Ct(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Gf(t,o);if(r.isTwoDigitYear){const s=m1(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Hn(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Hn(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class T$ extends Ge{priority=130;parse(t,n){return dl(n==="R"?4:n.length,t)}set(t,n,r){const o=nt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),oi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class E$ extends Ge{priority=130;parse(t,n){return dl(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 k$ extends Ge{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return bt(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"});case"QQQQ":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 C$ extends Ge{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return bt(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"});case"qqqq":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 P$ extends Ge{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 Ct(gt(kt.month,t),o);case"MM":return Ct(bt(2,t),o);case"Mo":return Ct(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"});case"MMMM":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 A$ extends Ge{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Ct(gt(kt.month,t),o);case"LL":return Ct(bt(2,t),o);case"Lo":return Ct(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"});case"LLLL":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 I$(e,t,n){const r=Ue(e,n?.in),o=i1(r,n)-t;return r.setDate(r.getDate()-o*7),Ue(r,n?.in)}class _$ extends Ge{priority=100;parse(t,n,r){switch(n){case"w":return gt(kt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Hn(I$(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function O$(e,t,n){const r=Ue(e,n?.in),o=o1(r,n)-t;return r.setDate(r.getDate()-o*7),r}class M$ extends Ge{priority=100;parse(t,n,r){switch(n){case"I":return gt(kt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return oi(O$(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const D$=[31,28,31,30,31,30,31,31,30,31,30,31],N$=[31,29,31,30,31,30,31,31,30,31,30,31];class L$ extends Ge{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return gt(kt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=g1(r),i=t.getMonth();return o?n>=1&&n<=N$[i]:n>=1&&n<=D$[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 F$ extends Ge{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return gt(kt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear();return g1(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 ep(e,t,n){const r=no(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ue(e,n?.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return sl(i,u,n)}class V$ extends Ge{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"});case"EEEE":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=ep(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class $$ extends Ge{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return Ct(bt(n.length,t),i);case"eo":return Ct(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"});case"eeee":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=ep(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 j$ extends Ge{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return Ct(bt(n.length,t),i);case"co":return Ct(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"});case"cccc":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=ep(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 z$(e,t,n){const r=Ue(e,n?.in),o=f$(r,n),i=t-o;return sl(r,i,n)}class B$ extends Ge{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return bt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Ct(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 Ct(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Ct(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Ct(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=z$(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 R$ extends Ge{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"});case"aaaa":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(Jf(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class H$ extends Ge{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"});case"bbbb":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(Jf(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class W$ extends Ge{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"});case"BBBB":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(Jf(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class q$ extends Ge{priority=70;parse(t,n,r){switch(n){case"h":return gt(kt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 U$ extends Ge{priority=70;parse(t,n,r){switch(n){case"H":return gt(kt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 Y$ extends Ge{priority=70;parse(t,n,r){switch(n){case"K":return gt(kt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 K$ extends Ge{priority=70;parse(t,n,r){switch(n){case"k":return gt(kt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 G$ extends Ge{priority=60;parse(t,n,r){switch(n){case"m":return gt(kt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return bt(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 Z$ extends Ge{priority=50;parse(t,n,r){switch(n){case"s":return gt(kt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return bt(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 X$ extends Ge{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Ct(bt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class Q$ extends Ge{priority=10;parse(t,n){switch(n){case"X":return qn(Wn.basicOptionalMinutes,t);case"XX":return qn(Wn.basic,t);case"XXXX":return qn(Wn.basicOptionalSeconds,t);case"XXXXX":return qn(Wn.extendedOptionalSeconds,t);case"XXX":default:return qn(Wn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:nt(t,t.getTime()-ll(t)-r)}incompatibleTokens=["t","T","x"]}class J$ extends Ge{priority=10;parse(t,n){switch(n){case"x":return qn(Wn.basicOptionalMinutes,t);case"xx":return qn(Wn.basic,t);case"xxxx":return qn(Wn.basicOptionalSeconds,t);case"xxxxx":return qn(Wn.extendedOptionalSeconds,t);case"xxx":default:return qn(Wn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:nt(t,t.getTime()-ll(t)-r)}incompatibleTokens=["t","T","X"]}class ej extends Ge{priority=40;parse(t){return h1(t)}set(t,n,r){return[nt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class tj extends Ge{priority=20;parse(t){return h1(t)}set(t,n,r){return[nt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const nj={G:new x$,y:new w$,Y:new S$,R:new T$,u:new E$,Q:new k$,q:new C$,M:new P$,L:new A$,w:new _$,I:new M$,d:new L$,D:new F$,E:new V$,e:new $$,c:new j$,i:new B$,a:new R$,b:new H$,B:new W$,h:new q$,H:new U$,K:new Y$,k:new K$,m:new G$,s:new Z$,S:new X$,X:new Q$,x:new J$,t:new ej,T:new tj},rj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ij=/^'([^]*?)'?$/,aj=/''/g,sj=/\S/,lj=/[a-zA-Z]/;function cj(e,t,n,r){const o=()=>nt(n,NaN),i=d$(),a=i.locale??r1,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Ue(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new b$(r?.in,n)],d=t.match(oj).map(m=>{const v=m[0];if(v in Zf){const y=Zf[v];return y(m,a.formatLong)}return m}).join("").match(rj),p=[];for(let m of d){f1(m)&&Xf(m,t,e),d1(m)&&Xf(m,t,e);const v=m[0],y=nj[v];if(y){const{incompatibleTokens:x}=y;if(Array.isArray(x)){const w=p.find(E=>x.includes(E.token)||E.token===v);if(w)throw new RangeError(`The format string mustn't contain \`${w.fullToken}\` and \`${m}\` at the same time`)}else if(y.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);p.push({token:v,fullToken:m});const T=y.run(e,m,a.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(v.match(lj))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(m==="''"?m="'":v==="'"&&(m=uj(m)),e.indexOf(m)===0)e=e.slice(m.length);else return o()}}if(e.length>0&&sj.test(e))return o();const f=u.map(m=>m.priority).sort((m,v)=>v-m).filter((m,v,y)=>y.indexOf(m)===v).map(m=>u.filter(v=>v.priority===m).sort((v,y)=>y.subPriority-v.subPriority)).map(m=>m[0]);let b=Ue(n,r?.in);if(isNaN(+b))return o();const g={};for(const m of f){if(!m.validate(b,c))return o();const v=m.set(b,g,c);Array.isArray(v)?(b=v[0],Object.assign(g,v[1])):b=v}return b}function uj(e){return e.match(ij)[1].replace(aj,"'")}function dj(e,t,n){const[r,o]=cl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function fj(e,t){return gV(nt(e,e),mV(e))}function pj(e,t,n){return sl(e,-t,n)}function hj(e,t,n){const r=Ue(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=nt(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=u$(a);return r.setMonth(t,Math.min(i,s)),r}function mj(e,t,n){let r=Ue(e,n?.in);return isNaN(+r)?nt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=hj(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 gj(e,t,n){const r=Ue(e,n?.in);return isNaN(+r)?nt(e,NaN):(r.setFullYear(t),r)}function vj(e,t,n){return Jw(e,-t,n)}function ya(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=vj(e,o+r*12,n),d=pj(u,a+i*7,n),p=l+s*60,b=(c+p*60)*1e3;return nt(e,+d-b)}const yj=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function bj(e,t){return S.useRef(yj(e,t)).current}const tp=e=>{const t=S.useContext(bo);if(e)return e;if(t)return t.locale||e};function v1(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const xj=/^(?<hour>\d\d):(?<min>\d\d)$/,wj={type:"spring",bounce:.3,duration:.6},y1=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),b1={enter:y1(1),exit:y1(-1),middle:{x:"0%",opacity:1}},x1={exit:{visibility:"hidden"}},Sj=e=>{const t=Hn(n1(e));return t1({start:t,end:ri(t,{days:41})})},w1=(e,t)=>e.toLocaleDateString(t,{month:"long"}),Tj=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=n1(new Date(1970,o,1).setMonth(o)),a=w1(i,n);return h.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),np={ArrowLeft:(e,t)=>t==="days"?ya(e,{days:1}):ya(e,{months:1}),ArrowRight:(e,t)=>t==="days"?ri(e,{days:1}):ri(e,{months:1}),ArrowUp:(e,t)=>t==="days"?ya(e,{weeks:1}):ya(e,{years:1}),ArrowDown:(e,t)=>t==="days"?ri(e,{weeks:1}):ri(e,{years:1})},S1=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!0}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},io=e=>e.getFullYear().toString().padStart(4,"0"),Ej=(e,t,n)=>e===void 0||n===void 0?!1:p$(t,e)&&h$(t,n),kj=e=>{const t=St();return h.jsx(ze.tbody,{layout:!0,variants:b1,custom:e.direction,onKeyDown:e.onKeyDown,className:Se(e.styles?.week),children:e.zip.map((n,r)=>{const o=je.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return h.jsx("tr",{className:o,children:n.map(i=>{const a=i.toISOString(),s=e.rangeMode?a===e.range?.to?.toISOString()||a===e.range?.from?.toISOString():a===(e.date?ro(e.date).toISOString():void 0),l=fj(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=dj(i,e.stateDate),d=!u||c,p=e.rangeMode?Ej(e.range?.from,i,e.range?.to):!1;return h.jsxs("td",{align:"center",className:Se("relative",je.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[h.jsxs("button",{type:"button","data-date":a,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Se(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,p&&e.markRange?"size-10 border border-dashed border-card-border":"",je.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?h.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:h.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?h.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:h.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?h.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},Cj=()=>ro(new Date),T1=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:p="date",datetimeTitle:f,...b})=>{const g=S.useRef(Ao()),m=St(),v=tp(o),y=S.useRef(null),{date:x,range:T}=b,w=x||new Date,E=S.useRef(null),[k,C]=Jd({date:w,isAnimating:!1,year:io(w),direction:void 0,range:{from:T?.from,to:T?.to},months:Tj(g.current,w,v),selectMode:l?"from":void 0,week:t1({start:Hn(w),end:xV(w)})},M=>({onChangeYear:P=>({year:P}),onExitComplete:()=>(S1(E.current||null,y,M.state().date,200),E.current=null,{isAnimating:!1}),date:P=>{const $=P(M.state().date);return{date:$,year:io($)}},nextMonth:P=>{P&&(E.current=P.currentTarget);const $=M.state();if($.isAnimating)return $;const F=ri($.date,{months:1});return{date:F,isAnimating:!0,direction:1,year:io(F)}},previousMonth:P=>{P&&(E.current=P.currentTarget);const $=M.state();if($.isAnimating)return $;const F=ya($.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:io(F)}},onSelectDate:P=>{const $=M.state(),F=P.currentTarget.dataset.range==="true",U=P.currentTarget.dataset.date||"",G=new Date(U);return{date:G,year:io(G),selectMode:$.selectMode===void 0?void 0:$.selectMode==="from"?"to":"from",range:F?{from:$.selectMode==="from"?G:$.range.from,to:$.selectMode==="to"?G:$.range.to}:$.range}},onChangeMonth:P=>{const $=P.target.value,U=Array.from(P.target.options).find(B=>B.value===$),G=M.state();if(U){const B=U.dataset.index||"",Z=new Date(M.state().date);return Z.setMonth(+B),{...G,date:Z,year:io(Z)}}return G},onKeyDown:P=>{const $=P.key,F=M.state();if($ in np){($==="ArrowUp"||$==="ArrowDown")&&P.preventDefault();const U=M.state().date,G=je.keyof(np,$)?np[$](U,P.shiftKey?"month":"days"):null;if(G!==null)return S1(P.target,y,G),{...F,date:G,year:io(G)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,P,$)=>(($.method==="onChangeMonth"||$.method==="previousMonth"||$.method==="nextMonth")&&$.props.onChangeMonth?.(M.date),M),(M,P,$)=>($.method==="onChangeYear"&&$.props.onChangeYear?.(M.date),M),(M,P,$)=>{const F=$.method==="onSelectDate"||$.method==="setToday"||$.method==="onKeyDown";return l&&F&&t?(c?.(M.range),M):(F&&t&&c?.(M.date),M)}]}),O=Sj(k.date),_=rv(O,7),L=k.date.toISOString(),D=w1(k.date,v);S.useEffect(()=>{t||c?.(k.date)},[L,t]);const z=bj(M=>C.date(P=>gj(new Date(P),+M)),1200),A=M=>{const P=M.currentTarget.value;C.onChangeYear(P),s?.(new Date(P)),z(P)},N=v1((M,P)=>(M.preventDefault(),P==="right"?C.previousMonth():C.nextMonth()),10),H=()=>{const M=Cj();C.date(()=>M),c?.(M)};return h.jsx(Sd,{transition:wj,children:h.jsxs("div",{ref:y,"data-component":"calendar",onTouchEnd:N.onTouchEnd,onTouchStart:N.onTouchStart,className:Se("relative overflow-hidden",je.function(u?.calendar)?u?.calendar(O):u?.calendar),children:[h.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:h.jsx(Sn,{initial:!1,mode:"popLayout",custom:k.direction,onExitComplete:C.onExitComplete,children:h.jsxs(ze.div,{initial:"enter",animate:"middle",exit:"exit",children:[h.jsxs("header",{className:"relative flex justify-between",children:[h.jsx(ze.button,{layout:!0,type:"button","data-focustrap":"prev",variants:x1,onClick:C.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:h.jsx(ok,{className:"h-4 w-4"})}),h.jsx(ze.span,{layout:!0,variants:b1,custom:k.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:h.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[h.jsx("select",{value:D,onChange:C.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${D.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:k.months}),h.jsx(bm,{mask:"int",maxLength:4,placeholder:"YYYY",value:k.year,onChange:A,style:{width:`${k.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),h.jsx(ze.button,{layout:!0,type:"button","data-focustrap":"next",variants:x1,onClick:C.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:h.jsx(Oc,{className:"h-4 w-4"})}),h.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%)"}})]}),h.jsxs(ze.table,{className:"mt-2 table min-w-full table-auto border-0",children:[h.jsx("thead",{children:h.jsx("tr",{children:k.week.map(M=>h.jsx("th",{role:"columnheader",className:Se("py-2 text-sm font-medium capitalize",je.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(v,{weekday:"short"})},M.toString()))})}),h.jsx(kj,{zip:_,range:T,styles:u,date:x||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:k.date,labelRange:n,stateRange:k.range,RenderOnDay:e,direction:k.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},D)})}),p==="datetime"?h.jsx("section",{className:"grid items-center my-4",children:h.jsx(Io,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?Qf(x,"HH:mm"):void 0,title:f||m.calendarDatetimeTitle,onChange:M=>{const P=M.target.value,$=xj.exec(P);if(!$)return;const F=$.groups.hour,U=$.groups.min,G=mj(k.date,{hours:Number(F),minutes:Number(U),seconds:0});C.date(()=>G),c?.(G)}})}):null,h.jsx("footer",{className:"mt-2 text-center text-primary",children:h.jsx("button",{type:"button",onClick:H,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},Pj=e=>h.jsxs(wA,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:Se("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[h.jsx(SA,{style:{transform:je.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Se("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),je.number(e.percent)?h.jsx("p",{className:Se("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]}),fl=e=>h.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[h.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),h.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});fl.Icon=function(t){return h.jsx("header",{...t,className:Se("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},fl.Body=function(t){return h.jsx(en,{...t,className:Se("min-w-0 flex-1",t.className),children:t.children})},fl.Right=function(t){return h.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:h.jsx(en,{...t,type:"button"})})};const Aj=e=>h.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),Ij=e=>h.jsx(ze.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),E1=new Date(1970,11,31),rp={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},k1={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},_j={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")},op=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},Oj={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},Mj={day:"numeric",month:"numeric",year:"numeric"},Dj=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:a=!0,type:s,...l},c)=>{const u=tp(t),d=S.useId(),p=St(),f=S.useMemo(()=>new Intl.DateTimeFormat(u,s==="datetime"?Oj:Mj),[u,s]),[b,g]=S.useState(e||void 0),[m,v]=S.useState(!1),y=op(f,E1).flatMap(D=>je.keyof(rp,D.type)?rp[D.type](D.value):[]),x=S.useMemo(()=>op(f,E1).reduce((D,z)=>D+(je.keyof(k1,z.type)?k1[z.type](z.value):""),""),[f]),T=e?.toISOString(),[w,E]=S.useState(b?op(f,b).reduce((D,z)=>D+(je.keyof(rp,z.type)?_j[z.type](b,z.value):""),""):""),k=D=>{const z=D.target.value;if(E(z),y.length===z.length&&y.every((N,H)=>{const M=z.charAt(H);return typeof N=="string"?M===N:N.test(M)})){const N=cj(z,x,new Date),H=s==="datetime"?N:ro(N);return g(H),r?.(H)}return g(void 0),r?.(void 0)};S.useEffect(()=>{ul(e)&&(g(e),E(Qf(e,x)))},[T,x]);const C=D=>(g(D),r?.(D),i&&v(!1),E(D?Qf(D,x):"")),O=ul(b),_=O?b.toISOString():void 0,L=h.jsx(T1,{...l,type:s,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:C,disabledDate:n,date:O?b:void 0});return h.jsx(S.Fragment,{children:h.jsx(Io,{...l,mask:y,value:w,id:void 0,name:void 0,"data-value":_,formNoValidate:!m,"data-target":l.name,"data-component":"date-picker",onChange:k,required:l.required??!0,error:m?void 0:l.error,placeholder:l.placeholder||p.datepickerPlaceholder(x),right:a?h.jsxs(S.Fragment,{children:[h.jsx("input",{"data-origin":l.name,defaultValue:_,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),h.jsx(ei,{open:m,onChange:v,buttonProps:{"aria-describedby":d},trigger:h.jsxs("span",{"aria-labelledby":d,children:[h.jsx("span",{id:d,className:"sr-only",children:p.datePickerCalendarButtonLabel}),h.jsx(rk,{})]}),children:L})]}):null})})}),Nj=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Lj=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Fj=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Vj=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],C1=(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},P1=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10("0."+t.slice(0,15))},$j=e=>typeof e=="number"?Math.log(e):P1(e)*Math.log(10),jj=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t};function zj(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,...t};const n=t.bits?t.binary?Vj:Fj:t.binary?Lj:Nj,r=t.space?" ":"";if(t.signed&&(typeof e=="number"?e===0:e===0n))return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=C1(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?$j(e)/Math.log(1024):P1(e)/3),n.length-1);e=jj(e,(t.binary?1024:1e3)**s),a||(e=e.toPrecision(3));const l=C1(Number(e),t.locale,a),c=n[s];return i+l+r+c}var pl={exports:{}},hl={exports:{}},Je={};/** @license React v16.13.1
224
- * react-is.production.min.js
225
- *
226
- * Copyright (c) Facebook, Inc. and its affiliates.
227
- *
228
- * This source code is licensed under the MIT license found in the
229
- * LICENSE file in the root directory of this source tree.
230
- */var A1;function Bj(){if(A1)return Je;A1=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,a=e?Symbol.for("react.provider"):60109,s=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,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case b:case f:case a:return w;default:return E}}case n:return E}}}function T(w){return x(w)===c}return Je.AsyncMode=l,Je.ConcurrentMode=c,Je.ContextConsumer=s,Je.ContextProvider=a,Je.Element=t,Je.ForwardRef=u,Je.Fragment=r,Je.Lazy=b,Je.Memo=f,Je.Portal=n,Je.Profiler=i,Je.StrictMode=o,Je.Suspense=d,Je.isAsyncMode=function(w){return T(w)||x(w)===l},Je.isConcurrentMode=T,Je.isContextConsumer=function(w){return x(w)===s},Je.isContextProvider=function(w){return x(w)===a},Je.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Je.isForwardRef=function(w){return x(w)===u},Je.isFragment=function(w){return x(w)===r},Je.isLazy=function(w){return x(w)===b},Je.isMemo=function(w){return x(w)===f},Je.isPortal=function(w){return x(w)===n},Je.isProfiler=function(w){return x(w)===i},Je.isStrictMode=function(w){return x(w)===o},Je.isSuspense=function(w){return x(w)===d},Je.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===b||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===m||w.$$typeof===v||w.$$typeof===y||w.$$typeof===g)},Je.typeOf=x,Je}var et={};/** @license React v16.13.1
231
- * react-is.development.js
232
- *
233
- * Copyright (c) Facebook, Inc. and its affiliates.
234
- *
235
- * This source code is licensed under the MIT license found in the
236
- * LICENSE file in the root directory of this source tree.
237
- */var I1;function Rj(){return I1||(I1=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,a=e?Symbol.for("react.provider"):60109,s=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,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===i||j===o||j===d||j===p||typeof j=="object"&&j!==null&&(j.$$typeof===b||j.$$typeof===f||j.$$typeof===a||j.$$typeof===s||j.$$typeof===u||j.$$typeof===m||j.$$typeof===v||j.$$typeof===y||j.$$typeof===g)}function T(j){if(typeof j=="object"&&j!==null){var se=j.$$typeof;switch(se){case t:var le=j.type;switch(le){case l:case c:case r:case i:case o:case d:return le;default:var he=le&&le.$$typeof;switch(he){case s:case u:case b:case f:case a:return he;default:return se}}case n:return se}}}var w=l,E=c,k=s,C=a,O=t,_=u,L=r,D=b,z=f,A=n,N=i,H=o,M=d,P=!1;function $(j){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.")),F(j)||T(j)===l}function F(j){return T(j)===c}function U(j){return T(j)===s}function G(j){return T(j)===a}function B(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function Z(j){return T(j)===u}function te(j){return T(j)===r}function ne(j){return T(j)===b}function J(j){return T(j)===f}function R(j){return T(j)===n}function q(j){return T(j)===i}function X(j){return T(j)===o}function oe(j){return T(j)===d}et.AsyncMode=w,et.ConcurrentMode=E,et.ContextConsumer=k,et.ContextProvider=C,et.Element=O,et.ForwardRef=_,et.Fragment=L,et.Lazy=D,et.Memo=z,et.Portal=A,et.Profiler=N,et.StrictMode=H,et.Suspense=M,et.isAsyncMode=$,et.isConcurrentMode=F,et.isContextConsumer=U,et.isContextProvider=G,et.isElement=B,et.isForwardRef=Z,et.isFragment=te,et.isLazy=ne,et.isMemo=J,et.isPortal=R,et.isProfiler=q,et.isStrictMode=X,et.isSuspense=oe,et.isValidElementType=x,et.typeOf=T}()),et}var _1;function O1(){return _1||(_1=1,process.env.NODE_ENV==="production"?hl.exports=Bj():hl.exports=Rj()),hl.exports}/*
238
- object-assign
239
- (c) Sindre Sorhus
240
- @license MIT
241
- */var ip,M1;function Hj(){if(M1)return ip;M1=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 a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[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 ip=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},ip}var ap,D1;function sp(){if(D1)return ap;D1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ap=e,ap}var lp,N1;function L1(){return N1||(N1=1,lp=Function.call.bind(Object.prototype.hasOwnProperty)),lp}var cp,F1;function Wj(){if(F1)return cp;F1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=sp(),n={},r=L1();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,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 p=Error((l||"React class")+": "+s+" 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 p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(b){d=b}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+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 f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},cp=o,cp}var up,V1;function qj(){if(V1)return up;V1=1;var e=O1(),t=Hj(),n=sp(),r=L1(),o=Wj(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return up=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(F){var U=F&&(c&&F[c]||F[u]);if(typeof U=="function")return U}var p="<<anonymous>>",f={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:y(),arrayOf:x,element:T(),elementType:w(),instanceOf:E,node:_(),objectOf:C,oneOf:k,oneOfType:O,shape:D,exact:z};function b(F,U){return F===U?F!==0||1/F===1/U:F!==F&&U!==U}function g(F,U){this.message=F,this.data=U&&typeof U=="object"?U:{},this.stack=""}g.prototype=Error.prototype;function m(F){if(process.env.NODE_ENV!=="production")var U={},G=0;function B(te,ne,J,R,q,X,oe){if(R=R||p,X=X||J,oe!==n){if(l){var j=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 j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=R+":"+J;!U[se]&&G<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+R+"`. 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."),U[se]=!0,G++)}}return ne[J]==null?te?ne[J]===null?new g("The "+q+" `"+X+"` is marked as required "+("in `"+R+"`, but its value is `null`.")):new g("The "+q+" `"+X+"` is marked as required in "+("`"+R+"`, but its value is `undefined`.")):null:F(ne,J,R,q,X)}var Z=B.bind(null,!1);return Z.isRequired=B.bind(null,!0),Z}function v(F){function U(G,B,Z,te,ne,J){var R=G[B],q=H(R);if(q!==F){var X=M(R);return new g("Invalid "+te+" `"+ne+"` of type "+("`"+X+"` supplied to `"+Z+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return m(U)}function y(){return m(a)}function x(F){function U(G,B,Z,te,ne){if(typeof F!="function")return new g("Property `"+ne+"` of component `"+Z+"` has invalid PropType notation inside arrayOf.");var J=G[B];if(!Array.isArray(J)){var R=H(J);return new g("Invalid "+te+" `"+ne+"` of type "+("`"+R+"` supplied to `"+Z+"`, expected an array."))}for(var q=0;q<J.length;q++){var X=F(J,q,Z,te,ne+"["+q+"]",n);if(X instanceof Error)return X}return null}return m(U)}function T(){function F(U,G,B,Z,te){var ne=U[G];if(!s(ne)){var J=H(ne);return new g("Invalid "+Z+" `"+te+"` of type "+("`"+J+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return m(F)}function w(){function F(U,G,B,Z,te){var ne=U[G];if(!e.isValidElementType(ne)){var J=H(ne);return new g("Invalid "+Z+" `"+te+"` of type "+("`"+J+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return m(F)}function E(F){function U(G,B,Z,te,ne){if(!(G[B]instanceof F)){var J=F.name||p,R=$(G[B]);return new g("Invalid "+te+" `"+ne+"` of type "+("`"+R+"` supplied to `"+Z+"`, expected ")+("instance of `"+J+"`."))}return null}return m(U)}function k(F){if(!Array.isArray(F))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.")),a;function U(G,B,Z,te,ne){for(var J=G[B],R=0;R<F.length;R++)if(b(J,F[R]))return null;var q=JSON.stringify(F,function(oe,j){var se=M(j);return se==="symbol"?String(j):j});return new g("Invalid "+te+" `"+ne+"` of value `"+String(J)+"` "+("supplied to `"+Z+"`, expected one of "+q+"."))}return m(U)}function C(F){function U(G,B,Z,te,ne){if(typeof F!="function")return new g("Property `"+ne+"` of component `"+Z+"` has invalid PropType notation inside objectOf.");var J=G[B],R=H(J);if(R!=="object")return new g("Invalid "+te+" `"+ne+"` of type "+("`"+R+"` supplied to `"+Z+"`, expected an object."));for(var q in J)if(r(J,q)){var X=F(J,q,Z,te,ne+"."+q,n);if(X instanceof Error)return X}return null}return m(U)}function O(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var U=0;U<F.length;U++){var G=F[U];if(typeof G!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(G)+" at index "+U+"."),a}function B(Z,te,ne,J,R){for(var q=[],X=0;X<F.length;X++){var oe=F[X],j=oe(Z,te,ne,J,R,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&q.push(j.data.expectedType)}var se=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new g("Invalid "+J+" `"+R+"` supplied to "+("`"+ne+"`"+se+"."))}return m(B)}function _(){function F(U,G,B,Z,te){return A(U[G])?null:new g("Invalid "+Z+" `"+te+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return m(F)}function L(F,U,G,B,Z){return new g((F||"React class")+": "+U+" type `"+G+"."+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Z+"`.")}function D(F){function U(G,B,Z,te,ne){var J=G[B],R=H(J);if(R!=="object")return new g("Invalid "+te+" `"+ne+"` of type `"+R+"` "+("supplied to `"+Z+"`, expected `object`."));for(var q in F){var X=F[q];if(typeof X!="function")return L(Z,te,ne,q,M(X));var oe=X(J,q,Z,te,ne+"."+q,n);if(oe)return oe}return null}return m(U)}function z(F){function U(G,B,Z,te,ne){var J=G[B],R=H(J);if(R!=="object")return new g("Invalid "+te+" `"+ne+"` of type `"+R+"` "+("supplied to `"+Z+"`, expected `object`."));var q=t({},G[B],F);for(var X in q){var oe=F[X];if(r(F,X)&&typeof oe!="function")return L(Z,te,ne,X,M(oe));if(!oe)return new g("Invalid "+te+" `"+ne+"` key `"+X+"` supplied to `"+Z+"`.\nBad object: "+JSON.stringify(G[B],null," ")+`
242
- Valid keys: `+JSON.stringify(Object.keys(F),null," "));var j=oe(J,X,Z,te,ne+"."+X,n);if(j)return j}return null}return m(U)}function A(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(A);if(F===null||s(F))return!0;var U=d(F);if(U){var G=U.call(F),B;if(U!==F.entries){for(;!(B=G.next()).done;)if(!A(B.value))return!1}else for(;!(B=G.next()).done;){var Z=B.value;if(Z&&!A(Z[1]))return!1}}else return!1;return!0;default:return!1}}function N(F,U){return F==="symbol"?!0:U?U["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&U instanceof Symbol:!1}function H(F){var U=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":N(U,F)?"symbol":U}function M(F){if(typeof F>"u"||F===null)return""+F;var U=H(F);if(U==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return U}function P(F){var U=M(F);switch(U){case"array":case"object":return"an "+U;case"boolean":case"date":case"regexp":return"a "+U;default:return U}}function $(F){return!F.constructor||!F.constructor.name?p:F.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},up}var dp,$1;function Uj(){if($1)return dp;$1=1;var e=sp();function t(){}function n(){}return n.resetWarningCache=t,dp=function(){function r(a,s,l,c,u,d){if(d!==e){var p=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 p.name="Invariant Violation",p}}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},dp}var j1;function Yj(){if(j1)return pl.exports;if(j1=1,process.env.NODE_ENV!=="production"){var e=O1(),t=!0;pl.exports=qj()(e.isElement,t)}else pl.exports=Uj()();return pl.exports}var Kj=Yj();const st=Gp(Kj),Gj=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 ai(e,t,n){const r=Zj(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&z1(r,"path",i),z1(r,"relativePath",i),r}function Zj(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=Gj.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function z1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Xj=[".DS_Store","Thumbs.db"];function Qj(e){return qr(this,void 0,void 0,function*(){return ml(e)&&Jj(e.dataTransfer)?rz(e.dataTransfer,e.type):ez(e)?tz(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?nz(e):[]})}function Jj(e){return ml(e)}function ez(e){return ml(e)&&ml(e.target)}function ml(e){return typeof e=="object"&&e!==null}function tz(e){return fp(e.target.files).map(t=>ai(t))}function nz(e){return qr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ai(n))})}function rz(e,t){return qr(this,void 0,void 0,function*(){if(e.items){const n=fp(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(oz));return B1(R1(r))}return B1(fp(e.files).map(n=>ai(n)))})}function B1(e){return e.filter(t=>Xj.indexOf(t.name)===-1)}function fp(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 oz(e){if(typeof e.webkitGetAsEntry!="function")return H1(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?W1(t):H1(e,t)}function R1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?R1(n):[n]],[])}function H1(e,t){return qr(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 a=yield i.getFile();return a.handle=i,ai(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ai(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function iz(e){return qr(this,void 0,void 0,function*(){return e.isDirectory?W1(e):az(e)})}function W1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>qr(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(iz));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function az(e){return qr(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ai(r,e.fullPath);t(o)},r=>{n(r)})})})}var gl={},q1;function sz(){return q1||(q1=1,gl.__esModule=!0,gl.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(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),gl}var lz=sz();const pp=Gp(lz);function U1(e){return dz(e)||uz(e)||Z1(e)||cz()}function cz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
243
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dz(e){if(Array.isArray(e))return hp(e)}function Y1(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 K1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y1(Object(n),!0).forEach(function(r){G1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ba(e,t){return hz(e)||pz(e,t)||Z1(e,t)||fz()}function fz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
244
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z1(e,t){if(e){if(typeof e=="string")return hp(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 hp(e,t)}}function hp(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 pz(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function hz(e){if(Array.isArray(e))return e}var mz=typeof pp=="function"?pp:pp.default,gz="file-invalid-type",vz="file-too-large",yz="file-too-small",bz="too-many-files",xz=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:gz,message:"File type must be ".concat(r)}},X1=function(t){return{code:vz,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Q1=function(t){return{code:yz,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},wz={code:bz,message:"Too many files"};function J1(e,t){var n=e.type==="application/x-moz-file"||mz(e,t);return[n,n?null:xz(t)]}function eS(e,t,n){if(ao(e.size))if(ao(t)&&ao(n)){if(e.size>n)return[!1,X1(n)];if(e.size<t)return[!1,Q1(t)]}else{if(ao(t)&&e.size<t)return[!1,Q1(t)];if(ao(n)&&e.size>n)return[!1,X1(n)]}return[!0,null]}function ao(e){return e!=null}function Sz(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=J1(l,n),u=ba(c,1),d=u[0],p=eS(l,r,o),f=ba(p,1),b=f[0],g=s?s(l):null;return d&&b&&!g})}function vl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function yl(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 tS(e){e.preventDefault()}function Tz(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Ez(e){return e.indexOf("Edge/")!==-1}function kz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Tz(e)||Ez(e)}function Un(){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),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!vl(r)&&s&&s.apply(void 0,[r].concat(i)),vl(r)})}}function Cz(){return"showOpenFilePicker"in window}function Pz(e){if(ao(e)){var t=Object.entries(e).filter(function(n){var r=ba(n,2),o=r[0],i=r[1],a=!0;return nS(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.')),a=!1),(!Array.isArray(i)||!i.every(rS))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ba(r,2),i=o[0],a=o[1];return K1(K1({},n),{},G1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function Az(e){if(ao(e))return Object.entries(e).reduce(function(t,n){var r=ba(n,2),o=r[0],i=r[1];return[].concat(U1(t),[o],U1(i))},[]).filter(function(t){return nS(t)||rS(t)}).join(",")}function Iz(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function _z(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function nS(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function rS(e){return/^.*\.[\w]+$/.test(e)}var Oz=["children"],Mz=["open"],Dz=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Nz=["refKey","onChange","onClick"];function Lz(e){return $z(e)||Vz(e)||oS(e)||Fz()}function Fz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
245
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $z(e){if(Array.isArray(e))return gp(e)}function mp(e,t){return Bz(e)||zz(e,t)||oS(e,t)||jz()}function jz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
246
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oS(e,t){if(e){if(typeof e=="string")return gp(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 gp(e,t)}}function gp(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 zz(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Bz(e){if(Array.isArray(e))return e}function iS(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 vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iS(Object(n),!0).forEach(function(r){vp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bl(e,t){if(e==null)return{};var n=Rz(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 Rz(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 yp=S.forwardRef(function(e,t){var n=e.children,r=bl(e,Oz),o=sS(r),i=o.open,a=bl(o,Mz);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(vt(vt({},a),{},{open:i})))});yp.displayName="Dropzone";var aS={disabled:!1,getFilesFromEvent:Qj,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};yp.defaultProps=aS,yp.propTypes={children:st.func,accept:st.objectOf(st.arrayOf(st.string)),multiple:st.bool,preventDropOnDocument:st.bool,noClick:st.bool,noKeyboard:st.bool,noDrag:st.bool,noDragEventsBubbling:st.bool,minSize:st.number,maxSize:st.number,maxFiles:st.number,disabled:st.bool,getFilesFromEvent:st.func,onFileDialogCancel:st.func,onFileDialogOpen:st.func,useFsAccessApi:st.bool,autoFocus:st.bool,onDragEnter:st.func,onDragLeave:st.func,onDragOver:st.func,onDrop:st.func,onDropAccepted:st.func,onDropRejected:st.func,onError:st.func,validator:st.func};var bp={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function sS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},aS),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,b=t.onDropRejected,g=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,E=t.noDrag,k=t.noDragEventsBubbling,C=t.onError,O=t.validator,_=S.useMemo(function(){return Az(n)},[n]),L=S.useMemo(function(){return Pz(n)},[n]),D=S.useMemo(function(){return typeof m=="function"?m:lS},[m]),z=S.useMemo(function(){return typeof g=="function"?g:lS},[g]),A=S.useRef(null),N=S.useRef(null),H=S.useReducer(Hz,bp),M=mp(H,2),P=M[0],$=M[1],F=P.isFocused,U=P.isFileDialogActive,G=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&Cz()),B=function(){!G.current&&U&&setTimeout(function(){if(N.current){var Q=N.current.files;Q.length||($({type:"closeDialog"}),z())}},300)};S.useEffect(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[N,U,z,G]);var Z=S.useRef([]),te=function(Q){A.current&&A.current.contains(Q.target)||(Q.preventDefault(),Z.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",tS,!1),document.addEventListener("drop",te,!1)),function(){x&&(document.removeEventListener("dragover",tS),document.removeEventListener("drop",te))}},[A,x]),S.useEffect(function(){return!r&&y&&A.current&&A.current.focus(),function(){}},[A,y,r]);var ne=S.useCallback(function(V){C?C(V):console.error(V)},[C]),J=S.useCallback(function(V){V.preventDefault(),V.persist(),Te(V),Z.current=[].concat(Lz(Z.current),[V.target]),yl(V)&&Promise.resolve(o(V)).then(function(Q){if(!(vl(V)&&!k)){var ce=Q.length,we=ce>0&&Sz({files:Q,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:O}),Le=ce>0&&!we;$({isDragAccept:we,isDragReject:Le,isDragActive:!0,type:"setDraggedFiles"}),c&&c(V)}}).catch(function(Q){return ne(Q)})},[o,c,ne,k,_,a,i,s,l,O]),R=S.useCallback(function(V){V.preventDefault(),V.persist(),Te(V);var Q=yl(V);if(Q&&V.dataTransfer)try{V.dataTransfer.dropEffect="copy"}catch{}return Q&&d&&d(V),!1},[d,k]),q=S.useCallback(function(V){V.preventDefault(),V.persist(),Te(V);var Q=Z.current.filter(function(we){return A.current&&A.current.contains(we)}),ce=Q.indexOf(V.target);ce!==-1&&Q.splice(ce,1),Z.current=Q,!(Q.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),yl(V)&&u&&u(V))},[A,u,k]),X=S.useCallback(function(V,Q){var ce=[],we=[];V.forEach(function(Le){var Ze=J1(Le,_),Ft=mp(Ze,2),xt=Ft[0],Kt=Ft[1],Kn=eS(Le,a,i),An=mp(Kn,2),In=An[0],W=An[1],K=O?O(Le):null;if(xt&&In&&!K)ce.push(Le);else{var Fe=[Kt,W];K&&(Fe=Fe.concat(K)),we.push({file:Le,errors:Fe.filter(function(tt){return tt})})}}),(!s&&ce.length>1||s&&l>=1&&ce.length>l)&&(ce.forEach(function(Le){we.push({file:Le,errors:[wz]})}),ce.splice(0)),$({acceptedFiles:ce,fileRejections:we,isDragReject:we.length>0,type:"setFiles"}),p&&p(ce,we,Q),we.length>0&&b&&b(we,Q),ce.length>0&&f&&f(ce,Q)},[$,s,_,a,i,l,p,f,b,O]),oe=S.useCallback(function(V){V.preventDefault(),V.persist(),Te(V),Z.current=[],yl(V)&&Promise.resolve(o(V)).then(function(Q){vl(V)&&!k||X(Q,V)}).catch(function(Q){return ne(Q)}),$({type:"reset"})},[o,X,ne,k]),j=S.useCallback(function(){if(G.current){$({type:"openDialog"}),D();var V={multiple:s,types:L};window.showOpenFilePicker(V).then(function(Q){return o(Q)}).then(function(Q){X(Q,null),$({type:"closeDialog"})}).catch(function(Q){Iz(Q)?(z(Q),$({type:"closeDialog"})):_z(Q)?(G.current=!1,N.current?(N.current.value=null,N.current.click()):ne(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."))):ne(Q)});return}N.current&&($({type:"openDialog"}),D(),N.current.value=null,N.current.click())},[$,D,z,v,X,ne,L,s]),se=S.useCallback(function(V){!A.current||!A.current.isEqualNode(V.target)||(V.key===" "||V.key==="Enter"||V.keyCode===32||V.keyCode===13)&&(V.preventDefault(),j())},[A,j]),le=S.useCallback(function(){$({type:"focus"})},[]),he=S.useCallback(function(){$({type:"blur"})},[]),xe=S.useCallback(function(){T||(kz()?setTimeout(j,0):j())},[T,j]),de=function(Q){return r?null:Q},Pe=function(Q){return w?null:de(Q)},Oe=function(Q){return E?null:de(Q)},Te=function(Q){k&&Q.stopPropagation()},Re=S.useMemo(function(){return function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=V.refKey,ce=Q===void 0?"ref":Q,we=V.role,Le=V.onKeyDown,Ze=V.onFocus,Ft=V.onBlur,xt=V.onClick,Kt=V.onDragEnter,Kn=V.onDragOver,An=V.onDragLeave,In=V.onDrop,W=bl(V,Dz);return vt(vt(vp({onKeyDown:Pe(Un(Le,se)),onFocus:Pe(Un(Ze,le)),onBlur:Pe(Un(Ft,he)),onClick:de(Un(xt,xe)),onDragEnter:Oe(Un(Kt,J)),onDragOver:Oe(Un(Kn,R)),onDragLeave:Oe(Un(An,q)),onDrop:Oe(Un(In,oe)),role:typeof we=="string"&&we!==""?we:"presentation"},ce,A),!r&&!w?{tabIndex:0}:{}),W)}},[A,se,le,he,xe,J,R,q,oe,w,E,r]),ue=S.useCallback(function(V){V.stopPropagation()},[]),Y=S.useMemo(function(){return function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=V.refKey,ce=Q===void 0?"ref":Q,we=V.onChange,Le=V.onClick,Ze=bl(V,Nz),Ft=vp({accept:_,multiple:s,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:de(Un(we,oe)),onClick:de(Un(Le,ue)),tabIndex:-1},ce,N);return vt(vt({},Ft),Ze)}},[N,n,s,oe,r]);return vt(vt({},P),{},{isFocused:F&&!r,getRootProps:Re,getInputProps:Y,rootRef:A,inputRef:N,open:de(j)})}function Hz(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},bp),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},bp);default:return e}}function lS(){}const cS=S.createContext([null,()=>{}]),Wz=()=>S.useContext(cS),qz=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,Uz={csv:Nc,xls:Nc,mov:km,mp4:km,xlsx:Nc,pdf:Em,txt:Em,json:sk,mp3:nk},Yz=e=>{const[,t]=Wz(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:qz(l),size:zj(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)},a=Uz[e.file.name.split(".").at(-1)]??Cm,s=n.type==="img"?h.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):h.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return h.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[h.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),h.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[h.jsx("span",{children:e.file.name}),h.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?h.jsx("div",{className:"flex-1 min-w-full",children:h.jsx(e.File,{file:e.file})}):null]}),h.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:h.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:h.jsx(vo,{size:16})})})]})},Kz=e=>h.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>h.jsx(Yz,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),uS=e=>{const t=St(),n=e.dragging?lk:ck;return h.jsxs("div",{className:"flex flex-col justify-center items-center",children:[h.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:h.jsx(n,{className:"text-primary",size:80})}),h.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[h.jsx("p",{children:t.uploadIdle}),h.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},Gz=e=>e.isDragActive?h.jsx(uS,{files:e.files,dragging:!0}):e.files.length>0?h.jsx(Kz,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):h.jsx(S.Fragment,{children:e.idle}),Zz=h.jsx(uS,{dragging:!1}),Xz=e=>{const t=e.item.file,n=e.item.type;return h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),h.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?h.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?h.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?h.jsx("figure",{children:h.jsx("audio",{controls:!0,src:e.item.url})}):null]})},Qz=({idle:e=Zz,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=St(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r?.(g),l(m=>m.concat(g))},{getRootProps:p,getInputProps:f,isDragActive:b}=sS({onDrop:d});return h.jsxs(cS.Provider,{value:a,children:[h.jsx(Yf,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?h.jsx(Xz,{item:a[0]}):null}),h.jsxs("div",{...p(),"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:[h.jsx("input",{...f(o),name:o.name,id:o.name}),h.jsx(Gz,{File:n,onDeleteFile:t,isDragActive:b,idle:e,files:c})]})]})},dS=()=>window.matchMedia("@media (pointer: coarse)"),Jz=()=>{const e=S.useRef(yr()?null:dS()),[t,n]=S.useState(yr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?dS():e.current).addEventListener("change",o=>n(o.matches))},[]),t},fS=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=Jz(),o=S.useRef(yr()?"":document.documentElement.style.overflowY);return S.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||ov())return;document.documentElement.style.padding=sm(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(UT(c.style.height)):null,p=je.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},eB=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},pS=(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},hS={basic:/[,[\]]+?/,extend:/[,[\].]+?/},mS=(e,t)=>{const n=pS(t,hS.basic,e);return n!==void 0&&n!==e?n:pS(t,hS.extend,e)},gS=e=>e.replace(/[^0-9]/g,""),xl=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),vS=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?gS(e).includes(gS(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?eB(e,t)!==null:!1,tB=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>vS(e,o,n,r)):vS(e,t,n,r),xp=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:je.array(i.value)?i.value.map(xl):xl(`${i.value}`)}));return e.forEach(i=>{const a=mS(i,t);o.forEach(s=>{const l=mS(i,s.key);if(!l)return;const c=xl(`${s.value}`.toLocaleLowerCase()).trim(),u=xl(`${l}`.toLocaleLowerCase()).trim();if(tB(u,c,s.score,s.match))return void r.set(a,i);je.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},nB=e=>h.jsx(S.Fragment,{children:e.children}),rB={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},oB=[],iB=S.forwardRef(function(t,n){return h.jsx(ze.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg",children:h.jsx(Sn,{children:t.children})})}),aB=S.forwardRef(function({item:t,context:n,...r},o){return h.jsx(ze.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),sB={List:iB,Item:aB},si=40,lB=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:b=!1,...g},m)=>{const v=S.useRef(null),y=S.useRef(null),x=S.useRef(null),T=g.value??g.defaultValue??"",w=St(),[E,k]=S.useState(()=>Math.min(320,si*o.length)),[C,O]=S.useState(!1),[_,L]=S.useState(""),[D,z]=S.useState(T),[A,N]=S.useState(()=>o.find(Y=>Y.value===T)?.label??T),[H,M]=S.useState(null),P=S.useRef(oB),$=fS(C,"block-only"),F=b&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,U=()=>uo.flushSync(()=>O(!0)),G=_?xp(F,"value",[{key:"value",value:_},{key:"label",value:_}]):F,B=()=>{O(!1),k(0)},Z=G.filter(Y=>Y.hidden!==!0),te=b?void 0:`^(${o.map(Y=>`${mu(Y.value)}${Y.label?"|"+mu(Y.label):""}`).join("|")})$`,{x:ne,y:J,strategy:R,refs:q,context:X}=er({open:C,transform:!0,onOpenChange:O,placement:"bottom-start",whileElementsMounted:Eo,middleware:[Ai(4),gg({padding:10,elementContext:"reference",apply(Y){const Q=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ce=xi(q.reference.current,window.innerHeight),we=Math.min(Q<si?ce:Q,ce,Y.availableHeight),Le=Z.length===0?si:Math.min(we,ce,Q),Ze=`${y.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:Ze,maxWidth:Ze,height:Le})}})]}),oe=Zg(X,rB),{getReferenceProps:j,getFloatingProps:se,getItemProps:le}=tr([vr(X,{role:"listbox"}),gr(X),ps(X,{cols:0,listRef:P,loop:!0,virtual:!0,allowEscape:!0,activeIndex:H,selectedIndex:H,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(g.value){const Y=o.find(V=>V.value===g.value);Y&&(N(Y.label??Y.value),z(g.value))}},[g.value,o.length]),S.useEffect(()=>{if(!C)return k(0);const Y=q.reference;if(Y.current===null)return;const V=xi(Y.current,window.innerHeight);setTimeout(()=>k(Math.min(V,Z.length*si)),100)},[_,C,q.reference,Z.length]),S.useEffect(()=>{const Y=q.reference.current;if(Y)return bi(Y)},[]);const he=(Y,V)=>{z(Y.value);const Q=q.reference.current;if(!Q)return;Q?.setAttribute("data-value",Y.value),Q.value=Y.value;const ce=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(ce),g.onChange&&g.onChange(ce),N(Y.label??""),B(),L(""),M(V)},xe=Y=>{const V=Y.target.value;return L(V),!C&&V===""?O(!0):(Y.target.name=g.name||"",V?O(!0):g.onChange?.(Y))},de=()=>{U(),L(""),q.reference.current?.focus()},Pe=()=>{M(Y=>Y===null?0:Y),U(),L("")},Oe=()=>{q.reference.current?.setAttribute("data-value",""),L(""),z(""),N(""),am(q.reference.current),B()},Te=g.id||g.name,Re=`${Te}-shadow`,ue=Z.length===0;return h.jsxs(Di,{...g,left:e,error:t,ref:y,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:Re,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:h.jsxs("span",{className:"flex items-center gap-0.5",children:[n,h.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:de,children:[h.jsx(_c,{size:20}),h.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),D?h.jsx("button",{type:"button",onClick:Oe,className:"p-2 transition-colors link:text-danger md:p-1",children:h.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.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:[h.jsx("input",{"data-shadow":"true",...j({...g,onFocus:Pe,pattern:te,onChange:xe,id:Re,name:Re,ref:q.setReference,onClick:Y=>Y.currentTarget.focus(),onKeyDown(Y){if(Y.key==="Escape")return Y.currentTarget.blur(),B();if(C){if(Y.key==="ArrowDown"){let V=je.number(H)?H+1:0;return V>Z.length-1&&(V=0),x.current?.scrollIntoView({index:V}),M(V)}if(Y.key==="ArrowUp"){let V=je.number(H)?H-1:Z.length-1;return V<0&&(V=Z.length-1),x.current?.scrollIntoView({index:V}),M(V)}if(Y.key==="Enter"){if(H!==null&&Z[H])return Y.preventDefault(),he(Z[H],H);if(Z.length===1)return Y.preventDefault(),he(Z[0],0)}}}}),"data-value":D,"data-error":!!t,"data-name":Te,"data-target":Te,required:f,value:C?_:o.length===0?"":A||D,"aria-autocomplete":"list",autoComplete:"off",className:Se("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",g.className)}),h.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:m,required:f,defaultValue:g.value||D||void 0}),h.jsx(hr,{preserveTabOrder:!0,children:C?h.jsx(Rr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:h.jsxs(ze.div,{...se({ref:Zn($,q.setFloating),style:{...oe.styles,left:ne,top:J??0,position:R,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:ue?"auto":E},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 k(0);const V=q.floating.current.querySelectorAll("li").item(0),Q=(V?V.getBoundingClientRect().height:si)*Z.length;return uo.flushSync(()=>k(Q+10))},children:[ue?h.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:h.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,h.jsx(If,{overscan:40,ref:x,hidden:ue,data:Z,defaultItemHeight:si,components:sB,scrollerRef:Y=>void(v.current=Y),className:"max-h-full overscroll-contain rounded-lg border-floating bg-floating-background p-0 text-foreground",itemContent:(Y,V)=>{const Q=V.Render??nB,ce=D===V.value||D===V.label,we=H===Y,Le=V.label??V.value;return h.jsx("button",{"data-value":V.value,...le({ref:Ze=>void(P.current[Y]=Ze),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":V.disabled,onClick:()=>he(V,Y),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ce?"bg-primary-hover text-primary-foreground":""} ${we?"bg-floating-hover text-floating-foreground":""}`}),children:h.jsx(Q,{...g,label:V.label,value:V.value,children:Le})})}})]})}):null})]})});class Pn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Pn&&(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 Pn(this);return t?t(n):n}static from(t,n){return new Pn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(Pn.from(t,n).values())}toArray(){return Array.from(this.values())}}const yS=40,cB=e=>h.jsx(S.Fragment,{children:e.children}),uB={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},bS=[],dB=S.forwardRef(function(t,n){return h.jsx(ze.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:h.jsx(Sn,{children:t.children})})}),fB=S.forwardRef(function({item:t,context:n,...r},o){return h.jsx(ze.li,{...r,ref:o,className:"last:rounded-t-lg"})}),pB={List:dB,Item:fB},hB=e=>{const t=St(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const a=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>a.width)return i(!0)},[r]),h.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?h.jsxs(Aa,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},mB=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:b=!1,onChangeOptions:g,...m},v)=>{const y=S.useMemo(()=>new Pn(r.map(Y=>[Y.value,Y])),[r]),x=S.useRef(null),T=S.useRef(null),w=m.value??m.defaultValue??bS,E=St(),[k,C]=S.useState(0),[O,_]=S.useState(!1),[L,D]=S.useState(""),[z,A]=S.useState(()=>{const Y=new Pn;return w.forEach(V=>{const Q=y.get(V);return Q?Y.set(V,Q):void 0}),Y}),N=S.useMemo(()=>Array.from(z.keys()),[z]),[H,M]=S.useState(()=>{const Y=new Set(w);return r.reduce((V,Q)=>Y.has(Q.value)?[...V,Q.label??Q.value]:V,[])??w}),[P,$]=S.useState(null),F=S.useRef(bS),U=b&&L!==""?[{value:L,label:L,"data-dynamic":"true"},...r]:r,G=L.length===0?U:xp(U,"value",[{key:"value",value:L},{key:"label",value:L}]),B=fS(O,"block-only"),Z=G.filter(Y=>Y.hidden!==!0),te=Z.length===0,{x:ne,y:J,strategy:R,refs:q,context:X}=er({open:O,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Eo,middleware:[Ai(4),gg({padding:10,elementContext:"reference",apply(Y){const Q=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ce=xi(q.reference.current,window.innerHeight),we=Math.min(Q<yS?ce:Q,ce,Y.availableHeight),Le=Z.length===0?yS:Math.min(we,ce,Q),Ze=`${x.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:Ze,maxWidth:Ze,height:Le})}})]}),oe=Zg(X,uB),{getReferenceProps:j,getFloatingProps:se,getItemProps:le}=tr([vr(X,{role:"listbox"}),gr(X),ps(X,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Y=>$(V=>Y??V)})]);S.useEffect(()=>{if(!O)return C(0);const Y=q.reference;if(Y.current===null)return;const V=xi(Y.current,window.innerHeight);setTimeout(()=>C(Math.min(V,Z.length*40)),100)},[L,O,q.reference]),S.useEffect(()=>{m.value&&A(new Pn(m.value.map(Y=>[Y,y.get(Y)])))},[m.value,y]),S.useEffect(()=>{const Y=q.reference.current;if(Y)return bi(Y)},[]);const he=(Y,V)=>{const Q=z.clone(Le=>Le.has(Y.value)?Le.remove(Y.value):Le.set(Y.value,Y));A(Q);const ce=q.reference.current;if(!ce)return;const we=Q.map(Le=>Le.value);ce?.setAttribute("data-value",JSON.stringify(we)),g&&g(we),M(Le=>Le.concat(Y.label??"")),D(""),$(V)},xe=Y=>{const V=Y.target.value;return D(V),!O&&V===""?_(!0):(Y.target.name=m.name||"",V?_(!0):void 0)},de=()=>{_(!0),D(""),q.reference.current?.focus()},Pe=()=>{_(!0),D("")},Oe=()=>{q.reference.current?.setAttribute("data-value","[]"),D(""),_(!1),A(new Pn),g?.([])},Te=m.id||m.name,Re=z.map((Y,V)=>h.jsx(Aa,{size:"small",icon:h.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),he(Y,V)},children:h.jsx(vo,{size:14})}),children:Y.label??Y.value},`MultiSelect-${Y.value}-x`)),ue={height:te?"0":z.size===0?k-49:k-86};return h.jsxs(Di,{...m,left:e,error:t,ref:x,form:m.form,name:m.name,feedback:d,hideLeft:p,required:f,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:h.jsxs("span",{className:"flex items-center gap-0.5",children:[n,h.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:de,children:[h.jsx(_c,{size:20}),h.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),z?h.jsx("button",{type:"button",onClick:Oe,className:"transition-colors link:text-danger",children:h.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.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:[h.jsxs("ul",{...j({...m,onFocus:Pe,id:`${Te}-shadow`,name:`${Te}-shadow`,ref:q.setReference}),tabIndex:0,role:"button","data-name":Te,"data-target":Te,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":N.join(","),className:Se("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",m.className),children:[N.length>0?null:h.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),h.jsx(hB,{label:c,children:Re})]}),h.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:v,required:f,defaultValue:m.value||N||void 0}),h.jsx(hr,{preserveTabOrder:!0,children:O?h.jsx(uu,{lockScroll:!0,children:h.jsx(Rr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:h.jsxs("div",{...se({ref:q.setFloating,style:{...oe.styles,top:J??0,position:R,left:ne,height:k-(N.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:[h.jsx("input",{autoFocus:!0,value:L,onChange:xe,title:m.title,placeholder:E.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:Y=>{if(Y.key==="ArrowDown"){let V=P+1;return V>Z.length-1&&(V=0),T.current?.scrollIntoView({index:V}),$(V)}if(Y.key==="ArrowUp"){let V=P-1;return V<0&&(V=Z.length-1),T.current?.scrollIntoView({index:V}),$(V)}if(Y.key==="Escape")return Y.currentTarget.blur(),_(!1);if(Y.key==="Enter"){if(P!==null&&Z[P])return Y.preventDefault(),he(Z[P],P);if(Z.length===1)return Y.preventDefault(),he(Z[0],0)}}}),te?h.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:h.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||E.autocompleteEmpty})}):null,te?null:h.jsx(ze.div,{initial:!1,"data-floating":"true",ref:B,animate:{height:te?"auto":k},style:ue,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!O)return C(0);const V=q.floating.current.querySelectorAll("li").item(0),Q=(V?V.getBoundingClientRect().height:40)*Z.length;return uo.flushSync(()=>C(Q+2))},children:h.jsx(If,{ref:T,hidden:te,data:Z,components:pB,style:ue,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Y,V)=>{const Q=V.Render??cB,ce=z.has(V.value)||z.has(V.label??""),we=P===Y,Le=V.label??V.value;return h.jsxs("button",{"data-value":V.value,...le({ref:Ze=>void(F.current[Y]=Ze),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":V.disabled,onClick:()=>he(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 ${ce||we?"bg-floating-hover text-floating-foreground":""}`,children:[h.jsx(Wf,{onChange:gu,checked:ce,"aria-checked":ce,onClick:Ze=>{Ze.stopPropagation(),he(V,Y)}}),h.jsx(Q,{...m,label:V.label,value:V.value,children:Le})]})}})}),h.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:z.size===0?h.jsx(Aa,{theme:"muted",size:"small",children:E.autocompleteEmpty}):Re})]})})}):null})]})}),gB=e=>{const[t,n]=S.useState(0);return S.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},vB={Item:S.forwardRef(function(t,n){return h.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return h.jsx("ul",{...t,ref:n,className:"space-y-3"})})},yB=e=>{const t=S.useRef(null),n=gB(t);return h.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[h.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:[h.jsx("header",{className:"border-b border-card-border pb-2"}),h.jsxs("div",{className:"px-8 space-y-2",children:[h.jsx(Io,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),h.jsx(If,{height:n,useWindowScroll:!0,data:e.source,components:vB,itemContent:(r,o)=>h.jsx(S.Fragment,{children:h.jsx(Wf,{children:h.jsx(e.Item,{data:o})})})})]})]}),h.jsx("div",{children:h.jsx(hs,{children:h.jsx(Oc,{})})}),h.jsx("div",{})]})};function bB(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 xB=({children:e,...t})=>{const n=br(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:bB(r.current));return S.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return s.observe(a),()=>s.disconnect()},[]),h.jsx("div",{...t,ref:r,children:o?e:null})},wB=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.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},SB=fo("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"}}),xS=S.createContext(()=>{throw new Error("Not implemented")}),TB=()=>S.useContext(xS),wS={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]}},EB=S.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=SB({theme:t.theme||"default"});return h.jsx(lI,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:h.jsx(ze.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:wS[t.reversedIndex]||wS.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:h.jsxs("div",{className:a,children:[h.jsxs("div",{className:"flex flex-col p-4",children:[t.title?h.jsx(cI,{className:"select-text truncate text-lg font-medium leading-relaxed",children:t.title}):null,h.jsx(uI,{className:"select-text truncate",children:t.text})]}),r?h.jsx(dI,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:h.jsx(vo,{className:"size-5"})}):null]})})})});function kB({children:e,max:t=5,duration:n=5e3}){const r=S.useRef(null),o=wB(r),[i,a]=S.useState([]),s=S.useCallback(()=>a([]),[]);S.useEffect(()=>s,[s]);const l=S.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const b=[...f,{...u,id:d,text:c}];return b.length>t?b.slice(b.length-t,b.length+1):b}),{clear:s,close:()=>a(f=>f.filter(b=>b.id!==d))}},[t]);return h.jsxs(aI,{duration:n,swipeThreshold:150,children:[h.jsx(xS.Provider,{value:l,children:e}),h.jsx(ze.ol,{children:h.jsx(Sn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(b=>b.id!==c.id));return S.createElement(EB,{...c,hover:o,index:u,key:c.id,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})})}),h.jsx(sI,{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 CB=/Mac|iPod|iPhone|iPad/,wl=()=>CB.test(navigator.userAgent),PB=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?wl()?"Meta":"Control":n==="Hyper"?wl()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),SS=e=>e.map(t=>t.trim()).join("+");class AB{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=SS(PB(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 s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=SS(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const IB=e=>(e=e.trim(),e==="Alt"?wl()?h.jsx(fk,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?wl()?h.jsx(ak,{"aria-label":"Command",size:14}):"Ctrl":e),_B=e=>{const t=e.value.trim().split("+");return h.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return h.jsxs(S.Fragment,{children:[h.jsx("kbd",{"aria-label":n,children:IB(n)}),o?null:h.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},OB=e=>h.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:kc(e.item.title)?h.jsx(e.item.title,{text:e.text}):e.item.title}),MB=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?h.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:h.jsx(OB,{text:e.text,item:o})}):o.type!=="shortcut"?h.jsx(S.Fragment,{}):h.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Se("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[h.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,h.jsx("span",{children:kc(o.title)?h.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?h.jsx(_B,{value:o.shortcut}):null]})}),DB=(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(s=>({...s,title:je.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=je.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=xp(o,"title",n),a=r.filter(s=>je.function(s.enabled)?s.enabled({text:t}):!1);return Pn.unique(i.concat(a),s=>s.title)},NB=[0,0,0,0,0],LB=e=>{const t=e.bind??"Mod + k",n=S.useRef([]),r=St(),[o,i]=S.useState(""),a=br(o),s=S.useId(),l=S.useRef(null),[c,u]=S.useState(null),d=er({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Eo}),p=ps(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:y=>u(x=>je.number(y)?y:e.open?x??0:null)}),{getItemProps:f}=tr([p]),b=e.commands.flatMap(y=>y.type==="group"?[y,...y.items]:[y]),g=DB(b,o),m=o===""?b:[{type:"group",title:"Results",items:[]},...g.filter(y=>y.type!=="group")];S.useEffect(()=>{const y=new AB;return y.add(t,()=>e.onChangeVisibility?.(!0)),b.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&y.add(x.shortcut,T=>x.action({event:T,text:a.current,setOpen:e.onChangeVisibility}))}),y.register()},[t]);const v=e.Icon??Pm;return h.jsx(S.Fragment,{children:h.jsxs(Yf,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],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:[h.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:[h.jsx("div",{className:"flex size-10 items-center justify-center",children:h.jsx(v,{Default:Pm,text:o,size:16})}),h.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:y=>i(y.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:y=>{if((y.key==="ArrowDown"||y.key==="ArrowUp")&&c!==null&&n.current[c]?.scrollIntoView({block:"start",inline:"start"}),y.key==="Enter"){if(c!==null&&m[c]){y.preventDefault();const x=m[c],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}if(m.length===1){y.preventDefault();const x=m[0],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}}}})]}),e.loading?h.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:[h.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),NB.map((y,x)=>h.jsx("li",{className:Se("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Df},`${s}-${x}-skeleton-index`))]}):h.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[h.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:[m.map((y,x)=>S.createElement(MB,{...f({onMouseEnter:()=>u(x),ref(T){n.current[x]=T},onClick(T){T.preventDefault(),e.onChangeVisibility(!1),d.refs.domReference.current?.focus(),y.type==="shortcut"&&y.action({event:T,setOpen:e.onChangeVisibility,text:o})}}),item:y,text:o,active:c===x,key:`${s}-${y.type}-${x}`})),m.length===1?h.jsx("div",{className:Se("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&je.number(c)?h.jsx(e.Preview,{command:m[c],text:o}):null]}),e.footer?h.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},FB=["INPUT","SELECT"],TS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{FB.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var wp,ES;function Sp(){if(ES)return wp;ES=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return wp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},wp}var Tp,kS;function CS(){if(kS)return Tp;kS=1;var e=Sp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var m=[],v=0;v<256;++v)m.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return m}(),o=function(v){for(;v.length>1;){var y=v.pop(),x=y.obj[y.prop];if(n(x)){for(var T=[],w=0;w<x.length;++w)typeof x[w]<"u"&&T.push(x[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var x=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(x[T]=v[T]);return x},a=function m(v,y,x){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var T=v;return n(v)&&!n(y)&&(T=i(v,x)),n(v)&&n(y)?(y.forEach(function(w,E){if(t.call(v,E)){var k=v[E];k&&typeof k=="object"&&w&&typeof w=="object"?v[E]=m(k,w,x):v.push(w)}else v[E]=w}),v):Object.keys(y).reduce(function(w,E){var k=y[E];return t.call(w,E)?w[E]=m(w[E],k,x):w[E]=k,w},T)},s=function(v,y){return Object.keys(y).reduce(function(x,T){return x[T]=y[T],x},v)},l=function(m,v,y){var x=m.replace(/\+/g," ");if(y==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,y,x,T,w){if(v.length===0)return v;var E=v;if(typeof v=="symbol"?E=Symbol.prototype.toString.call(v):typeof v!="string"&&(E=String(v)),x==="iso-8859-1")return escape(E).replace(/%u[0-9a-f]{4}/gi,function(z){return"%26%23"+parseInt(z.slice(2),16)+"%3B"});for(var k="",C=0;C<E.length;C+=c){for(var O=E.length>=c?E.slice(C,C+c):E,_=[],L=0;L<O.length;++L){var D=O.charCodeAt(L);if(D===45||D===46||D===95||D===126||D>=48&&D<=57||D>=65&&D<=90||D>=97&&D<=122||w===e.RFC1738&&(D===40||D===41)){_[_.length]=O.charAt(L);continue}if(D<128){_[_.length]=r[D];continue}if(D<2048){_[_.length]=r[192|D>>6]+r[128|D&63];continue}if(D<55296||D>=57344){_[_.length]=r[224|D>>12]+r[128|D>>6&63]+r[128|D&63];continue}L+=1,D=65536+((D&1023)<<10|O.charCodeAt(L)&1023),_[_.length]=r[240|D>>18]+r[128|D>>12&63]+r[128|D>>6&63]+r[128|D&63]}k+=_.join("")}return k},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],x=[],T=0;T<y.length;++T)for(var w=y[T],E=w.obj[w.prop],k=Object.keys(E),C=0;C<k.length;++C){var O=k[C],_=E[O];typeof _=="object"&&_!==null&&x.indexOf(_)===-1&&(y.push({obj:E,prop:O}),x.push(_))}return o(y),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},b=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var x=[],T=0;T<v.length;T+=1)x.push(y(v[T]));return x}return y(v)};return Tp={arrayToObject:i,assign:s,combine:b,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},Tp}var Ep,PS;function VB(){if(PS)return Ep;PS=1;var e=zT(),t=CS(),n=Sp(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,v){return m+"["+v+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(g,m){a.apply(g,i(m)?m:[m])},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(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},p={},f=function g(m,v,y,x,T,w,E,k,C,O,_,L,D,z,A,N,H,M){for(var P=m,$=M,F=0,U=!1;($=$.get(p))!==void 0&&!U;){var G=$.get(m);if(F+=1,typeof G<"u"){if(G===F)throw new RangeError("Cyclic object value");U=!0}typeof $.get(p)>"u"&&(F=0)}if(typeof O=="function"?P=O(v,P):P instanceof Date?P=D(P):y==="comma"&&i(P)&&(P=t.maybeMap(P,function(he){return he instanceof Date?D(he):he})),P===null){if(w)return C&&!N?C(v,u.encoder,H,"key",z):v;P=""}if(d(P)||t.isBuffer(P)){if(C){var B=N?v:C(v,u.encoder,H,"key",z);return[A(B)+"="+A(C(P,u.encoder,H,"value",z))]}return[A(v)+"="+A(String(P))]}var Z=[];if(typeof P>"u")return Z;var te;if(y==="comma"&&i(P))N&&C&&(P=t.maybeMap(P,C)),te=[{value:P.length>0?P.join(",")||null:void 0}];else if(i(O))te=O;else{var ne=Object.keys(P);te=_?ne.sort(_):ne}var J=k?String(v).replace(/\./g,"%2E"):String(v),R=x&&i(P)&&P.length===1?J+"[]":J;if(T&&i(P)&&P.length===0)return R+"[]";for(var q=0;q<te.length;++q){var X=te[q],oe=typeof X=="object"&&X&&typeof X.value<"u"?X.value:P[X];if(!(E&&oe===null)){var j=L&&k?String(X).replace(/\./g,"%2E"):String(X),se=i(P)?typeof y=="function"?y(R,j):R:R+(L?"."+j:"["+j+"]");M.set(m,F);var le=e();le.set(p,M),s(Z,g(oe,se,y,x,T,w,E,k,y==="comma"&&N&&i(P)?null:C,O,_,L,D,z,A,N,H,le))}}return Z},b=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");y=m.format}var x=n.formatters[y],T=u.filter;(typeof m.filter=="function"||i(m.filter))&&(T=m.filter);var w;if(m.arrayFormat in o?w=m.arrayFormat:"indices"in m?w=m.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var E=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:E,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:x,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return Ep=function(g,m){var v=g,y=b(m),x,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,x=T);var w=[];if(typeof v!="object"||v===null)return"";var E=o[y.arrayFormat],k=E==="comma"&&y.commaRoundTrip;x||(x=Object.keys(v)),y.sort&&x.sort(y.sort);for(var C=e(),O=0;O<x.length;++O){var _=x[O],L=v[_];y.skipNulls&&L===null||s(w,f(L,_,E,k,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,C))}var D=w.join(y.delimiter),z=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?z+="utf8=%26%2310003%3B&":z+="utf8=%E2%9C%93&"),D.length>0?z+D:""},Ep}var kp,AS;function $B(){if(AS)return kp;AS=1;var e=CS(),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(f,b){return String.fromCharCode(parseInt(b,10))})},i=function(p,f,b){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&b>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,b){var g={__proto__:null},m=b.ignoreQueryPrefix?f.replace(/^\?/,""):f;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=b.parameterLimit===1/0?void 0:b.parameterLimit,y=m.split(b.delimiter,b.throwOnLimitExceeded?v+1:v);if(b.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,T,w=b.charset;if(b.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),x=T,T=y.length);for(T=0;T<y.length;++T)if(T!==x){var E=y[T],k=E.indexOf("]="),C=k===-1?E.indexOf("="):k+1,O,_;C===-1?(O=b.decoder(E,r.decoder,w,"key"),_=b.strictNullHandling?null:""):(O=b.decoder(E.slice(0,C),r.decoder,w,"key"),_=e.maybeMap(i(E.slice(C+1),b,n(g[O])?g[O].length:0),function(D){return b.decoder(D,r.decoder,w,"value")})),_&&b.interpretNumericEntities&&w==="iso-8859-1"&&(_=o(String(_))),E.indexOf("[]=")>-1&&(_=n(_)?[_]:_);var L=t.call(g,O);L&&b.duplicates==="combine"?g[O]=e.combine(g[O],_):(!L||b.duplicates==="last")&&(g[O]=_)}return g},c=function(p,f,b,g){var m=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");m=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,b,m),x=p.length-1;x>=0;--x){var T,w=p[x];if(w==="[]"&&b.parseArrays)T=b.allowEmptyArrays&&(y===""||b.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=b.plainObjects?{__proto__:null}:{};var E=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,k=b.decodeDotInKeys?E.replace(/%2E/g,"."):E,C=parseInt(k,10);!b.parseArrays&&k===""?T={0:y}:!isNaN(C)&&w!==k&&String(C)===k&&C>=0&&b.parseArrays&&C<=b.arrayLimit?(T=[],T[C]=y):k!=="__proto__"&&(T[k]=y)}y=T}return y},u=function(f,b,g,m){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,E=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;E.push(w)}for(var k=0;g.depth>0&&(T=x.exec(v))!==null&&k<g.depth;){if(k+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;E.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");E.push("["+v.slice(T.index)+"]")}return c(E,b,g,m)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var b=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var m=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:m,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:b,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return kp=function(p,f){var b=d(f);if(p===""||p===null||typeof p>"u")return b.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,b):p,m=b.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var x=v[y],T=u(x,g[x],b,typeof p=="string");m=e.merge(m,T,b)}return b.allowSparse===!0?m:e.compact(m)},kp}var Cp,IS;function jB(){if(IS)return Cp;IS=1;var e=VB(),t=$B(),n=Sp();return Cp={formats:n,parse:t,stringify:e},Cp}var zB=jB(),Ye;(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 a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},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 a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},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(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ye||(Ye={}));var _S;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(_S||(_S={}));const ve=Ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ar=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}},ie=Ye.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 ar 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 a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof ar))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ye.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()}}ar.create=e=>new ar(e);const Pp=(e,t)=>{let n;switch(e.code){case ie.invalid_type:e.received===ve.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ye.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ye.joinValues(e.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ye.joinValues(e.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${Ye.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.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}"`:Ye.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ie.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 ie.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 ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ye.assertNever(e)}return{message:n}};let BB=Pp;function RB(){return BB}const HB=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function fe(e,t){const n=RB(),r=HB({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Pp?void 0:Pp].filter(o=>!!o)});e.common.issues.push(r)}class ln{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 Ie;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,a=await o.value;r.push({key:i,value:a})}return ln.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Ie;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Ie=Object.freeze({status:"aborted"}),xa=e=>({status:"dirty",value:e}),yn=e=>({status:"valid",value:e}),OS=e=>e.status==="aborted",MS=e=>e.status==="dirty",li=e=>e.status==="valid",Sl=e=>typeof Promise<"u"&&e instanceof Promise;var ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ye||(ye={}));class Ir{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 DS=(e,t)=>{if(li(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 ar(e.common.issues);return this._error=n,this._error}}};function Be(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:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class We{get description(){return this._def.description}_getType(t){return Ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ln,ctx:{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Sl(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:Ar(t)},o=this._parseSync({data:t,path:r.path,parent:r});return DS(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return li(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=>li(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:Ar(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Sl(o)?o:Promise.resolve(o));return DS(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 a=t(o),s=()=>i.addIssue({code:ie.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!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 fi({schema:this,typeName:_e.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 Or.create(this,this._def)}nullable(){return pi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yn.create(this)}promise(){return Cl.create(this,this._def)}or(t){return El.create([this,t],this._def)}and(t){return kl.create(this,t,this._def)}transform(t){return new fi({...Be(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new _p({...Be(this._def),innerType:this,defaultValue:n,typeName:_e.ZodDefault})}brand(){return new f4({typeName:_e.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Op({...Be(this._def),innerType:this,catchValue:n,typeName:_e.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Mp.create(this,t)}readonly(){return Dp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const WB=/^c[^\s-]{8,}$/i,qB=/^[0-9a-z]+$/,UB=/^[0-9A-HJKMNP-TV-Z]{26}$/i,YB=/^[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,KB=/^[a-z0-9_-]{21}$/i,GB=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ZB=/^[-+]?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)?)??$/,XB=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,QB="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ap;const JB=/^(?:(?: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])$/,e4=/^(?:(?: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])$/,t4=/^(([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]))$/,n4=/^(([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])$/,r4=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,o4=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,NS="((\\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])))",i4=new RegExp(`^${NS}$`);function LS(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 a4(e){return new RegExp(`^${LS(e)}$`)}function s4(e){let t=`${NS}T${LS(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 l4(e,t){return!!((t==="v4"||!t)&&JB.test(e)||(t==="v6"||!t)&&t4.test(e))}function c4(e,t){if(!GB.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 u4(e,t){return!!((t==="v4"||!t)&&e4.test(e)||(t==="v6"||!t)&&n4.test(e))}class so extends We{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_type,expected:ve.string,received:i.parsedType}),Ie}const r=new ln;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.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),fe(o,{code:ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?fe(o,{code:ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&fe(o,{code:ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")XB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"email",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ap||(Ap=new RegExp(QB,"u")),Ap.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"emoji",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")YB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"uuid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")KB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"nanoid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")WB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"cuid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")qB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"cuid2",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")UB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"ulid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),fe(o,{validation:"url",code:ie.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),fe(o,{validation:"regex",code:ie.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),fe(o,{code:ie.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),fe(o,{code:ie.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?s4(i).test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?i4.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?a4(i).test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?ZB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"duration",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?l4(t.data,i.version)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"ip",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?c4(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"jwt",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?u4(t.data,i.version)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"cidr",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?r4.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"base64",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?o4.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"base64url",code:ie.invalid_string,message:i.message}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ie.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new so({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.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,...ye.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,...ye.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ye.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new so({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new so({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new so({...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}}so.create=e=>new so({checks:[],typeName:_e.ZodString,coerce:e?.coerce??!1,...Be(e)});function d4(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(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class ci extends We{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)!==ve.number){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_type,expected:ve.number,received:i.parsedType}),Ie}let r;const o=new ln;for(const i of this._def.checks)i.kind==="int"?Ye.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.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),fe(r,{code:ie.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),fe(r,{code:ie.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?d4(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.not_finite,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ci({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.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"&&Ye.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)}}ci.create=e=>new ci({checks:[],typeName:_e.ZodNumber,coerce:e?.coerce||!1,...Be(e)});class wa extends We{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)!==ve.bigint)return this._getInvalidInput(t);let r;const o=new ln;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),fe(r,{code:ie.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),fe(r,{code:ie.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),fe(r,{code:ie.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return fe(n,{code:ie.invalid_type,expected:ve.bigint,received:n.parsedType}),Ie}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new wa({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new wa({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.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}}wa.create=e=>new wa({checks:[],typeName:_e.ZodBigInt,coerce:e?.coerce??!1,...Be(e)});class FS extends We{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.boolean,received:r.parsedType}),Ie}return yn(t.data)}}FS.create=e=>new FS({typeName:_e.ZodBoolean,coerce:e?.coerce||!1,...Be(e)});class Tl extends We{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_type,expected:ve.date,received:i.parsedType}),Ie}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_date}),Ie}const r=new ln;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.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),fe(o,{code:ie.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Tl({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.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}}Tl.create=e=>new Tl({checks:[],coerce:e?.coerce||!1,typeName:_e.ZodDate,...Be(e)});class VS extends We{_parse(t){if(this._getType(t)!==ve.symbol){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.symbol,received:r.parsedType}),Ie}return yn(t.data)}}VS.create=e=>new VS({typeName:_e.ZodSymbol,...Be(e)});class $S extends We{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.undefined,received:r.parsedType}),Ie}return yn(t.data)}}$S.create=e=>new $S({typeName:_e.ZodUndefined,...Be(e)});class jS extends We{_parse(t){if(this._getType(t)!==ve.null){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.null,received:r.parsedType}),Ie}return yn(t.data)}}jS.create=e=>new jS({typeName:_e.ZodNull,...Be(e)});class zS extends We{constructor(){super(...arguments),this._any=!0}_parse(t){return yn(t.data)}}zS.create=e=>new zS({typeName:_e.ZodAny,...Be(e)});class BS extends We{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yn(t.data)}}BS.create=e=>new BS({typeName:_e.ZodUnknown,...Be(e)});class _r extends We{_parse(t){const n=this._getOrReturnCtx(t);return fe(n,{code:ie.invalid_type,expected:ve.never,received:n.parsedType}),Ie}}_r.create=e=>new _r({typeName:_e.ZodNever,...Be(e)});class RS extends We{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.void,received:r.parsedType}),Ie}return yn(t.data)}}RS.create=e=>new RS({typeName:_e.ZodVoid,...Be(e)});class Yn extends We{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ve.array)return fe(n,{code:ie.invalid_type,expected:ve.array,received:n.parsedType}),Ie;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(fe(n,{code:a?ie.too_big:ie.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?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&&(fe(n,{code:ie.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&&(fe(n,{code:ie.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((a,s)=>o.type._parseAsync(new Ir(n,a,n.path,s)))).then(a=>ln.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ir(n,a,n.path,s)));return ln.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Yn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Yn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Yn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Yn.create=(e,t)=>new Yn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...Be(t)});function ui(e){if(e instanceof Dt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Or.create(ui(r))}return new Dt({...e._def,shape:()=>t})}else return e instanceof Yn?new Yn({...e._def,type:ui(e.element)}):e instanceof Or?Or.create(ui(e.unwrap())):e instanceof pi?pi.create(ui(e.unwrap())):e instanceof lo?lo.create(e.items.map(t=>ui(t))):e}class Dt extends We{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=Ye.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ve.object){const c=this._getOrReturnCtx(t);return fe(c,{code:ie.invalid_type,expected:ve.object,received:c.parsedType}),Ie}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof _r&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ir(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof _r){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(fe(o,{code:ie.unrecognized_keys,keys:s}),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 s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ir(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,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>ln.mergeObjectSync(r,c)):ln.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ye.errToObj,new Dt({...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:ye.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Dt({...this._def,unknownKeys:"strip"})}passthrough(){return new Dt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Dt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Dt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:_e.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Dt({...this._def,catchall:t})}pick(t){const n={};for(const r of Ye.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Dt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Ye.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Dt({...this._def,shape:()=>n})}deepPartial(){return ui(this)}partial(t){const n={};for(const r of Ye.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Dt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Ye.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Or;)i=i._def.innerType;n[r]=i}return new Dt({...this._def,shape:()=>n})}keyof(){return US(Ye.objectKeys(this.shape))}}Dt.create=(e,t)=>new Dt({shape:()=>e,unknownKeys:"strip",catchall:_r.create(),typeName:_e.ZodObject,...Be(t)}),Dt.strictCreate=(e,t)=>new Dt({shape:()=>e,unknownKeys:"strict",catchall:_r.create(),typeName:_e.ZodObject,...Be(t)}),Dt.lazycreate=(e,t)=>new Dt({shape:e,unknownKeys:"strip",catchall:_r.create(),typeName:_e.ZodObject,...Be(t)});class El extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new ar(s.ctx.common.issues));return fe(n,{code:ie.invalid_union,unionErrors:a}),Ie}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];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&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new ar(l));return fe(n,{code:ie.invalid_union,unionErrors:s}),Ie}}get options(){return this._def.options}}El.create=(e,t)=>new El({options:e,typeName:_e.ZodUnion,...Be(t)});function Ip(e,t){const n=Ar(e),r=Ar(t);if(e===t)return{valid:!0,data:e};if(n===ve.object&&r===ve.object){const o=Ye.objectKeys(t),i=Ye.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ip(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===ve.array&&r===ve.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Ip(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ve.date&&r===ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class kl extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(OS(i)||OS(a))return Ie;const s=Ip(i.value,a.value);return s.valid?((MS(i)||MS(a))&&n.dirty(),{status:n.value,value:s.data}):(fe(r,{code:ie.invalid_intersection_types}),Ie)};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,a])=>o(i,a)):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}))}}kl.create=(e,t,n)=>new kl({left:e,right:t,typeName:_e.ZodIntersection,...Be(n)});class lo extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.array)return fe(r,{code:ie.invalid_type,expected:ve.array,received:r.parsedType}),Ie;if(r.data.length<this._def.items.length)return fe(r,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ie;!this._def.rest&&r.data.length>this._def.items.length&&(fe(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Ir(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>ln.mergeArray(n,a)):ln.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new lo({...this._def,rest:t})}}lo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lo({items:e,typeName:_e.ZodTuple,rest:null,...Be(t)})};class HS extends We{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!==ve.map)return fe(r,{code:ie.invalid_type,expected:ve.map,received:r.parsedType}),Ie;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ir(r,s,r.path,[c,"key"])),value:i._parse(new Ir(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ie;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ie;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}HS.create=(e,t,n)=>new HS({valueType:t,keyType:e,typeName:_e.ZodMap,...Be(n)});class Sa extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.set)return fe(r,{code:ie.invalid_type,expected:ve.set,received:r.parsedType}),Ie;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(fe(r,{code:ie.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&&(fe(r,{code:ie.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ie;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Ir(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Sa({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new Sa({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Sa.create=(e,t)=>new Sa({valueType:e,minSize:null,maxSize:null,typeName:_e.ZodSet,...Be(t)});class WS extends We{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})}}WS.create=(e,t)=>new WS({getter:e,typeName:_e.ZodLazy,...Be(t)});class qS extends We{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return fe(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:t.data}}get value(){return this._def.value}}qS.create=(e,t)=>new qS({value:e,typeName:_e.ZodLiteral,...Be(t)});function US(e,t){return new di({values:e,typeName:_e.ZodEnum,...Be(t)})}class di extends We{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return fe(n,{expected:Ye.joinValues(r),received:n.parsedType,code:ie.invalid_type}),Ie}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 fe(n,{received:n.data,code:ie.invalid_enum_value,options:r}),Ie}return yn(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 di.create(t,{...this._def,...n})}exclude(t,n=this._def){return di.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}di.create=US;class YS extends We{_parse(t){const n=Ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ve.string&&r.parsedType!==ve.number){const o=Ye.objectValues(n);return fe(r,{expected:Ye.joinValues(o),received:r.parsedType,code:ie.invalid_type}),Ie}if(this._cache||(this._cache=new Set(Ye.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Ye.objectValues(n);return fe(r,{received:r.data,code:ie.invalid_enum_value,options:o}),Ie}return yn(t.data)}get enum(){return this._def.values}}YS.create=(e,t)=>new YS({values:e,typeName:_e.ZodNativeEnum,...Be(t)});class Cl extends We{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.promise&&n.common.async===!1)return fe(n,{code:ie.invalid_type,expected:ve.promise,received:n.parsedType}),Ie;const r=n.parsedType===ve.promise?n.data:Promise.resolve(n.data);return yn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Cl.create=(e,t)=>new Cl({type:e,typeName:_e.ZodPromise,...Be(t)});class fi extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.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:a=>{fe(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Ie;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ie:l.status==="dirty"||n.value==="dirty"?xa(l.value):l});{if(n.value==="aborted")return Ie;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ie:s.status==="dirty"||n.value==="dirty"?xa(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,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 s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ie:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ie:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!li(a))return Ie;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>li(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):Ie);Ye.assertNever(o)}}fi.create=(e,t,n)=>new fi({schema:e,typeName:_e.ZodEffects,effect:t,...Be(n)}),fi.createWithPreprocess=(e,t,n)=>new fi({schema:t,effect:{type:"preprocess",transform:e},typeName:_e.ZodEffects,...Be(n)});class Or extends We{_parse(t){return this._getType(t)===ve.undefined?yn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Or.create=(e,t)=>new Or({innerType:e,typeName:_e.ZodOptional,...Be(t)});class pi extends We{_parse(t){return this._getType(t)===ve.null?yn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}pi.create=(e,t)=>new pi({innerType:e,typeName:_e.ZodNullable,...Be(t)});class _p extends We{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}_p.create=(e,t)=>new _p({innerType:e,typeName:_e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});class Op extends We{_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 Sl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ar(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ar(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Op.create=(e,t)=>new Op({innerType:e,typeName:_e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});class KS extends We{_parse(t){if(this._getType(t)!==ve.nan){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.nan,received:r.parsedType}),Ie}return{status:"valid",value:t.data}}}KS.create=e=>new KS({typeName:_e.ZodNaN,...Be(e)});class f4 extends We{_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 Mp extends We{_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"?Ie:i.status==="dirty"?(n.dirty(),xa(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"?Ie: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 Mp({in:t,out:n,typeName:_e.ZodPipeline})}}class Dp extends We{_parse(t){const n=this._def.innerType._parse(t),r=o=>(li(o)&&(o.value=Object.freeze(o.value)),o);return Sl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Dp.create=(e,t)=>new Dp({innerType:e,typeName:_e.ZodReadonly,...Be(t)});var _e;(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"})(_e||(_e={})),_r.create,Yn.create,El.create,kl.create,lo.create,di.create,Cl.create,Or.create,pi.create;const p4=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},h4=(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 a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},GS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),cn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):GS(t),o=structuredClone(e);return h4(o,r,n),o},m4=(e,t)=>e.localeCompare(t),hi={},ZS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return XS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=ZS(e._def.innerType);return t==="ZodArray"?n??[]:n}},XS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,ZS(n)])),QS=(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]=QS(i,o):n[r]=o||i)}return n},g4={sort:m4,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},JS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return zB.parse(n.toString(),g4)},Mr=(e,t)=>GS(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Dr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Np=e=>{const t=e.dataset.target;if(!t)return Dr(e);const n=document.querySelector(`[data-origin="${t}"]`);return Dr(n||e)},v4={state:{},loading:!1,useOnChange:!1},eT=e=>e.dataset.target||e.name,y4=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ha.LocalStorage.get(t);return p4(n)?n:{}},clear:()=>void ha.LocalStorage.delete(t),set:n=>ha.LocalStorage.set(t,n)}},b4=(e,t,n=v4)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>je.function(n?.state)?n.state():n?.state??XS(e)??{}),l=S.useCallback(x=>{const T=x.target,w=x.currentTarget;if(T.dataset.optional==="true")return;const k=eT(T),C=Np(T)||(w?Dr(w):""),O=Mr(k,e);if(T.setAttribute("data-initialized","true"),O){const _=O.safeParse(C),L=_.success?void 0:_.error.issues[0]?.message??"";o(D=>cn(D??{},k,L))}},[e]),c=S.useCallback(x=>T=>{const w=T.currentTarget,E=Object.values(i.current).reduce((C,O)=>{const _=O.element,L=O.schema.safeParse(Dr(_));if(_.dataset.ignore==="ignore"||L.success)return C;const D=L.error.issues[0]?.message;_.setAttribute("data-initialized","true");const z=_.dataset.name||_.name||"";return cn(C,z,D)},{}),k=je.empty(E)?null:E;o(k),console.error(k),x?.({form:w,errors:k||{}})},[]),u=(x,T=hi)=>{const w=Mr(x,e),E=k=>{if(!ul(k))return;s(O=>cn(O,x,k.toISOString())),o(O=>cn(O,x,void 0));const C=i.current[x].element;if(C){const O=C.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${O}"]`);_&&_.setCustomValidity("")}T?.onChange?.(k)};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,date:je.string(a[x])?new Date(a[x]):a[x],required:T.required??!w.isOptional(),error:On(r,x),ref:k=>{k!==null&&(i.current[x]={element:k,schema:w})}}},d=(x,T=hi)=>{const w=Mr(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.value;s(O=>cn(O,x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),value:On(a,x,void 0)??"",required:T.required??!w.isOptional(),ref:k=>k!==null?i.current[x]={element:k,schema:w}:void 0}},p=(x,T=hi)=>{const w=Mr(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.checked;s(O=>cn(O??{},x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),ref:k=>k!==null?void(i.current[x]={element:k,schema:w}):void 0}},f=(x,T=hi)=>{const w=Mr(x,e),E=k=>{k.persist?.();const C=k.target.value;T?.onChange?.(k),s(O=>cn(O,x,C))};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),value:On(a,x,void 0)||T?.value||"",type:je.instance(w,ci)?"number":T?.type??"text",ref:k=>k===null?void 0:i.current[x]={element:k,schema:w}}},b=(x,T=hi)=>{const w=Mr(x,e);return{...T,name:x,id:x,onChangeOptions:k=>{s(C=>cn(C,x,k))},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),value:On(a,x,void 0)||T?.value||[],ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:w})}},g=(x,T=hi)=>{const w=Mr(x,e),E=w._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:C=>{C.persist?.();const O=E?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),s(_=>cn(_,x,O))},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),type:E?"number":T?.type??"text",value:On(a,x,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}};S.useEffect(()=>{const x=Object.values(i.current).map(w=>{const E=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,k=w.schema.safeParse(Dr(E)),C=D=>{const z=eT(D.target);if(!z)return!1;const A=D.target,N=Np(D.target)||(D.relatedTarget?Dr(D.relatedTarget):""),H=w.schema.safeParse(N);if(A.setAttribute("value",N),H.success)return E.setCustomValidity&&E.setCustomValidity(""),o(M=>{if(je.null(M))return null;const P=cn(M,z,void 0);return je.empty(M)||je.nil(M)||je.empty(P)?null:P}),!1;if(E.required){const M=H.error.issues[0]?.message||"";E.setCustomValidity&&E.setCustomValidity(M),o(P=>{if(je.null(P))return null;const $=cn(P,z,M||void 0);return je.empty($)?null:$})}return!1},O=new AbortController,_=E.getAttribute("data-trigger")||"blur";E.addEventListener(_,C,{signal:O.signal});const L=E.dataset.shadow?!1:E.required?!k.success:!1;return{input:w,hasInitialError:L,unsubscribe:()=>O.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const m=x=>T=>{T.preventDefault();const w=T.currentTarget;let E=JS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(L=>{if(L.tagName==="SELECT"){const D=L;E=cn(E,D.name,D.value)}if(L.tagName==="INPUT"){const D=L,z=Np(D)||(D?Dr(D):"");E=cn(E,D.dataset.target||D.name,z)}});const C=QS(E,a),O=e.safeParse(C),_=()=>{TS(w),n.interceptor?.clear()};if(O.success){const L=JSON.stringify(O.data);return w.setAttribute("data-json",L),n.interceptor?.clear(),x?.(T,{form:w,event:T,reset:_,setErrors:o,errors:[],success:!0,data:O.data,json:O.data})}return console.group("useForm error"),console.info(O),console.info(O.error.issues),console.error(O.error),console.groupEnd(),w.reportValidity(),x?.(T,{form:w,json:E,event:T,reset:_,setErrors:o,data:E,success:!1,errors:O.error.issues.map(L=>({message:L.message,path:L.path.map(D=>String(D))}))})},v=x=>hu(a,x)||"",y=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:m,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,multiselect:b,disabled:r!==null}},x4=e=>e?JSON.parse(e.getAttribute("data-json")):{},w4=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},tT={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},nT={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"},rT={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},S4={name:"dark",zIndex:rT,rounded:tT,spacing:nT,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%)"}}}},T4={rounded:tT,spacing:nT,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:rT,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%)"}}}},E4=S4,k4=T4,C4=e=>{const t=S.useMemo(()=>({locale:e.locale,tweaks:{...$a,...e.tweaks},parser:e.parser||La.hsla,map:{...Va,...e.map}}),[e]);return h.jsx(bo.Provider,{value:t,children:e.children})};ee.Alert=zF,ee.AnimatedList=EF,ee.AnimatedListItem=kF,ee.Autocomplete=lB,ee.Button=hs,ee.Calendar=T1,ee.Card=ol,ee.Checkbox=Wf,ee.ColType=ti,ee.Collapse=Uw,ee.CommandPalette=LB,ee.ComponentsProvider=C4,ee.Context=bo,ee.DatePicker=Dj,ee.Description=rV,ee.Dict=Pn,ee.Dropdown=ei,ee.Empty=Mw,ee.Expand=sV,ee.FileUpload=Qz,ee.Form=OE,ee.Info=oV,ee.Input=Io,ee.InputFeedback=iv,ee.InputField=Di,ee.Loading=aV,ee.Menu=HF,ee.MenuItem=RF,ee.Modal=Yf,ee.MultiSelect=mB,ee.Notifications=kB,ee.PageHeader=iV,ee.PageTitle=Gw,ee.Paragraph=nV,ee.Polymorph=en,ee.Progress=Pj,ee.Radiobox=WF,ee.RenderOnView=xB,ee.Select=Hr,ee.Slider=pI,ee.Spinner=Zw,ee.Stats=BF,ee.StatsCard=SF,ee.Step=FF,ee.Steps=VF,ee.Switch=hI,ee.Tab=IF,ee.Table=wF,ee.Tabs=PF,ee.Tag=Aa,ee.TaskList=tV,ee.Textarea=qF,ee.Timeline=Aj,ee.TimelineItem=fl,ee.Toolbar=Ij,ee.Tooltip=vu,ee.TransferList=yB,ee.createColumns=WL,ee.createCssProperties=xk,ee.createDesignTokens=Am,ee.createFormStorage=y4,ee.createOptionCols=Ff,ee.createStyles=vk,ee.createTheme=bk,ee.createTokenStyles=wk,ee.css=Se,ee.defaultDarkTheme=E4,ee.defaultLightTheme=k4,ee.defaultTranslations=Va,ee.defaultTweaks=$a,ee.dispatchInput=am,ee.formReset=TS,ee.formToJson=JS,ee.getCoords=PE,ee.getJsonForm=x4,ee.getModalScrollerRef=GL,ee.getRemainingSize=xi,ee.getSchemaShape=Mr,ee.hasVerticalScroll=sm,ee.initializeInputDataset=bi,ee.isMobile=ov,ee.isReactComponent=CE,ee.isReactFC=kc,ee.isSsr=yr,ee.mergeRefs=Zn,ee.negate=$P,ee.noop=gu,ee.parsers=La,ee.path=hu,ee.reduceTokens=lr,ee.safeRegex=mu,ee.splitInto=rv,ee.useColorParser=Rw,ee.useForm=b4,ee.useLocale=tp,ee.useNotification=TB,ee.usePrevious=w4,ee.useReactive=Vw,ee.useStableRef=br,ee.useStepContext=Ww,ee.useSwipe=v1,ee.useTablePreferences=YL,ee.useTranslations=St,ee.uuid=Ao,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
17
+ `),()=>{k.contains(x)&&k.removeChild(x)}},[t]),p.jsx(mD,{isPresent:t,childRef:a,sizeRef:s,children:O.cloneElement(e,{ref:u})})}const vD=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=bn(yD),d=S.useId();let h=!0,g=S.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:v=>{u.set(v,!0);for(const m of u.values())if(!m)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&h&&(g={...g}),S.useMemo(()=>{u.forEach((v,m)=>u.set(m,!1))},[n]),O.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=p.jsx(gD,{isPresent:n,anchorX:s,anchorY:l,root:c,children:e})),p.jsx(Is.Provider,{value:g,children:e})};function yD(){return new Map}function Gx(e=!0){const t=S.useContext(Is);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const a=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Hs=e=>e.key||"";function Kx(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Tn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=Gx(a),h=S.useMemo(()=>Kx(e),[e]),g=a&&!u?[]:h.map(Hs),v=S.useRef(!0),m=S.useRef(h),f=bn(()=>new Map),y=S.useRef(new Set),[b,x]=S.useState(h),[k,T]=S.useState(h);As(()=>{v.current=!1,m.current=h;for(let E=0;E<k.length;E++){const A=Hs(k[E]);g.includes(A)?(f.delete(A),y.current.delete(A)):f.get(A)!==!0&&f.set(A,!1)}},[k,g.length,g.join("-")]);const P=[];if(h!==b){let E=[...h];for(let A=0;A<k.length;A++){const I=k[A],D=Hs(I);g.includes(D)||(E.splice(A,0,I),P.push(I))}return i==="wait"&&P.length&&(E=P),T(Kx(E)),x(h),null}process.env.NODE_ENV!=="production"&&i==="wait"&&k.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}=S.useContext(Fi);return p.jsx(p.Fragment,{children:k.map(E=>{const A=Hs(E),I=a&&!u?!1:h===k||g.includes(A),D=()=>{if(y.current.has(A))return;if(y.current.add(A),f.has(A))f.set(A,!0);else return;let F=!0;f.forEach(j=>{j||(F=!1)}),F&&(w?.(),T(m.current),a&&d?.(),r&&r())};return p.jsx(vD,{isPresent:I,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:I?void 0:D,anchorX:s,anchorY:l,children:E},A)})})},bD=S.createContext(null);function xD(){const e=S.useRef(!1);return As(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function wD(){const e=xD(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>st.postRender(r),[r]),t]}const Zx=e=>e===!0,SD=e=>Zx(e===!0)||e==="id",TD=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(Fi),o=S.useContext(bD),[i,a]=wD(),s=S.useRef(null),l=r.id||o;s.current===null&&(SD(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Zx(n)&&r.group||qx()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return p.jsx(Fi.Provider,{value:c,children:e})},Xx=S.createContext({strict:!1}),Qx={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 Jx=!1;function ED(){if(Jx)return;const e={};for(const t in Qx)e[t]={isEnabled:n=>Qx[t].some(r=>!!n[r])};Bb(e),Jx=!0}function e0(){return ED(),aM()}function kD(e){const t=e0();for(const n in e)t[n]={...t[n],...e[n]};Bb(t)}const CD=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 Ws(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||CD.has(e)}let t0=e=>!Ws(e);function n0(e){typeof e=="function"&&(t0=t=>t.startsWith("on")?!Ws(t):e(t))}try{n0(require("@emotion/is-prop-valid").default)}catch{}function PD(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(t0(o)||n===!0&&Ws(o)||!t&&!Ws(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Wd({children:e,isValidProp:t,...n}){t&&n0(t),n={...S.useContext(Ho),...n},n.isStatic=bn(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return p.jsx(Ho.Provider,{value:r,children:e})}const qs=S.createContext({});function AD(e,t){if(Vs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Yi(n)?n:void 0,animate:Yi(r)?r:void 0}}return e.inherit!==!1?t:{}}function ID(e){const{initial:t,animate:n}=AD(e,S.useContext(qs));return S.useMemo(()=>({initial:t,animate:n}),[r0(t),r0(n)])}function r0(e){return Array.isArray(e)?e.join(" "):e}const qd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function o0(e,t,n){for(const r in t)!Ot(t[r])&&!tx(r,n)&&(e[r]=t[r])}function _D({transformTemplate:e},t){return S.useMemo(()=>{const n=qd();return $d(n,t,e),Object.assign({},n.vars,n.style)},[t])}function OD(e,t){const n=e.style||{},r={};return o0(r,n,e),Object.assign(r,_D(e,t)),r}function MD(e,t){const n={},r=OD(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 i0=()=>({...qd(),attrs:{}});function DD(e,t,n,r){const o=S.useMemo(()=>{const i=i0();return rx(i,t,ix(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};o0(i,e.style,e),o.style={...i,...o.style}}return o}const ND=["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 Ud(e){return typeof e!="string"||e.includes("-")?!1:!!(ND.indexOf(e)>-1||/[A-Z]/u.test(e))}function FD(e,t,n,{latestValues:r},o,i=!1,a){const l=(a??Ud(e)?DD:MD)(t,r,o,e),c=PD(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,h=S.useMemo(()=>Ot(d)?d.get():d,[d]);return S.createElement(e,{...u,children:h})}function LD({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:VD(n,r,o,e),renderState:t()}}function VD(e,t,n,r){const o={},i=r(e,{});for(const h in i)o[h]=Bs(i[h]);let{initial:a,animate:s}=e;const l=Vs(e),c=jb(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!Ls(d)){const h=Array.isArray(d)?d:[d];for(let g=0;g<h.length;g++){const v=bd(e,h[g]);if(v){const{transitionEnd:m,transition:f,...y}=v;for(const b in y){let x=y[b];if(Array.isArray(x)){const k=u?x.length-1:0;x=x[k]}x!==null&&(o[b]=x)}for(const b in m)o[b]=m[b]}}}return o}const a0=e=>(t,n)=>{const r=S.useContext(qs),o=S.useContext(Is),i=()=>LD(e,t,r,o);return n?i():bn(i)},$D=a0({scrapeMotionValuesFromProps:zd,createRenderState:qd}),jD=a0({scrapeMotionValuesFromProps:ax,createRenderState:i0}),zD=Symbol.for("motionComponentSymbol");function BD(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const s0=S.createContext({});function Xi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function RD(e,t,n,r,o,i){const{visualElement:a}=S.useContext(qs),s=S.useContext(Xx),l=S.useContext(Is),c=S.useContext(Ho).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,h=S.useContext(s0);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&HD(u.current,n,o,h);const g=S.useRef(!1);S.useInsertionEffect(()=>{d&&g.current&&d.update(n,l)});const v=n[yb],m=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return As(()=>{d&&(g.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),m.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),m.current=!1),d.enteringChildren=void 0)}),d}function HD(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:l0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&Xi(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function l0(e){if(e)return e.options.allowProjection!==!1?e.projection:l0(e.parent)}function Yd(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&kD(r);const i=n?n==="svg":Ud(e),a=i?jD:$D;function s(c,u){let d;const h={...S.useContext(Ho),...c,layoutId:WD(c)},{isStatic:g}=h,v=ID(c),m=a(c,g);if(!g&&py){qD(h,r);const f=UD(h);d=f.MeasureLayout,v.visualElement=RD(e,m,h,o,f.ProjectionNode,i)}return p.jsxs(qs.Provider,{value:v,children:[d&&v.visualElement?p.jsx(d,{visualElement:v.visualElement,...h}):null,FD(e,c,BD(m,v.visualElement,u),m,g,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(s);return l[zD]=e,l}function WD({layoutId:e}){const t=S.useContext(Fi).id;return t&&e!==void 0?t+"-"+e:e}function qD(e,t){const n=S.useContext(Xx).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?Mo(!1,r,"lazy-strict-mode"):on(!1,r,"lazy-strict-mode")}}function UD(e){const t=e0(),{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 YD(e,t){if(typeof Proxy>"u")return Yd;const n=new Map,r=(i,a)=>Yd(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&ju(!1,"motion() is deprecated. Use motion.create() instead."),r(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Yd(a,void 0,e,t)),n.get(a))})}const GD=(e,t)=>t.isSVG??Ud(e)?new sx(t):new nx(t,{allowProjection:e!==S.Fragment});class KD extends Tr{constructor(t){super(t),t.animationState||(t.animationState=PM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ls(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 ZD=0;class XD extends Tr{constructor(){super(...arguments),this.id=ZD++}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 QD={animation:{Feature:KD},exit:{Feature:XD}};function Qi(e){return{point:{x:e.pageX,y:e.pageY}}}const JD=e=>t=>Id(t)&&e(t,Qi(t));function Ji(e,t,n,r){return Zi(e,t,JD(n),r)}const c0=({current:e})=>e?e.ownerDocument.defaultView:null,u0=(e,t)=>Math.abs(e-t);function eN(e,t){const n=u0(e.x,t.x),r=u0(e.y,t.y);return Math.sqrt(n**2+r**2)}const d0=new Set(["auto","scroll"]);class f0{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=g=>{this.handleScroll(g.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Kd(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,m=eN(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!m)return;const{point:f}=g,{timestamp:y}=Bt;this.history.push({...f,timestamp:y});const{onStart:b,onMove:x}=this.handlers;v||(b&&b(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,g)},this.handlePointerMove=(g,v)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=Gd(v,this.transformPagePoint),st.update(this.updatePoint,!0)},this.handlePointerUp=(g,v)=>{this.end();const{onEnd:m,onSessionEnd:f,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Kd(g.type==="pointercancel"?this.lastMoveEventInfo:Gd(v,this.transformPagePoint),this.history);this.startEvent&&m&&m(g,b),f&&f(g,b)},!Id(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const l=Qi(t),c=Gd(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Bt;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,Kd(c,this.history)),this.removeListeners=Vi(Ji(this.contextWindow,"pointermove",this.handlePointerMove),Ji(this.contextWindow,"pointerup",this.handlePointerUp),Ji(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(d0.has(r.overflowX)||d0.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),st.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),or(this.updatePoint)}}function Gd(e,t){return t?{point:t(e.point)}:e}function p0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kd({point:e},t){return{point:e,delta:p0(e,h0(t)),offset:p0(e,tN(t)),velocity:nN(t,.1)}}function tN(e){return e[0]}function h0(e){return e[e.length-1]}function nN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=h0(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>xn(t)));)n--;if(!r)return{x:0,y:0};const i=fn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function rN(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ct(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ct(n,e,r.max):Math.min(e,n)),e}function m0(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 oN(e,{top:t,left:n,bottom:r,right:o}){return{x:m0(e.x,n,o),y:m0(e.y,t,r)}}function g0(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 iN(e,t){return{x:g0(e.x,t.x),y:g0(e.y,t.y)}}function aN(e,t){let n=.5;const r=Yt(e),o=Yt(t);return o>r?n=Do(t.min,t.max-r,e.min):r>o&&(n=Do(e.min,e.max-o,t.min)),$n(0,1,n)}function sN(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 Zd=.35;function lN(e=Zd){return e===!1?e=0:e===!0&&(e=Zd),{x:v0(e,"left","right"),y:v0(e,"top","bottom")}}function v0(e,t,n){return{min:y0(e,t),max:y0(e,n)}}function y0(e,t){return typeof e=="number"?e:e[t]||0}const cN=new WeakMap;class uN{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=Pt(),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(Qi(d).point)):this.pauseAnimation()},a=(d,h)=>{this.stopAnimation();const{drag:g,dragPropagation:v,onDragStart:m}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=YO(g),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pn(y=>{let b=this.getAxisMotionValue(y).get()||0;if(jn.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const k=x.layout.layoutBox[y];k&&(b=Yt(k)*(parseFloat(b)/100))}}this.originPoint[y]=b}),m&&st.postRender(()=>m(d,h)),wd(this.visualElement,"transform");const{animationState:f}=this.visualElement;f&&f.setActive("whileDrag",!0)},s=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:m,onDrag:f}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:y}=h;if(v&&this.currentDirection===null){this.currentDirection=dN(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),f&&f(d,h)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>pn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new f0(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:c0(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:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&st.postRender(()=>s(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||!Us(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=rN(a,this.constraints[t],this.elastic[t])),i.set(a)}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&&Xi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=oN(r.layoutBox,t):this.constraints=!1,this.elastic=lN(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=sN(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Xi(t))return!1;const r=t.current;on(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=uM(r,o.root,this.visualElement.getTransformPagePoint());let a=iN(o.layout.layoutBox,i);if(n){const s=n(sM(a));this.hasMutatedConstraints=!!s,s&&(a=Wb(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=pn(u=>{if(!Us(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const h=o?200:1e6,g=o?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wd(this.visualElement,t),r.start(yd(t,r,0,n,this.visualElement,!1))}stopAnimation(){pn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pn(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){pn(n=>{const{drag:r}=this.getProps();if(!Us(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-ct(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Xi(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=aN({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pn(a=>{if(!Us(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ct(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;cN.set(this.visualElement,this);const t=this.visualElement.current,n=Ji(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,h=d!==t&&Mb(d);c&&u&&!h&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Xi(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()),st.read(r);const a=Zi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Zd,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Us(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function dN(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class fN extends Tr{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new uN(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}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 b0=e=>(t,n)=>{e&&st.postRender(()=>e(t,n))};class pN extends Tr{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new f0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:c0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:b0(t),onStart:b0(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&st.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ji(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 Xd=!1;class hN extends S.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),Xd&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Rs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,Xd=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||st.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ad.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Xd=!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 x0(e){const[t,n]=Gx(),r=S.useContext(Fi);return p.jsx(hN,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(s0),isPresent:t,safeToRemove:n})}const mN={pan:{Feature:pN},drag:{Feature:fN,ProjectionNode:Ux,MeasureLayout:x0}};function w0(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&&st.postRender(()=>i(t,Qi(t)))}class gN extends Tr{mount(){const{current:t}=this.node;t&&(this.unmount=GO(t,(n,r)=>(w0(this.node,r,"Start"),o=>w0(this.node,o,"End"))))}unmount(){}}class vN extends Tr{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=Vi(Zi(this.node.current,"focus",()=>this.onFocus()),Zi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function S0(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&&st.postRender(()=>i(t,Qi(t)))}class yN extends Tr{mount(){const{current:t}=this.node;t&&(this.unmount=XO(t,(n,r)=>(S0(this.node,r,"Start"),(o,{success:i})=>S0(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Qd=new WeakMap,Jd=new WeakMap,bN=e=>{const t=Qd.get(e.target);t&&t(e)},xN=e=>{e.forEach(bN)};function wN({root:e,...t}){const n=e||document;Jd.has(n)||Jd.set(n,{});const r=Jd.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(xN,{root:e,...t})),r[o]}function SN(e,t,n){const r=wN(t);return Qd.set(e,n),r.observe(e),()=>{Qd.delete(e),r.unobserve(e)}}const TN={some:0,all:1};class EN extends Tr{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,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:TN[o]},s=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(),h=c?u:d;h&&h(l)};return SN(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(kN(t,n))&&this.startObserver()}unmount(){}}function kN({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const CN={...QD,...{inView:{Feature:EN},tap:{Feature:yN},focus:{Feature:vN},hover:{Feature:gN}},...mN,...{layout:{ProjectionNode:Ux,MeasureLayout:x0}}},ze=YD(CN,GD);function PN(e){return S.useEffect(()=>()=>e(),[])}function Wo(e){const t=bn(()=>Zr(e)),{isStatic:n}=S.useContext(Ho);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function T0(e,t){const n=Wo(t()),r=()=>n.set(t());return r(),As(()=>{const o=()=>st.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),or(r)}}),n}function AN(e){qi.current=[],e();const t=T0(qi.current,e);return qi.current=void 0,t}function IN(e,t,n,r){if(typeof e=="function")return AN(e);const i=typeof t=="function"?t:eM(t,n,r);return Array.isArray(e)?E0(e,i):E0([e],([a])=>i(a))}function E0(e,t){const n=bn(()=>[]);return T0(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ef(e){return typeof e=="object"&&!Array.isArray(e)}function k0(e,t,n,r){return e==null?[]:typeof e=="string"&&ef(t)?Cb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function _N(e,t,n){return e*(t+1)}function C0(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 ON(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Li(e,o),r--)}}function MN(e,t,n,r,o,i){ON(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ct(o,i,r[a]),easing:Iy(n,a)})}function DN(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function NN(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const FN="easeInOut",LN=20;function VN(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,h=0;for(let g=0;g<e.length;g++){const v=e[g];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,C0(d,v.at,u,c));continue}let[m,f,y={}]=v;y.at!==void 0&&(d=C0(d,y.at,u,c));let b=0;const x=(k,T,P,w=0,E=0)=>{const A=$N(k),{delay:I=0,times:D=Jy(A),type:F="keyframes",repeat:j,repeatType:_,repeatDelay:N=0,...z}=T;let{ease:M=t.ease||"easeOut",duration:C}=T;const $=typeof I=="function"?I(w,E):I,L=A.length,q=hd(F)?F:o?.[F||"keyframes"];if(L<=2&&q){let te=100;if(L===2&&BN(A)){const H=A[1]-A[0];te=Math.abs(H)}const ne={...z};C!==void 0&&(ne.duration=xn(C));const ee=Gy(ne,te,q);M=ee.ease,C=ee.duration}C??(C=i);const Y=d+$;D.length===1&&D[0]===0&&(D[1]=1);const R=D.length-A.length;if(R>0&&Qy(D,R),A.length===1&&A.unshift(null),j){on(j<LN,"Repeat count too high, must be less than 20","repeat-count-high"),C=_N(C,j);const te=[...A],ne=[...D];M=Array.isArray(M)?[...M]:[M];const ee=[...M];for(let H=0;H<j;H++){A.push(...te);for(let K=0;K<te.length;K++)D.push(ne[K]+(H+1)),M.push(K===0?"linear":Iy(ee,K-1))}DN(D,j)}const Z=Y+C;MN(P,A,M,D,Y,Z),b=Math.max($+C,b),h=Math.max(Z,h)};if(Ot(m)){const k=P0(m,s);x(f,y,A0("default",k))}else{const k=k0(m,f,r,l),T=k.length;for(let P=0;P<T;P++){f=f,y=y;const w=k[P],E=P0(w,s);for(const A in f)x(f[A],jN(y,A),A0(A,E),P,T)}}u=d,d+=b}return s.forEach((g,v)=>{for(const m in g){const f=g[m];f.sort(NN);const y=[],b=[],x=[];for(let T=0;T<f.length;T++){const{at:P,value:w,easing:E}=f[T];y.push(w),b.push(Do(0,h,P)),x.push(E||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),x.unshift(FN)),b[b.length-1]!==1&&(b.push(1),y.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const k=a.get(v);k.keyframes[m]=y,k.transition[m]={...t,duration:h,ease:x,times:b,...n}}}),a}function P0(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function A0(e,t){return t[e]||(t[e]=[]),t[e]}function $N(e){return Array.isArray(e)?e:[e]}function jN(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const zN=e=>typeof e=="number",BN=e=>e.every(zN);function RN(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Od(e)&&!Fb(e)?new sx(t):new nx(t);n.mount(e),Ui.set(e,n)}function HN(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new vM(t);n.mount(e),Ui.set(e,n)}function WN(e,t){return Ot(e)||typeof e=="number"||typeof e=="string"&&!ef(t)}function I0(e,t,n,r){const o=[];if(WN(e,t))o.push(Dx(e,ef(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=k0(e,t,r),a=i.length;on(!!a,"No valid elements provided.","no-valid-elements");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?RN:HN;Ui.has(l)||c(l);const u=Ui.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...Td(u,{...t,transition:d},{}))}}return o}function qN(e,t,n){const r=[];return VN(e,t,n,{spring:Hi}).forEach(({keyframes:i,transition:a},s)=>{r.push(...I0(s,i,a))}),r}function UN(e){return Array.isArray(e)&&e.some(Array.isArray)}function YN(e){function t(n,r,o){let i=[],a;if(UN(n))i=qN(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(a=l),i=I0(n,r,c,e)}const s=new vO(i);return a&&s.finished.then(a),e&&(e.animations.push(s),s.finished.then(()=>{Li(e.animations,s)})),s}return t}function _0(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>YN(e));return PN(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class GN{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 KN=()=>new GN;function ZN(){return bn(KN)}const O0=S.createContext(null);function XN(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,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=ct(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?GI(e,o,o+i):e}function QN({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>ze[t]),l=[],c=S.useRef(!1),u=S.useRef(null);on(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(v,m)=>{const f=l.findIndex(y=>v===y.value);f!==-1?l[f].layout=m[n]:l.push({value:v,layout:m[n]}),l.sort(e2)},updateOrder:(v,m,f)=>{if(c.current)return;const y=XN(l,v,m,f);l!==y&&(c.current=!0,r(y.map(JN).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const h=v=>{u.current=v,typeof a=="function"?a(v):a&&(a.current=v)},g={overflowAnchor:"none",...i.style};return p.jsx(s,{...i,style:g,ref:h,ignoreStrict:!0,children:p.jsx(O0.Provider,{value:d,children:e})})}const M0=S.forwardRef(QN);function JN(e){return e.value}function e2(e,t){return e.layout.min-t.layout.min}const Ys=50,D0=25,t2=new Set(["auto","scroll"]),ea=new WeakMap,ta=new WeakMap;let na=null;function n2(){if(na){const e=tf(na,"y");e&&(ta.delete(e),ea.delete(e));const t=tf(na,"x");t&&t!==e&&(ta.delete(t),ea.delete(t)),na=null}}function r2(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return t2.has(r)}function tf(e,t){let n=e?.parentElement;for(;n;){if(r2(n,t))return n;n=n.parentElement}return null}function o2(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,a=e-o,s=i-e;if(a<Ys){const l=1-a/Ys;return{amount:-D0*l*l,edge:"start"}}else if(s<Ys){const l=1-s/Ys;return{amount:D0*l*l,edge:"end"}}return{amount:0,edge:null}}function i2(e,t,n,r){if(!e)return;na=e;const o=tf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:a,edge:s}=o2(i,o,n);if(s===null){ta.delete(o),ea.delete(o);return}if(ta.get(o)!==s){if(!(s==="start"&&r<0||s==="end"&&r>0))return;ta.set(o,s);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;ea.set(o,u)}if(a>0){const c=ea.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=a:o.scrollTop+=a}function N0(e,t=0){return Ot(e)?e:Wo(t)}function a2({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:a=!0,...s},l){const c=bn(()=>ze[r]),u=S.useContext(O0),d={x:N0(t.x),y:N0(t.y)},h=IN([d.x,d.y],([y,b])=>y||b?1:"unset");on(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:g,registerItem:v,updateOrder:m,groupRef:f}=u;return p.jsx(c,{drag:g,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:h},layout:a,onDrag:(y,b)=>{const{velocity:x,point:k}=b,T=d[g].get();m(n,T,x[g]),i2(f.current,k[g],g,x[g]),o&&o(y,b)},onDragEnd:(y,b)=>{n2(),i&&i(y,b)},onLayoutMeasure:y=>{v(n,y)},ref:l,ignoreStrict:!0,children:e})}const F0=S.forwardRef(a2);var Gs={exports:{}},nf={},Ks={exports:{}},rf={};var L0;function s2(){if(L0)return rf;L0=1;var e=S;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,h){var g=h(),v=r({inst:{value:g,getSnapshot:h}}),m=v[0].inst,f=v[1];return i(function(){m.value=g,m.getSnapshot=h,l(m)&&f({inst:m})},[d,g,h]),o(function(){return l(m)&&f({inst:m}),d(function(){l(m)&&f({inst:m})})},[d]),a(g),g}function l(d){var h=d.getSnapshot;d=d.value;try{var g=h();return!n(d,g)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return rf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,rf}var of={};var V0;function l2(){return V0||(V0=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}function t(g,v){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=v();if(!d){var f=v();i(m,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}f=a({inst:{value:m,getSnapshot:v}});var y=f[0].inst,b=f[1];return l(function(){y.value=m,y.getSnapshot=v,n(y)&&b({inst:y})},[g,m,v]),s(function(){return n(y)&&b({inst:y}),g(function(){n(y)&&b({inst:y})})},[g]),c(m),m}function n(g){var v=g.getSnapshot;g=g.value;try{var m=v();return!i(g,m)}catch{return!0}}function r(g,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;of.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),of}var $0;function j0(){return $0||($0=1,process.env.NODE_ENV==="production"?Ks.exports=s2():Ks.exports=l2()),Ks.exports}var z0;function c2(){if(z0)return nf;z0=1;var e=S,t=j0();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,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return nf.useSyncExternalStoreWithSelector=function(c,u,d,h,g){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(P){if(!b){if(b=!0,x=P,P=h(P),g!==void 0&&m.hasValue){var w=m.value;if(g(w,P))return k=w}return k=P}if(w=k,r(x,P))return w;var E=h(P);return g!==void 0&&g(w,E)?(x=P,w):(x=P,k=E)}var b=!1,x,k,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,h,g]);var f=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=f},[f]),l(f),f},nf}var af={};var B0;function u2(){return B0||(B0=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=S,n=j0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;af.useSyncExternalStoreWithSelector=function(c,u,d,h,g){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(P){if(!b){if(b=!0,x=P,P=h(P),g!==void 0&&m.hasValue){var w=m.value;if(g(w,P))return k=w}return k=P}if(w=k,r(x,P))return w;var E=h(P);return g!==void 0&&g(w,E)?(x=P,w):(x=P,k=E)}var b=!1,x,k,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,h,g]);var f=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=f},[f]),l(f),f},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),af}var R0;function d2(){return R0||(R0=1,process.env.NODE_ENV==="production"?Gs.exports=c2():Gs.exports=u2()),Gs.exports}d2();var qo=function(){return qo=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},qo.apply(this,arguments)};function ra(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function H0(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 Uo=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},f2=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},p2=function(e){return Object.entries(e)},W0=function(e){return e instanceof Promise},q0=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)},qo(qo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},h2=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,H0([],ra(a),!1)),u=function(d,h){return n(function(g){return q0(d,g,i,h)})};return W0(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))}},m2=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,H0([],ra(a),!1)),c=function(u){return n(function(d){return q0(u,d,i,o.current)})};return W0(l)?l.then(function(u){return c(u)}):c(l)}},sf=function(e,t,n){var r,o,i,a=ra(S.useState(function(){return e}),2),s=a[0],l=a[1],c=Uo(s),u=Uo((r=n?.props)!==null&&r!==void 0?r:{}),d=Uo(t),h=Uo((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),g=Uo((i=n?.interceptor)!==null&&i!==void 0?i:[]),v=S.useRef(e),m=f2(s),f=Uo(m),y=S.useRef(null);S.useEffect(function(){if(y.current!==null){var k=y.current;h.current.forEach(function(T){T(s,m,k)})}},[s,h,m]);var b=ra(S.useState(function(){var k=function(){return u.current},T=d.current({props:k,state:function(){return c.current},initialState:v.current,previousState:function(){return f.current}});return p2(T).reduce(function(P,w){var E,A=ra(w,2),I=A[0],D=A[1];return qo(qo({},P),(E={},E[I]=n?.debug?h2(I,D,l,k,y,g.current):m2(I,D,l,k,y,g.current),E))},{})}),1),x=b[0];return[s,x,u.current]},g2=Object.defineProperty,U0=Object.getOwnPropertySymbols,v2=Object.prototype.hasOwnProperty,y2=Object.prototype.propertyIsEnumerable,Y0=(e,t,n)=>t in e?g2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b2=(e,t)=>{for(var n in t||(t={}))v2.call(t,n)&&Y0(e,n,t[n]);if(U0)for(var n of U0(t))y2.call(t,n)&&Y0(e,n,t[n]);return e},lf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},x2=(e,t,n,r)=>Xs(lf,e,t,n,r),Yo=e=>typeof e=="object",Er=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Yo(e)&&!Yo(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=>Er(e[r],t[r]))},w2=(e,t)=>(Yo(e)||Array.isArray(e))&&t?e[t]:e,S2=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Zs=e=>/[0-9.]+/.test(e),G0=e=>["string","number"].includes(typeof e),K0=e=>e==null||e?.length===0||e==="",Z0={eq:Er,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:K0,notEmpty:e=>!K0(e),in:(e,t)=>lf(t,n=>Er(e,n)),notIn:(e,t)=>X0(t,n=>!Er(e,n))},T2=e=>{if(e in Z0)return Z0[e];throw new Error("Linq - Symbol not found")},Go=(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},Xs=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=T2(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},E2=(e,t,n,r)=>Xs(Go,e,t,n,r),X0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},k2=(e,t,n,r)=>Xs(X0,e,t,n,r),Q0=e=>{if(e===null)return null;const t=b2({},e);return Object.keys(t).forEach(n=>t[n]=Yo(e[n])?Q0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},J0=(e,t)=>{if(Yo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Er(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Er(t,r))return!0}return!1},C2=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},P2=e=>Go(e,(t,n,r)=>Yo(t)?n===r.findIndex(o=>Er(o,t)):n===r.indexOf(t)),A2=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},ew=(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())},I2=(e,t)=>ew(e,n=>n[t]),tw=(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},_2=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},O2=(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 Zs(e)&&Zs(t)?r.map(a=>Number.parseInt(a)):r},cf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Zs(e)&&Zs(t)){const o=[],[i,a]=_2(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return O2(e,t,r)},M2=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?cf(r,o,1):cf(r,i,Number.parseInt(o,10))}return G0(e)&&G0(t)?cf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},uf=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},nw=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},D2=(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)},N2=(e,t,n,r)=>Xs(D2,e,t,n,r),rw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(S2(t))},ow=(e=>(e.Asc="asc",e.Desc="desc",e))(ow||{}),F2=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),L2=(e,t)=>e.sort(F2(t)),V2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Go(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},$2=class Kp{constructor(t=[]){this.array=t}static Range(...t){return M2(...t)}static New(t){return new Kp(t)}Where(t,n,r){return this.array=E2(this.array,t,n,r),this}Some(t,n,r){return x2(this.array,t,n,r)}All(t,n,r){return k2(this.array,t,n,r)}Reverse(){return this.array=nw(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=N2(this.array,t,n,r),this}Distinct(){return this.array=P2(this.array),this}First(t){return t===void 0?this.array[0]:A2(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?uf((n,r)=>n+r,0,this.array):uf((n,r)=>n+w2(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return I2(this.array,t)}GroupWith(t){return ew(this.array,t)}Except(t){return Go(this.array,n=>!J0(t,n))}Intersect(t){return Go(this.array,n=>J0(t,n))}OrderBy(t,n){let r;return r=t?rw(this.array,t):this.array.toSorted(),this.array=n==="desc"?nw(r):r,this}Includes(t){return lf(this.array,n=>Er(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 uf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(tw(this.array,n=>[t,n]))}Zip(t,n){return tw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Go(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Kp(Q0(this.array))}ToObject(t){return C2(this.array,t)}Sort(t){return Array.isArray(t)?L2(this.array,t):rw(this.array,t)}Unique(t){return V2(this.array,t)}},iw=$2;const Qs=0,kr=1,Ko=2,aw=4;function sw(e){return()=>e}function j2(e){e()}function oa(e,t){return n=>e(t(n))}function lw(e,t){return()=>e(t)}function z2(e,t){return n=>e(t,n)}function df(e){return e!==void 0}function B2(...e){return()=>{e.map(j2)}}function Zo(){}function Js(e,t){return t(e),e}function R2(e,t){return t(e)}function ut(...e){return e}function Qe(e,t){return e(kr,t)}function De(e,t){e(Qs,t)}function ff(e){e(Ko)}function pt(e){return e(aw)}function Te(e,t){return Qe(e,z2(t,Qs))}function En(e,t){const n=e(kr,r=>{n(),t(r)});return n}function cw(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function uw(e,t){return e===t}function dt(e=uw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function me(e){return t=>oa(t,e)}function zn(e){return t=>()=>{t(e)}}function re(e,...t){const n=H2(...t);return((r,o)=>{switch(r){case Ko:ff(e);return;case kr:return Qe(e,n(o))}})}function Bn(e,t){return n=>r=>{n(t=e(t,r))}}function Jr(e){return t=>n=>{e>0?e--:t(n)}}function ir(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Fe(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function H2(...e){return t=>e.reduceRight(R2,t)}function W2(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case kr:return i?n===i?void 0:(r(),n=i,t=Qe(e,i),t):(r(),Zo);case Ko:r(),n=null;return}}}function le(e){let t=e;const n=He();return((r,o)=>{switch(r){case Qs:t=o;break;case kr:{o(t);break}case aw:return t}return n(r,o)})}function Wt(e,t){return Js(le(t),n=>Te(e,n))}function He(){const e=[];return((t,n)=>{switch(t){case Qs:e.slice().forEach(r=>{r(n)});return;case Ko:e.splice(0,e.length);return;case kr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function an(e){return Js(He(),t=>Te(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:q2(),singleton:n}}const q2=()=>Symbol();function U2(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function At(...e){const t=He(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{n[a]=l,r=r|s,r===o&&De(t,n)})}),function(i,a){switch(i){case Ko:{ff(t);return}case kr:return r===o&&a(n),Qe(t,a)}}}function Pe(e,t=uw){return re(e,dt(t))}function pf(...e){return function(t,n){switch(t){case Ko:return;case kr:return B2(...e.map(r=>Qe(r,n)))}}}var Jt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Jt||{});const Y2={0:"debug",3:"error",1:"log",2:"warn"},G2=()=>typeof globalThis>"u"?window:globalThis,Cr=qe(()=>{const e=le(3);return{log:le((t,n,r=1)=>{var o;const i=(o=G2().VIRTUOSO_LOG_LEVEL)!=null?o:pt(e);r>=i&&console[Y2[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Rn(e,t,n){return hf(e,t,n).callbackRef}function hf(e,t,n){const r=S.useRef(null);let o=a=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return o=a=>{a&&t?(i?.observe(a),r.current=a):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function dw(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=K2(u.children,t,s?"offsetWidth":"offsetHeight",o);let h=u.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const g=h.lastElementChild.dataset.viewportType==="window";let v;g&&(v=h.ownerDocument.defaultView);const m=a?s?a.scrollLeft:a.scrollTop:g?s?v.scrollX||v.document.documentElement.scrollLeft:v.scrollY||v.document.documentElement.scrollTop:s?h.scrollLeft:h.scrollTop,f=a?s?a.scrollWidth:a.scrollHeight:g?s?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:s?h.scrollWidth:h.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:g?s?v.innerWidth:v.innerHeight:s?h.offsetWidth:h.offsetHeight;r({scrollHeight:f,scrollTop:Math.max(m,0),viewportHeight:y}),i?.(s?fw("column-gap",getComputedStyle(u).columnGap,o):fw("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return hf(c,n,l)}function K2(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},Jt.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 fw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}function mf(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,h;if(t){const g=t.getBoundingClientRect(),v=c.top-g.top;h=g.height-Math.max(0,v),d=v+t.scrollTop}else{const g=a.current.ownerDocument.defaultView;h=g.innerHeight-Math.max(0,c.top),d=c.top+g.scrollY}r.current={offsetTop:d,visibleHeight:h,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=hf(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const Gt=qe(()=>{const e=He(),t=He(),n=le(0),r=He(),o=le(0),i=He(),a=He(),s=le(0),l=le(0),c=le(0),u=le(0),d=He(),h=He(),g=le(!1),v=le(!1),m=le(!1);return Te(re(e,me(({scrollTop:f})=>f)),t),Te(re(e,me(({scrollHeight:f})=>f)),a),Te(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:v,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:g,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ia={lvl:0};function pw(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ot(e){return e===ia}function aa(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?aa(e.l,t):aa(e.r,t)}function kn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=kn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return kn(e.l,t,n)}function sn(e,t,n){return ot(e)?gw(t,n,1):t===e.k?Mt(e,{k:t,v:n}):t<e.k?vw(Mt(e,{l:sn(e.l,t,n)})):vw(Mt(e,{r:sn(e.r,t,n)}))}function Xo(){return ia}function Qo(e,t,n){if(ot(e))return[];const r=kn(e,t)[0];return Z2(vf(e,r,n))}function gf(e,t){if(ot(e))return ia;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=mw(r);return el(Mt(e,{k:i,l:hw(r),v:a}))}}else return t<n?el(Mt(e,{l:gf(r,t)})):el(Mt(e,{r:gf(o,t)}))}function eo(e){return ot(e)?[]:[...eo(e.l),{k:e.k,v:e.v},...eo(e.r)]}function vf(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(vf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(vf(i,t,n))),s}function el(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(yf(t))return yw(Mt(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return Mt(t.r,{l:Mt(t,{r:t.r.l}),lvl:n,r:Mt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(yf(e))return bf(Mt(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=yf(o)?r.lvl-1:r.lvl;return Mt(o,{l:Mt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:bf(Mt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Mt(e,t){return gw(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 hw(e){return ot(e.r)?e.l:el(Mt(e,{r:hw(e.r)}))}function yf(e){return ot(e)||e.lvl>e.r.lvl}function mw(e){return ot(e.r)?[e.k,e.v]:mw(e.r)}function gw(e,t,n,r=ia,o=ia){return{k:e,l:r,lvl:n,r:o,v:t}}function vw(e){return bf(yw(e))}function yw(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Mt(t,{r:Mt(e,{l:t.r})}):e}function bf(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Mt(n,{l:Mt(e,{r:n.l}),lvl:t+1}):e}function Z2(e){return pw(e,({k:t,v:n})=>({index:t,value:n}))}function bw(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function sa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const xf=qe(()=>({recalcInProgress:le(!1)}),[],{singleton:!0});function xw(e,t,n){return e[tl(e,t,n)]}function tl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-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 X2(e,t,n,r){const o=tl(e,t,r),i=tl(e,n,r,o);return e.slice(o,i+1)}function Cn(e,t){return Math.round(e.getBoundingClientRect()[t])}function nl(e){return!ot(e.groupOffsetTree)}function wf({index:e},t){return t===e?0:t<e?-1:1}function Q2(){return{groupIndices:[],groupOffsetTree:Xo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Xo()}}function J2(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=sn(e,0,i);continue}const s=Qo(e,a-1,o+1);if(s.some(aF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:h}of s)l?(o>=d||i===h)&&(e=gf(e,d)):(c=h!==i,l=!0),u>o&&o>=d&&h!==i&&(e=sn(e,o+1,h));c&&(e=sn(e,a,i))}return[e,n]}function eF(e){return typeof e.groupIndex<"u"}function tF({offset:e},t){return t===e?0:t<e?-1:1}function la(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=xw(t,e,wf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function ww(e,t){if(!nl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Sw(e,t,n){if(eF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=ww(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function nF(e,t,n,r=0){return r>0&&(t=Math.max(t,xw(e,r,wf).offset)),pw(X2(e,t,n,tF),iF)}function rF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Jt.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ot(i)&&t.length===2){const h=t[0].size,g=t[1].size;a=n.reduce((v,m)=>sn(sn(v,m,h),m+1,g),a)}else[a,s]=J2(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Sf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((h,g)=>sn(h,g,la(g,d,o)),Xo()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function oF(e){return eo(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 Tw(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 Sf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=tl(o,t-1,wf),s=o[l].offset;const c=kn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===kn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Qo(n,t,1/0)){const d=c-i,h=d*a+s+d*r;o.push({index:c,offset:h,size:u}),i=c,s=h,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function iF(e){return{index:e.index,value:e}}function aF(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 sF={offsetHeight:"height",offsetWidth:"width"},Hn=qe(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),o=Wt(r,0),i=He(),a=He(),s=le(0),l=le([]),c=le(void 0),u=le(void 0),d=le(void 0),h=le(void 0),g=le((w,E)=>Cn(w,sF[E])),v=le(void 0),m=le(0),f=Q2(),y=Wt(re(n,Fe(l,e,m),Bn(rF,f),dt()),f),b=Wt(re(l,dt(),Bn((w,E)=>({current:E,prev:w.current}),{current:[],prev:[]}),me(({prev:w})=>w)),[]);Te(re(l,Ce(w=>w.length>0),Fe(y,m),me(([w,E,A])=>{const I=w.reduce((D,F,j)=>sn(D,F,la(F,E.offsetTree,A)||j),Xo());return{...E,groupIndices:w,groupOffsetTree:I}})),y),Te(re(r,Fe(y),Ce(([w,{lastIndex:E}])=>w<E),me(([w,{lastIndex:E,lastSize:A}])=>[{endIndex:E,size:A,startIndex:w}])),n),Te(c,u);const x=Wt(re(c,me(w=>w===void 0)),!0);Te(re(u,Ce(w=>w!==void 0&&ot(pt(y).sizeTree)),me(w=>{const E=pt(d),A=pt(l).length>0;return E?A?[{endIndex:0,size:E,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Te(re(h,Ce(w=>w!==void 0&&w.length>0&&ot(pt(y).sizeTree)),me(w=>{const E=[];let A=w[0],I=0;for(let D=1;D<w.length;D++){const F=w[D];F!==A&&(E.push({endIndex:D-1,size:A,startIndex:I}),A=F,I=D)}return E.push({endIndex:w.length-1,size:A,startIndex:I}),E})),n),Te(re(l,Fe(d,u),Ce(([,w,E])=>w!==void 0&&E!==void 0),me(([w,E,A])=>{const I=[];for(let D=0;D<w.length;D++){const F=w[D],j=w[D+1];I.push({startIndex:F,endIndex:F,size:E}),j!==void 0&&I.push({startIndex:F+1,endIndex:j-1,size:A})}return I})),n);const k=an(re(n,Fe(y),Bn(({sizes:w},[E,A])=>({changed:A!==w,sizes:A}),{changed:!1,sizes:f}),me(w=>w.changed)));Qe(re(s,Bn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),me(w=>w.diff)),w=>{const{groupIndices:E}=pt(y);if(w>0)De(t,!0),De(i,w+Tw(w,E));else if(w<0){const A=pt(b);A.length>0&&(w-=Tw(-w,A)),De(a,w)}}),Qe(re(s,Fe(e)),([w,E])=>{w<0&&E("`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:s},Jt.ERROR)});const T=an(i);Te(re(i,Fe(y),me(([w,E])=>{const A=E.groupIndices.length>0,I=[],D=E.lastSize;if(A){const F=aa(E.sizeTree,0);let j=0,_=0;for(;j<w;){const z=E.groupIndices[_],M=E.groupIndices.length===_+1?1/0:E.groupIndices[_+1]-z-1;I.push({endIndex:z,size:F,startIndex:z}),I.push({endIndex:z+1+M-1,size:D,startIndex:z+1}),_++,j+=M+1}const N=eo(E.sizeTree);return j!==w&&N.shift(),N.reduce((z,{k:M,v:C})=>{let $=z.ranges;return z.prevSize!==0&&($=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:C,ranges:$}},{prevIndex:w,prevSize:0,ranges:I}).ranges}return eo(E.sizeTree).reduce((F,{k:j,v:_})=>({prevIndex:j+w,prevSize:_,ranges:[...F.ranges,{endIndex:j+w-1,size:F.prevSize,startIndex:F.prevIndex}]}),{prevIndex:0,prevSize:D,ranges:[]}).ranges})),n);const P=an(re(a,Fe(y,m),me(([w,{offsetTree:E},A])=>{const I=-w;return la(I,E,A)})));return Te(re(a,Fe(y,m),me(([w,E,A])=>{if(E.groupIndices.length>0){if(ot(E.sizeTree))return E;let I=Xo();const D=pt(b);let F=0,j=0,_=0;for(;F<-w;){_=D[j];const N=D[j+1]-_-1;j++,F+=N+1}if(I=eo(E.sizeTree).reduce((N,{k:z,v:M})=>sn(N,Math.max(0,z+w),M),I),F!==-w){const N=aa(E.sizeTree,_);I=sn(I,0,N);const z=kn(E.sizeTree,-w+1)[1];I=sn(I,1,z)}return{...E,sizeTree:I,...Sf(E.offsetTree,0,I,A)}}else{const I=eo(E.sizeTree).reduce((D,{k:F,v:j})=>sn(D,Math.max(0,F+w),j),Xo());return{...E,sizeTree:I,...Sf(E.offsetTree,0,I,A)}}})),y),{beforeUnshiftWith:T,data:v,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,fixedGroupSize:d,gap:m,groupIndices:l,heightEstimates:h,itemSize:g,listRefresh:k,shiftWith:a,shiftWithOffset:P,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},ut(Cr,xf),{singleton:!0});function lF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Ew=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=He(),a=He(),s=an(re(i,me(lF)));return Te(re(s,me(l=>l.totalCount)),n),Te(re(s,me(l=>l.groupIndices)),e),Te(re(At(o,t,r),Ce(([l,c])=>nl(c)),me(([l,c,u])=>kn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),dt(),me(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ut(Hn,Gt)),Pr=qe(([{log:e}])=>{const t=le(!1),n=an(re(t,Ce(r=>r),dt()));return Qe(t,r=>{r&&pt(e)("props updated",{},Jt.DEBUG)}),{didMount:n,propsReady:t}},ut(Cr),{singleton:!0}),cF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function kw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!cF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ca=qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:h}])=>{const g=He(),v=He(),m=le(0);let f=null,y=null,b=null;function x(){f&&(f(),f=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),De(l,!1)}return Te(re(g,Fe(n,d,r,m,s,a,h),Fe(e,i,o),me(([[k,T,P,w,E,A,I,D],F,j,_])=>{const N=kw(k),{align:z,behavior:M,offset:C}=N,$=w-1,L=Sw(N,T,$);let q=la(L,T.offsetTree,F)+A;z==="end"?(q+=j+kn(T.sizeTree,L)[1]-P+_,L===$&&(q+=I)):z==="center"?q+=(j+kn(T.sizeTree,L)[1]-P+_)/2:q-=E,C&&(q+=C);const Y=R=>{x(),R?(D("retrying to scroll to",{location:k},Jt.DEBUG),De(g,k)):(De(v,!0),D("list did not change, scroll successful",{},Jt.DEBUG))};if(x(),M==="smooth"){let R=!1;b=Qe(t,Z=>{R=R||Z}),f=En(u,()=>{Y(R)})}else f=En(re(t,uF(150)),Y);return y=setTimeout(()=>{x()},1200),De(l,!0),D("scrolling from index to",{behavior:M,index:L,top:q},Jt.DEBUG),{behavior:M,top:q}})),c),{scrollTargetReached:v,scrollToIndex:g,topListHeight:m}},ut(Hn,Gt,Cr),{singleton:!0});function uF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Tf(e,t){e==0?t():requestAnimationFrame(()=>{Tf(e-1,t)})}function Ef(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ua=qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=le(!0),l=le(0),c=le(!0);return Te(re(a,Fe(l),Ce(([u,d])=>!!d),zn(!1)),s),Te(re(a,Fe(l),Ce(([u,d])=>!!d),zn(!1)),c),Qe(re(At(t,a),Fe(s,n,e,c),Ce(([[,u],d,{sizeTree:h},g,v])=>u&&(!ot(h)||df(g))&&!d&&!v),Fe(l)),([,u])=>{En(o,()=>{De(c,!0)}),Tf(4,()=>{En(r,()=>{De(s,!0)}),De(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ut(Hn,Gt,ca,Pr),{singleton:!0});function Cw(e,t){return Math.abs(e-t)<1.01}const da="up",fa="down",dF="none",fF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},pF=0,pa=qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=le(!1),s=le(!0),l=He(),c=He(),u=le(4),d=le(pF),h=Wt(re(pf(re(Pe(o),Jr(1),zn(!0)),re(Pe(o),Jr(1),zn(!1),cw(100))),dt()),!1),g=Wt(re(pf(re(n,zn(!0)),re(n,zn(!1),cw(200))),dt()),!1);Te(re(At(Pe(o),Pe(d)),me(([b,x])=>b<=x),dt()),s),Te(re(s,ir(50)),c);const v=an(re(At(r,Pe(i),Pe(t),Pe(e),Pe(u)),Bn((b,[{scrollHeight:x,scrollTop:k},T,P,w,E])=>{const A=k+T-x>-E,I={scrollHeight:x,scrollTop:k,viewportHeight:T};if(A){let F,j;return k>b.state.scrollTop?(F="SCROLLED_DOWN",j=b.state.scrollTop-k):(F="SIZE_DECREASED",j=b.state.scrollTop-k||b.scrollTopDelta),{atBottom:!0,atBottomBecause:F,scrollTopDelta:j,state:I}}let D;return I.scrollHeight>b.state.scrollHeight?D="SIZE_INCREASED":T<b.state.viewportHeight?D="VIEWPORT_HEIGHT_DECREASING":k<b.state.scrollTop?D="SCROLLING_UPWARDS":D="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:D,state:I}},fF),dt((b,x)=>b&&b.atBottom===x.atBottom))),m=Wt(re(r,Bn((b,{scrollHeight:x,scrollTop:k,viewportHeight:T})=>{if(Cw(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:k};{const P=x-(k+T)<1;return b.scrollTop!==k&&P?{changed:!0,jump:b.scrollTop-k,scrollHeight:x,scrollTop:k}:{changed:!0,jump:0,scrollHeight:x,scrollTop:k}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(b=>b.changed),me(b=>b.jump)),0);Te(re(v,me(b=>b.atBottom)),a),Te(re(a,ir(50)),l);const f=le(fa);Te(re(r,me(({scrollTop:b})=>b),dt(),Bn((b,x)=>pt(g)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?da:fa,prevScrollTop:x},{direction:fa,prevScrollTop:0}),me(b=>b.direction)),f),Te(re(r,ir(50),zn(dF)),f);const y=le(0);return Te(re(h,Ce(b=>!b),zn(0)),y),Te(re(o,ir(100),Fe(h),Ce(([b,x])=>x),Bn(([b,x],[k])=>[x,k],[0,0]),me(([b,x])=>x-b)),y),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:m,scrollDirection:f,scrollVelocity:y}},ut(Gt)),ha="top",ma="bottom",Pw="none";function Aw(e,t,n){return typeof e=="number"?n===da&&t===ha||n===fa&&t===ma?e:0:n===da?t===ha?e.main:e.reverse:t===ma?e.main:e.reverse}function Iw(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const kf=qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=He(),a=le(0),s=le(0),l=le(0),c=Wt(re(At(Pe(r),Pe(o),Pe(n),Pe(i,sa),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),me(([u,d,h,[g,v],m,f,y,b,x])=>{const k=u-b,T=f+y,P=Math.max(h-k,0);let w=Pw;const E=Iw(x,ha),A=Iw(x,ma);return g-=b,g+=h+y,v+=h+y,v-=b,g>u+T-E&&(w=da),v<u-P+d+A&&(w=fa),w!==Pw?[Math.max(k-h-Aw(m,ha,w)-E,0),k-P-y+d+Aw(m,ma,w)+A]:null}),Ce(u=>u!=null),dt(sa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ut(Gt),{singleton:!0});function hF(e,t,n){if(nl(t)){const r=ww(e,t);return[{index:kn(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 Cf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function rl(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,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-a,h=s+d*l+(d-1)*r,g=c,v=h-u;return{bottom:u,firstItemIndex:i,items:Ow(e,o,i),offsetBottom:v,offsetTop:c,top:g,topItems:Ow(t,o,i),topListHeight:t.reduce((m,f)=>f.size+m,0),totalCount:n}}function _w(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=Ef(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return rl(c,[],s,o,n,r)}function Ow(e,t,n){if(e.length===0)return[];if(!nl(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=[],a=Qo(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.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 Mw(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const to=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},h,{didMount:g},{recalcInProgress:v}])=>{const m=le([]),f=le(0),y=He(),b=le(0);Te(i.topItemsIndexes,m);const x=Wt(re(At(g,v,Pe(l,sa),Pe(o),Pe(r),Pe(c),u,Pe(m),Pe(t),Pe(n),Pe(b),e),Ce(([w,E,,A,,,,,,,,I])=>{const D=I&&I.length!==A;return w&&!E&&!D}),me(([,,[w,E],A,I,D,F,j,_,N,z,M])=>{var C,$,L,q;const Y=I,{offsetTree:R,sizeTree:Z}=Y,te=pt(f);if(A===0)return{...Cf,totalCount:A};if(w===0&&E===0)return te===0?{...Cf,totalCount:A}:_w(te,D,I,_,N,M||[]);if(ot(Z))return te>0?null:rl(hF(Ef(D,A),Y,M),[],A,N,Y,_);const ne=[];if(j.length>0){const oe=j[0],ae=j[j.length-1];let ue=0;for(const pe of Qo(Z,oe,ae)){const se=pe.value,ge=Math.max(pe.start,oe),Ae=Math.min(pe.end,ae);for(let ve=ge;ve<=Ae;ve++)ne.push({data:M?.[ve],index:ve,offset:ue,size:se}),ue+=se}}if(!F)return rl([],ne,A,N,Y,_);const ee=j.length>0?j[j.length-1]+1:0,H=nF(R,w,E,ee);if(H.length===0)return null;const K=A-1,X=Js([],oe=>{for(const ae of H){const ue=ae.value;let pe=ue.offset,se=ae.start;const ge=ue.size;if(ue.offset<w){se+=Math.floor((w-ue.offset+N)/(ge+N));const ve=se-ae.start;pe+=ve*ge+ve*N}se<ee&&(pe+=(ee-se)*ge,se=ee);const Ae=Math.min(ae.end,K);for(let ve=se;ve<=Ae&&!(pe>=E);ve++)oe.push({data:M?.[ve],index:ve,offset:pe,size:ge}),pe+=ge+N}}),ie=Mw(z,ha),B=Mw(z,ma);if(X.length>0&&(ie>0||B>0)){const oe=X[0],ae=X[X.length-1];if(ie>0&&oe.index>ee){const ue=Math.min(ie,oe.index-ee),pe=[];let se=oe.offset;for(let ge=oe.index-1;ge>=oe.index-ue;ge--){const Ae=($=(C=Qo(Z,ge,ge)[0])==null?void 0:C.value)!=null?$:oe.size;se-=Ae+N,pe.unshift({data:M?.[ge],index:ge,offset:se,size:Ae})}X.unshift(...pe)}if(B>0&&ae.index<K){const ue=Math.min(B,K-ae.index);let pe=ae.offset+ae.size+N;for(let se=ae.index+1;se<=ae.index+ue;se++){const ge=(q=(L=Qo(Z,se,se)[0])==null?void 0:L.value)!=null?q:ae.size;X.push({data:M?.[se],index:se,offset:pe,size:ge}),pe+=ge+N}}}return rl(X,ne,A,N,Y,_)}),Ce(w=>w!==null),dt()),Cf);Te(re(e,Ce(df),me(w=>w?.length)),o),Te(re(x,me(w=>w.topListHeight)),d),Te(d,s),Te(re(x,me(w=>[w.top,w.bottom])),a),Te(re(x,me(w=>w.items)),y);const k=an(re(x,Ce(({items:w})=>w.length>0),Fe(o,e),Ce(([{items:w},E])=>w[w.length-1].originalIndex===E-1),me(([,w,E])=>[w-1,E]),dt(sa),me(([w])=>w))),T=an(re(x,ir(200),Ce(({items:w,topItems:E})=>w.length>0&&w[0].originalIndex===E.length),me(({items:w})=>w[0].index),dt())),P=an(re(x,Ce(({items:w})=>w.length>0),me(({items:w})=>{let E=0,A=w.length-1;for(;w[E].type==="group"&&E<A;)E++;for(;w[A].type==="group"&&A>E;)A--;return{endIndex:w[A].index,startIndex:w[E].index}}),dt(bw)));return{endReached:k,initialItemCount:f,itemsRendered:y,listState:x,minOverscanItemCount:b,rangeChanged:P,startReached:T,topItemsIndexes:m,...h}},ut(Hn,Ew,kf,ua,ca,pa,Pr,xf),{singleton:!0}),Dw=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=He(),a=Wt(re(At(n,e,r,t,o),me(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return Te(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},ut(Gt,to),{singleton:!0}),mF=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=le(!1),r=Wt(re(At(n,e,t),Ce(([o])=>o),me(([,o,i])=>Math.max(0,o-i)),ir(0),dt()),0);return{alignToBottom:n,paddingTopAddition:r}},ut(Gt,Dw),{singleton:!0}),Nw=qe(()=>({context:le(null)})),gF=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,Fw=qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=He();return Te(re(u,Fe(t,l,n,i,o,r,s),Fe(e),me(([[d,h,g,v,m,f,y,b],x])=>{const{align:k,behavior:T,calculateViewLocation:P=gF,done:w,...E}=d,A=Sw(d,h,v-1),I=la(A,h.offsetTree,x)+m+f,D=I+kn(h.sizeTree,A)[1],F=b+f,j=b+g-y,_=P({itemBottom:D,itemTop:I,locationParams:{align:k,behavior:T,...E},viewportBottom:j,viewportTop:F});return _?w&&En(re(a,Ce(N=>!N),Jr(pt(a)?1:2)),w):w?.(),_}),Ce(d=>d!==null)),c),{scrollIntoView:u}},ut(Hn,Gt,ca,to,Cr),{singleton:!0});function Lw(e){return e?e==="smooth"?"smooth":"auto":!1}const vF=(e,t)=>typeof e=="function"?Lw(e(t)):t&&Lw(e),yF=qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:h},{scrollIntoView:g}])=>{const v=le(!1),m=He();let f=null;function y(T){De(a,{align:"end",behavior:T,index:"LAST"})}Qe(re(At(re(Pe(t),Jr(1)),l),Fe(Pe(v),i,s,d),me(([[T,P],w,E,A,I])=>{let D=P&&A,F="auto";return D&&(F=vF(w,E||I),D=D&&!!F),{followOutputBehavior:F,shouldFollow:D,totalCount:T}}),Ce(({shouldFollow:T})=>T)),({followOutputBehavior:T,totalCount:P})=>{f&&(f(),f=null),pt(n)?requestAnimationFrame(()=>{pt(u)("following output to ",{totalCount:P},Jt.DEBUG),y(T)}):f=En(e,()=>{pt(u)("following output to ",{totalCount:P},Jt.DEBUG),y(T),f=null})});function b(T){const P=En(o,w=>{T&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(pt(u)("scrolling to bottom due to increased size",{},Jt.DEBUG),y("auto"))});setTimeout(P,100)}Qe(re(At(Pe(v),t,c),Ce(([T,,P])=>T&&P),Bn(({value:T},[,P])=>({refreshed:T===P,value:P}),{refreshed:!1,value:0}),Ce(({refreshed:T})=>T),Fe(v,t)),([,T])=>{pt(s)&&b(T!==!1)}),Qe(m,()=>{b(pt(v)!==!1)}),Qe(At(Pe(v),o),([T,P])=>{T&&!P.atBottom&&P.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const x=le(null),k=He();return Te(pf(re(Pe(r),me(T=>{var P;return(P=T?.length)!=null?P:0})),re(Pe(t))),k),Qe(re(At(re(k,Jr(1)),l),Fe(Pe(x),s,d,h),me(([[T,P],w,E,A,I])=>P&&E&&w?.({context:I,totalCount:T,scrollingInProgress:A})),Ce(T=>!!T),ir(0)),T=>{f&&(f(),f=null),pt(n)?requestAnimationFrame(()=>{pt(u)("scrolling into view",{}),De(g,T)}):f=En(e,()=>{pt(u)("scrolling into view",{}),De(g,T),f=null})}),{autoscrollToBottom:m,followOutput:v,scrollIntoViewOnChange:x}},ut(Hn,pa,ca,ua,Pr,Cr,Gt,Nw,Fw)),bF=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(Te(re(s,Fe(i),Ce(([,l])=>l!==0),Fe(o,r,t,n,e),me(([[,l],c,u,d,h,g=[]])=>_w(l,c,u,d,h,g))),a),{}),ut(Hn,ua,to,Pr),{singleton:!0}),xF=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=le(0);return Qe(re(e,Fe(r),Ce(([,o])=>o!==0),me(([,o])=>({top:o}))),o=>{En(re(n,Jr(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{De(t,o)})})}),{initialScrollTop:r}},ut(Pr,Gt,to),{singleton:!0}),Vw=qe(([{scrollVelocity:e}])=>{const t=le(!1),n=He(),r=le(!1);return Te(re(e,Fe(r,t,n),Ce(([o,i])=>!!i),me(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),dt()),t),Qe(re(At(t,e,n),Fe(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ut(pa),{singleton:!0}),Pf=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),o=He(),i=le(!1),a=le(void 0);return Te(re(At(n,r),me(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Te(re(t,Fe(r),me(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ut(Gt)),wF=qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=He(),u=le(void 0),d=le(null),h=le(null);return Te(s,d),Te(l,h),Qe(re(c,Fe(t,r,a,d,h,n)),([g,v,m,f,y,b,x])=>{const k=oF(v.sizeTree);f&&y!==null&&b!==null&&(m=y.scrollTop-b.offsetTop),m-=x,g({ranges:k,scrollTop:m})}),Te(re(u,Ce(df),me(SF)),o),Te(re(i,Fe(u),Ce(([,g])=>g!==void 0),dt(),me(([,g])=>g.ranges)),e),{getState:c,restoreStateFrom:u}},ut(Hn,Gt,ua,Pr,Pf));function SF(e){return{align:"start",index:0,offset:e.scrollTop}}const TF=qe(([{topItemsIndexes:e}])=>{const t=le(0);return Te(re(t,Ce(n=>n>=0),me(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ut(to));function $w(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const EF=$w(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),kF=qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:h},{log:g},{recalcInProgress:v}])=>{const m=an(re(l,Fe(a),Bn(([,y,b,x],[{bottom:k,items:T,offsetBottom:P,totalCount:w},E])=>{const A=k+P;let I=0;return b===w&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(I=A-x,I!==0&&(I+=E))),[I,T,w,A]},[0,[],0,0]),Ce(([y])=>y!==0),Fe(r,s,n,o,g,v),Ce(([,y,b,x,,,k])=>!k&&!x&&y!==0&&b===da),me(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},Jt.DEBUG),y))));function f(y){y>0?(De(t,{behavior:"auto",top:-y}),De(e,0)):(De(e,0),De(t,{behavior:"auto",top:-y}))}return Qe(re(m,Fe(e,i)),([y,b,x])=>{x&&EF()?De(e,b-y):f(-y)}),Qe(re(At(Wt(i,!1),e,v),Ce(([y,b,x])=>!y&&!x&&b!==0),me(([y,b])=>b),ir(1)),f),Te(re(d,me(y=>({top:-y}))),t),Qe(re(c,Fe(h,u),me(([y,{groupIndices:b,lastSize:x,sizeTree:k},T])=>{function P(w){return w*(x+T)}if(b.length===0)return P(y);{let w=0;const E=aa(k,0);let A=0,I=0;for(;A<y;){A++,w+=E;let D=b.length===I+1?1/0:b[I+1]-b[I]-1;A+D>y&&(w-=E,D=y-A+1),A+=D,w+=P(D),I++}return w}})),y=>{De(e,y),requestAnimationFrame(()=>{De(t,{top:y}),requestAnimationFrame(()=>{De(e,0),De(v,!1)})})}),{deviation:e}},ut(Gt,pa,to,Hn,Cr,xf)),CF=qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),ut(kf,bF,Pr,Vw,Dw,xF,mF,Pf,Fw,Cr,Nw)),jw=qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:h,trackItemSizes:g},{initialItemFinalLocationReached:v,initialTopMostItemIndex:m,scrolledToInitialItem:f},y,b,x,k,{scrollToIndex:T},P,{topItemCount:w},{groupCounts:E},A])=>{const{listState:I,minOverscanItemCount:D,topItemsIndexes:F,rangeChanged:j,..._}=k;return Te(j,A.scrollSeekRangeChanged),Te(re(A.windowViewportRect,me(N=>N.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:E,heightEstimates:s,initialItemFinalLocationReached:v,initialTopMostItemIndex:m,scrolledToInitialItem:f,sizeRanges:c,topItemCount:w,topItemsIndexes:F,totalCount:h,...x,groupIndices:a,itemSize:l,listState:I,minOverscanItemCount:D,scrollToIndex:T,statefulTotalCount:d,trackItemSizes:g,rangeChanged:j,..._,...A,...y,sizes:u,...b}},ut(Hn,ua,Gt,wF,yF,to,ca,kF,TF,Ew,CF));function PF(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const ol=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Af(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=S.createContext({});function l(f,y){f.propsReady&&De(f.propsReady,!1);for(const b of r){const x=f[t.required[b]];De(x,y[b])}for(const b of o)if(b in y){const x=f[t.optional[b]];De(x,y[b])}f.propsReady&&De(f.propsReady,!0)}function c(f){return i.reduce((y,b)=>(y[b]=x=>{const k=f[t.methods[b]];De(k,x)},y),{})}function u(f){return a.reduce((y,b)=>(y[b]=W2(f[t.events[b]]),y),{})}const d=S.forwardRef((f,y)=>{const{children:b,...x}=f,[k]=S.useState(()=>Js(U2(e),w=>{l(w,x)})),[T]=S.useState(lw(u,k));ol(()=>{for(const w of a)w in x&&Qe(T[w],x[w]);return()=>{Object.values(T).map(ff)}},[x,T,k]),ol(()=>{l(k,x)}),S.useImperativeHandle(y,sw(c(k)));const P=n;return p.jsx(s.Provider,{value:k,children:n?p.jsx(P,{...PF([...r,...o,...a],x),children:b}):b})}),h=f=>{const y=S.useContext(s);return S.useCallback(b=>{De(y[f],b)},[y,f])},g=f=>{const y=S.useContext(s)[f],b=S.useCallback(x=>Qe(y,x),[y]);return S.useSyncExternalStore(b,()=>pt(y),()=>pt(y))},v=f=>{const y=S.useContext(s)[f],[b,x]=S.useState(lw(pt,y));return ol(()=>Qe(y,k=>{k!==b&&x(sw(k))}),[y,b]),b},m=S.version.startsWith("18")?g:v;return{Component:d,useEmitter:(f,y)=>{const b=S.useContext(s)[f];ol(()=>Qe(b,y),[y,b])},useEmitterValue:m,usePublisher:h}}const il=S.createContext(void 0),zw=S.createContext(void 0),Bw=typeof document<"u"?S.useLayoutEffect:S.useEffect;function If(e){return"self"in e}function AF(e){return"body"in e}function Rw(e,t,n,r=Zo,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(h=>{let g,v,m;const f=h.target;if(AF(f)||If(f)){const b=If(f)?f:f.defaultView;m=i?b.scrollX:b.scrollY,g=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,v=i?b.innerWidth:b.innerHeight}else m=i?f.scrollLeft:f.scrollTop,g=i?f.scrollWidth:f.scrollHeight,v=i?f.offsetWidth:f.offsetHeight;const y=()=>{e({scrollHeight:g,scrollTop:Math.max(m,0),viewportHeight:v})};h.suppressFlushSync?y():uo.flushSync(y),s.current!==null&&(m===s.current||m<=0||m===g-v)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const h=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:h}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(h){const g=a.current;if(!g||(i?"offsetWidth"in g&&g.offsetWidth===0:"offsetHeight"in g&&g.offsetHeight===0))return;const v=h.behavior==="smooth";let m,f,y;If(g)?(f=Math.max(Cn(g.document.documentElement,i?"width":"height"),i?g.document.documentElement.scrollWidth:g.document.documentElement.scrollHeight),m=i?g.innerWidth:g.innerHeight,y=i?window.scrollX:window.scrollY):(f=g[i?"scrollWidth":"scrollHeight"],m=Cn(g,i?"width":"height"),y=g[i?"scrollLeft":"scrollTop"]);const b=f-m;if(h.top=Math.ceil(Math.max(Math.min(b,h.top),0)),Cw(m,f)||h.top===y){e({scrollHeight:f,scrollTop:y,viewportHeight:m}),v&&t(!0);return}v?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(h={behavior:h.behavior,left:h.top}),g.scrollTo(h)}function d(h){i&&(h={behavior:h.behavior,left:h.top}),a.current.scrollBy(h)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const _f="-webkit-sticky",Hw="sticky",Of=$w(()=>{if(typeof document>"u")return Hw;const e=document.createElement("div");return e.style.position=_f,e.style.position===_f?_f:Hw});function Mf(e){return e}const IF=qe(()=>{const e=le(s=>`Item ${s}`),t=le(s=>`Group ${s}`),n=le({}),r=le(Mf),o=le("div"),i=le(Zo),a=(s,l=null)=>Wt(re(n,me(c=>c[s]),dt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),_F=qe(([e,t])=>({...e,...t}),ut(jw,IF)),OF=({height:e})=>p.jsx("div",{style:{height:e}}),MF={overflowAnchor:"none",position:Of(),zIndex:1},Ww={overflowAnchor:"none"},DF={...Ww,display:"inline-block",height:"100%"},qw=S.memo(function({showTopList:e=!1}){const t=Ie("listState"),n=hn("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=hn("windowScrollContainerState"),a=hn("scrollContainerState"),s=o||r?i:a,l=Ie("itemContent"),c=Ie("context"),u=Ie("groupContent"),d=Ie("trackItemSizes"),h=Ie("itemSize"),g=Ie("log"),v=hn("gap"),m=Ie("horizontalDirection"),{callbackRef:f}=dw(n,h,d,e?Zo:s,g,v,o,m,Ie("skipAnimationFrameInResizeObserver")),[y,b]=S.useState(0);Ff("deviation",_=>{y!==_&&b(_)});const x=Ie("EmptyPlaceholder"),k=Ie("ScrollSeekPlaceholder")||OF,T=Ie("ListComponent"),P=Ie("ItemComponent"),w=Ie("GroupComponent"),E=Ie("computeItemKey"),A=Ie("isSeeking"),I=Ie("groupIndices").length>0,D=Ie("alignToBottom"),F=Ie("initialItemFinalLocationReached"),j=e?{}:{boxSizing:"border-box",...m?{display:"inline-block",height:"100%",marginLeft:y!==0?y:D?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:D?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...F?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?p.jsx(x,{...ft(x,c)}):p.jsx(T,{...ft(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:f,style:j,children:(e?t.topItems:t.items).map(_=>{const N=_.originalIndex,z=E(N+t.firstItemIndex,_.data,c);return A?S.createElement(k,{...ft(k,c),height:_.size,index:_.index,key:z,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?S.createElement(w,{...ft(w,c),"data-index":N,"data-item-index":_.index,"data-known-size":_.size,key:z,style:MF},u(_.index,c)):S.createElement(P,{...ft(P,c),...Uw(P,_.data),"data-index":N,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:z,style:m?DF:Ww},I?l(_.index,_.groupIndex,_.data,c):l(_.index,_.data,c))})})}),NF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},FF={outline:"none",overflowX:"auto",position:"relative"},Jo=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),LF={position:Of(),top:0,width:"100%",zIndex:1};function ft(e,t){if(typeof e!="string")return{context:t}}function Uw(e,t){return{item:typeof e=="string"?void 0:t}}const VF=S.memo(function(){const e=Ie("HeaderComponent"),t=hn("headerHeight"),n=Ie("HeaderFooterTag"),r=Rn(S.useMemo(()=>i=>{t(Cn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...ft(e,o)})}):null}),$F=S.memo(function(){const e=Ie("FooterComponent"),t=hn("footerHeight"),n=Ie("HeaderFooterTag"),r=Rn(S.useMemo(()=>i=>{t(Cn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...ft(e,o)})}):null});function Df({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:g,scrollToCallback:v}=Rw(s,c,l,u,void 0,d);return e("scrollTo",v),e("scrollBy",h),p.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:g,style:{...d?FF:NF,...o},tabIndex:0,...a,...ft(l,i),children:r})})}function Nf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),h=t("customScrollParent"),g=S.useRef(null),v=t("scrollerRef"),{scrollByCallback:m,scrollerRef:f,scrollToCallback:y}=Rw(s,c,l,v,h);return Bw(()=>{var b;return f.current=h||((b=g.current)==null?void 0:b.ownerDocument.defaultView),()=>{f.current=null}},[f,h]),e("windowScrollTo",y),e("scrollBy",m),p.jsx(l,{ref:g,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...a,...ft(l,i),children:r})})}const jF=({children:e})=>{const t=S.useContext(il),n=hn("viewportHeight"),r=hn("fixedItemHeight"),o=Ie("alignToBottom"),i=Ie("horizontalDirection"),a=S.useMemo(()=>oa(n,l=>Cn(l,i?"width":"height")),[n,i]),s=Rn(a,!0,Ie("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),p.jsx("div",{"data-viewport-type":"element",ref:s,style:Jo(o),children:e})},zF=({children:e})=>{const t=S.useContext(il),n=hn("windowViewportRect"),r=hn("fixedItemHeight"),o=Ie("customScrollParent"),i=mf(n,o,Ie("skipAnimationFrameInResizeObserver")),a=Ie("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),p.jsx("div",{"data-viewport-type":"window",ref:i,style:Jo(a),children:e})},BF=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...LF,marginTop:`${n}px`},o=Ie("context");return p.jsx(t,{style:r,...ft(t,o),children:e})},RF=S.memo(function(e){const t=Ie("useWindowScroll"),n=Ie("topItemsIndexes").length>0,r=Ie("customScrollParent"),o=Ie("context");return p.jsxs(r||t?qF:WF,{...e,context:o,children:[n&&p.jsx(BF,{children:p.jsx(qw,{showTopList:!0})}),p.jsxs(r||t?zF:jF,{children:[p.jsx(VF,{}),p.jsx(qw,{}),p.jsx($F,{})]})]})}),{Component:HF,useEmitter:Ff,useEmitterValue:Ie,usePublisher:hn}=Af(_F,{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"}},RF),WF=Df({useEmitter:Ff,useEmitterValue:Ie,usePublisher:hn}),qF=Nf({useEmitter:Ff,useEmitterValue:Ie,usePublisher:hn}),Lf=HF,UF=qe(()=>{const e=le(c=>p.jsxs("td",{children:["Item $",c]})),t=le(null),n=le(c=>p.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=le(null),o=le(null),i=le({}),a=le(Mf),s=le(Zo),l=(c,u=null)=>Wt(re(i,me(d=>d[c]),dt()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,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")}}),YF=qe(([e,t])=>({...e,...t}),ut(jw,UF)),GF=({height:e})=>p.jsx("tr",{children:p.jsx("td",{style:{height:e}})}),KF=({height:e})=>p.jsx("tr",{children:p.jsx("td",{style:{border:0,height:e,padding:0}})}),ZF={overflowAnchor:"none"},Yw={position:Of(),zIndex:2,overflowAnchor:"none"},Gw=S.memo(function({showTopList:e=!1}){const t=Ne("listState"),n=Ne("computeItemKey"),r=Ne("firstItemIndex"),o=Ne("context"),i=Ne("isSeeking"),a=Ne("fixedHeaderHeight"),s=Ne("groupIndices").length>0,l=Ne("itemContent"),c=Ne("groupContent"),u=Ne("ScrollSeekPlaceholder")||GF,d=Ne("GroupComponent"),h=Ne("TableRowComponent"),g=(e?t.topItems:[]).reduce((m,f,y)=>(y===0?m.push(f.size):m.push(m[y-1]+f.size),m),[]),v=(e?t.topItems:t.items).map(m=>{const f=m.originalIndex,y=n(f+r,m.data,o),b=e?f===0?0:g[f-1]:0;return i?S.createElement(u,{...ft(u,o),height:m.size,index:m.index,key:y,type:m.type||"item"}):m.type==="group"?S.createElement(d,{...ft(d,o),"data-index":f,"data-item-index":m.index,"data-known-size":m.size,key:y,style:{...Yw,top:a}},c(m.index,o)):S.createElement(h,{...ft(h,o),...Uw(h,m.data),"data-index":f,"data-item-index":m.index,"data-known-size":m.size,"data-item-group-index":m.groupIndex,key:y,style:e?{...Yw,top:a+b}:ZF},s?l(m.index,m.groupIndex,m.data,o):l(m.index,m.data,o))});return p.jsx(p.Fragment,{children:v})}),XF=S.memo(function(){const e=Ne("listState"),t=Ne("topItemsIndexes").length>0,n=Pn("sizeRanges"),r=Ne("useWindowScroll"),o=Ne("customScrollParent"),i=Pn("windowScrollContainerState"),a=Pn("scrollContainerState"),s=o||r?i:a,l=Ne("trackItemSizes"),c=Ne("itemSize"),u=Ne("log"),{callbackRef:d,ref:h}=dw(n,c,l,s,u,void 0,o,!1,Ne("skipAnimationFrameInResizeObserver")),[g,v]=S.useState(0);Vf("deviation",I=>{g!==I&&(h.current.style.marginTop=`${I}px`,v(I))});const m=Ne("EmptyPlaceholder"),f=Ne("FillerRow")||KF,y=Ne("TableBodyComponent"),b=Ne("paddingTopAddition"),x=Ne("statefulTotalCount"),k=Ne("context");if(x===0&&m)return p.jsx(m,{...ft(m,k)});const T=(t?e.topItems:[]).reduce((I,D)=>I+D.size,0),P=e.offsetTop+b+g-T,w=e.offsetBottom,E=P>0?p.jsx(f,{context:k,height:P},"padding-top"):null,A=w>0?p.jsx(f,{context:k,height:w},"padding-bottom"):null;return p.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...ft(y,k),children:[E,t&&p.jsx(Gw,{showTopList:!0}),p.jsx(Gw,{}),A]})}),QF=({children:e})=>{const t=S.useContext(il),n=Pn("viewportHeight"),r=Pn("fixedItemHeight"),o=Rn(S.useMemo(()=>oa(n,i=>Cn(i,"height")),[n]),!0,Ne("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),p.jsx("div",{"data-viewport-type":"element",ref:o,style:Jo(!1),children:e})},JF=({children:e})=>{const t=S.useContext(il),n=Pn("windowViewportRect"),r=Pn("fixedItemHeight"),o=Ne("customScrollParent"),i=mf(n,o,Ne("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),p.jsx("div",{"data-viewport-type":"window",ref:i,style:Jo(!1),children:e})},eL=S.memo(function(e){const t=Ne("useWindowScroll"),n=Ne("customScrollParent"),r=Pn("fixedHeaderHeight"),o=Pn("fixedFooterHeight"),i=Ne("fixedHeaderContent"),a=Ne("fixedFooterContent"),s=Ne("context"),l=Rn(S.useMemo(()=>oa(r,y=>Cn(y,"height")),[r]),!0,Ne("skipAnimationFrameInResizeObserver")),c=Rn(S.useMemo(()=>oa(o,y=>Cn(y,"height")),[o]),!0,Ne("skipAnimationFrameInResizeObserver")),u=n||t?rL:nL,d=n||t?JF:QF,h=Ne("TableComponent"),g=Ne("TableHeadComponent"),v=Ne("TableFooterComponent"),m=i?p.jsx(g,{ref:l,style:{position:"sticky",top:0,zIndex:2},...ft(g,s),children:i()},"TableHead"):null,f=a?p.jsx(v,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...ft(v,s),children:a()},"TableFoot"):null;return p.jsx(u,{...e,...ft(u,s),children:p.jsx(d,{children:p.jsxs(h,{style:{borderSpacing:0,overflowAnchor:"none"},...ft(h,s),children:[m,p.jsx(XF,{},"TableBody"),f]})})})}),{Component:tL,useEmitter:Vf,useEmitterValue:Ne,usePublisher:Pn}=Af(YF,{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"}},eL),nL=Df({useEmitter:Vf,useEmitterValue:Ne,usePublisher:Pn}),rL=Nf({useEmitter:Vf,useEmitterValue:Ne,usePublisher:Pn}),oL=tL,Kw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},iL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Zw,floor:al,max:ga,min:$f,round:Xw}=Math;function Qw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function aL(e){return{...iL,items:e}}function sl(e,t){return e&&e.width===t.width&&e.height===t.height}function sL(e,t){return e&&e.column===t.column&&e.row===t.row}const lL=qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},h,g,{didMount:v,propsReady:m},{customScrollParent:f,useWindowScroll:y,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:k},T])=>{const P=le(0),w=le(0),E=le(Kw),A=le({height:0,width:0}),I=le({height:0,width:0}),D=He(),F=He(),j=le(0),_=le(null),N=le({column:0,row:0}),z=He(),M=He(),C=le(!1),$=le(0),L=le(!0),q=le(!1),Y=le(!1);Qe(re(v,Fe($),Ce(([H,K])=>!!K)),()=>{De(L,!1)}),Qe(re(At(v,L,I,A,$,q),Ce(([H,K,X,ie,,B])=>H&&!K&&X.height!==0&&ie.height!==0&&!B)),([,,,,H])=>{De(q,!0),Tf(1,()=>{De(D,H)}),En(re(c),()=>{De(t,[0,0]),De(L,!0)})}),Te(re(M,Ce(H=>H!=null&&H.scrollTop>0),zn(0)),w),Qe(re(v,Fe(M),Ce(([,H])=>H!=null)),([,H])=>{H&&(De(A,H.viewport),De(I,H.item),De(N,H.gap),H.scrollTop>0&&(De(C,!0),En(re(c,Jr(1)),K=>{De(C,!1)}),De(l,{top:H.scrollTop})))}),Te(re(A,me(({height:H})=>H)),d),Te(re(At(Pe(A,sl),Pe(I,sl),Pe(N,(H,K)=>H&&H.column===K.column&&H.row===K.row),Pe(c)),me(([H,K,X,ie])=>({gap:X,item:K,scrollTop:ie,viewport:H}))),z),Te(re(At(Pe(P),r,Pe(N,sL),Pe(I,sl),Pe(A,sl),Pe(_),Pe(w),Pe(C),Pe(L),Pe($)),Ce(([,,,,,,,H])=>!H),me(([H,[K,X],ie,B,oe,ae,ue,,pe,se])=>{const{column:ge,row:Ae}=ie,{height:ve,width:Re}=B,{width:fe}=oe;if(ue===0&&(H===0||fe===0))return Kw;if(Re===0){const xt=Ef(se,H),Kt=xt+Math.max(ue-1,0);return aL(Qw(xt,Kt,ae))}const U=Jw(fe,Re,ge);let V,Q;pe?K===0&&X===0&&ue>0?(V=0,Q=ue-1):(V=U*al((K+Ae)/(ve+Ae)),Q=U*Zw((X+Ae)/(ve+Ae))-1,Q=$f(H-1,ga(Q,U-1)),V=$f(Q,ga(0,V))):(V=0,Q=-1);const de=Qw(V,Q,ae),{bottom:Ee,top:Le}=e1(oe,ie,B,de),Ze=Zw(H/U),Lt=Ze*ve+(Ze-1)*Ae-Ee;return{bottom:Ee,itemHeight:ve,items:de,itemWidth:Re,offsetBottom:Lt,offsetTop:Le,top:Le}})),E),Te(re(_,Ce(H=>H!==null),me(H=>H.length)),P),Te(re(At(A,I,E,N),Ce(([H,K,{items:X}])=>X.length>0&&K.height!==0&&H.height!==0),me(([H,K,{items:X},ie])=>{const{bottom:B,top:oe}=e1(H,ie,K,X);return[oe,B]}),dt(sa)),t);const R=le(!1);Te(re(c,Fe(R),me(([H,K])=>K||H!==0)),R);const Z=an(re(At(E,P),Ce(([{items:H}])=>H.length>0),Fe(R),Ce(([[H,K],X])=>{const ie=H.items[H.items.length-1].index===K-1;return(X||H.bottom>0&&H.itemHeight>0&&H.offsetBottom===0&&H.items.length===K)&&ie}),me(([[,H]])=>H-1),dt())),te=an(re(Pe(E),Ce(({items:H})=>H.length>0&&H[0].index===0),zn(0),dt())),ne=an(re(Pe(E),Fe(C),Ce(([{items:H},K])=>H.length>0&&!K),me(([{items:H}])=>({endIndex:H[H.length-1].index,startIndex:H[0].index})),dt(bw),ir(0)));Te(ne,g.scrollSeekRangeChanged),Te(re(D,Fe(A,I,P,N),me(([H,K,X,ie,B])=>{const oe=kw(H),{align:ae,behavior:ue,offset:pe}=oe;let se=oe.index;se==="LAST"&&(se=ie-1),se=ga(0,se,$f(ie-1,se));let ge=jf(K,B,X,se);return ae==="end"?ge=Xw(ge-K.height+X.height):ae==="center"&&(ge=Xw(ge-K.height/2+X.height/2)),pe&&(ge+=pe),{behavior:ue,top:ge}})),l);const ee=Wt(re(E,me(H=>H.offsetBottom+H.bottom)),0);return Te(re(k,me(H=>({height:H.visibleHeight,width:H.visibleWidth}))),A),{customScrollParent:f,data:_,deviation:j,footerHeight:o,gap:N,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:I,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:F,scrollTo:l,scrollToIndex:D,scrollTop:c,smoothScrollTargetReached:u,totalCount:P,useWindowScroll:y,viewportDimensions:A,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:k,...g,gridState:E,horizontalDirection:Y,initialTopMostItemIndex:$,totalListHeight:ee,...h,endReached:Z,propsReady:m,rangeChanged:ne,startReached:te,stateChanged:z,stateRestoreInProgress:C,...T}},ut(kf,Gt,pa,Vw,Pr,Pf,Cr));function Jw(e,t,n){return ga(1,al((e+n)/(al(t)+n)))}function e1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=jf(e,t,n,r[0].index);return{bottom:jf(e,t,n,r[r.length-1].index)+o,top:i}}function jf(e,t,n,r){const o=Jw(e.width,n.width,t.column),i=al(r/o),a=i*n.height+ga(0,i-1)*t.row;return a>0?a+t.row:a}const cL=qe(()=>{const e=le(d=>`Item ${d}`),t=le({}),n=le(null),r=le("virtuoso-grid-item"),o=le("virtuoso-grid-list"),i=le(Mf),a=le("div"),s=le(Zo),l=(d,h=null)=>Wt(re(t,me(g=>g[d]),dt()),h),c=le(!1),u=le(!1);return Te(Pe(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),uL=qe(([e,t])=>({...e,...t}),ut(lL,cL)),dL=S.memo(function(){const e=ht("gridState"),t=ht("listClassName"),n=ht("itemClassName"),r=ht("itemContent"),o=ht("computeItemKey"),i=ht("isSeeking"),a=mn("scrollHeight"),s=ht("ItemComponent"),l=ht("ListComponent"),c=ht("ScrollSeekPlaceholder"),u=ht("context"),d=mn("itemDimensions"),h=mn("gap"),g=ht("log"),v=ht("stateRestoreInProgress"),m=mn("reportReadyState"),f=Rn(S.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;a(b);const x=y.firstChild;if(x){const{height:k,width:T}=x.getBoundingClientRect();d({height:k,width:T})}h({column:n1("column-gap",getComputedStyle(y).columnGap,g),row:n1("row-gap",getComputedStyle(y).rowGap,g)})},[a,d,h,g]),!0,!1);return Bw(()=>{e.itemHeight>0&&e.itemWidth>0&&m(!0)},[e]),v?null:p.jsx(l,{className:t,ref:f,...ft(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?p.jsx(c,{...ft(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},b):S.createElement(s,{...ft(s,u),className:n,"data-index":y.index,key:b},r(y.index,y.data,u))})})}),fL=S.memo(function(){const e=ht("HeaderComponent"),t=mn("headerHeight"),n=ht("headerFooterTag"),r=Rn(S.useMemo(()=>i=>{t(Cn(i,"height"))},[t]),!0,!1),o=ht("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...ft(e,o)})}):null}),pL=S.memo(function(){const e=ht("FooterComponent"),t=mn("footerHeight"),n=ht("headerFooterTag"),r=Rn(S.useMemo(()=>i=>{t(Cn(i,"height"))},[t]),!0,!1),o=ht("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...ft(e,o)})}):null}),hL=({children:e})=>{const t=S.useContext(zw),n=mn("itemDimensions"),r=mn("viewportDimensions"),o=Rn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),p.jsx("div",{ref:o,style:Jo(!1),children:e})},mL=({children:e})=>{const t=S.useContext(zw),n=mn("windowViewportRect"),r=mn("itemDimensions"),o=ht("customScrollParent"),i=mf(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),p.jsx("div",{ref:i,style:Jo(!1),children:e})},gL=S.memo(function({...e}){const t=ht("useWindowScroll"),n=ht("customScrollParent"),r=n||t?yL:vL,o=n||t?mL:hL,i=ht("context");return p.jsx(r,{...e,...ft(r,i),children:p.jsxs(o,{children:[p.jsx(fL,{}),p.jsx(dL,{}),p.jsx(pL,{})]})})}),{useEmitter:t1,useEmitterValue:ht,usePublisher:mn}=Af(uL,{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"}},gL),vL=Df({useEmitter:t1,useEmitterValue:ht,usePublisher:mn}),yL=Nf({useEmitter:t1,useEmitterValue:ht,usePublisher:mn});function n1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}const r1=e=>{const t=e.Icon??Vm,n=St();return p.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[p.jsx(t,{size:64,className:"text-disabled"}),p.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},zf=p.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),va=e=>p.jsx(en,{...e,as:e.as||"span",className:ke("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function bL(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 s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const xL=e=>{const t=S.useId(),n=St(),r=S.useMemo(()=>bL(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return p.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:[p.jsx("p",{children:p.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?p.jsxs(S.Fragment,{children:[p.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),p.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=>p.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),p.jsx("nav",{children:p.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?p.jsx("li",{children:p.jsx(en,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:p.jsx(S.Fragment,{children:typeof i=="string"?p.jsx("li",{children:"..."}):p.jsx("li",{children:p.jsx(en,{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?p.jsx("li",{children:p.jsx(en,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},wL=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),p.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"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:p.jsx("div",{ref:n,className:"block isolate",children:e.children})})},SL=(e,t,n)=>{const r=n.cols,o=n.loading;return p.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=gu(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,h=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,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?p.jsx(wL,{children:p.jsx(h,{col:i,row:t,rowIndex:e})}):null,p.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),p.jsx("span",{className:"relative",children:o?zf:c?p.jsx(S.Fragment,{children:p.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):p.jsx(S.Fragment,{children:je.nil(l)?"":l})}))})})},ei=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[Ai(10),au({fallbackAxisSideDirection:"end"}),iu(),Ig({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=tr({open:n,middleware:i,transform:!0,whileElementsMounted:Eo,onOpenChange:(v,m)=>{const f=m?.relatedTarget;f&&f.dataset.floating==="true"&&!v||(r(v),e.onChange?.(v))}}),c=Co(l),u=gr(l),d=vr(l,{role:"tooltip"}),{getReferenceProps:h,getFloatingProps:g}=nr([c,u,d]);return p.jsxs(S.Fragment,{children:[p.jsx("button",{ref:a.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&p.jsx(hr,{preserveTabOrder:!0,id:`${t}-portal`,children:p.jsx(Hr,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:p.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:a.setFloating,style:s,"aria-labelledby":t,...g(),children:[p.jsx(Vg,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),p.jsx("header",{className:"mb-2",children:p.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})};var Bf={},o1;function TL(){return o1||(o1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(f,y)=>{try{Object.keys(f).forEach(y)}catch(b){window.console.log(b)}},n=f=>f==null,r=f=>{const y=typeof f;return y==="string"||y==="number"||y==="boolean"||n(f)},o=(f,y)=>{const b=y.getItem(f);try{return JSON.parse(b)}catch{return b??null}},i=f=>Object.keys(f).reduce((y,b)=>({...y,[b]:o(b,f)}),{}),a=f=>f instanceof Date?f:typeof f=="number"?new Date(new Date*1+f*864e5):f,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(f=>f.split("=")).reduce((f,y)=>(f[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),f),{}),c=new Set,u=()=>{const f=l();c.forEach(y=>y(f))},d=[{name:"expires",parse:f=>`expires=${a(f.expires??s)}`},{name:"maxAge",parse:f=>f.maxAge?`max-age=${a(f.expires??s)}`:""},{name:"path",parse:f=>`path=${f.path??"/"}`},{name:"sameSite",parse:f=>`samesite=${f.sameSite??"strict"}`},{name:"useSecure",parse:f=>`${f.useSecure??!0?"secure":""}`},{name:"domain",parse:f=>{const y=f.domain??"";return y===""?"":`domain=${f.multiDomain?".":""}${y}`}},{name:"partitioned",parse:f=>f.partitioned?"Partitioned":""}],h={json:l,listener:f=>(c.add(f),()=>c.delete(f)),clearListeners:()=>c.clear(),has:f=>document.cookie.split(";").some(y=>y.trim().startsWith(`${f}=`)),deleteAll:()=>{document.cookie.split(";").forEach(f=>{document.cookie=f.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:f=>{const y=h.json()[f];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:f=>{document.cookie=`${encodeURIComponent(f)}=;expires=${new Date().toUTCString()}`,u()},set:(f,y,b={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),k=d.reduce((T,P)=>{const w=P.parse(b);return w===""?T:T.concat(w)},[`${encodeURIComponent(f)}=${x}`]).join(";");document.cookie=k,u()}},g=f=>{const y=new Set,b=x=>{f().removeItem(x);const k=i(f());y.forEach(T=>T(k))};return{delete:b,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(f()):f(),has:x=>{const k=f().getItem(x);return!n(k)},deleteAll:()=>{t(f(),b),y.forEach(x=>x(f()))},get:x=>o(x,f()),set:(x,k)=>{f().setItem(x,JSON.stringify(k)),y.forEach(T=>T(f()))}}},v=g(()=>window.sessionStorage),m=g(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=v,e.createStorage=g})(Bf)),Bf}var ya=TL();const Rf=e=>e.headerLabel??e.thead??e.id,Hf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ti=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ti||{});const Wf=e=>e.type==="number"?e.valueAsNumber:e.value,EL=e=>{let t=[];return e({add:(a,s,l)=>t.push({...l,id:a,thead:s}),remove:a=>t=t.filter(s=>s.id!==a),getAll:()=>Array.from(t),filter:a=>t=Array.from(t.filter(a))}),t},kL={},CL=(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 a=r.get(o.id);return a===void 0?e[i]:a})},PL=(e,t,n=kL)=>{const r=yr()?null:ya.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=sf({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:CL(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return yr()||ya.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},AL=e=>{const t=br(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-tableheader="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},IL=()=>yr()?void 0:document.querySelector('[data-component="modal-body"]'),_L=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),OL=(e,t)=>e.toSorted(_L(t)),i1=(e,t,n)=>({label:t,id:Ao(),type:n,value:e.id}),ML=e=>{const t=St(),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,i1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,value:u}:h))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,type:u}:h))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return p.jsx(S.Fragment,{children:p.jsx(ei,{title:t.tableSortDropdownTitle,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(Dm,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:p.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>p.jsxs("li",{className:"flex flex-nowrap gap-3",children:[p.jsx(Wr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),p.jsx(Wr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),p.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:p.jsx(ja,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[p.jsx(Lc,{size:14})," ",t.tableSortAddButton]})})]})})})},DL=e=>{const t=St(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=i1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Rf(e.col);return p.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[p.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?p.jsx(Nk,{size:14}):null,n==="desc"?p.jsx(Dk,{size:14}):null,n==="undefined"?p.jsx(Dm,{size:14}):null]})},a1=S.createContext({}),NL=a1.Provider,FL=()=>S.useContext(a1),qf=(e,t,n,r={})=>{const o=e.id,i=e.type??ti.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Ao(),operation:l,label:Rf(e),name:o,type:i,value:"",...r}},Uf=()=>{const e=St(),t=S.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:S.useMemo(()=>({[ti.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ti.Boolean]:[t.is,t.isNot],[ti.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},LL=e=>{const t=St(),n=Uf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,qf(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(h=>{if(c!==h.id)return h;const g=e.cols.find(v=>u===v.id);return qf(g,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(h=>h.id===c?{...h,operation:n.operations[u]}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=Wf(l.target);e.set(d=>d.map(h=>h.id===c?{...h,value:u}:h))};return p.jsx(S.Fragment,{children:p.jsx(ei,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:p.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[p.jsx(Wk,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:p.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return p.jsxs("li",{className:"flex flex-nowrap gap-3",children:[p.jsx(Wr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),p.jsx(Wr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),p.jsx(Io,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),p.jsx("div",{className:"flex justify-center items-center mt-5",children:p.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:p.jsx(ja,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[p.jsx(Lc,{size:14})," ",t.tableFilterNewFilter]})})]})})})},VL=({filter:e,onDelete:t,set:n})=>{const r=St(),o=Uf(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=Wf(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return p.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[p.jsx(Wr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),p.jsx(Io,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),p.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:p.jsx(ja,{className:"text-danger",size:14})})]})},$L={top:0,left:0,right:0,bottom:-1},jL=e=>{const t=jc(),n=St(),r=e.filters.filter(m=>m.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=Uf(),l=o?Uk:Yk,c=S.useRef(null),u=m=>{const f=m.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==f))},d=S.useCallback(m=>{if(m===null)return;c.current=m;const f=new AbortController;return m.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:f.signal}),()=>f.abort()},[]),h=e.sorters.find(m=>e.header.id===m.value),g=h?.type?h.type===ow.Asc?"ascending":"descending":"none",v=Rf(e.header);return p.jsxs(F0,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":g,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:[p.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:p.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?p.jsx(ei,{arrow:!0,trigger:p.jsxs("span",{children:[p.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",v]}),p.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:p.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",p.jsx("span",{className:"font-medium",children:v})]}),children:p.jsxs("ul",{className:"font-medium",children:[r.length===0?null:p.jsx(S.Fragment,{children:r.map(m=>p.jsx("li",{className:"my-1",children:p.jsx(VL,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),p.jsx("li",{children:p.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(m=>m.concat(qf(e.header,s.options,s.operations))),children:[p.jsx(Lc,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,p.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?p.jsx(DL,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:p.jsx(ze.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:$L,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 f=c.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(f+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,f)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=f.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},zL=e=>{const[t,n]=AL(e.setCols);return p.jsx(M0,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:p.jsx(Tn,{children:e.headers.map((r,o)=>p.jsx(jL,{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}`))})})},BL=S.forwardRef(({context:e,className:t="",...n},r)=>p.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:p.jsx(Tn,{children:n.children})})),RL=S.forwardRef(({context:e,className:t="",...n},r)=>p.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??""}`})),HL=S.forwardRef(({context:e,...t},n)=>{const r=FL(),o={...t?.style,top:je.number(r.sticky)?`${r.sticky}px`:void 0};return p.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),WL=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return p.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??""}`})}),qL=S.forwardRef((e,t)=>e.context.loadingMore?p.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:p.jsx("tr",{role:"row",className:"bg-card-background",children:p.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:p.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),UL={TableRow:WL,TableFoot:qL,TableHead:HL,Table:RL,TableBody:BL},YL=[0,0,0,0,0,0,0,0,0,0],GL=e=>p.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?zf:p.jsx(r1,{})}),KL=()=>p.jsx(S.Fragment,{}),ZL=[],s1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!0,pagination:c=null,useControl:u=!1,...d})=>{const h=S.useRef(null),[g,v]=S.useState(!1),m=br(a),f=br(d.loadingMore),y=S.useMemo(()=>{if(d.loading)return YL;if(u)return d.rows;const k=new iw(d.rows);return t.length>0&&t.forEach(T=>T.value===""||Number.isNaN(T.value)?void 0:k.Where(T.name,T.operation.symbol,T.value)),r.length===0?k.Select():OL(k.Select(),r)},[d.loading,d.rows,u,t,r]);S.useEffect(()=>{if(h.current===null)return()=>{};const k=h.current,T=new IntersectionObserver(P=>P[P.length-1].isIntersecting&&f.current?(m.current?.(),void v(!0)):v(!1));return T.observe(k),()=>T.disconnect()},[f,m]);const b=y.length===0,x={cols:e,Aside:d.Aside,loading:d.loading,getRowProps:d.getRowProps,loadingMore:d.loadingMore};return p.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[p.jsx(oL,{context:x,components:UL,totalCount:y.length,itemContent:b?KL:SL,data:b?ZL:y,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>p.jsx(zL,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),b?p.jsx(GL,{loading:d.loading}):null,p.jsx("div",{"aria-hidden":"true",ref:h,className:"w-full h-0.5"}),c!==null?p.jsx(xL,{...c}):null]})},XL=({item:e,onPointerDown:t})=>{const n=Wo(0);return p.jsxs(F0,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[p.jsx("button",{type:"button",className:"cursor-grab",children:p.jsx(Hk,{size:14})}),p.jsx("span",{children:e.groupName})]},e.groupId)},QL=e=>{const t=St(),n=Hf(e.cols),r=ZN(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,h=c.options.item(d)?.label||"";i(h);const g=new iw(e.rows).GroupBy(u),v=e.cols.find(m=>m.id===u);e.setGroups(gE(g).map((m,f)=>{const y=g[m];return{...v,groupId:Ao(),groupKey:u,index:f,rows:y,groupName:m}}))},s=()=>e.setGroups([]);return p.jsx(S.Fragment,{children:p.jsxs(ei,{arrow:!1,title:t.tableGroupLabel,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(Kk,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[p.jsxs("div",{className:"flex flex-nowrap items-center",children:[p.jsx(Wr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),p.jsx(xs,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:p.jsx(ja,{size:16,className:"text-danger"})})]}),e.groups.length>0?p.jsxs("section",{className:"my-4",children:[p.jsx("header",{children:p.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),p.jsx(TD,{children:p.jsx(M0,{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=>p.jsx(XL,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},JL=e=>p.jsx("header",{className:"min-w-full mb-1",children:p.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[p.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[p.jsx("span",{children:p.jsx(LL,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),p.jsx("span",{children:p.jsx(ML,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),p.jsx("span",{children:p.jsx(QL,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),p.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=>p.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[p.jsxs("span",{children:[p.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),p.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[p.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),p.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=Wf(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),eV=(e,t)=>typeof t=="function"?t(e):t,ll=(e,t,n)=>e===t?void 0:n?.(t),tV=e=>{const t=jc(),n=S.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=S.useMemo(()=>Hf(e.cols),[e.cols]),[i,a]=sf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:eV(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),ll(l?.filters??[],s.filters??[],e.setFilters),ll(l?.sorters??[],s.sorters??[],e.setSorters),ll(l?.groups??[],s.groups??[],e.setGroups),ll(l?.cols??[],s.cols??[],e.setCols),s)]});return p.jsx(NL,{value:n,children:p.jsxs(Tn,{initial:!1,children:[r?p.jsx(JL,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?p.jsx(s1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):p.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>p.jsx("div",{className:"min-w-full",children:p.jsx(s1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},cl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>p.jsxs(en,{...s,as:r||"div","data-component":"card",className:ke("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4",i),children:[e?p.jsx("header",{"data-component":"card-title",className:ke("mb-2 w-full border-b border-card-border px-6 pb-4 text-xl font-medium",a),children:e}):o,p.jsx("div",{"data-component":"card-body",className:ke("min-w-full px-6",s.className),children:t?p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsx(va,{className:"w-full"}),p.jsx(va,{className:"w-8/12"}),p.jsx(va,{className:"w-10/12"}),p.jsx(va,{className:"w-1/2"})]}):n})]});cl.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return p.jsxs(i,{...o,title:je.string(o.title)?o.title:void 0,className:ke("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[p.jsx(a,{className:"font-semibold",children:o.title}),r?p.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const nV=e=>{const t=e.interactive??!0,n=e.Icon??Fc;return p.jsx(cl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:p.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:[p.jsx("div",{className:ke("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:p.jsx(n,{size:48})}),p.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[p.jsx("p",{className:"text-lg",children:e.title}),e.loading?p.jsx(va,{className:"h-10"}):p.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},rV=({item:e,context:t,setter:n,get:r,refs:o})=>p.jsx(hr,{children:p.jsx(Wd,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:p.jsxs(Tn,{presenceAffectsLayout:!0,children:[e?p.jsx(ze.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?p.jsx(fu,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:p.jsx(Hr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:p.jsxs(ze.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:[p.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:p.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:p.jsx(vo,{})})}),p.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[p.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),p.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),oV=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=tr({open:t!==null,transform:!0,onOpenChange:h=>h?void 0:n(null)}),a=Co(o),s=vr(o,{role:"dialog"}),l=gr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=nr([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return p.jsxs(S.Fragment,{children:[p.jsx(rV,{refs:i,context:o,get:c,item:t,setter:u}),p.jsx("ul",{role:"list",children:d.map((h,g)=>{const v=h.props,m=`${r}-${g}`,f=()=>n({...v,id:m}),y=v.leading;return p.jsx(ze.li,{layout:!0,layoutId:`item-${m}`,className:"border-b border-card-border py-2 last:border-transparent",children:p.jsx(ze.div,{layoutId:`toast-${m}`,className:"relative",children:p.jsx("div",{className:"relative flex items-start space-x-3",children:p.jsxs(S.Fragment,{children:[v.avatar?p.jsx("div",{children:p.jsx("div",{className:"relative px-1",children:p.jsx("button",{onClick:f,className:"flex size-10 items-center justify-center ring-primary",children:v.avatar})})}):null,p.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:p.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[p.jsxs("button",{onClick:f,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[p.jsx("h3",{children:v.title}),p.jsx("p",{className:"text-sm leading-snug text-secondary",children:v.description})]}),y?p.jsx(y,{open:f}):null]})})]})})})},m)})})]})},iV=e=>p.jsx(S.Fragment,{children:e.children}),l1=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},c1={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},u1=S.createContext(""),aV=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Yf=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!aV(a))return a}return n==="backward"?Yf(e,e.length-1,"backward"):Yf(e,-1,"forward")},d1=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Yf(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},f1={[c1.ArrowLeft]:(e,t)=>d1(t,"backward"),[c1.ArrowRight]:(e,t)=>d1(t,"forward")},sV=e=>{const[t,n]=l1(e.active),r=S.useRef(null),o=br(e.onChange);S.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]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(je.keyof(f1,c)){const u=f1[c],d=u(l,r.current);if(d===null)return;n(d)}};return p.jsx(u1.Provider,{value:t,children:p.jsx(cl,{className:e.className,container:ke("pt-0 max-w-full w-full min-w-0",e.container),header:p.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[p.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),p.jsx("nav",{className:"min-w-0",children:p.jsx("ul",{onKeyDown:s,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 p.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:ke("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:p.jsx(en,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},lV=()=>S.useContext(u1),cV=e=>{const t=lV();return p.jsx(S.Fragment,{children:e.id===t?e.children:null})},p1=()=>{const e=S.useContext(bo);return e?e.parser:za.hsla},Gf=.3,ba={duration:Gf,type:"tween",ease:"easeInOut"},h1=S.createContext(null),Kf={delay:.2,duration:.3,type:"tween",ease:"easeOut"},ni={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},uV=e=>p.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx(ze.path,{className:"currentColor",initial:ni.initial,animate:ni.animate,transition:Kf,d:"M18 6 6 18"}),p.jsx(ze.path,{className:"currentColor",initial:ni.initial,animate:ni.animate,transition:Kf,d:"m6 6 12 12"})]}),dV=e=>p.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:p.jsx(ze.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:ni.animate,initial:ni.initial,transition:Kf})}),fV={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},pV={duration:.6,delay:.2,type:"tween",ease:"circOut"},hV=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",mV=(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,m1=()=>S.useContext(h1),gV=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=p1(),s=m1(),[l,c]=S.useState(t);S.useEffect(()=>{if(!s){c(t);return}const d=mV(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const h=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(h)},[t,s,e]);const u=hV(e,l,n);return p.jsxs(ze.button,{...i,type:"button","data-step":e,animate:u,className:"relative w-auto text-center flex items-center justify-center",children:[p.jsx(ze.div,{variants:fV,transition:pV,className:`absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),p.jsx(ze.div,{initial:!1,animate:u,transition:ba,className:"flex relative justify-center items-center w-10 h-10 font-semibold rounded-full",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:ba,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:ba,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:ba,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:p.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?p.jsx(dV,{className:"size-6 text-primary-foreground"}):u==="error"?p.jsx(uV,{className:"size-6 text-danger-foreground"}):p.jsx(S.Fragment,{children:p.jsx("span",{children:e})})})}),r&&u==="active"?p.jsx("span",{className:`h-full flex items-center px-4 ${o}`,children:r}):null]})},vV=e=>{const[t,n]=_0(),r=S.useRef(e.currentStep),[o,i]=S.useState(e.currentStep);S.useEffect(()=>{if(e.currentStep===0)return;const s=t.current,l=s.querySelectorAll("[data-step]")[0],c=s.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`},ba)}},[e.currentStep]),S.useEffect(()=>{r.current=o;const s=setTimeout(()=>{i(e.currentStep)},Gf*1e3);return()=>clearTimeout(s)},[e.currentStep]);const a={currentStep:e.currentStep,previousStep:r.current,progressBarDuration:Gf};return p.jsx(h1.Provider,{value:a,children:p.jsxs("div",{className:"flex relative justify-between",ref:t,children:[p.jsx("div",{className:"absolute top-1/2 h-1 w-[calc(100%)] bg-card-border"}),p.jsx("div",{"data-name":"progress",className:"absolute top-1/2 w-0 h-1 bg-success"}),e.children]})})},g1={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},yV={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},v1=e=>p.jsx(ze.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:g1,exit:g1.false,transition:yV,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:ke("aria-hidden:pointer-events-none",e.className),children:e.children}),bV=fo("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"}}),xV=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return p.jsx(Tn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?p.jsx(ze.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:ke("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:p.jsx(v1,{"data-open":!!i,open:!!i,children:p.jsxs(en,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:ke(bV({theme:n}),t),children:[p.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?p.jsx(Nm,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?p.jsx(Fc,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?p.jsx(Gk,{"aria-hidden":"true",size:20}):null,r,p.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:a.title})]}),a.children,o!==void 0&&i?p.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:p.jsx(vo,{size:20})}):null]})})}):null})}),wV=e=>p.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[p.jsxs("header",{className:"flex items-start gap-4 p-6",children:[p.jsx("div",{className:ke("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:p.jsx("div",{children:p.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx("header",{children:p.jsx("h3",{className:"text-base leading-none",children:e.title})}),p.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?p.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),y1=(e="")=>ke("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),Zf=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),b1=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[h,g]=S.useState(!1),[v,m]=S.useState(null),f=S.useRef([]),y=S.useRef([]),b=S.useContext(Zf),x=fr(),k=pr(),T=HP(),P=Og(),w=x!==null,{floatingStyles:E,refs:A,context:I}=tr({nodeId:T,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Eo,placement:w?"right":"bottom-start",middleware:[Ai({mainAxis:w?0:4,alignmentAxis:w?-4:0}),au(),iu()]}),D=vr(I,{role:"menu"}),F=gr(I,{bubbles:!0}),j=Rg(I,{move:!1,enabled:n,delay:{open:fv},handleClose:dv({blockPointerEvents:!0,requireIntent:!1})}),_=Co(I,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),N=bs(I,{loop:!0,activeIndex:v,nested:w,listRef:f,onNavigate:m}),z=hA(I,{activeIndex:v,listRef:y,resetMs:gA,onMatch:u?m:void 0}),{getReferenceProps:M,getFloatingProps:C,getItemProps:$}=nr([j,_,D,F,N,z]);S.useEffect(()=>{if(!k)return;const q=()=>d(!1),Y=R=>{R.nodeId!==T&&R.parentId===x&&d(!1)};return k.events.on("click",q),k.events.on("menuopen",Y),()=>{k.events.off("click",q),k.events.off("menuopen",Y)}},[k,T,x]),S.useEffect(()=>{u&&k&&k.events.emit("menuopen",{parentId:x,nodeId:T})},[k,u,T,x]);const L=o?l.className:ke(y1(l.className));return p.jsxs(WP,{id:T,children:[p.jsx(S.Fragment,{children:l.asChild?p.jsx(wv,{...M(b.getItemProps({...l,onFocus(q){l.onFocus?.(q),g(!1),b.setHasFocusInside(!0)}})),children:s,className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":h?"":void 0,ref:Xn(A.setReference,P.ref,c),tabIndex:w?b.activeIndex===P.index?0:-1:void 0}):p.jsxs("button",{type:"button",className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":h?"":void 0,ref:Xn(A.setReference,P.ref,c),tabIndex:w?b.activeIndex===P.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(q){l.onFocus?.(q),g(!1),b.setHasFocusInside(!0)}})),children:[s,w&&p.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[p.jsx("span",{className:"sr-only",children:"Next menu"}),p.jsx(Nc,{size:14})]})]})}),p.jsx(Zf.Provider,{value:{activeIndex:v,setActiveIndex:m,getItemProps:$,setHasFocusInside:g,isOpen:u},children:p.jsx(VP,{elementsRef:f,labelsRef:y,children:u&&p.jsx(hr,{children:p.jsx(Hr,{context:I,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:p.jsx(t,{...C(),ref:A.setFloating,style:{...l.style,...E},className:ke("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",a),children:e})})})})})]})}),SV=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(Zf),s=Og({label:n?null:e}),l=pr(),c=s.index===a.activeIndex;return p.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Xn(s.ref,i),className:y1(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),a.setHasFocusInside(!0)}}),children:[r,t?p.jsx(t,{size:16}):null]})}),TV=S.forwardRef((e,t)=>fr()===null?p.jsx(qP,{children:p.jsx(b1,{...e,isParent:!0,ref:t})}):p.jsx(b1,{...e,isParent:!1,ref:t})),Xf=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return p.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:ke("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[p.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:ke("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,p.jsx("span",{"data-name":"checkbox-label",className:ke("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),EV=({children:e,className:t="",size:n,...r})=>p.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:[p.jsx("input",{...r,type:"radio",className:ke("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]}),kV=yv("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)}),CV=(e,t)=>yr()?t:window.matchMedia(e).matches,PV=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(CV(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},AV=wv,gn="500ms",IV={exit:{x:["0%","-30%"],opacity:0,animationDuration:gn},enter:{x:["-30%","0%"],opacity:1,animationDuration:gn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:gn}},_V={enter:{x:"0%",opacity:1,animationDuration:gn},exit:{x:["0%","30%"],opacity:0,animationDuration:gn},initial:{x:["30%","0%"],opacity:.8,animationDuration:gn}},Qf={drawer:e=>e==="left"?IV:_V,sheet:{enter:{opacity:1,y:"0%",animationDuration:gn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:gn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:gn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:gn},enter:{opacity:1,scale:[1.05,1],animationDuration:gn},initial:{opacity:.5,scale:.95,animationDuration:gn,transition:{duration:.5,ease:"easeInOut"}}}},OV=fo("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%)] relative 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"}}),Jf={top:0,left:0,right:0,bottom:0},ul=e=>e*.6,MV=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),h=window.outerHeight,g=ul(h);return d>=g?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,a=e.position==="right"?-r.delta.x:r.delta.x,s=Math.abs(i+a);return e.value.set(s)}};return p.jsx(ze.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:Jf,whileDrag:{cursor:"grabbing"},className:ke("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?p.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},dl={drawer:"right",sheet:"none",dialog:"none"},DV=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??dl.drawer:dl[o]:t?dl[o]:dl.sheet},NV=[],ep=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:h=!0,forceType:g=!1,layoutId:v=void 0,overlayClassName:m="",type:f="dialog",position:y,overlayClickClose:b=!1,role:x="dialog",interactions:k=NV,...T},P)=>{const w=S.useRef(null),E=S.useRef(null),A=S.useId(),I=S.useId(),D=PV("(min-width: 64rem)"),F=DV(D,g,f,y),j=D||g?Qf[f]:Qf.sheet,_=typeof j=="function"?j(F):j,N=D||g?f:"sheet",z=N!=="dialog",M=tr({open:e,onOpenChange:a,strategy:"fixed"}),C=Co(M.context,{}),$=vr(M.context,{role:x}),L=gr(M.context,{bubbles:!0,escapeKey:!0,ancestorScroll:!0,outsidePress:b}),q=nr([C,$,L].concat(k)),Y=o,R=Wo(void 0);S.useEffect(()=>R.set(void 0),[N,R]);const Z=()=>a(!1);S.useImperativeHandle(P,()=>({context:M.context,floating:E.current}),[M.context,E]);const te=(X,ie)=>{const oe=M.refs.floating.current.getBoundingClientRect(),ae=R.get()||oe.height,ue=Math.abs(ae-ie.delta.y),pe=window.outerHeight,se=ul(pe);return ue>=se?R.set(ue):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>R.set(void 0),350))},ne=(X,ie)=>{const B=M.refs.floating.current;if(ie.delta.y<0&&ie.offset.y<0){B.scrollTo({top:B.scrollTop+Math.abs(ie.offset.y),behavior:"smooth"});return}const oe=B.getBoundingClientRect(),ae=R.get()||oe.height,ue=Math.abs(ae-ie.delta.y),pe=window.outerHeight,se=ul(pe);return ue>=se?R.set(ue):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>R.set(void 0),350))},ee=N==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:Jf,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:te,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},H=Wo(void 0),K=Wo(void 0);return p.jsxs(S.Fragment,{children:[o?p.jsx(S.Fragment,{children:r?p.jsx(AV,{ref:M.refs.setReference,...q.getReferenceProps({layoutId:v}),children:Y}):p.jsx(ze.button,{ref:M.refs.setReference,...q.getReferenceProps(),layoutId:v,type:"button",children:Y})}):null,p.jsx(hr,{preserveTabOrder:!0,children:p.jsx(Tn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",initial:!1,children:e?p.jsx(fu,{lockScroll:!0,className:ke("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",N==="drawer"?"":"items-start justify-center p-10",m),children:p.jsx(Wd,{reducedMotion:d?"user":"always",children:p.jsx(Hr,{guards:!0,modal:!0,closeOnFocusOut:!0,context:M.context,children:p.jsxs(ze.div,{...T,...t?{"aria-labelledby":A,"aria-describedby":I}:{"aria-label":s},...q.getFloatingProps({"aria-modal":e,ref:Xn(M.refs.setFloating,E),className:ke(OV({position:F,type:N}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:v,variants:_,"data-component":"modal",style:N==="drawer"?{width:R}:{height:R},children:[z&&u?p.jsx(MV,{onChange:a,value:R,sheet:N==="sheet",position:F,parent:M.refs.floating}):null,t?p.jsx(ze.header,{...ee,className:"relative w-full isolate",children:t?p.jsx("h2",{id:A,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,p.jsx(ze.section,{ref:w,"data-component":"modal-body",dragConstraints:Jf,drag:D?void 0:"y",onDrag:N==="sheet"?D?void 0:ne:void 0,className:ke("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:()=>{K.set(void 0),H.set(void 0)},onTouchStart:X=>{const ie=X.changedTouches[0];H.set(ie.pageY),K.set(ie.pageY)},onTouchMove:X=>{const ie=X.changedTouches[0],B=ie.pageY,oe=H.get();if(oe<B&&w.current?.scrollTop===0){const pe=M.refs.floating.current.getBoundingClientRect(),se=R.get()||pe.height,ge=(oe-B)/10,Ae=se+ge,ve=window.outerHeight,Re=ul(ve);Ae<Re&&a?.(!1),R.set(Ae)}K.set(ie.pageY)},children:i}),n?p.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,h?p.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:p.jsx("button",{type:"button",onClick:Z,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:p.jsx(vo,{})})}):null]})})})}):null})})]})}),FV=e=>{const[t,n]=_0();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:JO(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),p.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},LV=e=>p.jsx("p",{...e,className:ke("text-base leading-snug",e.className)}),VV=e=>p.jsx("p",{...e,className:ke("mb-kilo text-sm text-secondary",e.className)}),$V=e=>p.jsx("div",{className:ke(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:p.jsxs(S.Fragment,{children:[p.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),p.jsx("span",{className:`w-fit ${e.disabled?"text-disabled":""} ${e.row?"text-base":"text-lg"}`,children:e.children})]})}),x1=e=>p.jsxs("div",{children:[p.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),p.jsx("p",{className:"text-secondary typography",children:e.children})]}),jV=e=>p.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[p.jsx("div",{children:p.jsx(x1,{title:e.title,children:e.description})}),p.jsx("div",{className:"flex gap-kilo items-center",children:e.children})]}),w1=e=>p.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:ke("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),zV=()=>p.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:p.jsx(w1,{})}),BV=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=tr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Co(s,{enabled:e.disabled??!0}),u=vr(s,{role:"tooltip"}),d=gr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:g}=nr([c,u,d]);return p.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[p.jsx(xs,{...g(e),as:ze.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:p.jsx(ze.span,{layoutId:o,children:e.trigger})}),p.jsx(Tn,{children:i?p.jsx(hr,{root:t,children:p.jsx(Hr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:p.jsx(ze.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},S1=6048e5,RV=864e5,HV=6e4,WV=36e5,qV=1e3,T1=Symbol.for("constructDateFrom");function nt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&T1 in e?e[T1](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ue(e,t){return nt(t||e,e)}function fl(e,t,n){const r=Ue(e,n?.in);return isNaN(t)?nt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function E1(e,t,n){const r=Ue(e,n?.in);if(isNaN(t))return nt(e,NaN);if(!t)return r;const o=r.getDate(),i=nt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function ri(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Ue(e,n?.in),d=o||r?E1(u,o+r*12):u,h=a||i?fl(d,a+i*7):d,g=l+s*60,m=(c+g*60)*1e3;return nt(e,+h+m)}let UV={};function no(){return UV}function Wn(e,t){const n=no(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ue(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function oi(e,t){return Wn(e,{...t,weekStartsOn:1})}function k1(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),o=nt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=oi(o),a=nt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=oi(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function pl(e){const t=Ue(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 hl(e,...t){const n=nt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ro(e,t){const n=Ue(e,t?.in);return n.setHours(0,0,0,0),n}function YV(e,t,n){const[r,o]=hl(n?.in,e,t),i=ro(r),a=ro(o),s=+i-pl(i),l=+a-pl(a);return Math.round((s-l)/RV)}function GV(e,t){const n=k1(e,t),r=nt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),oi(r)}function KV(e){return nt(e,Date.now())}function ZV(e,t,n){const[r,o]=hl(n?.in,e,t);return+ro(r)==+ro(o)}function XV(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ml(e){return!(!XV(e)&&typeof e!="number"||isNaN(+Ue(e)))}function QV(e,t){const[n,r]=hl(e,t.start,t.end);return{start:n,end:r}}function C1(e,t){const{start:n,end:r}=QV(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(nt(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function P1(e,t){const n=Ue(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function JV(e,t){const n=Ue(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function e$(e,t){const n=no(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ue(e,t?.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const t$={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"}},n$=(e,t,n)=>{let r;const o=t$[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 tp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const r$={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},o$={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},i$={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},a$={date:tp({formats:r$,defaultWidth:"full"}),time:tp({formats:o$,defaultWidth:"full"}),dateTime:tp({formats:i$,defaultWidth:"full"})},s$={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},l$=(e,t,n,r)=>s$[e];function xa(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const c$={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},u$={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},d$={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"]},f$={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"]},p$={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"}},h$={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"}},m$={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:xa({values:c$,defaultWidth:"wide"}),quarter:xa({values:u$,defaultWidth:"wide",argumentCallback:e=>e-1}),month:xa({values:d$,defaultWidth:"wide"}),day:xa({values:f$,defaultWidth:"wide"}),dayPeriod:xa({values:p$,defaultWidth:"wide",formattingValues:h$,defaultFormattingWidth:"wide"})};function wa(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 a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?v$(s,d=>d.test(a)):g$(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function g$(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function v$(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function y$(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 a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const b$=/^(\d+)(th|st|nd|rd)?/i,x$=/\d+/i,w$={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},S$={any:[/^b/i,/^(a|c)/i]},T$={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},E$={any:[/1/i,/2/i,/3/i,/4/i]},k$={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},C$={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]},P$={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},A$={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]},I$={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},_$={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}},O$={ordinalNumber:y$({matchPattern:b$,parsePattern:x$,valueCallback:e=>parseInt(e,10)}),era:wa({matchPatterns:w$,defaultMatchWidth:"wide",parsePatterns:S$,defaultParseWidth:"any"}),quarter:wa({matchPatterns:T$,defaultMatchWidth:"wide",parsePatterns:E$,defaultParseWidth:"any",valueCallback:e=>e+1}),month:wa({matchPatterns:k$,defaultMatchWidth:"wide",parsePatterns:C$,defaultParseWidth:"any"}),day:wa({matchPatterns:P$,defaultMatchWidth:"wide",parsePatterns:A$,defaultParseWidth:"any"}),dayPeriod:wa({matchPatterns:I$,defaultMatchWidth:"any",parsePatterns:_$,defaultParseWidth:"any"})},A1={code:"en-US",formatDistance:n$,formatLong:a$,formatRelative:l$,localize:m$,match:O$,options:{weekStartsOn:0,firstWeekContainsDate:1}};function M$(e,t){const n=Ue(e,t?.in);return YV(n,JV(n))+1}function I1(e,t){const n=Ue(e,t?.in),r=+oi(n)-+GV(n);return Math.round(r/S1)+1}function np(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),o=no(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=nt(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Wn(a,t),l=nt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Wn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function D$(e,t){const n=no(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=np(e,t),i=nt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Wn(i,t)}function _1(e,t){const n=Ue(e,t?.in),r=+Wn(n,t)-+D$(n,t);return Math.round(r/S1)+1}function rt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ar={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return rt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):rt(n+1,2)},d(e,t){return rt(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 rt(e.getHours()%12||12,t.length)},H(e,t){return rt(e.getHours(),t.length)},m(e,t){return rt(e.getMinutes(),t.length)},s(e,t){return rt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return rt(o,t.length)}},ii={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},O1={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 Ar.y(e,t)},Y:function(e,t,n,r){const o=np(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return rt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):rt(i,t.length)},R:function(e,t){const n=k1(e);return rt(n,t.length)},u:function(e,t){const n=e.getFullYear();return rt(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 rt(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 rt(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 Ar.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 rt(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=_1(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):rt(o,t.length)},I:function(e,t,n){const r=I1(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):rt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ar.d(e,t)},D:function(e,t,n){const r=M$(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):rt(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 rt(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 rt(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 rt(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=ii.noon:r===0?o=ii.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=ii.evening:r>=12?o=ii.afternoon:r>=4?o=ii.morning:o=ii.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 Ar.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ar.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ar.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ar.s(e,t)},S:function(e,t){return Ar.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return D1(r);case"XXXX":case"XX":return oo(r);default:return oo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return D1(r);case"xxxx":case"xx":return oo(r);default:return oo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+M1(r,":");default:return"GMT"+oo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+M1(r,":");default:return"GMT"+oo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return rt(r,t.length)},T:function(e,t,n){return rt(+e,t.length)}};function M1(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+rt(i,2)}function D1(e,t){return e%60===0?(e>0?"-":"+")+rt(Math.abs(e)/60,2):oo(e,t)}function oo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=rt(Math.trunc(r/60),2),i=rt(r%60,2);return n+o+t+i}const N1=(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"})}},F1=(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"})}},rp={p:F1,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return N1(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}}",N1(r,t)).replace("{{time}}",F1(o,t))}},N$=/^D+$/,F$=/^Y+$/,L$=["D","DD","YY","YYYY"];function L1(e){return N$.test(e)}function V1(e){return F$.test(e)}function op(e,t,n){const r=V$(e,t,n);if(console.warn(r),L$.includes(e))throw new RangeError(r)}function V$(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 $$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,j$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,z$=/^'([^]*?)'?$/,B$=/''/g,R$=/[a-zA-Z]/;function ip(e,t,n){const r=no(),o=r.locale??A1,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Ue(e,n?.in);if(!ml(s))throw new RangeError("Invalid time value");let l=t.match(j$).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=rp[d];return h(u,o.formatLong)}return u}).join("").match($$).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:H$(u)};if(O1[d])return{isToken:!0,value:u};if(d.match(R$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(V1(d)||L1(d))&&op(d,t,String(e));const h=O1[d[0]];return h(s,d,o.localize,c)}).join("")}function H$(e){const t=e.match(z$);return t?t[1].replace(B$,"'"):e}function W$(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=nt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function q$(){return Object.assign({},no())}function U$(e,t){const n=Ue(e,t?.in).getDay();return n===0?7:n}function Y$(e,t){return+Ue(e)>+Ue(t)}function G$(e,t){return+Ue(e)<+Ue(t)}function K$(e,t){const n=Z$(t)?new t(0):nt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Z$(e){return typeof e=="function"&&e.prototype?.constructor===e}const X$=10;class $1{subPriority=0;validate(t,n){return!0}}class Q$ extends $1{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 J$ extends $1{priority=X$;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>nt(n,r))}set(t,n){return n.timestampIsSet?t:nt(t,K$(t,this.context))}}class Ke{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Q$(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class ej extends Ke{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 Et={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}/},qn={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 kt(e,t){return e&&{value:t(e.value),rest:e.rest}}function vt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Un(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,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*WV+i*HV+a*qV),rest:t.slice(n[0].length)}}function j1(e){return vt(Et.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return vt(Et.singleDigit,t);case 2:return vt(Et.twoDigits,t);case 3:return vt(Et.threeDigits,t);case 4:return vt(Et.fourDigits,t);default:return vt(new RegExp("^\\d{1,"+e+"}"),t)}}function gl(e,t){switch(e){case 1:return vt(Et.singleDigitSigned,t);case 2:return vt(Et.twoDigitsSigned,t);case 3:return vt(Et.threeDigitsSigned,t);case 4:return vt(Et.fourDigitsSigned,t);default:return vt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ap(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function z1(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function B1(e){return e%400===0||e%4===0&&e%100!==0}class tj extends Ke{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 kt(bt(4,t),o);case"yo":return kt(r.ordinalNumber(t,{unit:"year"}),o);default:return kt(bt(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 a=z1(r.year,o);return t.setFullYear(a,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 nj extends Ke{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return kt(bt(4,t),o);case"Yo":return kt(r.ordinalNumber(t,{unit:"year"}),o);default:return kt(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=np(t,o);if(r.isTwoDigitYear){const s=z1(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Wn(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Wn(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class rj extends Ke{priority=130;parse(t,n){return gl(n==="R"?4:n.length,t)}set(t,n,r){const o=nt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),oi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class oj extends Ke{priority=130;parse(t,n){return gl(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 ij extends Ke{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return bt(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 aj extends Ke{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return bt(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 sj extends Ke{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 kt(vt(Et.month,t),o);case"MM":return kt(bt(2,t),o);case"Mo":return kt(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 lj extends Ke{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return kt(vt(Et.month,t),o);case"LL":return kt(bt(2,t),o);case"Lo":return kt(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 cj(e,t,n){const r=Ue(e,n?.in),o=_1(r,n)-t;return r.setDate(r.getDate()-o*7),Ue(r,n?.in)}class uj extends Ke{priority=100;parse(t,n,r){switch(n){case"w":return vt(Et.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Wn(cj(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function dj(e,t,n){const r=Ue(e,n?.in),o=I1(r,n)-t;return r.setDate(r.getDate()-o*7),r}class fj extends Ke{priority=100;parse(t,n,r){switch(n){case"I":return vt(Et.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return oi(dj(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const pj=[31,28,31,30,31,30,31,31,30,31,30,31],hj=[31,29,31,30,31,30,31,31,30,31,30,31];class mj extends Ke{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return vt(Et.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=B1(r),i=t.getMonth();return o?n>=1&&n<=hj[i]:n>=1&&n<=pj[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 gj extends Ke{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return vt(Et.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear();return B1(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 sp(e,t,n){const r=no(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ue(e,n?.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return fl(i,u,n)}class vj extends Ke{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=sp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class yj extends Ke{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return kt(bt(n.length,t),i);case"eo":return kt(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=sp(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 bj extends Ke{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return kt(bt(n.length,t),i);case"co":return kt(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=sp(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 xj(e,t,n){const r=Ue(e,n?.in),o=U$(r,n),i=t-o;return fl(r,i,n)}class wj extends Ke{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return bt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return kt(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 kt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return kt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return kt(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=xj(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 Sj extends Ke{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(ap(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Tj extends Ke{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(ap(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class Ej extends Ke{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(ap(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class kj extends Ke{priority=70;parse(t,n,r){switch(n){case"h":return vt(Et.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 Cj extends Ke{priority=70;parse(t,n,r){switch(n){case"H":return vt(Et.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 Pj extends Ke{priority=70;parse(t,n,r){switch(n){case"K":return vt(Et.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 Aj extends Ke{priority=70;parse(t,n,r){switch(n){case"k":return vt(Et.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 Ij extends Ke{priority=60;parse(t,n,r){switch(n){case"m":return vt(Et.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return bt(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 _j extends Ke{priority=50;parse(t,n,r){switch(n){case"s":return vt(Et.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return bt(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 Oj extends Ke{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return kt(bt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class Mj extends Ke{priority=10;parse(t,n){switch(n){case"X":return Un(qn.basicOptionalMinutes,t);case"XX":return Un(qn.basic,t);case"XXXX":return Un(qn.basicOptionalSeconds,t);case"XXXXX":return Un(qn.extendedOptionalSeconds,t);default:return Un(qn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:nt(t,t.getTime()-pl(t)-r)}incompatibleTokens=["t","T","x"]}class Dj extends Ke{priority=10;parse(t,n){switch(n){case"x":return Un(qn.basicOptionalMinutes,t);case"xx":return Un(qn.basic,t);case"xxxx":return Un(qn.basicOptionalSeconds,t);case"xxxxx":return Un(qn.extendedOptionalSeconds,t);default:return Un(qn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:nt(t,t.getTime()-pl(t)-r)}incompatibleTokens=["t","T","X"]}class Nj extends Ke{priority=40;parse(t){return j1(t)}set(t,n,r){return[nt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Fj extends Ke{priority=20;parse(t){return j1(t)}set(t,n,r){return[nt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const Lj={G:new ej,y:new tj,Y:new nj,R:new rj,u:new oj,Q:new ij,q:new aj,M:new sj,L:new lj,w:new uj,I:new fj,d:new mj,D:new gj,E:new vj,e:new yj,c:new bj,i:new wj,a:new Sj,b:new Tj,B:new Ej,h:new kj,H:new Cj,K:new Pj,k:new Aj,m:new Ij,s:new _j,S:new Oj,X:new Mj,x:new Dj,t:new Nj,T:new Fj},Vj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$j=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jj=/^'([^]*?)'?$/,zj=/''/g,Bj=/\S/,Rj=/[a-zA-Z]/;function Hj(e,t,n,r){const o=()=>nt(n,NaN),i=q$(),a=i.locale??A1,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Ue(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new J$(r?.in,n)],d=t.match($j).map(f=>{const y=f[0];if(y in rp){const b=rp[y];return b(f,a.formatLong)}return f}).join("").match(Vj),h=[];for(let f of d){V1(f)&&op(f,t,e),L1(f)&&op(f,t,e);const y=f[0],b=Lj[y];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const T=h.find(P=>x.includes(P.token)||P.token===y);if(T)throw new RangeError(`The format string mustn't contain \`${T.fullToken}\` and \`${f}\` at the same time`)}else if(b.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${f}\` and any other token at the same time`);h.push({token:y,fullToken:f});const k=b.run(e,f,a.match,c);if(!k)return o();u.push(k.setter),e=k.rest}else{if(y.match(Rj))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(f==="''"?f="'":y==="'"&&(f=Wj(f)),e.indexOf(f)===0)e=e.slice(f.length);else return o()}}if(e.length>0&&Bj.test(e))return o();const g=u.map(f=>f.priority).sort((f,y)=>y-f).filter((f,y,b)=>b.indexOf(f)===y).map(f=>u.filter(y=>y.priority===f).sort((y,b)=>b.subPriority-y.subPriority)).map(f=>f[0]);let v=Ue(n,r?.in);if(isNaN(+v))return o();const m={};for(const f of g){if(!f.validate(v,c))return o();const y=f.set(v,m,c);Array.isArray(y)?(v=y[0],Object.assign(m,y[1])):v=y}return v}function Wj(e){return e.match(jj)[1].replace(zj,"'")}function qj(e,t,n){const[r,o]=hl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Uj(e,t){return ZV(nt(e,e),KV(e))}function Yj(e,t,n){return fl(e,-t,n)}function Gj(e,t,n){const r=Ue(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=nt(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=W$(a);return r.setMonth(t,Math.min(i,s)),r}function Kj(e,t,n){let r=Ue(e,n?.in);return isNaN(+r)?nt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=Gj(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 Zj(e,t,n){const r=Ue(e,n?.in);return isNaN(+r)?nt(e,NaN):(r.setFullYear(t),r)}function Xj(e,t,n){return E1(e,-t,n)}function Sa(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Xj(e,o+r*12,n),d=Yj(u,a+i*7,n),h=l+s*60,v=(c+h*60)*1e3;return nt(e,+d-v)}const Qj=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function Jj(e,t){return S.useRef(Qj(e,t)).current}const lp=e=>{const t=S.useContext(bo);if(e)return e;if(t)return t.locale||e};function R1(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const ez=/^(?<hour>\d\d):(?<min>\d\d)$/,tz={type:"spring",bounce:.3,duration:.6},H1=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),W1={enter:H1(1),exit:H1(-1),middle:{x:"0%",opacity:1}},q1={exit:{visibility:"hidden"}},nz=e=>{const t=Wn(P1(e));return C1({start:t,end:ri(t,{days:41})})},U1=(e,t)=>e.toLocaleDateString(t,{month:"long"}),rz=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=P1(new Date(1970,o,1).setMonth(o)),a=U1(i,n);return p.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),cp={ArrowLeft:(e,t)=>t==="days"?Sa(e,{days:1}):Sa(e,{months:1}),ArrowRight:(e,t)=>t==="days"?ri(e,{days:1}):ri(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Sa(e,{weeks:1}):Sa(e,{years:1}),ArrowDown:(e,t)=>t==="days"?ri(e,{weeks:1}):ri(e,{years:1})},Y1=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!0}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},io=e=>e.getFullYear().toString().padStart(4,"0"),oz=(e,t,n)=>e===void 0||n===void 0?!1:Y$(t,e)&&G$(t,n),iz=e=>{const t=St();return p.jsx(ze.tbody,{layout:!0,variants:W1,custom:e.direction,onKeyDown:e.onKeyDown,className:ke(e.styles?.week),children:e.zip.map((n,r)=>{const o=je.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return p.jsx("tr",{className:o,children:n.map(i=>{const a=i.toISOString(),s=e.rangeMode?a===e.range?.to?.toISOString()||a===e.range?.from?.toISOString():a===(e.date?ro(e.date).toISOString():void 0),l=Uj(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=qj(i,e.stateDate),d=!u||c,h=e.rangeMode?oz(e.range?.from,i,e.range?.to):!1;return p.jsxs("td",{align:"center",className:ke("relative",je.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[p.jsxs("button",{type:"button","data-date":a,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:ke(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",je.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?p.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:p.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?p.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:p.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?p.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},az=()=>ro(new Date),G1=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:h="date",datetimeTitle:g,...v})=>{const m=S.useRef(Ao()),f=St(),y=lp(o),b=S.useRef(null),{date:x,range:k}=v,T=x||new Date,P=S.useRef(null),[w,E]=sf({date:T,isAnimating:!1,year:io(T),direction:void 0,range:{from:k?.from,to:k?.to},months:rz(m.current,T,y),selectMode:l?"from":void 0,week:C1({start:Wn(T),end:e$(T)})},M=>({onChangeYear:C=>({year:C}),onExitComplete:()=>(Y1(P.current||null,b,M.state().date,200),P.current=null,{isAnimating:!1}),date:C=>{const $=C(M.state().date);return{date:$,year:io($)}},nextMonth:C=>{C&&(P.current=C.currentTarget);const $=M.state();if($.isAnimating)return $;const L=ri($.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:io(L)}},previousMonth:C=>{C&&(P.current=C.currentTarget);const $=M.state();if($.isAnimating)return $;const L=Sa($.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:io(L)}},onSelectDate:C=>{const $=M.state(),L=C.currentTarget.dataset.range==="true",q=C.currentTarget.dataset.date||"",Y=new Date(q);return{date:Y,year:io(Y),selectMode:$.selectMode===void 0?void 0:$.selectMode==="from"?"to":"from",range:L?{from:$.selectMode==="from"?Y:$.range.from,to:$.selectMode==="to"?Y:$.range.to}:$.range}},onChangeMonth:C=>{const $=C.target.value,q=Array.from(C.target.options).find(R=>R.value===$),Y=M.state();if(q){const R=q.dataset.index||"",Z=new Date(M.state().date);return Z.setMonth(+R),{...Y,date:Z,year:io(Z)}}return Y},onKeyDown:C=>{const $=C.key,L=M.state();if($ in cp){($==="ArrowUp"||$==="ArrowDown")&&C.preventDefault();const q=M.state().date,Y=je.keyof(cp,$)?cp[$](q,C.shiftKey?"month":"days"):null;if(Y!==null)return Y1(C.target,b,Y),{...L,date:Y,year:io(Y)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,C,$)=>(($.method==="onChangeMonth"||$.method==="previousMonth"||$.method==="nextMonth")&&$.props.onChangeMonth?.(M.date),M),(M,C,$)=>($.method==="onChangeYear"&&$.props.onChangeYear?.(M.date),M),(M,C,$)=>{const L=$.method==="onSelectDate"||$.method==="setToday"||$.method==="onKeyDown";return l&&L&&t?(c?.(M.range),M):(L&&t&&c?.(M.date),M)}]}),A=nz(w.date),I=mv(A,7),D=w.date.toISOString(),F=U1(w.date,y);S.useEffect(()=>{t||c?.(w.date)},[D,t]);const j=Jj(M=>E.date(C=>Zj(new Date(C),+M)),1200),_=M=>{const C=M.currentTarget.value;E.onChangeYear(C),s?.(new Date(C)),j(C)},N=R1((M,C)=>(M.preventDefault(),C==="right"?E.previousMonth():E.nextMonth()),10),z=()=>{const M=az();E.date(()=>M),c?.(M)};return p.jsx(Wd,{transition:tz,children:p.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:N.onTouchEnd,onTouchStart:N.onTouchStart,className:ke("relative overflow-hidden",je.function(u?.calendar)?u?.calendar(A):u?.calendar),children:[p.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:p.jsx(Tn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:E.onExitComplete,children:p.jsxs(ze.div,{initial:"enter",animate:"middle",exit:"exit",children:[p.jsxs("header",{className:"relative flex justify-between",children:[p.jsx(ze.button,{layout:!0,type:"button","data-focustrap":"prev",variants:q1,onClick:E.previousMonth,title:f.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:p.jsx(Vk,{className:"h-4 w-4"})}),p.jsx(ze.span,{layout:!0,variants:W1,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:p.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[p.jsx("select",{value:F,onChange:E.onChangeMonth,"aria-label":f.calendarMonthLabel,style:{width:`${F.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),p.jsx(_m,{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"})]})}),p.jsx(ze.button,{layout:!0,type:"button","data-focustrap":"next",variants:q1,onClick:E.nextMonth,title:f.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:p.jsx(Nc,{className:"h-4 w-4"})}),p.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%)"}})]}),p.jsxs(ze.table,{className:"mt-2 table min-w-full table-auto border-0",children:[p.jsx("thead",{children:p.jsx("tr",{children:w.week.map(M=>p.jsx("th",{role:"columnheader",className:ke("py-2 text-sm font-medium capitalize",je.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(y,{weekday:"short"})},M.toString()))})}),p.jsx(iz,{zip:I,range:k,styles:u,date:x||null,dispatch:E,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:E.onKeyDown})]})]},F)})}),h==="datetime"?p.jsx("section",{className:"grid items-center my-4",children:p.jsx(Io,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?ip(x,"HH:mm"):void 0,title:g||f.calendarDatetimeTitle,onChange:M=>{const C=M.target.value,$=ez.exec(C);if(!$)return;const L=$.groups.hour,q=$.groups.min,Y=Kj(w.date,{hours:Number(L),minutes:Number(q),seconds:0});E.date(()=>Y),c?.(Y)}})}):null,p.jsx("footer",{className:"mt-2 text-center text-primary",children:p.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:f.calendarToday})})]})})},sz=e=>p.jsxs(eI,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:ke("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[p.jsx(tI,{style:{transform:je.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:ke("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),je.number(e.percent)?p.jsx("p",{className:ke("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]}),vl=e=>p.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[p.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),p.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});vl.Icon=function(t){return p.jsx("header",{...t,className:ke("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},vl.Body=function(t){return p.jsx(en,{...t,className:ke("min-w-0 flex-1",t.className),children:t.children})},vl.Right=function(t){return p.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:p.jsx(en,{...t,type:"button"})})};const lz=e=>p.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),cz=e=>p.jsx(ze.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),K1=new Date(1970,11,31),up={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},Z1={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},uz={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")},dp=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},dz={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},fz={day:"numeric",month:"numeric",year:"numeric"},pz=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:a=!0,type:s,...l},c)=>{const u=lp(t),d=S.useId(),h=St(),g=S.useMemo(()=>new Intl.DateTimeFormat(u,s==="datetime"?dz:fz),[u,s]),[v,m]=S.useState(e||void 0),[f,y]=S.useState(!1),b=dp(g,K1).flatMap(F=>je.keyof(up,F.type)?up[F.type](F.value):[]),x=S.useMemo(()=>dp(g,K1).reduce((F,j)=>F+(je.keyof(Z1,j.type)?Z1[j.type](j.value):""),""),[g]),k=e?.toISOString(),[T,P]=S.useState(v?dp(g,v).reduce((F,j)=>F+(je.keyof(up,j.type)?uz[j.type](v,j.value):""),""):""),w=F=>{const j=F.target.value;if(P(j),b.length===j.length&&b.every((N,z)=>{const M=j.charAt(z);return typeof N=="string"?M===N:N.test(M)})){const N=Hj(j,x,new Date),z=s==="datetime"?N:ro(N);return m(z),r?.(z)}return m(void 0),r?.(void 0)};S.useEffect(()=>{ml(e)&&(m(e),P(ip(e,x)))},[k,x]);const E=F=>(m(F),r?.(F),i&&y(!1),P(F?ip(F,x):"")),A=ml(v),I=A?v.toISOString():void 0,D=p.jsx(G1,{...l,type:s,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:E,disabledDate:n,date:A?v:void 0});return p.jsx(S.Fragment,{children:p.jsx(Io,{...l,mask:b,value:T,id:void 0,name:void 0,"data-value":I,formNoValidate:!f,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:f?void 0:l.error,placeholder:l.placeholder||h.datepickerPlaceholder(x),right:a?p.jsxs(S.Fragment,{children:[p.jsx("input",{"data-origin":l.name,defaultValue:I,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),p.jsx(ei,{open:f,onChange:y,buttonProps:{"aria-describedby":d},trigger:p.jsxs("span",{"aria-labelledby":d,children:[p.jsx("span",{id:d,className:"sr-only",children:h.datePickerCalendarButtonLabel}),p.jsx(Lk,{})]}),children:D})]}):null})})}),hz=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],mz=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],gz=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],vz=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],X1=(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},Q1=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},yz=e=>typeof e=="number"?Math.log(e):Q1(e)*Math.log(10),bz=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},J1=(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},xz=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 wz(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?vz:gz:t.binary?mz:hz,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return J1(c,t.fixedWidth)}const i=e<0,a=i?"-":t.signed?"+":"";i&&(e=-e);const s=xz(t);let l;if(e<1){const c=X1(e,t.locale,s);l=a+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?yz(e)/Math.log(1024):Q1(e)/3),n.length-1);if(e=bz(e,(t.binary?1024:1e3)**c),!s){const h=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(h)}const u=X1(Number(e),t.locale,s),d=n[c];l=a+u+r+d}return J1(l,t.fixedWidth)}var yl={exports:{}},bl={exports:{}},Je={};var eS;function Sz(){if(eS)return Je;eS=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,a=e?Symbol.for("react.provider"):60109,s=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,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(T){if(typeof T=="object"&&T!==null){var P=T.$$typeof;switch(P){case t:switch(T=T.type,T){case l:case c:case r:case i:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case s:case u:case v:case g:case a:return T;default:return P}}case n:return P}}}function k(T){return x(T)===c}return Je.AsyncMode=l,Je.ConcurrentMode=c,Je.ContextConsumer=s,Je.ContextProvider=a,Je.Element=t,Je.ForwardRef=u,Je.Fragment=r,Je.Lazy=v,Je.Memo=g,Je.Portal=n,Je.Profiler=i,Je.StrictMode=o,Je.Suspense=d,Je.isAsyncMode=function(T){return k(T)||x(T)===l},Je.isConcurrentMode=k,Je.isContextConsumer=function(T){return x(T)===s},Je.isContextProvider=function(T){return x(T)===a},Je.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Je.isForwardRef=function(T){return x(T)===u},Je.isFragment=function(T){return x(T)===r},Je.isLazy=function(T){return x(T)===v},Je.isMemo=function(T){return x(T)===g},Je.isPortal=function(T){return x(T)===n},Je.isProfiler=function(T){return x(T)===i},Je.isStrictMode=function(T){return x(T)===o},Je.isSuspense=function(T){return x(T)===d},Je.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===h||typeof T=="object"&&T!==null&&(T.$$typeof===v||T.$$typeof===g||T.$$typeof===a||T.$$typeof===s||T.$$typeof===u||T.$$typeof===f||T.$$typeof===y||T.$$typeof===b||T.$$typeof===m)},Je.typeOf=x,Je}var et={};var tS;function Tz(){return tS||(tS=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,a=e?Symbol.for("react.provider"):60109,s=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,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===h||typeof B=="object"&&B!==null&&(B.$$typeof===v||B.$$typeof===g||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===f||B.$$typeof===y||B.$$typeof===b||B.$$typeof===m)}function k(B){if(typeof B=="object"&&B!==null){var oe=B.$$typeof;switch(oe){case t:var ae=B.type;switch(ae){case l:case c:case r:case i:case o:case d:return ae;default:var ue=ae&&ae.$$typeof;switch(ue){case s:case u:case v:case g:case a:return ue;default:return oe}}case n:return oe}}}var T=l,P=c,w=s,E=a,A=t,I=u,D=r,F=v,j=g,_=n,N=i,z=o,M=d,C=!1;function $(B){return C||(C=!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.")),L(B)||k(B)===l}function L(B){return k(B)===c}function q(B){return k(B)===s}function Y(B){return k(B)===a}function R(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function Z(B){return k(B)===u}function te(B){return k(B)===r}function ne(B){return k(B)===v}function ee(B){return k(B)===g}function H(B){return k(B)===n}function K(B){return k(B)===i}function X(B){return k(B)===o}function ie(B){return k(B)===d}et.AsyncMode=T,et.ConcurrentMode=P,et.ContextConsumer=w,et.ContextProvider=E,et.Element=A,et.ForwardRef=I,et.Fragment=D,et.Lazy=F,et.Memo=j,et.Portal=_,et.Profiler=N,et.StrictMode=z,et.Suspense=M,et.isAsyncMode=$,et.isConcurrentMode=L,et.isContextConsumer=q,et.isContextProvider=Y,et.isElement=R,et.isForwardRef=Z,et.isFragment=te,et.isLazy=ne,et.isMemo=ee,et.isPortal=H,et.isProfiler=K,et.isStrictMode=X,et.isSuspense=ie,et.isValidElementType=x,et.typeOf=k})()),et}var nS;function rS(){return nS||(nS=1,process.env.NODE_ENV==="production"?bl.exports=Sz():bl.exports=Tz()),bl.exports}var fp,oS;function Ez(){if(oS)return fp;oS=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 a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[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 fp=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var h=0;h<c.length;h++)n.call(s,c[h])&&(l[c[h]]=s[c[h]])}}return l},fp}var pp,iS;function hp(){if(iS)return pp;iS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return pp=e,pp}var mp,aS;function sS(){return aS||(aS=1,mp=Function.call.bind(Object.prototype.hasOwnProperty)),mp}var gp,lS;function kz(){if(lS)return gp;lS=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=hp(),n={},r=sS();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,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 h=Error((l||"React class")+": "+s+" 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 h.name="Invariant Violation",h}d=i[u](a,u,l,s,null,t)}catch(v){d=v}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+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 g=c?c():"";e("Failed "+s+" type: "+d.message+(g??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},gp=o,gp}var vp,cS;function Cz(){if(cS)return vp;cS=1;var e=rS(),t=Ez(),n=hp(),r=sS(),o=kz(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return vp=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(L){var q=L&&(c&&L[c]||L[u]);if(typeof q=="function")return q}var h="<<anonymous>>",g={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:k(),elementType:T(),instanceOf:P,node:I(),objectOf:E,oneOf:w,oneOfType:A,shape:F,exact:j};function v(L,q){return L===q?L!==0||1/L===1/q:L!==L&&q!==q}function m(L,q){this.message=L,this.data=q&&typeof q=="object"?q:{},this.stack=""}m.prototype=Error.prototype;function f(L){if(process.env.NODE_ENV!=="production")var q={},Y=0;function R(te,ne,ee,H,K,X,ie){if(H=H||h,X=X||ee,ie!==n){if(l){var B=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 B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=H+":"+ee;!q[oe]&&Y<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+H+"`. 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."),q[oe]=!0,Y++)}}return ne[ee]==null?te?ne[ee]===null?new m("The "+K+" `"+X+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new m("The "+K+" `"+X+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:L(ne,ee,H,K,X)}var Z=R.bind(null,!1);return Z.isRequired=R.bind(null,!0),Z}function y(L){function q(Y,R,Z,te,ne,ee){var H=Y[R],K=z(H);if(K!==L){var X=M(H);return new m("Invalid "+te+" `"+ne+"` of type "+("`"+X+"` supplied to `"+Z+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return f(q)}function b(){return f(a)}function x(L){function q(Y,R,Z,te,ne){if(typeof L!="function")return new m("Property `"+ne+"` of component `"+Z+"` has invalid PropType notation inside arrayOf.");var ee=Y[R];if(!Array.isArray(ee)){var H=z(ee);return new m("Invalid "+te+" `"+ne+"` of type "+("`"+H+"` supplied to `"+Z+"`, expected an array."))}for(var K=0;K<ee.length;K++){var X=L(ee,K,Z,te,ne+"["+K+"]",n);if(X instanceof Error)return X}return null}return f(q)}function k(){function L(q,Y,R,Z,te){var ne=q[Y];if(!s(ne)){var ee=z(ne);return new m("Invalid "+Z+" `"+te+"` of type "+("`"+ee+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return f(L)}function T(){function L(q,Y,R,Z,te){var ne=q[Y];if(!e.isValidElementType(ne)){var ee=z(ne);return new m("Invalid "+Z+" `"+te+"` of type "+("`"+ee+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return f(L)}function P(L){function q(Y,R,Z,te,ne){if(!(Y[R]instanceof L)){var ee=L.name||h,H=$(Y[R]);return new m("Invalid "+te+" `"+ne+"` of type "+("`"+H+"` supplied to `"+Z+"`, expected ")+("instance of `"+ee+"`."))}return null}return f(q)}function w(L){if(!Array.isArray(L))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.")),a;function q(Y,R,Z,te,ne){for(var ee=Y[R],H=0;H<L.length;H++)if(v(ee,L[H]))return null;var K=JSON.stringify(L,function(ie,B){var oe=M(B);return oe==="symbol"?String(B):B});return new m("Invalid "+te+" `"+ne+"` of value `"+String(ee)+"` "+("supplied to `"+Z+"`, expected one of "+K+"."))}return f(q)}function E(L){function q(Y,R,Z,te,ne){if(typeof L!="function")return new m("Property `"+ne+"` of component `"+Z+"` has invalid PropType notation inside objectOf.");var ee=Y[R],H=z(ee);if(H!=="object")return new m("Invalid "+te+" `"+ne+"` of type "+("`"+H+"` supplied to `"+Z+"`, expected an object."));for(var K in ee)if(r(ee,K)){var X=L(ee,K,Z,te,ne+"."+K,n);if(X instanceof Error)return X}return null}return f(q)}function A(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var q=0;q<L.length;q++){var Y=L[q];if(typeof Y!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(Y)+" at index "+q+"."),a}function R(Z,te,ne,ee,H){for(var K=[],X=0;X<L.length;X++){var ie=L[X],B=ie(Z,te,ne,ee,H,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&K.push(B.data.expectedType)}var oe=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new m("Invalid "+ee+" `"+H+"` supplied to "+("`"+ne+"`"+oe+"."))}return f(R)}function I(){function L(q,Y,R,Z,te){return _(q[Y])?null:new m("Invalid "+Z+" `"+te+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return f(L)}function D(L,q,Y,R,Z){return new m((L||"React class")+": "+q+" type `"+Y+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Z+"`.")}function F(L){function q(Y,R,Z,te,ne){var ee=Y[R],H=z(ee);if(H!=="object")return new m("Invalid "+te+" `"+ne+"` of type `"+H+"` "+("supplied to `"+Z+"`, expected `object`."));for(var K in L){var X=L[K];if(typeof X!="function")return D(Z,te,ne,K,M(X));var ie=X(ee,K,Z,te,ne+"."+K,n);if(ie)return ie}return null}return f(q)}function j(L){function q(Y,R,Z,te,ne){var ee=Y[R],H=z(ee);if(H!=="object")return new m("Invalid "+te+" `"+ne+"` of type `"+H+"` "+("supplied to `"+Z+"`, expected `object`."));var K=t({},Y[R],L);for(var X in K){var ie=L[X];if(r(L,X)&&typeof ie!="function")return D(Z,te,ne,X,M(ie));if(!ie)return new m("Invalid "+te+" `"+ne+"` key `"+X+"` supplied to `"+Z+"`.\nBad object: "+JSON.stringify(Y[R],null," ")+`
19
+ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var B=ie(ee,X,Z,te,ne+"."+X,n);if(B)return B}return null}return f(q)}function _(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(_);if(L===null||s(L))return!0;var q=d(L);if(q){var Y=q.call(L),R;if(q!==L.entries){for(;!(R=Y.next()).done;)if(!_(R.value))return!1}else for(;!(R=Y.next()).done;){var Z=R.value;if(Z&&!_(Z[1]))return!1}}else return!1;return!0;default:return!1}}function N(L,q){return L==="symbol"?!0:q?q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&q instanceof Symbol:!1}function z(L){var q=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":N(q,L)?"symbol":q}function M(L){if(typeof L>"u"||L===null)return""+L;var q=z(L);if(q==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return q}function C(L){var q=M(L);switch(q){case"array":case"object":return"an "+q;case"boolean":case"date":case"regexp":return"a "+q;default:return q}}function $(L){return!L.constructor||!L.constructor.name?h:L.constructor.name}return g.checkPropTypes=o,g.resetWarningCache=o.resetWarningCache,g.PropTypes=g,g},vp}var yp,uS;function Pz(){if(uS)return yp;uS=1;var e=hp();function t(){}function n(){}return n.resetWarningCache=t,yp=function(){function r(a,s,l,c,u,d){if(d!==e){var h=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 h.name="Invariant Violation",h}}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},yp}var dS;function Az(){if(dS)return yl.exports;if(dS=1,process.env.NODE_ENV!=="production"){var e=rS(),t=!0;yl.exports=Cz()(e.isElement,t)}else yl.exports=Pz()();return yl.exports}var Iz=Az();const lt=nh(Iz),_z=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 ai(e,t,n){const r=Oz(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&fS(r,"path",i),fS(r,"relativePath",i),r}function Oz(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=_z.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function fS(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Mz=[".DS_Store","Thumbs.db"];function Dz(e){return Ur(this,void 0,void 0,function*(){return xl(e)&&Nz(e.dataTransfer)?$z(e.dataTransfer,e.type):Fz(e)?Lz(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Vz(e):[]})}function Nz(e){return xl(e)}function Fz(e){return xl(e)&&xl(e.target)}function xl(e){return typeof e=="object"&&e!==null}function Lz(e){return bp(e.target.files).map(t=>ai(t))}function Vz(e){return Ur(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ai(n))})}function $z(e,t){return Ur(this,void 0,void 0,function*(){if(e.items){const n=bp(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(jz));return pS(hS(r))}return pS(bp(e.files).map(n=>ai(n)))})}function pS(e){return e.filter(t=>Mz.indexOf(t.name)===-1)}function bp(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 jz(e){if(typeof e.webkitGetAsEntry!="function")return mS(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?gS(t):mS(e,t)}function hS(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?hS(n):[n]],[])}function mS(e,t){return Ur(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 a=yield i.getFile();return a.handle=i,ai(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ai(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function zz(e){return Ur(this,void 0,void 0,function*(){return e.isDirectory?gS(e):Bz(e)})}function gS(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>Ur(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(zz));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function Bz(e){return Ur(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ai(r,e.fullPath);t(o)},r=>{n(r)})})})}var wl={},vS;function Rz(){return vS||(vS=1,wl.__esModule=!0,wl.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(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),wl}var Hz=Rz();const xp=nh(Hz);function yS(e){return Uz(e)||qz(e)||SS(e)||Wz()}function Wz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Uz(e){if(Array.isArray(e))return wp(e)}function bS(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 xS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bS(Object(n),!0).forEach(function(r){wS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ta(e,t){return Kz(e)||Gz(e,t)||SS(e,t)||Yz()}function Yz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SS(e,t){if(e){if(typeof e=="string")return wp(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 wp(e,t)}}function wp(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 Gz(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Kz(e){if(Array.isArray(e))return e}var Zz=typeof xp=="function"?xp:xp.default,Xz="file-invalid-type",Qz="file-too-large",Jz="file-too-small",eB="too-many-files",tB=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:Xz,message:"File type must be ".concat(r)}},TS=function(t){return{code:Qz,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ES=function(t){return{code:Jz,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},nB={code:eB,message:"Too many files"};function kS(e,t){var n=e.type==="application/x-moz-file"||Zz(e,t);return[n,n?null:tB(t)]}function CS(e,t,n){if(ao(e.size))if(ao(t)&&ao(n)){if(e.size>n)return[!1,TS(n)];if(e.size<t)return[!1,ES(t)]}else{if(ao(t)&&e.size<t)return[!1,ES(t)];if(ao(n)&&e.size>n)return[!1,TS(n)]}return[!0,null]}function ao(e){return e!=null}function rB(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=kS(l,n),u=Ta(c,1),d=u[0],h=CS(l,r,o),g=Ta(h,1),v=g[0],m=s?s(l):null;return d&&v&&!m})}function Sl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Tl(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 PS(e){e.preventDefault()}function oB(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function iB(e){return e.indexOf("Edge/")!==-1}function aB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return oB(e)||iB(e)}function Yn(){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),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!Sl(r)&&s&&s.apply(void 0,[r].concat(i)),Sl(r)})}}function sB(){return"showOpenFilePicker"in window}function lB(e){if(ao(e)){var t=Object.entries(e).filter(function(n){var r=Ta(n,2),o=r[0],i=r[1],a=!0;return AS(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.')),a=!1),(!Array.isArray(i)||!i.every(IS))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=Ta(r,2),i=o[0],a=o[1];return xS(xS({},n),{},wS({},i,a))},{});return[{description:"Files",accept:t}]}return e}function cB(e){if(ao(e))return Object.entries(e).reduce(function(t,n){var r=Ta(n,2),o=r[0],i=r[1];return[].concat(yS(t),[o],yS(i))},[]).filter(function(t){return AS(t)||IS(t)}).join(",")}function uB(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function dB(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function AS(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function IS(e){return/^.*\.[\w]+$/.test(e)}var fB=["children"],pB=["open"],hB=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],mB=["refKey","onChange","onClick"];function gB(e){return bB(e)||yB(e)||_S(e)||vB()}function vB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bB(e){if(Array.isArray(e))return Tp(e)}function Sp(e,t){return SB(e)||wB(e,t)||_S(e,t)||xB()}function xB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
23
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _S(e,t){if(e){if(typeof e=="string")return Tp(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 Tp(e,t)}}function Tp(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 wB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function SB(e){if(Array.isArray(e))return e}function OS(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 yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OS(Object(n),!0).forEach(function(r){Ep(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ep(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function El(e,t){if(e==null)return{};var n=TB(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 TB(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 kp=S.forwardRef(function(e,t){var n=e.children,r=El(e,fB),o=DS(r),i=o.open,a=El(o,pB);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(yt(yt({},a),{},{open:i})))});kp.displayName="Dropzone";var MS={disabled:!1,getFilesFromEvent:Dz,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};kp.defaultProps=MS,kp.propTypes={children:lt.func,accept:lt.objectOf(lt.arrayOf(lt.string)),multiple:lt.bool,preventDropOnDocument:lt.bool,noClick:lt.bool,noKeyboard:lt.bool,noDrag:lt.bool,noDragEventsBubbling:lt.bool,minSize:lt.number,maxSize:lt.number,maxFiles:lt.number,disabled:lt.bool,getFilesFromEvent:lt.func,onFileDialogCancel:lt.func,onFileDialogOpen:lt.func,useFsAccessApi:lt.bool,autoFocus:lt.bool,onDragEnter:lt.func,onDragLeave:lt.func,onDragOver:lt.func,onDrop:lt.func,onDropAccepted:lt.func,onDropRejected:lt.func,onError:lt.func,validator:lt.func};var Cp={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function DS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=yt(yt({},MS),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,h=t.onDrop,g=t.onDropAccepted,v=t.onDropRejected,m=t.onFileDialogCancel,f=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,k=t.noClick,T=t.noKeyboard,P=t.noDrag,w=t.noDragEventsBubbling,E=t.onError,A=t.validator,I=S.useMemo(function(){return cB(n)},[n]),D=S.useMemo(function(){return lB(n)},[n]),F=S.useMemo(function(){return typeof f=="function"?f:NS},[f]),j=S.useMemo(function(){return typeof m=="function"?m:NS},[m]),_=S.useRef(null),N=S.useRef(null),z=S.useReducer(EB,Cp),M=Sp(z,2),C=M[0],$=M[1],L=C.isFocused,q=C.isFileDialogActive,Y=S.useRef(typeof window<"u"&&window.isSecureContext&&y&&sB()),R=function(){!Y.current&&q&&setTimeout(function(){if(N.current){var Q=N.current.files;Q.length||($({type:"closeDialog"}),j())}},300)};S.useEffect(function(){return window.addEventListener("focus",R,!1),function(){window.removeEventListener("focus",R,!1)}},[N,q,j,Y]);var Z=S.useRef([]),te=function(Q){_.current&&_.current.contains(Q.target)||(Q.preventDefault(),Z.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",PS,!1),document.addEventListener("drop",te,!1)),function(){x&&(document.removeEventListener("dragover",PS),document.removeEventListener("drop",te))}},[_,x]),S.useEffect(function(){return!r&&b&&_.current&&_.current.focus(),function(){}},[_,b,r]);var ne=S.useCallback(function(V){E?E(V):console.error(V)},[E]),ee=S.useCallback(function(V){V.preventDefault(),V.persist(),ve(V),Z.current=[].concat(gB(Z.current),[V.target]),Tl(V)&&Promise.resolve(o(V)).then(function(Q){if(!(Sl(V)&&!w)){var de=Q.length,Ee=de>0&&rB({files:Q,accept:I,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:A}),Le=de>0&&!Ee;$({isDragAccept:Ee,isDragReject:Le,isDragActive:!0,type:"setDraggedFiles"}),c&&c(V)}}).catch(function(Q){return ne(Q)})},[o,c,ne,w,I,a,i,s,l,A]),H=S.useCallback(function(V){V.preventDefault(),V.persist(),ve(V);var Q=Tl(V);if(Q&&V.dataTransfer)try{V.dataTransfer.dropEffect="copy"}catch{}return Q&&d&&d(V),!1},[d,w]),K=S.useCallback(function(V){V.preventDefault(),V.persist(),ve(V);var Q=Z.current.filter(function(Ee){return _.current&&_.current.contains(Ee)}),de=Q.indexOf(V.target);de!==-1&&Q.splice(de,1),Z.current=Q,!(Q.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Tl(V)&&u&&u(V))},[_,u,w]),X=S.useCallback(function(V,Q){var de=[],Ee=[];V.forEach(function(Le){var Ze=kS(Le,I),Lt=Sp(Ze,2),xt=Lt[0],Kt=Lt[1],Kn=CS(Le,a,i),In=Sp(Kn,2),_n=In[0],W=In[1],G=A?A(Le):null;if(xt&&_n&&!G)de.push(Le);else{var Ve=[Kt,W];G&&(Ve=Ve.concat(G)),Ee.push({file:Le,errors:Ve.filter(function(tt){return tt})})}}),(!s&&de.length>1||s&&l>=1&&de.length>l)&&(de.forEach(function(Le){Ee.push({file:Le,errors:[nB]})}),de.splice(0)),$({acceptedFiles:de,fileRejections:Ee,isDragReject:Ee.length>0,type:"setFiles"}),h&&h(de,Ee,Q),Ee.length>0&&v&&v(Ee,Q),de.length>0&&g&&g(de,Q)},[$,s,I,a,i,l,h,g,v,A]),ie=S.useCallback(function(V){V.preventDefault(),V.persist(),ve(V),Z.current=[],Tl(V)&&Promise.resolve(o(V)).then(function(Q){Sl(V)&&!w||X(Q,V)}).catch(function(Q){return ne(Q)}),$({type:"reset"})},[o,X,ne,w]),B=S.useCallback(function(){if(Y.current){$({type:"openDialog"}),F();var V={multiple:s,types:D};window.showOpenFilePicker(V).then(function(Q){return o(Q)}).then(function(Q){X(Q,null),$({type:"closeDialog"})}).catch(function(Q){uB(Q)?(j(Q),$({type:"closeDialog"})):dB(Q)?(Y.current=!1,N.current?(N.current.value=null,N.current.click()):ne(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."))):ne(Q)});return}N.current&&($({type:"openDialog"}),F(),N.current.value=null,N.current.click())},[$,F,j,y,X,ne,D,s]),oe=S.useCallback(function(V){!_.current||!_.current.isEqualNode(V.target)||(V.key===" "||V.key==="Enter"||V.keyCode===32||V.keyCode===13)&&(V.preventDefault(),B())},[_,B]),ae=S.useCallback(function(){$({type:"focus"})},[]),ue=S.useCallback(function(){$({type:"blur"})},[]),pe=S.useCallback(function(){k||(aB()?setTimeout(B,0):B())},[k,B]),se=function(Q){return r?null:Q},ge=function(Q){return T?null:se(Q)},Ae=function(Q){return P?null:se(Q)},ve=function(Q){w&&Q.stopPropagation()},Re=S.useMemo(function(){return function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=V.refKey,de=Q===void 0?"ref":Q,Ee=V.role,Le=V.onKeyDown,Ze=V.onFocus,Lt=V.onBlur,xt=V.onClick,Kt=V.onDragEnter,Kn=V.onDragOver,In=V.onDragLeave,_n=V.onDrop,W=El(V,hB);return yt(yt(Ep({onKeyDown:ge(Yn(Le,oe)),onFocus:ge(Yn(Ze,ae)),onBlur:ge(Yn(Lt,ue)),onClick:se(Yn(xt,pe)),onDragEnter:Ae(Yn(Kt,ee)),onDragOver:Ae(Yn(Kn,H)),onDragLeave:Ae(Yn(In,K)),onDrop:Ae(Yn(_n,ie)),role:typeof Ee=="string"&&Ee!==""?Ee:"presentation"},de,_),!r&&!T?{tabIndex:0}:{}),W)}},[_,oe,ae,ue,pe,ee,H,K,ie,T,P,r]),fe=S.useCallback(function(V){V.stopPropagation()},[]),U=S.useMemo(function(){return function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=V.refKey,de=Q===void 0?"ref":Q,Ee=V.onChange,Le=V.onClick,Ze=El(V,mB),Lt=Ep({accept:I,multiple:s,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:se(Yn(Ee,ie)),onClick:se(Yn(Le,fe)),tabIndex:-1},de,N);return yt(yt({},Lt),Ze)}},[N,n,s,ie,r]);return yt(yt({},C),{},{isFocused:L&&!r,getRootProps:Re,getInputProps:U,rootRef:_,inputRef:N,open:se(B)})}function EB(e,t){switch(t.type){case"focus":return yt(yt({},e),{},{isFocused:!0});case"blur":return yt(yt({},e),{},{isFocused:!1});case"openDialog":return yt(yt({},Cp),{},{isFileDialogActive:!0});case"closeDialog":return yt(yt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return yt(yt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return yt(yt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return yt({},Cp);default:return e}}function NS(){}const FS=S.createContext([null,()=>{}]),kB=()=>S.useContext(FS),CB=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,PB={csv:Vc,xls:Vc,mov:Lm,mp4:Lm,xlsx:Vc,pdf:Fm,txt:Fm,json:zk,mp3:Fk},AB=e=>{const[,t]=kB(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:CB(l),size:wz(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)},a=PB[e.file.name.split(".").at(-1)]??Vm,s=n.type==="img"?p.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):p.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return p.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[p.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),p.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[p.jsx("span",{children:e.file.name}),p.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?p.jsx("div",{className:"flex-1 min-w-full",children:p.jsx(e.File,{file:e.file})}):null]}),p.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:p.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:p.jsx(vo,{size:16})})})]})},IB=e=>p.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>p.jsx(AB,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),LS=e=>{const t=St(),n=e.dragging?Bk:Rk;return p.jsxs("div",{className:"flex flex-col justify-center items-center",children:[p.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:p.jsx(n,{className:"text-primary",size:80})}),p.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[p.jsx("p",{children:t.uploadIdle}),p.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},_B=e=>e.isDragActive?p.jsx(LS,{files:e.files,dragging:!0}):e.files.length>0?p.jsx(IB,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):p.jsx(S.Fragment,{children:e.idle}),OB=p.jsx(LS,{dragging:!1}),MB=e=>{const t=e.item.file,n=e.item.type;return p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),p.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?p.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?p.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?p.jsx("figure",{children:p.jsx("audio",{controls:!0,src:e.item.url})}):null]})},DB=({idle:e=OB,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=St(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=m=>{r?.(m),l(f=>f.concat(m))},{getRootProps:h,getInputProps:g,isDragActive:v}=DS({onDrop:d});return p.jsxs(FS.Provider,{value:a,children:[p.jsx(ep,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?p.jsx(MB,{item:a[0]}):null}),p.jsxs("div",{...h(),"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:[p.jsx("input",{...g(o),name:o.name,id:o.name}),p.jsx(_B,{File:n,onDeleteFile:t,isDragActive:v,idle:e,files:c})]})]})},VS=()=>window.matchMedia("@media (pointer: coarse)"),NB=()=>{const e=S.useRef(yr()?null:VS()),[t,n]=S.useState(yr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?VS():e.current).addEventListener("change",o=>n(o.matches))},[]),t},$S=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=NB(),o=S.useRef(yr()?"":document.documentElement.style.overflowY);return S.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||gv())return;document.documentElement.style.padding=ym(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(vE(c.style.height)):null,h=je.number(d)?d:u.height,g=c.scrollHeight<=h;return h===c.scrollHeight?e?l.preventDefault():void 0:g?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},FB=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},jS=(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},zS={basic:/[,[\]]+?/,extend:/[,[\].]+?/},BS=(e,t)=>{const n=jS(t,zS.basic,e);return n!==void 0&&n!==e?n:jS(t,zS.extend,e)},RS=e=>e.replace(/[^0-9]/g,""),kl=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),HS=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?RS(e).includes(RS(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?FB(e,t)!==null:!1,LB=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>HS(e,o,n,r)):HS(e,t,n,r),Pp=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:je.array(i.value)?i.value.map(kl):kl(`${i.value}`)}));return e.forEach(i=>{const a=BS(i,t);o.forEach(s=>{const l=BS(i,s.key);if(!l)return;const c=kl(`${s.value}`.toLocaleLowerCase()).trim(),u=kl(`${l}`.toLocaleLowerCase()).trim();if(LB(u,c,s.score,s.match))return void r.set(a,i);je.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},VB=e=>p.jsx(S.Fragment,{children:e.children}),$B={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},jB=[],zB=S.forwardRef(function(t,n){return p.jsx(ze.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg",children:p.jsx(Tn,{children:t.children})})}),BB=S.forwardRef(function({item:t,context:n,...r},o){return p.jsx(ze.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),RB={List:zB,Item:BB},si=40,HB=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:h=!1,required:g=!1,dynamicOption:v=!1,...m},f)=>{const y=S.useRef(null),b=S.useRef(null),x=S.useRef(null),k=m.value??m.defaultValue??"",T=St(),[P,w]=S.useState(()=>Math.min(320,si*o.length)),[E,A]=S.useState(!1),[I,D]=S.useState(""),[F,j]=S.useState(k),[_,N]=S.useState(()=>o.find(U=>U.value===k)?.label??k),[z,M]=S.useState(null),C=S.useRef(jB),$=$S(E,"block-only"),L=v&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,q=()=>uo.flushSync(()=>A(!0)),Y=I?Pp(L,"value",[{key:"value",value:I},{key:"label",value:I}]):L,R=()=>{A(!1),w(0)},Z=Y.filter(U=>U.hidden!==!0),te=v?void 0:`^(${o.map(U=>`${vu(U.value)}${U.label?"|"+vu(U.label):""}`).join("|")})$`,{x:ne,y:ee,strategy:H,refs:K,context:X}=tr({open:E,transform:!0,onOpenChange:A,placement:"bottom-start",whileElementsMounted:Eo,middleware:[Ai(4),Ag({padding:10,elementContext:"reference",apply(U){const Q=U.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,de=xi(K.reference.current,window.innerHeight),Ee=Math.min(Q<si?de:Q,de,U.availableHeight),Le=Z.length===0?si:Math.min(Ee,de,Q),Ze=`${b.current.getBoundingClientRect().width}px`;Object.assign(U.elements.floating.style,{width:Ze,maxWidth:Ze,height:Le})}})]}),ie=lv(X,$B),{getReferenceProps:B,getFloatingProps:oe,getItemProps:ae}=nr([vr(X,{role:"listbox"}),gr(X),bs(X,{cols:0,listRef:C,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(m.value){const U=o.find(V=>V.value===m.value);U&&(N(U.label??U.value),j(m.value))}},[m.value,o.length]),S.useEffect(()=>{if(!E)return w(0);const U=K.reference;if(U.current===null)return;const V=xi(U.current,window.innerHeight);setTimeout(()=>w(Math.min(V,Z.length*si)),100)},[I,E,K.reference,Z.length]),S.useEffect(()=>{const U=K.reference.current;if(U)return bi(U)},[]);const ue=(U,V)=>{j(U.value);const Q=K.reference.current;if(!Q)return;Q?.setAttribute("data-value",U.value),Q.value=U.value;const de=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(de),m.onChange&&m.onChange(de),N(U.label??""),R(),D(""),M(V)},pe=U=>{const V=U.target.value;return D(V),!E&&V===""?A(!0):(U.target.name=m.name||"",V?A(!0):m.onChange?.(U))},se=()=>{q(),D(""),K.reference.current?.focus()},ge=()=>{M(U=>U===null?0:U),q(),D("")},Ae=()=>{K.reference.current?.setAttribute("data-value",""),D(""),j(""),N(""),vm(K.reference.current),R()},ve=m.id||m.name,Re=`${ve}-shadow`,fe=Z.length===0;return p.jsxs(Di,{...m,left:e,error:t,ref:b,form:m.form,loading:r,name:m.name,feedback:d,hideLeft:h,required:g,title:m.title,container:i,rightLabel:a,interactive:s,id:Re,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:p.jsxs("span",{className:"flex items-center gap-0.5",children:[n,p.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:se,children:[p.jsx(Dc,{size:20}),p.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),F?p.jsx("button",{type:"button",onClick:Ae,className:"p-2 transition-colors link:text-danger md:p-1",children:p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.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:[p.jsx("input",{"data-shadow":"true",...B({...m,onFocus:ge,pattern:te,onChange:pe,id:Re,name:Re,ref:K.setReference,onClick:U=>U.currentTarget.focus(),onKeyDown(U){if(U.key==="Escape")return U.currentTarget.blur(),R();if(E){if(U.key==="ArrowDown"){let V=je.number(z)?z+1:0;return V>Z.length-1&&(V=0),x.current?.scrollIntoView({index:V}),M(V)}if(U.key==="ArrowUp"){let V=je.number(z)?z-1:Z.length-1;return V<0&&(V=Z.length-1),x.current?.scrollIntoView({index:V}),M(V)}if(U.key==="Enter"){if(z!==null&&Z[z])return U.preventDefault(),ue(Z[z],z);if(Z.length===1)return U.preventDefault(),ue(Z[0],0)}}}}),"data-value":F,"data-error":!!t,"data-name":ve,"data-target":ve,required:g,value:E?I:o.length===0?"":_||F,"aria-autocomplete":"list",autoComplete:"off",className:ke("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)}),p.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:f,required:g,defaultValue:m.value||F||void 0}),p.jsx(hr,{preserveTabOrder:!0,children:E?p.jsx(Hr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:p.jsxs(ze.div,{...oe({ref:Xn($,K.setFloating),style:{...ie.styles,left:ne,top:ee??0,position:H,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:fe?"auto":P},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(!E)return w(0);const V=K.floating.current.querySelectorAll("li").item(0),Q=(V?V.getBoundingClientRect().height:si)*Z.length;return uo.flushSync(()=>w(Q+10))},children:[fe?p.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:p.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||T.autocompleteEmpty})}):null,p.jsx(Lf,{overscan:40,ref:x,hidden:fe,data:Z,defaultItemHeight:si,components:RB,scrollerRef:U=>{y.current=U},className:"max-h-full overscroll-contain rounded-lg border-floating bg-floating-background p-0 text-foreground",itemContent:(U,V)=>{const Q=V.Render??VB,de=F===V.value||F===V.label,Ee=z===U,Le=V.label??V.value;return p.jsx("button",{"data-value":V.value,...ae({ref:Ze=>{C.current[U]=Ze},role:"option",type:"button","aria-checked":de,"aria-current":de,"aria-selected":de,"aria-busy":V.disabled,onClick:()=>ue(V,U),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${de?"bg-primary-hover text-primary-foreground":""} ${Ee?"bg-floating-hover text-floating-foreground":""}`}),children:p.jsx(Q,{...m,label:V.label,value:V.value,children:Le})})}})]})}):null})]})});class An extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof An&&(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 An(this);return t?t(n):n}static from(t,n){return new An(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(An.from(t,n).values())}toArray(){return Array.from(this.values())}}const WS=40,WB=e=>p.jsx(S.Fragment,{children:e.children}),qB={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},qS=[],UB=S.forwardRef(function(t,n){return p.jsx(ze.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:p.jsx(Tn,{children:t.children})})}),YB=S.forwardRef(function({item:t,context:n,...r},o){return p.jsx(ze.li,{...r,ref:o,className:"last:rounded-t-lg"})}),GB={List:UB,Item:YB},KB=e=>{const t=St(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const a=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>a.width)return i(!0)},[r]),p.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?p.jsxs(Da,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},ZB=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:h=!1,required:g=!1,dynamicOption:v=!1,onChangeOptions:m,...f},y)=>{const b=S.useMemo(()=>new An(r.map(U=>[U.value,U])),[r]),x=S.useRef(null),k=S.useRef(null),T=f.value??f.defaultValue??qS,P=St(),[w,E]=S.useState(0),[A,I]=S.useState(!1),[D,F]=S.useState(""),[j,_]=S.useState(()=>{const U=new An;return T.forEach(V=>{const Q=b.get(V);return Q?U.set(V,Q):void 0}),U}),N=S.useMemo(()=>Array.from(j.keys()),[j]),[z,M]=S.useState(()=>{const U=new Set(T);return r.reduce((V,Q)=>U.has(Q.value)?[...V,Q.label??Q.value]:V,[])??T}),[C,$]=S.useState(null),L=S.useRef(qS),q=v&&D!==""?[{value:D,label:D,"data-dynamic":"true"},...r]:r,Y=D.length===0?q:Pp(q,"value",[{key:"value",value:D},{key:"label",value:D}]),R=$S(A,"block-only"),Z=Y.filter(U=>U.hidden!==!0),te=Z.length===0,{x:ne,y:ee,strategy:H,refs:K,context:X}=tr({open:A,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:I,whileElementsMounted:Eo,middleware:[Ai(4),Ag({padding:10,elementContext:"reference",apply(U){const Q=U.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,de=xi(K.reference.current,window.innerHeight),Ee=Math.min(Q<WS?de:Q,de,U.availableHeight),Le=Z.length===0?WS:Math.min(Ee,de,Q),Ze=`${x.current.getBoundingClientRect().width}px`;Object.assign(U.elements.floating.style,{width:Ze,maxWidth:Ze,height:Le})}})]}),ie=lv(X,qB),{getReferenceProps:B,getFloatingProps:oe,getItemProps:ae}=nr([vr(X,{role:"listbox"}),gr(X),bs(X,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:C,selectedIndex:C,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:U=>$(V=>U??V)})]);S.useEffect(()=>{if(!A)return E(0);const U=K.reference;if(U.current===null)return;const V=xi(U.current,window.innerHeight);setTimeout(()=>E(Math.min(V,Z.length*40)),100)},[D,A,K.reference]),S.useEffect(()=>{f.value&&_(new An(f.value.map(U=>[U,b.get(U)])))},[f.value,b]),S.useEffect(()=>{const U=K.reference.current;if(U)return bi(U)},[]);const ue=(U,V)=>{const Q=j.clone(Le=>Le.has(U.value)?Le.remove(U.value):Le.set(U.value,U));_(Q);const de=K.reference.current;if(!de)return;const Ee=Q.map(Le=>Le.value);de?.setAttribute("data-value",JSON.stringify(Ee)),m&&m(Ee),M(Le=>Le.concat(U.label??"")),F(""),$(V)},pe=U=>{const V=U.target.value;return F(V),!A&&V===""?I(!0):(U.target.name=f.name||"",V?I(!0):void 0)},se=()=>{I(!0),F(""),K.reference.current?.focus()},ge=()=>{I(!0),F("")},Ae=()=>{K.reference.current?.setAttribute("data-value","[]"),F(""),I(!1),_(new An),m?.([])},ve=f.id||f.name,Re=j.map((U,V)=>p.jsx(Da,{size:"small",icon:p.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),ue(U,V)},children:p.jsx(vo,{size:14})}),children:U.label??U.value},`MultiSelect-${U.value}-x`)),fe={height:te?"0":j.size===0?w-49:w-86};return p.jsxs(Di,{...f,left:e,error:t,ref:x,form:f.form,name:f.name,feedback:d,hideLeft:h,required:g,title:f.title,container:o,rightLabel:i,interactive:a,id:f.name||f.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:f.placeholder,right:p.jsxs("span",{className:"flex items-center gap-0.5",children:[n,p.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:se,children:[p.jsx(Dc,{size:20}),p.jsx("span",{className:"sr-only",children:P.inputCaretDown})]}),j?p.jsx("button",{type:"button",onClick:Ae,className:"transition-colors link:text-danger",children:p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.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:[p.jsxs("ul",{...B({...f,onFocus:ge,id:`${ve}-shadow`,name:`${ve}-shadow`,ref:K.setReference}),tabIndex:0,role:"button","data-name":ve,"data-target":ve,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":N.join(","),className:ke("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",f.className),children:[N.length>0?null:p.jsx("li",{className:"text-input-placeholder",children:f.placeholder}),p.jsx(KB,{label:c,children:Re})]}),p.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:y,required:g,defaultValue:f.value||N||void 0}),p.jsx(hr,{preserveTabOrder:!0,children:A?p.jsx(fu,{lockScroll:!0,children:p.jsx(Hr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:p.jsxs("div",{...oe({ref:K.setFloating,style:{...ie.styles,top:ee??0,position:H,left:ne,height:w-(N.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:[p.jsx("input",{autoFocus:!0,value:D,onChange:pe,title:f.title,placeholder:P.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:U=>{if(U.key==="ArrowDown"){let V=C+1;return V>Z.length-1&&(V=0),k.current?.scrollIntoView({index:V}),$(V)}if(U.key==="ArrowUp"){let V=C-1;return V<0&&(V=Z.length-1),k.current?.scrollIntoView({index:V}),$(V)}if(U.key==="Escape")return U.currentTarget.blur(),I(!1);if(U.key==="Enter"){if(C!==null&&Z[C])return U.preventDefault(),ue(Z[C],C);if(Z.length===1)return U.preventDefault(),ue(Z[0],0)}}}),te?p.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:p.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||P.autocompleteEmpty})}):null,te?null:p.jsx(ze.div,{initial:!1,"data-floating":"true",ref:R,animate:{height:te?"auto":w},style:fe,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!A)return E(0);const V=K.floating.current.querySelectorAll("li").item(0),Q=(V?V.getBoundingClientRect().height:40)*Z.length;return uo.flushSync(()=>E(Q+2))},children:p.jsx(Lf,{ref:k,hidden:te,data:Z,components:GB,style:fe,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(U,V)=>{const Q=V.Render??WB,de=j.has(V.value)||j.has(V.label??""),Ee=C===U,Le=V.label??V.value;return p.jsxs("button",{"data-value":V.value,...ae({ref:Ze=>{L.current[U]=Ze},role:"option",type:"button","aria-checked":de,"aria-current":de,"aria-selected":de,"aria-busy":V.disabled,onClick:()=>ue(V,U)}),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||Ee?"bg-floating-hover text-floating-foreground":""}`,children:[p.jsx(Xf,{onChange:yu,checked:de,"aria-checked":de,onClick:Ze=>{Ze.stopPropagation(),ue(V,U)}}),p.jsx(Q,{...f,label:V.label,value:V.value,children:Le})]})}})}),p.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?p.jsx(Da,{theme:"muted",size:"small",children:P.autocompleteEmpty}):Re})]})})}):null})]})}),XB=e=>{const[t,n]=S.useState(0);return S.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},QB={Item:S.forwardRef(function(t,n){return p.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return p.jsx("ul",{...t,ref:n,className:"space-y-3"})})},JB=e=>{const t=S.useRef(null),n=XB(t);return p.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[p.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:[p.jsx("header",{className:"border-b border-card-border pb-2"}),p.jsxs("div",{className:"px-8 space-y-2",children:[p.jsx(Io,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),p.jsx(Lf,{height:n,useWindowScroll:!0,data:e.source,components:QB,itemContent:(r,o)=>p.jsx(S.Fragment,{children:p.jsx(Xf,{children:p.jsx(e.Item,{data:o})})})})]})]}),p.jsx("div",{children:p.jsx(xs,{children:p.jsx(Nc,{})})}),p.jsx("div",{})]})};function eR(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 tR=({children:e,...t})=>{const n=br(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:eR(r.current));return S.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return s.observe(a),()=>s.disconnect()},[]),p.jsx("div",{...t,ref:r,children:o?e:null})},nR=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.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},rR=fo("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"}}),US=S.createContext(()=>{throw new Error("Not implemented")}),oR=()=>S.useContext(US),YS={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]}},iR=S.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=rR({theme:t.theme||"default"});return p.jsx(BI,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:p.jsx(ze.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:YS[t.reversedIndex]||YS.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:p.jsxs("div",{className:a,children:[p.jsxs("div",{className:"flex flex-col p-4",children:[t.title?p.jsx(RI,{className:"select-text truncate text-lg font-medium leading-relaxed",children:t.title}):null,p.jsx(HI,{className:"select-text truncate",children:t.text})]}),r?p.jsx(WI,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:p.jsx(vo,{className:"size-5"})}):null]})})})});function aR({children:e,max:t=5,duration:n=5e3}){const r=S.useRef(null),o=nR(r),[i,a]=S.useState([]),s=S.useCallback(()=>a([]),[]);S.useEffect(()=>s,[s]);const l=S.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(g=>{const v=[...g,{...u,id:d,text:c}];return v.length>t?v.slice(v.length-t,v.length+1):v}),{clear:s,close:()=>a(g=>g.filter(v=>v.id!==d))}},[t]);return p.jsxs(jI,{duration:n,swipeThreshold:150,children:[p.jsx(US.Provider,{value:l,children:e}),p.jsx(ze.ol,{children:p.jsx(Tn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const h=()=>a(g=>g.filter(v=>v.id!==c.id));return S.createElement(iR,{...c,hover:o,index:u,key:c.id,onClose:h,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})})}),p.jsx(zI,{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 sR=/Mac|iPod|iPhone|iPad/,Cl=()=>sR.test(navigator.userAgent),lR=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Cl()?"Meta":"Control":n==="Hyper"?Cl()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),GS=e=>e.map(t=>t.trim()).join("+");class cR{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=GS(lR(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 s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=GS(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const uR=e=>(e=e.trim(),e==="Alt"?Cl()?p.jsx(qk,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Cl()?p.jsx(jk,{"aria-label":"Command",size:14}):"Ctrl":e),dR=e=>{const t=e.value.trim().split("+");return p.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return p.jsxs(S.Fragment,{children:[p.jsx("kbd",{"aria-label":n,children:uR(n)}),o?null:p.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},fR=e=>p.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Ac(e.item.title)?p.jsx(e.item.title,{text:e.text}):e.item.title}),pR=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?p.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:p.jsx(fR,{text:e.text,item:o})}):o.type!=="shortcut"?p.jsx(S.Fragment,{}):p.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:ke("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[p.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,p.jsx("span",{children:Ac(o.title)?p.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?p.jsx(dR,{value:o.shortcut}):null]})}),hR=(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(s=>({...s,title:je.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=je.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=Pp(o,"title",n),a=r.filter(s=>je.function(s.enabled)?s.enabled({text:t}):!1);return An.unique(i.concat(a),s=>s.title)},mR=[0,0,0,0,0],gR=e=>{const t=e.bind??"Mod + k",n=S.useRef([]),r=St(),[o,i]=S.useState(""),a=br(o),s=S.useId(),l=S.useRef(null),[c,u]=S.useState(null),d=tr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Eo}),h=bs(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:b=>u(x=>je.number(b)?b:e.open?x??0:null)}),{getItemProps:g}=nr([h]),v=e.commands.flatMap(b=>b.type==="group"?[b,...b.items]:[b]),m=hR(v,o),f=o===""?v:[{type:"group",title:"Results",items:[]},...m.filter(b=>b.type!=="group")];S.useEffect(()=>{const b=new cR;return b.add(t,()=>e.onChangeVisibility?.(!0)),v.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&b.add(x.shortcut,k=>x.action({event:k,text:a.current,setOpen:e.onChangeVisibility}))}),b.register()},[t]);const y=e.Icon??$m;return p.jsx(S.Fragment,{children:p.jsxs(ep,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[h],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:[p.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:[p.jsx("div",{className:"flex size-10 items-center justify-center",children:p.jsx(y,{Default:$m,text:o,size:16})}),p.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&&f[c]){b.preventDefault();const x=f[c],k=b.currentTarget.value;if(x.type==="shortcut")return x.action({event:b,setOpen:e.onChangeVisibility,text:k})}if(f.length===1){b.preventDefault();const x=f[0],k=b.currentTarget.value;if(x.type==="shortcut")return x.action({event:b,setOpen:e.onChangeVisibility,text:k})}}}})]}),e.loading?p.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:[p.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),mR.map((b,x)=>p.jsx("li",{className:ke("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:zf},`${s}-${x}-skeleton-index`))]}):p.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[p.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:[f.map((b,x)=>S.createElement(pR,{...g({onMouseEnter:()=>u(x),ref(k){n.current[x]=k},onClick(k){k.preventDefault(),e.onChangeVisibility(!1),d.refs.domReference.current?.focus(),b.type==="shortcut"&&b.action({event:k,setOpen:e.onChangeVisibility,text:o})}}),item:b,text:o,active:c===x,key:`${s}-${b.type}-${x}`})),f.length===1?p.jsx("div",{className:ke("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&je.number(c)?p.jsx(e.Preview,{command:f[c],text:o}):null]}),e.footer?p.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},vR=["INPUT","SELECT"],KS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{vR.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Ap,ZS;function Ip(){if(ZS)return Ap;ZS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Ap={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Ap}var _p,XS;function QS(){if(XS)return _p;XS=1;var e=Ip(),t=Xh(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,E){return o.set(w,E),w},a=function(w){return o.has(w)},s=function(w){return o.get(w)},l=function(w,E){o.set(w,E)},c=(function(){for(var P=[],w=0;w<256;++w)P.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return P})(),u=function(w){for(;w.length>1;){var E=w.pop(),A=E.obj[E.prop];if(r(A)){for(var I=[],D=0;D<A.length;++D)typeof A[D]<"u"&&I.push(A[D]);E.obj[E.prop]=I}}},d=function(w,E){for(var A=E&&E.plainObjects?{__proto__:null}:{},I=0;I<w.length;++I)typeof w[I]<"u"&&(A[I]=w[I]);return A},h=function P(w,E,A){if(!E)return w;if(typeof E!="object"&&typeof E!="function"){if(r(w))w.push(E);else if(w&&typeof w=="object")if(a(w)){var I=s(w)+1;w[I]=E,l(w,I)}else(A&&(A.plainObjects||A.allowPrototypes)||!n.call(Object.prototype,E))&&(w[E]=!0);else return[w,E];return w}if(!w||typeof w!="object"){if(a(E)){for(var D=Object.keys(E),F=A&&A.plainObjects?{__proto__:null,0:w}:{0:w},j=0;j<D.length;j++){var _=parseInt(D[j],10);F[_+1]=E[D[j]]}return i(F,s(E)+1)}return[w].concat(E)}var N=w;return r(w)&&!r(E)&&(N=d(w,A)),r(w)&&r(E)?(E.forEach(function(z,M){if(n.call(w,M)){var C=w[M];C&&typeof C=="object"&&z&&typeof z=="object"?w[M]=P(C,z,A):w.push(z)}else w[M]=z}),w):Object.keys(E).reduce(function(z,M){var C=E[M];return n.call(z,M)?z[M]=P(z[M],C,A):z[M]=C,z},N)},g=function(w,E){return Object.keys(E).reduce(function(A,I){return A[I]=E[I],A},w)},v=function(P,w,E){var A=P.replace(/\+/g," ");if(E==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch{return A}},m=1024,f=function(w,E,A,I,D){if(w.length===0)return w;var F=w;if(typeof w=="symbol"?F=Symbol.prototype.toString.call(w):typeof w!="string"&&(F=String(w)),A==="iso-8859-1")return escape(F).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var j="",_=0;_<F.length;_+=m){for(var N=F.length>=m?F.slice(_,_+m):F,z=[],M=0;M<N.length;++M){var C=N.charCodeAt(M);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||D===e.RFC1738&&(C===40||C===41)){z[z.length]=N.charAt(M);continue}if(C<128){z[z.length]=c[C];continue}if(C<2048){z[z.length]=c[192|C>>6]+c[128|C&63];continue}if(C<55296||C>=57344){z[z.length]=c[224|C>>12]+c[128|C>>6&63]+c[128|C&63];continue}M+=1,C=65536+((C&1023)<<10|N.charCodeAt(M)&1023),z[z.length]=c[240|C>>18]+c[128|C>>12&63]+c[128|C>>6&63]+c[128|C&63]}j+=z.join("")}return j},y=function(w){for(var E=[{obj:{o:w},prop:"o"}],A=[],I=0;I<E.length;++I)for(var D=E[I],F=D.obj[D.prop],j=Object.keys(F),_=0;_<j.length;++_){var N=j[_],z=F[N];typeof z=="object"&&z!==null&&A.indexOf(z)===-1&&(E.push({obj:F,prop:N}),A.push(z))}return u(E),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))},k=function(w,E,A,I){if(a(w)){var D=s(w)+1;return w[D]=E,l(w,D),w}var F=[].concat(w,E);return F.length>A?i(d(F,{plainObjects:I}),F.length-1):F},T=function(w,E){if(r(w)){for(var A=[],I=0;I<w.length;I+=1)A.push(E(w[I]));return A}return E(w)};return _p={arrayToObject:d,assign:g,combine:k,compact:y,decode:v,encode:f,isBuffer:x,isOverflow:a,isRegExp:b,maybeMap:T,merge:h},_p}var Op,JS;function yR(){if(JS)return Op;JS=1;var e=Xh(),t=QS(),n=Ip(),r=Object.prototype.hasOwnProperty,o={brackets:function(f){return f+"[]"},comma:"comma",indices:function(f,y){return f+"["+y+"]"},repeat:function(f){return f}},i=Array.isArray,a=Array.prototype.push,s=function(m,f){a.apply(m,i(f)?f:[f])},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(f){return l.call(f)},skipNulls:!1,strictNullHandling:!1},d=function(f){return typeof f=="string"||typeof f=="number"||typeof f=="boolean"||typeof f=="symbol"||typeof f=="bigint"},h={},g=function m(f,y,b,x,k,T,P,w,E,A,I,D,F,j,_,N,z,M){for(var C=f,$=M,L=0,q=!1;($=$.get(h))!==void 0&&!q;){var Y=$.get(f);if(L+=1,typeof Y<"u"){if(Y===L)throw new RangeError("Cyclic object value");q=!0}typeof $.get(h)>"u"&&(L=0)}if(typeof A=="function"?C=A(y,C):C instanceof Date?C=F(C):b==="comma"&&i(C)&&(C=t.maybeMap(C,function(ue){return ue instanceof Date?F(ue):ue})),C===null){if(T)return E&&!N?E(y,u.encoder,z,"key",j):y;C=""}if(d(C)||t.isBuffer(C)){if(E){var R=N?y:E(y,u.encoder,z,"key",j);return[_(R)+"="+_(E(C,u.encoder,z,"value",j))]}return[_(y)+"="+_(String(C))]}var Z=[];if(typeof C>"u")return Z;var te;if(b==="comma"&&i(C))N&&E&&(C=t.maybeMap(C,E)),te=[{value:C.length>0?C.join(",")||null:void 0}];else if(i(A))te=A;else{var ne=Object.keys(C);te=I?ne.sort(I):ne}var ee=w?String(y).replace(/\./g,"%2E"):String(y),H=x&&i(C)&&C.length===1?ee+"[]":ee;if(k&&i(C)&&C.length===0)return H+"[]";for(var K=0;K<te.length;++K){var X=te[K],ie=typeof X=="object"&&X&&typeof X.value<"u"?X.value:C[X];if(!(P&&ie===null)){var B=D&&w?String(X).replace(/\./g,"%2E"):String(X),oe=i(C)?typeof b=="function"?b(H,B):H:H+(D?"."+B:"["+B+"]");M.set(f,L);var ae=e();ae.set(h,M),s(Z,m(ie,oe,b,x,k,T,P,w,b==="comma"&&N&&i(C)?null:E,A,I,D,F,j,_,N,z,ae))}}return Z},v=function(f){if(!f)return u;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.encodeDotInKeys<"u"&&typeof f.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(f.encoder!==null&&typeof f.encoder<"u"&&typeof f.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=f.charset||u.charset;if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.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 f.format<"u"){if(!r.call(n.formatters,f.format))throw new TypeError("Unknown format option provided.");b=f.format}var x=n.formatters[b],k=u.filter;(typeof f.filter=="function"||i(f.filter))&&(k=f.filter);var T;if(f.arrayFormat in o?T=f.arrayFormat:"indices"in f?T=f.indices?"indices":"repeat":T=u.arrayFormat,"commaRoundTrip"in f&&typeof f.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var P=typeof f.allowDots>"u"?f.encodeDotInKeys===!0?!0:u.allowDots:!!f.allowDots;return{addQueryPrefix:typeof f.addQueryPrefix=="boolean"?f.addQueryPrefix:u.addQueryPrefix,allowDots:P,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:T,charset:y,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!f.commaRoundTrip,delimiter:typeof f.delimiter>"u"?u.delimiter:f.delimiter,encode:typeof f.encode=="boolean"?f.encode:u.encode,encodeDotInKeys:typeof f.encodeDotInKeys=="boolean"?f.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof f.encoder=="function"?f.encoder:u.encoder,encodeValuesOnly:typeof f.encodeValuesOnly=="boolean"?f.encodeValuesOnly:u.encodeValuesOnly,filter:k,format:b,formatter:x,serializeDate:typeof f.serializeDate=="function"?f.serializeDate:u.serializeDate,skipNulls:typeof f.skipNulls=="boolean"?f.skipNulls:u.skipNulls,sort:typeof f.sort=="function"?f.sort:null,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:u.strictNullHandling}};return Op=function(m,f){var y=m,b=v(f),x,k;typeof b.filter=="function"?(k=b.filter,y=k("",y)):i(b.filter)&&(k=b.filter,x=k);var T=[];if(typeof y!="object"||y===null)return"";var P=o[b.arrayFormat],w=P==="comma"&&b.commaRoundTrip;x||(x=Object.keys(y)),b.sort&&x.sort(b.sort);for(var E=e(),A=0;A<x.length;++A){var I=x[A],D=y[I];b.skipNulls&&D===null||s(T,g(D,I,P,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,E))}var F=T.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&"),F.length>0?j+F:""},Op}var Mp,eT;function bR(){if(eT)return Mp;eT=1;var e=QS(),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(g){return g.replace(/&#(\d+);/g,function(v,m){return String.fromCharCode(parseInt(m,10))})},i=function(g,v,m){if(g&&typeof g=="string"&&v.comma&&g.indexOf(",")>-1)return g.split(",");if(v.throwOnLimitExceeded&&m>=v.arrayLimit)throw new RangeError("Array limit exceeded. Only "+v.arrayLimit+" element"+(v.arrayLimit===1?"":"s")+" allowed in an array.");return g},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(v,m){var f={__proto__:null},y=m.ignoreQueryPrefix?v.replace(/^\?/,""):v;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 k=-1,T,P=m.charset;if(m.charsetSentinel)for(T=0;T<x.length;++T)x[T].indexOf("utf8=")===0&&(x[T]===s?P="utf-8":x[T]===a&&(P="iso-8859-1"),k=T,T=x.length);for(T=0;T<x.length;++T)if(T!==k){var w=x[T],E=w.indexOf("]="),A=E===-1?w.indexOf("="):E+1,I,D;if(A===-1?(I=m.decoder(w,r.decoder,P,"key"),D=m.strictNullHandling?null:""):(I=m.decoder(w.slice(0,A),r.decoder,P,"key"),I!==null&&(D=e.maybeMap(i(w.slice(A+1),m,n(f[I])?f[I].length:0),function(j){return m.decoder(j,r.decoder,P,"value")}))),D&&m.interpretNumericEntities&&P==="iso-8859-1"&&(D=o(String(D))),w.indexOf("[]=")>-1&&(D=n(D)?[D]:D),I!==null){var F=t.call(f,I);F&&m.duplicates==="combine"?f[I]=e.combine(f[I],D,m.arrayLimit,m.plainObjects):(!F||m.duplicates==="last")&&(f[I]=D)}}return f},c=function(g,v,m,f){var y=0;if(g.length>0&&g[g.length-1]==="[]"){var b=g.slice(0,-1).join("");y=Array.isArray(v)&&v[b]?v[b].length:0}for(var x=f?v:i(v,m,y),k=g.length-1;k>=0;--k){var T,P=g[k];if(P==="[]"&&m.parseArrays)e.isOverflow(x)?T=x:T=m.allowEmptyArrays&&(x===""||m.strictNullHandling&&x===null)?[]:e.combine([],x,m.arrayLimit,m.plainObjects);else{T=m.plainObjects?{__proto__:null}:{};var w=P.charAt(0)==="["&&P.charAt(P.length-1)==="]"?P.slice(1,-1):P,E=m.decodeDotInKeys?w.replace(/%2E/g,"."):w,A=parseInt(E,10);!m.parseArrays&&E===""?T={0:x}:!isNaN(A)&&P!==E&&String(A)===E&&A>=0&&m.parseArrays&&A<=m.arrayLimit?(T=[],T[A]=x):E!=="__proto__"&&(T[E]=x)}x=T}return x},u=function(v,m){var f=m.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v;if(m.depth<=0)return!m.plainObjects&&t.call(Object.prototype,f)&&!m.allowPrototypes?void 0:[f];var y=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=y.exec(f),k=x?f.slice(0,x.index):f,T=[];if(k){if(!m.plainObjects&&t.call(Object.prototype,k)&&!m.allowPrototypes)return;T.push(k)}for(var P=0;(x=b.exec(f))!==null&&P<m.depth;){P+=1;var w=x[1].slice(1,-1);if(!m.plainObjects&&t.call(Object.prototype,w)&&!m.allowPrototypes)return;T.push(x[1])}if(x){if(m.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+m.depth+" and strictDepth is true");T.push("["+f.slice(x.index)+"]")}return T},d=function(v,m,f,y){if(v){var b=u(v,f);if(b)return c(b,m,f,y)}},h=function(v){if(!v)return r;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.decodeDotInKeys<"u"&&typeof v.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(v.decoder!==null&&typeof v.decoder<"u"&&typeof v.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof v.throwOnLimitExceeded<"u"&&typeof v.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof v.charset>"u"?r.charset:v.charset,f=typeof v.duplicates>"u"?r.duplicates:v.duplicates;if(f!=="combine"&&f!=="first"&&f!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var y=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:r.allowDots:!!v.allowDots;return{allowDots:y,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof v.allowPrototypes=="boolean"?v.allowPrototypes:r.allowPrototypes,allowSparse:typeof v.allowSparse=="boolean"?v.allowSparse:r.allowSparse,arrayLimit:typeof v.arrayLimit=="number"?v.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:r.charsetSentinel,comma:typeof v.comma=="boolean"?v.comma:r.comma,decodeDotInKeys:typeof v.decodeDotInKeys=="boolean"?v.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof v.decoder=="function"?v.decoder:r.decoder,delimiter:typeof v.delimiter=="string"||e.isRegExp(v.delimiter)?v.delimiter:r.delimiter,depth:typeof v.depth=="number"||v.depth===!1?+v.depth:r.depth,duplicates:f,ignoreQueryPrefix:v.ignoreQueryPrefix===!0,interpretNumericEntities:typeof v.interpretNumericEntities=="boolean"?v.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof v.parameterLimit=="number"?v.parameterLimit:r.parameterLimit,parseArrays:v.parseArrays!==!1,plainObjects:typeof v.plainObjects=="boolean"?v.plainObjects:r.plainObjects,strictDepth:typeof v.strictDepth=="boolean"?!!v.strictDepth:r.strictDepth,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof v.throwOnLimitExceeded=="boolean"?v.throwOnLimitExceeded:!1}};return Mp=function(g,v){var m=h(v);if(g===""||g===null||typeof g>"u")return m.plainObjects?{__proto__:null}:{};for(var f=typeof g=="string"?l(g,m):g,y=m.plainObjects?{__proto__:null}:{},b=Object.keys(f),x=0;x<b.length;++x){var k=b[x],T=d(k,f[k],m,typeof g=="string");y=e.merge(y,T,m)}return m.allowSparse===!0?y:e.compact(y)},Mp}var Dp,tT;function xR(){if(tT)return Dp;tT=1;var e=yR(),t=bR(),n=Ip();return Dp={formats:n,parse:t,stringify:e},Dp}var wR=xR(),Ye;(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 a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},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 a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},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(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ye||(Ye={}));var nT;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(nT||(nT={}));const we=Ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ir=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return Number.isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},ce=Ye.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 ar 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 a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof ar))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ye.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()}}ar.create=e=>new ar(e);const Np=(e,t)=>{let n;switch(e.code){case ce.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ce.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ye.jsonStringifyReplacer)}`;break;case ce.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ye.joinValues(e.keys,", ")}`;break;case ce.invalid_union:n="Invalid input";break;case ce.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ye.joinValues(e.options)}`;break;case ce.invalid_enum_value:n=`Invalid enum value. Expected ${Ye.joinValues(e.options)}, received '${e.received}'`;break;case ce.invalid_arguments:n="Invalid function arguments";break;case ce.invalid_return_type:n="Invalid function return type";break;case ce.invalid_date:n="Invalid date";break;case ce.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}"`:Ye.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ce.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 ce.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 ce.custom:n="Invalid input";break;case ce.invalid_intersection_types:n="Intersection results could not be merged";break;case ce.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ce.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ye.assertNever(e)}return{message:n}};let SR=Np;function TR(){return SR}const ER=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function he(e,t){const n=TR(),r=ER({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Np?void 0:Np].filter(o=>!!o)});e.common.issues.push(r)}class ln{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,a=await o.value;r.push({key:i,value:a})}return ln.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return _e;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const _e=Object.freeze({status:"aborted"}),Ea=e=>({status:"dirty",value:e}),vn=e=>({status:"valid",value:e}),rT=e=>e.status==="aborted",oT=e=>e.status==="dirty",li=e=>e.status==="valid",Pl=e=>typeof Promise<"u"&&e instanceof Promise;var Se;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Se||(Se={}));class _r{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 iT=(e,t)=>{if(li(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 ar(e.common.issues);return this._error=n,this._error}}};function Be(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:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class We{get description(){return this._def.description}_getType(t){return Ir(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ir(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ln,ctx:{common:t.parent.common,data:t.data,parsedType:Ir(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Pl(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:Ir(t)},o=this._parseSync({data:t,path:r.path,parent:r});return iT(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ir(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return li(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=>li(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:Ir(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Pl(o)?o:Promise.resolve(o));return iT(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 a=t(o),s=()=>i.addIssue({code:ce.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!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 fi({schema:this,typeName:Oe.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 Mr.create(this,this._def)}nullable(){return pi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Gn.create(this)}promise(){return Ol.create(this,this._def)}or(t){return Il.create([this,t],this._def)}and(t){return _l.create(this,t,this._def)}transform(t){return new fi({...Be(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Vp({...Be(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new YR({typeName:Oe.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new $p({...Be(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return jp.create(this,t)}readonly(){return zp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const kR=/^c[^\s-]{8,}$/i,CR=/^[0-9a-z]+$/,PR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,AR=/^[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,IR=/^[a-z0-9_-]{21}$/i,_R=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,OR=/^[-+]?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)?)??$/,MR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,DR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fp;const NR=/^(?:(?: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])$/,FR=/^(?:(?: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])$/,LR=/^(([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]))$/,VR=/^(([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])$/,$R=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,jR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,aT="((\\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])))",zR=new RegExp(`^${aT}$`);function sT(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 BR(e){return new RegExp(`^${sT(e)}$`)}function RR(e){let t=`${aT}T${sT(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 HR(e,t){return!!((t==="v4"||!t)&&NR.test(e)||(t==="v6"||!t)&&LR.test(e))}function WR(e,t){if(!_R.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 qR(e,t){return!!((t==="v4"||!t)&&FR.test(e)||(t==="v6"||!t)&&VR.test(e))}class so extends We{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const i=this._getOrReturnCtx(t);return he(i,{code:ce.invalid_type,expected:we.string,received:i.parsedType}),_e}const r=new ln;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),he(o,{code:ce.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),he(o,{code:ce.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?he(o,{code:ce.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&he(o,{code:ce.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")MR.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"email",code:ce.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Fp||(Fp=new RegExp(DR,"u")),Fp.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"emoji",code:ce.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")AR.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"uuid",code:ce.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")IR.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"nanoid",code:ce.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")kR.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"cuid",code:ce.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")CR.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"cuid2",code:ce.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")PR.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"ulid",code:ce.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),he(o,{validation:"url",code:ce.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),he(o,{validation:"regex",code:ce.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),he(o,{code:ce.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),he(o,{code:ce.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),he(o,{code:ce.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?RR(i).test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{code:ce.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?zR.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{code:ce.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?BR(i).test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{code:ce.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?OR.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"duration",code:ce.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?HR(t.data,i.version)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"ip",code:ce.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?WR(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"jwt",code:ce.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?qR(t.data,i.version)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"cidr",code:ce.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?$R.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"base64",code:ce.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?jR.test(t.data)||(o=this._getOrReturnCtx(t,o),he(o,{validation:"base64url",code:ce.invalid_string,message:i.message}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ce.invalid_string,...Se.errToObj(r)})}_addCheck(t){return new so({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Se.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Se.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Se.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Se.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Se.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Se.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,...Se.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,...Se.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Se.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Se.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Se.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Se.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Se.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Se.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Se.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Se.errToObj(n)})}nonempty(t){return this.min(1,Se.errToObj(t))}trim(){return new so({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new so({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new so({...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}}so.create=e=>new so({checks:[],typeName:Oe.ZodString,coerce:e?.coerce??!1,...Be(e)});function UR(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(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class ci extends We{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)!==we.number){const i=this._getOrReturnCtx(t);return he(i,{code:ce.invalid_type,expected:we.number,received:i.parsedType}),_e}let r;const o=new ln;for(const i of this._def.checks)i.kind==="int"?Ye.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),he(r,{code:ce.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),he(r,{code:ce.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),he(r,{code:ce.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?UR(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),he(r,{code:ce.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),he(r,{code:ce.not_finite,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Se.toString(n))}setLimit(t,n,r,o){return new ci({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Se.toString(o)}]})}_addCheck(t){return new ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Se.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.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"&&Ye.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)}}ci.create=e=>new ci({checks:[],typeName:Oe.ZodNumber,coerce:e?.coerce||!1,...Be(e)});class ka extends We{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)!==we.bigint)return this._getInvalidInput(t);let r;const o=new ln;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),he(r,{code:ce.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),he(r,{code:ce.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),he(r,{code:ce.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return he(n,{code:ce.invalid_type,expected:we.bigint,received:n.parsedType}),_e}gte(t,n){return this.setLimit("min",t,!0,Se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Se.toString(n))}setLimit(t,n,r,o){return new ka({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Se.toString(o)}]})}_addCheck(t){return new ka({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Se.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}}ka.create=e=>new ka({checks:[],typeName:Oe.ZodBigInt,coerce:e?.coerce??!1,...Be(e)});class lT extends We{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const r=this._getOrReturnCtx(t);return he(r,{code:ce.invalid_type,expected:we.boolean,received:r.parsedType}),_e}return vn(t.data)}}lT.create=e=>new lT({typeName:Oe.ZodBoolean,coerce:e?.coerce||!1,...Be(e)});class Al extends We{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const i=this._getOrReturnCtx(t);return he(i,{code:ce.invalid_type,expected:we.date,received:i.parsedType}),_e}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return he(i,{code:ce.invalid_date}),_e}const r=new ln;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),he(o,{code:ce.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),he(o,{code:ce.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Al({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Se.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Se.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}}Al.create=e=>new Al({checks:[],coerce:e?.coerce||!1,typeName:Oe.ZodDate,...Be(e)});class cT extends We{_parse(t){if(this._getType(t)!==we.symbol){const r=this._getOrReturnCtx(t);return he(r,{code:ce.invalid_type,expected:we.symbol,received:r.parsedType}),_e}return vn(t.data)}}cT.create=e=>new cT({typeName:Oe.ZodSymbol,...Be(e)});class uT extends We{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return he(r,{code:ce.invalid_type,expected:we.undefined,received:r.parsedType}),_e}return vn(t.data)}}uT.create=e=>new uT({typeName:Oe.ZodUndefined,...Be(e)});class dT extends We{_parse(t){if(this._getType(t)!==we.null){const r=this._getOrReturnCtx(t);return he(r,{code:ce.invalid_type,expected:we.null,received:r.parsedType}),_e}return vn(t.data)}}dT.create=e=>new dT({typeName:Oe.ZodNull,...Be(e)});class fT extends We{constructor(){super(...arguments),this._any=!0}_parse(t){return vn(t.data)}}fT.create=e=>new fT({typeName:Oe.ZodAny,...Be(e)});class pT extends We{constructor(){super(...arguments),this._unknown=!0}_parse(t){return vn(t.data)}}pT.create=e=>new pT({typeName:Oe.ZodUnknown,...Be(e)});class Or extends We{_parse(t){const n=this._getOrReturnCtx(t);return he(n,{code:ce.invalid_type,expected:we.never,received:n.parsedType}),_e}}Or.create=e=>new Or({typeName:Oe.ZodNever,...Be(e)});class hT extends We{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return he(r,{code:ce.invalid_type,expected:we.void,received:r.parsedType}),_e}return vn(t.data)}}hT.create=e=>new hT({typeName:Oe.ZodVoid,...Be(e)});class Gn extends We{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==we.array)return he(n,{code:ce.invalid_type,expected:we.array,received:n.parsedType}),_e;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(he(n,{code:a?ce.too_big:ce.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?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&&(he(n,{code:ce.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&&(he(n,{code:ce.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((a,s)=>o.type._parseAsync(new _r(n,a,n.path,s)))).then(a=>ln.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new _r(n,a,n.path,s)));return ln.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Gn({...this._def,minLength:{value:t,message:Se.toString(n)}})}max(t,n){return new Gn({...this._def,maxLength:{value:t,message:Se.toString(n)}})}length(t,n){return new Gn({...this._def,exactLength:{value:t,message:Se.toString(n)}})}nonempty(t){return this.min(1,t)}}Gn.create=(e,t)=>new Gn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Be(t)});function ui(e){if(e instanceof Dt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Mr.create(ui(r))}return new Dt({...e._def,shape:()=>t})}else return e instanceof Gn?new Gn({...e._def,type:ui(e.element)}):e instanceof Mr?Mr.create(ui(e.unwrap())):e instanceof pi?pi.create(ui(e.unwrap())):e instanceof lo?lo.create(e.items.map(t=>ui(t))):e}class Dt extends We{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=Ye.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==we.object){const c=this._getOrReturnCtx(t);return he(c,{code:ce.invalid_type,expected:we.object,received:c.parsedType}),_e}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Or&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new _r(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Or){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(he(o,{code:ce.unrecognized_keys,keys:s}),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 s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new _r(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,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>ln.mergeObjectSync(r,c)):ln.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Se.errToObj,new Dt({...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:Se.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Dt({...this._def,unknownKeys:"strip"})}passthrough(){return new Dt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Dt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Dt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Dt({...this._def,catchall:t})}pick(t){const n={};for(const r of Ye.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Dt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Ye.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Dt({...this._def,shape:()=>n})}deepPartial(){return ui(this)}partial(t){const n={};for(const r of Ye.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Dt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Ye.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Mr;)i=i._def.innerType;n[r]=i}return new Dt({...this._def,shape:()=>n})}keyof(){return yT(Ye.objectKeys(this.shape))}}Dt.create=(e,t)=>new Dt({shape:()=>e,unknownKeys:"strip",catchall:Or.create(),typeName:Oe.ZodObject,...Be(t)}),Dt.strictCreate=(e,t)=>new Dt({shape:()=>e,unknownKeys:"strict",catchall:Or.create(),typeName:Oe.ZodObject,...Be(t)}),Dt.lazycreate=(e,t)=>new Dt({shape:e,unknownKeys:"strip",catchall:Or.create(),typeName:Oe.ZodObject,...Be(t)});class Il extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new ar(s.ctx.common.issues));return he(n,{code:ce.invalid_union,unionErrors:a}),_e}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];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&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new ar(l));return he(n,{code:ce.invalid_union,unionErrors:s}),_e}}get options(){return this._def.options}}Il.create=(e,t)=>new Il({options:e,typeName:Oe.ZodUnion,...Be(t)});function Lp(e,t){const n=Ir(e),r=Ir(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&r===we.object){const o=Ye.objectKeys(t),i=Ye.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Lp(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===we.array&&r===we.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Lp(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===we.date&&r===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _l extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(rT(i)||rT(a))return _e;const s=Lp(i.value,a.value);return s.valid?((oT(i)||oT(a))&&n.dirty(),{status:n.value,value:s.data}):(he(r,{code:ce.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,a])=>o(i,a)):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}))}}_l.create=(e,t,n)=>new _l({left:e,right:t,typeName:Oe.ZodIntersection,...Be(n)});class lo extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.array)return he(r,{code:ce.invalid_type,expected:we.array,received:r.parsedType}),_e;if(r.data.length<this._def.items.length)return he(r,{code:ce.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&r.data.length>this._def.items.length&&(he(r,{code:ce.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new _r(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>ln.mergeArray(n,a)):ln.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new lo({...this._def,rest:t})}}lo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lo({items:e,typeName:Oe.ZodTuple,rest:null,...Be(t)})};class mT extends We{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!==we.map)return he(r,{code:ce.invalid_type,expected:we.map,received:r.parsedType}),_e;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new _r(r,s,r.path,[c,"key"])),value:i._parse(new _r(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){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(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return _e;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}mT.create=(e,t,n)=>new mT({valueType:t,keyType:e,typeName:Oe.ZodMap,...Be(n)});class Ca extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.set)return he(r,{code:ce.invalid_type,expected:we.set,received:r.parsedType}),_e;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(he(r,{code:ce.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&&(he(r,{code:ce.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(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 s=[...r.data.values()].map((l,c)=>i._parse(new _r(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Ca({...this._def,minSize:{value:t,message:Se.toString(n)}})}max(t,n){return new Ca({...this._def,maxSize:{value:t,message:Se.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ca.create=(e,t)=>new Ca({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Be(t)});class gT extends We{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})}}gT.create=(e,t)=>new gT({getter:e,typeName:Oe.ZodLazy,...Be(t)});class vT extends We{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return he(n,{received:n.data,code:ce.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:t.data}}get value(){return this._def.value}}vT.create=(e,t)=>new vT({value:e,typeName:Oe.ZodLiteral,...Be(t)});function yT(e,t){return new di({values:e,typeName:Oe.ZodEnum,...Be(t)})}class di extends We{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return he(n,{expected:Ye.joinValues(r),received:n.parsedType,code:ce.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 he(n,{received:n.data,code:ce.invalid_enum_value,options:r}),_e}return vn(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 di.create(t,{...this._def,...n})}exclude(t,n=this._def){return di.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}di.create=yT;class bT extends We{_parse(t){const n=Ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==we.string&&r.parsedType!==we.number){const o=Ye.objectValues(n);return he(r,{expected:Ye.joinValues(o),received:r.parsedType,code:ce.invalid_type}),_e}if(this._cache||(this._cache=new Set(Ye.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Ye.objectValues(n);return he(r,{received:r.data,code:ce.invalid_enum_value,options:o}),_e}return vn(t.data)}get enum(){return this._def.values}}bT.create=(e,t)=>new bT({values:e,typeName:Oe.ZodNativeEnum,...Be(t)});class Ol extends We{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return he(n,{code:ce.invalid_type,expected:we.promise,received:n.parsedType}),_e;const r=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return vn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ol.create=(e,t)=>new Ol({type:e,typeName:Oe.ZodPromise,...Be(t)});class fi extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.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:a=>{he(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return _e;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?_e:l.status==="dirty"||n.value==="dirty"?Ea(l.value):l});{if(n.value==="aborted")return _e;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?_e:s.status==="dirty"||n.value==="dirty"?Ea(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,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 s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?_e:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?_e:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!li(a))return _e;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>li(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):_e);Ye.assertNever(o)}}fi.create=(e,t,n)=>new fi({schema:e,typeName:Oe.ZodEffects,effect:t,...Be(n)}),fi.createWithPreprocess=(e,t,n)=>new fi({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...Be(n)});class Mr extends We{_parse(t){return this._getType(t)===we.undefined?vn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Mr.create=(e,t)=>new Mr({innerType:e,typeName:Oe.ZodOptional,...Be(t)});class pi extends We{_parse(t){return this._getType(t)===we.null?vn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}pi.create=(e,t)=>new pi({innerType:e,typeName:Oe.ZodNullable,...Be(t)});class Vp extends We{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===we.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Vp.create=(e,t)=>new Vp({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});class $p extends We{_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 Pl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ar(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ar(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}$p.create=(e,t)=>new $p({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});class xT extends We{_parse(t){if(this._getType(t)!==we.nan){const r=this._getOrReturnCtx(t);return he(r,{code:ce.invalid_type,expected:we.nan,received:r.parsedType}),_e}return{status:"valid",value:t.data}}}xT.create=e=>new xT({typeName:Oe.ZodNaN,...Be(e)});class YR extends We{_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 jp extends We{_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(),Ea(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 jp({in:t,out:n,typeName:Oe.ZodPipeline})}}class zp extends We{_parse(t){const n=this._def.innerType._parse(t),r=o=>(li(o)&&(o.value=Object.freeze(o.value)),o);return Pl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}zp.create=(e,t)=>new zp({innerType:e,typeName:Oe.ZodReadonly,...Be(t)});var Oe;(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"})(Oe||(Oe={})),Or.create,Gn.create,Il.create,_l.create,lo.create,di.create,Ol.create,Mr.create,pi.create;const GR=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},KR=(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 a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},wT=e=>e.replace(/\[(\d+)]/g,".$1").split("."),cn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):wT(t),o=structuredClone(e);return KR(o,r,n),o},ZR=(e,t)=>e.localeCompare(t),hi={},ST=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return TT(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=ST(e._def.innerType);return t==="ZodArray"?n??[]:n}},TT=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,ST(n)])),ET=(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]=ET(i,o):n[r]=o||i)}return n},XR={sort:ZR,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},kT=e=>{const t=new FormData(e),n=new URLSearchParams(t);return wR.parse(n.toString(),XR)},Dr=(e,t)=>wT(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Nr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Bp=e=>{const t=e.dataset.target;if(!t)return Nr(e);const n=document.querySelector(`[data-origin="${t}"]`);return Nr(n||e)},QR={state:{},loading:!1,useOnChange:!1},CT=e=>e.dataset.target||e.name,JR=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ya.LocalStorage.get(t);return GR(n)?n:{}},clear:()=>{ya.LocalStorage.delete(t)},set:n=>ya.LocalStorage.set(t,n)}},e4=(e,t,n=QR)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>je.function(n?.state)?n.state():n?.state??TT(e)??{}),l=S.useCallback(x=>{const k=x.target,T=x.currentTarget;if(k.dataset.optional==="true")return;const w=CT(k),E=Bp(k)||(T?Nr(T):""),A=Dr(w,e);if(k.setAttribute("data-initialized","true"),A){const I=A.safeParse(E),D=I.success?void 0:I.error.issues[0]?.message??"";o(F=>cn(F??{},w,D))}},[e]),c=S.useCallback(x=>k=>{const T=k.currentTarget,P=Object.values(i.current).reduce((E,A)=>{const I=A.element,D=A.schema.safeParse(Nr(I));if(I.dataset.ignore==="ignore"||D.success)return E;const F=D.error.issues[0]?.message;I.setAttribute("data-initialized","true");const j=I.dataset.name||I.name||"";return cn(E,j,F)},{}),w=je.empty(P)?null:P;o(w),console.error(w),x?.({form:T,errors:w||{}})},[]),u=(x,k=hi)=>{const T=Dr(x,e),P=w=>{if(!ml(w))return;s(A=>cn(A,x,w.toISOString())),o(A=>cn(A,x,void 0));const E=i.current[x].element;if(E){const A=E.getAttribute("data-origin"),I=document.querySelector(`input[data-target="${A}"]`);I&&I.setCustomValidity("")}k?.onChange?.(w)};return{...k,loading:n.loading,name:x,id:x,onChange:P,form:t,date:je.string(a[x])?new Date(a[x]):a[x],required:k.required??!T.isOptional(),error:Mn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:T})}}},d=(x,k=hi)=>{const T=Dr(x,e);return{...k,name:x,id:x,onChange:w=>{const E=w.target.value;s(A=>cn(A,x,E)),k?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Mn(r,x,void 0),value:Mn(a,x,void 0)??"",required:k.required??!T.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:T}:void 0}},h=(x,k=hi)=>{const T=Dr(x,e);return{...k,name:x,id:x,onChange:w=>{const E=w.target.checked;s(A=>cn(A??{},x,E)),k?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Mn(r,x,void 0),required:k.required??!T.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:T}):void 0}},g=(x,k=hi)=>{const T=Dr(x,e),P=w=>{w.persist?.();const E=w.target.value;k?.onChange?.(w),s(A=>cn(A,x,E))};return{...k,loading:n.loading,name:x,id:x,onChange:P,form:t,onInvalid:l,error:Mn(r,x,void 0),required:k.required??!T.isOptional(),value:Mn(a,x,void 0)||k?.value||"",type:je.instance(T,ci)?"number":k?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:T}}},v=(x,k=hi)=>{const T=Dr(x,e);return{...k,name:x,id:x,onChangeOptions:w=>{s(E=>cn(E,x,w))},form:t,loading:n.loading,onInvalid:l,error:Mn(r,x,void 0),required:k.required??!T.isOptional(),value:Mn(a,x,void 0)||k?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:T})}},m=(x,k=hi)=>{const T=Dr(x,e),P=T._def.typeName==="ZodNumber";return{...k,name:x,id:x,onChange:E=>{E.persist?.();const A=P?E.target.valueAsNumber:E.target.value;k?.onChange?.(E),s(I=>cn(I,x,A))},form:t,loading:n.loading,onInvalid:l,error:Mn(r,x,void 0),required:k.required??!T.isOptional(),type:P?"number":k?.type??"text",value:Mn(a,x,void 0)||k?.value||"",ref:E=>E===null?void 0:void(i.current[x]={element:E,schema:T})}};S.useEffect(()=>{const x=Object.values(i.current).map(T=>{const P=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,w=T.schema.safeParse(Nr(P)),E=F=>{const j=CT(F.target);if(!j)return!1;const _=F.target,N=Bp(F.target)||(F.relatedTarget?Nr(F.relatedTarget):""),z=T.schema.safeParse(N);if(_.setAttribute("value",N),z.success)return P.setCustomValidity&&P.setCustomValidity(""),o(M=>{if(je.null(M))return null;const C=cn(M,j,void 0);return je.empty(M)||je.nil(M)||je.empty(C)?null:C}),!1;if(P.required){const M=z.error.issues[0]?.message||"";P.setCustomValidity&&P.setCustomValidity(M),o(C=>{if(je.null(C))return null;const $=cn(C,j,M||void 0);return je.empty($)?null:$})}return!1},A=new AbortController,I=P.getAttribute("data-trigger")||"blur";P.addEventListener(I,E,{signal:A.signal});const D=P.dataset.shadow?!1:P.required?!w.success:!1;return{input:T,hasInitialError:D,unsubscribe:()=>A.abort()}});return x.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>x.forEach(T=>T.unsubscribe())});const f=x=>k=>{k.preventDefault();const T=k.currentTarget;let P=kT(T);Array.from(t?document.querySelectorAll(`[form="${t}"]`):T.elements).forEach(D=>{if(D.tagName==="SELECT"){const F=D;P=cn(P,F.name,F.value)}if(D.tagName==="INPUT"){const F=D,j=Bp(F)||(F?Nr(F):"");P=cn(P,F.dataset.target||F.name,j)}});const E=ET(P,a),A=e.safeParse(E),I=()=>{KS(T),n.interceptor?.clear()};if(A.success){const D=JSON.stringify(A.data);return T.setAttribute("data-json",D),n.interceptor?.clear(),x?.(k,{form:T,event:k,reset:I,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(),T.reportValidity(),x?.(k,{form:T,json:P,event:k,reset:I,setErrors:o,data:P,success:!1,errors:A.error.issues.map(D=>({message:D.message,path:D.path.map(F=>String(F))}))})},y=x=>gu(a,x)||"",b=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:y,input:m,state:a,errors:r,select:d,checkbox:h,onSubmit:f,setState:s,textarea:g,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:v,disabled:r!==null}},t4=e=>e?JSON.parse(e.getAttribute("data-json")):{},n4=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},PT={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},AT={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"},IT={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},r4={name:"dark",zIndex:IT,rounded:PT,spacing:AT,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%)"}}}},o4={rounded:PT,spacing:AT,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:IT,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%)"}}}},i4=r4,a4=o4,s4=e=>{const t=S.useMemo(()=>({locale:e.locale,tweaks:{...Ha,...e.tweaks},parser:e.parser||za.hsla,map:{...Ra,...e.map}}),[e]);return p.jsx(bo.Provider,{value:t,children:e.children})};J.Alert=xV,J.AnimatedList=oV,J.AnimatedListItem=iV,J.Autocomplete=HB,J.Button=xs,J.Calendar=G1,J.Card=cl,J.Checkbox=Xf,J.ColType=ti,J.Collapse=v1,J.CommandPalette=gR,J.ComponentsProvider=s4,J.Context=bo,J.DatePicker=pz,J.Description=VV,J.Dict=An,J.Dropdown=ei,J.Empty=r1,J.Expand=BV,J.FileUpload=DB,J.Form=uk,J.Info=$V,J.Input=Io,J.InputFeedback=vv,J.InputField=Di,J.Loading=zV,J.Menu=TV,J.MenuItem=SV,J.Modal=ep,J.MultiSelect=ZB,J.Notifications=aR,J.PageHeader=jV,J.PageTitle=x1,J.Paragraph=LV,J.Polymorph=en,J.Progress=sz,J.Radiobox=EV,J.RenderOnView=tR,J.Select=Wr,J.Slider=UI,J.Spinner=w1,J.Stats=wV,J.StatsCard=nV,J.Step=gV,J.Steps=vV,J.Switch=YI,J.Tab=cV,J.Table=tV,J.Tabs=sV,J.Tag=Da,J.TaskList=FV,J.Textarea=kV,J.Timeline=lz,J.TimelineItem=vl,J.Toolbar=cz,J.Tooltip=bu,J.TransferList=JB,J.createColumns=EL,J.createCssProperties=Jk,J.createDesignTokens=jm,J.createFormStorage=JR,J.createOptionCols=Hf,J.createStyles=Zk,J.createTheme=Qk,J.createTokenStyles=eC,J.css=ke,J.defaultDarkTheme=i4,J.defaultLightTheme=a4,J.defaultTranslations=Ra,J.defaultTweaks=Ha,J.dispatchInput=vm,J.formReset=KS,J.formToJson=kT,J.getCoords=ak,J.getJsonForm=t4,J.getModalScrollerRef=IL,J.getRemainingSize=xi,J.getSchemaShape=Dr,J.hasVerticalScroll=ym,J.initializeInputDataset=bi,J.isMobile=gv,J.isReactComponent=ik,J.isReactFC=Ac,J.isSsr=yr,J.mergeRefs=Xn,J.negate=vA,J.noop=yu,J.parsers=za,J.path=gu,J.reduceTokens=lr,J.safeRegex=vu,J.splitInto=mv,J.useColorParser=p1,J.useForm=e4,J.useLocale=lp,J.useNotification=oR,J.usePrevious=n4,J.useReactive=l1,J.useStableRef=br,J.useStepContext=m1,J.useSwipe=R1,J.useTablePreferences=PL,J.useTranslations=St,J.uuid=Ao,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})}));
247
24
  //# sourceMappingURL=index.umd.js.map