@g4rcez/components 0.2.2 → 0.2.3

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.
Files changed (32) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +44 -44
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +10725 -10014
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/index.umd.js +44 -44
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/src/components/core/render-on-view.d.ts.map +1 -1
  9. package/dist/src/components/core/render-on-view.js +1 -0
  10. package/dist/src/components/display/card.d.ts +9 -1
  11. package/dist/src/components/display/card.d.ts.map +1 -1
  12. package/dist/src/components/display/card.js +7 -1
  13. package/dist/src/components/floating/tooltip.d.ts +1 -1
  14. package/dist/src/components/floating/tooltip.d.ts.map +1 -1
  15. package/dist/src/components/floating/tooltip.js +5 -4
  16. package/dist/src/components/form/date-picker.d.ts.map +1 -1
  17. package/dist/src/components/form/date-picker.js +1 -0
  18. package/dist/src/components/form/slider.d.ts +7 -0
  19. package/dist/src/components/form/slider.d.ts.map +1 -0
  20. package/dist/src/components/form/slider.js +35 -0
  21. package/dist/src/components/form/transfer-list.d.ts.map +1 -1
  22. package/dist/src/components/form/transfer-list.js +1 -0
  23. package/dist/src/components/index.d.ts +1 -0
  24. package/dist/src/components/index.d.ts.map +1 -1
  25. package/dist/src/components/index.js +1 -0
  26. package/dist/src/components/table/index.d.ts.map +1 -1
  27. package/dist/src/components/table/index.js +8 -5
  28. package/dist/src/components/table/thead.d.ts.map +1 -1
  29. package/dist/src/components/table/thead.js +0 -1
  30. package/dist/src/config/context.d.ts.map +1 -1
  31. package/dist/src/config/context.js +1 -0
  32. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var F1=Object.defineProperty;var L1=(e,t,n)=>t in e?F1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>L1(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),b=require("react/jsx-runtime"),ua=require("react-dom");function hy(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 A=hy(E),Ys=hy(ua);function my(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=my(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gy(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=my(e))&&(r&&(r+=" "),r+=t);return r}const Op=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_p=gy,Jo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return _p(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Op(u)||Op(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(h=>{let[g,m]=h;return Array.isArray(m)?m.includes({...i,...s}[g]):{...i,...s}[g]===m})?[...c,d,p]:c},[]);return _p(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Mp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function V1(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?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 Ml,Dp;function ei(){return Dp||(Dp=1,Ml=TypeError),Ml}const z1={},$1=Object.freeze(Object.defineProperty({__proto__:null,default:z1},Symbol.toStringTag,{value:"Module"})),B1=V1($1);var Dl,jp;function Ks(){if(jp)return Dl;jp=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,h=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,x=String.prototype.replace,S=String.prototype.toUpperCase,T=String.prototype.toLowerCase,w=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,I=Array.prototype.slice,P=Math.floor,D=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,R=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===R||!0)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,L=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function j(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||w.call(/e/,q))return q;var Le=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var Xe=H<0?-P(-H):P(H);if(Xe!==H){var rt=String(Xe),Oe=v.call(q,rt.length+1);return x.call(rt,Le,"$&_")+"."+x.call(x.call(Oe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(q,Le,"$&_")}var $=B1,_=$.custom,z=Te(_)?_:null,J={__proto__:null,double:'"',single:"'"},te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Dl=function H(q,Le,Xe,rt){var Oe=Le||{};if(ae(Oe,"quoteStyle")&&!ae(J,Oe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ae(Oe,"maxStringLength")&&(typeof Oe.maxStringLength=="number"?Oe.maxStringLength<0&&Oe.maxStringLength!==1/0:Oe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var er=ae(Oe,"customInspect")?Oe.customInspect:!0;if(typeof er!="boolean"&&er!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ae(Oe,"indent")&&Oe.indent!==null&&Oe.indent!==" "&&!(parseInt(Oe.indent,10)===Oe.indent&&Oe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ae(Oe,"numericSeparator")&&typeof Oe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Cr=Oe.numericSeparator;if(typeof q>"u")return"undefined";if(q===null)return"null";if(typeof q=="boolean")return q?"true":"false";if(typeof q=="string")return $e(q,Oe);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var Zt=String(q);return Cr?j(q,Zt):Zt}if(typeof q=="bigint"){var tr=String(q)+"n";return Cr?j(q,tr):tr}var kl=typeof Oe.depth>"u"?5:Oe.depth;if(typeof Xe>"u"&&(Xe=0),Xe>=kl&&kl>0&&typeof q=="object")return G(q)?"[Array]":"[Object]";var lo=Xn(Oe,Xe);if(typeof rt>"u")rt=[];else if(le(rt,q)>=0)return"[Circular]";function pn(co,Pa,N1){if(Pa&&(rt=I.call(rt),rt.push(Pa)),N1){var Ip={depth:Oe.depth};return ae(Oe,"quoteStyle")&&(Ip.quoteStyle=Oe.quoteStyle),H(co,Ip,Xe+1,rt)}return H(co,Oe,Xe+1,rt)}if(typeof q=="function"&&!W(q)){var Sp=K(q),Ep=Jn(q,pn);return"[Function"+(Sp?": "+Sp:" (anonymous)")+"]"+(Ep.length>0?" { "+k.call(Ep,", ")+" }":"")}if(Te(q)){var Cp=R?x.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(q);return typeof q=="object"&&!R?ut(Cp):Cp}if(Re(q)){for(var gi="<"+T.call(String(q.nodeName)),Rl=q.attributes||[],Ra=0;Ra<Rl.length;Ra++)gi+=" "+Rl[Ra].name+"="+ee(Z(Rl[Ra].value),"double",Oe);return gi+=">",q.childNodes&&q.childNodes.length&&(gi+="..."),gi+="</"+T.call(String(q.nodeName))+">",gi}if(G(q)){if(q.length===0)return"[]";var Pl=Jn(q,pn);return lo&&!Sn(Pl)?"["+Qn(Pl,lo)+"]":"[ "+k.call(Pl,", ")+" ]"}if(Y(q)){var Al=Jn(q,pn);return!("cause"in Error.prototype)&&"cause"in q&&!M.call(q,"cause")?"{ ["+String(q)+"] "+k.call(C.call("[cause]: "+pn(q.cause),Al),", ")+" }":Al.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+k.call(Al,", ")+" }"}if(typeof q=="object"&&er){if(z&&typeof q[z]=="function"&&$)return $(q,{depth:kl-Xe});if(er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(Q(q)){var kp=[];return r&&r.call(q,function(co,Pa){kp.push(pn(Pa,q,!0)+" => "+pn(co,q))}),fn("Map",n.call(q),kp,lo)}if(X(q)){var Rp=[];return s&&s.call(q,function(co){Rp.push(pn(co,q))}),fn("Set",a.call(q),Rp,lo)}if(oe(q))return _t("WeakMap");if(ce(q))return _t("WeakSet");if(be(q))return _t("WeakRef");if(B(q))return ut(pn(Number(q)));if(Ie(q))return ut(pn(D.call(q)));if(ye(q))return ut(h.call(q));if(ie(q))return ut(pn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof Mp<"u"&&q===Mp)return"{ [object globalThis] }";if(!F(q)&&!W(q)){var Il=Jn(q,pn),Pp=L?L(q)===Object.prototype:q instanceof Object||q.constructor===Object,Ol=q instanceof Object?"":"null prototype",Ap=!Pp&&O&&Object(q)===q&&O in q?v.call(ve(q),8,-1):Ol?"Object":"",j1=Pp||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",_l=j1+(Ap||Ol?"["+k.call(C.call([],Ap||[],Ol||[]),": ")+"] ":"");return Il.length===0?_l+"{}":lo?_l+"{"+Qn(Il,lo)+"}":_l+"{ "+k.call(Il,", ")+" }"}return String(q)};function ee(H,q,Le){var Xe=Le.quoteStyle||q,rt=J[Xe];return rt+H+rt}function Z(H){return x.call(String(H),/"/g,"&quot;")}function U(H){return!O||!(typeof H=="object"&&(O in H||typeof H[O]<"u"))}function G(H){return ve(H)==="[object Array]"&&U(H)}function F(H){return ve(H)==="[object Date]"&&U(H)}function W(H){return ve(H)==="[object RegExp]"&&U(H)}function Y(H){return ve(H)==="[object Error]"&&U(H)}function ie(H){return ve(H)==="[object String]"&&U(H)}function B(H){return ve(H)==="[object Number]"&&U(H)}function ye(H){return ve(H)==="[object Boolean]"&&U(H)}function Te(H){if(R)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!V)return!1;try{return V.call(H),!0}catch{}return!1}function Ie(H){if(!H||typeof H!="object"||!D)return!1;try{return D.call(H),!0}catch{}return!1}var Fe=Object.prototype.hasOwnProperty||function(H){return H in this};function ae(H,q){return Fe.call(H,q)}function ve(H){return g.call(H)}function K(H){if(H.name)return H.name;var q=y.call(m.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function le(H,q){if(H.indexOf)return H.indexOf(q);for(var Le=0,Xe=H.length;Le<Xe;Le++)if(H[Le]===q)return Le;return-1}function Q(H){if(!n||!H||typeof H!="object")return!1;try{n.call(H);try{a.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function oe(H){if(!c||!H||typeof H!="object")return!1;try{c.call(H,c);try{d.call(H,d)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function be(H){if(!f||!H||typeof H!="object")return!1;try{return f.call(H),!0}catch{}return!1}function X(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function ce(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function Re(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function $e(H,q){if(H.length>q.maxStringLength){var Le=H.length-q.maxStringLength,Xe="... "+Le+" more character"+(Le>1?"s":"");return $e(v.call(H,0,q.maxStringLength),q)+Xe}var rt=te[q.quoteStyle||"single"];rt.lastIndex=0;var Oe=x.call(x.call(H,rt,"\\$1"),/[\x00-\x1f]/g,xt);return ee(Oe,"single",q)}function xt(H){var q=H.charCodeAt(0),Le={8:"b",9:"t",10:"n",12:"f",13:"r"}[q];return Le?"\\"+Le:"\\x"+(q<16?"0":"")+S.call(q.toString(16))}function ut(H){return"Object("+H+")"}function _t(H){return H+" { ? }"}function fn(H,q,Le,Xe){var rt=Xe?Qn(Le,Xe):k.call(Le,", ");return H+" ("+q+") {"+rt+"}"}function Sn(H){for(var q=0;q<H.length;q++)if(le(H[q],`
2
- `)>=0)return!1;return!0}function Xn(H,q){var Le;if(H.indent===" ")Le=" ";else if(typeof H.indent=="number"&&H.indent>0)Le=k.call(Array(H.indent+1)," ");else return null;return{base:Le,prev:k.call(Array(q+1),Le)}}function Qn(H,q){if(H.length===0)return"";var Le=`
3
- `+q.prev+q.base;return Le+k.call(H,","+Le)+`
4
- `+q.prev}function Jn(H,q){var Le=G(H),Xe=[];if(Le){Xe.length=H.length;for(var rt=0;rt<H.length;rt++)Xe[rt]=ae(H,rt)?q(H[rt],H):""}var Oe=typeof N=="function"?N(H):[],er;if(R){er={};for(var Cr=0;Cr<Oe.length;Cr++)er["$"+Oe[Cr]]=Oe[Cr]}for(var Zt in H)ae(H,Zt)&&(Le&&String(Number(Zt))===Zt&&Zt<H.length||R&&er["$"+Zt]instanceof Symbol||(w.call(/[^\w$]/,Zt)?Xe.push(q(Zt,H)+": "+q(H[Zt],H)):Xe.push(Zt+": "+q(H[Zt],H))));if(typeof N=="function")for(var tr=0;tr<Oe.length;tr++)M.call(H,Oe[tr])&&Xe.push("["+q(Oe[tr])+"]: "+q(H[Oe[tr]],H));return Xe}return Dl}var jl,Np;function H1(){if(Np)return jl;Np=1;var e=Ks(),t=ei(),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 jl=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},jl}var Nl,Fp;function yy(){return Fp||(Fp=1,Nl=Object),Nl}var Fl,Lp;function W1(){return Lp||(Lp=1,Fl=Error),Fl}var Ll,Vp;function q1(){return Vp||(Vp=1,Ll=EvalError),Ll}var Vl,zp;function U1(){return zp||(zp=1,Vl=RangeError),Vl}var zl,$p;function G1(){return $p||($p=1,zl=ReferenceError),zl}var $l,Bp;function Y1(){return Bp||(Bp=1,$l=SyntaxError),$l}var Bl,Hp;function K1(){return Hp||(Hp=1,Bl=URIError),Bl}var Hl,Wp;function Z1(){return Wp||(Wp=1,Hl=Math.abs),Hl}var Wl,qp;function X1(){return qp||(qp=1,Wl=Math.floor),Wl}var ql,Up;function Q1(){return Up||(Up=1,ql=Math.max),ql}var Ul,Gp;function J1(){return Gp||(Gp=1,Ul=Math.min),Ul}var Gl,Yp;function eT(){return Yp||(Yp=1,Gl=Math.pow),Gl}var Yl,Kp;function tT(){return Kp||(Kp=1,Yl=Math.round),Yl}var Kl,Zp;function nT(){return Zp||(Zp=1,Kl=Number.isNaN||function(t){return t!==t}),Kl}var Zl,Xp;function rT(){if(Xp)return Zl;Xp=1;var e=nT();return Zl=function(n){return e(n)||n===0?n:n<0?-1:1},Zl}var Xl,Qp;function oT(){return Qp||(Qp=1,Xl=Object.getOwnPropertyDescriptor),Xl}var Ql,Jp;function xy(){if(Jp)return Ql;Jp=1;var e=oT();if(e)try{e([],"length")}catch{e=null}return Ql=e,Ql}var Jl,eh;function iT(){if(eh)return Jl;eh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Jl=e,Jl}var ec,th;function aT(){return th||(th=1,ec=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}),ec}var tc,nh;function sT(){if(nh)return tc;nh=1;var e=typeof Symbol<"u"&&Symbol,t=aT();return tc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},tc}var nc,rh;function by(){return rh||(rh=1,nc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),nc}var rc,oh;function wy(){if(oh)return rc;oh=1;var e=yy();return rc=e.getPrototypeOf||null,rc}var oc,ih;function lT(){if(ih)return oc;ih=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 oc=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 y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),h=[],g=0;g<f;g++)h[g]="$"+g;if(d=Function("binder","return function ("+a(h,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},oc}var ic,ah;function Zs(){if(ah)return ic;ah=1;var e=lT();return ic=Function.prototype.bind||e,ic}var ac,sh;function _d(){return sh||(sh=1,ac=Function.prototype.call),ac}var sc,lh;function Ty(){return lh||(lh=1,sc=Function.prototype.apply),sc}var lc,ch;function cT(){return ch||(ch=1,lc=typeof Reflect<"u"&&Reflect&&Reflect.apply),lc}var cc,uh;function uT(){if(uh)return cc;uh=1;var e=Zs(),t=Ty(),n=_d(),r=cT();return cc=r||e.call(n,t),cc}var uc,dh;function Sy(){if(dh)return uc;dh=1;var e=Zs(),t=ei(),n=_d(),r=uT();return uc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},uc}var dc,fh;function dT(){if(fh)return dc;fh=1;var e=Sy(),t=xy(),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 dc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,dc}var fc,ph;function fT(){if(ph)return fc;ph=1;var e=by(),t=wy(),n=dT();return fc=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,fc}var pc,hh;function pT(){if(hh)return pc;hh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Zs();return pc=n.call(e,t),pc}var hc,mh;function Md(){if(mh)return hc;mh=1;var e,t=yy(),n=W1(),r=q1(),o=U1(),i=G1(),a=Y1(),s=ei(),l=K1(),c=Z1(),u=X1(),d=Q1(),p=J1(),f=eT(),h=tT(),g=rT(),m=Function,y=function(W){try{return m('"use strict"; return ('+W+").constructor;")()}catch{}},v=xy(),x=iT(),S=function(){throw new s},T=v?function(){try{return arguments.callee,S}catch{try{return v(arguments,"callee").get}catch{return S}}}():S,w=sT()(),C=fT(),k=wy(),I=by(),P=Ty(),D=_d(),N={},V=typeof Uint8Array>"u"||!C?e:C(Uint8Array),R={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":w&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%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%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!w||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":v,"%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"||!w||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&C?C(""[Symbol.iterator]()):e,"%Symbol%":w?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":T,"%TypedArray%":V,"%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%":P,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var O=C(C(W));R["%Error.prototype%"]=O}var M=function W(Y){var ie;if(Y==="%AsyncFunction%")ie=y("async function () {}");else if(Y==="%GeneratorFunction%")ie=y("function* () {}");else if(Y==="%AsyncGeneratorFunction%")ie=y("async function* () {}");else if(Y==="%AsyncGenerator%"){var B=W("%AsyncGeneratorFunction%");B&&(ie=B.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ye=W("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return R[Y]=ie,ie},L={__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"]},j=Zs(),$=pT(),_=j.call(D,Array.prototype.concat),z=j.call(P,Array.prototype.splice),J=j.call(D,String.prototype.replace),te=j.call(D,String.prototype.slice),ee=j.call(D,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,G=function(Y){var ie=te(Y,0,1),B=te(Y,-1);if(ie==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return J(Y,Z,function(Te,Ie,Fe,ae){ye[ye.length]=Fe?J(ae,U,"$1"):Ie||Te}),ye},F=function(Y,ie){var B=Y,ye;if($(L,B)&&(ye=L[B],B="%"+ye[0]+"%"),$(R,B)){var Te=R[B];if(Te===N&&(Te=M(B)),typeof Te>"u"&&!ie)throw new s("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ye,name:B,value:Te}}throw new a("intrinsic "+Y+" does not exist!")};return hc=function(Y,ie){if(typeof Y!="string"||Y.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(ee(/^%?[^%]*%?$/,Y)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=G(Y),ye=B.length>0?B[0]:"",Te=F("%"+ye+"%",ie),Ie=Te.name,Fe=Te.value,ae=!1,ve=Te.alias;ve&&(ye=ve[0],z(B,_([0,1],ve)));for(var K=1,le=!0;K<B.length;K+=1){var Q=B[K],oe=te(Q,0,1),be=te(Q,-1);if((oe==='"'||oe==="'"||oe==="`"||be==='"'||be==="'"||be==="`")&&oe!==be)throw new a("property names with quotes must have matching quotes");if((Q==="constructor"||!le)&&(ae=!0),ye+="."+Q,Ie="%"+ye+"%",$(R,Ie))Fe=R[Ie];else if(Fe!=null){if(!(Q in Fe)){if(!ie)throw new s("base intrinsic for "+Y+" exists, but the property is not available.");return}if(v&&K+1>=B.length){var X=v(Fe,Q);le=!!X,le&&"get"in X&&!("originalValue"in X.get)?Fe=X.get:Fe=Fe[Q]}else le=$(Fe,Q),Fe=Fe[Q];le&&!ae&&(R[Ie]=Fe)}}return Fe},hc}var mc,gh;function Ey(){if(gh)return mc;gh=1;var e=Md(),t=Sy(),n=t([e("%String.prototype.indexOf%")]);return mc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},mc}var gc,vh;function Cy(){if(vh)return gc;vh=1;var e=Md(),t=Ey(),n=Ks(),r=ei(),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 gc=!!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 h=l(d,f);return c(d)===0&&(d=void 0),h}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,h){d||(d=new o),a(d,f,h)}};return p},gc}var vc,yh;function hT(){if(yh)return vc;yh=1;var e=Md(),t=Ey(),n=Ks(),r=Cy(),o=ei(),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 vc=i?function(){var d,p,f={assert:function(h){if(!f.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&p)return p.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?a(d,h):p&&p.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!p&&p.has(h)},set:function(h,g){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),s(d,h,g)):r&&(p||(p=r()),p.set(h,g))}};return f}:r,vc}var yc,xh;function mT(){if(xh)return yc;xh=1;var e=ei(),t=Ks(),n=H1(),r=Cy(),o=hT(),i=o||r||n;return yc=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},yc}var bh=e=>Array.isArray(e),xc=e=>e===void 0,bc=e=>e===null,gT=Function.bind.call(Function.call,Object.prototype.toString),vT=e=>!!e&&gT(e)==="[object Error]"||e instanceof Error,ky=(e,t)=>e instanceof t,yT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},xT=e=>Object.prototype.toString.call(e)==="[object Date]"&&ky(e,Date),ct={array:bh,date:xT,empty:e=>bc(e)||xc(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:ky,isError:vT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>bc(e)||xc(e),null:bc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!bh(e)&&typeof e=="object",primitive:yT,string:e=>typeof e=="string",undefined:xc},bT=e=>Object.keys(e),kr=(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};const Dd="-",wT=e=>{const t=ST(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Dd);return s[0]===""&&s.length!==1&&s.shift(),Ry(s,t)||TT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Ry=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ry(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Dd);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},wh=/^\[(.+)\]$/,TT=e=>{if(wh.test(e)){const t=wh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ST=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Cu(n[o],r,o,t);return r},Cu=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Th(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(ET(o)){Cu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Cu(a,Th(t,i),n,r)})})},Th=(e,t)=>{let n=e;return t.split(Dd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ET=e=>e.isThemeGetter,CT=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)}}},ku="!",Ru=":",kT=Ru.length,RT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let h=0;h<o.length;h++){let g=o[h];if(a===0&&s===0){if(g===Ru){i.push(o.slice(l,h)),l=h+kT;continue}if(g==="/"){c=h;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=PT(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+Ru,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},PT=e=>e.endsWith(ku)?e.substring(0,e.length-1):e.startsWith(ku)?e.substring(1):e,AT=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}},IT=e=>({cache:CT(e.cacheSize),parseClassName:RT(e),sortModifiers:AT(e),...wT(e)}),OT=/\s+/,_T=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(OT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!g,y=r(m?h.substring(0,g):h);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(h),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const v=i(p).join(":"),x=f?v+ku:v,S=x+y;if(a.includes(S))continue;a.push(S);const T=o(y,m);for(let w=0;w<T.length;++w){const C=T[w];a.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function MT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Py(t))&&(r&&(r+=" "),r+=n);return r}const Py=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Py(e[r]))&&(n&&(n+=" "),n+=t);return n};function DT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=IT(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=_T(l,n);return o(l,u),u}return function(){return i(MT.apply(null,arguments))}}const At=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ay=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Iy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jT=/^\d+\/\d+$/,NT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FT=/\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$/,LT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,VT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,uo=e=>jT.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),Rr=e=>!!e&&Number.isInteger(Number(e)),Sh=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),nr=e=>NT.test(e),$T=()=>!0,BT=e=>FT.test(e)&&!LT.test(e),jd=()=>!1,HT=e=>VT.test(e),WT=e=>zT.test(e),qT=e=>!he(e)&&!me(e),UT=e=>ti(e,My,jd),he=e=>Ay.test(e),Pr=e=>ti(e,Dy,BT),wc=e=>ti(e,rS,Ne),GT=e=>ti(e,Oy,jd),YT=e=>ti(e,_y,WT),KT=e=>ti(e,jd,HT),me=e=>Iy.test(e),Aa=e=>ni(e,Dy),ZT=e=>ni(e,oS),XT=e=>ni(e,Oy),QT=e=>ni(e,My),JT=e=>ni(e,_y),eS=e=>ni(e,iS,!0),ti=(e,t,n)=>{const r=Ay.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ni=(e,t,n=!1)=>{const r=Iy.exec(e);return r?r[1]?t(r[1]):n:!1},Oy=e=>e==="position",tS=new Set(["image","url"]),_y=e=>tS.has(e),nS=new Set(["length","size","percentage"]),My=e=>nS.has(e),Dy=e=>e==="length",rS=e=>e==="number",oS=e=>e==="family-name",iS=e=>e==="shadow",aS=()=>{const e=At("color"),t=At("font"),n=At("text"),r=At("font-weight"),o=At("tracking"),i=At("leading"),a=At("breakpoint"),s=At("container"),l=At("spacing"),c=At("radius"),u=At("shadow"),d=At("inset-shadow"),p=At("drop-shadow"),f=At("blur"),h=At("perspective"),g=At("aspect"),m=At("ease"),y=At("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],w=()=>[me,he,l],C=()=>[uo,"full","auto",...w()],k=()=>[Rr,"none","subgrid",me,he],I=()=>["auto",{span:["full",Rr,me,he]},me,he],P=()=>[Rr,"auto",me,he],D=()=>["auto","min","max","fr",me,he],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],R=()=>["auto",...w()],O=()=>[uo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],M=()=>[e,me,he],L=()=>[Sh,Pr],j=()=>["","none","full",c,me,he],$=()=>["",Ne,Aa,Pr],_=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["","none",f,me,he],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me,he],ee=()=>["none",Ne,me,he],Z=()=>["none",Ne,me,he],U=()=>[Ne,me,he],G=()=>[uo,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nr],breakpoint:[nr],color:[$T],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[qT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nr],shadow:[nr],spacing:["px",Ne],text:[nr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",uo,he,me,g]}],container:["container"],columns:[{columns:[Ne,he,me,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:[...x(),he,me]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Rr,"auto",me,he]}],basis:[{basis:[uo,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,uo,"auto","initial","none",he]}],grow:[{grow:["",Ne,me,he]}],shrink:[{shrink:["",Ne,me,he]}],order:[{order:[Rr,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen",...O()]}],"min-h":[{"min-h":["screen","none",...O()]}],"max-h":[{"max-h":["screen",...O()]}],"font-size":[{text:["base",n,Aa,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,me,wc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Sh,he]}],"font-family":[{font:[ZT,he,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,me,he]}],"line-clamp":[{"line-clamp":[Ne,"none",me,wc]}],leading:[{leading:[i,...w()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",me,Pr]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Ne,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),XT,GT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",QT,UT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rr,me,he],radial:["",me,he],conic:[Rr,me,he]},JT,YT]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._(),"hidden","none"]}],"divide-style":[{divide:[..._(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[..._(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,me,he]}],"outline-w":[{outline:["",Ne,Aa,Pr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,eS,KT]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",me,he,d]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Ne,Pr]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":M()}],opacity:[{opacity:[Ne,me,he]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none",me,he]}],blur:[{blur:J()}],brightness:[{brightness:[Ne,me,he]}],contrast:[{contrast:[Ne,me,he]}],"drop-shadow":[{"drop-shadow":["","none",p,me,he]}],grayscale:[{grayscale:["",Ne,me,he]}],"hue-rotate":[{"hue-rotate":[Ne,me,he]}],invert:[{invert:["",Ne,me,he]}],saturate:[{saturate:[Ne,me,he]}],sepia:[{sepia:["",Ne,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,me,he]}],"backdrop-invert":[{"backdrop-invert":["",Ne,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",me,he]}],ease:[{ease:["linear","initial",m,me,he]}],delay:[{delay:[Ne,me,he]}],animate:[{animate:["none",y,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,me,he]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"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",me,he]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",me,he]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Ne,Aa,Pr,wc]}],stroke:[{stroke:["none",...M()]}],"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-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-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},sS=DT(aS),Nd=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},lS=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),cS=e=>ct.function(e),Ve=(...e)=>sS(gy(e)),jy=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},da=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Ny=e=>e.scrollHeight>e.clientHeight,uS="span",cn=E.forwardRef(function(t,n){const r=t.as||uS;return b.jsx(r,{ref:n,...t,as:void 0})}),dS=Jo("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"},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-primary text-primary-foreground",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"}}),Io=E.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 b.jsxs(cn,{...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:Ve(dS({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Oo=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function fS(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 pS=({children:e,...t})=>{const n=Oo(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:fS(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),b.jsx("div",{...t,ref:r,children:o?e:null})},hS=Jo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",primary:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),mS=Jo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{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"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),Fd=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return b.jsxs(cn,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Ve(mS({size:a,theme:i}),t),children:[n?b.jsx("span",{"aria-hidden":"true",className:hS({theme:n})}):null,r,s.children]})}),Hi=E.createContext({});function bn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ld=typeof window<"u",Xs=Ld?E.useLayoutEffect:E.useEffect,Qs=E.createContext(null),_o=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class gS extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&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 vS({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(_o);return E.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(`
1
+ "use strict";var dS=Object.defineProperty;var fS=(e,t,n)=>t in e?dS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>fS(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),x=require("react/jsx-runtime"),ha=require("react-dom");function Ry(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=Ry(E),Xs=Ry(ha);function Py(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=Py(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ay(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Py(e))&&(r&&(r+=" "),r+=t);return r}const Hp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wp=Ay,ti=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Wp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Hp(u)||Hp(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(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Wp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var qp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Iy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?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 Vl,Up;function ni(){return Up||(Up=1,Vl=TypeError),Vl}const hS={},mS=Object.freeze(Object.defineProperty({__proto__:null,default:hS},Symbol.toStringTag,{value:"Module"})),gS=pS(mS);var $l,Yp;function Qs(){if(Yp)return $l;Yp=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,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,C=Array.prototype.concat,R=Array.prototype.join,I=Array.prototype.slice,A=Math.floor,O=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,P=typeof Symbol=="function"&&typeof Symbol.iterator=="object",_=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,F=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function j(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||S.call(/e/,q))return q;var Ve=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var Xe=H<0?-A(-H):A(H);if(Xe!==H){var ot=String(Xe),_e=y.call(q,ot.length+1);return b.call(ot,Ve,"$&_")+"."+b.call(b.call(_e,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(q,Ve,"$&_")}var z=gS,M=z.custom,$=Se(M)?M:null,J={__proto__:null,double:'"',single:"'"},te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};$l=function H(q,Ve,Xe,ot){var _e=Ve||{};if(ae(_e,"quoteStyle")&&!ae(J,_e.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ae(_e,"maxStringLength")&&(typeof _e.maxStringLength=="number"?_e.maxStringLength<0&&_e.maxStringLength!==1/0:_e.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var er=ae(_e,"customInspect")?_e.customInspect:!0;if(typeof er!="boolean"&&er!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ae(_e,"indent")&&_e.indent!==null&&_e.indent!==" "&&!(parseInt(_e.indent,10)===_e.indent&&_e.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ae(_e,"numericSeparator")&&typeof _e.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Cr=_e.numericSeparator;if(typeof q>"u")return"undefined";if(q===null)return"null";if(typeof q=="boolean")return q?"true":"false";if(typeof q=="string")return ze(q,_e);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var Zt=String(q);return Cr?j(q,Zt):Zt}if(typeof q=="bigint"){var tr=String(q)+"n";return Cr?j(q,tr):tr}var Ol=typeof _e.depth>"u"?5:_e.depth;if(typeof Xe>"u"&&(Xe=0),Xe>=Ol&&Ol>0&&typeof q=="object")return Y(q)?"[Array]":"[Object]";var co=Xn(_e,Xe);if(typeof ot>"u")ot=[];else if(le(ot,q)>=0)return"[Circular]";function pn(uo,_a,uS){if(_a&&(ot=I.call(ot),ot.push(_a)),uS){var Bp={depth:_e.depth};return ae(_e,"quoteStyle")&&(Bp.quoteStyle=_e.quoteStyle),H(uo,Bp,Xe+1,ot)}return H(uo,_e,Xe+1,ot)}if(typeof q=="function"&&!W(q)){var jp=K(q),Np=Jn(q,pn);return"[Function"+(jp?": "+jp:" (anonymous)")+"]"+(Np.length>0?" { "+R.call(Np,", ")+" }":"")}if(Se(q)){var Fp=P?b.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(q);return typeof q=="object"&&!P?ut(Fp):Fp}if(Re(q)){for(var bi="<"+w.call(String(q.nodeName)),Ml=q.attributes||[],Ia=0;Ia<Ml.length;Ia++)bi+=" "+Ml[Ia].name+"="+ee(Z(Ml[Ia].value),"double",_e);return bi+=">",q.childNodes&&q.childNodes.length&&(bi+="..."),bi+="</"+w.call(String(q.nodeName))+">",bi}if(Y(q)){if(q.length===0)return"[]";var Dl=Jn(q,pn);return co&&!Tn(Dl)?"["+Qn(Dl,co)+"]":"[ "+R.call(Dl,", ")+" ]"}if(G(q)){var jl=Jn(q,pn);return!("cause"in Error.prototype)&&"cause"in q&&!D.call(q,"cause")?"{ ["+String(q)+"] "+R.call(C.call("[cause]: "+pn(q.cause),jl),", ")+" }":jl.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+R.call(jl,", ")+" }"}if(typeof q=="object"&&er){if($&&typeof q[$]=="function"&&z)return z(q,{depth:Ol-Xe});if(er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(Q(q)){var Lp=[];return r&&r.call(q,function(uo,_a){Lp.push(pn(_a,q,!0)+" => "+pn(uo,q))}),fn("Map",n.call(q),Lp,co)}if(X(q)){var Vp=[];return s&&s.call(q,function(uo){Vp.push(pn(uo,q))}),fn("Set",a.call(q),Vp,co)}if(oe(q))return Ot("WeakMap");if(ce(q))return Ot("WeakSet");if(be(q))return Ot("WeakRef");if(B(q))return ut(pn(Number(q)));if(Ie(q))return ut(pn(O.call(q)));if(ye(q))return ut(m.call(q));if(ie(q))return ut(pn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof qp<"u"&&q===qp)return"{ [object globalThis] }";if(!L(q)&&!W(q)){var Nl=Jn(q,pn),$p=F?F(q)===Object.prototype:q instanceof Object||q.constructor===Object,Fl=q instanceof Object?"":"null prototype",zp=!$p&&_&&Object(q)===q&&_ in q?y.call(ve(q),8,-1):Fl?"Object":"",cS=$p||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",Ll=cS+(zp||Fl?"["+R.call(C.call([],zp||[],Fl||[]),": ")+"] ":"");return Nl.length===0?Ll+"{}":co?Ll+"{"+Qn(Nl,co)+"}":Ll+"{ "+R.call(Nl,", ")+" }"}return String(q)};function ee(H,q,Ve){var Xe=Ve.quoteStyle||q,ot=J[Xe];return ot+H+ot}function Z(H){return b.call(String(H),/"/g,"&quot;")}function U(H){return!_||!(typeof H=="object"&&(_ in H||typeof H[_]<"u"))}function Y(H){return ve(H)==="[object Array]"&&U(H)}function L(H){return ve(H)==="[object Date]"&&U(H)}function W(H){return ve(H)==="[object RegExp]"&&U(H)}function G(H){return ve(H)==="[object Error]"&&U(H)}function ie(H){return ve(H)==="[object String]"&&U(H)}function B(H){return ve(H)==="[object Number]"&&U(H)}function ye(H){return ve(H)==="[object Boolean]"&&U(H)}function Se(H){if(P)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!V)return!1;try{return V.call(H),!0}catch{}return!1}function Ie(H){if(!H||typeof H!="object"||!O)return!1;try{return O.call(H),!0}catch{}return!1}var Le=Object.prototype.hasOwnProperty||function(H){return H in this};function ae(H,q){return Le.call(H,q)}function ve(H){return g.call(H)}function K(H){if(H.name)return H.name;var q=v.call(h.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function le(H,q){if(H.indexOf)return H.indexOf(q);for(var Ve=0,Xe=H.length;Ve<Xe;Ve++)if(H[Ve]===q)return Ve;return-1}function Q(H){if(!n||!H||typeof H!="object")return!1;try{n.call(H);try{a.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function oe(H){if(!c||!H||typeof H!="object")return!1;try{c.call(H,c);try{d.call(H,d)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function be(H){if(!f||!H||typeof H!="object")return!1;try{return f.call(H),!0}catch{}return!1}function X(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function ce(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function Re(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function ze(H,q){if(H.length>q.maxStringLength){var Ve=H.length-q.maxStringLength,Xe="... "+Ve+" more character"+(Ve>1?"s":"");return ze(y.call(H,0,q.maxStringLength),q)+Xe}var ot=te[q.quoteStyle||"single"];ot.lastIndex=0;var _e=b.call(b.call(H,ot,"\\$1"),/[\x00-\x1f]/g,xt);return ee(_e,"single",q)}function xt(H){var q=H.charCodeAt(0),Ve={8:"b",9:"t",10:"n",12:"f",13:"r"}[q];return Ve?"\\"+Ve:"\\x"+(q<16?"0":"")+T.call(q.toString(16))}function ut(H){return"Object("+H+")"}function Ot(H){return H+" { ? }"}function fn(H,q,Ve,Xe){var ot=Xe?Qn(Ve,Xe):R.call(Ve,", ");return H+" ("+q+") {"+ot+"}"}function Tn(H){for(var q=0;q<H.length;q++)if(le(H[q],`
2
+ `)>=0)return!1;return!0}function Xn(H,q){var Ve;if(H.indent===" ")Ve=" ";else if(typeof H.indent=="number"&&H.indent>0)Ve=R.call(Array(H.indent+1)," ");else return null;return{base:Ve,prev:R.call(Array(q+1),Ve)}}function Qn(H,q){if(H.length===0)return"";var Ve=`
3
+ `+q.prev+q.base;return Ve+R.call(H,","+Ve)+`
4
+ `+q.prev}function Jn(H,q){var Ve=Y(H),Xe=[];if(Ve){Xe.length=H.length;for(var ot=0;ot<H.length;ot++)Xe[ot]=ae(H,ot)?q(H[ot],H):""}var _e=typeof N=="function"?N(H):[],er;if(P){er={};for(var Cr=0;Cr<_e.length;Cr++)er["$"+_e[Cr]]=_e[Cr]}for(var Zt in H)ae(H,Zt)&&(Ve&&String(Number(Zt))===Zt&&Zt<H.length||P&&er["$"+Zt]instanceof Symbol||(S.call(/[^\w$]/,Zt)?Xe.push(q(Zt,H)+": "+q(H[Zt],H)):Xe.push(Zt+": "+q(H[Zt],H))));if(typeof N=="function")for(var tr=0;tr<_e.length;tr++)D.call(H,_e[tr])&&Xe.push("["+q(_e[tr])+"]: "+q(H[_e[tr]],H));return Xe}return $l}var zl,Gp;function vS(){if(Gp)return zl;Gp=1;var e=Qs(),t=ni(),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 zl=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},zl}var Bl,Kp;function _y(){return Kp||(Kp=1,Bl=Object),Bl}var Hl,Zp;function yS(){return Zp||(Zp=1,Hl=Error),Hl}var Wl,Xp;function xS(){return Xp||(Xp=1,Wl=EvalError),Wl}var ql,Qp;function bS(){return Qp||(Qp=1,ql=RangeError),ql}var Ul,Jp;function wS(){return Jp||(Jp=1,Ul=ReferenceError),Ul}var Yl,eh;function SS(){return eh||(eh=1,Yl=SyntaxError),Yl}var Gl,th;function TS(){return th||(th=1,Gl=URIError),Gl}var Kl,nh;function ES(){return nh||(nh=1,Kl=Math.abs),Kl}var Zl,rh;function CS(){return rh||(rh=1,Zl=Math.floor),Zl}var Xl,oh;function kS(){return oh||(oh=1,Xl=Math.max),Xl}var Ql,ih;function RS(){return ih||(ih=1,Ql=Math.min),Ql}var Jl,ah;function PS(){return ah||(ah=1,Jl=Math.pow),Jl}var ec,sh;function AS(){return sh||(sh=1,ec=Math.round),ec}var tc,lh;function IS(){return lh||(lh=1,tc=Number.isNaN||function(t){return t!==t}),tc}var nc,ch;function _S(){if(ch)return nc;ch=1;var e=IS();return nc=function(n){return e(n)||n===0?n:n<0?-1:1},nc}var rc,uh;function OS(){return uh||(uh=1,rc=Object.getOwnPropertyDescriptor),rc}var oc,dh;function Oy(){if(dh)return oc;dh=1;var e=OS();if(e)try{e([],"length")}catch{e=null}return oc=e,oc}var ic,fh;function MS(){if(fh)return ic;fh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ic=e,ic}var ac,ph;function DS(){return ph||(ph=1,ac=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}),ac}var sc,hh;function jS(){if(hh)return sc;hh=1;var e=typeof Symbol<"u"&&Symbol,t=DS();return sc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},sc}var lc,mh;function My(){return mh||(mh=1,lc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),lc}var cc,gh;function Dy(){if(gh)return cc;gh=1;var e=_y();return cc=e.getPrototypeOf||null,cc}var uc,vh;function NS(){if(vh)return uc;vh=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 uc=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),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},uc}var dc,yh;function Js(){if(yh)return dc;yh=1;var e=NS();return dc=Function.prototype.bind||e,dc}var fc,xh;function Bd(){return xh||(xh=1,fc=Function.prototype.call),fc}var pc,bh;function jy(){return bh||(bh=1,pc=Function.prototype.apply),pc}var hc,wh;function FS(){return wh||(wh=1,hc=typeof Reflect<"u"&&Reflect&&Reflect.apply),hc}var mc,Sh;function LS(){if(Sh)return mc;Sh=1;var e=Js(),t=jy(),n=Bd(),r=FS();return mc=r||e.call(n,t),mc}var gc,Th;function Ny(){if(Th)return gc;Th=1;var e=Js(),t=ni(),n=Bd(),r=LS();return gc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},gc}var vc,Eh;function VS(){if(Eh)return vc;Eh=1;var e=Ny(),t=Oy(),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 vc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,vc}var yc,Ch;function $S(){if(Ch)return yc;Ch=1;var e=My(),t=Dy(),n=VS();return yc=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,yc}var xc,kh;function zS(){if(kh)return xc;kh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Js();return xc=n.call(e,t),xc}var bc,Rh;function Hd(){if(Rh)return bc;Rh=1;var e,t=_y(),n=yS(),r=xS(),o=bS(),i=wS(),a=SS(),s=ni(),l=TS(),c=ES(),u=CS(),d=kS(),p=RS(),f=PS(),m=AS(),g=_S(),h=Function,v=function(W){try{return h('"use strict"; return ('+W+").constructor;")()}catch{}},y=Oy(),b=MS(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,S=jS()(),C=$S(),R=Dy(),I=My(),A=jy(),O=Bd(),N={},V=typeof Uint8Array>"u"||!C?e:C(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":S&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!C?e:C(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"||!S||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&C?C(""[Symbol.iterator]()):e,"%Symbol%":S?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":V,"%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%":O,"%Function.prototype.apply%":A,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":R,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var _=C(C(W));P["%Error.prototype%"]=_}var D=function W(G){var ie;if(G==="%AsyncFunction%")ie=v("async function () {}");else if(G==="%GeneratorFunction%")ie=v("function* () {}");else if(G==="%AsyncGeneratorFunction%")ie=v("async function* () {}");else if(G==="%AsyncGenerator%"){var B=W("%AsyncGeneratorFunction%");B&&(ie=B.prototype)}else if(G==="%AsyncIteratorPrototype%"){var ye=W("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return P[G]=ie,ie},F={__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"]},j=Js(),z=zS(),M=j.call(O,Array.prototype.concat),$=j.call(A,Array.prototype.splice),J=j.call(O,String.prototype.replace),te=j.call(O,String.prototype.slice),ee=j.call(O,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Y=function(G){var ie=te(G,0,1),B=te(G,-1);if(ie==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return J(G,Z,function(Se,Ie,Le,ae){ye[ye.length]=Le?J(ae,U,"$1"):Ie||Se}),ye},L=function(G,ie){var B=G,ye;if(z(F,B)&&(ye=F[B],B="%"+ye[0]+"%"),z(P,B)){var Se=P[B];if(Se===N&&(Se=D(B)),typeof Se>"u"&&!ie)throw new s("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:ye,name:B,value:Se}}throw new a("intrinsic "+G+" does not exist!")};return bc=function(G,ie){if(typeof G!="string"||G.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(ee(/^%?[^%]*%?$/,G)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=Y(G),ye=B.length>0?B[0]:"",Se=L("%"+ye+"%",ie),Ie=Se.name,Le=Se.value,ae=!1,ve=Se.alias;ve&&(ye=ve[0],$(B,M([0,1],ve)));for(var K=1,le=!0;K<B.length;K+=1){var Q=B[K],oe=te(Q,0,1),be=te(Q,-1);if((oe==='"'||oe==="'"||oe==="`"||be==='"'||be==="'"||be==="`")&&oe!==be)throw new a("property names with quotes must have matching quotes");if((Q==="constructor"||!le)&&(ae=!0),ye+="."+Q,Ie="%"+ye+"%",z(P,Ie))Le=P[Ie];else if(Le!=null){if(!(Q in Le)){if(!ie)throw new s("base intrinsic for "+G+" exists, but the property is not available.");return}if(y&&K+1>=B.length){var X=y(Le,Q);le=!!X,le&&"get"in X&&!("originalValue"in X.get)?Le=X.get:Le=Le[Q]}else le=z(Le,Q),Le=Le[Q];le&&!ae&&(P[Ie]=Le)}}return Le},bc}var wc,Ph;function Fy(){if(Ph)return wc;Ph=1;var e=Hd(),t=Ny(),n=t([e("%String.prototype.indexOf%")]);return wc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},wc}var Sc,Ah;function Ly(){if(Ah)return Sc;Ah=1;var e=Hd(),t=Fy(),n=Qs(),r=ni(),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 Sc=!!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 m=l(d,f);return c(d)===0&&(d=void 0),m}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,m){d||(d=new o),a(d,f,m)}};return p},Sc}var Tc,Ih;function BS(){if(Ih)return Tc;Ih=1;var e=Hd(),t=Fy(),n=Qs(),r=Ly(),o=ni(),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 Tc=i?function(){var d,p,f={assert:function(m){if(!f.has(m))throw new o("Side channel does not contain "+n(m))},delete:function(m){if(i&&m&&(typeof m=="object"||typeof m=="function")){if(d)return c(d,m)}else if(r&&p)return p.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):p&&p.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!p&&p.has(m)},set:function(m,g){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),s(d,m,g)):r&&(p||(p=r()),p.set(m,g))}};return f}:r,Tc}var Ec,_h;function HS(){if(_h)return Ec;_h=1;var e=ni(),t=Qs(),n=vS(),r=Ly(),o=BS(),i=o||r||n;return Ec=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},Ec}var Oh=e=>Array.isArray(e),Cc=e=>e===void 0,kc=e=>e===null,WS=Function.bind.call(Function.call,Object.prototype.toString),qS=e=>!!e&&WS(e)==="[object Error]"||e instanceof Error,Vy=(e,t)=>e instanceof t,US=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},YS=e=>Object.prototype.toString.call(e)==="[object Date]"&&Vy(e,Date),nt={array:Oh,date:YS,empty:e=>kc(e)||Cc(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:Vy,isError:qS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>kc(e)||Cc(e),null:kc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Oh(e)&&typeof e=="object",primitive:US,string:e=>typeof e=="string",undefined:Cc},GS=e=>Object.keys(e),kr=(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};const Wd="-",KS=e=>{const t=XS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Wd);return s[0]===""&&s.length!==1&&s.shift(),$y(s,t)||ZS(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},$y=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$y(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Wd);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Mh=/^\[(.+)\]$/,ZS=e=>{if(Mh.test(e)){const t=Mh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},XS=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)_u(n[o],r,o,t);return r},_u=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Dh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(QS(o)){_u(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{_u(a,Dh(t,i),n,r)})})},Dh=(e,t)=>{let n=e;return t.split(Wd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},QS=e=>e.isThemeGetter,JS=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)}}},Ou="!",Mu=":",eT=Mu.length,tT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let m=0;m<o.length;m++){let g=o[m];if(a===0&&s===0){if(g===Mu){i.push(o.slice(l,m)),l=m+eT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=nT(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+Mu,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},nT=e=>e.endsWith(Ou)?e.substring(0,e.length-1):e.startsWith(Ou)?e.substring(1):e,rT=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}},oT=e=>({cache:JS(e.cacheSize),parseClassName:tT(e),sortModifiers:rT(e),...KS(e)}),iT=/\s+/,aT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(iT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?m.substring(0,g):m);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const y=i(p).join(":"),b=f?y+Ou:y,T=b+v;if(a.includes(T))continue;a.push(T);const w=o(v,h);for(let S=0;S<w.length;++S){const C=w[S];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function sT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zy(t))&&(r&&(r+=" "),r+=n);return r}const zy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zy(e[r]))&&(n&&(n+=" "),n+=t);return n};function lT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=oT(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=aT(l,n);return o(l,u),u}return function(){return i(sT.apply(null,arguments))}}const At=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},By=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cT=/^\d+\/\d+$/,uT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dT=/\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$/,fT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,pT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=e=>cT.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Rr=e=>!!e&&Number.isInteger(Number(e)),jh=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),nr=e=>uT.test(e),mT=()=>!0,gT=e=>dT.test(e)&&!fT.test(e),qd=()=>!1,vT=e=>pT.test(e),yT=e=>hT.test(e),xT=e=>!he(e)&&!me(e),bT=e=>ri(e,Uy,qd),he=e=>By.test(e),Pr=e=>ri(e,Yy,gT),Rc=e=>ri(e,_T,Fe),wT=e=>ri(e,Wy,qd),ST=e=>ri(e,qy,yT),TT=e=>ri(e,qd,vT),me=e=>Hy.test(e),Oa=e=>oi(e,Yy),ET=e=>oi(e,OT),CT=e=>oi(e,Wy),kT=e=>oi(e,Uy),RT=e=>oi(e,qy),PT=e=>oi(e,MT,!0),ri=(e,t,n)=>{const r=By.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},oi=(e,t,n=!1)=>{const r=Hy.exec(e);return r?r[1]?t(r[1]):n:!1},Wy=e=>e==="position",AT=new Set(["image","url"]),qy=e=>AT.has(e),IT=new Set(["length","size","percentage"]),Uy=e=>IT.has(e),Yy=e=>e==="length",_T=e=>e==="number",OT=e=>e==="family-name",MT=e=>e==="shadow",DT=()=>{const e=At("color"),t=At("font"),n=At("text"),r=At("font-weight"),o=At("tracking"),i=At("leading"),a=At("breakpoint"),s=At("container"),l=At("spacing"),c=At("radius"),u=At("shadow"),d=At("inset-shadow"),p=At("drop-shadow"),f=At("blur"),m=At("perspective"),g=At("aspect"),h=At("ease"),v=At("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],S=()=>[me,he,l],C=()=>[fo,"full","auto",...S()],R=()=>[Rr,"none","subgrid",me,he],I=()=>["auto",{span:["full",Rr,me,he]},me,he],A=()=>[Rr,"auto",me,he],O=()=>["auto","min","max","fr",me,he],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],P=()=>["auto",...S()],_=()=>[fo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],D=()=>[e,me,he],F=()=>[jh,Pr],j=()=>["","none","full",c,me,he],z=()=>["",Fe,Oa,Pr],M=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["","none",f,me,he],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me,he],ee=()=>["none",Fe,me,he],Z=()=>["none",Fe,me,he],U=()=>[Fe,me,he],Y=()=>[fo,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nr],breakpoint:[nr],color:[mT],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[xT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nr],shadow:[nr],spacing:["px",Fe],text:[nr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fo,he,me,g]}],container:["container"],columns:[{columns:[Fe,he,me,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:[...b(),he,me]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Rr,"auto",me,he]}],basis:[{basis:[fo,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,fo,"auto","initial","none",he]}],grow:[{grow:["",Fe,me,he]}],shrink:[{shrink:["",Fe,me,he]}],order:[{order:[Rr,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[s,"screen",..._()]}],"min-w":[{"min-w":[s,"screen","none",..._()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},..._()]}],h:[{h:["screen",..._()]}],"min-h":[{"min-h":["screen","none",..._()]}],"max-h":[{"max-h":["screen",..._()]}],"font-size":[{text:["base",n,Oa,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,me,Rc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jh,he]}],"font-family":[{font:[ET,he,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,me,he]}],"line-clamp":[{"line-clamp":[Fe,"none",me,Rc]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",me,Pr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Fe,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),CT,wT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",kT,bT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rr,me,he],radial:["",me,he],conic:[Rr,me,he]},RT,ST]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"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:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,me,he]}],"outline-w":[{outline:["",Fe,Oa,Pr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,PT,TT]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",me,he,d]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Fe,Pr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":D()}],opacity:[{opacity:[Fe,me,he]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none",me,he]}],blur:[{blur:J()}],brightness:[{brightness:[Fe,me,he]}],contrast:[{contrast:[Fe,me,he]}],"drop-shadow":[{"drop-shadow":["","none",p,me,he]}],grayscale:[{grayscale:["",Fe,me,he]}],"hue-rotate":[{"hue-rotate":[Fe,me,he]}],invert:[{invert:["",Fe,me,he]}],saturate:[{saturate:[Fe,me,he]}],sepia:[{sepia:["",Fe,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,me,he]}],"backdrop-invert":[{"backdrop-invert":["",Fe,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",me,he]}],ease:[{ease:["linear","initial",h,me,he]}],delay:[{delay:[Fe,me,he]}],animate:[{animate:["none",v,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,me,he]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",me,he]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",me,he]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Fe,Oa,Pr,Rc]}],stroke:[{stroke:["none",...D()]}],"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-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-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},jT=lT(DT),el=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},NT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),FT=e=>nt.function(e),je=(...e)=>jT(Ay(e)),Gy=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},ma=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Ky=e=>e.scrollHeight>e.clientHeight,LT="span",cn=E.forwardRef(function(t,n){const r=t.as||LT;return x.jsx(r,{ref:n,...t,as:void 0})}),VT=ti("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"},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-primary text-primary-foreground",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"}}),Oo=E.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 x.jsxs(cn,{...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:je(VT({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Mo=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function $T(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 zT=({children:e,...t})=>{const n=Mo(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:$T(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},BT=ti("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",primary:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),HT=ti("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{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"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),Ud=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return x.jsxs(cn,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:je(HT({size:a,theme:i}),t),children:[n?x.jsx("span",{"aria-hidden":"true",className:BT({theme:n})}):null,r,s.children]})}),Yi=E.createContext({});function bn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yd=typeof window<"u",tl=Yd?E.useLayoutEffect:E.useEffect,nl=E.createContext(null),Do=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class WT extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&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 qT({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(Do);return E.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(`
5
5
  [data-motion-pop-id="${r}"] {
6
6
  position: absolute !important;
7
7
  width: ${s}px !important;
@@ -9,132 +9,132 @@
9
9
  ${p}px !important;
10
10
  top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(f)}},[t]),b.jsx(gS,{isPresent:t,childRef:o,sizeRef:i,children:A.cloneElement(e,{ref:o})})}const yS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(xS),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),A.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=b.jsx(vS,{isPresent:n,anchorX:s,children:e})),b.jsx(Qs.Provider,{value:d,children:e})};function xS(){return new Map}function Fy(e=!0){const t=E.useContext(Qs);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Ia=e=>e.key||"";function Eh(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const vr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=Fy(a),u=E.useMemo(()=>Eh(e),[e]),d=a&&!l?[]:u.map(Ia),p=E.useRef(!0),f=E.useRef(u),h=bn(()=>new Map),[g,m]=E.useState(u),[y,v]=E.useState(u);Xs(()=>{p.current=!1,f.current=u;for(let T=0;T<y.length;T++){const w=Ia(y[T]);d.includes(w)?h.delete(w):h.get(w)!==!0&&h.set(w,!1)}},[y,d.length,d.join("-")]);const x=[];if(u!==g){let T=[...u];for(let w=0;w<y.length;w++){const C=y[w],k=Ia(C);d.includes(k)||(T.splice(w,0,C),x.push(C))}return i==="wait"&&x.length&&(T=x),v(Eh(T)),m(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&y.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:S}=E.useContext(Hi);return b.jsx(b.Fragment,{children:y.map(T=>{const w=Ia(T),C=a&&!l?!1:u===y||d.includes(w),k=()=>{if(h.has(w))h.set(w,!0);else return;let I=!0;h.forEach(P=>{P||(I=!1)}),I&&(S==null||S(),v(f.current),a&&(c==null||c()),r&&r())};return b.jsx(yS,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:T},w)})})},bS=E.createContext(null),Gt=e=>e;let ri=Gt,dn=Gt;process.env.NODE_ENV!=="production"&&(ri=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},dn=(e,t)=>{if(!e)throw new Error(t)});const wS={useManualTiming:!1},Oa=["read","resolveKeyframes","update","preRender","render","postRender"];function TS(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 h=p&&o?n:r;return d&&a.add(u),h.has(u)||h.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 SS=40;function Ly(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Oa.reduce((y,v)=>(y[v]=TS(i),y),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,SS),1),o.timestamp=y,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},h=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Oa.reduce((y,v)=>{const x=a[v];return y[v]=(S,T=!1,w=!1)=>(n||h(),x.schedule(S,T,w)),y},{}),cancel:y=>{for(let v=0;v<Oa.length;v++)a[Oa[v]].cancel(y)},state:o,steps:a}}const{schedule:Je,cancel:Wn,state:Mt,steps:Tc}=Ly(typeof requestAnimationFrame<"u"?requestAnimationFrame:Gt,!0);function ES(){const e=E.useRef(!1);return Xs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function CS(){const e=ES(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Je.postRender(r),[r]),t]}const kS=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Ch(){const e=new Set,t=new WeakMap,n=()=>e.forEach(kS);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 Vy=e=>e===!0,RS=e=>Vy(e===!0)||e==="id",PS=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Hi),o=E.useContext(bS),[i,a]=CS(),s=E.useRef(null),l=r.id||o;s.current===null&&(RS(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Vy(n)&&r.group||Ch()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return b.jsx(Hi.Provider,{value:c,children:e})},zy=E.createContext({strict:!1}),kh={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"]},Mo={};for(const e in kh)Mo[e]={isEnabled:t=>kh[e].some(n=>!!t[n])};function AS(e){for(const t in e)Mo[t]={...Mo[t],...e[t]}}const IS=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 as(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||IS.has(e)}let $y=e=>!as(e);function By(e){e&&($y=t=>t.startsWith("on")?!as(t):e(t))}try{By(require("@emotion/is-prop-valid").default)}catch{}function OS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||($y(o)||n===!0&&as(o)||!t&&!as(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function _S({children:e,isValidProp:t,...n}){t&&By(t),n={...E.useContext(_o),...n},n.isStatic=bn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return b.jsx(_o.Provider,{value:r,children:e})}const Rh=new Set;function Js(e,t,n){e||Rh.has(t)||(console.warn(t),Rh.add(t))}function MS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Js(!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 el=E.createContext({});function tl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Wi(e){return typeof e=="string"||Array.isArray(e)}const Vd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zd=["initial",...Vd];function nl(e){return tl(e.animate)||zd.some(t=>Wi(e[t]))}function Hy(e){return!!(nl(e)||e.variants)}function DS(e,t){if(nl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wi(n)?n:void 0,animate:Wi(r)?r:void 0}}return e.inherit!==!1?t:{}}function jS(e){const{initial:t,animate:n}=DS(e,E.useContext(el));return E.useMemo(()=>({initial:t,animate:n}),[Ph(t),Ph(n)])}function Ph(e){return Array.isArray(e)?e.join(" "):e}const NS=Symbol.for("motionComponentSymbol");function yo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function FS(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):yo(n)&&(n.current=r))},[t])}const{schedule:$d}=Ly(queueMicrotask,!1),Bd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),LS="framerAppearId",Wy="data-"+Bd(LS),qy=E.createContext({});function VS(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(el),l=E.useContext(zy),c=E.useContext(Qs),u=E.useContext(_o).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(qy);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&zS(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,c)});const g=n[Wy],m=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return Xs(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),$d.render(p.render),m.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),m.current=!1))}),p}function zS(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Uy(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&yo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Uy(e){if(e)return e.options.allowProjection!==!1?e.projection:Uy(e.parent)}function $S({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&AS(e);function s(c,u){let d;const p={...E.useContext(_o),...c,layoutId:BS(c)},{isStatic:f}=p,h=jS(c),g=r(c,f);if(!f&&Ld){HS(p,e);const m=WS(p);d=m.MeasureLayout,h.visualElement=VS(o,g,p,t,m.ProjectionNode)}return b.jsxs(el.Provider,{value:h,children:[d&&h.visualElement?b.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,c,FS(g,h.visualElement,u),g,f,h.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[NS]=o,l}function BS({layoutId:e}){const t=E.useContext(Hi).id;return t&&e!==void 0?t+"-"+e:e}function HS(e,t){const n=E.useContext(zy).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?ri(!1,r):dn(!1,r)}}function WS(e){const{drag:t,layout:n}=Mo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Gy=e=>t=>typeof t=="string"&&t.startsWith(e),Hd=Gy("--"),qS=Gy("var(--"),Wd=e=>qS(e)?US.test(e.split("/*")[0].trim()):!1,US=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,qi={};function GS(e){for(const t in e)qi[t]=e[t],Hd(t)&&(qi[t].isCSSVariable=!0)}const oi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Jr=new Set(oi);function Yy(e,{layout:t,layoutId:n}){return Jr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qi[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),Ky=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,ii={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ui={...ii,transform:e=>qn(0,1,e)},_a={...ii,default:1},fa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),or=fa("deg"),On=fa("%"),we=fa("px"),YS=fa("vh"),KS=fa("vw"),Ah={...On,parse:e=>On.parse(e)/100,transform:e=>On.transform(e*100)},ZS={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},XS={rotate:or,rotateX:or,rotateY:or,rotateZ:or,scale:_a,scaleX:_a,scaleY:_a,scaleZ:_a,skew:or,skewX:or,skewY:or,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Ui,originX:Ah,originY:Ah,originZ:we},Ih={...ii,transform:Math.round},qd={...ZS,...XS,zIndex:Ih,size:we,fillOpacity:Ui,strokeOpacity:Ui,numOctaves:Ih},QS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},JS=oi.length;function eE(e,t,n){let r="",o=!0;for(let i=0;i<JS;i++){const a=oi[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=Ky(s,qd[a]);if(!l){o=!1;const u=QS[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Ud(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(Jr.has(l)){a=!0;continue}else if(Hd(l)){o[l]=c;continue}else{const u=Ky(c,qd[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=eE(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 Gd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zy(e,t,n){for(const r in t)!Pt(t[r])&&!Yy(r,n)&&(e[r]=t[r])}function tE({transformTemplate:e},t){return E.useMemo(()=>{const n=Gd();return Ud(n,t,e),Object.assign({},n.vars,n.style)},[t])}function nE(e,t){const n=e.style||{},r={};return Zy(r,n,e),Object.assign(r,tE(e,t)),r}function rE(e,t){const n={},r=nE(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 oE=["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 Yd(e){return typeof e!="string"||e.includes("-")?!1:!!(oE.indexOf(e)>-1||/[A-Z]/u.test(e))}const iE={offset:"stroke-dashoffset",array:"stroke-dasharray"},aE={offset:"strokeDashoffset",array:"strokeDasharray"};function sE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?iE:aE;e[i.offset]=we.transform(-r);const a=we.transform(t),s=we.transform(n);e[i.array]=`${a} ${s}`}function Oh(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function lE(e,t,n){const r=Oh(t,e.x,e.width),o=Oh(n,e.y,e.height);return`${r} ${o}`}function Kd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Ud(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:h}=e;p.transform&&(h&&(f.transform=p.transform),delete p.transform),h&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=lE(h,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&sE(p,a,s,l,!1)}const Xy=()=>({...Gd(),attrs:{}}),Zd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cE(e,t,n,r){const o=E.useMemo(()=>{const i=Xy();return Kd(i,t,Zd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Zy(i,e.style,e),o.style={...i,...o.style}}return o}function uE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Yd(n)?cE:rE)(r,i,a,n),c=OS(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>Pt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function _h(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Xd(e,t,n,r){if(typeof t=="function"){const[o,i]=_h(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]=_h(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Pu=e=>Array.isArray(e),dE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fE=e=>Pu(e)?e[e.length-1]||0:e;function Xa(e){const t=Pt(e)?e.get():e;return dE(t)?t.toValue():t}function pE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:hE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const Qy=e=>(t,n)=>{const r=E.useContext(el),o=E.useContext(Qs),i=()=>pE(e,t,r,o);return n?i():bn(i)};function hE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Xa(i[p]);let{initial:a,animate:s}=e;const l=nl(e),c=Hy(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"&&!tl(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=Xd(e,p[f]);if(h){const{transitionEnd:g,transition:m,...y}=h;for(const v in y){let x=y[v];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(o[v]=x)}for(const v in g)o[v]=g[v]}}}return o}function Qd(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||Yy(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const mE={useVisualState:Qy({scrapeMotionValuesFromProps:Qd,createRenderState:Gd})};function Jy(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ex(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])}const tx=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 nx(e,t,n,r){ex(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(tx.has(o)?o:Bd(o),t.attrs[o])}function rx(e,t,n){const r=Qd(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=oi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Mh=["x","y","width","height","cx","cy","r"],gE={useVisualState:Qy({scrapeMotionValuesFromProps:rx,createRenderState:Xy,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(Jr.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Mh.length;s++){const l=Mh[s];e[l]!==t[l]&&(a=!0)}a&&Je.read(()=>{Jy(n,r),Je.render(()=>{Kd(r,o,Zd(n.tagName),e.transformTemplate),nx(n,r)})})}})};function vE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Yd(r)?gE:mE,preloadedFeatures:e,useRender:uE(o),createVisualElement:t,Component:r};return $S(a)}}function Gi(e,t,n){const r=e.getProps();return Xd(r,t,n!==void 0?n:r.custom,e)}function Jd(e,t){return e?e[t]||e.default||e:void 0}const ox=new Set(["width","height","top","left","right","bottom",...oi]);function ef(e,t){e.indexOf(t)===-1&&e.push(t)}function rl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function yE([...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}class tf{constructor(){this.subscriptions=[]}add(t){return ef(this.subscriptions,t),()=>rl(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}}function ix(e,t){return t?e*(1e3/t):0}let Qa;function xE(){Qa=void 0}const _n={now:()=>(Qa===void 0&&_n.set(Mt.isProcessing||wS.useManualTiming?Mt.timestamp:performance.now()),Qa),set:e=>{Qa=e,queueMicrotask(xE)}},Dh=30,bE=e=>!isNaN(parseFloat(e)),Ai={current:void 0};class wE{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=_n.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_n.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=bE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Js(!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 tf);const r=this.events[t].add(n);return t==="change"?()=>{r(),Je.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()}get(){return Ai.current&&Ai.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=_n.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Dh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dh);return ix(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Do(e,t){return new wE(e,t)}function TE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Do(n))}function SE(e,t){const n=Gi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=fE(i[a]);TE(e,a,s)}}function EE(e){return!!(Pt(e)&&e.add)}function Au(e,t){const n=e.getValue("willChange");if(EE(n))return n.add(t)}function ax(e){return e.props[Wy]}function nf(e){let t;return()=>(t===void 0&&(t=e()),t)}const CE=nf(()=>window.ScrollTimeline!==void 0);class kE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,n){const r=this.animations.map(o=>{if(CE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].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 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]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class sx extends kE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const yn=e=>e*1e3,Mn=e=>e/1e3;function ol(e){return typeof e=="function"}function jh(e,t){e.timeline=t,e.onfinish=null}const rf=e=>Array.isArray(e)&&typeof e[0]=="number",RE={linearEasing:void 0};function PE(e,t){const n=nf(e);return()=>{var r;return(r=RE[t])!==null&&r!==void 0?r:n()}}const ss=PE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},lx=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Wr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function cx(e){return!!(typeof e=="function"&&ss()||!e||typeof e=="string"&&(e in Iu||ss())||rf(e)||Array.isArray(e)&&e.every(cx))}const Ti=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Iu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ti([0,.65,.55,1]),circOut:Ti([.55,0,1,.45]),backIn:Ti([.31,.01,.66,-.59]),backOut:Ti([.33,1.53,.69,.99])};function ux(e,t){if(e)return typeof e=="function"&&ss()?lx(e,t):rf(e)?Ti(e):Array.isArray(e)?e.map(n=>ux(n,t)||Iu.easeOut):Iu[e]}const dx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,AE=1e-7,IE=12;function OE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=dx(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>AE&&++s<IE);return a}function pa(e,t,n,r){if(e===t&&n===r)return Gt;const o=i=>OE(i,0,1,e,n);return i=>i===0||i===1?i:dx(o(i),t,r)}const fx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,px=e=>t=>1-e(1-t),hx=pa(.33,1.53,.69,.99),of=px(hx),mx=fx(of),gx=e=>(e*=2)<1?.5*of(e):.5*(2-Math.pow(2,-10*(e-1))),af=e=>1-Math.sin(Math.acos(e)),vx=px(af),yx=fx(af),xx=e=>/^0[^.\s]+$/u.test(e);function _E(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xx(e):!0}const Ii=e=>Math.round(e*1e5)/1e5,sf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ME(e){return e==null}const DE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lf=(e,t)=>n=>!!(typeof n=="string"&&DE.test(n)&&n.startsWith(e)||t&&!ME(n)&&Object.prototype.hasOwnProperty.call(n,t)),bx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(sf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},jE=e=>qn(0,255,e),Sc={...ii,transform:e=>Math.round(jE(e))},Fr={test:lf("rgb","red"),parse:bx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Sc.transform(e)+", "+Sc.transform(t)+", "+Sc.transform(n)+", "+Ii(Ui.transform(r))+")"};function NE(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 Ou={test:lf("#"),parse:NE,transform:Fr.transform},xo={test:lf("hsl","hue"),parse:bx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+On.transform(Ii(t))+", "+On.transform(Ii(n))+", "+Ii(Ui.transform(r))+")"},Nt={test:e=>Fr.test(e)||Ou.test(e)||xo.test(e),parse:e=>Fr.test(e)?Fr.parse(e):xo.test(e)?xo.parse(e):Ou.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Fr.transform(e):xo.transform(e)},FE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function LE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(sf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(FE))===null||n===void 0?void 0:n.length)||0)>0}const wx="number",Tx="color",VE="var",zE="var(",Nh="${}",$E=/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 Yi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace($E,l=>(Nt.test(l)?(r.color.push(i),o.push(Tx),n.push(Nt.parse(l))):l.startsWith(zE)?(r.var.push(i),o.push(VE),n.push(l)):(r.number.push(i),o.push(wx),n.push(parseFloat(l))),++i,Nh)).split(Nh);return{values:n,split:s,indexes:r,types:o}}function Sx(e){return Yi(e).values}function Ex(e){const{split:t,types:n}=Yi(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===wx?i+=Ii(o[a]):s===Tx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const BE=e=>typeof e=="number"?0:e;function HE(e){const t=Sx(e);return Ex(e)(t.map(BE))}const dr={test:LE,parse:Sx,createTransformer:Ex,getAnimatableNone:HE},WE=new Set(["brightness","contrast","saturate","opacity"]);function qE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(sf)||[];if(!r)return e;const o=n.replace(r,"");let i=WE.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const UE=/\b([a-z-]*)\(.*?\)/gu,_u={...dr,getAnimatableNone:e=>{const t=e.match(UE);return t?t.map(qE).join(" "):e}},GE={...qd,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:_u,WebkitFilter:_u},Cx=e=>GE[e];function kx(e,t){let n=Cx(e);return n!==_u&&(n=dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const YE=new Set(["auto","none","0"]);function KE(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!YE.has(i)&&Yi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=kx(n,o)}const Lr=e=>e*180/Math.PI,Mu=e=>{const t=Lr(Math.atan2(e[1],e[0]));return Du(t)},ZE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Mu,rotateZ:Mu,skewX:e=>Lr(Math.atan(e[1])),skewY:e=>Lr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Du=e=>(e=e%360,e<0&&(e+=360),e),Fh=Mu,Lh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Vh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),XE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Lh,scaleY:Vh,scale:e=>(Lh(e)+Vh(e))/2,rotateX:e=>Du(Lr(Math.atan2(e[6],e[5]))),rotateY:e=>Du(Lr(Math.atan2(-e[2],e[0]))),rotateZ:Fh,rotate:Fh,skewX:e=>Lr(Math.atan(e[4])),skewY:e=>Lr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function zh(e){return e.includes("scale")?1:0}function ju(e,t){if(!e||e==="none")return zh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=XE,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ZE,o=s}if(!o)return zh(t);const i=r[t],a=o[1].split(",").map(JE);return typeof i=="function"?i(a):a[i]}const QE=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ju(n,t)};function JE(e){return parseFloat(e.trim())}const $h=e=>e===ii||e===we,eC=new Set(["x","y","z"]),tC=oi.filter(e=>!eC.has(e));function nC(e){const t=[];return tC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const jo={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})=>ju(t,"x"),y:(e,{transform:t})=>ju(t,"y")};jo.translateX=jo.x;jo.translateY=jo.y;const Br=new Set;let Nu=!1,Fu=!1;function Rx(){if(Fu){const e=Array.from(Br).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=nC(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])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Fu=!1,Nu=!1,Br.forEach(e=>e.complete()),Br.clear()}function Px(){Br.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Fu=!0)})}function rC(){Px(),Rx()}class cf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Br.add(this),Nu||(Nu=!0,Je.read(Px),Je.resolveKeyframes(Rx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Br.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Br.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ax=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),oC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function iC(e){const t=oC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const aC=4;function Ix(e,t,n=1){dn(n<=aC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=iC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Ax(a)?parseFloat(a):a}return Wd(o)?Ix(o,t,n+1):o}const Ox=e=>t=>t.test(e),sC={test:e=>e==="auto",parse:e=>e},_x=[ii,we,On,or,KS,YS,sC],Bh=e=>_x.find(Ox(e));class Mx extends cf{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(),Wd(c))){const u=Ix(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ox.has(r)||t.length!==2)return;const[o,i]=t,a=Bh(o),s=Bh(i);if(a!==s)if($h(a)&&$h(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)_E(t[o])&&r.push(o);r.length&&KE(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=jo[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(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=jo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Hh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dr.test(e)||e==="0")&&!e.startsWith("url("));function lC(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 cC(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=Hh(o,t),s=Hh(i,t);return ri(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:lC(e)||(n==="spring"||ol(n))&&r}const uC=e=>e!==null;function il(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(uC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const dC=40;class Dx{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=_n.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>dC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&rC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=_n.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!cC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(il(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ls=2e4;function uf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ls;)t+=n,r=e.next(t);return t>=ls?1/0:t}const ot=(e,t,n)=>e+(t-e)*n;function Ec(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 fC({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=Ec(l,s,e+1/3),i=Ec(l,s,e),a=Ec(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function cs(e,t){return n=>n>0?t:e}const Cc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},pC=[Ou,Fr,xo],hC=e=>pC.find(t=>t.test(e));function Wh(e){const t=hC(e);if(ri(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===xo&&(n=fC(n)),n}const qh=(e,t)=>{const n=Wh(e),r=Wh(t);if(!n||!r)return cs(e,t);const o={...n};return i=>(o.red=Cc(n.red,r.red,i),o.green=Cc(n.green,r.green,i),o.blue=Cc(n.blue,r.blue,i),o.alpha=ot(n.alpha,r.alpha,i),Fr.transform(o))},mC=(e,t)=>n=>t(e(n)),ha=(...e)=>e.reduce(mC),Lu=new Set(["none","hidden"]);function gC(e,t){return Lu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function vC(e,t){return n=>ot(e,t,n)}function df(e){return typeof e=="number"?vC:typeof e=="string"?Wd(e)?cs:Nt.test(e)?qh:bC:Array.isArray(e)?jx:typeof e=="object"?Nt.test(e)?qh:yC:cs}function jx(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>df(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function yC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=df(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function xC(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const bC=(e,t)=>{const n=dr.createTransformer(t),r=Yi(e),o=Yi(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?Lu.has(e)&&!o.values.length||Lu.has(t)&&!r.values.length?gC(e,t):ha(jx(xC(r,o),o.values),n):(ri(!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.`),cs(e,t))};function Nx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ot(e,t,n):df(e)(e,t)}const wC=5;function Fx(e,t,n){const r=Math.max(t-wC,0);return ix(n-e(r),t-r)}const ft={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},Uh=.001;function TC({duration:e=ft.duration,bounce:t=ft.bounce,velocity:n=ft.velocity,mass:r=ft.mass}){let o,i;ri(e<=yn(ft.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=qn(ft.minDamping,ft.maxDamping,a),e=qn(ft.minDuration,ft.maxDuration,Mn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=Vu(c,a),h=Math.exp(-d);return Uh-p/f*h},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,h=Math.exp(-d),g=Vu(Math.pow(c,2),a);return(-o(c)+Uh>0?-1:1)*((p-f)*h)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=EC(o,i,s);if(e=yn(e),isNaN(l))return{stiffness:ft.stiffness,damping:ft.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const SC=12;function EC(e,t,n){let r=n;for(let o=1;o<SC;o++)r=r-e(r)/t(r);return r}function Vu(e,t){return e*Math.sqrt(1-t*t)}const CC=["duration","bounce"],kC=["stiffness","damping","mass"];function Gh(e,t){return t.some(n=>e[n]!==void 0)}function RC(e){let t={velocity:ft.velocity,stiffness:ft.stiffness,damping:ft.damping,mass:ft.mass,isResolvedFromDuration:!1,...e};if(!Gh(e,kC)&&Gh(e,CC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*qn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ft.mass,stiffness:o,damping:i}}else{const n=TC(e);t={...t,...n,mass:ft.mass},t.isResolvedFromDuration=!0}return t}function ff(e=ft.visualDuration,t=ft.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}=RC({...n,velocity:-Mn(n.velocity||0)}),h=p||0,g=c/(2*Math.sqrt(l*u)),m=a-i,y=Mn(Math.sqrt(l/u)),v=Math.abs(m)<5;r||(r=v?ft.restSpeed.granular:ft.restSpeed.default),o||(o=v?ft.restDelta.granular:ft.restDelta.default);let x;if(g<1){const T=Vu(y,g);x=w=>{const C=Math.exp(-g*y*w);return a-C*((h+g*y*m)/T*Math.sin(T*w)+m*Math.cos(T*w))}}else if(g===1)x=T=>a-Math.exp(-y*T)*(m+(h+y*m)*T);else{const T=y*Math.sqrt(g*g-1);x=w=>{const C=Math.exp(-g*y*w),k=Math.min(T*w,300);return a-C*((h+g*y*m)*Math.sinh(k)+T*m*Math.cosh(k))/T}}const S={calculatedDuration:f&&d||null,next:T=>{const w=x(T);if(f)s.done=T>=d;else{let C=0;g<1&&(C=T===0?yn(h):Fx(x,T,w));const k=Math.abs(C)<=r,I=Math.abs(a-w)<=o;s.done=k&&I}return s.value=s.done?a:w,s},toString:()=>{const T=Math.min(uf(S),ls),w=lx(C=>S.next(T*C).value,T,30);return T+"ms "+w}};return S}function Yh({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=k=>s!==void 0&&k<s||l!==void 0&&k>l,h=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let g=n*t;const m=d+g,y=a===void 0?m:a(m);y!==m&&(g=y-d);const v=k=>-g*Math.exp(-k/r),x=k=>y+v(k),S=k=>{const I=v(k),P=x(k);p.done=Math.abs(I)<=c,p.value=p.done?y:P};let T,w;const C=k=>{f(p.value)&&(T=k,w=ff({keyframes:[p.value,h(p.value)],velocity:Fx(x,k,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!w&&T===void 0&&(I=!0,S(k),C(k)),T!==void 0&&k>=T?w.next(k-T):(!I&&S(k),p)}}}const PC=pa(.42,0,1,1),AC=pa(0,0,.58,1),Lx=pa(.42,0,.58,1),Vx=e=>Array.isArray(e)&&typeof e[0]!="number",Kh={linear:Gt,easeIn:PC,easeInOut:Lx,easeOut:AC,circIn:af,circInOut:yx,circOut:vx,backIn:of,backInOut:mx,backOut:hx,anticipate:gx},zu=e=>{if(rf(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return pa(t,n,r,o)}else if(typeof e=="string")return dn(Kh[e]!==void 0,`Invalid easing type '${e}'`),Kh[e];return e};function IC(e,t,n){const r=[],o=n||Nx,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]||Gt:t;s=ha(l,s)}r.push(s)}return r}function zx(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(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=IC(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=Wr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(qn(e[0],e[i-1],u)):c}function $x(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wr(0,t,r);e.push(ot(n,1,o))}}function Bx(e){const t=[0];return $x(t,e.length-1),t}function OC(e,t){return e.map(n=>n*t)}function _C(e,t){return e.map(()=>t||Lx).splice(0,e.length-1)}function Oi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Vx(r)?r.map(zu):zu(r),i={done:!1,value:t[0]},a=OC(n&&n.length===t.length?n:Bx(t),e),s=zx(a,t,{ease:Array.isArray(o)?o:_C(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const MC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Je.update(t,!0),stop:()=>Wn(t),now:()=>Mt.isProcessing?Mt.timestamp:_n.now()}},DC={decay:Yh,inertia:Yh,tween:Oi,keyframes:Oi,spring:ff},jC=e=>e/100;class pf extends Dx{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||cf,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=ol(n)?n:DC[n]||Oi;let l,c;process.env.NODE_ENV!=="production"&&s!==Oi&&dn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Oi&&typeof t[0]!="number"&&(l=ha(jC,Nx(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=uf(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:h,repeatDelay:g,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-p*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,S=i;if(f){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),P=k%1;!P&&k>=1&&(P=1),P===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(h==="reverse"?(P=1-P,g&&(P-=g/d)):h==="mirror"&&(S=a)),x=qn(0,1,P)*d}const T=v?{done:!1,value:l[0]}:S.next(x);s&&(T.value=s(T.value));let{done:w}=T;!v&&c!==null&&(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return C&&o!==void 0&&(T.value=il(l,this.options,o)),m&&m(T.value),C&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Mn(t.calculatedDuration):0}get time(){return Mn(this.currentTime)}set time(t){t=yn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Mn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=MC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const NC=new Set(["opacity","clipPath","filter","transform"]);function FC(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=ux(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const LC=nf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),us=10,VC=2e4;function zC(e){return ol(e.type)||e.type==="spring"||!cx(e.ease)}function $C(e,t){const n=new pf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<VC;)r=n.sample(i),o.push(r.value),i+=us;return{times:void 0,keyframes:o,duration:i-us,ease:"linear"}}const Hx={anticipate:gx,backInOut:mx,circInOut:yx};function BC(e){return e in Hx}class Zh extends Dx{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new Mx(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&ss()&&BC(i)&&(i=Hx[i]),zC(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...g}=this.options,m=$C(t,g);t=m.keyframes,t.length===1&&(t[1]=t[0]),r=m.duration,o=m.times,i=m.ease,a="keyframes"}const u=FC(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(jh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(il(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Mn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Mn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Gt;const{animation:r}=n;jh(r,t)}return Gt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,h=new pf({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=yn(this.time);c.setWithVelocity(h.sample(g-us).value,h.sample(g).value,us)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return LC()&&r&&NC.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const HC={type:"spring",stiffness:500,damping:25,restSpeed:10},WC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qC={type:"keyframes",duration:.8},UC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},GC=(e,{keyframes:t})=>t.length>2?qC:Jr.has(e)?e.startsWith("scale")?WC(t[1]):HC:UC;function YC({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 hf=(e,t,n,r={},o,i)=>a=>{const s=Jd(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-yn(l);let 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};YC(s)||(u={...u,...GC(e,u)}),u.duration&&(u.duration=yn(u.duration)),u.repeatDelay&&(u.repeatDelay=yn(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)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=il(u.keyframes,s);if(p!==void 0)return Je.update(()=>{u.onUpdate(p),u.onComplete()}),new sx([])}return!i&&Zh.supports(u)?new Zh(u):new pf(u)};function KC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function mf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&KC(u,d))continue;const h={delay:n,...Jd(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=ax(e);if(y){const v=window.MotionHandoffAnimation(y,d,Je);v!==null&&(h.startTime=v,g=!0)}}Au(e,d),p.start(hf(d,p,f,e.shouldReduceMotion&&ox.has(d)?{type:!1}:h,e,g));const m=p.animation;m&&c.push(m)}return s&&Promise.all(c).then(()=>{Je.update(()=>{s&&SE(e,s)})}),c}function $u(e,t,n={}){var r;const o=Gi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(mf(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return ZC(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function ZC(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(XC).forEach((c,u)=>{c.notify("AnimationStart",t),a.push($u(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function XC(e,t){return e.sortNodePosition(t)}function QC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>$u(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=$u(e,t,n);else{const o=typeof t=="function"?Gi(e,t,n.custom):t;r=Promise.all(mf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Wx(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 JC=zd.length;function qx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?qx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<JC;n++){const r=zd[n],o=e.props[r];(Wi(o)||o===!1)&&(t[r]=o)}return t}const ek=[...Vd].reverse(),tk=Vd.length;function nk(e){return t=>Promise.all(t.map(({animation:n,options:r})=>QC(e,n,r)))}function rk(e){let t=nk(e),n=Xh(),r=!0;const o=l=>(c,u)=>{var d;const p=Gi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:h,...g}=p;c={...c,...g,...h}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=qx(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let m=0;m<tk;m++){const y=ek[m],v=n[y],x=c[y]!==void 0?c[y]:u[y],S=Wi(x),T=y===l?v.isActive:null;T===!1&&(h=m);let w=x===u[y]&&x!==c[y]&&S;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),v.protectedKeys={...f},!v.isActive&&T===null||!x&&!v.prevProp||tl(x)||typeof x=="boolean")continue;const C=ok(v.prevProp,x);let k=C||y===l&&v.isActive&&!w&&S||m>h&&S,I=!1;const P=Array.isArray(x)?x:[x];let D=P.reduce(o(y),{});T===!1&&(D={});const{prevResolvedValues:N={}}=v,V={...N,...D},R=L=>{k=!0,p.has(L)&&(I=!0,p.delete(L)),v.needsAnimating[L]=!0;const j=e.getValue(L);j&&(j.liveStyle=!1)};for(const L in V){const j=D[L],$=N[L];if(f.hasOwnProperty(L))continue;let _=!1;Pu(j)&&Pu($)?_=!Wx(j,$):_=j!==$,_?j!=null?R(L):p.add(L):j!==void 0&&p.has(L)?R(L):v.protectedKeys[L]=!0}v.prevProp=x,v.prevResolvedValues=D,v.isActive&&(f={...f,...D}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(w&&C)||I)&&d.push(...P.map(L=>({animation:L,options:{type:y}})))}if(p.size){const m={};if(typeof c.initial!="boolean"){const y=Gi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(m.transition=y.transition)}p.forEach(y=>{const v=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),m[y]=v??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){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Xh(),r=!0}}}function ok(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wx(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Xh(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class yr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ik extends yr{constructor(t){super(t),t.animationState||(t.animationState=rk(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();tl(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let ak=0;class sk extends yr{constructor(){super(...arguments),this.id=ak++}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 lk={animation:{Feature:ik},exit:{Feature:sk}},mn={x:!1,y:!1};function Ux(){return mn.x||mn.y}function ck(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function Ki(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const gf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ma(e){return{point:{x:e.pageX,y:e.pageY}}}const uk=e=>t=>gf(t)&&e(t,ma(t));function _i(e,t,n,r){return Ki(e,t,uk(n),r)}function Gx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function dk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function fk(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 Yx=1e-4,pk=1-Yx,hk=1+Yx,Kx=.01,mk=0-Kx,gk=0+Kx;function $t(e){return e.max-e.min}function vk(e,t,n){return Math.abs(e-t)<=n}function Qh(e,t,n,r=.5){e.origin=r,e.originPoint=ot(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=ot(n.min,n.max,e.origin)-e.originPoint,(e.scale>=pk&&e.scale<=hk||isNaN(e.scale))&&(e.scale=1),(e.translate>=mk&&e.translate<=gk||isNaN(e.translate))&&(e.translate=0)}function Mi(e,t,n,r){Qh(e.x,t.x,n.x,r?r.originX:void 0),Qh(e.y,t.y,n.y,r?r.originY:void 0)}function Jh(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function yk(e,t,n){Jh(e.x,t.x,n.x),Jh(e.y,t.y,n.y)}function em(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function Di(e,t,n){em(e.x,t.x,n.x),em(e.y,t.y,n.y)}const tm=()=>({translate:0,scale:1,origin:0,originPoint:0}),bo=()=>({x:tm(),y:tm()}),nm=()=>({min:0,max:0}),mt=()=>({x:nm(),y:nm()});function an(e){return[e("x"),e("y")]}function kc(e){return e===void 0||e===1}function Bu({scale:e,scaleX:t,scaleY:n}){return!kc(e)||!kc(t)||!kc(n)}function Or(e){return Bu(e)||Zx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Zx(e){return rm(e.x)||rm(e.y)}function rm(e){return e&&e!=="0%"}function ds(e,t,n){const r=e-n,o=t*r;return n+o}function om(e,t,n,r,o){return o!==void 0&&(e=ds(e,o,r)),ds(e,n,r)+t}function Hu(e,t=0,n=1,r,o){e.min=om(e.min,t,n,r,o),e.max=om(e.max,t,n,r,o)}function Xx(e,{x:t,y:n}){Hu(e.x,t.translate,t.scale,t.originPoint),Hu(e.y,n.translate,n.scale,n.originPoint)}const im=.999999999999,am=1.0000000000001;function xk(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&&To(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Xx(e,a)),r&&Or(i.latestValues)&&To(e,i.latestValues))}t.x<am&&t.x>im&&(t.x=1),t.y<am&&t.y>im&&(t.y=1)}function wo(e,t){e.min=e.min+t,e.max=e.max+t}function sm(e,t,n,r,o=.5){const i=ot(e.min,e.max,o);Hu(e,t,n,i,r)}function To(e,t){sm(e.x,t.x,t.scaleX,t.scale,t.originX),sm(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qx(e,t){return Gx(fk(e.getBoundingClientRect(),t))}function bk(e,t,n){const r=Qx(e,n),{scroll:o}=t;return o&&(wo(r.x,o.offset.x),wo(r.y,o.offset.y)),r}const Jx=({current:e})=>e?e.ownerDocument.defaultView:null,lm=(e,t)=>Math.abs(e-t);function wk(e,t){const n=lm(e.x,t.x),r=lm(e.y,t.y);return Math.sqrt(n**2+r**2)}class eb{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=Pc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=wk(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:h}=d,{timestamp:g}=Mt;this.history.push({...h,timestamp:g});const{onStart:m,onMove:y}=this.handlers;p||(m&&m(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Rc(p,this.transformPagePoint),Je.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Pc(d.type==="pointercancel"?this.lastMoveEventInfo:Rc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,m),h&&h(d,m)},!gf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=ma(t),s=Rc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Pc(s,this.history)),this.removeListeners=ha(_i(this.contextWindow,"pointermove",this.handlePointerMove),_i(this.contextWindow,"pointerup",this.handlePointerUp),_i(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wn(this.updatePoint)}}function Rc(e,t){return t?{point:t(e.point)}:e}function cm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Pc({point:e},t){return{point:e,delta:cm(e,tb(t)),offset:cm(e,Tk(t)),velocity:Sk(t,.1)}}function Tk(e){return e[0]}function tb(e){return e[e.length-1]}function Sk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=tb(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>yn(t)));)n--;if(!r)return{x:0,y:0};const i=Mn(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 Ek(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ot(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ot(n,e,r.max):Math.min(e,n)),e}function um(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 Ck(e,{top:t,left:n,bottom:r,right:o}){return{x:um(e.x,n,o),y:um(e.y,t,r)}}function dm(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 kk(e,t){return{x:dm(e.x,t.x),y:dm(e.y,t.y)}}function Rk(e,t){let n=.5;const r=$t(e),o=$t(t);return o>r?n=Wr(t.min,t.max-r,e.min):r>o&&(n=Wr(e.min,e.max-o,t.min)),qn(0,1,n)}function Pk(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 Wu=.35;function Ak(e=Wu){return e===!1?e=0:e===!0&&(e=Wu),{x:fm(e,"left","right"),y:fm(e,"top","bottom")}}function fm(e,t,n){return{min:pm(e,t),max:pm(e,n)}}function pm(e,t){return typeof e=="number"?e:e[t]||0}const Ik=new WeakMap;class Ok{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=mt(),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(ma(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ck(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),an(m=>{let y=this.getAxisMotionValue(m).get()||0;if(On.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[m];x&&(y=$t(x)*(parseFloat(y)/100))}}this.originPoint[m]=y}),h&&Je.postRender(()=>h(u,d)),Au(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:h,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=d;if(f&&this.currentDirection===null){this.currentDirection=_k(m),this.currentDirection!==null&&h&&h(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=()=>an(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new eb(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Jx(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&&Je.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||!Ma(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Ek(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&yo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=Ck(o.layoutBox,n):this.constraints=!1,this.elastic=Ak(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Pk(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yo(t))return!1;const r=t.current;dn(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=bk(r,o.root,this.visualElement.getTransformPagePoint());let a=kk(o.layout.layoutBox,i);if(n){const s=n(dk(a));this.hasMutatedConstraints=!!s,s&&(a=Gx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=an(u=>{if(!Ma(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,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Au(this.visualElement,t),r.start(hf(t,r,0,n,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){an(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){an(n=>{const{drag:r}=this.getProps();if(!Ma(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]-ot(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!yo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};an(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=Rk({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(),an(a=>{if(!Ma(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ot(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;Ik.set(this.visualElement,this);const t=this.visualElement.current,n=_i(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();yo(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()),Je.read(r);const a=Ki(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(an(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{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=Wu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Ma(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _k(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Mk extends yr{constructor(t){super(t),this.removeGroupControls=Gt,this.removeListeners=Gt,this.controls=new Ok(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gt}unmount(){this.removeGroupControls(),this.removeListeners()}}const hm=e=>(t,n)=>{e&&Je.postRender(()=>e(t,n))};class Dk extends yr{constructor(){super(...arguments),this.removePointerDownListener=Gt}onPointerDown(t){this.session=new eb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:hm(t),onStart:hm(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Je.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=_i(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 Ja={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=mm(e,t.target.x),r=mm(e,t.target.y);return`${n}% ${r}%`}},jk={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=dr.parse(e);if(o.length>5)return r;const i=dr.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=ot(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 Nk extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;GS(Fk),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()})),Ja.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;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()||Je.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$d.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 nb(e){const[t,n]=Fy(),r=E.useContext(Hi);return b.jsx(Nk,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(qy),isPresent:t,safeToRemove:n})}const Fk={borderRadius:{...vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vi,borderTopRightRadius:vi,borderBottomLeftRadius:vi,borderBottomRightRadius:vi,boxShadow:jk};function rb(e,t,n){const r=Pt(e)?e:Do(e);return r.start(hf("",r,t,n)),r.animation}function ob(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Lk=(e,t)=>e.depth-t.depth;class Vk{constructor(){this.children=[],this.isDirty=!1}add(t){ef(this.children,t),this.isDirty=!0}remove(t){rl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Lk),this.isDirty=!1,this.children.forEach(t)}}function zk(e,t){const n=_n.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wn(r),e(i-t))};return Je.read(r,!0),()=>Wn(r)}const ib=["TopLeft","TopRight","BottomLeft","BottomRight"],$k=ib.length,gm=e=>typeof e=="string"?parseFloat(e):e,vm=e=>typeof e=="number"||we.test(e);function Bk(e,t,n,r,o,i){o?(e.opacity=ot(0,n.opacity!==void 0?n.opacity:1,Hk(r)),e.opacityExit=ot(t.opacity!==void 0?t.opacity:1,0,Wk(r))):i&&(e.opacity=ot(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<$k;a++){const s=`border${ib[a]}Radius`;let l=ym(t,s),c=ym(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||vm(l)===vm(c)?(e[s]=Math.max(ot(gm(l),gm(c),r),0),(On.test(c)||On.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ot(t.rotate||0,n.rotate||0,r))}function ym(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Hk=ab(0,.5,vx),Wk=ab(.5,.95,Gt);function ab(e,t,n){return r=>r<e?0:r>t?1:n(Wr(e,t,r))}function xm(e,t){e.min=t.min,e.max=t.max}function rn(e,t){xm(e.x,t.x),xm(e.y,t.y)}function bm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wm(e,t,n,r,o){return e-=t,e=ds(e,1/n,r),o!==void 0&&(e=ds(e,1/o,r)),e}function qk(e,t=0,n=1,r=.5,o,i=e,a=e){if(On.test(t)&&(t=parseFloat(t),t=ot(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ot(i.min,i.max,r);e===i&&(s-=t),e.min=wm(e.min,t,n,s,o),e.max=wm(e.max,t,n,s,o)}function Tm(e,t,[n,r,o],i,a){qk(e,t[n],t[r],t[o],t.scale,i,a)}const Uk=["x","scaleX","originX"],Gk=["y","scaleY","originY"];function Sm(e,t,n,r){Tm(e.x,t,Uk,n?n.x:void 0,r?r.x:void 0),Tm(e.y,t,Gk,n?n.y:void 0,r?r.y:void 0)}function Em(e){return e.translate===0&&e.scale===1}function sb(e){return Em(e.x)&&Em(e.y)}function Cm(e,t){return e.min===t.min&&e.max===t.max}function Yk(e,t){return Cm(e.x,t.x)&&Cm(e.y,t.y)}function km(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function lb(e,t){return km(e.x,t.x)&&km(e.y,t.y)}function Rm(e){return $t(e.x)/$t(e.y)}function Pm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Kk{constructor(){this.members=[]}add(t){ef(this.members,t),t.scheduleRender()}remove(t){if(rl(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 Zk(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0: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:h}=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) `),h&&(r+=`skewY(${h}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 Ac=["","X","Y","Z"],Xk={visibility:"hidden"},Am=1e3;let Qk=0;function Ic(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function cb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ax(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Je,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&cb(r)}function ub({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=Qk++,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(tR),this.nodes.forEach(aR),this.nodes.forEach(sR),this.nodes.forEach(nR)},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 Vk)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new tf),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,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ob(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=zk(p,250),Ja.hasAnimatedSinceResize&&(Ja.hasAnimatedSinceResize=!1,this.nodes.forEach(Om))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||fR,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!lb(this.targetLayout,h),x=!p&&f;if(this.options.layoutRoot||this.resumeFrom||x||p&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const S={...Jd(g,"layout"),onPlay:m,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||Om(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,Wn(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(lR),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&&cb(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(Im);return}this.isUpdating||this.nodes.forEach(oR),this.isUpdating=!1,this.nodes.forEach(iR),this.nodes.forEach(Jk),this.nodes.forEach(eR),this.clearAllSnapshots();const s=_n.now();Mt.delta=qn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Tc.update.process(Mt),Tc.preRender.process(Mt),Tc.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$d.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rR),this.sharedNodes.forEach(cR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$t(this.snapshot.measuredBox.x)&&!$t(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=mt(),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){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&&!sb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Or(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)),pR(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return mt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(hR))){const{scroll:u}=this.root;u&&(wo(l.x,u.offset.x),wo(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=mt();if(rn(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&rn(l,a),wo(l.x,d.offset.x),wo(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=mt();rn(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&&To(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Or(u.latestValues)&&To(l,u.latestValues)}return Or(this.latestValues)&&To(l,this.latestValues),l}removeTransform(a){const s=mt();rn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Or(c.latestValues))continue;Bu(c.latestValues)&&c.updateSnapshot();const u=mt(),d=c.measurePageBox();rn(u,d),Sm(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Or(this.latestValues)&&Sm(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!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Mt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Di(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),yk(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),Xx(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Di(this.relativeTargetOrigin,this.target,f.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Bu(this.parent.latestValues)||Zx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;xk(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=mt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bm(this.prevProjectionDelta.x,this.projectionDelta.x),bm(this.prevProjectionDelta.y,this.projectionDelta.y)),Mi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Pm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=bo(),this.projectionDelta=bo(),this.projectionDeltaWithTransform=bo()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=bo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=mt(),f=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=f!==h,m=this.getStack(),y=!m||m.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(dR));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const T=S/1e3;_m(d.x,a.x,T),_m(d.y,a.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Di(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),uR(this.relativeTarget,this.relativeTargetOrigin,p,T),x&&Yk(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=mt()),rn(x,this.relativeTarget)),g&&(this.animationValues=u,Bk(u,c,this.latestValues,T,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Wn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Je.update(()=>{Ja.hasAnimatedSinceResize=!0,this.currentAnimation=rb(0,Am,{...a,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(Am),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&&db(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||mt();const d=$t(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=$t(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}rn(s,l),To(s,u),Mi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Kk),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(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.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&&Ic("z",a,c,this.animationValues);for(let u=0;u<Ac.length;u++)Ic(`rotate${Ac[u]}`,a,c,this.animationValues),Ic(`skew${Ac[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){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Xk;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Xa(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Xa(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Or(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Zk(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:h}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in qi){if(p[g]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:v}=qi[g],x=c.transform==="none"?p[g]:m(p[g],d);if(y){const S=y.length;for(let T=0;T<S;T++)c[y[T]]=x}else v?this.options.visualElement.renderState.vars[g]=x:c[g]=x}return this.options.layoutId&&(c.pointerEvents=d===this?Xa(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Im),this.root.sharedNodes.clear()}}}function Jk(e){e.updateLayout()}function eR(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=$t(p);p.min=r[d].min,p.max=p.min+f}):db(i,n.layoutBox,r)&&an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=$t(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=bo();Mi(s,r,n.layoutBox);const l=bo();a?Mi(l,e.applyTransform(o,!0),n.measuredBox):Mi(l,r,n.layoutBox);const c=!sb(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const h=mt();Di(h,n.layoutBox,p.layoutBox);const g=mt();Di(g,r,f.layoutBox),lb(h,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function tR(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 nR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rR(e){e.clearSnapshot()}function Im(e){e.clearMeasurements()}function oR(e){e.isLayoutDirty=!1}function iR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Om(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function aR(e){e.resolveTargetDelta()}function sR(e){e.calcProjection()}function lR(e){e.resetSkewAndRotation()}function cR(e){e.removeLeadSnapshot()}function _m(e,t,n){e.translate=ot(t.translate,0,n),e.scale=ot(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Mm(e,t,n,r){e.min=ot(t.min,n.min,r),e.max=ot(t.max,n.max,r)}function uR(e,t,n,r){Mm(e.x,t.x,n.x,r),Mm(e.y,t.y,n.y,r)}function dR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const fR={duration:.45,ease:[.4,0,.1,1]},Dm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),jm=Dm("applewebkit/")&&!Dm("chrome/")?Math.round:Gt;function Nm(e){e.min=jm(e.min),e.max=jm(e.max)}function pR(e){Nm(e.x),Nm(e.y)}function db(e,t,n){return e==="position"||e==="preserve-aspect"&&!vk(Rm(t),Rm(n),.2)}function hR(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const mR=ub({attachResizeListener:(e,t)=>Ki(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Oc={current:void 0},fb=ub({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Oc.current){const e=new mR({});e.mount(window),e.setOptions({layoutScroll:!0}),Oc.current=e}return Oc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),gR={pan:{Feature:Dk},drag:{Feature:Mk,ProjectionNode:fb,MeasureLayout:nb}};function pb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function hb(e,t){const n=pb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Fm(e){return!(e.pointerType==="touch"||Ux())}function vR(e,t,n={}){const[r,o,i]=hb(e,n),a=s=>{if(!Fm(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Fm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Lm(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&&Je.postRender(()=>i(t,ma(t)))}class yR extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=vR(t,(n,r)=>(Lm(this.node,r,"Start"),o=>Lm(this.node,o,"End"))))}unmount(){}}class xR extends yr{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=ha(Ki(this.node.current,"focus",()=>this.onFocus()),Ki(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const mb=(e,t)=>t?e===t?!0:mb(e,t.parentElement):!1,bR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wR(e){return bR.has(e.tagName)||e.tabIndex!==-1}const Si=new WeakSet;function Vm(e){return t=>{t.key==="Enter"&&e(t)}}function _c(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const TR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vm(()=>{if(Si.has(n))return;_c(n,"down");const o=Vm(()=>{_c(n,"up")}),i=()=>_c(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 zm(e){return gf(e)&&!Ux()}function SR(e,t,n={}){const[r,o,i]=hb(e,n),a=s=>{const l=s.currentTarget;if(!zm(s)||Si.has(l))return;Si.add(l);const c=t(l,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!zm(f)||!Si.has(l))&&(Si.delete(l),typeof c=="function"&&c(f,{success:h}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||mb(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),s instanceof HTMLElement&&(s.addEventListener("focus",c=>TR(c,o)),!wR(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function $m(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&&Je.postRender(()=>i(t,ma(t)))}class ER extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=SR(t,(n,r)=>($m(this.node,r,"Start"),(o,{success:i})=>$m(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const qu=new WeakMap,Mc=new WeakMap,CR=e=>{const t=qu.get(e.target);t&&t(e)},kR=e=>{e.forEach(CR)};function RR({root:e,...t}){const n=e||document;Mc.has(n)||Mc.set(n,{});const r=Mc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(kR,{root:e,...t})),r[o]}function PR(e,t,n){const r=RR(t);return qu.set(e,n),r.observe(e),()=>{qu.delete(e),r.unobserve(e)}}const AR={some:0,all:1};class IR extends yr{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:AR[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 PR(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(OR(t,n))&&this.startObserver()}unmount(){}}function OR({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _R={inView:{Feature:IR},tap:{Feature:ER},focus:{Feature:xR},hover:{Feature:yR}},MR={layout:{ProjectionNode:fb,MeasureLayout:nb}},Uu={current:null},gb={current:!1};function DR(){if(gb.current=!0,!!Ld)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Uu.current=e.matches;e.addListener(t),t()}else Uu.current=!1}const jR=[..._x,Nt,dr],NR=e=>jR.find(Ox(e)),Zi=new WeakMap;function FR(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Js(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(Pt(i))e.addValue(r,Do(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,Do(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Bm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class vb{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=cf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=_n.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Je.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,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=nl(n),this.isVariantNode=Hy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const h=p[f];l[f]!==void 0&&Pt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Zi.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)),gb.current||DR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Uu.current,process.env.NODE_ENV!=="production"&&Js(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(),Wn(this.notifyUpdate),Wn(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=Jr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Je.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 Mo){const n=Mo[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):mt()}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<Bm.length;r++){const o=Bm[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=FR(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=Do(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Ax(o)||xx(o))?o=parseFloat(o):!NR(o)&&dr.test(n)&&(o=kx(t,n)),this.setBaseTarget(t,Pt(o)?o.get():o)),Pt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=Xd(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Pt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new tf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class yb extends vb{constructor(){super(...arguments),this.KeyframeResolver=Mx}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;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function LR(e){return window.getComputedStyle(e)}class xb extends yb{constructor(){super(...arguments),this.type="html",this.renderInstance=ex}readValueFromInstance(t,n){if(Jr.has(n))return QE(t,n);{const r=LR(t),o=(Hd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qx(t,n)}build(t,n,r){Ud(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Qd(t,n,r)}}class bb extends yb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Jy(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Jr.has(n)){const r=Cx(n);return r&&r.default||0}return n=tx.has(n)?n:Bd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return rx(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Je.postRender(this.updateDimensions)}build(t,n,r){Kd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){nx(t,n,r,o)}mount(t){this.isSVGTag=Zd(t.tagName),super.mount(t)}}const VR=(e,t)=>Yd(e)?new bb(t):new xb(t,{allowProjection:e!==E.Fragment}),zR=vE({...lk,..._R,...gR,...MR},VR),pt=MS(zR);function $R(e){return E.useEffect(()=>()=>e(),[])}function No(e){const t=bn(()=>Do(e)),{isStatic:n}=E.useContext(_o);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function wb(e,t){const n=No(t()),r=()=>n.set(t());return r(),Xs(()=>{const o=()=>Je.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Wn(r)}}),n}const BR=e=>e&&typeof e=="object"&&e.mix,HR=e=>BR(e)?e.mix:void 0;function WR(...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=zx(o,i,{mixer:HR(i[0]),...a});return t?s(r):s}function qR(e){Ai.current=[],e();const t=wb(Ai.current,e);return Ai.current=void 0,t}function UR(e,t,n,r){if(typeof e=="function")return qR(e);const o=typeof t=="function"?t:WR(t,n,r);return Array.isArray(e)?Hm(e,o):Hm([e],([i])=>o(i))}function Hm(e,t){const n=bn(()=>[]);return wb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function GR(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(uf(r),ls);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Mn(o)}}const YR=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Tb(e,t){return Vx(e)?e[YR(0,e.length,t)]:e}function vf(e){return typeof e=="object"&&!Array.isArray(e)}function Sb(e,t,n,r){return typeof e=="string"&&vf(t)?pb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function KR(e,t,n){return e*(t+1)}function Wm(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function ZR(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(rl(e,o),r--)}}function XR(e,t,n,r,o,i){ZR(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ot(o,i,r[a]),easing:Tb(n,a)})}function QR(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function JR(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const eP="easeInOut",tP=20;function nP(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 h=e[f];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,Wm(d,h.at,u,c));continue}let[g,m,y={}]=h;y.at!==void 0&&(d=Wm(d,y.at,u,c));let v=0;const x=(S,T,w,C=0,k=0)=>{const I=rP(S),{delay:P=0,times:D=Bx(I),type:N="keyframes",repeat:V,repeatType:R,repeatDelay:O=0,...M}=T;let{ease:L=t.ease||"easeOut",duration:j}=T;const $=typeof P=="function"?P(C,k):P,_=I.length,z=ol(N)?N:o==null?void 0:o[N];if(_<=2&&z){let Z=100;if(_===2&&aP(I)){const F=I[1]-I[0];Z=Math.abs(F)}const U={...M};j!==void 0&&(U.duration=yn(j));const G=GR(U,Z,z);L=G.ease,j=G.duration}j??(j=i);const J=d+$;D.length===1&&D[0]===0&&(D[1]=1);const te=D.length-I.length;if(te>0&&$x(D,te),I.length===1&&I.unshift(null),V){dn(V<tP,"Repeat count too high, must be less than 20"),j=KR(j,V);const Z=[...I],U=[...D];L=Array.isArray(L)?[...L]:[L];const G=[...L];for(let F=0;F<V;F++){I.push(...Z);for(let W=0;W<Z.length;W++)D.push(U[W]+(F+1)),L.push(W===0?"linear":Tb(G,W-1))}QR(D,V)}const ee=J+j;XR(w,I,L,D,J,ee),v=Math.max($+j,v),p=Math.max(ee,p)};if(Pt(g)){const S=qm(g,s);x(m,y,Um("default",S))}else{const S=Sb(g,m,r,l),T=S.length;for(let w=0;w<T;w++){m=m,y=y;const C=S[w],k=qm(C,s);for(const I in m)x(m[I],oP(y,I),Um(I,k),w,T)}}u=d,d+=v}return s.forEach((f,h)=>{for(const g in f){const m=f[g];m.sort(JR);const y=[],v=[],x=[];for(let T=0;T<m.length;T++){const{at:w,value:C,easing:k}=m[T];y.push(C),v.push(Wr(0,p,w)),x.push(k||"easeOut")}v[0]!==0&&(v.unshift(0),y.unshift(y[0]),x.unshift(eP)),v[v.length-1]!==1&&(v.push(1),y.push(null)),a.has(h)||a.set(h,{keyframes:{},transition:{}});const S=a.get(h);S.keyframes[g]=y,S.transition[g]={...t,duration:p,ease:x,times:v,...n}}}),a}function qm(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Um(e,t){return t[e]||(t[e]=[]),t[e]}function rP(e){return Array.isArray(e)?e:[e]}function oP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const iP=e=>typeof e=="number",aP=e=>e.every(iP);function sP(e,t){return e in t}class lP extends vb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(sP(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 mt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function cP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ob(e)?new bb(t):new xb(t);n.mount(e),Zi.set(e,n)}function uP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new lP(t);n.mount(e),Zi.set(e,n)}function dP(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!vf(t)}function Eb(e,t,n,r){const o=[];if(dP(e,t))o.push(rb(e,vf(t)&&t.default||t,n&&(n.default||n)));else{const i=Sb(e,t,r),a=i.length;dn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?cP:uP;Zi.has(l)||c(l);const u=Zi.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...mf(u,{...t,transition:d},{}))}}return o}function fP(e,t,n){const r=[];return nP(e,t,n,{spring:ff}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Eb(s,i,a))}),r}function pP(e){return Array.isArray(e)&&e.some(Array.isArray)}function hP(e){function t(n,r,o){let i=[];pP(n)?i=fP(n,r,e):i=Eb(n,r,o,e);const a=new sx(i);return e&&e.animations.push(a),a}return t}function mP(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>hP(e));return $R(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class gP{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 vP=()=>new gP;function yP(){return bn(vP)}function xP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function bP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:xP(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}}const Cb=E.createContext(null);function wP(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=ot(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?yE(e,o,o+i):e}function TP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>pt[t]),l=[],c=E.useRef(!1);dn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(h=>d===h.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(EP)},updateOrder:(d,p,f)=>{if(c.current)return;const h=wP(l,d,p,f);l!==h&&(c.current=!0,r(h.map(SP).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),b.jsx(s,{...i,ref:a,ignoreStrict:!0,children:b.jsx(Cb.Provider,{value:u,children:e})})}const kb=E.forwardRef(TP);function SP(e){return e.value}function EP(e,t){return e.layout.min-t.layout.min}function Gm(e,t=0){return Pt(e)?e:No(t)}function CP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>pt[r]),c=E.useContext(Cb),u={x:Gm(t.x),y:Gm(t.y)},d=UR([u.x,u.y],([g,m])=>g||m?1:"unset");dn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:h}=c;return b.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,m)=>{const{velocity:y}=m;y[p]&&h(n,u[p].get(),y[p]),o&&o(g,m)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const Rb=E.forwardRef(CP);/**
12
+ `),()=>{document.head.removeChild(f)}},[t]),x.jsx(WT,{isPresent:t,childRef:o,sizeRef:i,children:k.cloneElement(e,{ref:o})})}const UT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(YT),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),k.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=x.jsx(qT,{isPresent:n,anchorX:s,children:e})),x.jsx(nl.Provider,{value:d,children:e})};function YT(){return new Map}function Zy(e=!0){const t=E.useContext(nl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Ma=e=>e.key||"";function Nh(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const vr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=Zy(a),u=E.useMemo(()=>Nh(e),[e]),d=a&&!l?[]:u.map(Ma),p=E.useRef(!0),f=E.useRef(u),m=bn(()=>new Map),[g,h]=E.useState(u),[v,y]=E.useState(u);tl(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const S=Ma(v[w]);d.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[v,d.length,d.join("-")]);const b=[];if(u!==g){let w=[...u];for(let S=0;S<v.length;S++){const C=v[S],R=Ma(C);d.includes(R)||(w.splice(S,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),y(Nh(w)),h(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}=E.useContext(Yi);return x.jsx(x.Fragment,{children:v.map(w=>{const S=Ma(w),C=a&&!l?!1:u===v||d.includes(S),R=()=>{if(m.has(S))m.set(S,!0);else return;let I=!0;m.forEach(A=>{A||(I=!1)}),I&&(T==null||T(),y(f.current),a&&(c==null||c()),r&&r())};return x.jsx(UT,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:R,anchorX:s,children:w},S)})})},GT=E.createContext(null),Yt=e=>e;let ii=Yt,dn=Yt;process.env.NODE_ENV!=="production"&&(ii=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},dn=(e,t)=>{if(!e)throw new Error(t)});const KT={useManualTiming:!1},Da=["read","resolveKeyframes","update","preRender","render","postRender"];function ZT(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 m=p&&o?n:r;return d&&a.add(u),m.has(u)||m.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 XT=40;function Xy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Da.reduce((v,y)=>(v[y]=ZT(i),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,XT),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},m=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Da.reduce((v,y)=>{const b=a[y];return v[y]=(T,w=!1,S=!1)=>(n||m(),b.schedule(T,w,S)),v},{}),cancel:v=>{for(let y=0;y<Da.length;y++)a[Da[y]].cancel(v)},state:o,steps:a}}const{schedule:Je,cancel:Wn,state:Mt,steps:Pc}=Xy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);function QT(){const e=E.useRef(!1);return tl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function JT(){const e=QT(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Je.postRender(r),[r]),t]}const eE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Fh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(eE);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 Qy=e=>e===!0,tE=e=>Qy(e===!0)||e==="id",nE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Yi),o=E.useContext(GT),[i,a]=JT(),s=E.useRef(null),l=r.id||o;s.current===null&&(tE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Qy(n)&&r.group||Fh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx(Yi.Provider,{value:c,children:e})},Jy=E.createContext({strict:!1}),Lh={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"]},jo={};for(const e in Lh)jo[e]={isEnabled:t=>Lh[e].some(n=>!!t[n])};function rE(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const oE=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 cs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oE.has(e)}let ex=e=>!cs(e);function tx(e){e&&(ex=t=>t.startsWith("on")?!cs(t):e(t))}try{tx(require("@emotion/is-prop-valid").default)}catch{}function iE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(ex(o)||n===!0&&cs(o)||!t&&!cs(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function aE({children:e,isValidProp:t,...n}){t&&tx(t),n={...E.useContext(Do),...n},n.isStatic=bn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Do.Provider,{value:r,children:e})}const Vh=new Set;function rl(e,t,n){e||Vh.has(t)||(console.warn(t),Vh.add(t))}function sE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rl(!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 ol=E.createContext({});function il(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gi(e){return typeof e=="string"||Array.isArray(e)}const Gd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kd=["initial",...Gd];function al(e){return il(e.animate)||Kd.some(t=>Gi(e[t]))}function nx(e){return!!(al(e)||e.variants)}function lE(e,t){if(al(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gi(n)?n:void 0,animate:Gi(r)?r:void 0}}return e.inherit!==!1?t:{}}function cE(e){const{initial:t,animate:n}=lE(e,E.useContext(ol));return E.useMemo(()=>({initial:t,animate:n}),[$h(t),$h(n)])}function $h(e){return Array.isArray(e)?e.join(" "):e}const uE=Symbol.for("motionComponentSymbol");function xo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function dE(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):xo(n)&&(n.current=r))},[t])}const{schedule:Zd}=Xy(queueMicrotask,!1),Xd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),fE="framerAppearId",rx="data-"+Xd(fE),ox=E.createContext({});function pE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(ol),l=E.useContext(Jy),c=E.useContext(nl),u=E.useContext(Do).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(ox);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&hE(d.current,n,o,f);const m=E.useRef(!1);E.useInsertionEffect(()=>{p&&m.current&&p.update(n,c)});const g=n[rx],h=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return tl(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Zd.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),h.current=!1))}),p}function hE(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ix(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&xo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ix(e){if(e)return e.options.allowProjection!==!1?e.projection:ix(e.parent)}function mE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&rE(e);function s(c,u){let d;const p={...E.useContext(Do),...c,layoutId:gE(c)},{isStatic:f}=p,m=cE(c),g=r(c,f);if(!f&&Yd){vE(p,e);const h=yE(p);d=h.MeasureLayout,m.visualElement=pE(o,g,p,t,h.ProjectionNode)}return x.jsxs(ol.Provider,{value:m,children:[d&&m.visualElement?x.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,c,dE(g,m.visualElement,u),g,f,m.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[uE]=o,l}function gE({layoutId:e}){const t=E.useContext(Yi).id;return t&&e!==void 0?t+"-"+e:e}function vE(e,t){const n=E.useContext(Jy).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?ii(!1,r):dn(!1,r)}}function yE(e){const{drag:t,layout:n}=jo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const ax=e=>t=>typeof t=="string"&&t.startsWith(e),Qd=ax("--"),xE=ax("var(--"),Jd=e=>xE(e)?bE.test(e.split("/*")[0].trim()):!1,bE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ki={};function wE(e){for(const t in e)Ki[t]=e[t],Qd(t)&&(Ki[t].isCSSVariable=!0)}const ai=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],eo=new Set(ai);function sx(e,{layout:t,layoutId:n}){return eo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ki[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),lx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,si={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Zi={...si,transform:e=>qn(0,1,e)},ja={...si,default:1},ga=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),or=ga("deg"),_n=ga("%"),we=ga("px"),SE=ga("vh"),TE=ga("vw"),zh={..._n,parse:e=>_n.parse(e)/100,transform:e=>_n.transform(e*100)},EE={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},CE={rotate:or,rotateX:or,rotateY:or,rotateZ:or,scale:ja,scaleX:ja,scaleY:ja,scaleZ:ja,skew:or,skewX:or,skewY:or,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Zi,originX:zh,originY:zh,originZ:we},Bh={...si,transform:Math.round},ef={...EE,...CE,zIndex:Bh,size:we,fillOpacity:Zi,strokeOpacity:Zi,numOctaves:Bh},kE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},RE=ai.length;function PE(e,t,n){let r="",o=!0;for(let i=0;i<RE;i++){const a=ai[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=lx(s,ef[a]);if(!l){o=!1;const u=kE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function tf(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(eo.has(l)){a=!0;continue}else if(Qd(l)){o[l]=c;continue}else{const u=lx(c,ef[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=PE(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 nf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cx(e,t,n){for(const r in t)!Pt(t[r])&&!sx(r,n)&&(e[r]=t[r])}function AE({transformTemplate:e},t){return E.useMemo(()=>{const n=nf();return tf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function IE(e,t){const n=e.style||{},r={};return cx(r,n,e),Object.assign(r,AE(e,t)),r}function _E(e,t){const n={},r=IE(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 OE=["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 rf(e){return typeof e!="string"||e.includes("-")?!1:!!(OE.indexOf(e)>-1||/[A-Z]/u.test(e))}const ME={offset:"stroke-dashoffset",array:"stroke-dasharray"},DE={offset:"strokeDashoffset",array:"strokeDasharray"};function jE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ME:DE;e[i.offset]=we.transform(-r);const a=we.transform(t),s=we.transform(n);e[i.array]=`${a} ${s}`}function Hh(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function NE(e,t,n){const r=Hh(t,e.x,e.width),o=Hh(n,e.y,e.height);return`${r} ${o}`}function of(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(tf(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:m}=e;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=NE(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&jE(p,a,s,l,!1)}const ux=()=>({...nf(),attrs:{}}),af=e=>typeof e=="string"&&e.toLowerCase()==="svg";function FE(e,t,n,r){const o=E.useMemo(()=>{const i=ux();return of(i,t,af(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};cx(i,e.style,e),o.style={...i,...o.style}}return o}function LE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(rf(n)?FE:_E)(r,i,a,n),c=iE(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>Pt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Wh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sf(e,t,n,r){if(typeof t=="function"){const[o,i]=Wh(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]=Wh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Du=e=>Array.isArray(e),VE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),$E=e=>Du(e)?e[e.length-1]||0:e;function es(e){const t=Pt(e)?e.get():e;return VE(t)?t.toValue():t}function zE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:BE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const dx=e=>(t,n)=>{const r=E.useContext(ol),o=E.useContext(nl),i=()=>zE(e,t,r,o);return n?i():bn(i)};function BE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=es(i[p]);let{initial:a,animate:s}=e;const l=al(e),c=nx(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"&&!il(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const m=sf(e,p[f]);if(m){const{transitionEnd:g,transition:h,...v}=m;for(const y in v){let b=v[y];if(Array.isArray(b)){const T=u?b.length-1:0;b=b[T]}b!==null&&(o[y]=b)}for(const y in g)o[y]=g[y]}}}return o}function lf(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||sx(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const HE={useVisualState:dx({scrapeMotionValuesFromProps:lf,createRenderState:nf})};function fx(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function px(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])}const hx=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 mx(e,t,n,r){px(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(hx.has(o)?o:Xd(o),t.attrs[o])}function gx(e,t,n){const r=lf(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=ai.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const qh=["x","y","width","height","cx","cy","r"],WE={useVisualState:dx({scrapeMotionValuesFromProps:gx,createRenderState:ux,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(eo.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<qh.length;s++){const l=qh[s];e[l]!==t[l]&&(a=!0)}a&&Je.read(()=>{fx(n,r),Je.render(()=>{of(r,o,af(n.tagName),e.transformTemplate),mx(n,r)})})}})};function qE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...rf(r)?WE:HE,preloadedFeatures:e,useRender:LE(o),createVisualElement:t,Component:r};return mE(a)}}function Xi(e,t,n){const r=e.getProps();return sf(r,t,n!==void 0?n:r.custom,e)}function cf(e,t){return e?e[t]||e.default||e:void 0}const vx=new Set(["width","height","top","left","right","bottom",...ai]);function uf(e,t){e.indexOf(t)===-1&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function UE([...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}class df{constructor(){this.subscriptions=[]}add(t){return uf(this.subscriptions,t),()=>sl(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}}function yx(e,t){return t?e*(1e3/t):0}let ts;function YE(){ts=void 0}const On={now:()=>(ts===void 0&&On.set(Mt.isProcessing||KT.useManualTiming?Mt.timestamp:performance.now()),ts),set:e=>{ts=e,queueMicrotask(YE)}},Uh=30,GE=e=>!isNaN(parseFloat(e)),Mi={current:void 0};class KE{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=On.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=GE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rl(!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 df);const r=this.events[t].add(n);return t==="change"?()=>{r(),Je.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()}get(){return Mi.current&&Mi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Uh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Uh);return yx(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function No(e,t){return new KE(e,t)}function ZE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function XE(e,t){const n=Xi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=$E(i[a]);ZE(e,a,s)}}function QE(e){return!!(Pt(e)&&e.add)}function ju(e,t){const n=e.getValue("willChange");if(QE(n))return n.add(t)}function xx(e){return e.props[rx]}function ff(e){let t;return()=>(t===void 0&&(t=e()),t)}const JE=ff(()=>window.ScrollTimeline!==void 0);class eC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,n){const r=this.animations.map(o=>{if(JE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].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 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]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class bx extends eC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const yn=e=>e*1e3,Mn=e=>e/1e3;function ll(e){return typeof e=="function"}function Yh(e,t){e.timeline=t,e.onfinish=null}const pf=e=>Array.isArray(e)&&typeof e[0]=="number",tC={linearEasing:void 0};function nC(e,t){const n=ff(e);return()=>{var r;return(r=tC[t])!==null&&r!==void 0?r:n()}}const us=nC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wx=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Wr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Sx(e){return!!(typeof e=="function"&&us()||!e||typeof e=="string"&&(e in Nu||us())||pf(e)||Array.isArray(e)&&e.every(Sx))}const ki=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Nu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ki([0,.65,.55,1]),circOut:ki([.55,0,1,.45]),backIn:ki([.31,.01,.66,-.59]),backOut:ki([.33,1.53,.69,.99])};function Tx(e,t){if(e)return typeof e=="function"&&us()?wx(e,t):pf(e)?ki(e):Array.isArray(e)?e.map(n=>Tx(n,t)||Nu.easeOut):Nu[e]}const Ex=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rC=1e-7,oC=12;function iC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Ex(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>rC&&++s<oC);return a}function va(e,t,n,r){if(e===t&&n===r)return Yt;const o=i=>iC(i,0,1,e,n);return i=>i===0||i===1?i:Ex(o(i),t,r)}const Cx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kx=e=>t=>1-e(1-t),Rx=va(.33,1.53,.69,.99),hf=kx(Rx),Px=Cx(hf),Ax=e=>(e*=2)<1?.5*hf(e):.5*(2-Math.pow(2,-10*(e-1))),mf=e=>1-Math.sin(Math.acos(e)),Ix=kx(mf),_x=Cx(mf),Ox=e=>/^0[^.\s]+$/u.test(e);function aC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ox(e):!0}const Di=e=>Math.round(e*1e5)/1e5,gf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sC(e){return e==null}const lC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vf=(e,t)=>n=>!!(typeof n=="string"&&lC.test(n)&&n.startsWith(e)||t&&!sC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Mx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(gf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},cC=e=>qn(0,255,e),Ac={...si,transform:e=>Math.round(cC(e))},Fr={test:vf("rgb","red"),parse:Mx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ac.transform(e)+", "+Ac.transform(t)+", "+Ac.transform(n)+", "+Di(Zi.transform(r))+")"};function uC(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 Fu={test:vf("#"),parse:uC,transform:Fr.transform},bo={test:vf("hsl","hue"),parse:Mx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_n.transform(Di(t))+", "+_n.transform(Di(n))+", "+Di(Zi.transform(r))+")"},Nt={test:e=>Fr.test(e)||Fu.test(e)||bo.test(e),parse:e=>Fr.test(e)?Fr.parse(e):bo.test(e)?bo.parse(e):Fu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Fr.transform(e):bo.transform(e)},dC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(dC))===null||n===void 0?void 0:n.length)||0)>0}const Dx="number",jx="color",pC="var",hC="var(",Gh="${}",mC=/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 Qi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(mC,l=>(Nt.test(l)?(r.color.push(i),o.push(jx),n.push(Nt.parse(l))):l.startsWith(hC)?(r.var.push(i),o.push(pC),n.push(l)):(r.number.push(i),o.push(Dx),n.push(parseFloat(l))),++i,Gh)).split(Gh);return{values:n,split:s,indexes:r,types:o}}function Nx(e){return Qi(e).values}function Fx(e){const{split:t,types:n}=Qi(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===Dx?i+=Di(o[a]):s===jx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const gC=e=>typeof e=="number"?0:e;function vC(e){const t=Nx(e);return Fx(e)(t.map(gC))}const dr={test:fC,parse:Nx,createTransformer:Fx,getAnimatableNone:vC},yC=new Set(["brightness","contrast","saturate","opacity"]);function xC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gf)||[];if(!r)return e;const o=n.replace(r,"");let i=yC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const bC=/\b([a-z-]*)\(.*?\)/gu,Lu={...dr,getAnimatableNone:e=>{const t=e.match(bC);return t?t.map(xC).join(" "):e}},wC={...ef,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:Lu,WebkitFilter:Lu},Lx=e=>wC[e];function Vx(e,t){let n=Lx(e);return n!==Lu&&(n=dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const SC=new Set(["auto","none","0"]);function TC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!SC.has(i)&&Qi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Vx(n,o)}const Lr=e=>e*180/Math.PI,Vu=e=>{const t=Lr(Math.atan2(e[1],e[0]));return $u(t)},EC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vu,rotateZ:Vu,skewX:e=>Lr(Math.atan(e[1])),skewY:e=>Lr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$u=e=>(e=e%360,e<0&&(e+=360),e),Kh=Vu,Zh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),CC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zh,scaleY:Xh,scale:e=>(Zh(e)+Xh(e))/2,rotateX:e=>$u(Lr(Math.atan2(e[6],e[5]))),rotateY:e=>$u(Lr(Math.atan2(-e[2],e[0]))),rotateZ:Kh,rotate:Kh,skewX:e=>Lr(Math.atan(e[4])),skewY:e=>Lr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Qh(e){return e.includes("scale")?1:0}function zu(e,t){if(!e||e==="none")return Qh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=CC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=EC,o=s}if(!o)return Qh(t);const i=r[t],a=o[1].split(",").map(RC);return typeof i=="function"?i(a):a[i]}const kC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return zu(n,t)};function RC(e){return parseFloat(e.trim())}const Jh=e=>e===si||e===we,PC=new Set(["x","y","z"]),AC=ai.filter(e=>!PC.has(e));function IC(e){const t=[];return AC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fo={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})=>zu(t,"x"),y:(e,{transform:t})=>zu(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const Br=new Set;let Bu=!1,Hu=!1;function $x(){if(Hu){const e=Array.from(Br).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=IC(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])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Hu=!1,Bu=!1,Br.forEach(e=>e.complete()),Br.clear()}function zx(){Br.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hu=!0)})}function _C(){zx(),$x()}class yf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Br.add(this),Bu||(Bu=!0,Je.read(zx),Je.resolveKeyframes($x))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Br.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Br.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Bx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function MC(e){const t=OC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const DC=4;function Hx(e,t,n=1){dn(n<=DC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=MC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Bx(a)?parseFloat(a):a}return Jd(o)?Hx(o,t,n+1):o}const Wx=e=>t=>t.test(e),jC={test:e=>e==="auto",parse:e=>e},qx=[si,we,_n,or,TE,SE,jC],em=e=>qx.find(Wx(e));class Ux extends yf{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(),Jd(c))){const u=Hx(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!vx.has(r)||t.length!==2)return;const[o,i]=t,a=em(o),s=em(i);if(a!==s)if(Jh(a)&&Jh(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)aC(t[o])&&r.push(o);r.length&&TC(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=Fo[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(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=Fo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const tm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dr.test(e)||e==="0")&&!e.startsWith("url("));function NC(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 FC(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=tm(o,t),s=tm(i,t);return ii(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:NC(e)||(n==="spring"||ll(n))&&r}const LC=e=>e!==null;function cl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(LC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const VC=40;class Yx{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>VC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&_C(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!FC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(cl(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ds=2e4;function xf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ds;)t+=n,r=e.next(t);return t>=ds?1/0:t}const it=(e,t,n)=>e+(t-e)*n;function Ic(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 $C({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=Ic(l,s,e+1/3),i=Ic(l,s,e),a=Ic(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function fs(e,t){return n=>n>0?t:e}const _c=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},zC=[Fu,Fr,bo],BC=e=>zC.find(t=>t.test(e));function nm(e){const t=BC(e);if(ii(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===bo&&(n=$C(n)),n}const rm=(e,t)=>{const n=nm(e),r=nm(t);if(!n||!r)return fs(e,t);const o={...n};return i=>(o.red=_c(n.red,r.red,i),o.green=_c(n.green,r.green,i),o.blue=_c(n.blue,r.blue,i),o.alpha=it(n.alpha,r.alpha,i),Fr.transform(o))},HC=(e,t)=>n=>t(e(n)),ya=(...e)=>e.reduce(HC),Wu=new Set(["none","hidden"]);function WC(e,t){return Wu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qC(e,t){return n=>it(e,t,n)}function bf(e){return typeof e=="number"?qC:typeof e=="string"?Jd(e)?fs:Nt.test(e)?rm:GC:Array.isArray(e)?Gx:typeof e=="object"?Nt.test(e)?rm:UC:fs}function Gx(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>bf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function UC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=bf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function YC(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const GC=(e,t)=>{const n=dr.createTransformer(t),r=Qi(e),o=Qi(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?Wu.has(e)&&!o.values.length||Wu.has(t)&&!r.values.length?WC(e,t):ya(Gx(YC(r,o),o.values),n):(ii(!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.`),fs(e,t))};function Kx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):bf(e)(e,t)}const KC=5;function Zx(e,t,n){const r=Math.max(t-KC,0);return yx(n-e(r),t-r)}const ft={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},om=.001;function ZC({duration:e=ft.duration,bounce:t=ft.bounce,velocity:n=ft.velocity,mass:r=ft.mass}){let o,i;ii(e<=yn(ft.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=qn(ft.minDamping,ft.maxDamping,a),e=qn(ft.minDuration,ft.maxDuration,Mn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=qu(c,a),m=Math.exp(-d);return om-p/f*m},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=qu(Math.pow(c,2),a);return(-o(c)+om>0?-1:1)*((p-f)*m)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=QC(o,i,s);if(e=yn(e),isNaN(l))return{stiffness:ft.stiffness,damping:ft.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const XC=12;function QC(e,t,n){let r=n;for(let o=1;o<XC;o++)r=r-e(r)/t(r);return r}function qu(e,t){return e*Math.sqrt(1-t*t)}const JC=["duration","bounce"],ek=["stiffness","damping","mass"];function im(e,t){return t.some(n=>e[n]!==void 0)}function tk(e){let t={velocity:ft.velocity,stiffness:ft.stiffness,damping:ft.damping,mass:ft.mass,isResolvedFromDuration:!1,...e};if(!im(e,ek)&&im(e,JC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*qn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ft.mass,stiffness:o,damping:i}}else{const n=ZC(e);t={...t,...n,mass:ft.mass},t.isResolvedFromDuration=!0}return t}function wf(e=ft.visualDuration,t=ft.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}=tk({...n,velocity:-Mn(n.velocity||0)}),m=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,v=Mn(Math.sqrt(l/u)),y=Math.abs(h)<5;r||(r=y?ft.restSpeed.granular:ft.restSpeed.default),o||(o=y?ft.restDelta.granular:ft.restDelta.default);let b;if(g<1){const w=qu(v,g);b=S=>{const C=Math.exp(-g*v*S);return a-C*((m+g*v*h)/w*Math.sin(w*S)+h*Math.cos(w*S))}}else if(g===1)b=w=>a-Math.exp(-v*w)*(h+(m+v*h)*w);else{const w=v*Math.sqrt(g*g-1);b=S=>{const C=Math.exp(-g*v*S),R=Math.min(w*S,300);return a-C*((m+g*v*h)*Math.sinh(R)+w*h*Math.cosh(R))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const S=b(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?yn(m):Zx(b,w,S));const R=Math.abs(C)<=r,I=Math.abs(a-S)<=o;s.done=R&&I}return s.value=s.done?a:S,s},toString:()=>{const w=Math.min(xf(T),ds),S=wx(C=>T.next(w*C).value,w,30);return w+"ms "+S}};return T}function am({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=R=>s!==void 0&&R<s||l!==void 0&&R>l,m=R=>s===void 0?l:l===void 0||Math.abs(s-R)<Math.abs(l-R)?s:l;let g=n*t;const h=d+g,v=a===void 0?h:a(h);v!==h&&(g=v-d);const y=R=>-g*Math.exp(-R/r),b=R=>v+y(R),T=R=>{const I=y(R),A=b(R);p.done=Math.abs(I)<=c,p.value=p.done?v:A};let w,S;const C=R=>{f(p.value)&&(w=R,S=wf({keyframes:[p.value,m(p.value)],velocity:Zx(b,R,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:R=>{let I=!1;return!S&&w===void 0&&(I=!0,T(R),C(R)),w!==void 0&&R>=w?S.next(R-w):(!I&&T(R),p)}}}const nk=va(.42,0,1,1),rk=va(0,0,.58,1),Xx=va(.42,0,.58,1),Qx=e=>Array.isArray(e)&&typeof e[0]!="number",sm={linear:Yt,easeIn:nk,easeInOut:Xx,easeOut:rk,circIn:mf,circInOut:_x,circOut:Ix,backIn:hf,backInOut:Px,backOut:Rx,anticipate:Ax},Uu=e=>{if(pf(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return va(t,n,r,o)}else if(typeof e=="string")return dn(sm[e]!==void 0,`Invalid easing type '${e}'`),sm[e];return e};function ok(e,t,n){const r=[],o=n||Kx,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]||Yt:t;s=ya(l,s)}r.push(s)}return r}function Jx(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(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=ok(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=Wr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(qn(e[0],e[i-1],u)):c}function eb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wr(0,t,r);e.push(it(n,1,o))}}function tb(e){const t=[0];return eb(t,e.length-1),t}function ik(e,t){return e.map(n=>n*t)}function ak(e,t){return e.map(()=>t||Xx).splice(0,e.length-1)}function ji({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Qx(r)?r.map(Uu):Uu(r),i={done:!1,value:t[0]},a=ik(n&&n.length===t.length?n:tb(t),e),s=Jx(a,t,{ease:Array.isArray(o)?o:ak(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const sk=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Je.update(t,!0),stop:()=>Wn(t),now:()=>Mt.isProcessing?Mt.timestamp:On.now()}},lk={decay:am,inertia:am,tween:ji,keyframes:ji,spring:wf},ck=e=>e/100;class Sf extends Yx{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||yf,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=ll(n)?n:lk[n]||ji;let l,c;process.env.NODE_ENV!=="production"&&s!==ji&&dn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==ji&&typeof t[0]!="number"&&(l=ya(ck,Kx(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=xf(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:m,repeatDelay:g,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-p*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,T=i;if(f){const R=Math.min(this.currentTime,u)/d;let I=Math.floor(R),A=R%1;!A&&R>=1&&(A=1),A===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(m==="reverse"?(A=1-A,g&&(A-=g/d)):m==="mirror"&&(T=a)),b=qn(0,1,A)*d}const w=y?{done:!1,value:l[0]}:T.next(b);s&&(w.value=s(w.value));let{done:S}=w;!y&&c!==null&&(S=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&o!==void 0&&(w.value=cl(l,this.options,o)),h&&h(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Mn(t.calculatedDuration):0}get time(){return Mn(this.currentTime)}set time(t){t=yn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Mn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=sk,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const uk=new Set(["opacity","clipPath","filter","transform"]);function dk(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Tx(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const fk=ff(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ps=10,pk=2e4;function hk(e){return ll(e.type)||e.type==="spring"||!Sx(e.ease)}function mk(e,t){const n=new Sf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<pk;)r=n.sample(i),o.push(r.value),i+=ps;return{times:void 0,keyframes:o,duration:i-ps,ease:"linear"}}const nb={anticipate:Ax,backInOut:Px,circInOut:_x};function gk(e){return e in nb}class lm extends Yx{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new Ux(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&us()&&gk(i)&&(i=nb[i]),hk(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=mk(t,g);t=h.keyframes,t.length===1&&(t[1]=t[0]),r=h.duration,o=h.times,i=h.ease,a="keyframes"}const u=dk(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Yh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(cl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Mn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Mn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Yt;const{animation:r}=n;Yh(r,t)}return Yt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,m=new Sf({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=yn(this.time);c.setWithVelocity(m.sample(g-ps).value,m.sample(g).value,ps)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return fk()&&r&&uk.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const vk={type:"spring",stiffness:500,damping:25,restSpeed:10},yk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xk={type:"keyframes",duration:.8},bk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wk=(e,{keyframes:t})=>t.length>2?xk:eo.has(e)?e.startsWith("scale")?yk(t[1]):vk:bk;function Sk({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 Tf=(e,t,n,r={},o,i)=>a=>{const s=cf(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-yn(l);let 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};Sk(s)||(u={...u,...wk(e,u)}),u.duration&&(u.duration=yn(u.duration)),u.repeatDelay&&(u.repeatDelay=yn(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)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=cl(u.keyframes,s);if(p!==void 0)return Je.update(()=>{u.onUpdate(p),u.onComplete()}),new bx([])}return!i&&lm.supports(u)?new lm(u):new Sf(u)};function Tk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ef(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&Tk(u,d))continue;const m={delay:n,...cf(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=xx(e);if(v){const y=window.MotionHandoffAnimation(v,d,Je);y!==null&&(m.startTime=y,g=!0)}}ju(e,d),p.start(Tf(d,p,f,e.shouldReduceMotion&&vx.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return s&&Promise.all(c).then(()=>{Je.update(()=>{s&&XE(e,s)})}),c}function Yu(e,t,n={}){var r;const o=Xi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Ef(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return Ek(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function Ek(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(Ck).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Yu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function Ck(e,t){return e.sortNodePosition(t)}function kk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Yu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Yu(e,t,n);else{const o=typeof t=="function"?Xi(e,t,n.custom):t;r=Promise.all(Ef(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function rb(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 Rk=Kd.length;function ob(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ob(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Rk;n++){const r=Kd[n],o=e.props[r];(Gi(o)||o===!1)&&(t[r]=o)}return t}const Pk=[...Gd].reverse(),Ak=Gd.length;function Ik(e){return t=>Promise.all(t.map(({animation:n,options:r})=>kk(e,n,r)))}function _k(e){let t=Ik(e),n=cm(),r=!0;const o=l=>(c,u)=>{var d;const p=Xi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:m,...g}=p;c={...c,...g,...m}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=ob(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<Ak;h++){const v=Pk[h],y=n[v],b=c[v]!==void 0?c[v]:u[v],T=Gi(b),w=v===l?y.isActive:null;w===!1&&(m=h);let S=b===u[v]&&b!==c[v]&&T;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),y.protectedKeys={...f},!y.isActive&&w===null||!b&&!y.prevProp||il(b)||typeof b=="boolean")continue;const C=Ok(y.prevProp,b);let R=C||v===l&&y.isActive&&!S&&T||h>m&&T,I=!1;const A=Array.isArray(b)?b:[b];let O=A.reduce(o(v),{});w===!1&&(O={});const{prevResolvedValues:N={}}=y,V={...N,...O},P=F=>{R=!0,p.has(F)&&(I=!0,p.delete(F)),y.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)};for(const F in V){const j=O[F],z=N[F];if(f.hasOwnProperty(F))continue;let M=!1;Du(j)&&Du(z)?M=!rb(j,z):M=j!==z,M?j!=null?P(F):p.add(F):j!==void 0&&p.has(F)?P(F):y.protectedKeys[F]=!0}y.prevProp=b,y.prevResolvedValues=O,y.isActive&&(f={...f,...O}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(S&&C)||I)&&d.push(...A.map(F=>({animation:F,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=Xi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(h.transition=v.transition)}p.forEach(v=>{const y=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),h[v]=y??null}),d.push({animation:h})}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){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=cm(),r=!0}}}function Ok(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rb(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cm(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class yr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Mk extends yr{constructor(t){super(t),t.animationState||(t.animationState=_k(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();il(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Dk=0;class jk extends yr{constructor(){super(...arguments),this.id=Dk++}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 Nk={animation:{Feature:Mk},exit:{Feature:jk}},mn={x:!1,y:!1};function ib(){return mn.x||mn.y}function Fk(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function Ji(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Cf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function xa(e){return{point:{x:e.pageX,y:e.pageY}}}const Lk=e=>t=>Cf(t)&&e(t,xa(t));function Ni(e,t,n,r){return Ji(e,t,Lk(n),r)}function ab({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Vk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $k(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 sb=1e-4,zk=1-sb,Bk=1+sb,lb=.01,Hk=0-lb,Wk=0+lb;function zt(e){return e.max-e.min}function qk(e,t,n){return Math.abs(e-t)<=n}function um(e,t,n,r=.5){e.origin=r,e.originPoint=it(t.min,t.max,e.origin),e.scale=zt(n)/zt(t),e.translate=it(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zk&&e.scale<=Bk||isNaN(e.scale))&&(e.scale=1),(e.translate>=Hk&&e.translate<=Wk||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){um(e.x,t.x,n.x,r?r.originX:void 0),um(e.y,t.y,n.y,r?r.originY:void 0)}function dm(e,t,n){e.min=n.min+t.min,e.max=e.min+zt(t)}function Uk(e,t,n){dm(e.x,t.x,n.x),dm(e.y,t.y,n.y)}function fm(e,t,n){e.min=t.min-n.min,e.max=e.min+zt(t)}function Li(e,t,n){fm(e.x,t.x,n.x),fm(e.y,t.y,n.y)}const pm=()=>({translate:0,scale:1,origin:0,originPoint:0}),wo=()=>({x:pm(),y:pm()}),hm=()=>({min:0,max:0}),mt=()=>({x:hm(),y:hm()});function an(e){return[e("x"),e("y")]}function Oc(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:n}){return!Oc(e)||!Oc(t)||!Oc(n)}function _r(e){return Gu(e)||cb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cb(e){return mm(e.x)||mm(e.y)}function mm(e){return e&&e!=="0%"}function hs(e,t,n){const r=e-n,o=t*r;return n+o}function gm(e,t,n,r,o){return o!==void 0&&(e=hs(e,o,r)),hs(e,n,r)+t}function Ku(e,t=0,n=1,r,o){e.min=gm(e.min,t,n,r,o),e.max=gm(e.max,t,n,r,o)}function ub(e,{x:t,y:n}){Ku(e.x,t.translate,t.scale,t.originPoint),Ku(e.y,n.translate,n.scale,n.originPoint)}const vm=.999999999999,ym=1.0000000000001;function Yk(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&&To(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,ub(e,a)),r&&_r(i.latestValues)&&To(e,i.latestValues))}t.x<ym&&t.x>vm&&(t.x=1),t.y<ym&&t.y>vm&&(t.y=1)}function So(e,t){e.min=e.min+t,e.max=e.max+t}function xm(e,t,n,r,o=.5){const i=it(e.min,e.max,o);Ku(e,t,n,i,r)}function To(e,t){xm(e.x,t.x,t.scaleX,t.scale,t.originX),xm(e.y,t.y,t.scaleY,t.scale,t.originY)}function db(e,t){return ab($k(e.getBoundingClientRect(),t))}function Gk(e,t,n){const r=db(e,n),{scroll:o}=t;return o&&(So(r.x,o.offset.x),So(r.y,o.offset.y)),r}const fb=({current:e})=>e?e.ownerDocument.defaultView:null,bm=(e,t)=>Math.abs(e-t);function Kk(e,t){const n=bm(e.x,t.x),r=bm(e.y,t.y);return Math.sqrt(n**2+r**2)}class pb{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=Dc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=Kk(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=d,{timestamp:g}=Mt;this.history.push({...m,timestamp:g});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Mc(p,this.transformPagePoint),Je.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Dc(d.type==="pointercancel"?this.lastMoveEventInfo:Mc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),m&&m(d,h)},!Cf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=xa(t),s=Mc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Dc(s,this.history)),this.removeListeners=ya(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wn(this.updatePoint)}}function Mc(e,t){return t?{point:t(e.point)}:e}function wm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Dc({point:e},t){return{point:e,delta:wm(e,hb(t)),offset:wm(e,Zk(t)),velocity:Xk(t,.1)}}function Zk(e){return e[0]}function hb(e){return e[e.length-1]}function Xk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=hb(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>yn(t)));)n--;if(!r)return{x:0,y:0};const i=Mn(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 Qk(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?it(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?it(n,e,r.max):Math.min(e,n)),e}function Sm(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 Jk(e,{top:t,left:n,bottom:r,right:o}){return{x:Sm(e.x,n,o),y:Sm(e.y,t,r)}}function Tm(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 eR(e,t){return{x:Tm(e.x,t.x),y:Tm(e.y,t.y)}}function tR(e,t){let n=.5;const r=zt(e),o=zt(t);return o>r?n=Wr(t.min,t.max-r,e.min):r>o&&(n=Wr(e.min,e.max-o,t.min)),qn(0,1,n)}function nR(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 Zu=.35;function rR(e=Zu){return e===!1?e=0:e===!0&&(e=Zu),{x:Em(e,"left","right"),y:Em(e,"top","bottom")}}function Em(e,t,n){return{min:Cm(e,t),max:Cm(e,n)}}function Cm(e,t){return typeof e=="number"?e:e[t]||0}const oR=new WeakMap;class iR{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=mt(),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(xa(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fk(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),an(h=>{let v=this.getAxisMotionValue(h).get()||0;if(_n.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const b=y.layout.layoutBox[h];b&&(v=zt(b)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&Je.postRender(()=>m(u,d)),ju(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:h}=d;if(f&&this.currentDirection===null){this.currentDirection=aR(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,h),this.updateAxis("y",d.point,h),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>an(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new pb(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:fb(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&&Je.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||!Na(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Qk(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&xo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=Jk(o.layoutBox,n):this.constraints=!1,this.elastic=rR(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=nR(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xo(t))return!1;const r=t.current;dn(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=Gk(r,o.root,this.visualElement.getTransformPagePoint());let a=eR(o.layout.layoutBox,i);if(n){const s=n(Vk(a));this.hasMutatedConstraints=!!s,s&&(a=ab(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=an(u=>{if(!Na(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,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ju(this.visualElement,t),r.start(Tf(t,r,0,n,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){an(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){an(n=>{const{drag:r}=this.getProps();if(!Na(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]-it(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!xo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};an(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=tR({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(),an(a=>{if(!Na(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(it(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;oR.set(this.visualElement,this);const t=this.visualElement.current,n=Ni(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();xo(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()),Je.read(r);const a=Ji(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(an(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{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=Zu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Na(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sR extends yr{constructor(t){super(t),this.removeGroupControls=Yt,this.removeListeners=Yt,this.controls=new iR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const km=e=>(t,n)=>{e&&Je.postRender(()=>e(t,n))};class lR extends yr{constructor(){super(...arguments),this.removePointerDownListener=Yt}onPointerDown(t){this.session=new pb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:km(t),onStart:km(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Je.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ni(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 ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Rm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=Rm(e,t.target.x),r=Rm(e,t.target.y);return`${n}% ${r}%`}},cR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=dr.parse(e);if(o.length>5)return r;const i=dr.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=it(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 uR extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;wE(dR),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()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;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()||Je.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Zd.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 mb(e){const[t,n]=Zy(),r=E.useContext(Yi);return x.jsx(uR,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(ox),isPresent:t,safeToRemove:n})}const dR={borderRadius:{...wi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wi,borderTopRightRadius:wi,borderBottomLeftRadius:wi,borderBottomRightRadius:wi,boxShadow:cR};function gb(e,t,n){const r=Pt(e)?e:No(e);return r.start(Tf("",r,t,n)),r.animation}function vb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const fR=(e,t)=>e.depth-t.depth;class pR{constructor(){this.children=[],this.isDirty=!1}add(t){uf(this.children,t),this.isDirty=!0}remove(t){sl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(fR),this.isDirty=!1,this.children.forEach(t)}}function hR(e,t){const n=On.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wn(r),e(i-t))};return Je.read(r,!0),()=>Wn(r)}const yb=["TopLeft","TopRight","BottomLeft","BottomRight"],mR=yb.length,Pm=e=>typeof e=="string"?parseFloat(e):e,Am=e=>typeof e=="number"||we.test(e);function gR(e,t,n,r,o,i){o?(e.opacity=it(0,n.opacity!==void 0?n.opacity:1,vR(r)),e.opacityExit=it(t.opacity!==void 0?t.opacity:1,0,yR(r))):i&&(e.opacity=it(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<mR;a++){const s=`border${yb[a]}Radius`;let l=Im(t,s),c=Im(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Am(l)===Am(c)?(e[s]=Math.max(it(Pm(l),Pm(c),r),0),(_n.test(c)||_n.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=it(t.rotate||0,n.rotate||0,r))}function Im(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const vR=xb(0,.5,Ix),yR=xb(.5,.95,Yt);function xb(e,t,n){return r=>r<e?0:r>t?1:n(Wr(e,t,r))}function _m(e,t){e.min=t.min,e.max=t.max}function rn(e,t){_m(e.x,t.x),_m(e.y,t.y)}function Om(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Mm(e,t,n,r,o){return e-=t,e=hs(e,1/n,r),o!==void 0&&(e=hs(e,1/o,r)),e}function xR(e,t=0,n=1,r=.5,o,i=e,a=e){if(_n.test(t)&&(t=parseFloat(t),t=it(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=it(i.min,i.max,r);e===i&&(s-=t),e.min=Mm(e.min,t,n,s,o),e.max=Mm(e.max,t,n,s,o)}function Dm(e,t,[n,r,o],i,a){xR(e,t[n],t[r],t[o],t.scale,i,a)}const bR=["x","scaleX","originX"],wR=["y","scaleY","originY"];function jm(e,t,n,r){Dm(e.x,t,bR,n?n.x:void 0,r?r.x:void 0),Dm(e.y,t,wR,n?n.y:void 0,r?r.y:void 0)}function Nm(e){return e.translate===0&&e.scale===1}function bb(e){return Nm(e.x)&&Nm(e.y)}function Fm(e,t){return e.min===t.min&&e.max===t.max}function SR(e,t){return Fm(e.x,t.x)&&Fm(e.y,t.y)}function Lm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wb(e,t){return Lm(e.x,t.x)&&Lm(e.y,t.y)}function Vm(e){return zt(e.x)/zt(e.y)}function $m(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TR{constructor(){this.members=[]}add(t){uf(this.members,t),t.scheduleRender()}remove(t){if(sl(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 ER(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0: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:m}=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) `),m&&(r+=`skewY(${m}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 jc=["","X","Y","Z"],CR={visibility:"hidden"},zm=1e3;let kR=0;function Nc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Sb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=xx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Je,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Sb(r)}function Tb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=kR++,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(AR),this.nodes.forEach(DR),this.nodes.forEach(jR),this.nodes.forEach(IR)},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 pR)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new df),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,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=vb(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=hR(p,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Hm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||$R,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!wb(this.targetLayout,m),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const T={...cf(g,"layout"),onPlay:h,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else p||Hm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,Wn(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(NR),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&&Sb(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(Bm);return}this.isUpdating||this.nodes.forEach(OR),this.isUpdating=!1,this.nodes.forEach(MR),this.nodes.forEach(RR),this.nodes.forEach(PR),this.clearAllSnapshots();const s=On.now();Mt.delta=qn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Pc.update.process(Mt),Pc.preRender.process(Mt),Pc.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_R),this.sharedNodes.forEach(FR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!zt(this.snapshot.measuredBox.x)&&!zt(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=mt(),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){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&&!bb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||_r(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)),zR(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return mt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(BR))){const{scroll:u}=this.root;u&&(So(l.x,u.offset.x),So(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=mt();if(rn(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&rn(l,a),So(l.x,d.offset.x),So(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=mt();rn(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&&To(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),_r(u.latestValues)&&To(l,u.latestValues)}return _r(this.latestValues)&&To(l,this.latestValues),l}removeTransform(a){const s=mt();rn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!_r(c.latestValues))continue;Gu(c.latestValues)&&c.updateSnapshot();const u=mt(),d=c.measurePageBox();rn(u,d),jm(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return _r(this.latestValues)&&jm(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!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Mt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Li(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Uk(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),ub(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Li(this.relativeTargetOrigin,this.target,f.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Gu(this.parent.latestValues)||cb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;Yk(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=mt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Om(this.prevProjectionDelta.x,this.projectionDelta.x),Om(this.prevProjectionDelta.y,this.projectionDelta.y)),Fi(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!$m(this.projectionDelta.x,this.prevProjectionDelta.x)||!$m(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wo(),this.projectionDelta=wo(),this.projectionDeltaWithTransform=wo()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=wo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=mt(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=f!==m,h=this.getStack(),v=!h||h.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(VR));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const w=T/1e3;Wm(d.x,a.x,w),Wm(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Li(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),LR(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&SR(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=mt()),rn(b,this.relativeTarget)),g&&(this.animationValues=u,gR(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&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Wn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Je.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=gb(0,zm,{...a,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(zm),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&&Eb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||mt();const d=zt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=zt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}rn(s,l),To(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new TR),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(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.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&&Nc("z",a,c,this.animationValues);for(let u=0;u<jc.length;u++)Nc(`rotate${jc[u]}`,a,c,this.animationValues),Nc(`skew${jc[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){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return CR;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=es(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=es(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!_r(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=ER(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:m}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Ki){if(p[g]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:y}=Ki[g],b=c.transform==="none"?p[g]:h(p[g],d);if(v){const T=v.length;for(let w=0;w<T;w++)c[v[w]]=b}else y?this.options.visualElement.renderState.vars[g]=b:c[g]=b}return this.options.layoutId&&(c.pointerEvents=d===this?es(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Bm),this.root.sharedNodes.clear()}}}function RR(e){e.updateLayout()}function PR(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(p);p.min=r[d].min,p.max=p.min+f}):Eb(i,n.layoutBox,r)&&an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=wo();Fi(s,r,n.layoutBox);const l=wo();a?Fi(l,e.applyTransform(o,!0),n.measuredBox):Fi(l,r,n.layoutBox);const c=!bb(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const m=mt();Li(m,n.layoutBox,p.layoutBox);const g=mt();Li(g,r,f.layoutBox),wb(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AR(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 IR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _R(e){e.clearSnapshot()}function Bm(e){e.clearMeasurements()}function OR(e){e.isLayoutDirty=!1}function MR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Hm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function DR(e){e.resolveTargetDelta()}function jR(e){e.calcProjection()}function NR(e){e.resetSkewAndRotation()}function FR(e){e.removeLeadSnapshot()}function Wm(e,t,n){e.translate=it(t.translate,0,n),e.scale=it(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qm(e,t,n,r){e.min=it(t.min,n.min,r),e.max=it(t.max,n.max,r)}function LR(e,t,n,r){qm(e.x,t.x,n.x,r),qm(e.y,t.y,n.y,r)}function VR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $R={duration:.45,ease:[.4,0,.1,1]},Um=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ym=Um("applewebkit/")&&!Um("chrome/")?Math.round:Yt;function Gm(e){e.min=Ym(e.min),e.max=Ym(e.max)}function zR(e){Gm(e.x),Gm(e.y)}function Eb(e,t,n){return e==="position"||e==="preserve-aspect"&&!qk(Vm(t),Vm(n),.2)}function BR(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const HR=Tb({attachResizeListener:(e,t)=>Ji(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fc={current:void 0},Cb=Tb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fc.current){const e=new HR({});e.mount(window),e.setOptions({layoutScroll:!0}),Fc.current=e}return Fc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),WR={pan:{Feature:lR},drag:{Feature:sR,ProjectionNode:Cb,MeasureLayout:mb}};function kb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Rb(e,t){const n=kb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Km(e){return!(e.pointerType==="touch"||ib())}function qR(e,t,n={}){const[r,o,i]=Rb(e,n),a=s=>{if(!Km(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Km(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Zm(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&&Je.postRender(()=>i(t,xa(t)))}class UR extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=qR(t,(n,r)=>(Zm(this.node,r,"Start"),o=>Zm(this.node,o,"End"))))}unmount(){}}class YR extends yr{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=ya(Ji(this.node.current,"focus",()=>this.onFocus()),Ji(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Pb=(e,t)=>t?e===t?!0:Pb(e,t.parentElement):!1,GR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function KR(e){return GR.has(e.tagName)||e.tabIndex!==-1}const Ri=new WeakSet;function Xm(e){return t=>{t.key==="Enter"&&e(t)}}function Lc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ZR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Xm(()=>{if(Ri.has(n))return;Lc(n,"down");const o=Xm(()=>{Lc(n,"up")}),i=()=>Lc(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 Qm(e){return Cf(e)&&!ib()}function XR(e,t,n={}){const[r,o,i]=Rb(e,n),a=s=>{const l=s.currentTarget;if(!Qm(s)||Ri.has(l))return;Ri.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Qm(f)||!Ri.has(l))&&(Ri.delete(l),typeof c=="function"&&c(f,{success:m}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Pb(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),s instanceof HTMLElement&&(s.addEventListener("focus",c=>ZR(c,o)),!KR(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Jm(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&&Je.postRender(()=>i(t,xa(t)))}class QR extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=XR(t,(n,r)=>(Jm(this.node,r,"Start"),(o,{success:i})=>Jm(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xu=new WeakMap,Vc=new WeakMap,JR=e=>{const t=Xu.get(e.target);t&&t(e)},eP=e=>{e.forEach(JR)};function tP({root:e,...t}){const n=e||document;Vc.has(n)||Vc.set(n,{});const r=Vc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(eP,{root:e,...t})),r[o]}function nP(e,t,n){const r=tP(t);return Xu.set(e,n),r.observe(e),()=>{Xu.delete(e),r.unobserve(e)}}const rP={some:0,all:1};class oP extends yr{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:rP[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 nP(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(iP(t,n))&&this.startObserver()}unmount(){}}function iP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const aP={inView:{Feature:oP},tap:{Feature:QR},focus:{Feature:YR},hover:{Feature:UR}},sP={layout:{ProjectionNode:Cb,MeasureLayout:mb}},Qu={current:null},Ab={current:!1};function lP(){if(Ab.current=!0,!!Yd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Qu.current=e.matches;e.addListener(t),t()}else Qu.current=!1}const cP=[...qx,Nt,dr],uP=e=>cP.find(Wx(e)),ea=new WeakMap;function dP(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rl(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(Pt(i))e.addValue(r,No(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,No(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const eg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ib{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=yf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=On.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Je.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,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=al(n),this.isVariantNode=nx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const m=p[f];l[f]!==void 0&&Pt(m)&&m.set(l[f],!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)),Ab.current||lP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qu.current,process.env.NODE_ENV!=="production"&&rl(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(),Wn(this.notifyUpdate),Wn(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=eo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Je.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 jo){const n=jo[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):mt()}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<eg.length;r++){const o=eg[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=dP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=No(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Bx(o)||Ox(o))?o=parseFloat(o):!uP(o)&&dr.test(n)&&(o=Vx(t,n)),this.setBaseTarget(t,Pt(o)?o.get():o)),Pt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=sf(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Pt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new df),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class _b extends Ib{constructor(){super(...arguments),this.KeyframeResolver=Ux}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;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function fP(e){return window.getComputedStyle(e)}class Ob extends _b{constructor(){super(...arguments),this.type="html",this.renderInstance=px}readValueFromInstance(t,n){if(eo.has(n))return kC(t,n);{const r=fP(t),o=(Qd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return db(t,n)}build(t,n,r){tf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return lf(t,n,r)}}class Mb extends _b{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&fx(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(eo.has(n)){const r=Lx(n);return r&&r.default||0}return n=hx.has(n)?n:Xd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return gx(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Je.postRender(this.updateDimensions)}build(t,n,r){of(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){mx(t,n,r,o)}mount(t){this.isSVGTag=af(t.tagName),super.mount(t)}}const pP=(e,t)=>rf(e)?new Mb(t):new Ob(t,{allowProjection:e!==E.Fragment}),hP=qE({...Nk,...aP,...WR,...sP},pP),pt=sE(hP);function mP(e){return E.useEffect(()=>()=>e(),[])}function Lo(e){const t=bn(()=>No(e)),{isStatic:n}=E.useContext(Do);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function Db(e,t){const n=Lo(t()),r=()=>n.set(t());return r(),tl(()=>{const o=()=>Je.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Wn(r)}}),n}const gP=e=>e&&typeof e=="object"&&e.mix,vP=e=>gP(e)?e.mix:void 0;function yP(...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=Jx(o,i,{mixer:vP(i[0]),...a});return t?s(r):s}function xP(e){Mi.current=[],e();const t=Db(Mi.current,e);return Mi.current=void 0,t}function bP(e,t,n,r){if(typeof e=="function")return xP(e);const o=typeof t=="function"?t:yP(t,n,r);return Array.isArray(e)?tg(e,o):tg([e],([i])=>o(i))}function tg(e,t){const n=bn(()=>[]);return Db(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function wP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(xf(r),ds);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Mn(o)}}const SP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function jb(e,t){return Qx(e)?e[SP(0,e.length,t)]:e}function kf(e){return typeof e=="object"&&!Array.isArray(e)}function Nb(e,t,n,r){return typeof e=="string"&&kf(t)?kb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function TP(e,t,n){return e*(t+1)}function ng(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function EP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(sl(e,o),r--)}}function CP(e,t,n,r,o,i){EP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:it(o,i,r[a]),easing:jb(n,a)})}function kP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function RP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const PP="easeInOut",AP=20;function IP(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 m=e[f];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,ng(d,m.at,u,c));continue}let[g,h,v={}]=m;v.at!==void 0&&(d=ng(d,v.at,u,c));let y=0;const b=(T,w,S,C=0,R=0)=>{const I=_P(T),{delay:A=0,times:O=tb(I),type:N="keyframes",repeat:V,repeatType:P,repeatDelay:_=0,...D}=w;let{ease:F=t.ease||"easeOut",duration:j}=w;const z=typeof A=="function"?A(C,R):A,M=I.length,$=ll(N)?N:o==null?void 0:o[N];if(M<=2&&$){let Z=100;if(M===2&&DP(I)){const L=I[1]-I[0];Z=Math.abs(L)}const U={...D};j!==void 0&&(U.duration=yn(j));const Y=wP(U,Z,$);F=Y.ease,j=Y.duration}j??(j=i);const J=d+z;O.length===1&&O[0]===0&&(O[1]=1);const te=O.length-I.length;if(te>0&&eb(O,te),I.length===1&&I.unshift(null),V){dn(V<AP,"Repeat count too high, must be less than 20"),j=TP(j,V);const Z=[...I],U=[...O];F=Array.isArray(F)?[...F]:[F];const Y=[...F];for(let L=0;L<V;L++){I.push(...Z);for(let W=0;W<Z.length;W++)O.push(U[W]+(L+1)),F.push(W===0?"linear":jb(Y,W-1))}kP(O,V)}const ee=J+j;CP(S,I,F,O,J,ee),y=Math.max(z+j,y),p=Math.max(ee,p)};if(Pt(g)){const T=rg(g,s);b(h,v,og("default",T))}else{const T=Nb(g,h,r,l),w=T.length;for(let S=0;S<w;S++){h=h,v=v;const C=T[S],R=rg(C,s);for(const I in h)b(h[I],OP(v,I),og(I,R),S,w)}}u=d,d+=y}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(RP);const v=[],y=[],b=[];for(let w=0;w<h.length;w++){const{at:S,value:C,easing:R}=h[w];v.push(C),y.push(Wr(0,p,S)),b.push(R||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),b.unshift(PP)),y[y.length-1]!==1&&(y.push(1),v.push(null)),a.has(m)||a.set(m,{keyframes:{},transition:{}});const T=a.get(m);T.keyframes[g]=v,T.transition[g]={...t,duration:p,ease:b,times:y,...n}}}),a}function rg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function og(e,t){return t[e]||(t[e]=[]),t[e]}function _P(e){return Array.isArray(e)?e:[e]}function OP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const MP=e=>typeof e=="number",DP=e=>e.every(MP);function jP(e,t){return e in t}class NP extends Ib{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(jP(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 mt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function FP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=vb(e)?new Mb(t):new Ob(t);n.mount(e),ea.set(e,n)}function LP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new NP(t);n.mount(e),ea.set(e,n)}function VP(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!kf(t)}function Fb(e,t,n,r){const o=[];if(VP(e,t))o.push(gb(e,kf(t)&&t.default||t,n&&(n.default||n)));else{const i=Nb(e,t,r),a=i.length;dn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?FP:LP;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(...Ef(u,{...t,transition:d},{}))}}return o}function $P(e,t,n){const r=[];return IP(e,t,n,{spring:wf}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Fb(s,i,a))}),r}function zP(e){return Array.isArray(e)&&e.some(Array.isArray)}function BP(e){function t(n,r,o){let i=[];zP(n)?i=$P(n,r,e):i=Fb(n,r,o,e);const a=new bx(i);return e&&e.animations.push(a),a}return t}function HP(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>BP(e));return mP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class WP{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 qP=()=>new WP;function UP(){return bn(qP)}function YP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function GP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:YP(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Uu(r)(l/c)*c}return t+l}}const Lb=E.createContext(null);function KP(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=it(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?UE(e,o,o+i):e}function ZP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>pt[t]),l=[],c=E.useRef(!1);dn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(m=>d===m.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(QP)},updateOrder:(d,p,f)=>{if(c.current)return;const m=KP(l,d,p,f);l!==m&&(c.current=!0,r(m.map(XP).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(Lb.Provider,{value:u,children:e})})}const Vb=E.forwardRef(ZP);function XP(e){return e.value}function QP(e,t){return e.layout.min-t.layout.min}function ig(e,t=0){return Pt(e)?e:Lo(t)}function JP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>pt[r]),c=E.useContext(Lb),u={x:ig(t.x),y:ig(t.y)},d=bP([u.x,u.y],([g,h])=>g||h?1:"unset");dn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:m}=c;return x.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:v}=h;v[p]&&m(n,u[p].get(),v[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const $b=E.forwardRef(JP);/**
13
13
  * @license lucide-react v0.485.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
- */const kP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),RP=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Ym=e=>{const t=RP(e);return t.charAt(0).toUpperCase()+t.slice(1)},Pb=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
17
+ */const eA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ag=e=>{const t=tA(e);return t.charAt(0).toUpperCase()+t.slice(1)},zb=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
18
18
  * @license lucide-react v0.485.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
- */var PP={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"};/**
22
+ */var nA={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"};/**
23
23
  * @license lucide-react v0.485.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const AP=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...PP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Pb("lucide",o),...s},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
27
+ */const rA=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...nA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:zb("lucide",o),...s},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
28
28
  * @license lucide-react v0.485.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const Et=(e,t)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(AP,{ref:i,iconNode:t,className:Pb(`lucide-${kP(Ym(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Ym(e),n};/**
32
+ */const Et=(e,t)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(rA,{ref:i,iconNode:t,className:zb(`lucide-${eA(ag(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ag(e),n};/**
33
33
  * @license lucide-react v0.485.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const IP=[["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"}]],OP=Et("arrow-down-0-1",IP);/**
37
+ */const oA=[["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"}]],iA=Et("arrow-down-0-1",oA);/**
38
38
  * @license lucide-react v0.485.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const _P=[["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"}]],MP=Et("arrow-up-0-1",_P);/**
42
+ */const aA=[["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"}]],sA=Et("arrow-up-0-1",aA);/**
43
43
  * @license lucide-react v0.485.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const DP=[["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"}]],Ab=Et("arrow-up-down",DP);/**
47
+ */const lA=[["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"}]],Bb=Et("arrow-up-down",lA);/**
48
48
  * @license lucide-react v0.485.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const jP=[["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"}]],NP=Et("calendar",jP);/**
52
+ */const cA=[["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"}]],uA=Et("calendar",cA);/**
53
53
  * @license lucide-react v0.485.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const FP=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],yf=Et("chevron-down",FP);/**
57
+ */const dA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Rf=Et("chevron-down",dA);/**
58
58
  * @license lucide-react v0.485.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const LP=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],VP=Et("chevron-left",LP);/**
62
+ */const fA=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],pA=Et("chevron-left",fA);/**
63
63
  * @license lucide-react v0.485.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const zP=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],xf=Et("chevron-right",zP);/**
67
+ */const hA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pf=Et("chevron-right",hA);/**
68
68
  * @license lucide-react v0.485.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const $P=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Ib=Et("circle-check-big",$P);/**
72
+ */const mA=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Hb=Et("circle-check-big",mA);/**
73
73
  * @license lucide-react v0.485.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const BP=[["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"}]],HP=Et("circle-x",BP);/**
77
+ */const gA=[["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"}]],vA=Et("circle-x",gA);/**
78
78
  * @license lucide-react v0.485.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const WP=[["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"}]],Ob=Et("file",WP);/**
82
+ */const yA=[["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"}]],Wb=Et("file",yA);/**
83
83
  * @license lucide-react v0.485.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const qP=[["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"}]],UP=Et("grip-vertical",qP);/**
87
+ */const xA=[["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"}]],bA=Et("grip-vertical",xA);/**
88
88
  * @license lucide-react v0.485.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const GP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],_b=Et("info",GP);/**
92
+ */const wA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],qb=Et("info",wA);/**
93
93
  * @license lucide-react v0.485.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const YP=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],KP=Et("list-filter",YP);/**
97
+ */const SA=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],TA=Et("list-filter",SA);/**
98
98
  * @license lucide-react v0.485.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const ZP=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],bf=Et("plus",ZP);/**
102
+ */const EA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Af=Et("plus",EA);/**
103
103
  * @license lucide-react v0.485.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const XP=[["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"}]],QP=Et("search-check",XP);/**
107
+ */const CA=[["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"}]],kA=Et("search-check",CA);/**
108
108
  * @license lucide-react v0.485.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const JP=[["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"}]],eA=Et("search-x",JP);/**
112
+ */const RA=[["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"}]],PA=Et("search-x",RA);/**
113
113
  * @license lucide-react v0.485.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const tA=[["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"}]],Fo=Et("trash-2",tA);/**
117
+ */const AA=[["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"}]],Vo=Et("trash-2",AA);/**
118
118
  * @license lucide-react v0.485.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const nA=[["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"}]],rA=Et("triangle-alert",nA);/**
122
+ */const IA=[["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"}]],_A=Et("triangle-alert",IA);/**
123
123
  * @license lucide-react v0.485.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const oA=[["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"}]],iA=Et("ungroup",oA);/**
127
+ */const OA=[["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"}]],MA=Et("ungroup",OA);/**
128
128
  * @license lucide-react v0.485.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const aA=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],sA=Et("upload",aA);/**
132
+ */const DA=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],jA=Et("upload",DA);/**
133
133
  * @license lucide-react v0.485.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const lA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],al=Et("x",lA),Km={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},cA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Mb=e=>b.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Km,exit:Km.false,transition:cA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ve("aria-hidden:pointer-events-none",e.className),children:e.children}),uA=Jo("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"}}),dA=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return b.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Ve("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:b.jsx(Mb,{"data-open":!!i,open:!!i,children:b.jsxs(cn,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Ve(uA({theme:n}),t),children:[b.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?b.jsx(Ib,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?b.jsx(_b,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?b.jsx(rA,{"aria-hidden":"true",size:20}):null,r,b.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?b.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:b.jsx(al,{size:20})}):null]})})})}),Db=6048e5,fA=864e5,pA=6e4,hA=36e5,mA=1e3,Zm=Symbol.for("constructDateFrom");function nt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Zm in e?e[Zm](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ze(e,t){return nt(t||e,e)}function sl(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(t)?nt((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function jb(e,t,n){const r=Ze(e,n==null?void 0: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 So(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=Ze(e,n==null?void 0:n.in),d=o||r?jb(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 gA={};function eo(){return gA}function jn(e,t){var s,l,c,u;const n=eo(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Ze(e,t==null?void 0: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 Lo(e,t){return jn(e,{...t,weekStartsOn:1})}function Nb(e,t){const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=nt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Lo(o),a=nt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Lo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function fs(e){const t=Ze(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 ll(e,...t){const n=nt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Vo(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function vA(e,t,n){const[r,o]=ll(n==null?void 0:n.in,e,t),i=Vo(r),a=Vo(o),s=+i-fs(i),l=+a-fs(a);return Math.round((s-l)/fA)}function yA(e,t){const n=Nb(e,t),r=nt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Lo(r)}function xA(e){return nt(e,Date.now())}function bA(e,t,n){const[r,o]=ll(n==null?void 0:n.in,e,t);return+Vo(r)==+Vo(o)}function wA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Fb(e){return!(!wA(e)&&typeof e!="number"||isNaN(+Ze(e)))}function TA(e,t){const[n,r]=ll(e,t.start,t.end);return{start:n,end:r}}function Lb(e,t){const{start:n,end:r}=TA(t==null?void 0: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 Vb(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function SA(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function EA(e,t){var s,l;const n=eo(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Ze(e,t==null?void 0: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 CA={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"}},kA=(e,t,n)=>{let r;const o=CA[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Dc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const RA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},AA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},IA={date:Dc({formats:RA,defaultWidth:"full"}),time:Dc({formats:PA,defaultWidth:"full"}),dateTime:Dc({formats:AA,defaultWidth:"full"})},OA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_A=(e,t,n,r)=>OA[e];function yi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&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 MA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},DA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jA={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"]},NA={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"]},FA={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"}},LA={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"}},VA=(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"},zA={ordinalNumber:VA,era:yi({values:MA,defaultWidth:"wide"}),quarter:yi({values:DA,defaultWidth:"wide",argumentCallback:e=>e-1}),month:yi({values:jA,defaultWidth:"wide"}),day:yi({values:NA,defaultWidth:"wide"}),dayPeriod:yi({values:FA,defaultWidth:"wide",formattingValues:LA,defaultFormattingWidth:"wide"})};function xi(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)?BA(s,d=>d.test(a)):$A(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 $A(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function BA(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function HA(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 WA=/^(\d+)(th|st|nd|rd)?/i,qA=/\d+/i,UA={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},GA={any:[/^b/i,/^(a|c)/i]},YA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},KA={any:[/1/i,/2/i,/3/i,/4/i]},ZA={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},XA={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]},QA={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},JA={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]},eI={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},tI={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}},nI={ordinalNumber:HA({matchPattern:WA,parsePattern:qA,valueCallback:e=>parseInt(e,10)}),era:xi({matchPatterns:UA,defaultMatchWidth:"wide",parsePatterns:GA,defaultParseWidth:"any"}),quarter:xi({matchPatterns:YA,defaultMatchWidth:"wide",parsePatterns:KA,defaultParseWidth:"any",valueCallback:e=>e+1}),month:xi({matchPatterns:ZA,defaultMatchWidth:"wide",parsePatterns:XA,defaultParseWidth:"any"}),day:xi({matchPatterns:QA,defaultMatchWidth:"wide",parsePatterns:JA,defaultParseWidth:"any"}),dayPeriod:xi({matchPatterns:eI,defaultMatchWidth:"any",parsePatterns:tI,defaultParseWidth:"any"})},zb={code:"en-US",formatDistance:kA,formatLong:IA,formatRelative:_A,localize:zA,match:nI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function rI(e,t){const n=Ze(e,t==null?void 0:t.in);return vA(n,SA(n))+1}function $b(e,t){const n=Ze(e,t==null?void 0:t.in),r=+Lo(n)-+yA(n);return Math.round(r/Db)+1}function wf(e,t){var u,d,p,f;const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=eo(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=nt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=jn(a,t),l=nt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=jn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function oI(e,t){var s,l,c,u;const n=eo(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=wf(e,t),i=nt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),jn(i,t)}function Bb(e,t){const n=Ze(e,t==null?void 0:t.in),r=+jn(n,t)-+oI(n,t);return Math.round(r/Db)+1}function Ye(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ye(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ye(n+1,2)},d(e,t){return Ye(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 Ye(e.getHours()%12||12,t.length)},H(e,t){return Ye(e.getHours(),t.length)},m(e,t){return Ye(e.getMinutes(),t.length)},s(e,t){return Ye(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ye(o,t.length)}},fo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xm={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 rr.y(e,t)},Y:function(e,t,n,r){const o=wf(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Ye(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ye(i,t.length)},R:function(e,t){const n=Nb(e);return Ye(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ye(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 Ye(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 Ye(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 rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});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 Ye(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=Bb(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ye(o,t.length)},I:function(e,t,n){const r=$b(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ye(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=rI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ye(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 Ye(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 Ye(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 Ye(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=fo.noon:r===0?o=fo.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=fo.evening:r>=12?o=fo.afternoon:r>=4?o=fo.morning:o=fo.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 rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ye(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ye(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Jm(r);case"XXXX":case"XX":return _r(r);case"XXXXX":case"XXX":default:return _r(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Jm(r);case"xxxx":case"xx":return _r(r);case"xxxxx":case"xxx":default:return _r(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Qm(r,":");case"OOOO":default:return"GMT"+_r(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Qm(r,":");case"zzzz":default:return"GMT"+_r(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ye(r,t.length)},T:function(e,t,n){return Ye(+e,t.length)}};function Qm(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+Ye(i,2)}function Jm(e,t){return e%60===0?(e>0?"-":"+")+Ye(Math.abs(e)/60,2):_r(e,t)}function _r(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ye(Math.trunc(r/60),2),i=Ye(r%60,2);return n+o+t+i}const eg=(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"})}},Hb=(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"})}},iI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return eg(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}}",eg(r,t)).replace("{{time}}",Hb(o,t))},Gu={p:Hb,P:iI},aI=/^D+$/,sI=/^Y+$/,lI=["D","DD","YY","YYYY"];function Wb(e){return aI.test(e)}function qb(e){return sI.test(e)}function Yu(e,t,n){const r=cI(e,t,n);if(console.warn(r),lI.includes(e))throw new RangeError(r)}function cI(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 uI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fI=/^'([^]*?)'?$/,pI=/''/g,hI=/[a-zA-Z]/;function mI(e,t,n){var u,d,p,f;const r=eo(),o=r.locale??zb,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=Ze(e,n==null?void 0:n.in);if(!Fb(s))throw new RangeError("Invalid time value");let l=t.match(dI).map(h=>{const g=h[0];if(g==="p"||g==="P"){const m=Gu[g];return m(h,o.formatLong)}return h}).join("").match(uI).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const g=h[0];if(g==="'")return{isToken:!1,value:gI(h)};if(Xm[g])return{isToken:!0,value:h};if(g.match(hI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:h}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(h=>{if(!h.isToken)return h.value;const g=h.value;(qb(g)||Wb(g))&&Yu(g,t,String(e));const m=Xm[g[0]];return m(s,g,o.localize,c)}).join("")}function gI(e){const t=e.match(fI);return t?t[1].replace(pI,"'"):e}function vI(){return Object.assign({},eo())}function yI(e,t){const n=Ze(e,t==null?void 0:t.in).getDay();return n===0?7:n}function xI(e,t){return+Ze(e)>+Ze(t)}function bI(e,t){return+Ze(e)<+Ze(t)}function wI(e,t){const n=TI(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 TI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const SI=10;class Ub{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class EI extends Ub{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 CI extends Ub{constructor(n,r){super();de(this,"priority",SI);de(this,"subPriority",-1);this.context=n||(o=>nt(r,o))}set(n,r){return r.timestampIsSet?n:nt(n,wI(n,this.context))}}class We{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new EI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class kI extends We{constructor(){super(...arguments);de(this,"priority",140);de(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const wt={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}/},kn={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 Tt(e,t){return e&&{value:t(e.value),rest:e.rest}}function ht(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Rn(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*hA+i*pA+a*mA),rest:t.slice(n[0].length)}}function Gb(e){return ht(wt.anyDigitsSigned,e)}function yt(e,t){switch(e){case 1:return ht(wt.singleDigit,t);case 2:return ht(wt.twoDigits,t);case 3:return ht(wt.threeDigits,t);case 4:return ht(wt.fourDigits,t);default:return ht(new RegExp("^\\d{1,"+e+"}"),t)}}function ps(e,t){switch(e){case 1:return ht(wt.singleDigitSigned,t);case 2:return ht(wt.twoDigitsSigned,t);case 3:return ht(wt.threeDigitsSigned,t);case 4:return ht(wt.fourDigitsSigned,t);default:return ht(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Tf(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 Yb(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 Kb(e){return e%400===0||e%4===0&&e%100!==0}class RI extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="yy"});switch(r){case"y":return Tt(yt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=Yb(o.year,i);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class PI extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Tt(yt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=wf(n,i);if(o.isTwoDigitYear){const l=Yb(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}}class AI extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ps(r==="R"?4:r.length,n)}set(n,r,o){const i=nt(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Lo(i)}}class II extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ps(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class OI extends We{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return yt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class _I extends We{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return yt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class MI extends We{constructor(){super(...arguments);de(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);de(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return Tt(ht(wt.month,n),i);case"MM":return Tt(yt(2,n),i);case"Mo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class DI extends We{constructor(){super(...arguments);de(this,"priority",110);de(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=a=>a-1;switch(r){case"L":return Tt(ht(wt.month,n),i);case"LL":return Tt(yt(2,n),i);case"Lo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function jI(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=Bb(r,n)-t;return r.setDate(r.getDate()-o*7),Ze(r,n==null?void 0:n.in)}class NI extends We{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ht(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return jn(jI(n,o,i),i)}}function FI(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=$b(r,n)-t;return r.setDate(r.getDate()-o*7),r}class LI extends We{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return ht(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Lo(FI(n,o))}}const VI=[31,28,31,30,31,30,31,31,30,31,30,31],zI=[31,29,31,30,31,30,31,31,30,31,30,31];class $I extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"subPriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ht(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Kb(o),a=n.getMonth();return i?r>=1&&r<=zI[a]:r>=1&&r<=VI[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class BI extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"subpriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return ht(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Kb(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Sf(e,t,n){var d,p,f,h;const r=eo(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,i=Ze(e,n==null?void 0: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 HI extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Sf(n,o,i),n.setHours(0,0,0,0),n}}class WI extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return Tt(yt(r.length,n),a);case"eo":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Sf(n,o,i),n.setHours(0,0,0,0),n}}class qI extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return Tt(yt(r.length,n),a);case"co":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Sf(n,o,i),n.setHours(0,0,0,0),n}}function UI(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=yI(r,n),i=t-o;return sl(r,i,n)}class GI extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=a=>a===0?7:a;switch(r){case"i":case"ii":return yt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Tt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return Tt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Tt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Tt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=UI(n,o),n.setHours(0,0,0,0),n}}class YI extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Tf(o),0,0,0),n}}class KI extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Tf(o),0,0,0),n}}class ZI extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Tf(o),0,0,0),n}}class XI extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ht(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class QI extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ht(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class JI extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ht(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class eO extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ht(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class tO extends We{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ht(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class nO extends We{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ht(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class rO extends We{constructor(){super(...arguments);de(this,"priority",30);de(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return Tt(yt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class oO extends We{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Rn(kn.basicOptionalMinutes,n);case"XX":return Rn(kn.basic,n);case"XXXX":return Rn(kn.basicOptionalSeconds,n);case"XXXXX":return Rn(kn.extendedOptionalSeconds,n);case"XXX":default:return Rn(kn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:nt(n,n.getTime()-fs(n)-o)}}class iO extends We{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Rn(kn.basicOptionalMinutes,n);case"xx":return Rn(kn.basic,n);case"xxxx":return Rn(kn.basicOptionalSeconds,n);case"xxxxx":return Rn(kn.extendedOptionalSeconds,n);case"xxx":default:return Rn(kn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:nt(n,n.getTime()-fs(n)-o)}}class aO extends We{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return Gb(n)}set(n,r,o){return[nt(n,o*1e3),{timestampIsSet:!0}]}}class sO extends We{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return Gb(n)}set(n,r,o){return[nt(n,o),{timestampIsSet:!0}]}}const lO={G:new kI,y:new RI,Y:new PI,R:new AI,u:new II,Q:new OI,q:new _I,M:new MI,L:new DI,w:new NI,I:new LI,d:new $I,D:new BI,E:new HI,e:new WI,c:new qI,i:new GI,a:new YI,b:new KI,B:new ZI,h:new XI,H:new QI,K:new JI,k:new eO,m:new tO,s:new nO,S:new rO,X:new oO,x:new iO,t:new aO,T:new sO},cO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dO=/^'([^]*?)'?$/,fO=/''/g,pO=/\S/,hO=/[a-zA-Z]/;function mO(e,t,n,r){var m,y,v,x;const o=()=>nt(n,NaN),i=vI(),a=i.locale??zb,s=i.firstWeekContainsDate??((y=(m=i.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,l=i.weekStartsOn??((x=(v=i.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0;if(!t)return e?o():Ze(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new CI(r==null?void 0:r.in,n)],d=t.match(uO).map(S=>{const T=S[0];if(T in Gu){const w=Gu[T];return w(S,a.formatLong)}return S}).join("").match(cO),p=[];for(let S of d){qb(S)&&Yu(S,t,e),Wb(S)&&Yu(S,t,e);const T=S[0],w=lO[T];if(w){const{incompatibleTokens:C}=w;if(Array.isArray(C)){const I=p.find(P=>C.includes(P.token)||P.token===T);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${S}\` at the same time`)}else if(w.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);p.push({token:T,fullToken:S});const k=w.run(e,S,a.match,c);if(!k)return o();u.push(k.setter),e=k.rest}else{if(T.match(hO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(S==="''"?S="'":T==="'"&&(S=gO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&pO.test(e))return o();const f=u.map(S=>S.priority).sort((S,T)=>T-S).filter((S,T,w)=>w.indexOf(S)===T).map(S=>u.filter(T=>T.priority===S).sort((T,w)=>w.subPriority-T.subPriority)).map(S=>S[0]);let h=Ze(n,r==null?void 0:r.in);if(isNaN(+h))return o();const g={};for(const S of f){if(!S.validate(h,c))return o();const T=S.set(h,g,c);Array.isArray(T)?(h=T[0],Object.assign(g,T[1])):h=T}return h}function gO(e){return e.match(dO)[1].replace(fO,"'")}function vO(e,t,n){const[r,o]=ll(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function yO(e,t){return bA(nt(e,e),xA(e))}function xO(e,t,n){return sl(e,-t,n)}function bO(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(+r)?nt(e,NaN):(r.setFullYear(t),r)}function wO(e,t,n){return jb(e,-t,n)}function Ei(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=wO(e,o+r*12,n),d=xO(u,a+i*7,n),p=l+s*60,h=(c+p*60)*1e3;return nt(e,+d-h)}var St=function(){return St=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},St.apply(this,arguments)};function Ef(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 Ku(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}var Xi=function(e){return e.replace(new RegExp(" ","g")," ")},Zb=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)},TO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Xb=function(e,t,n){var r=e.length-2,o=TO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Qb=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},hs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},SO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},jc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},EO=function(e){return e==="money"||e==="currency"},CO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return St(St({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Da=function(e,t){var n=Zb(Qb(e),t.fraction.length),r="".concat(t.currency).concat(Xb(n,t.group,t.decimal));return Xi(r)},kO=E.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=Ef(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=CO(r,i,s);return h.currency=Xi("".concat(h.currency.trim()," ")),h.literal=Xi(h.literal.trim()),h},[r,i]),p=function(h){var g=Da(h.target.value,d),m=hs(g);h.target.value=g,h.target.setAttribute("data-number",m.toString()),l==null||l(h),m!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var g=Da(h,d),m=hs(g);u.current.value=g,u.current.setAttribute("data-number",m.toString());var y=new InputEvent("change",{});l==null||l(St(St({},y),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Da(c.defaultValue,d):void 0;return E.createElement("input",St({},c,{value:typeof c.value=="string"?Da(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),RO=1,PO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},AO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return St(St({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},ja=function(e,t){var n=Zb(Qb(e),t.fraction.length),r="".concat(Xb(n,t.group,t.decimal)," ").concat(t.percentSign);return Xi(r)},IO=E.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=Ef(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=Ku(E.useState(function(){var y,v;return(v=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&v!==void 0?v:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var y,v=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(ja(v,d))},[a.value]);var d=E.useMemo(function(){var y=AO(r);return y.percentSign=Xi("".concat(y.percentSign)),y},[r]),p=c.length-d.percentSign.length-RO,f=function(y){var v,x=s.current;x&&(x.setSelectionRange(p,p),y&&((v=a.onFocus)===null||v===void 0||v.call(a,y)))},h=function(y){var v=y.currentTarget;if(v.selectionStart!==null){var x=v.selectionStart,S=v.selectionEnd,T=x!==S,w=p<x;!T&&w&&f()}i==null||i(y)},g=function(y){var v=ja(y.target.value,d),x=hs(v);u(v),y.target.value=v,y.target.setAttribute("data-number",x.toString()),o==null||o(y)};E.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var v=ja(y,d),x=hs(v);u(v),s.current.value=v,s.current.setAttribute("data-number",x.toString());var S=new InputEvent("change",{});o==null||o(St(St({},S),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var m=a.defaultValue?ja(a.defaultValue,d):void 0;return E.createElement("input",St({},a,{defaultValue:m,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:h,ref:s,type:"text"}))}),Ci={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},OO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ms[i];a===void 0?r.push(i.replace(Ci.dots,"\\.").replace(Ci.openParenthesis,"\\(").replace(Ci.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ci.leadingBars,"\\")},ji=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Zu(o,n);var i=OO(o);return n?"^".concat(i,"$"):i},_O=function(e){return e.replace(Ci.escape,"\\$&")},Zu=function(e,t){var n=e.map(function(r){return typeof r=="string"?_O(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ms={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]/}},MO=/\d/,tg="(dd) 9dddd-dddd",ng="(dd) dddd-dddd",rg="ddd.ddd.ddd-dd",og="dd.ddd.ddd/dddd-dd",es=function(e){return e.replace(/\D/g,"")},DO=["2",/[0-3]/,":",/[0-5]/,/\d/],jO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:rg,isoDate:"dddd-dd-dd",cnpj:og,telephone:ng,cellphone:tg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return es(e).length<=11?rg:og},int:function(e){return e===void 0&&(e=""),MO.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=es(e);return t.length<11?ng:tg},time:function(e){var t=es(e),n=t[0];return n==="2"?DO:jO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),St({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:ji(e,"",!0),infinity:n.infinity},n)},zt={cellTelephone:Ut(qt.cellTelephone,"tel"),cellphone:Ut(qt.cellphone,"tel"),cep:Ut(qt.cep,"decimal"),cnpj:Ut(qt.cnpj,"decimal"),color:Ut(qt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(qt.cpf,"decimal"),cpfCnpj:Ut(qt.cpfCnpj,"decimal",{transform:es}),creditCard:Ut(qt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(qt.date,"decimal"),int:Ut(qt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(qt.isoDate,"decimal"),telephone:Ut(qt.telephone,"tel"),time:Ut(qt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(qt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ig(e,t,n,r){var o,i;r===void 0&&(r=ms);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 ag=function(e){return e},NO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(ji(e,n,t));return r.test(n)};function FO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var LO=E.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=Ef(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var g=jc(s),m=jc(d),y=jc(u),v=E.useRef(NO(u,i,f.value||f.defaultValue)),x=p??"input",S=Ku(E.useState(""),2),T=S[0],w=S[1],C=FO(T),k=E.useCallback(function(O,M){var L,j,$=(L=O??M)!==null&&L!==void 0?L:"";if(u===void 0)return $;var _=(j=$==null?void 0:$.toString())!==null&&j!==void 0?j:"";return ig(_,typeof u=="function"?u(_):u,a??ag,c??ms)},[a,u,c]),I=Ku(E.useState(function(){return k(f.value,f.defaultValue)}),2),P=I[0],D=I[1],N=k(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(P);return Array.isArray(O)?Zu(O,i):ji(u,P,i)}return typeof u=="string"?ji(u,P,i):Zu(u,i)},[l,P,i,u]);E.useEffect(function(){if(f.value!==void 0){var O=k(f.value,f.defaultValue);D(O),h.current!==null&&(h.current.value=O)}},[f.value,u,a,f.defaultValue]);var R=function(O){var M,L,j,$,_,z=O.currentTarget,J=O.target.value;if(y.current===void 0)return D(J),(M=m.current)===null||M===void 0||M.call(m,J),(L=g.current)===null||L===void 0||L.call(g,O),d==null?void 0:d(J);var te=new RegExp(ji(y.current,J,i)),ee=(j=z.selectionEnd)!==null&&j!==void 0?j:0,Z=function(Y,ie,B){if(Y.type!=="number")return Y.setSelectionRange(ie,B)};if(r&&v.current&&J.length>=P.length)return z.value=P,Z(z,ee-1,ee-1);var U=!1;J.length<C.length&&(v.current=!1,U=!0),te.test(J)&&(v.current=!0);var G=ee,F=J[G-1],W=ig(J,typeof y.current=="function"?y.current(J):y.current,a??ag,c??ms);for(z.value=W,D(W);G<W.length&&W.charAt(G-1)!==F;)G+=1;U?Z(z,ee,ee):Z(z,G,G),O.target.value=W,w(W),($=m.current)===null||$===void 0||$.call(m,W),(_=g.current)===null||_===void 0||_.call(g,O)};return E.createElement(x,St({},f,{ref:h,pattern:V,onChange:R,defaultValue:sg(f.defaultValue)?N:void 0,value:sg(f.value)?k(f.value,f.value):f.value}))}),sg=function(e){return typeof e=="string"},Jb=E.forwardRef(function(e,t){return EO(e.mask)?E.createElement(kO,St({},e,{mask:void 0,ref:t})):PO(e.mask)?E.createElement(IO,St({},e,{mask:void 0,ref:t})):E.createElement(LO,St({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(Jb,St({},e,t))}};Kt(zt.cellTelephone);Kt(zt.cellphone);Kt(zt.cep);Kt(zt.cnpj);Kt(zt.color);Kt(zt.cpf);Kt(zt.cpfCnpj);Kt(zt.creditCard);Kt(zt.date);Kt(zt.int);Kt(zt.isoDate);Kt(zt.telephone);Kt(zt.time);Kt(zt.uuid);var e0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&SO(zt,t.mask)?zt[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return E.createElement(Jb,St({},o,{ref:n}))}),Na={exports:{}},Nc={},Fa={exports:{}},Fc={};/**
137
+ */const NA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ul=Et("x",NA),sg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},FA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Ub=e=>x.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:sg,exit:sg.false,transition:FA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:je("aria-hidden:pointer-events-none",e.className),children:e.children}),LA=ti("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"}}),VA=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:je("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Ub,{"data-open":!!i,open:!!i,children:x.jsxs(cn,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:je(LA({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Hb,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?x.jsx(qb,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?x.jsx(_A,{"aria-hidden":"true",size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?x.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(ul,{size:20})}):null]})})})}),Yb=6048e5,$A=864e5,zA=6e4,BA=36e5,HA=1e3,lg=Symbol.for("constructDateFrom");function rt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&lg in e?e[lg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ze(e,t){return rt(t||e,e)}function dl(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(t)?rt((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Gb(e,t,n){const r=Ze(e,n==null?void 0:n.in);if(isNaN(t))return rt(e,NaN);if(!t)return r;const o=r.getDate(),i=rt(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 Eo(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=Ze(e,n==null?void 0:n.in),d=o||r?Gb(u,o+r*12):u,p=a||i?dl(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return rt(e,+p+g)}let WA={};function to(){return WA}function jn(e,t){var s,l,c,u;const n=to(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Ze(e,t==null?void 0: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 $o(e,t){return jn(e,{...t,weekStartsOn:1})}function Kb(e,t){const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=rt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=$o(o),a=rt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=$o(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ms(e){const t=Ze(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 fl(e,...t){const n=rt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function zo(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function qA(e,t,n){const[r,o]=fl(n==null?void 0:n.in,e,t),i=zo(r),a=zo(o),s=+i-ms(i),l=+a-ms(a);return Math.round((s-l)/$A)}function UA(e,t){const n=Kb(e,t),r=rt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),$o(r)}function YA(e){return rt(e,Date.now())}function GA(e,t,n){const[r,o]=fl(n==null?void 0:n.in,e,t);return+zo(r)==+zo(o)}function KA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zb(e){return!(!KA(e)&&typeof e!="number"||isNaN(+Ze(e)))}function ZA(e,t){const[n,r]=fl(e,t.start,t.end);return{start:n,end:r}}function Xb(e,t){const{start:n,end:r}=ZA(t==null?void 0: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(rt(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Qb(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function XA(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function QA(e,t){var s,l;const n=to(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Ze(e,t==null?void 0: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 JA={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"}},eI=(e,t,n)=>{let r;const o=JA[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $c(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oI={date:$c({formats:tI,defaultWidth:"full"}),time:$c({formats:nI,defaultWidth:"full"}),dateTime:$c({formats:rI,defaultWidth:"full"})},iI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},aI=(e,t,n,r)=>iI[e];function Si(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&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 sI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cI={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"]},uI={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"]},dI={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"}},fI={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"}},pI=(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"},hI={ordinalNumber:pI,era:Si({values:sI,defaultWidth:"wide"}),quarter:Si({values:lI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Si({values:cI,defaultWidth:"wide"}),day:Si({values:uI,defaultWidth:"wide"}),dayPeriod:Si({values:dI,defaultWidth:"wide",formattingValues:fI,defaultFormattingWidth:"wide"})};function Ti(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)?gI(s,d=>d.test(a)):mI(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 mI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function gI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function vI(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 yI=/^(\d+)(th|st|nd|rd)?/i,xI=/\d+/i,bI={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},wI={any:[/^b/i,/^(a|c)/i]},SI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},TI={any:[/1/i,/2/i,/3/i,/4/i]},EI={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},CI={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]},kI={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},RI={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]},PI={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},AI={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}},II={ordinalNumber:vI({matchPattern:yI,parsePattern:xI,valueCallback:e=>parseInt(e,10)}),era:Ti({matchPatterns:bI,defaultMatchWidth:"wide",parsePatterns:wI,defaultParseWidth:"any"}),quarter:Ti({matchPatterns:SI,defaultMatchWidth:"wide",parsePatterns:TI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ti({matchPatterns:EI,defaultMatchWidth:"wide",parsePatterns:CI,defaultParseWidth:"any"}),day:Ti({matchPatterns:kI,defaultMatchWidth:"wide",parsePatterns:RI,defaultParseWidth:"any"}),dayPeriod:Ti({matchPatterns:PI,defaultMatchWidth:"any",parsePatterns:AI,defaultParseWidth:"any"})},Jb={code:"en-US",formatDistance:eI,formatLong:oI,formatRelative:aI,localize:hI,match:II,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _I(e,t){const n=Ze(e,t==null?void 0:t.in);return qA(n,XA(n))+1}function e0(e,t){const n=Ze(e,t==null?void 0:t.in),r=+$o(n)-+UA(n);return Math.round(r/Yb)+1}function If(e,t){var u,d,p,f;const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=to(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=rt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=jn(a,t),l=rt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=jn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function OI(e,t){var s,l,c,u;const n=to(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=If(e,t),i=rt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),jn(i,t)}function t0(e,t){const n=Ze(e,t==null?void 0:t.in),r=+jn(n,t)-+OI(n,t);return Math.round(r/Yb)+1}function Ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ge(n+1,2)},d(e,t){return Ge(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 Ge(e.getHours()%12||12,t.length)},H(e,t){return Ge(e.getHours(),t.length)},m(e,t){return Ge(e.getMinutes(),t.length)},s(e,t){return Ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ge(o,t.length)}},po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cg={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 rr.y(e,t)},Y:function(e,t,n,r){const o=If(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Ge(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ge(i,t.length)},R:function(e,t){const n=Kb(e);return Ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ge(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 Ge(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 Ge(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 rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});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 Ge(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=t0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ge(o,t.length)},I:function(e,t,n){const r=e0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=_I(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ge(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 Ge(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 Ge(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 Ge(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=po.noon:r===0?o=po.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=po.evening:r>=12?o=po.afternoon:r>=4?o=po.morning:o=po.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 rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return dg(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return dg(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ug(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ug(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ge(r,t.length)},T:function(e,t,n){return Ge(+e,t.length)}};function ug(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+Ge(i,2)}function dg(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ge(Math.trunc(r/60),2),i=Ge(r%60,2);return n+o+t+i}const fg=(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"})}},n0=(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"})}},MI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return fg(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}}",fg(r,t)).replace("{{time}}",n0(o,t))},Ju={p:n0,P:MI},DI=/^D+$/,jI=/^Y+$/,NI=["D","DD","YY","YYYY"];function r0(e){return DI.test(e)}function o0(e){return jI.test(e)}function ed(e,t,n){const r=FI(e,t,n);if(console.warn(r),NI.includes(e))throw new RangeError(r)}function FI(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 LI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$I=/^'([^]*?)'?$/,zI=/''/g,BI=/[a-zA-Z]/;function HI(e,t,n){var u,d,p,f;const r=to(),o=r.locale??Jb,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=Ze(e,n==null?void 0:n.in);if(!Zb(s))throw new RangeError("Invalid time value");let l=t.match(VI).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Ju[g];return h(m,o.formatLong)}return m}).join("").match(LI).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:WI(m)};if(cg[g])return{isToken:!0,value:m};if(g.match(BI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(o0(g)||r0(g))&&ed(g,t,String(e));const h=cg[g[0]];return h(s,g,o.localize,c)}).join("")}function WI(e){const t=e.match($I);return t?t[1].replace(zI,"'"):e}function qI(){return Object.assign({},to())}function UI(e,t){const n=Ze(e,t==null?void 0:t.in).getDay();return n===0?7:n}function YI(e,t){return+Ze(e)>+Ze(t)}function GI(e,t){return+Ze(e)<+Ze(t)}function KI(e,t){const n=ZI(t)?new t(0):rt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function ZI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const XI=10;class i0{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class QI extends i0{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 JI extends i0{constructor(n,r){super();de(this,"priority",XI);de(this,"subPriority",-1);this.context=n||(o=>rt(r,o))}set(n,r){return r.timestampIsSet?n:rt(n,KI(n,this.context))}}class We{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new QI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class e_ extends We{constructor(){super(...arguments);de(this,"priority",140);de(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const wt={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}/},kn={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 St(e,t){return e&&{value:t(e.value),rest:e.rest}}function ht(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Rn(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*BA+i*zA+a*HA),rest:t.slice(n[0].length)}}function a0(e){return ht(wt.anyDigitsSigned,e)}function yt(e,t){switch(e){case 1:return ht(wt.singleDigit,t);case 2:return ht(wt.twoDigits,t);case 3:return ht(wt.threeDigits,t);case 4:return ht(wt.fourDigits,t);default:return ht(new RegExp("^\\d{1,"+e+"}"),t)}}function gs(e,t){switch(e){case 1:return ht(wt.singleDigitSigned,t);case 2:return ht(wt.twoDigitsSigned,t);case 3:return ht(wt.threeDigitsSigned,t);case 4:return ht(wt.fourDigitsSigned,t);default:return ht(new RegExp("^-?\\d{1,"+e+"}"),t)}}function _f(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 s0(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 l0(e){return e%400===0||e%4===0&&e%100!==0}class t_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="yy"});switch(r){case"y":return St(yt(4,n),i);case"yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=s0(o.year,i);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class n_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="YY"});switch(r){case"Y":return St(yt(4,n),i);case"Yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=If(n,i);if(o.isTwoDigitYear){const l=s0(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}}class r_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return gs(r==="R"?4:r.length,n)}set(n,r,o){const i=rt(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),$o(i)}}class o_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return gs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class i_ extends We{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return yt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class a_ extends We{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return yt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class s_ extends We{constructor(){super(...arguments);de(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);de(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return St(ht(wt.month,n),i);case"MM":return St(yt(2,n),i);case"Mo":return St(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class l_ extends We{constructor(){super(...arguments);de(this,"priority",110);de(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=a=>a-1;switch(r){case"L":return St(ht(wt.month,n),i);case"LL":return St(yt(2,n),i);case"Lo":return St(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function c_(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=t0(r,n)-t;return r.setDate(r.getDate()-o*7),Ze(r,n==null?void 0:n.in)}class u_ extends We{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ht(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return jn(c_(n,o,i),i)}}function d_(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=e0(r,n)-t;return r.setDate(r.getDate()-o*7),r}class f_ extends We{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return ht(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return $o(d_(n,o))}}const p_=[31,28,31,30,31,30,31,31,30,31,30,31],h_=[31,29,31,30,31,30,31,31,30,31,30,31];class m_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"subPriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ht(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=l0(o),a=n.getMonth();return i?r>=1&&r<=h_[a]:r>=1&&r<=p_[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class g_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"subpriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return ht(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear();return l0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Of(e,t,n){var d,p,f,m;const r=to(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,i=Ze(e,n==null?void 0: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 dl(i,u,n)}class v_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Of(n,o,i),n.setHours(0,0,0,0),n}}class y_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return St(yt(r.length,n),a);case"eo":return St(o.ordinalNumber(n,{unit:"day"}),a);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Of(n,o,i),n.setHours(0,0,0,0),n}}class x_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return St(yt(r.length,n),a);case"co":return St(o.ordinalNumber(n,{unit:"day"}),a);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Of(n,o,i),n.setHours(0,0,0,0),n}}function b_(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=UI(r,n),i=t-o;return dl(r,i,n)}class w_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=a=>a===0?7:a;switch(r){case"i":case"ii":return yt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return St(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return St(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return St(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return St(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=b_(n,o),n.setHours(0,0,0,0),n}}class S_ extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(_f(o),0,0,0),n}}class T_ extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(_f(o),0,0,0),n}}class E_ extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(_f(o),0,0,0),n}}class C_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ht(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class k_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ht(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class R_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ht(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class P_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ht(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class A_ extends We{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ht(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class I_ extends We{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ht(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class __ extends We{constructor(){super(...arguments);de(this,"priority",30);de(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return St(yt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class O_ extends We{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Rn(kn.basicOptionalMinutes,n);case"XX":return Rn(kn.basic,n);case"XXXX":return Rn(kn.basicOptionalSeconds,n);case"XXXXX":return Rn(kn.extendedOptionalSeconds,n);case"XXX":default:return Rn(kn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:rt(n,n.getTime()-ms(n)-o)}}class M_ extends We{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Rn(kn.basicOptionalMinutes,n);case"xx":return Rn(kn.basic,n);case"xxxx":return Rn(kn.basicOptionalSeconds,n);case"xxxxx":return Rn(kn.extendedOptionalSeconds,n);case"xxx":default:return Rn(kn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:rt(n,n.getTime()-ms(n)-o)}}class D_ extends We{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return a0(n)}set(n,r,o){return[rt(n,o*1e3),{timestampIsSet:!0}]}}class j_ extends We{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return a0(n)}set(n,r,o){return[rt(n,o),{timestampIsSet:!0}]}}const N_={G:new e_,y:new t_,Y:new n_,R:new r_,u:new o_,Q:new i_,q:new a_,M:new s_,L:new l_,w:new u_,I:new f_,d:new m_,D:new g_,E:new v_,e:new y_,c:new x_,i:new w_,a:new S_,b:new T_,B:new E_,h:new C_,H:new k_,K:new R_,k:new P_,m:new A_,s:new I_,S:new __,X:new O_,x:new M_,t:new D_,T:new j_},F_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,V_=/^'([^]*?)'?$/,$_=/''/g,z_=/\S/,B_=/[a-zA-Z]/;function H_(e,t,n,r){var h,v,y,b;const o=()=>rt(n,NaN),i=qI(),a=i.locale??Jb,s=i.firstWeekContainsDate??((v=(h=i.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(y=i.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():Ze(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new JI(r==null?void 0:r.in,n)],d=t.match(L_).map(T=>{const w=T[0];if(w in Ju){const S=Ju[w];return S(T,a.formatLong)}return T}).join("").match(F_),p=[];for(let T of d){o0(T)&&ed(T,t,e),r0(T)&&ed(T,t,e);const w=T[0],S=N_[w];if(S){const{incompatibleTokens:C}=S;if(Array.isArray(C)){const I=p.find(A=>C.includes(A.token)||A.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${T}\` at the same time`)}else if(S.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);p.push({token:w,fullToken:T});const R=S.run(e,T,a.match,c);if(!R)return o();u.push(R.setter),e=R.rest}else{if(w.match(B_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(T==="''"?T="'":w==="'"&&(T=W_(T)),e.indexOf(T)===0)e=e.slice(T.length);else return o()}}if(e.length>0&&z_.test(e))return o();const f=u.map(T=>T.priority).sort((T,w)=>w-T).filter((T,w,S)=>S.indexOf(T)===w).map(T=>u.filter(w=>w.priority===T).sort((w,S)=>S.subPriority-w.subPriority)).map(T=>T[0]);let m=Ze(n,r==null?void 0:r.in);if(isNaN(+m))return o();const g={};for(const T of f){if(!T.validate(m,c))return o();const w=T.set(m,g,c);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return m}function W_(e){return e.match(V_)[1].replace($_,"'")}function q_(e,t,n){const[r,o]=fl(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function U_(e,t){return GA(rt(e,e),YA(e))}function Y_(e,t,n){return dl(e,-t,n)}function G_(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(+r)?rt(e,NaN):(r.setFullYear(t),r)}function K_(e,t,n){return Gb(e,-t,n)}function Pi(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=K_(e,o+r*12,n),d=Y_(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return rt(e,+d-m)}var Tt=function(){return Tt=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},Tt.apply(this,arguments)};function Mf(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 td(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}var ta=function(e){return e.replace(new RegExp(" ","g")," ")},c0=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)},Z_=function(e){return e.replace(/^0+([0-9]+)/,"$1")},u0=function(e,t,n){var r=e.length-2,o=Z_(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},d0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},vs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},X_=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},zc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},Q_=function(e){return e==="money"||e==="currency"},J_=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Tt(Tt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Fa=function(e,t){var n=c0(d0(e),t.fraction.length),r="".concat(t.currency).concat(u0(n,t.group,t.decimal));return ta(r)},eO=E.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=Mf(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var m=J_(r,i,s);return m.currency=ta("".concat(m.currency.trim()," ")),m.literal=ta(m.literal.trim()),m},[r,i]),p=function(m){var g=Fa(m.target.value,d),h=vs(g);m.target.value=g,m.target.setAttribute("data-number",h.toString()),l==null||l(m),h!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var m=u.current.value;if(m!==""){var g=Fa(m,d),h=vs(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var v=new InputEvent("change",{});l==null||l(Tt(Tt({},v),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Fa(c.defaultValue,d):void 0;return E.createElement("input",Tt({},c,{value:typeof c.value=="string"?Fa(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),tO=1,nO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},rO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Tt(Tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},La=function(e,t){var n=c0(d0(e),t.fraction.length),r="".concat(u0(n,t.group,t.decimal)," ").concat(t.percentSign);return ta(r)},oO=E.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=Mf(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=td(E.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];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,y=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(La(y,d))},[a.value]);var d=E.useMemo(function(){var v=rO(r);return v.percentSign=ta("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-tO,f=function(v){var y,b=s.current;b&&(b.setSelectionRange(p,p),v&&((y=a.onFocus)===null||y===void 0||y.call(a,v)))},m=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var b=y.selectionStart,T=y.selectionEnd,w=b!==T,S=p<b;!w&&S&&f()}i==null||i(v)},g=function(v){var y=La(v.target.value,d),b=vs(y);u(y),v.target.value=y,v.target.setAttribute("data-number",b.toString()),o==null||o(v)};E.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var y=La(v,d),b=vs(y);u(y),s.current.value=y,s.current.setAttribute("data-number",b.toString());var T=new InputEvent("change",{});o==null||o(Tt(Tt({},T),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var h=a.defaultValue?La(a.defaultValue,d):void 0;return E.createElement("input",Tt({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:m,ref:s,type:"text"}))}),Ai={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},iO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ys[i];a===void 0?r.push(i.replace(Ai.dots,"\\.").replace(Ai.openParenthesis,"\\(").replace(Ai.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ai.leadingBars,"\\")},Vi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return nd(o,n);var i=iO(o);return n?"^".concat(i,"$"):i},aO=function(e){return e.replace(Ai.escape,"\\$&")},nd=function(e,t){var n=e.map(function(r){return typeof r=="string"?aO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ys={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},sO=/\d/,pg="(dd) 9dddd-dddd",hg="(dd) dddd-dddd",mg="ddd.ddd.ddd-dd",gg="dd.ddd.ddd/dddd-dd",rs=function(e){return e.replace(/\D/g,"")},lO=["2",/[0-3]/,":",/[0-5]/,/\d/],cO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:mg,isoDate:"dddd-dd-dd",cnpj:gg,telephone:hg,cellphone:pg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return rs(e).length<=11?mg:gg},int:function(e){return e===void 0&&(e=""),sO.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=rs(e);return t.length<11?hg:pg},time:function(e){var t=rs(e),n=t[0];return n==="2"?lO:cO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),Tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Vi(e,"",!0),infinity:n.infinity},n)},$t={cellTelephone:Ut(qt.cellTelephone,"tel"),cellphone:Ut(qt.cellphone,"tel"),cep:Ut(qt.cep,"decimal"),cnpj:Ut(qt.cnpj,"decimal"),color:Ut(qt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(qt.cpf,"decimal"),cpfCnpj:Ut(qt.cpfCnpj,"decimal",{transform:rs}),creditCard:Ut(qt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(qt.date,"decimal"),int:Ut(qt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(qt.isoDate,"decimal"),telephone:Ut(qt.telephone,"tel"),time:Ut(qt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(qt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function vg(e,t,n,r){var o,i;r===void 0&&(r=ys);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 yg=function(e){return e},uO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Vi(e,n,t));return r.test(n)};function dO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var fO=E.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=Mf(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=E.useRef(null);E.useImperativeHandle(t,function(){return m.current});var g=zc(s),h=zc(d),v=zc(u),y=E.useRef(uO(u,i,f.value||f.defaultValue)),b=p??"input",T=td(E.useState(""),2),w=T[0],S=T[1],C=dO(w),R=E.useCallback(function(_,D){var F,j,z=(F=_??D)!==null&&F!==void 0?F:"";if(u===void 0)return z;var M=(j=z==null?void 0:z.toString())!==null&&j!==void 0?j:"";return vg(M,typeof u=="function"?u(M):u,a??yg,c??ys)},[a,u,c]),I=td(E.useState(function(){return R(f.value,f.defaultValue)}),2),A=I[0],O=I[1],N=R(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(A);return Array.isArray(_)?nd(_,i):Vi(u,A,i)}return typeof u=="string"?Vi(u,A,i):nd(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var _=R(f.value,f.defaultValue);O(_),m.current!==null&&(m.current.value=_)}},[f.value,u,a,f.defaultValue]);var P=function(_){var D,F,j,z,M,$=_.currentTarget,J=_.target.value;if(v.current===void 0)return O(J),(D=h.current)===null||D===void 0||D.call(h,J),(F=g.current)===null||F===void 0||F.call(g,_),d==null?void 0:d(J);var te=new RegExp(Vi(v.current,J,i)),ee=(j=$.selectionEnd)!==null&&j!==void 0?j:0,Z=function(G,ie,B){if(G.type!=="number")return G.setSelectionRange(ie,B)};if(r&&y.current&&J.length>=A.length)return $.value=A,Z($,ee-1,ee-1);var U=!1;J.length<C.length&&(y.current=!1,U=!0),te.test(J)&&(y.current=!0);var Y=ee,L=J[Y-1],W=vg(J,typeof v.current=="function"?v.current(J):v.current,a??yg,c??ys);for($.value=W,O(W);Y<W.length&&W.charAt(Y-1)!==L;)Y+=1;U?Z($,ee,ee):Z($,Y,Y),_.target.value=W,S(W),(z=h.current)===null||z===void 0||z.call(h,W),(M=g.current)===null||M===void 0||M.call(g,_)};return E.createElement(b,Tt({},f,{ref:m,pattern:V,onChange:P,defaultValue:xg(f.defaultValue)?N:void 0,value:xg(f.value)?R(f.value,f.value):f.value}))}),xg=function(e){return typeof e=="string"},f0=E.forwardRef(function(e,t){return Q_(e.mask)?E.createElement(eO,Tt({},e,{mask:void 0,ref:t})):nO(e.mask)?E.createElement(oO,Tt({},e,{mask:void 0,ref:t})):E.createElement(fO,Tt({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(f0,Tt({},e,t))}};Kt($t.cellTelephone);Kt($t.cellphone);Kt($t.cep);Kt($t.cnpj);Kt($t.color);Kt($t.cpf);Kt($t.cpfCnpj);Kt($t.creditCard);Kt($t.date);Kt($t.int);Kt($t.isoDate);Kt($t.telephone);Kt($t.time);Kt($t.uuid);var p0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&X_($t,t.mask)?$t[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return E.createElement(f0,Tt({},o,{ref:n}))}),Va={exports:{}},Bc={},$a={exports:{}},Hc={};/**
138
138
  * @license React
139
139
  * use-sync-external-store-shim.production.js
140
140
  *
@@ -142,7 +142,7 @@
142
142
  *
143
143
  * This source code is licensed under the MIT license found in the
144
144
  * LICENSE file in the root directory of this source tree.
145
- */var lg;function VO(){if(lg)return Fc;lg=1;var e=E;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(),h=r({inst:{value:f,getSnapshot:p}}),g=h[0].inst,m=h[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 Fc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Fc}var Lc={};/**
145
+ */var bg;function pO(){if(bg)return Hc;bg=1;var e=E;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(),m=r({inst:{value:f,getSnapshot:p}}),g=m[0].inst,h=m[1];return i(function(){g.value=f,g.getSnapshot=p,l(g)&&h({inst:g})},[d,f,p]),o(function(){return l(g)&&h({inst:g}),d(function(){l(g)&&h({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 Hc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Hc}var Wc={};/**
146
146
  * @license React
147
147
  * use-sync-external-store-shim.development.js
148
148
  *
@@ -150,7 +150,7 @@
150
150
  *
151
151
  * This source code is licensed under the MIT license found in the
152
152
  * LICENSE file in the root directory of this source tree.
153
- */var cg;function zO(){return cg||(cg=1,process.env.NODE_ENV!=="production"&&function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}function t(f,h){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=h();if(!d){var m=h();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:h}});var y=m[0].inst,v=m[1];return l(function(){y.value=g,y.getSnapshot=h,n(y)&&v({inst:y})},[f,g,h]),s(function(){return n(y)&&v({inst:y}),f(function(){n(y)&&v({inst:y})})},[f]),c(g),g}function n(f){var h=f.getSnapshot;f=f.value;try{var g=h();return!i(f,g)}catch{return!0}}function r(f,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,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;Lc.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())}()),Lc}var ug;function t0(){return ug||(ug=1,process.env.NODE_ENV==="production"?Fa.exports=VO():Fa.exports=zO()),Fa.exports}/**
153
+ */var wg;function hO(){return wg||(wg=1,process.env.NODE_ENV!=="production"&&function(){function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}function t(f,m){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=m();if(!d){var h=m();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:g,getSnapshot:m}});var v=h[0].inst,y=h[1];return l(function(){v.value=g,v.getSnapshot=m,n(v)&&y({inst:v})},[f,g,m]),s(function(){return n(v)&&y({inst:v}),f(function(){n(v)&&y({inst:v})})},[f]),c(g),g}function n(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!i(f,g)}catch{return!0}}function r(f,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,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;Wc.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())}()),Wc}var Sg;function h0(){return Sg||(Sg=1,process.env.NODE_ENV==="production"?$a.exports=pO():$a.exports=hO()),$a.exports}/**
154
154
  * @license React
155
155
  * use-sync-external-store-shim/with-selector.production.js
156
156
  *
@@ -158,7 +158,7 @@
158
158
  *
159
159
  * This source code is licensed under the MIT license found in the
160
160
  * LICENSE file in the root directory of this source tree.
161
- */var dg;function $O(){if(dg)return Nc;dg=1;var e=E,t=t0();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 Nc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function y(w){if(!v){if(v=!0,x=w,w=p(w),f!==void 0&&g.hasValue){var C=g.value;if(f(C,w))return S=C}return S=w}if(C=S,r(x,w))return C;var k=p(w);return f!==void 0&&f(C,k)?(x=w,C):(x=w,S=k)}var v=!1,x,S,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},Nc}var Vc={};/**
161
+ */var Tg;function mO(){if(Tg)return Bc;Tg=1;var e=E,t=h0();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 Bc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,b=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(b,S))return C;var R=p(S);return f!==void 0&&f(C,R)?(b=S,C):(b=S,T=R)}var y=!1,b,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 h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Bc}var qc={};/**
162
162
  * @license React
163
163
  * use-sync-external-store-shim/with-selector.development.js
164
164
  *
@@ -166,32 +166,32 @@
166
166
  *
167
167
  * This source code is licensed under the MIT license found in the
168
168
  * LICENSE file in the root directory of this source tree.
169
- */var fg;function BO(){return fg||(fg=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=E,n=t0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Vc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function y(w){if(!v){if(v=!0,x=w,w=p(w),f!==void 0&&g.hasValue){var C=g.value;if(f(C,w))return S=C}return S=w}if(C=S,r(x,w))return C;var k=p(w);return f!==void 0&&f(C,k)?(x=w,C):(x=w,S=k)}var v=!1,x,S,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,p,f]);var m=o(c,h[0],h[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())}()),Vc}var pg;function HO(){return pg||(pg=1,process.env.NODE_ENV==="production"?Na.exports=$O():Na.exports=BO()),Na.exports}HO();var zo=function(){return zo=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},zo.apply(this,arguments)};function Ni(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 n0(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))}var po=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},WO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},qO=function(e){return Object.entries(e)},r0=function(e){return e instanceof Promise},o0=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)},zo(zo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},UO=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,n0([],Ni(a),!1)),u=function(d,p){return n(function(f){return o0(d,f,i,p)})};return r0(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))}},GO=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,n0([],Ni(a),!1)),c=function(u){return n(function(d){return o0(u,d,i,o.current)})};return r0(l)?l.then(function(u){return c(u)}):c(l)}},Cf=function(e,t,n){var r,o,i,a=Ni(E.useState(function(){return e}),2),s=a[0],l=a[1],c=po(s),u=po((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=po(t),p=po((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=po((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),g=WO(s),m=po(g),y=E.useRef(null);E.useEffect(function(){if(y.current!==null){var S=y.current;p.current.forEach(function(T){T(s,g,S)})}},[s,p,g]);var v=Ni(E.useState(function(){var S=function(){return u.current},T=d.current({props:S,state:function(){return c.current},initialState:h.current,previousState:function(){return m.current}});return qO(T).reduce(function(w,C){var k,I=Ni(C,2),P=I[0],D=I[1];return zo(zo({},w),(k={},k[P]=n!=null&&n.debug?UO(P,D,l,S,y,f.current):GO(P,D,l,S,y,f.current),k))},{})}),1),x=v[0];return[s,x,u.current]};const YO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function KO(e,t){return E.useRef(YO(e,t)).current}const cl={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>)`},jr=(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(jr(a,t,n,s))},[]),i0=(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]:i0(a,t,n,s)}},{}),hg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},gs=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},ZO={default:e=>gs(e,{result:hg.default}),dark:e=>gs(e,{result:hg.dark})},bi=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},XO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),kf=(e,t)=>{const n=jr(e.colors,bi(t==null?void 0:t.colors)),r=jr(e.spacing,bi(t==null?void 0:t.spacing)),o=jr(e.rounded,bi(t==null?void 0:t.rounded)),i=jr(e.zIndex,bi((t==null?void 0:t.zIndex)??XO)),a=e.custom?jr(e.custom,bi(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},QO=(e,t)=>gs(kf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),JO=(e,t)=>kf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),e_=(e,t)=>gs(kf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ul={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>b.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiSelectSelectedLabel:"Selected",multiSelectInnerPlaceholder:"Search..."},dl={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},ai=E.createContext({tweaks:dl,parser:cl.hsla,map:ul,locale:void 0}),Rf=e=>{const t=E.useContext(ai);if(e)return e;if(t)return t.locale||e};function t_(e,t){const n=E.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 Ot=()=>{const e=E.useContext(ai);return e?e.map:ul},on=(e,t=2)=>e.toString(16).padStart(t,"0"),ga=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${on(t,4)+on(n,3)}-${on(r[0])+on(r[1])}-${on(r[2])+on(r[3])}-${on(r[4])+on(r[5])}-${on(r[6])+on(r[7])+on(r[8])+on(r[9])}`},mg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),gg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Pf=(e,t)=>{const n=mg(t,gg.basic,e)||mg(t,gg.extend,e);return n===void 0||n===e?void 0:n},qr=()=>typeof window>"u",Xu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a0=(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},n_=e=>!e,Af=()=>{},s0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},r_={type:"spring",bounce:.3,duration:.6},vg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),l0={enter:vg(1),exit:vg(-1),middle:{x:"0%",opacity:1}},yg={exit:{visibility:"hidden"}},o_=e=>{const t=jn(Vb(e));return Lb({start:t,end:So(t,{days:41})})},c0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),i_=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Vb(new Date(1970,o,1).setMonth(o)),a=c0(i,n);return b.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),zc={ArrowLeft:(e,t)=>t==="days"?Ei(e,{days:1}):Ei(e,{months:1}),ArrowRight:(e,t)=>t==="days"?So(e,{days:1}):So(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ei(e,{weeks:1}):Ei(e,{years:1}),ArrowDown:(e,t)=>t==="days"?So(e,{weeks:1}):So(e,{years:1})},xg=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Ir=e=>e.getFullYear().toString().padStart(4,"0"),a_=(e,t,n)=>e===void 0||n===void 0?!1:xI(t,e)&&bI(t,n),s_=e=>{var n;const t=Ot();return b.jsx(pt.tbody,{layout:!0,variants:l0,custom:e.direction,onKeyDown:e.onKeyDown,className:Ve((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=ct.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return b.jsx("tr",{className:i,children:r.map(c=>{var y,v,x,S,T,w,C,k,I,P,D,N,V,R,O,M,L,j;const u=c.toISOString(),d=e.rangeMode?u===((v=(y=e.range)==null?void 0:y.to)==null?void 0:v.toISOString())||u===((S=(x=e.range)==null?void 0:x.from)==null?void 0:S.toISOString()):u===((T=e.date)==null?void 0:T.toISOString()),p=yO(c)&&e.markToday,f=((w=e.disabledDate)==null?void 0:w.call(e,c))||!1,h=vO(c,e.stateDate),g=!h||f,m=e.rangeMode?a_((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return b.jsxs("td",{align:"center",className:Ve("relative",ct.function((I=e.styles)==null?void 0:I.dayFrame)?(P=e.styles)==null?void 0:P.dayFrame(c):(D=e.styles)==null?void 0:D.dayFrame),children:[b.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":h,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Ve(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,m&&e.markRange?"size-10 border border-dashed border-card-border":"",ct.function((N=e.styles)==null?void 0:N.day)?(V=e.styles)==null?void 0:V.day(c):(R=e.styles)==null?void 0:R.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((M=e.labelRange)==null?void 0:M.from)??t.calendarFromDate})}):null,d&&((L=e.stateRange.to)==null?void 0:L.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((j=e.labelRange)==null?void 0:j.to)??t.calendarToDate})}):null]}),e.RenderOnDay?b.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},l_=()=>Vo(new Date),u0=({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,...p})=>{const f=E.useRef(ga()),h=Ot(),g=Rf(o),m=E.useRef(null),{date:y,range:v}=p,x=y||new Date,S=E.useRef(null),[T,w]=Cf({date:x,isAnimating:!1,year:Ir(x),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:i_(f.current,x,g),selectMode:l?"from":void 0,week:Lb({start:jn(x),end:EA(x)})},R=>({onChangeYear:O=>({year:O}),onExitComplete:()=>(xg(S.current||null,m,R.state().date,200),S.current=null,{isAnimating:!1}),date:O=>{const M=O(R.state().date);return{date:M,year:Ir(M)}},nextMonth:O=>{O&&(S.current=O.currentTarget);const M=R.state();if(M.isAnimating)return M;const L=So(M.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:Ir(L)}},previousMonth:O=>{O&&(S.current=O.currentTarget);const M=R.state();if(M.isAnimating)return M;const L=Ei(M.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:Ir(L)}},onSelectDate:O=>{const M=R.state(),L=O.currentTarget.dataset.range==="true",j=O.currentTarget.dataset.date||"",$=new Date(j);return{date:$,year:Ir($),selectMode:M.selectMode===void 0?void 0:M.selectMode==="from"?"to":"from",range:L?{from:M.selectMode==="from"?$:M.range.from,to:M.selectMode==="to"?$:M.range.to}:M.range}},onChangeMonth:O=>{const M=O.target.value,j=Array.from(O.target.options).find(_=>_.value===M),$=R.state();if(j){const _=j.dataset.index||"",z=new Date(R.state().date);return z.setMonth(+_),{...$,date:z,year:Ir(z)}}return $},onKeyDown:O=>{const M=O.key,L=R.state();if(M in zc){(M==="ArrowUp"||M==="ArrowDown")&&O.preventDefault();const j=R.state().date,$=ct.keyof(zc,M)?zc[M](j,O.shiftKey?"month":"days"):null;if($!==null)return xg(O.target,m,$),{...L,date:$,year:Ir($)}}return R.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(R,O,M)=>{var j,$;return(M.method==="onChangeMonth"||M.method==="previousMonth"||M.method==="nextMonth")&&(($=(j=M.props).onChangeMonth)==null||$.call(j,R.date)),R},(R,O,M)=>{var j,$;return M.method==="onChangeYear"&&(($=(j=M.props).onChangeYear)==null||$.call(j,R.date)),R},(R,O,M)=>{const L=M.method==="onSelectDate"||M.method==="setToday"||M.method==="onKeyDown";return l&&L&&t?(c==null||c(R.range),R):(L&&t&&(c==null||c(R.date)),R)}]}),C=o_(T.date),k=a0(C,7),I=T.date.toISOString(),P=c0(T.date,g);E.useEffect(()=>{t||c==null||c(T.date)},[I,t]);const D=KO(R=>w.date(O=>bO(new Date(O),+R)),1200),N=R=>{const O=R.currentTarget.value;w.onChangeYear(O),s==null||s(new Date(O)),D(O)},V=t_((R,O)=>(R.preventDefault(),O==="right"?w.previousMonth():w.nextMonth()),10);return b.jsx(_S,{transition:r_,children:b.jsxs("div",{ref:m,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:Ve("relative overflow-hidden",ct.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[b.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:b.jsx(vr,{initial:!1,mode:"popLayout",custom:T.direction,onExitComplete:w.onExitComplete,children:b.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[b.jsxs("header",{className:"relative flex justify-between",children:[b.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:yg,onClick:w.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(VP,{className:"h-4 w-4"})}),b.jsx(pt.span,{layout:!0,variants:l0,custom:T.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:b.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[b.jsx("select",{value:P,onChange:w.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${P.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:T.months}),b.jsx(e0,{mask:"int",maxLength:4,placeholder:"YYYY",value:T.year,onChange:N,style:{width:`${T.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),b.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:yg,onClick:w.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(xf,{className:"h-4 w-4"})}),b.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%)"}})]}),b.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[b.jsx("thead",{children:b.jsx("tr",{children:T.week.map(R=>b.jsx("th",{role:"columnheader",className:Ve("py-2 text-sm font-medium capitalize",ct.function(u==null?void 0:u.weekDay)?u.weekDay(R):u==null?void 0:u.weekDay),children:R.toLocaleDateString(g,{weekday:"short"})},R.toString()))})}),b.jsx(s_,{zip:k,range:v,styles:u,date:y||null,dispatch:w,markRange:d,markToday:i,rangeMode:l,stateDate:T.date,labelRange:n,stateRange:T.range,RenderOnDay:e,direction:T.direction,disabledDate:r,onKeyDown:w.onKeyDown})]})]},P)})}),b.jsx("footer",{className:"mt-2 text-center text-primary",children:b.jsx("button",{type:"button",onClick:()=>w.date(l_),className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},d0=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>b.jsxs(cn,{...s,as:r,"data-componen":"card",className:Ve("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?b.jsx("header",{className:Ve("mb-2 w-full border-b border-card-border lg:px-8 px-4 pb-4 text-xl font-medium",n),children:t}):i,b.jsx("div",{className:Ve("min-w-full lg:px-8 px-4",a),children:e})]}),f0=e=>{const t=e.Icon??Ob,n=Ot();return b.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[b.jsx(t,{size:64,className:"text-disabled"}),b.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function bg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function p0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=bg(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():bg(e[o],null)}}}}function Ur(...e){return A.useCallback(p0(...e),e)}function h0(e,t=[]){let n=[];function r(i,a){const s=A.createContext(a),l=n.length;n=[...n,a];const c=d=>{var y;const{scope:p,children:f,...h}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,m=A.useMemo(()=>h,Object.values(h));return b.jsx(g.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,h=A.useContext(f);if(h)return h;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=>A.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return A.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,c_(o,...t)]}function c_(...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 A.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var $o=A.forwardRef((e,t)=>{const{children:n,...r}=e,o=A.Children.toArray(n),i=o.find(d_);if(i){const a=i.props.children,s=o.map(l=>l===i?A.Children.count(a)>1?A.Children.only(null):A.isValidElement(a)?a.props.children:null:l);return b.jsx(Qu,{...r,ref:t,children:A.isValidElement(a)?A.cloneElement(a,void 0,s):null})}return b.jsx(Qu,{...r,ref:t,children:n})});$o.displayName="Slot";var Qu=A.forwardRef((e,t)=>{const{children:n,...r}=e;if(A.isValidElement(n)){const o=p_(n),i=f_(r,n.props);return n.type!==A.Fragment&&(i.ref=t?p0(t,o):o),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});Qu.displayName="SlotClone";var u_=({children:e})=>b.jsx(b.Fragment,{children:e});function d_(e){return A.isValidElement(e)&&e.type===u_}function f_(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function p_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function h_(e){const t=e+"CollectionProvider",[n,r]=h0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:g}=f,m=E.useRef(null),y=E.useRef(new Map).current;return b.jsx(o,{scope:h,itemMap:y,collectionRef:m,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,h)=>{const{scope:g,children:m}=f,y=i(s,g),v=Ur(h,y.collectionRef);return b.jsx($o,{ref:v,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,h)=>{const{scope:g,children:m,...y}=f,v=E.useRef(null),x=Ur(h,v),S=i(c,g);return E.useEffect(()=>(S.itemMap.set(v,{ref:v,...y}),()=>void S.itemMap.delete(v))),b.jsx($o,{[u]:"",ref:x,children:m})});d.displayName=c;function p(f){const h=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const m=h.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(h.itemMap.values()).sort((S,T)=>y.indexOf(S.ref.current)-y.indexOf(T.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var m_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vn=m_.reduce((e,t)=>{const n=A.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?$o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function m0(e,t){e&&Ys.flushSync(()=>e.dispatchEvent(t))}function Un(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function g_(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e);A.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 v_="DismissableLayer",Ju="dismissableLayer.update",y_="dismissableLayer.pointerDownOutside",x_="dismissableLayer.focusOutside",wg,g0=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),v0=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=A.useContext(g0),[u,d]=A.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=A.useState({}),h=Ur(t,C=>d(C)),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(m),v=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,T=w_(C=>{const k=C.target,I=[...c.branches].some(P=>P.contains(k));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),w=T_(C=>{const k=C.target;[...c.branches].some(P=>P.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return g_(C=>{v===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),A.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(wg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Tg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=wg)}},[u,p,n,c]),A.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Tg())},[u,c]),A.useEffect(()=>{const C=()=>f({});return document.addEventListener(Ju,C),()=>document.removeEventListener(Ju,C)},[]),b.jsx(Vn.div,{...l,ref:h,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,T.onPointerDownCapture)})});v0.displayName=v_;var b_="DismissableLayerBranch",y0=A.forwardRef((e,t)=>{const n=A.useContext(g0),r=A.useRef(null),o=Ur(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),b.jsx(Vn.div,{...e,ref:o})});y0.displayName=b_;function w_(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=A.useRef(!1),o=A.useRef(()=>{});return A.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){x0(y_,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 T_(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=A.useRef(!1);return A.useEffect(()=>{const o=i=>{i.target&&!r.current&&x0(x_,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 Tg(){const e=new CustomEvent(Ju);document.dispatchEvent(e)}function x0(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?m0(o,i):o.dispatchEvent(i)}var S_=v0,E_=y0,vs=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{},C_="Portal",b0=A.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=A.useState(!1);vs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ua.createPortal(b.jsx(Vn.div,{...r,ref:t}),a):null});b0.displayName=C_;function k_(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var w0=e=>{const{present:t,children:n}=e,r=R_(t),o=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=Ur(r.ref,P_(o));return typeof n=="function"||r.isPresent?A.cloneElement(o,{ref:i}):null};w0.displayName="Presence";function R_(e){const[t,n]=A.useState(),r=A.useRef({}),o=A.useRef(e),i=A.useRef("none"),a=e?"mounted":"unmounted",[s,l]=k_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const c=La(r.current);i.current=s==="mounted"?c:"none"},[s]),vs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=La(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),vs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=La(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=La(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:A.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function La(e){return(e==null?void 0:e.animationName)||"none"}function P_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function A_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=I_({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Un(n),l=A.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function I_({defaultProp:e,onChange:t}){const n=A.useState(e),[r]=n,o=A.useRef(r),i=Un(t);return A.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var O_="VisuallyHidden",If=A.forwardRef((e,t)=>b.jsx(Vn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));If.displayName=O_;var Of="ToastProvider",[_f,__,M_]=h_("Toast"),[T0,NV]=h0("Toast",[M_]),[D_,fl]=T0(Of),S0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=A.useState(null),[c,u]=A.useState(0),d=A.useRef(!1),p=A.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Of}\`. Expected non-empty \`string\`.`),b.jsx(_f.Provider,{scope:t,children:b.jsx(D_,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:A.useCallback(()=>u(f=>f+1),[]),onToastRemove:A.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};S0.displayName=Of;var E0="ToastViewport",j_=["F8"],ed="toast.viewportPause",td="toast.viewportResume",C0=A.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=j_,label:o="Notifications ({hotkey})",...i}=e,a=fl(E0,n),s=__(n),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),p=Ur(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;A.useEffect(()=>{const m=y=>{var x;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),A.useEffect(()=>{const m=l.current,y=d.current;if(h&&m&&y){const v=()=>{if(!a.isClosePausedRef.current){const w=new CustomEvent(ed);y.dispatchEvent(w),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const w=new CustomEvent(td);y.dispatchEvent(w),a.isClosePausedRef.current=!1}},S=w=>{!m.contains(w.relatedTarget)&&x()},T=()=>{m.contains(document.activeElement)||x()};return m.addEventListener("focusin",v),m.addEventListener("focusout",S),m.addEventListener("pointermove",v),m.addEventListener("pointerleave",T),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{m.removeEventListener("focusin",v),m.removeEventListener("focusout",S),m.removeEventListener("pointermove",v),m.removeEventListener("pointerleave",T),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[h,a.isClosePausedRef]);const g=A.useCallback(({tabbingDirection:m})=>{const v=s().map(x=>{const S=x.ref.current,T=[S,...K_(S)];return m==="forwards"?T:T.reverse()});return(m==="forwards"?v.reverse():v).flat()},[s]);return A.useEffect(()=>{const m=d.current;if(m){const y=v=>{var T,w,C;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const k=document.activeElement,I=v.shiftKey;if(v.target===m&&I){(T=c.current)==null||T.focus();return}const N=g({tabbingDirection:I?"backwards":"forwards"}),V=N.findIndex(R=>R===k);$c(N.slice(V+1))?v.preventDefault():I?(w=c.current)==null||w.focus():(C=u.current)==null||C.focus()}};return m.addEventListener("keydown",y),()=>m.removeEventListener("keydown",y)}},[s,g]),b.jsxs(E_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&b.jsx(nd,{ref:c,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"forwards"});$c(m)}}),b.jsx(_f.Slot,{scope:n,children:b.jsx(Vn.ol,{tabIndex:-1,...i,ref:p})}),h&&b.jsx(nd,{ref:u,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"backwards"});$c(m)}})]})});C0.displayName=E0;var k0="ToastFocusProxy",nd=A.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=fl(k0,n);return b.jsx(If,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});nd.displayName=k0;var pl="Toast",N_="toast.swipeStart",F_="toast.swipeMove",L_="toast.swipeCancel",V_="toast.swipeEnd",R0=A.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=A_({prop:r,defaultProp:o,onChange:i});return b.jsx(w0,{present:n||s,children:b.jsx(B_,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Un(e.onPause),onResume:Un(e.onResume),onSwipeStart:Qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qt(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:Qt(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:Qt(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)})})})});R0.displayName=pl;var[z_,$_]=T0(pl,{onClose(){}}),B_=A.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,...h}=e,g=fl(pl,n),[m,y]=A.useState(null),v=Ur(t,R=>y(R)),x=A.useRef(null),S=A.useRef(null),T=o||g.duration,w=A.useRef(0),C=A.useRef(T),k=A.useRef(0),{onToastAdd:I,onToastRemove:P}=g,D=Un(()=>{var O;(m==null?void 0:m.contains(document.activeElement))&&((O=g.viewport)==null||O.focus()),a()}),N=A.useCallback(R=>{!R||R===1/0||(window.clearTimeout(k.current),w.current=new Date().getTime(),k.current=window.setTimeout(D,R))},[D]);A.useEffect(()=>{const R=g.viewport;if(R){const O=()=>{N(C.current),c==null||c()},M=()=>{const L=new Date().getTime()-w.current;C.current=C.current-L,window.clearTimeout(k.current),l==null||l()};return R.addEventListener(ed,M),R.addEventListener(td,O),()=>{R.removeEventListener(ed,M),R.removeEventListener(td,O)}}},[g.viewport,T,l,c,N]),A.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(T)},[i,T,g.isClosePausedRef,N]),A.useEffect(()=>(I(),()=>P()),[I,P]);const V=A.useMemo(()=>m?M0(m):null,[m]);return g.viewport?b.jsxs(b.Fragment,{children:[V&&b.jsx(H_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),b.jsx(z_,{scope:n,onClose:D,children:Ys.createPortal(b.jsx(_f.ItemSlot,{scope:n,children:b.jsx(S_,{asChild:!0,onEscapeKeyDown:Qt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||D(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(Vn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...h,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qt(e.onKeyDown,R=>{R.key==="Escape"&&(s==null||s(R.nativeEvent),R.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:Qt(e.onPointerDown,R=>{R.button===0&&(x.current={x:R.clientX,y:R.clientY})}),onPointerMove:Qt(e.onPointerMove,R=>{if(!x.current)return;const O=R.clientX-x.current.x,M=R.clientY-x.current.y,L=!!S.current,j=["left","right"].includes(g.swipeDirection),$=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,_=j?$(0,O):0,z=j?0:$(0,M),J=R.pointerType==="touch"?10:2,te={x:_,y:z},ee={originalEvent:R,delta:te};L?(S.current=te,Va(F_,d,ee,{discrete:!1})):Sg(te,g.swipeDirection,J)?(S.current=te,Va(N_,u,ee,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(O)>J||Math.abs(M)>J)&&(x.current=null)}),onPointerUp:Qt(e.onPointerUp,R=>{const O=S.current,M=R.target;if(M.hasPointerCapture(R.pointerId)&&M.releasePointerCapture(R.pointerId),S.current=null,x.current=null,O){const L=R.currentTarget,j={originalEvent:R,delta:O};Sg(O,g.swipeDirection,g.swipeThreshold)?Va(V_,f,j,{discrete:!0}):Va(L_,p,j,{discrete:!0}),L.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),H_=e=>{const{__scopeToast:t,children:n,...r}=e,o=fl(pl,t),[i,a]=A.useState(!1),[s,l]=A.useState(!1);return G_(()=>a(!0)),A.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(b0,{asChild:!0,children:b.jsx(If,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},W_="ToastTitle",P0=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(Vn.div,{...r,ref:t})});P0.displayName=W_;var q_="ToastDescription",A0=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(Vn.div,{...r,ref:t})});A0.displayName=q_;var I0="ToastAction",U_=A.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(_0,{altText:n,asChild:!0,children:b.jsx(Mf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${I0}\`. Expected non-empty \`string\`.`),null)});U_.displayName=I0;var O0="ToastClose",Mf=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=$_(O0,n);return b.jsx(_0,{asChild:!0,children:b.jsx(Vn.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});Mf.displayName=O0;var _0=A.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return b.jsx(Vn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function M0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Y_(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(...M0(r))}}),t}function Va(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?m0(o,i):o.dispatchEvent(i)}var Sg=(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 G_(e=()=>{}){const t=Un(e);vs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Y_(e){return e.nodeType===e.ELEMENT_NODE}function K_(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 $c(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Z_=S0,X_=C0,Q_=R0,J_=P0,eM=A0,tM=Mf;const nM=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.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},rM=Jo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),D0=E.createContext(()=>{throw new Error("Not implemented")}),oM=()=>E.useContext(D0),Eg={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]}},iM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=rM({theme:t.theme||"default"});return b.jsx(Q_,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:b.jsx(pt.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:Eg[t.reversedIndex]||Eg.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:b.jsxs("div",{className:a,children:[b.jsxs("div",{className:"flex flex-col p-4",children:[t.title?b.jsx(J_,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,b.jsx(eM,{className:"select-text truncate",children:t.text})]}),r?b.jsx(tM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:b.jsx(al,{className:"h-5 w-5"})}):null]})})})});function aM({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=nM(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const h=[...f,{...u,id:d,text:c}];return h.length>t?h.slice(h.length-t,h.length+1):h}),{clear:s,close:()=>a(f=>f.filter(h=>h.id!==d))}},[t]);return b.jsxs(Z_,{duration:n,swipeThreshold:150,children:[b.jsx(D0.Provider,{value:l,children:e}),b.jsx(vr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(h=>h.id!==c.id));return E.createElement(iM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),b.jsx(X_,{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 sM=e=>b.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[b.jsxs("header",{className:"flex items-start gap-4 p-6",children:[b.jsx("div",{className:Ve("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:b.jsx("div",{children:b.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsx("header",{children:b.jsx("h3",{className:"text-base leading-none",children:e.title})}),b.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?b.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),j0=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},N0=E.createContext(""),lM=e=>{const[t,n]=j0(e.active),r=No(0),o=No(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=h=>{if(!h)return;const g=h.getBoundingClientRect();o.set(g.width),r.set(h.offsetLeft)},d=()=>{const h=c.querySelector("li[data-active=true]");return void u(h)};window.addEventListener("resize",d);let p=c.querySelector("li[data-active=true]");const f=window.location.hash.replace(/^#/,"");if(e.active===""&&f!==""&&(p=c.querySelector(`li[data-id="${f}"]`),n(f)),p===null){p=c.querySelector("li[data-id]");const h=p.getAttribute("data-id")||"";n(h)}return u(p),()=>window.removeEventListener("resize",d)},[]);const a=Oo(e.onChange);E.useEffect(()=>{a.current&&a.current(t)},[a,t]);const s=E.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return b.jsx(N0.Provider,{value:t,children:b.jsx(d0,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:b.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:b.jsx("nav",{className:"min-w-0",children:b.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:s.map(c=>{const u=c.props;return b.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:b.jsx(cn,{onClick:l,"data-id":u.id,"aria-current":"page",as:e.useHash?"a":"button",href:e.useHash?`#${u.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:u.title})},`tab-header-${u.id}`)})})})}),children:e.children})})},cM=()=>E.useContext(N0),uM=e=>{const t=cM();return b.jsx(E.Fragment,{children:e.id===t?e.children:null})},hl=e=>b.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[b.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),b.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});hl.Icon=function(t){return b.jsx("header",{...t,className:Ve("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};hl.Body=function(t){return b.jsx(cn,{...t,className:Ve("min-w-0 flex-1",t.className),children:t.children})};hl.Right=function(t){return b.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:b.jsx(cn,{...t,type:"button"})})};const dM=e=>b.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function ml(){return typeof window<"u"}function xr(e){return F0(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zn(e){var t;return(t=(F0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function F0(e){return ml()?e instanceof Node||e instanceof Bt(e).Node:!1}function Qe(e){return ml()?e instanceof Element||e instanceof Bt(e).Element:!1}function bt(e){return ml()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function rd(e){return!ml()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function va(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function fM(e){return["table","td","th"].includes(xr(e))}function gl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Df(e){const t=jf(),n=Qe(e)?nn(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function pM(e){let t=Gn(e);for(;bt(t)&&!fr(t);){if(Df(t))return t;if(gl(t))return null;t=Gn(t)}return null}function jf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fr(e){return["html","body","#document"].includes(xr(e))}function nn(e){return Bt(e).getComputedStyle(e)}function vl(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gn(e){if(xr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rd(e)&&e.host||Zn(e);return rd(t)?t.host:t}function L0(e){const t=Gn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:bt(t)&&va(t)?t:L0(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=L0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=od(a);return t.concat(a,a.visualViewport||[],va(o)?o:[],s&&n?cr(s):[])}return t.concat(o,cr(o,[],n))}function od(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function gt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&rd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Nf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function V0(){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 z0(e){return e.mozInputSource===0&&e.isTrusted?!0:id()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ff(e){return hM()?!1:!id()&&e.width===0&&e.height===0||id()&&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 Lf(){return/apple/i.test(navigator.vendor)}function id(){const e=/android/i;return e.test(Nf())||e.test(V0())}function $0(){return Nf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function hM(){return V0().includes("jsdom/")}function Bo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function mM(e){return"nativeEvent"in e}function gM(e){return e.matches("html,body")}function It(e){return(e==null?void 0:e.ownerDocument)||document}function Bc(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 Pn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const vM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Vf(e){return bt(e)&&e.matches(vM)}function Dt(e){e.preventDefault(),e.stopPropagation()}function B0(e){return e?e.getAttribute("role")==="combobox"&&Vf(e):!1}const An=Math.min,Xt=Math.max,ys=Math.round,Eo=Math.floor,pr=e=>({x:e,y:e}),yM={left:"right",right:"left",bottom:"top",top:"bottom"},xM={start:"end",end:"start"};function ad(e,t,n){return Xt(e,An(t,n))}function si(e,t){return typeof e=="function"?e(t):e}function hr(e){return e.split("-")[0]}function li(e){return e.split("-")[1]}function H0(e){return e==="x"?"y":"x"}function zf(e){return e==="y"?"height":"width"}function Gr(e){return["top","bottom"].includes(hr(e))?"y":"x"}function $f(e){return H0(Gr(e))}function bM(e,t,n){n===void 0&&(n=!1);const r=li(e),o=$f(e),i=zf(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=xs(a)),[a,xs(a)]}function wM(e){const t=xs(e);return[sd(e),t,sd(t)]}function sd(e){return e.replace(/start|end/g,t=>xM[t])}function TM(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function SM(e,t,n,r){const o=li(e);let i=TM(hr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(sd)))),i}function xs(e){return e.replace(/left|right|bottom|top/g,t=>yM[t])}function EM(e){return{top:0,right:0,bottom:0,left:0,...e}}function W0(e){return typeof e!="number"?EM(e):{top:e,right:e,bottom:e,left:e}}function bs(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}}/*!
169
+ */var Eg;function gO(){return Eg||(Eg=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=E,n=h0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;qc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,b=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(b,S))return C;var R=p(S);return f!==void 0&&f(C,R)?(b=S,C):(b=S,T=R)}var y=!1,b,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 h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),qc}var Cg;function vO(){return Cg||(Cg=1,process.env.NODE_ENV==="production"?Va.exports=mO():Va.exports=gO()),Va.exports}vO();var Bo=function(){return Bo=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},Bo.apply(this,arguments)};function $i(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 m0(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))}var ho=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},yO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},xO=function(e){return Object.entries(e)},g0=function(e){return e instanceof Promise},v0=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)},Bo(Bo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},bO=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,m0([],$i(a),!1)),u=function(d,p){return n(function(f){return v0(d,f,i,p)})};return g0(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))}},wO=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,m0([],$i(a),!1)),c=function(u){return n(function(d){return v0(u,d,i,o.current)})};return g0(l)?l.then(function(u){return c(u)}):c(l)}},Df=function(e,t,n){var r,o,i,a=$i(E.useState(function(){return e}),2),s=a[0],l=a[1],c=ho(s),u=ho((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=ho(t),p=ho((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=ho((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=yO(s),h=ho(g),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var T=v.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var y=$i(E.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return xO(w).reduce(function(S,C){var R,I=$i(C,2),A=I[0],O=I[1];return Bo(Bo({},S),(R={},R[A]=n!=null&&n.debug?bO(A,O,l,T,v,f.current):wO(A,O,l,T,v,f.current),R))},{})}),1),b=y[0];return[s,b,u.current]};const SO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function TO(e,t){return E.useRef(SO(e,t)).current}const pl={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>)`},jr=(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(jr(a,t,n,s))},[]),y0=(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]:y0(a,t,n,s)}},{}),kg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},xs=(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)},EO={default:e=>xs(e,{result:kg.default}),dark:e=>xs(e,{result:kg.dark})},Ei=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},CO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),jf=(e,t)=>{const n=jr(e.colors,Ei(t==null?void 0:t.colors)),r=jr(e.spacing,Ei(t==null?void 0:t.spacing)),o=jr(e.rounded,Ei(t==null?void 0:t.rounded)),i=jr(e.zIndex,Ei((t==null?void 0:t.zIndex)??CO)),a=e.custom?jr(e.custom,Ei(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},kO=(e,t)=>xs(jf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),RO=(e,t)=>jf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),PO=(e,t)=>xs(jf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),hl={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiSelectSelectedLabel:"Selected",multiSelectInnerPlaceholder:"Search..."},ml={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},li=E.createContext({tweaks:ml,parser:pl.hsla,map:hl,locale:void 0}),Nf=e=>{const t=E.useContext(li);if(e)return e;if(t)return t.locale||e};function AO(e,t){const n=E.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 _t=()=>{const e=E.useContext(li);return e?e.map:hl},on=(e,t=2)=>e.toString(16).padStart(t,"0"),ci=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${on(t,4)+on(n,3)}-${on(r[0])+on(r[1])}-${on(r[2])+on(r[3])}-${on(r[4])+on(r[5])}-${on(r[6])+on(r[7])+on(r[8])+on(r[9])}`},Rg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Pg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ff=(e,t)=>{const n=Rg(t,Pg.basic,e)||Rg(t,Pg.extend,e);return n===void 0||n===e?void 0:n},qr=()=>typeof window>"u",rd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),x0=(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},IO=e=>!e,Lf=()=>{},b0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},_O={type:"spring",bounce:.3,duration:.6},Ag=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),w0={enter:Ag(1),exit:Ag(-1),middle:{x:"0%",opacity:1}},Ig={exit:{visibility:"hidden"}},OO=e=>{const t=jn(Qb(e));return Xb({start:t,end:Eo(t,{days:41})})},S0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),MO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Qb(new Date(1970,o,1).setMonth(o)),a=S0(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Uc={ArrowLeft:(e,t)=>t==="days"?Pi(e,{days:1}):Pi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Eo(e,{days:1}):Eo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Pi(e,{weeks:1}):Pi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Eo(e,{weeks:1}):Eo(e,{years:1})},_g=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Ir=e=>e.getFullYear().toString().padStart(4,"0"),DO=(e,t,n)=>e===void 0||n===void 0?!1:YI(t,e)&&GI(t,n),jO=e=>{var n;const t=_t();return x.jsx(pt.tbody,{layout:!0,variants:w0,custom:e.direction,onKeyDown:e.onKeyDown,className:je((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=nt.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return x.jsx("tr",{className:i,children:r.map(c=>{var v,y,b,T,w,S,C,R,I,A,O,N,V,P,_,D,F,j;const u=c.toISOString(),d=e.rangeMode?u===((y=(v=e.range)==null?void 0:v.to)==null?void 0:y.toISOString())||u===((T=(b=e.range)==null?void 0:b.from)==null?void 0:T.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=U_(c)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,c))||!1,m=q_(c,e.stateDate),g=!m||f,h=e.rangeMode?DO((C=e.range)==null?void 0:C.from,c,(R=e.range)==null?void 0:R.to):!1;return x.jsxs("td",{align:"center",className:je("relative",nt.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(O=e.styles)==null?void 0:O.dayFrame),children:[x.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:je(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",nt.function((N=e.styles)==null?void 0:N.day)?(V=e.styles)==null?void 0:V.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((_=e.stateRange.from)==null?void 0:_.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.from)??t.calendarFromDate})}):null,d&&((F=e.stateRange.to)==null?void 0:F.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((j=e.labelRange)==null?void 0:j.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},NO=()=>zo(new Date),T0=({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,...p})=>{const f=E.useRef(ci()),m=_t(),g=Nf(o),h=E.useRef(null),{date:v,range:y}=p,b=v||new Date,T=E.useRef(null),[w,S]=Df({date:b,isAnimating:!1,year:Ir(b),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:MO(f.current,b,g),selectMode:l?"from":void 0,week:Xb({start:jn(b),end:QA(b)})},P=>({onChangeYear:_=>({year:_}),onExitComplete:()=>(_g(T.current||null,h,P.state().date,200),T.current=null,{isAnimating:!1}),date:_=>{const D=_(P.state().date);return{date:D,year:Ir(D)}},nextMonth:_=>{_&&(T.current=_.currentTarget);const D=P.state();if(D.isAnimating)return D;const F=Eo(D.date,{months:1});return{date:F,isAnimating:!0,direction:1,year:Ir(F)}},previousMonth:_=>{_&&(T.current=_.currentTarget);const D=P.state();if(D.isAnimating)return D;const F=Pi(D.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:Ir(F)}},onSelectDate:_=>{const D=P.state(),F=_.currentTarget.dataset.range==="true",j=_.currentTarget.dataset.date||"",z=new Date(j);return{date:z,year:Ir(z),selectMode:D.selectMode===void 0?void 0:D.selectMode==="from"?"to":"from",range:F?{from:D.selectMode==="from"?z:D.range.from,to:D.selectMode==="to"?z:D.range.to}:D.range}},onChangeMonth:_=>{const D=_.target.value,j=Array.from(_.target.options).find(M=>M.value===D),z=P.state();if(j){const M=j.dataset.index||"",$=new Date(P.state().date);return $.setMonth(+M),{...z,date:$,year:Ir($)}}return z},onKeyDown:_=>{const D=_.key,F=P.state();if(D in Uc){(D==="ArrowUp"||D==="ArrowDown")&&_.preventDefault();const j=P.state().date,z=nt.keyof(Uc,D)?Uc[D](j,_.shiftKey?"month":"days"):null;if(z!==null)return _g(_.target,h,z),{...F,date:z,year:Ir(z)}}return P.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(P,_,D)=>{var j,z;return(D.method==="onChangeMonth"||D.method==="previousMonth"||D.method==="nextMonth")&&((z=(j=D.props).onChangeMonth)==null||z.call(j,P.date)),P},(P,_,D)=>{var j,z;return D.method==="onChangeYear"&&((z=(j=D.props).onChangeYear)==null||z.call(j,P.date)),P},(P,_,D)=>{const F=D.method==="onSelectDate"||D.method==="setToday"||D.method==="onKeyDown";return l&&F&&t?(c==null||c(P.range),P):(F&&t&&(c==null||c(P.date)),P)}]}),C=OO(w.date),R=x0(C,7),I=w.date.toISOString(),A=S0(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const O=TO(P=>S.date(_=>G_(new Date(_),+P)),1200),N=P=>{const _=P.currentTarget.value;S.onChangeYear(_),s==null||s(new Date(_)),O(_)},V=AO((P,_)=>(P.preventDefault(),_==="right"?S.previousMonth():S.nextMonth()),10);return x.jsx(aE,{transition:_O,children:x.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:je("relative overflow-hidden",nt.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(vr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:S.onExitComplete,children:x.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Ig,onClick:S.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(pA,{className:"h-4 w-4"})}),x.jsx(pt.span,{layout:!0,variants:w0,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{value:A,onChange:S.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),x.jsx(p0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:N,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Ig,onClick:S.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(Pf,{className:"h-4 w-4"})}),x.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%)"}})]}),x.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:w.week.map(P=>x.jsx("th",{role:"columnheader",className:je("py-2 text-sm font-medium capitalize",nt.function(u==null?void 0:u.weekDay)?u.weekDay(P):u==null?void 0:u.weekDay),children:P.toLocaleDateString(g,{weekday:"short"})},P.toString()))})}),x.jsx(jO,{zip:R,range:y,styles:u,date:v||null,dispatch:S,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:S.onKeyDown})]})]},A)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{type:"button",onClick:()=>S.date(NO),className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},Vf=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>x.jsxs(cn,{...s,as:r,"data-componen":"card",className:je("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{className:je("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,x.jsx("div",{className:je("min-w-full px-4 lg:px-8",a),children:e})]});Vf.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return x.jsxs(i,{...o,className:je("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[x.jsx(a,{className:"font-semibold",children:o.title}),r?x.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const E0=e=>{const t=e.Icon??Wb,n=_t();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Og(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function C0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Og(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():Og(e[o],null)}}}}function Ur(...e){return k.useCallback(C0(...e),e)}function k0(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return x.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;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=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,FO(o,...t)]}function FO(...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 k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ho=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(VO);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return x.jsx(od,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return x.jsx(od,{...r,ref:t,children:n})});Ho.displayName="Slot";var od=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=zO(n),i=$O(r,n.props);return n.type!==k.Fragment&&(i.ref=t?C0(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});od.displayName="SlotClone";var LO=({children:e})=>x.jsx(x.Fragment,{children:e});function VO(e){return k.isValidElement(e)&&e.type===LO}function $O(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function zO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function BO(e){const t=e+"CollectionProvider",[n,r]=k0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=E.useRef(null),v=E.useRef(new Map).current;return x.jsx(o,{scope:m,itemMap:v,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,m)=>{const{scope:g,children:h}=f,v=i(s,g),y=Ur(m,v.collectionRef);return x.jsx(Ho,{ref:y,children:h})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,m)=>{const{scope:g,children:h,...v}=f,y=E.useRef(null),b=Ur(m,y),T=i(c,g);return E.useEffect(()=>(T.itemMap.set(y,{ref:y,...v}),()=>void T.itemMap.delete(y))),x.jsx(Ho,{[u]:"",ref:b,children:h})});d.displayName=c;function p(f){const m=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((T,w)=>v.indexOf(T.ref.current)-v.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var HO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vn=HO.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ho:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function R0(e,t){e&&Xs.flushSync(()=>e.dispatchEvent(t))}function Un(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function WO(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var qO="DismissableLayer",id="dismissableLayer.update",UO="dismissableLayer.pointerDownOutside",YO="dismissableLayer.focusOutside",Mg,P0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),A0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(P0),[u,d]=k.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=Ur(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),y=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=KO(C=>{const R=C.target,I=[...c.branches].some(A=>A.contains(R));!T||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),S=ZO(C=>{const R=C.target;[...c.branches].some(A=>A.contains(R))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return WO(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Mg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Dg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Mg)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Dg())},[u,c]),k.useEffect(()=>{const C=()=>f({});return document.addEventListener(id,C),()=>document.removeEventListener(id,C)},[]),x.jsx(Vn.div,{...l,ref:m,style:{pointerEvents:b?T?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,w.onPointerDownCapture)})});A0.displayName=qO;var GO="DismissableLayerBranch",I0=k.forwardRef((e,t)=>{const n=k.useContext(P0),r=k.useRef(null),o=Ur(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(Vn.div,{...e,ref:o})});I0.displayName=GO;function KO(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){_0(UO,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 ZO(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&_0(YO,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 Dg(){const e=new CustomEvent(id);document.dispatchEvent(e)}function _0(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?R0(o,i):o.dispatchEvent(i)}var XO=A0,QO=I0,bs=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},JO="Portal",O0=k.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=k.useState(!1);bs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ha.createPortal(x.jsx(Vn.div,{...r,ref:t}),a):null});O0.displayName=JO;function eM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var M0=e=>{const{present:t,children:n}=e,r=tM(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=Ur(r.ref,nM(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};M0.displayName="Presence";function tM(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=eM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=za(r.current);i.current=s==="mounted"?c:"none"},[s]),bs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=za(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),bs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=za(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=za(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:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function za(e){return(e==null?void 0:e.animationName)||"none"}function nM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function rM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=oM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Un(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function oM({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Un(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var iM="VisuallyHidden",$f=k.forwardRef((e,t)=>x.jsx(Vn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));$f.displayName=iM;var zf="ToastProvider",[Bf,aM,sM]=BO("Toast"),[D0,Y$]=k0("Toast",[sM]),[lM,gl]=D0(zf),j0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),p=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${zf}\`. Expected non-empty \`string\`.`),x.jsx(Bf.Provider,{scope:t,children:x.jsx(lM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:k.useCallback(()=>u(f=>f+1),[]),onToastRemove:k.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};j0.displayName=zf;var N0="ToastViewport",cM=["F8"],ad="toast.viewportPause",sd="toast.viewportResume",F0=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=cM,label:o="Notifications ({hotkey})",...i}=e,a=gl(N0,n),s=aM(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=Ur(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;k.useEffect(()=>{const h=v=>{var b;r.length!==0&&r.every(T=>v[T]||v.code===T)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),k.useEffect(()=>{const h=l.current,v=d.current;if(m&&h&&v){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(ad);v.dispatchEvent(S),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(sd);v.dispatchEvent(S),a.isClosePausedRef.current=!1}},T=S=>{!h.contains(S.relatedTarget)&&b()},w=()=>{h.contains(document.activeElement)||b()};return h.addEventListener("focusin",y),h.addEventListener("focusout",T),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",T),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[m,a.isClosePausedRef]);const g=k.useCallback(({tabbingDirection:h})=>{const y=s().map(b=>{const T=b.ref.current,w=[T,...TM(T)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?y.reverse():y).flat()},[s]);return k.useEffect(()=>{const h=d.current;if(h){const v=y=>{var w,S,C;const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const R=document.activeElement,I=y.shiftKey;if(y.target===h&&I){(w=c.current)==null||w.focus();return}const N=g({tabbingDirection:I?"backwards":"forwards"}),V=N.findIndex(P=>P===R);Yc(N.slice(V+1))?y.preventDefault():I?(S=c.current)==null||S.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),x.jsxs(QO,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&x.jsx(ld,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});Yc(h)}}),x.jsx(Bf.Slot,{scope:n,children:x.jsx(Vn.ol,{tabIndex:-1,...i,ref:p})}),m&&x.jsx(ld,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});Yc(h)}})]})});F0.displayName=N0;var L0="ToastFocusProxy",ld=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=gl(L0,n);return x.jsx($f,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});ld.displayName=L0;var vl="Toast",uM="toast.swipeStart",dM="toast.swipeMove",fM="toast.swipeCancel",pM="toast.swipeEnd",V0=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=rM({prop:r,defaultProp:o,onChange:i});return x.jsx(M0,{present:n||s,children:x.jsx(gM,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Un(e.onPause),onResume:Un(e.onResume),onSwipeStart:Qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qt(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:Qt(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:Qt(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)})})})});V0.displayName=vl;var[hM,mM]=D0(vl,{onClose(){}}),gM=k.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,...m}=e,g=gl(vl,n),[h,v]=k.useState(null),y=Ur(t,P=>v(P)),b=k.useRef(null),T=k.useRef(null),w=o||g.duration,S=k.useRef(0),C=k.useRef(w),R=k.useRef(0),{onToastAdd:I,onToastRemove:A}=g,O=Un(()=>{var _;(h==null?void 0:h.contains(document.activeElement))&&((_=g.viewport)==null||_.focus()),a()}),N=k.useCallback(P=>{!P||P===1/0||(window.clearTimeout(R.current),S.current=new Date().getTime(),R.current=window.setTimeout(O,P))},[O]);k.useEffect(()=>{const P=g.viewport;if(P){const _=()=>{N(C.current),c==null||c()},D=()=>{const F=new Date().getTime()-S.current;C.current=C.current-F,window.clearTimeout(R.current),l==null||l()};return P.addEventListener(ad,D),P.addEventListener(sd,_),()=>{P.removeEventListener(ad,D),P.removeEventListener(sd,_)}}},[g.viewport,w,l,c,N]),k.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),k.useEffect(()=>(I(),()=>A()),[I,A]);const V=k.useMemo(()=>h?q0(h):null,[h]);return g.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(vM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx(hM,{scope:n,onClose:O,children:Xs.createPortal(x.jsx(Bf.ItemSlot,{scope:n,children:x.jsx(XO,{asChild:!0,onEscapeKeyDown:Qt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(Vn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qt(e.onKeyDown,P=>{P.key==="Escape"&&(s==null||s(P.nativeEvent),P.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:Qt(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:Qt(e.onPointerMove,P=>{if(!b.current)return;const _=P.clientX-b.current.x,D=P.clientY-b.current.y,F=!!T.current,j=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=j?z(0,_):0,$=j?0:z(0,D),J=P.pointerType==="touch"?10:2,te={x:M,y:$},ee={originalEvent:P,delta:te};F?(T.current=te,Ba(dM,d,ee,{discrete:!1})):jg(te,g.swipeDirection,J)?(T.current=te,Ba(uM,u,ee,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(_)>J||Math.abs(D)>J)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,P=>{const _=T.current,D=P.target;if(D.hasPointerCapture(P.pointerId)&&D.releasePointerCapture(P.pointerId),T.current=null,b.current=null,_){const F=P.currentTarget,j={originalEvent:P,delta:_};jg(_,g.swipeDirection,g.swipeThreshold)?Ba(pM,f,j,{discrete:!0}):Ba(fM,p,j,{discrete:!0}),F.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),vM=e=>{const{__scopeToast:t,children:n,...r}=e,o=gl(vl,t),[i,a]=k.useState(!1),[s,l]=k.useState(!1);return wM(()=>a(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:x.jsx(O0,{asChild:!0,children:x.jsx($f,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},yM="ToastTitle",$0=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});$0.displayName=yM;var xM="ToastDescription",z0=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});z0.displayName=xM;var B0="ToastAction",bM=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(W0,{altText:n,asChild:!0,children:x.jsx(Hf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${B0}\`. Expected non-empty \`string\`.`),null)});bM.displayName=B0;var H0="ToastClose",Hf=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=mM(H0,n);return x.jsx(W0,{asChild:!0,children:x.jsx(Vn.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});Hf.displayName=H0;var W0=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(Vn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function q0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),SM(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(...q0(r))}}),t}function Ba(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?R0(o,i):o.dispatchEvent(i)}var jg=(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 wM(e=()=>{}){const t=Un(e);bs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function SM(e){return e.nodeType===e.ELEMENT_NODE}function TM(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 Yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var EM=j0,CM=F0,kM=V0,RM=$0,PM=z0,AM=Hf;const IM=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.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},_M=ti("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),U0=E.createContext(()=>{throw new Error("Not implemented")}),OM=()=>E.useContext(U0),Ng={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]}},MM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=_M({theme:t.theme||"default"});return x.jsx(kM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(pt.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:Ng[t.reversedIndex]||Ng.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:a,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(RM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(PM,{className:"select-text truncate",children:t.text})]}),r?x.jsx(AM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(ul,{className:"h-5 w-5"})}):null]})})})});function DM({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=IM(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return x.jsxs(EM,{duration:n,swipeThreshold:150,children:[x.jsx(U0.Provider,{value:l,children:e}),x.jsx(vr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(MM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(CM,{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 jM=e=>x.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[x.jsxs("header",{className:"flex items-start gap-4 p-6",children:[x.jsx("div",{className:je("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Y0=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},G0=E.createContext(""),NM=e=>{const[t,n]=Y0(e.active),r=Lo(0),o=Lo(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},d=()=>{const m=c.querySelector("li[data-active=true]");return void u(m)};window.addEventListener("resize",d);let p=c.querySelector("li[data-active=true]");const f=window.location.hash.replace(/^#/,"");if(e.active===""&&f!==""&&(p=c.querySelector(`li[data-id="${f}"]`),n(f)),p===null){p=c.querySelector("li[data-id]");const m=p.getAttribute("data-id")||"";n(m)}return u(p),()=>window.removeEventListener("resize",d)},[]);const a=Mo(e.onChange);E.useEffect(()=>{a.current&&a.current(t)},[a,t]);const s=E.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return x.jsx(G0.Provider,{value:t,children:x.jsx(Vf,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:s.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:x.jsx(cn,{onClick:l,"data-id":u.id,"aria-current":"page",as:e.useHash?"a":"button",href:e.useHash?`#${u.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:u.title})},`tab-header-${u.id}`)})})})}),children:e.children})})},FM=()=>E.useContext(G0),LM=e=>{const t=FM();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})},yl=e=>x.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[x.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),x.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});yl.Icon=function(t){return x.jsx("header",{...t,className:je("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};yl.Body=function(t){return x.jsx(cn,{...t,className:je("min-w-0 flex-1",t.className),children:t.children})};yl.Right=function(t){return x.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:x.jsx(cn,{...t,type:"button"})})};const VM=e=>x.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function xl(){return typeof window<"u"}function xr(e){return K0(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zn(e){var t;return(t=(K0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function K0(e){return xl()?e instanceof Node||e instanceof Bt(e).Node:!1}function Qe(e){return xl()?e instanceof Element||e instanceof Bt(e).Element:!1}function bt(e){return xl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function cd(e){return!xl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function ba(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $M(e){return["table","td","th"].includes(xr(e))}function bl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Wf(e){const t=qf(),n=Qe(e)?nn(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function zM(e){let t=Yn(e);for(;bt(t)&&!fr(t);){if(Wf(t))return t;if(bl(t))return null;t=Yn(t)}return null}function qf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fr(e){return["html","body","#document"].includes(xr(e))}function nn(e){return Bt(e).getComputedStyle(e)}function wl(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(xr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cd(e)&&e.host||Zn(e);return cd(t)?t.host:t}function Z0(e){const t=Yn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:bt(t)&&ba(t)?t:Z0(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Z0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=ud(a);return t.concat(a,a.visualViewport||[],ba(o)?o:[],s&&n?cr(s):[])}return t.concat(o,cr(o,[],n))}function ud(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function gt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&cd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Uf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function X0(){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 Q0(e){return e.mozInputSource===0&&e.isTrusted?!0:dd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Yf(e){return BM()?!1:!dd()&&e.width===0&&e.height===0||dd()&&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 Gf(){return/apple/i.test(navigator.vendor)}function dd(){const e=/android/i;return e.test(Uf())||e.test(X0())}function J0(){return Uf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function BM(){return X0().includes("jsdom/")}function Wo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function HM(e){return"nativeEvent"in e}function WM(e){return e.matches("html,body")}function It(e){return(e==null?void 0:e.ownerDocument)||document}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 Pn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const qM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Kf(e){return bt(e)&&e.matches(qM)}function Dt(e){e.preventDefault(),e.stopPropagation()}function ew(e){return e?e.getAttribute("role")==="combobox"&&Kf(e):!1}const An=Math.min,Xt=Math.max,ws=Math.round,Co=Math.floor,pr=e=>({x:e,y:e}),UM={left:"right",right:"left",bottom:"top",top:"bottom"},YM={start:"end",end:"start"};function fd(e,t,n){return Xt(e,An(t,n))}function ui(e,t){return typeof e=="function"?e(t):e}function hr(e){return e.split("-")[0]}function di(e){return e.split("-")[1]}function tw(e){return e==="x"?"y":"x"}function Zf(e){return e==="y"?"height":"width"}function Yr(e){return["top","bottom"].includes(hr(e))?"y":"x"}function Xf(e){return tw(Yr(e))}function GM(e,t,n){n===void 0&&(n=!1);const r=di(e),o=Xf(e),i=Zf(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ss(a)),[a,Ss(a)]}function KM(e){const t=Ss(e);return[pd(e),t,pd(t)]}function pd(e){return e.replace(/start|end/g,t=>YM[t])}function ZM(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function XM(e,t,n,r){const o=di(e);let i=ZM(hr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(pd)))),i}function Ss(e){return e.replace(/left|right|bottom|top/g,t=>UM[t])}function QM(e){return{top:0,right:0,bottom:0,left:0,...e}}function nw(e){return typeof e!="number"?QM(e):{top:e,right:e,bottom:e,left:e}}function Ts(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}}/*!
170
170
  * tabbable 6.2.0
171
171
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
172
- */var CM=["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])"],ws=CM.join(","),q0=typeof Element>"u",Ho=q0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ts=!q0&&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==null?void 0:e.ownerDocument},Ss=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},kM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},RM=function(t,n,r){if(Ss(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ws));return n&&Ho.call(t,ws)&&o.unshift(t),o=o.filter(r),o},PM=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ss(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=Ho.call(a,ws);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ss(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},U0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},G0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||kM(t))&&!U0(t)?0:t.tabIndex},AM=function(t,n){var r=G0(t);return r<0&&n&&!U0(t)?0:r},IM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Y0=function(t){return t.tagName==="INPUT"},OM=function(t){return Y0(t)&&t.type==="hidden"},_M=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},MM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},DM=function(t){if(!t.name)return!0;var n=t.form||Ts(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=MM(o,t.form);return!i||i===t},jM=function(t){return Y0(t)&&t.type==="radio"},NM=function(t){return jM(t)&&!DM(t)},FM=function(t){var n,r=t&&Ts(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=Ts(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},Cg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},LM=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Ho.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Ho.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=Ts(t);if(l&&!l.shadowRoot&&o(l)===!0)return Cg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(FM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Cg(t);return!1},VM=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 Ho.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},zM=function(t,n){return!(n.disabled||Ss(n)||OM(n)||LM(n,t)||_M(n)||VM(n))},ld=function(t,n){return!(NM(n)||G0(n)<0||!zM(t,n))},$M=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},BM=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=AM(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(IM).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Qi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=PM([t],n.includeContainer,{filter:ld.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:$M}):r=RM(t,n.includeContainer,ld.bind(null,n)),BM(r)},HM=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ho.call(t,ws)===!1?!1:ld(n,t)};function kg(e,t,n){let{reference:r,floating:o}=e;const i=Gr(t),a=$f(t),s=zf(a),l=hr(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(li(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const WM=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}=kg(c,r,l),p=r,f={},h=0;for(let g=0;g<s.length;g++){const{name:m,fn:y}=s[g],{x:v,y:x,data:S,reset:T}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=v??u,d=x??d,f={...f,[m]:{...f[m],...S}},T&&h<=50&&(h++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(c=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=kg(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Bf(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}=si(t,e),h=W0(f),m=s[p?d==="floating"?"reference":"floating":d],y=bs(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})),v=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)),S=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=bs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:x,strategy:l}):v);return{top:(y.top-T.top+h.top)/S.y,bottom:(T.bottom-y.bottom+h.bottom)/S.y,left:(y.left-T.left+h.left)/S.x,right:(T.right-y.right+h.right)/S.x}}const qM=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}=si(e,t)||{};if(c==null)return{};const d=W0(u),p={x:n,y:r},f=$f(o),h=zf(f),g=await a.getDimensions(c),m=f==="y",y=m?"top":"left",v=m?"bottom":"right",x=m?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[f]-p[f]-i.floating[h],T=p[f]-i.reference[f],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=w?w[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(w)))&&(C=s.floating[x]||i.floating[h]);const k=S/2-T/2,I=C/2-g[h]/2-1,P=An(d[y],I),D=An(d[v],I),N=P,V=C-g[h]-D,R=C/2-g[h]/2+k,O=ad(N,R,V),M=!l.arrow&&li(o)!=null&&R!==O&&i.reference[h]/2-(R<N?P:D)-g[h]/2<0,L=M?R<N?R-N:R-V:0;return{[f]:p[f]+L,data:{[f]:O,centerOffset:R-O-L,...M&&{alignmentOffset:L}},reset:M}}}),UM=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:h="none",flipAlignment:g=!0,...m}=si(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=hr(o),v=Gr(s),x=hr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(x||!g?[xs(s)]:wM(s)),w=h!=="none";!p&&w&&T.push(...SM(s,g,h,S));const C=[s,...T],k=await Bf(t,m),I=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[y]),d){const R=bM(o,a,S);I.push(k[R[0]],k[R[1]])}if(P=[...P,{placement:o,overflows:I}],!I.every(R=>R<=0)){var D,N;const R=(((D=i.flip)==null?void 0:D.index)||0)+1,O=C[R];if(O)return{data:{index:R,overflows:P},reset:{placement:O}};let M=(N=P.filter(L=>L.overflows[0]<=0).sort((L,j)=>L.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!M)switch(f){case"bestFit":{var V;const L=(V=P.filter(j=>{if(w){const $=Gr(j.placement);return $===v||$==="y"}return!0}).map(j=>[j.placement,j.overflows.filter($=>$>0).reduce(($,_)=>$+_,0)]).sort((j,$)=>j[1]-$[1])[0])==null?void 0:V[0];L&&(M=L);break}case"initialPlacement":M=s;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function GM(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=hr(n),s=li(n),l=Gr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=si(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const YM=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 GM(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}}}}},KM=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:y,y:v}=m;return{x:y,y:v}}},...l}=si(e,t),c={x:n,y:r},u=await Bf(t,l),d=Gr(hr(o)),p=H0(d);let f=c[p],h=c[d];if(i){const m=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=f+u[m],x=f-u[y];f=ad(v,f,x)}if(a){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=h+u[m],x=h-u[y];h=ad(v,h,x)}const g=s.fn({...t,[p]:f,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},ZM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=si(e,t),l=await Bf(t,s),c=hr(n),u=li(n),d=Gr(n)==="y",{width:p,height:f}=r.floating;let h,g;c==="top"||c==="bottom"?(h=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,h=u==="end"?"top":"bottom");const m=f-l.top-l.bottom,y=p-l.left-l.right,v=An(f-l[h],m),x=An(p-l[g],y),S=!t.middlewareData.shift;let T=v,w=x;if(d?w=u||S?An(x,y):y:T=u||S?An(v,m):m,S&&!u){const k=Xt(l.left,0),I=Xt(l.right,0),P=Xt(l.top,0),D=Xt(l.bottom,0);d?w=p-2*(k!==0||I!==0?k+I:Xt(l.left,l.right)):T=f-2*(P!==0||D!==0?P+D:Xt(l.top,l.bottom))}await a({...t,availableWidth:w,availableHeight:T});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function K0(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=bt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ys(n)!==i||ys(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Hf(e){return Qe(e)?e:e.contextElement}function Co(e){const t=Hf(e);if(!bt(t))return pr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=K0(t);let a=(i?ys(n.width):n.width)/r,s=(i?ys(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const XM=pr(0);function Z0(e){const t=Bt(e);return!jf()||!t.visualViewport?XM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function QM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Hf(e);let a=pr(1);t&&(r?Qe(r)&&(a=Co(r)):a=Co(e));const s=QM(i,n,r)?Z0(i):pr(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=Bt(i),f=r&&Qe(r)?Bt(r):r;let h=p,g=od(h);for(;g&&r&&f!==h;){const m=Co(g),y=g.getBoundingClientRect(),v=nn(g),x=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,S=y.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=S,h=Bt(g),g=od(h)}}return bs({width:u,height:d,x:l,y:c})}function JM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Zn(r),s=t?gl(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=pr(1);const u=pr(0),d=bt(r);if((d||!d&&!i)&&((xr(r)!=="body"||va(a))&&(l=vl(r)),bt(r))){const p=Yr(r);c=Co(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function eD(e){return Array.from(e.getClientRects())}function X0(e){return Yr(Zn(e)).left+vl(e).scrollLeft}function tD(e){const t=Zn(e),n=vl(e),r=e.ownerDocument.body,o=Xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+X0(e);const s=-n.scrollTop;return nn(r).direction==="rtl"&&(a+=Xt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function nD(e,t){const n=Bt(e),r=Zn(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=jf();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function rD(e,t){const n=Yr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=bt(e)?Co(e):pr(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 Rg(e,t,n){let r;if(t==="viewport")r=nD(e,n);else if(t==="document")r=tD(Zn(e));else if(Qe(t))r=rD(t,n);else{const o=Z0(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return bs(r)}function Q0(e,t){const n=Gn(e);return n===t||!Qe(n)||fr(n)?!1:nn(n).position==="fixed"||Q0(n,t)}function oD(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(s=>Qe(s)&&xr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Gn(e):e;for(;Qe(a)&&!fr(a);){const s=nn(a),l=Df(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||va(a)&&!l&&Q0(e,a))?r=r.filter(u=>u!==a):o=s,a=Gn(a)}return t.set(e,r),r}function iD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?gl(t)?[]:oD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Rg(t,u,o);return c.top=Xt(d.top,c.top),c.right=An(d.right,c.right),c.bottom=An(d.bottom,c.bottom),c.left=Xt(d.left,c.left),c},Rg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function aD(e){const{width:t,height:n}=K0(e);return{width:t,height:n}}function sD(e,t,n){const r=bt(t),o=Zn(t),i=n==="fixed",a=Yr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=pr(0);if(r||!r&&!i)if((xr(t)!=="body"||va(o))&&(s=vl(t)),r){const d=Yr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=X0(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function Hc(e){return nn(e).position==="static"}function Pg(e,t){return!bt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function J0(e,t){const n=Bt(e);if(gl(e))return n;if(!bt(e)){let o=Gn(e);for(;o&&!fr(o);){if(Qe(o)&&!Hc(o))return o;o=Gn(o)}return n}let r=Pg(e,t);for(;r&&fM(r)&&Hc(r);)r=Pg(r,t);return r&&fr(r)&&Hc(r)&&!Df(r)?n:r||pM(e)||n}const lD=async function(e){const t=this.getOffsetParent||J0,n=this.getDimensions,r=await n(e.floating);return{reference:sD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function cD(e){return nn(e).direction==="rtl"}const uD={convertOffsetParentRelativeRectToViewportRelativeRect:JM,getDocumentElement:Zn,getClippingRect:iD,getOffsetParent:J0,getElementRects:lD,getClientRects:eD,getDimensions:aD,getScale:Co,isElement:Qe,isRTL:cD};function dD(e,t){let n=null,r;const o=Zn(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{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=Eo(u),h=Eo(o.clientWidth-(c+d)),g=Eo(o.clientHeight-(u+p)),m=Eo(c),v={rootMargin:-f+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Xt(0,An(1,l))||1};let x=!0;function S(T){const w=T[0].intersectionRatio;if(w!==l){if(!x)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return a(!0),i}function ya(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=Hf(e),u=o||i?[...c?cr(c):[],...cr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?dD(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[v]=y;v&&v.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 h,g=l?Yr(e):null;l&&m();function m(){const y=Yr(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(m)}return n(),()=>{var y;u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const fD=YM,pD=KM,hD=UM,mD=ZM,Ag=qM,gD=(e,t,n)=>{const r=new Map,o={platform:uD,...n},i={...o.platform,_c:r};return WM(e,t,{...o,platform:i})};var ts=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Es(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(!Es(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)&&!Es(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ew(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ig(e,t){const n=ew(e);return Math.round(t*n)/n}function Wc(e){const t=A.useRef(e);return ts(()=>{t.current=e}),t}function vD(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]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=A.useState(r);Es(p,r)||f(r);const[h,g]=A.useState(null),[m,y]=A.useState(null),v=A.useCallback(j=>{j!==w.current&&(w.current=j,g(j))},[]),x=A.useCallback(j=>{j!==C.current&&(C.current=j,y(j))},[]),S=i||h,T=a||m,w=A.useRef(null),C=A.useRef(null),k=A.useRef(u),I=l!=null,P=Wc(l),D=Wc(o),N=Wc(c),V=A.useCallback(()=>{if(!w.current||!C.current)return;const j={placement:t,strategy:n,middleware:p};D.current&&(j.platform=D.current),gD(w.current,C.current,j).then($=>{const _={...$,isPositioned:N.current!==!1};R.current&&!Es(k.current,_)&&(k.current=_,Ys.flushSync(()=>{d(_)}))})},[p,t,n,D,N]);ts(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[c]);const R=A.useRef(!1);ts(()=>(R.current=!0,()=>{R.current=!1}),[]),ts(()=>{if(S&&(w.current=S),T&&(C.current=T),S&&T){if(P.current)return P.current(S,T,V);V()}},[S,T,V,P,I]);const O=A.useMemo(()=>({reference:w,floating:C,setReference:v,setFloating:x}),[v,x]),M=A.useMemo(()=>({reference:S,floating:T}),[S,T]),L=A.useMemo(()=>{const j={position:n,left:0,top:0};if(!M.floating)return j;const $=Ig(M.floating,u.x),_=Ig(M.floating,u.y);return s?{...j,transform:"translate("+$+"px, "+_+"px)",...ew(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:_}},[n,s,M.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:V,refs:O,elements:M,floatingStyles:L}),[u,V,O,M,L])}const yD=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?Ag({element:r.current,padding:o}).fn(n):{}:r?Ag({element:r,padding:o}).fn(n):{}}}},xa=(e,t)=>({...fD(e),options:[e,t]}),Wf=(e,t)=>({...pD(e),options:[e,t]}),qf=(e,t)=>({...hD(e),options:[e,t]}),tw=(e,t)=>({...mD(e),options:[e,t]}),nw=(e,t)=>({...yD(e),options:[e,t]});function cd(e){return A.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const rw={...A},xD=rw.useInsertionEffect,bD=xD||(e=>e());function kt(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return bD(()=>{t.current=e}),A.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)},[])}const Uf="ArrowUp",ba="ArrowDown",Wo="ArrowLeft",ci="ArrowRight";function za(e,t,n){return Math.floor(e/t)!==n}function Fi(e,t){return t<0||t>=e.current.length}function qc(e,t){return Ft(e,{disabledIndices:t})}function Og(e,t){return Ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&ns(a,s,o));return s}function wD(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Uf){if(u&&Dt(n),c===-1)d=l;else if(d=Ft(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,h=l-(f-p);f===p?d=l:d=f>p?h:h-i}Fi(e,d)&&(d=c)}if(n.key===ba&&(u&&Dt(n),c===-1?d=s:(d=Ft(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Ft(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Fi(e,d)&&(d=c)),r==="both"){const p=Eo(c/i);n.key===ci&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&za(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),za(d,i,p)&&(d=c)),n.key===Wo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&za(d,i,p)&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),za(d,i,p)&&(d=c));const f=Eo(l/i)===p;Fi(e,d)&&(o&&f?d=n.key===Wo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function TD(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 SD(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 ED(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ns(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let _g=0;function ir(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(_g);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():_g=requestAnimationFrame(i)}var Be=typeof document<"u"?E.useLayoutEffect:E.useEffect;function CD(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function kD(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const ow=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function RD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Map),a=A.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=A.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Be(()=>{const l=new Map(o);Array.from(l.keys()).sort(CD).forEach((u,d)=>{l.set(u,d)}),kD(o,l)||i(l)},[o]),A.createElement(ow.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function iw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(ow),[s,l]=A.useState(null),c=A.useRef(null),u=A.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==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return Be(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Be(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qo.apply(this,arguments)}let Mg=!1,PD=0;const Dg=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+PD++;function AD(){const[e,t]=A.useState(()=>Mg?Dg():void 0);return Be(()=>{e==null&&t(Dg())},[]),A.useEffect(()=>{Mg=!0},[]),e}const ID=rw.useId,ui=ID||AD;let Ji;process.env.NODE_ENV!=="production"&&(Ji=new Set);function rs(){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=Ji)!=null&&e.has(o))){var i;(i=Ji)==null||i.add(o),console.warn(o)}}function OD(){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=Ji)!=null&&e.has(o))){var i;(i=Ji)==null||i.add(o),console.error(o)}}const aw=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...h}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||rs("The `ref` prop is required for `FloatingArrow`."));const m=ui(),[y,v]=A.useState(!1);if(Be(()=>{if(!o)return;nn(o).direction==="rtl"&&v(!0)},[o]),!o)return null;const x=c*2,S=x/2,T=a/2*(l/-8+1),w=s/2*l/4,[C,k]=r.split("-"),I=!!p,P=C==="top"||C==="bottom",D=u&&k==="end"?"bottom":"top";let N=u&&k==="end"?"right":"left";u&&y&&(N=k==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",R=(i==null?void 0:i.y)!=null?u||i.y:"",O=p||"M0,0"+(" H"+a)+(" L"+(a-T)+","+(s-w))+(" Q"+a/2+","+s+" "+T+","+(s-w))+" Z",M={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return A.createElement("svg",qo({},g,{"aria-hidden":!0,ref:n,width:I?a:a+x,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:V,[D]:R,[C]:P||I?"100%":"calc(100% - "+x/2+"px)",transform:""+M+(f??""),...h}}),x>0&&A.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:O}),A.createElement("path",{stroke:x&&!p?g.fill:"none",d:O}),A.createElement("clipPath",{id:m},A.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+x,height:a})))});function sw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const lw=A.createContext(null),cw=A.createContext(null),br=()=>{var e;return((e=A.useContext(lw))==null?void 0:e.id)||null},wr=()=>A.useContext(cw);function _D(e){const t=ui(),n=wr(),o=br();return Be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function MD(e){const{children:t,id:n}=e,r=br();return A.createElement(lw.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function DD(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(a=>{n.current=[...n.current,a]},[]),o=A.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=A.useState(()=>sw())[0];return A.createElement(cw.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function mr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return Be(()=>{t.current=e}),t}const jg=mr("safe-polygon");function Uc(e,t,n){return n&&!Bo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function uw(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=wr(),h=br(),g=jt(c),m=jt(l),y=jt(n),v=A.useRef(),x=A.useRef(-1),S=A.useRef(),T=A.useRef(-1),w=A.useRef(!0),C=A.useRef(!1),k=A.useRef(()=>{}),I=A.useCallback(()=>{var O;const M=(O=o.current.openEvent)==null?void 0:O.type;return(M==null?void 0:M.includes("mouse"))&&M!=="mousedown"},[o]);A.useEffect(()=>{if(!s)return;function O(M){let{open:L}=M;L||(clearTimeout(x.current),clearTimeout(T.current),w.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[s,i]),A.useEffect(()=>{if(!s||!g.current||!n)return;function O(L){I()&&r(!1,L,"hover")}const M=It(a.floating).documentElement;return M.addEventListener("mouseleave",O),()=>{M.removeEventListener("mouseleave",O)}},[a.floating,n,r,s,g,I]);const P=A.useCallback(function(O,M,L){M===void 0&&(M=!0),L===void 0&&(L="hover");const j=Uc(m.current,"close",v.current);j&&!S.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,O,L),j)):M&&(clearTimeout(x.current),r(!1,O,L))},[m,r]),D=kt(()=>{k.current(),S.current=void 0}),N=kt(()=>{if(C.current){const O=It(a.floating).body;O.style.pointerEvents="",O.removeAttribute(jg),C.current=!1}});A.useEffect(()=>{if(!s)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(_){if(clearTimeout(x.current),w.current=!1,u&&!Bo(v.current)||d>0&&!Uc(m.current,"open"))return;const z=Uc(m.current,"open",v.current);z?x.current=window.setTimeout(()=>{y.current||r(!0,_,"hover")},z):r(!0,_,"hover")}function L(_){if(O())return;k.current();const z=It(a.floating);if(clearTimeout(T.current),g.current&&o.current.floatingContext){n||clearTimeout(x.current),S.current=g.current({...o.current.floatingContext,tree:f,x:_.clientX,y:_.clientY,onClose(){N(),D(),P(_,!0,"safe-polygon")}});const te=S.current;z.addEventListener("mousemove",te),k.current=()=>{z.removeEventListener("mousemove",te)};return}(v.current==="touch"?!gt(a.floating,_.relatedTarget):!0)&&P(_)}function j(_){O()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:_.clientX,y:_.clientY,onClose(){N(),D(),P(_)}})(_))}if(Qe(a.domReference)){var $;const _=a.domReference;return n&&_.addEventListener("mouseleave",j),($=a.floating)==null||$.addEventListener("mouseleave",j),p&&_.addEventListener("mousemove",M,{once:!0}),_.addEventListener("mouseenter",M),_.addEventListener("mouseleave",L),()=>{var z;n&&_.removeEventListener("mouseleave",j),(z=a.floating)==null||z.removeEventListener("mouseleave",j),p&&_.removeEventListener("mousemove",M),_.removeEventListener("mouseenter",M),_.removeEventListener("mouseleave",L)}}},[a,s,e,u,d,p,P,D,N,r,n,y,f,m,g,o]),Be(()=>{var O;if(s&&n&&(O=g.current)!=null&&O.__options.blockPointerEvents&&I()){const L=It(a.floating).body;L.setAttribute(jg,""),L.style.pointerEvents="none",C.current=!0;const j=a.floating;if(Qe(a.domReference)&&j){var M;const $=a.domReference,_=f==null||(M=f.nodesRef.current.find(z=>z.id===h))==null||(M=M.context)==null?void 0:M.elements.floating;return _&&(_.style.pointerEvents=""),$.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{$.style.pointerEvents="",j.style.pointerEvents=""}}}},[s,n,h,a,f,g,I]),Be(()=>{n||(v.current=void 0,D(),N())},[n,D,N]),A.useEffect(()=>()=>{D(),clearTimeout(x.current),clearTimeout(T.current),N()},[s,a.domReference,D,N]);const V=A.useMemo(()=>{function O(M){v.current=M.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(M){const{nativeEvent:L}=M;function j(){!w.current&&!y.current&&r(!0,L,"hover")}u&&!Bo(v.current)||n||d===0||(clearTimeout(T.current),v.current==="touch"?j():T.current=window.setTimeout(j,d))}}},[u,r,n,y,d]),R=A.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(O){P(O.nativeEvent,!1)}}),[P]);return A.useMemo(()=>s?{reference:V,floating:R}:{},[s,V,R])}function jD(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==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Hr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function ND(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Hr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let ho=new WeakMap,$a=new WeakSet,Ba={},Gc=0;const FD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,dw=e=>e&&(e.host||dw(e.parentNode)),LD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=dw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function VD(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=LD(t,e),s=new Set,l=new Set(a),c=[];Ba[o]||(Ba[o]=new WeakMap);const u=Ba[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,h=>{if(xr(h)!=="script")if(s.has(h))p(h);else{const g=i?h.getAttribute(i):null,m=g!==null&&g!=="false",y=(ho.get(h)||0)+1,v=(u.get(h)||0)+1;ho.set(h,y),u.set(h,v),c.push(h),y===1&&m&&$a.add(h),v===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return Gc++,()=>{c.forEach(f=>{const h=(ho.get(f)||0)-1,g=(u.get(f)||0)-1;ho.set(f,h),u.set(f,g),h||(!$a.has(f)&&i&&f.removeAttribute(i),$a.delete(f)),g||f.removeAttribute(o)}),Gc--,Gc||(ho=new WeakMap,ho=new WeakMap,$a=new WeakSet,Ba={})}}function Ng(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=It(e[0]).body;return VD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Uo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function fw(e,t){const n=Qi(e,Uo());t==="prev"&&n.reverse();const r=n.indexOf(gn(It(e)));return n.slice(r+1)[0]}function pw(){return fw(document.body,"next")}function hw(){return fw(document.body,"prev")}function Li(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function zD(e){Qi(e,Uo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function $D(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 BD(e,t,n){const r=e.indexOf(t);function o(a){const s=mr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||gt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Gf={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};let HD;function Fg(e){e.key==="Tab"&&(e.target,clearTimeout(HD))}const Cs=A.forwardRef(function(t,n){const[r,o]=A.useState();Be(()=>(Lf()&&o("button"),document.addEventListener("keydown",Fg),()=>{document.removeEventListener("keydown",Fg)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[mr("focus-guard")]:"",style:Gf};return A.createElement("span",qo({},t,i))}),mw=A.createContext(null),Lg=mr("portal");function WD(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ui(),o=gw(),[i,a]=A.useState(null),s=A.useRef(null);return Be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),Be(()=>{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(Lg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Be(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Qe(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(Lg,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function to(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=WD({id:n,root:r}),[a,s]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&Li(h)&&(h.type==="focusin"?$D:zD)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),A.createElement(mw.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&A.createElement(Cs,{"data-type":"outside",ref:l,onFocus:f=>{if(Li(f,i)){var h;(h=u.current)==null||h.focus()}else{const g=hw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&A.createElement("span",{"aria-owns":i.id,style:Gf}),i&&Ys.createPortal(t,i),p&&i&&A.createElement(Cs,{"data-type":"outside",ref:c,onFocus:f=>{if(Li(f,i)){var h;(h=d.current)==null||h.focus()}else{const g=pw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const gw=()=>A.useContext(mw),qD=20;let Mr=[];function Yc(e){Mr=Mr.filter(n=>n.isConnected);let t=e;if(!(!t||xr(t)==="body")){if(!HM(t,Uo())){const n=Qi(t,Uo())[0];n&&(t=n)}Mr.push(t),Mr.length>qD&&(Mr=Mr.slice(-20))}}function Vg(){return Mr.slice().reverse().find(e=>e.isConnected)}const UD=A.forwardRef(function(t,n){return A.createElement("button",qo({},t,{type:"button",ref:n,tabIndex:-1,style:Gf}))});function di(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}=e,{open:p,refs:f,nodeId:h,onOpenChange:g,events:m,dataRef:y,floatingId:v,elements:{domReference:x,floating:S}}=t,T=typeof a=="number"&&a<0,w=B0(x)&&T,C=FD()?i:!0,k=jt(o),I=jt(a),P=jt(s),D=wr(),N=gw(),V=A.useRef(null),R=A.useRef(null),O=A.useRef(!1),M=A.useRef(!1),L=A.useRef(-1),j=N!=null,$=S==null?void 0:S.firstElementChild,_=($==null?void 0:$.id)===v?$:S,z=kt(function(Z){return Z===void 0&&(Z=_),Z?Qi(Z,Uo()):[]}),J=kt(Z=>{const U=z(Z);return k.current.map(G=>x&&G==="reference"?x:_&&G==="floating"?_:U).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function Z(G){if(G.key==="Tab"){gt(_,gn(It(_)))&&z().length===0&&!w&&Dt(G);const F=J(),W=Pn(G);k.current[0]==="reference"&&W===x&&(Dt(G),G.shiftKey?ir(F[F.length-1]):ir(F[1])),k.current[1]==="floating"&&W===_&&G.shiftKey&&(Dt(G),ir(F[0]))}}const U=It(_);return U.addEventListener("keydown",Z),()=>{U.removeEventListener("keydown",Z)}},[r,x,_,c,k,w,z,J]),A.useEffect(()=>{if(r||!S)return;function Z(U){const G=Pn(U),W=z().indexOf(G);W!==-1&&(L.current=W)}return S.addEventListener("focusin",Z),()=>{S.removeEventListener("focusin",Z)}},[r,S,z]),A.useEffect(()=>{if(r||!d)return;function Z(){M.current=!0,setTimeout(()=>{M.current=!1})}function U(G){const F=G.relatedTarget;queueMicrotask(()=>{const W=!(gt(x,F)||gt(S,F)||gt(F,S)||gt(N==null?void 0:N.portalNode,F)||F!=null&&F.hasAttribute(mr("focus-guard"))||D&&(Hr(D.nodesRef.current,h).find(Y=>{var ie,B;return gt((ie=Y.context)==null?void 0:ie.elements.floating,F)||gt((B=Y.context)==null?void 0:B.elements.domReference,F)})||jD(D.nodesRef.current,h).find(Y=>{var ie,B;return((ie=Y.context)==null?void 0:ie.elements.floating)===F||((B=Y.context)==null?void 0:B.elements.domReference)===F})));if(l&&W&&gn(It(_))===It(_).body){bt(_)&&(_==null||_.focus());const Y=L.current,ie=z(),B=ie[Y]||ie[ie.length-1]||_;bt(B)&&B.focus()}(w||!c)&&F&&W&&!M.current&&F!==Vg()&&(O.current=!0,g(!1,G))})}if(S&&bt(x))return x.addEventListener("focusout",U),x.addEventListener("pointerdown",Z),S.addEventListener("focusout",U),()=>{x.removeEventListener("focusout",U),x.removeEventListener("pointerdown",Z),S.removeEventListener("focusout",U)}},[r,x,S,_,c,h,D,N,g,d,l,z,w]),A.useEffect(()=>{var Z;if(r)return;const U=Array.from((N==null||(Z=N.portalNode)==null?void 0:Z.querySelectorAll("["+mr("portal")+"]"))||[]);if(S){const G=[S,...U,V.current,R.current,k.current.includes("reference")||w?x:null].filter(W=>W!=null),F=c||w?Ng(G,C,!C):Ng(G);return()=>{F()}}},[r,x,S,c,k,N,w,C]),Be(()=>{if(r||!bt(_))return;const Z=It(_),U=gn(Z);queueMicrotask(()=>{const G=J(_),F=I.current,W=(typeof F=="number"?G[F]:F.current)||_,Y=gt(_,U);!T&&!Y&&p&&ir(W,{preventScroll:W===_})})},[r,p,_,T,J,I]),Be(()=>{if(r||!_)return;let Z=!1;const U=It(_),G=gn(U);let W=y.current.openEvent;const Y=f.domReference.current;Yc(G);function ie(B){let{open:ye,reason:Te,event:Ie,nested:Fe}=B;ye&&(W=Ie),Te==="escape-key"&&f.domReference.current&&Yc(f.domReference.current),Te==="hover"&&Ie.type==="mouseleave"&&(O.current=!0),Te==="outside-press"&&(Fe?(O.current=!1,Z=!0):O.current=!(z0(Ie)||Ff(Ie)))}return m.on("openchange",ie),()=>{m.off("openchange",ie);const B=gn(U),ye=gt(S,B)||D&&Hr(D.nodesRef.current,h).some(ae=>{var ve;return gt((ve=ae.context)==null?void 0:ve.elements.floating,B)});(ye||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&Yc(f.domReference.current);const Ie=Y||G,Fe=Qi(It(Ie).body,Uo());queueMicrotask(()=>{let ae=Vg();!ae&&bt(Ie)&&S&&(ae=BD(Fe,Ie,S)),P.current&&!O.current&&bt(ae)&&(!(ae!==B&&B!==U.body)||ye)&&ae.focus({preventScroll:Z})})}},[r,S,_,P,y,f,m,D,h]),Be(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,g,f,d]),Be(()=>{if(r||!_||typeof MutationObserver!="function"||T)return;const Z=()=>{const G=_.getAttribute("tabindex"),F=z(),W=gn(It(S)),Y=F.indexOf(W);Y!==-1&&(L.current=Y),k.current.includes("floating")||W!==f.domReference.current&&F.length===0?G!=="0"&&_.setAttribute("tabindex","0"):G!=="-1"&&_.setAttribute("tabindex","-1")};Z();const U=new MutationObserver(Z);return U.observe(_,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,S,_,f,k,z,T]);function te(Z){return r||!u||!c?null:A.createElement(UD,{ref:Z==="start"?V:R,onClick:U=>g(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!w:!0)&&(j||c);return A.createElement(A.Fragment,null,ee&&A.createElement(Cs,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:Z=>{if(c){const G=J();ir(o[0]==="reference"?G[0]:G[G.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(O.current=!1,Li(Z,N.portalNode)){const G=pw()||x;G==null||G.focus()}else{var U;(U=N.beforeOutsideRef.current)==null||U.focus()}}}),!w&&te("start"),n,te("end"),ee&&A.createElement(Cs,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:Z=>{if(c)ir(J()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(O.current=!0),Li(Z,N.portalNode)){const G=hw()||x;G==null||G.focus()}else{var U;(U=N.afterOutsideRef.current)==null||U.focus()}}}))}const Kc=new Set,GD=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=ui();return Be(()=>{if(!r)return;Kc.add(i);const a=/iP(hone|ad|od)|iOS/.test(Nf()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,h;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,m=((h=window.visualViewport)==null?void 0:h.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(m))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{Kc.delete(i),Kc.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),A.createElement("div",qo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function zg(e){return bt(e.target)&&e.target.tagName==="BUTTON"}function $g(e){return Vf(e)}function wa(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}=t,d=A.useRef(),p=A.useRef(!1),f=A.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const g=d.current;h.button===0&&s!=="click"&&(Bo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Bo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){d.current=void 0,!(h.defaultPrevented||!u||zg(h))&&(h.key===" "&&!$g(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||zg(h)||$g(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return A.useMemo(()=>a?{reference:f}:{},[a,f])}function YD(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0: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 Bg(e){return e!=null&&e.clientX!=null}function KD(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=A.useRef(!1),p=A.useRef(null),[f,h]=A.useState(),[g,m]=A.useState([]),y=kt((w,C)=>{d.current||r.current.openEvent&&!Bg(r.current.openEvent)||a.setPositionReference(YD(i,{x:w,y:C,axis:l,dataRef:r,pointerType:f}))}),v=kt(w=>{c!=null||u!=null||(n?p.current||m([]):y(w.clientX,w.clientY))}),x=Bo(f)?o:n,S=A.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const w=Bt(o);function C(k){const I=Pn(k);gt(o,I)?(w.removeEventListener("mousemove",C),p.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||Bg(r.current.openEvent)){w.addEventListener("mousemove",C);const k=()=>{w.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,y]);A.useEffect(()=>S(),[S,g]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Be(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const T=A.useMemo(()=>{function w(C){let{pointerType:k}=C;h(k)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:v,onMouseEnter:v}},[v]);return A.useMemo(()=>s?{reference:T}:{},[s,T])}const ZD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},XD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Hg=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function no(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:h}=t,g=wr(),m=kt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?m:l,v=A.useRef(!1),x=A.useRef(!1),{escapeKey:S,outsidePress:T}=Hg(f),{escapeKey:w,outsidePress:C}=Hg(h),k=kt(R=>{var O;if(!n||!a||!s||R.key!=="Escape")return;const M=(O=i.current.floatingContext)==null?void 0:O.nodeId,L=g?Hr(g.nodesRef.current,M):[];if(!S&&(R.stopPropagation(),L.length>0)){let j=!0;if(L.forEach($=>{var _;if((_=$.context)!=null&&_.open&&!$.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,mM(R)?R.nativeEvent:R,"escape-key")}),I=kt(R=>{var O;const M=()=>{var L;k(R),(L=Pn(R))==null||L.removeEventListener("keydown",M)};(O=Pn(R))==null||O.addEventListener("keydown",M)}),P=kt(R=>{var O;const M=v.current;v.current=!1;const L=x.current;if(x.current=!1,c==="click"&&L||M||typeof y=="function"&&!y(R))return;const j=Pn(R),$="["+mr("inert")+"]",_=It(o.floating).querySelectorAll($);let z=Qe(j)?j:null;for(;z&&!fr(z);){const Z=Gn(z);if(fr(Z)||!Qe(Z))break;z=Z}if(_.length&&Qe(j)&&!gM(j)&&!gt(j,o.floating)&&Array.from(_).every(Z=>!gt(z,Z)))return;if(bt(j)&&V){const Z=j.clientWidth>0&&j.scrollWidth>j.clientWidth,U=j.clientHeight>0&&j.scrollHeight>j.clientHeight;let G=U&&R.offsetX>j.clientWidth;if(U&&nn(j).direction==="rtl"&&(G=R.offsetX<=j.offsetWidth-j.clientWidth),G||Z&&R.offsetY>j.clientHeight)return}const J=(O=i.current.floatingContext)==null?void 0:O.nodeId,te=g&&Hr(g.nodesRef.current,J).some(Z=>{var U;return Bc(R,(U=Z.context)==null?void 0:U.elements.floating)});if(Bc(R,o.floating)||Bc(R,o.domReference)||te)return;const ee=g?Hr(g.nodesRef.current,J):[];if(ee.length>0){let Z=!0;if(ee.forEach(U=>{var G;if((G=U.context)!=null&&G.open&&!U.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,R,"outside-press")}),D=kt(R=>{var O;const M=()=>{var L;P(R),(L=Pn(R))==null||L.removeEventListener(c,M)};(O=Pn(R))==null||O.addEventListener(c,M)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function R(L){r(!1,L,"ancestor-scroll")}const O=It(o.floating);s&&O.addEventListener("keydown",w?I:k,w),y&&O.addEventListener(c,C?D:P,C);let M=[];return p&&(Qe(o.domReference)&&(M=cr(o.domReference)),Qe(o.floating)&&(M=M.concat(cr(o.floating))),!Qe(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(cr(o.reference.contextElement)))),M=M.filter(L=>{var j;return L!==((j=O.defaultView)==null?void 0:j.visualViewport)}),M.forEach(L=>{L.addEventListener("scroll",R,{passive:!0})}),()=>{s&&O.removeEventListener("keydown",w?I:k,w),y&&O.removeEventListener(c,C?D:P,C),M.forEach(L=>{L.removeEventListener("scroll",R)})}},[i,o,s,y,c,n,r,p,a,S,T,k,w,I,P,C,D]),A.useEffect(()=>{v.current=!1},[y,c]);const N=A.useMemo(()=>({onKeyDown:k,[ZD[d]]:R=>{u&&r(!1,R.nativeEvent,"reference-press")}}),[k,r,u,d]),V=A.useMemo(()=>({onKeyDown:k,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[XD[c]]:()=>{v.current=!0}}),[k,c]);return A.useMemo(()=>a?{reference:N,floating:V}:{},[a,N,V])}function QD(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ui(),i=A.useRef({}),[a]=A.useState(()=>sw()),s=br()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Qe(f)&&OD("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]=A.useState(r.reference),u=kt((f,h,g)=>{i.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:g,nested:s}),n==null||n(f,h,g)}),d=A.useMemo(()=>({setPositionReference:c}),[]),p=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function ro(e){e===void 0&&(e={});const{nodeId:t}=e,n=QD({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=A.useState(null),[s,l]=A.useState(null),u=(o==null?void 0:o.reference)||i,d=A.useRef(null),p=wr();Be(()=>{u&&(d.current=u)},[u]);const f=vD({...e,elements:{...o,...s&&{reference:s}}}),h=A.useCallback(x=>{const S=Qe(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(S),f.refs.setReference(S)},[f.refs]),g=A.useCallback(x=>{(Qe(x)||x===null)&&(d.current=x,a(x)),(Qe(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!Qe(x))&&f.refs.setReference(x)},[f.refs]),m=A.useMemo(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:d}),[f.refs,g,h]),y=A.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),v=A.useMemo(()=>({...f,...r,refs:m,elements:y,nodeId:t}),[f,m,y,t,r]);return Be(()=>{r.dataRef.current.floatingContext=v;const x=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);x&&(x.context=v)}),A.useMemo(()=>({...f,context:v,refs:m,elements:y}),[f,m,y,v])}function JD(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=A.useRef(!1),u=A.useRef(),d=A.useRef(!0);A.useEffect(()=>{if(!s)return;const f=Bt(a.domReference);function h(){!n&&bt(a.domReference)&&a.domReference===gn(It(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function f(h){let{reason:g}=h;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),A.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=A.useMemo(()=>({onPointerDown(f){Ff(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=Pn(f.nativeEvent);if(l&&Qe(h))try{if(Lf()&&$0())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Vf(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,g=f.nativeEvent,m=Qe(h)&&h.hasAttribute(mr("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const v=gn(a.domReference?a.domReference.ownerDocument:document);!h&&v===a.domReference||gt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,v)||gt(a.domReference,v)||m||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:p}:{},[s,p])}const Wg="active",qg="selected";function Zc(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Wg]:a,[qg]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...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&&[Wg,qg].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,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(m=>m(...h)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function oo(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=A.useCallback(s=>Zc(s,e,"reference"),t),i=A.useCallback(s=>Zc(s,e,"floating"),n),a=A.useCallback(s=>Zc(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let Ug=!1;function yl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Gg(e,t){return yl(t,e===Uf||e===ba,e===Wo||e===ci)}function Xc(e,t,n){return yl(t,e===ba,n?e===Wo:e===ci)||e==="Enter"||e===" "||e===""}function ej(e,t,n){return yl(t,n?e===Wo:e===ci,e===ba)}function Yg(e,t,n){return yl(t,n?e===ci:e===Wo,e===Uf)}function Yf(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:h=!1,focusItemOnOpen:g="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:y=!0,disabledIndices:v=void 0,orientation:x="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:w,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||rs("`useListNavigation` looping must be enabled to allow escaping."),h||rs("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&S>1&&rs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=br(),P=wr(),D=kt(s),N=A.useRef(g),V=A.useRef(c??-1),R=A.useRef(null),O=A.useRef(!0),M=A.useRef(D),L=A.useRef(!!o.floating),j=A.useRef(n),$=A.useRef(!1),_=A.useRef(!1),z=jt(v),J=jt(n),te=jt(T),ee=jt(o.floating),Z=jt(c),[U,G]=A.useState(),[F,W]=A.useState(),Y=kt(function(ae,ve,K){K===void 0&&(K=!1);function le(oe){h?(G(oe.id),P==null||P.events.emit("virtualfocus",oe),w&&(w.current=oe)):ir(oe,{preventScroll:!0,sync:$0()&&Lf()?Ug||$.current:!1})}const Q=ae.current[ve.current];Q&&le(Q),requestAnimationFrame(()=>{const oe=ae.current[ve.current]||Q;if(!oe)return;Q||le(oe);const be=te.current;be&&B&&(K||!O.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof be=="boolean"?{block:"nearest",inline:"nearest"}:be))})});Be(()=>{document.createElement("div").focus({get preventScroll(){return Ug=!0,!1}})},[]),Be(()=>{l&&(n&&o.floating?N.current&&c!=null&&(_.current=!0,V.current=c,D(c)):L.current&&(V.current=-1,M.current(null)))},[l,n,o.floating,c,D]),Be(()=>{if(l&&n&&o.floating)if(a==null){if($.current=!1,Z.current!=null)return;if(L.current&&(V.current=-1,Y(i,V)),(!j.current||!L.current)&&N.current&&(R.current!=null||N.current===!0&&R.current==null)){let ae=0;const ve=()=>{i.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(ve),ae++):(V.current=R.current==null||Xc(R.current,x,f)||p?qc(i,z.current):Og(i,z.current),R.current=null,D(V.current))};ve()}}else Fi(i,a)||(V.current=a,Y(i,V,_.current),_.current=!1)},[l,n,o.floating,a,Z,p,i,x,f,D,Y,z]),Be(()=>{var ae;if(!l||o.floating||!P||h||!L.current)return;const ve=P.nodesRef.current,K=(ae=ve.find(oe=>oe.id===I))==null||(ae=ae.context)==null?void 0:ae.elements.floating,le=gn(It(o.floating)),Q=ve.some(oe=>oe.context&&gt(oe.context.elements.floating,le));K&&!Q&&O.current&&K.focus({preventScroll:!0})},[l,o.floating,P,I,h]),Be(()=>{if(!l||!P||!h||I)return;function ae(ve){W(ve.id),w&&(w.current=ve)}return P.events.on("virtualfocus",ae),()=>{P.events.off("virtualfocus",ae)}},[l,P,h,I,w]),Be(()=>{M.current=D,L.current=!!o.floating}),Be(()=>{n||(R.current=null)},[n]),Be(()=>{j.current=n},[n]);const ie=a!=null,B=A.useMemo(()=>{function ae(K){if(!n)return;const le=i.current.indexOf(K);le!==-1&&D(le)}return{onFocus(K){let{currentTarget:le}=K;ae(le)},onClick:K=>{let{currentTarget:le}=K;return le.focus({preventScroll:!0})},...m&&{onMouseMove(K){let{currentTarget:le}=K;ae(le)},onPointerLeave(K){let{pointerType:le}=K;!O.current||le==="touch"||(V.current=-1,Y(i,V),D(null),h||ir(ee.current,{preventScroll:!0}))}}}},[n,ee,Y,m,i,D,h]),ye=kt(ae=>{if(O.current=!1,$.current=!0,!J.current&&ae.currentTarget===ee.current)return;if(p&&Yg(ae.key,x,f)){Dt(ae),r(!1,ae.nativeEvent,"list-navigation"),bt(o.domReference)&&!h&&o.domReference.focus();return}const ve=V.current,K=qc(i,v),le=Og(i,v);if(ae.key==="Home"&&(Dt(ae),V.current=K,D(V.current)),ae.key==="End"&&(Dt(ae),V.current=le,D(V.current)),S>1){const Q=C||Array.from({length:i.current.length},()=>({width:1,height:1})),oe=TD(Q,S,k),be=oe.findIndex(ce=>ce!=null&&!ns(i.current,ce,v)),X=oe.reduce((ce,Re,$e)=>Re!=null&&!ns(i.current,Re,v)?$e:ce,-1);if(V.current=oe[wD({current:oe.map(ce=>ce!=null?i.current[ce]:null)},{event:ae,orientation:x,loop:d,cols:S,disabledIndices:ED([...v||i.current.map((ce,Re)=>ns(i.current,Re)?Re:void 0),void 0],oe),minIndex:be,maxIndex:X,prevIndex:SD(V.current>le?K:V.current,Q,oe,S,ae.key===ba?"bl":ae.key===ci?"tr":"tl"),stopEvent:!0})],D(V.current),x==="both")return}if(Gg(ae.key,x)){if(Dt(ae),n&&!h&&gn(ae.currentTarget.ownerDocument)===ae.currentTarget){V.current=Xc(ae.key,x,f)?K:le,D(V.current);return}Xc(ae.key,x,f)?d?V.current=ve>=le?u&&ve!==i.current.length?-1:K:Ft(i,{startingIndex:ve,disabledIndices:v}):V.current=Math.min(le,Ft(i,{startingIndex:ve,disabledIndices:v})):d?V.current=ve<=K?u&&ve!==-1?i.current.length:le:Ft(i,{startingIndex:ve,decrement:!0,disabledIndices:v}):V.current=Math.max(K,Ft(i,{startingIndex:ve,decrement:!0,disabledIndices:v})),Fi(i,V.current)?D(null):D(V.current)}}),Te=A.useMemo(()=>h&&n&&ie&&{"aria-activedescendant":F||U},[h,n,ie,F,U]),Ie=A.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!B0(o.domReference)&&Te,onKeyDown:ye,onPointerMove(){O.current=!0}}),[Te,ye,o.domReference,x]),Fe=A.useMemo(()=>{function ae(K){g==="auto"&&z0(K.nativeEvent)&&(N.current=!0)}function ve(K){N.current=g,g==="auto"&&Ff(K.nativeEvent)&&(N.current=!0)}return{...Te,onKeyDown(K){O.current=!1;const le=K.key.indexOf("Arrow")===0,Q=ej(K.key,x,f),oe=Yg(K.key,x,f),be=Gg(K.key,x),X=(p?Q:be)||K.key==="Enter"||K.key.trim()==="";if(h&&n){const xt=P==null?void 0:P.nodesRef.current.find(_t=>_t.parentId==null),ut=P&&xt?ND(P.nodesRef.current,xt.id):null;if(le&&ut&&w){const _t=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Q||oe){var ce,Re;const fn=((ce=ut.context)==null?void 0:ce.elements.domReference)===K.currentTarget,Sn=oe&&!fn?(Re=ut.context)==null?void 0:Re.elements.domReference:Q?i.current.find(Xn=>(Xn==null?void 0:Xn.id)===U):null;Sn&&(Dt(K),Sn.dispatchEvent(_t),W(void 0))}if(be&&ut.context&&ut.context.open&&ut.parentId&&K.currentTarget!==ut.context.elements.domReference){var $e;Dt(K),($e=ut.context.elements.domReference)==null||$e.dispatchEvent(_t);return}}return ye(K)}if(!(!n&&!y&&le)){if(X&&(R.current=p&&be?null:K.key),p){Q&&(Dt(K),n?(V.current=qc(i,z.current),D(V.current)):r(!0,K.nativeEvent,"list-navigation"));return}be&&(c!=null&&(V.current=c),Dt(K),!n&&y?r(!0,K.nativeEvent,"list-navigation"):ye(K),n&&D(V.current))}},onFocus(){n&&!h&&D(null)},onPointerDown:ve,onMouseDown:ae,onClick:ae}},[U,Te,ye,z,g,i,p,D,r,n,y,x,f,c,P,h,w]);return A.useMemo(()=>l?{reference:Fe,floating:Ie,item:B}:{},[l,Fe,Ie,B])}const tj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function io(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=tj.get(a))!=null?n:a,l=ui(),u=br()!=null,d=A.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=A.useMemo(()=>{const h={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?h:{...h,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=A.useCallback(h=>{let{active:g,selected:m}=h;const y={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":g&&m};case"combobox":return{...y,...g&&{"aria-selected":!0}}}return{}},[o,a]);return A.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const Kg=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function mo(e,t){return typeof e=="function"?e(t):e}function nj(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function rj(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]=A.useState("unmounted"),c=nj(n,a);return!c&&s==="close"&&l("unmounted"),Be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function vw(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=A.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,h]=A.useState(()=>({...mo(i,c),...mo(n,c)})),{isMounted:g,status:m}=rj(e,{duration:a}),y=jt(n),v=jt(r),x=jt(o),S=jt(i);return Be(()=>{const T=mo(y.current,c),w=mo(x.current,c),C=mo(S.current,c),k=mo(v.current,c)||Object.keys(T).reduce((I,P)=>(I[P]="",I),{});if(m==="initial"&&h(I=>({transitionProperty:I.transitionProperty,...C,...T})),m==="open"&&h({transitionProperty:Object.keys(k).map(Kg).join(","),transitionDuration:d+"ms",...C,...k}),m==="close"){const I=w||T;h({transitionProperty:Object.keys(I).map(Kg).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,y,v,S,d,m,c]),{isMounted:g,styles:f}}function oj(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,h=A.useRef(),g=A.useRef(""),m=A.useRef((n=f??a)!=null?n:-1),y=A.useRef(null),v=kt(s),x=kt(l),S=jt(u),T=jt(p);Be(()=>{r&&(clearTimeout(h.current),y.current=null,g.current="")},[r]),Be(()=>{if(r&&g.current===""){var P;m.current=(P=f??a)!=null?P:-1}},[r,f,a]);const w=kt(P=>{P?o.current.typing||(o.current.typing=P,x(P)):o.current.typing&&(o.current.typing=P,x(P))}),C=kt(P=>{function D(M,L,j){const $=S.current?S.current(L,j):L.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return $?M.indexOf($):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(D(N,N,g.current)===-1?w(!1):P.key===" "&&Dt(P)),N==null||T.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;r&&P.key!==" "&&(Dt(P),w(!0)),N.every(M=>{var L,j;return M?((L=M[0])==null?void 0:L.toLocaleLowerCase())!==((j=M[1])==null?void 0:j.toLocaleLowerCase()):!0})&&g.current===P.key&&(g.current="",m.current=y.current),g.current+=P.key,clearTimeout(h.current),h.current=setTimeout(()=>{g.current="",m.current=y.current,w(!1)},d);const R=m.current,O=D(N,[...N.slice((R||0)+1),...N.slice(0,(R||0)+1)],g.current);O!==-1?(v(O),y.current=O):P.key!==" "&&(g.current="",w(!1))}),k=A.useMemo(()=>({onKeyDown:C}),[C]),I=A.useMemo(()=>({onKeyDown:C,onKeyUp(P){P.key===" "&&w(!1)}}),[C,w]);return A.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function Zg(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 ij(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function yw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),h=f-l;if(a===null||s===null||h===0)return a=d,s=p,l=f,null;const g=d-a,m=p-s,v=Math.sqrt(g*g+m*m)/h;return a=d,s=p,l=f,v}const u=d=>{let{x:p,y:f,placement:h,elements:g,onClose:m,nodeId:y,tree:v}=d;return function(S){function T(){clearTimeout(o),m()}if(clearTimeout(o),!g.domReference||!g.floating||h==null||p==null||f==null)return;const{clientX:w,clientY:C}=S,k=[w,C],I=Pn(S),P=S.type==="mouseleave",D=gt(g.floating,I),N=gt(g.domReference,I),V=g.domReference.getBoundingClientRect(),R=g.floating.getBoundingClientRect(),O=h.split("-")[0],M=p>R.right-R.width/2,L=f>R.bottom-R.height/2,j=ij(k,V),$=R.width>V.width,_=R.height>V.height,z=($?V:R).left,J=($?V:R).right,te=(_?V:R).top,ee=(_?V:R).bottom;if(D&&(i=!0,!P))return;if(N&&(i=!1),N&&!P){i=!0;return}if(P&&Qe(S.relatedTarget)&&gt(g.floating,S.relatedTarget)||v&&Hr(v.nodesRef.current,y).some(G=>{let{context:F}=G;return F==null?void 0:F.open}))return;if(O==="top"&&f>=V.bottom-1||O==="bottom"&&f<=V.top+1||O==="left"&&p>=V.right-1||O==="right"&&p<=V.left+1)return T();let Z=[];switch(O){case"top":Z=[[z,V.top+1],[z,R.bottom-1],[J,R.bottom-1],[J,V.top+1]];break;case"bottom":Z=[[z,R.top+1],[z,V.bottom-1],[J,V.bottom-1],[J,R.top+1]];break;case"left":Z=[[R.right-1,ee],[R.right-1,te],[V.left+1,te],[V.left+1,ee]];break;case"right":Z=[[V.right-1,ee],[V.right-1,te],[R.left+1,te],[R.left+1,ee]];break}function U(G){let[F,W]=G;switch(O){case"top":{const Y=[$?F+t/2:M?F+t*4:F-t*4,W+t+1],ie=[$?F-t/2:M?F+t*4:F-t*4,W+t+1],B=[[R.left,M||$?R.bottom-t:R.top],[R.right,M?$?R.bottom-t:R.top:R.bottom-t]];return[Y,ie,...B]}case"bottom":{const Y=[$?F+t/2:M?F+t*4:F-t*4,W-t],ie=[$?F-t/2:M?F+t*4:F-t*4,W-t],B=[[R.left,M||$?R.top+t:R.bottom],[R.right,M?$?R.top+t:R.bottom:R.top+t]];return[Y,ie,...B]}case"left":{const Y=[F+t+1,_?W+t/2:L?W+t*4:W-t*4],ie=[F+t+1,_?W-t/2:L?W+t*4:W-t*4];return[...[[L||_?R.right-t:R.left,R.top],[L?_?R.right-t:R.left:R.right-t,R.bottom]],Y,ie]}case"right":{const Y=[F-t,_?W+t/2:L?W+t*4:W-t*4],ie=[F-t,_?W-t/2:L?W+t*4:W-t*4],B=[[L||_?R.left+t:R.right,R.top],[L?_?R.left+t:R.right:R.left+t,R.bottom]];return[Y,ie,...B]}}}if(!Zg([w,C],Z)){if(i&&!j)return T();if(!P&&r){const G=c(S.clientX,S.clientY);if(G!==null&&G<.1)return T()}Zg([w,C],U([p,f]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const fi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[xa(10),qf({fallbackAxisSideDirection:"end"}),Wf(),nw({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=ro({open:n,middleware:i,transform:!0,whileElementsMounted:ya,onOpenChange:(h,g)=>{var y;const m=g==null?void 0:g.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),(y=e.onChange)==null||y.call(e,h))}}),c=wa(l),u=no(l),d=io(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=oo([c,u,d]);return b.jsxs(E.Fragment,{children:[b.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&b.jsx(to,{preserveTabOrder:!0,id:`${t}-portal`,children:b.jsx(di,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:b.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[b.jsx(aw,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),b.jsx("header",{className:"mb-2",children:b.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},aj=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=ro({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=wa(s,{enabled:e.disabled??!0}),u=io(s,{role:"tooltip"}),d=no(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=oo([c,u,d]);return b.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[b.jsx(Io,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:b.jsx(pt.span,{layoutId:o,children:e.trigger})}),b.jsx(vr,{children:i?b.jsx(to,{root:t,children:b.jsx(di,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:b.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},xw=300,sj=500,bw=(e="")=>Ve("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),ud=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Xg=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},l)=>{const[c,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,h]=E.useState(null),g=E.useRef([]),m=E.useRef([]),y=E.useContext(ud),v=br(),x=wr(),S=_D(),T=iw(),w=v!==null,{floatingStyles:C,refs:k,context:I}=ro({nodeId:S,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:ya,placement:w?"right":"bottom-start",middleware:[xa({mainAxis:w?0:4,alignmentAxis:w?-4:0}),qf(),Wf()]}),P=io(I,{role:"menu"}),D=no(I,{bubbles:!0}),N=uw(I,{move:!1,enabled:n,delay:{open:xw},handleClose:yw({blockPointerEvents:!0})}),V=wa(I,{event:"mousedown",toggle:!w,ignoreMouse:w,keyboardHandlers:!0}),R=Yf(I,{loop:!0,listRef:g,activeIndex:f,nested:w,onNavigate:h}),O=oj(I,{activeIndex:f,listRef:m,resetMs:sj,onMatch:c?h:void 0}),{getReferenceProps:M,getFloatingProps:L,getItemProps:j}=oo([N,V,P,D,R,O]);E.useEffect(()=>{if(!x)return;function _(){u(!1)}function z(J){J.nodeId!==S&&J.parentId===v&&u(!1)}return x.events.on("click",_),x.events.on("menuopen",z),()=>{x.events.off("click",_),x.events.off("menuopen",z)}},[x,S,v]),E.useEffect(()=>{c&&x&&x.events.emit("menuopen",{parentId:v,nodeId:S})},[x,c,S,v]);const $=o?s.className:Ve(bw(s.className));return b.jsxs(MD,{id:S,children:[b.jsx(E.Fragment,{children:s.asChild?b.jsx($o,{...M(y.getItemProps({...s,onFocus(_){var z;(z=s.onFocus)==null||z.call(s,_),p(!1),y.setHasFocusInside(!0)}})),children:a,ref:cd([k.setReference,T.ref,l]),tabIndex:w?y.activeIndex===T.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:$}):b.jsxs("button",{type:"button",className:$,"data-open":c?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:cd([k.setReference,T.ref,l]),tabIndex:w?y.activeIndex===T.index?0:-1:void 0,...M(y.getItemProps({...s,onFocus(_){var z;(z=s.onFocus)==null||z.call(s,_),p(!1),y.setHasFocusInside(!0)}})),children:[a,w&&b.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[b.jsx("span",{className:"sr-only",children:"Next menu"}),b.jsx(xf,{size:14})]})]})}),b.jsx(ud.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:j,setHasFocusInside:p,isOpen:c},children:b.jsx(RD,{elementsRef:g,labelsRef:m,children:c&&b.jsx(to,{preserveTabOrder:!0,children:b.jsx(di,{context:I,modal:!1,initialFocus:w?-1:0,returnFocus:!w,children:b.jsx(t,{...L(),ref:k.setFloating,style:{...s.style,...C},className:Ve("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-xl outline-none",i),children:e})})})})})]})}),lj=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(ud),s=iw({label:n?null:e}),l=wr(),c=s.index===a.activeIndex;return b.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:cd([s.ref,i]),className:bw(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?b.jsx(t,{size:16}):null]})}),cj=E.forwardRef((e,t)=>br()!==null?b.jsx(Xg,{...e,isParent:!1,ref:t}):b.jsx(DD,{children:b.jsx(Xg,{...e,isParent:!0,ref:t})})),uj=(e,t)=>qr()?t:window.matchMedia(e).matches,dj=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(uj(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},Qg=()=>window.matchMedia("@media (pointer: coarse)"),fj=()=>{var r;const e=E.useRef(qr()?null:Qg()),[t,n]=E.useState(qr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?Qg():e.current).addEventListener("change",i=>n(i.matches))},[]),t},pj=e=>{const t=fj(),n=E.useRef(qr()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const r=document.documentElement;if(e){if(n.current=document.documentElement.style.overflowY,r.style.overflowY="hidden",t||s0())return;r.style.padding=Ny(r)?"0 15px 0 0":""}else r.style.padding="",document.documentElement.style.overflowY=n.current},[e,t]),E.useEffect(()=>{if(!e)return;const r=new AbortController,o=document.documentElement,i=a=>a.target===o&&e?a.preventDefault():void 0;return o.addEventListener("wheel",i,{signal:r.signal,passive:!1}),o.addEventListener("scroll",i,{signal:r.signal,passive:!1}),()=>{r.abort()}},[e])},vn="600ms",hj={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},mj={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},Qc={drawer:e=>e==="left"?hj:mj,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.97,animationDuration:vn},initial:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},gj=Jo("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 h-[85vh] max-h-[85vh] max-h-[85svh] 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"}}),vj={top:0,left:0,right:0,bottom:-1},yj=e=>e*.62,xj=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=yj(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return b.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:vj,whileDrag:{cursor:"grabbing"},className:Ve("absolute rounded-lg",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?b.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ha={drawer:"right",sheet:"none",dialog:"none"},bj=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ha.drawer:Ha[o]:t?Ha[o]:Ha.sheet},wj=({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,layoutId:a,onChange:s,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:p="",type:f="dialog",position:h,overlayClickClose:g=!1,ariaTitle:m,...y})=>{pj(e);const v=E.useId(),x=E.useId(),S=dj("(min-width: 64rem)"),T=f!=="dialog",w=bj(S,d,f,h),C=S||d?Qc[f]:Qc.sheet,k=typeof C=="function"?C(w):C,I=S||d?f:"sheet",{refs:P,context:D}=ro({open:e,onOpenChange:s}),N=wa(D),V=io(D,{role:"dialog"}),R=no(D,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:O,getFloatingProps:M}=oo([N,V,R]),L=o,j=No(void 0),$=()=>s(!1);return b.jsxs(E.Fragment,{children:[o?b.jsx(E.Fragment,{children:r?b.jsx($o,{ref:P.setReference,...O({layoutId:a}),children:L}):b.jsx(pt.button,{ref:P.setReference,...O(),layoutId:a,type:"button",children:L})}):null,b.jsx(to,{children:b.jsx(vr,{mode:"wait",presenceAffectsLayout:!0,children:e?b.jsx(GD,{lockScroll:!1,className:Ve(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:b.jsx(di,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:D,children:b.jsxs(pt.div,{...y,exit:"exit",animate:"enter",initial:"initial",variants:k,"data-component":"modal",ref:P.setFloating,"aria-modal":e,layoutId:a,className:Ve(gj({position:w,type:I}),l),style:I==="drawer"?{width:j}:{height:j},...t?{"aria-labelledby":v,"aria-describedby":x}:{"aria-label":m},...M(),children:[t?b.jsx("header",{className:"relative w-full",children:t?b.jsx("h2",{id:v,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,b.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?b.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?b.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:b.jsx("button",{type:"button",onClick:$,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:b.jsx(al,{})})}):null,T&&c?b.jsx(xj,{onChange:s,parent:P.floating,position:w,sheet:I==="sheet",value:j}):null]})})}):null})})]})},Tj=e=>b.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),ww=({as:e,title:t,children:n,placement:r,open:o,focus:i=!0,hover:a=!0,enabled:s=!0,popover:l=!0,followCursor:c=!1,onChange:u=Af,...d})=>{const[p,f]=E.useState(o??!1),h=E.useRef(null),g=e||"span",m=N=>{f(N),u==null||u(N)},{refs:y,floatingStyles:v,context:x}=ro({open:p,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:ya,onOpenChange:o?void 0:m,middleware:[Wf(),xa(5),qf({fallbackAxisSideDirection:"start"}),nw({padding:5,element:h})]}),S=uw(x,{move:!0,delay:{open:xw},enabled:s?a:!1,handleClose:l?yw():null}),T=JD(x,{enabled:s?i:!1}),w=wa(x,{enabled:s?l:!1}),C=no(x,{enabled:s}),k=io(x,{role:"tooltip",enabled:s}),I=KD(x,{enabled:!!s&&!!c}),{getReferenceProps:P,getFloatingProps:D}=oo([k,C,I,i?T:void 0,a?S:void 0,l?w:void 0]);return E.useEffect(()=>f(o===void 0?!1:o),[o]),b.jsxs(E.Fragment,{children:[b.jsx(g,{ref:y.setReference,...P(d),children:t}),p&&b.jsx(to,{preserveTabOrder:!0,children:b.jsxs(cn,{...D(),ref:y.setFloating,style:v,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[b.jsx(aw,{ref:h,context:x,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class ks{static getDescendantProperty(t,n,r=[]){let o,i,a,s,l,c;if(n){if(a=n.indexOf("."),a===-1?o=n:(o=n.slice(0,a),i=n.slice(a+1)),s=t[o],s!==null&&typeof s<"u")if(!i&&(typeof s=="string"||typeof s=="number"))r.push(s);else if(Object.prototype.toString.call(s)==="[object Array]")for(l=0,c=s.length;l<c;l++)ks.getDescendantProperty(s[l],i,r);else i&&ks.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Vr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Vr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const a=ks.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Vr.isMatch(a[l],t,this.options.caseSensitive);if(c){s=!0,n.push({item:o,score:c});break}}if(s)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Vr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Vr.indexesOfFirstLetter(t,n).forEach((a,s)=>{let l=a+1;o[s]=[a];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[s]=!1;break}o[s].push(l),l++}}),o=o.filter(a=>a!==!1),o.length?o.sort((a,s)=>a.length===1?a[0]-s[0]:(a=a[a.length-1]-a[0],s=s[s.length-1]-s[0],a-s))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const xl=0,Tr=1,pi=2,Tw=4;function Jg(e){return()=>e}function Sj(e){e()}function ea(e,t){return n=>e(t(n))}function ev(e,t){return()=>e(t)}function Sw(e,t){return n=>e(t,n)}function Kf(e){return e!==void 0}function Ej(...e){return()=>{e.map(Sj)}}function hi(){}function bl(e,t){return t(e),e}function Cj(e,t){return t(e)}function st(...e){return e}function Ke(e,t){return e(Tr,t)}function _e(e,t){e(xl,t)}function Zf(e){e(pi)}function Lt(e){return e(Tw)}function xe(e,t){return Ke(e,Sw(t,xl))}function Nn(e,t){const n=e(Tr,r=>{n(),t(r)});return n}function tv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ew(e,t){return e===t}function it(e=Ew){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ee(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>ea(t,e)}function Cn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=kj(...t);return(r,o)=>{switch(r){case pi:Zf(e);return;case Tr:return Ke(e,n(o))}}}function In(e,t){return n=>r=>{n(t=e(t,r))}}function Go(e){return t=>n=>{e>0?e--:t(n)}}function lr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function De(...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);Ke(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 kj(...e){return t=>e.reduceRight(Cj,t)}function Rj(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case Tr:return i?n===i?void 0:(r(),n=i,t=Ke(e,i),t):(r(),hi);case pi:r(),n=null;return}}}function se(e){let t=e;const n=ze();return(r,o)=>{switch(r){case xl:t=o;break;case Tr:{o(t);break}case Tw:return t}return n(r,o)}}function Vt(e,t){return bl(se(t),n=>xe(e,n))}function ze(){const e=[];return(t,n)=>{switch(t){case xl:e.slice().forEach(r=>{r(n)});return;case pi:e.splice(0,e.length);return;case Tr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return bl(ze(),t=>xe(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:Pj(),singleton:n}}const Pj=()=>Symbol();function Aj(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 Rt(...e){const t=ze(),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);Ke(i,l=>{n[a]=l,r=r|s,r===o&&_e(t,n)})}),function(i,a){switch(i){case pi:{Zf(t);return}case Tr:return r===o&&a(n),Ke(t,a)}}}function ke(e,t=Ew){return ne(e,it(t))}function nv(...e){return function(t,n){switch(t){case pi:return;case Tr:return Ej(...e.map(r=>Ke(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const Ij={0:"debug",3:"error",1:"log",2:"warn"},Oj=()=>typeof globalThis>"u"?window:globalThis,Sr=qe(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=Oj().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[Ij[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Fn(e,t,n){return Xf(e,t,n).callbackRef}function Xf(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function Cw(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=_j(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 h;f&&(h=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:f?s?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:f?s?h.innerWidth:h.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:y}),i==null||i(s?rv("column-gap",getComputedStyle(u).columnGap,o):rv("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return Xf(c,n,l)}function _j(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},tn.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 rv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function Qf(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),h=c.top-f.top;p=f.height-Math.max(0,h),d=h+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}=Xf(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.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==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=qe(()=>{const e=ze(),t=ze(),n=se(0),r=ze(),o=se(0),i=ze(),a=ze(),s=se(0),l=se(0),c=se(0),u=se(0),d=ze(),p=ze(),f=se(!1),h=se(!1),g=se(!1);return xe(ne(e,pe(({scrollTop:m})=>m)),t),xe(ne(e,pe(({scrollHeight:m})=>m)),a),xe(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:h,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ta={lvl:0};function kw(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 tt(e){return e===ta}function na(e,t){if(!tt(e))return t===e.k?e.v:t<e.k?na(e.l,t):na(e.r,t)}function wn(e,t,n="k"){if(tt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=wn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return wn(e.l,t,n)}function Jt(e,t,n){return tt(e)?Aw(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?ov(Ct(e,{l:Jt(e.l,t,n)})):ov(Ct(e,{r:Jt(e.r,t,n)}))}function ko(){return ta}function wl(e,t,n){if(tt(e))return[];const r=wn(e,t)[0];return Mj(fd(e,r,n))}function dd(e,t){if(tt(e))return ta;const{k:n,l:r,r:o}=e;if(t===n){if(tt(r))return o;if(tt(o))return r;{const[i,a]=Pw(r);return os(Ct(e,{k:i,l:Rw(r),v:a}))}}else return t<n?os(Ct(e,{l:dd(r,t)})):os(Ct(e,{r:dd(o,t)}))}function zr(e){return tt(e)?[]:[...zr(e.l),{k:e.k,v:e.v},...zr(e.r)]}function fd(e,t,n){if(tt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(fd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(fd(i,t,n))),s}function os(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(Jc(t))return Iw(Ct(e,{lvl:n-1}));if(!tt(t)&&!tt(t.r))return Ct(t.r,{l:Ct(t,{r:t.r.l}),lvl:n,r:Ct(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Jc(e))return pd(Ct(e,{lvl:n-1}));if(!tt(r)&&!tt(r.l)){const o=r.l,i=Jc(o)?r.lvl-1:r.lvl;return Ct(o,{l:Ct(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:pd(Ct(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ct(e,t){return Aw(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 Rw(e){return tt(e.r)?e.l:os(Ct(e,{r:Rw(e.r)}))}function Jc(e){return tt(e)||e.lvl>e.r.lvl}function Pw(e){return tt(e.r)?[e.k,e.v]:Pw(e.r)}function Aw(e,t,n,r=ta,o=ta){return{k:e,l:r,lvl:n,r:o,v:t}}function ov(e){return pd(Iw(e))}function Iw(e){const{l:t}=e;return!tt(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function pd(e){const{lvl:t,r:n}=e;return!tt(n)&&!tt(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function Mj(e){return kw(e,({k:t,v:n})=>({index:t,value:n}))}function Ow(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ra(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Jf=qe(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function _w(e,t,n){return e[Rs(e,t,n)]}function Rs(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 Dj(e,t,n,r){const o=Rs(e,t,r),i=Rs(e,n,r,o);return e.slice(o,i+1)}function Tn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Tl(e){return!tt(e.groupOffsetTree)}function ep({index:e},t){return t===e?0:t<e?-1:1}function jj(){return{groupIndices:[],groupOffsetTree:ko(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ko()}}function Nj(e,t){let n=tt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),tt(e)){e=Jt(e,0,i);continue}const s=wl(e,a-1,o+1);if(s.some(Hj(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=dd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=Jt(e,o+1,p));c&&(e=Jt(e,a,i))}return[e,n]}function Fj(e){return typeof e.groupIndex<"u"}function Lj({offset:e},t){return t===e?0:t<e?-1:1}function oa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=_w(t,e,ep),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Mw(e,t){if(!Tl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Dw(e,t,n){if(Fj(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Mw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Vj(e,t,n,r=0){return r>0&&(t=Math.max(t,_w(e,r,ep).offset)),kw(Dj(e,t,n,Lj),Bj)}function zj(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&tt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((h,g)=>Jt(Jt(h,g,p),g+1,f),a)}else[a,s]=Nj(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=hd(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>Jt(p,f,oa(f,d,o)),ko()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function $j(e){return zr(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 iv(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 hd(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Rs(o,t-1,ep),s=o[l].offset;const c=wn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===wn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of wl(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 Bj(e){return{index:e.index,value:e}}function Hj(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 Wj={offsetHeight:"height",offsetWidth:"width"},zn=qe(([{log:e},{recalcInProgress:t}])=>{const n=ze(),r=ze(),o=Vt(r,0),i=ze(),a=ze(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((T,w)=>Tn(T,Wj[w])),p=se(void 0),f=se(0),h=jj(),g=Vt(ne(n,De(l,e,f),In(zj,h),it()),h),m=Vt(ne(l,it(),In((T,w)=>({current:w,prev:T.current}),{current:[],prev:[]}),pe(({prev:T})=>T)),[]);xe(ne(l,Ee(T=>T.length>0),De(g,f),pe(([T,w,C])=>{const k=T.reduce((I,P,D)=>Jt(I,P,oa(P,w.offsetTree,C)||D),ko());return{...w,groupIndices:T,groupOffsetTree:k}})),g),xe(ne(r,De(g),Ee(([T,{lastIndex:w}])=>T<w),pe(([T,{lastIndex:w,lastSize:C}])=>[{endIndex:w,size:C,startIndex:T}])),n),xe(c,u);const y=Vt(ne(c,pe(T=>T===void 0)),!0);xe(ne(u,Ee(T=>T!==void 0&&tt(Lt(g).sizeTree)),pe(T=>[{endIndex:0,size:T,startIndex:0}])),n);const v=en(ne(n,De(g),In(({sizes:T},[w,C])=>({changed:C!==T,sizes:C}),{changed:!1,sizes:h}),pe(T=>T.changed)));Ke(ne(s,In((T,w)=>({diff:T.prev-w,prev:w}),{diff:0,prev:0}),pe(T=>T.diff)),T=>{const{groupIndices:w}=Lt(g);if(T>0)_e(t,!0),_e(i,T+iv(T,w));else if(T<0){const C=Lt(m);C.length>0&&(T-=iv(-T,C)),_e(a,T)}}),Ke(ne(s,De(e)),([T,w])=>{T<0&&w("`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},tn.ERROR)});const x=en(i);xe(ne(i,De(g),pe(([T,w])=>{const C=w.groupIndices.length>0,k=[],I=w.lastSize;if(C){const P=na(w.sizeTree,0);let D=0,N=0;for(;D<T;){const R=w.groupIndices[N],O=w.groupIndices.length===N+1?1/0:w.groupIndices[N+1]-R-1;k.push({endIndex:R,size:P,startIndex:R}),k.push({endIndex:R+1+O-1,size:I,startIndex:R+1}),N++,D+=O+1}const V=zr(w.sizeTree);return D!==T&&V.shift(),V.reduce((R,{k:O,v:M})=>{let L=R.ranges;return R.prevSize!==0&&(L=[...R.ranges,{endIndex:O+T-1,size:R.prevSize,startIndex:R.prevIndex}]),{prevIndex:O+T,prevSize:M,ranges:L}},{prevIndex:T,prevSize:0,ranges:k}).ranges}return zr(w.sizeTree).reduce((P,{k:D,v:N})=>({prevIndex:D+T,prevSize:N,ranges:[...P.ranges,{endIndex:D+T-1,size:P.prevSize,startIndex:P.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(ne(a,De(g,f),pe(([T,{offsetTree:w},C])=>{const k=-T;return oa(k,w,C)})));return xe(ne(a,De(g,f),pe(([T,w,C])=>{if(w.groupIndices.length>0){if(tt(w.sizeTree))return w;let k=ko();const I=Lt(m);let P=0,D=0,N=0;for(;P<-T;){N=I[D];const V=I[D+1]-N-1;D++,P+=V+1}if(k=zr(w.sizeTree).reduce((V,{k:R,v:O})=>Jt(V,Math.max(0,R+T),O),k),P!==-T){const V=na(w.sizeTree,N);k=Jt(k,0,V);const R=wn(w.sizeTree,-T+1)[1];k=Jt(k,1,R)}return{...w,sizeTree:k,...hd(w.offsetTree,0,k,C)}}else{const k=zr(w.sizeTree).reduce((I,{k:P,v:D})=>Jt(I,Math.max(0,P+T),D),ko());return{...w,sizeTree:k,...hd(w.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:v,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:y,unshiftWith:i}},st(Sr,Jf),{singleton:!0});function qj(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const jw=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=ze(),a=ze(),s=en(ne(i,pe(qj)));return xe(ne(s,pe(l=>l.totalCount)),n),xe(ne(s,pe(l=>l.groupIndices)),e),xe(ne(Rt(o,t,r),Ee(([l,c])=>Tl(c)),pe(([l,c,u])=>wn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),it(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},st(zn,Wt)),Er=qe(([{log:e}])=>{const t=se(!1),n=en(ne(t,Ee(r=>r),it()));return Ke(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},st(Sr),{singleton:!0}),Uj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Nw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Uj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ta=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=ze(),h=ze(),g=se(0);let m=null,y=null,v=null;function x(){m&&(m(),m=null),v&&(v(),v=null),y&&(clearTimeout(y),y=null),_e(l,!1)}return xe(ne(f,De(n,d,r,g,s,a,p),De(e,i,o),pe(([[S,T,w,C,k,I,P,D],N,V,R])=>{const O=Nw(S),{align:M,behavior:L,offset:j}=O,$=C-1,_=Dw(O,T,$);let z=oa(_,T.offsetTree,N)+I;M==="end"?(z+=V+wn(T.sizeTree,_)[1]-w+R,_===$&&(z+=P)):M==="center"?z+=(V+wn(T.sizeTree,_)[1]-w+R)/2:z-=k,j&&(z+=j);const J=te=>{x(),te?(D("retrying to scroll to",{location:S},tn.DEBUG),_e(f,S)):(_e(h,!0),D("list did not change, scroll successful",{},tn.DEBUG))};if(x(),L==="smooth"){let te=!1;v=Ke(t,ee=>{te=te||ee}),m=Nn(u,()=>{J(te)})}else m=Nn(ne(t,Gj(150)),J);return y=setTimeout(()=>{x()},1200),_e(l,!0),D("scrolling from index to",{behavior:L,index:_,top:z},tn.DEBUG),{behavior:L,top:z}})),c),{scrollTargetReached:h,scrollToIndex:f,topListHeight:g}},st(zn,Wt,Sr),{singleton:!0});function Gj(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function tp(e,t){e==0?t():requestAnimationFrame(()=>{tp(e-1,t)})}function np(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Sa=qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),l=se(0),c=se(!0);return xe(ne(a,De(l),Ee(([u,d])=>!!d),Cn(!1)),s),xe(ne(a,De(l),Ee(([u,d])=>!!d),Cn(!1)),c),Ke(ne(Rt(t,a),De(s,n,e,c),Ee(([[,u],d,{sizeTree:p},f,h])=>u&&(!tt(p)||Kf(f))&&!d&&!h),De(l)),([,u])=>{Nn(o,()=>{_e(c,!0)}),tp(4,()=>{Nn(r,()=>{_e(s,!0)}),_e(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},st(zn,Wt,Ta,Er),{singleton:!0});function Fw(e,t){return Math.abs(e-t)<1.01}const ia="up",Vi="down",Yj="none",Kj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Zj=0,Ea=qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=ze(),c=ze(),u=se(4),d=se(Zj),p=Vt(ne(nv(ne(ke(o),Go(1),Cn(!0)),ne(ke(o),Go(1),Cn(!1),tv(100))),it()),!1),f=Vt(ne(nv(ne(n,Cn(!0)),ne(n,Cn(!1),tv(200))),it()),!1);xe(ne(Rt(ke(o),ke(d)),pe(([v,x])=>v<=x),it()),s),xe(ne(s,lr(50)),c);const h=en(ne(Rt(r,ke(i),ke(t),ke(e),ke(u)),In((v,[{scrollHeight:x,scrollTop:S},T,w,C,k])=>{const I=S+T-x>-k,P={scrollHeight:x,scrollTop:S,viewportHeight:T};if(I){let N,V;return S>v.state.scrollTop?(N="SCROLLED_DOWN",V=v.state.scrollTop-S):(N="SIZE_DECREASED",V=v.state.scrollTop-S||v.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:V,state:P}}let D;return P.scrollHeight>v.state.scrollHeight?D="SIZE_INCREASED":T<v.state.viewportHeight?D="VIEWPORT_HEIGHT_DECREASING":S<v.state.scrollTop?D="SCROLLING_UPWARDS":D="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:D,state:P}},Kj),it((v,x)=>v&&v.atBottom===x.atBottom))),g=Vt(ne(r,In((v,{scrollHeight:x,scrollTop:S,viewportHeight:T})=>{if(Fw(v.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:S};{const w=x-(S+T)<1;return v.scrollTop!==S&&w?{changed:!0,jump:v.scrollTop-S,scrollHeight:x,scrollTop:S}:{changed:!0,jump:0,scrollHeight:x,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ee(v=>v.changed),pe(v=>v.jump)),0);xe(ne(h,pe(v=>v.atBottom)),a),xe(ne(a,lr(50)),l);const m=se(Vi);xe(ne(r,pe(({scrollTop:v})=>v),it(),In((v,x)=>Lt(f)?{direction:v.direction,prevScrollTop:x}:{direction:x<v.prevScrollTop?ia:Vi,prevScrollTop:x},{direction:Vi,prevScrollTop:0}),pe(v=>v.direction)),m),xe(ne(r,lr(50),Cn(Yj)),m);const y=se(0);return xe(ne(p,Ee(v=>!v),Cn(0)),y),xe(ne(o,lr(100),De(p),Ee(([v,x])=>!!x),In(([v,x],[S])=>[x,S],[0,0]),pe(([v,x])=>x-v)),y),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:y}},st(Wt)),Ps="top",As="bottom",av="none";function sv(e,t,n){return typeof e=="number"?n===ia&&t===Ps||n===Vi&&t===As?e:0:n===ia?t===Ps?e.main:e.reverse:t===As?e.main:e.reverse}function lv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const rp=qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=ze(),a=se(0),s=se(0),l=se(0),c=Vt(ne(Rt(ke(r),ke(o),ke(n),ke(i,ra),ke(l),ke(a),ke(t),ke(e),ke(s)),pe(([u,d,p,[f,h],g,m,y,v,x])=>{const S=u-v,T=m+y,w=Math.max(p-S,0);let C=av;const k=lv(x,Ps),I=lv(x,As);return f-=v,f+=p+y,h+=p+y,h-=v,f>u+T-k&&(C=ia),h<u-w+d+I&&(C=Vi),C!==av?[Math.max(S-p-sv(g,Ps,C)-k,0),S-w-y+d+sv(g,As,C)+I]:null}),Ee(u=>u!=null),it(ra)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},st(Wt),{singleton:!0});function Xj(e,t,n){if(Tl(t)){const r=Mw(e,t);return[{index:wn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const eu={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function is(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,h=p-u;return{bottom:u,firstItemIndex:i,items:cv(e,o,i),offsetBottom:h,offsetTop:c,top:f,topItems:cv(t,o,i),topListHeight:t.reduce((g,m)=>m.size+g,0),totalCount:n}}function Lw(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=np(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return is(c,[],s,o,n,r)}function cv(e,t,n){if(e.length===0)return[];if(!Tl(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=wl(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 ao=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:h}])=>{const g=se([]),m=se(0),y=ze();xe(i.topItemsIndexes,g);const v=Vt(ne(Rt(f,h,ke(l,ra),ke(o),ke(r),ke(c),u,ke(g),ke(t),ke(n),e),Ee(([w,C,,k,,,,,,,I])=>{const P=I&&I.length!==k;return w&&!C&&!P}),pe(([,,[w,C],k,I,P,D,N,V,R,O])=>{const M=I,{offsetTree:L,sizeTree:j}=M,$=Lt(m);if(k===0)return{...eu,totalCount:k};if(w===0&&C===0)return $===0?{...eu,totalCount:k}:Lw($,P,I,V,R,O||[]);if(tt(j))return $>0?null:is(Xj(np(P,k),M,O),[],k,R,M,V);const _=[];if(N.length>0){const Z=N[0],U=N[N.length-1];let G=0;for(const F of wl(j,Z,U)){const W=F.value,Y=Math.max(F.start,Z),ie=Math.min(F.end,U);for(let B=Y;B<=ie;B++)_.push({data:O==null?void 0:O[B],index:B,offset:G,size:W}),G+=W}}if(!D)return is([],_,k,R,M,V);const z=N.length>0?N[N.length-1]+1:0,J=Vj(L,w,C,z);if(J.length===0)return null;const te=k-1,ee=bl([],Z=>{for(const U of J){const G=U.value;let F=G.offset,W=U.start;const Y=G.size;if(G.offset<w){W+=Math.floor((w-G.offset+R)/(Y+R));const B=W-U.start;F+=B*Y+B*R}W<z&&(F+=(z-W)*Y,W=z);const ie=Math.min(U.end,te);for(let B=W;B<=ie&&!(F>=C);B++)Z.push({data:O==null?void 0:O[B],index:B,offset:F,size:Y}),F+=Y+R}});return is(ee,_,k,R,M,V)}),Ee(w=>w!==null),it()),eu);xe(ne(e,Ee(Kf),pe(w=>w==null?void 0:w.length)),o),xe(ne(v,pe(w=>w.topListHeight)),d),xe(d,s),xe(ne(v,pe(w=>[w.top,w.bottom])),a),xe(ne(v,pe(w=>w.items)),y);const x=en(ne(v,Ee(({items:w})=>w.length>0),De(o,e),Ee(([{items:w},C])=>w[w.length-1].originalIndex===C-1),pe(([,w,C])=>[w-1,C]),it(ra),pe(([w])=>w))),S=en(ne(v,lr(200),Ee(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),pe(({items:w})=>w[0].index),it())),T=en(ne(v,Ee(({items:w})=>w.length>0),pe(({items:w})=>{let C=0,k=w.length-1;for(;w[C].type==="group"&&C<k;)C++;for(;w[k].type==="group"&&k>C;)k--;return{endIndex:w[k].index,startIndex:w[C].index}}),it(Ow)));return{endReached:x,initialItemCount:m,itemsRendered:y,listState:v,rangeChanged:T,startReached:S,topItemsIndexes:g,...p}},st(zn,jw,rp,Sa,Ta,Ea,Er,Jf),{singleton:!0}),Vw=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=ze(),a=Vt(ne(Rt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(ke(a),i),{totalListHeight:a,totalListHeightChanged:i}},st(Wt,ao),{singleton:!0}),Qj=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Vt(ne(Rt(n,e,t),Ee(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),lr(0),it()),0);return{alignToBottom:n,paddingTopAddition:r}},st(Wt,Vw),{singleton:!0});function uv(e){return e?e==="smooth"?"smooth":"auto":!1}const Jj=(e,t)=>typeof e=="function"?uv(e(t)):t&&uv(e),eN=qe(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=se(!1),d=ze();let p=null;function f(g){_e(o,{align:"end",behavior:g,index:"LAST"})}Ke(ne(Rt(ne(ke(t),Go(1)),a),De(ke(u),r,i,c),pe(([[g,m],y,v,x,S])=>{let T=m&&x,w="auto";return T&&(w=Jj(y,v||S),T=T&&!!w),{followOutputBehavior:w,shouldFollow:T,totalCount:g}}),Ee(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:m})=>{p&&(p(),p=null),p=Nn(e,()=>{Lt(l)("following output to ",{totalCount:m},tn.DEBUG),f(g),p=null})});function h(g){const m=Nn(n,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(m,100)}return Ke(ne(Rt(ke(u),t,s),Ee(([g,,m])=>g&&m),In(({value:g},[,m])=>({refreshed:g===m,value:m}),{refreshed:!1,value:0}),Ee(({refreshed:g})=>g),De(u,t)),([,g])=>{Lt(i)&&h(g!==!1)}),Ke(d,()=>{h(Lt(u)!==!1)}),Ke(Rt(ke(u),n),([g,m])=>{g&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},st(zn,Ea,Ta,Sa,Er,Sr,Wt)),tN=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(ne(s,De(i),Ee(([,l])=>l!==0),De(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>Lw(l,c,u,d,p,f))),a),{}),st(zn,Sa,ao,Er),{singleton:!0}),nN=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return Ke(ne(e,De(r),Ee(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Nn(ne(n,Go(1),Ee(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{_e(t,o)})})}),{initialScrollTop:r}},st(Er,Wt,ao),{singleton:!0}),rN=({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,oN=qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=ze();return xe(ne(u,De(t,l,n,i,o,r,s),De(e),pe(([[d,p,f,h,g,m,y,v],x])=>{const{align:S,behavior:T,calculateViewLocation:w=rN,done:C,...k}=d,I=Dw(d,p,h-1),P=oa(I,p.offsetTree,x)+g+m,D=P+wn(p.sizeTree,I)[1],N=v+m,V=v+f-y,R=w({itemBottom:D,itemTop:P,locationParams:{align:S,behavior:T,...k},viewportBottom:V,viewportTop:N});return R?C&&Nn(ne(a,Ee(O=>!O),Go(Lt(a)?1:2)),C):C&&C(),R}),Ee(d=>d!==null)),c),{scrollIntoView:u}},st(zn,Wt,Ta,ao,Sr),{singleton:!0}),zw=qe(([{scrollVelocity:e}])=>{const t=se(!1),n=ze(),r=se(!1);return xe(ne(e,De(r,t,n),Ee(([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}),it()),t),Ke(ne(Rt(t,e,n),De(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},st(Ea),{singleton:!0}),op=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=ze(),r=ze(),o=ze(),i=se(!1),a=se(void 0);return xe(ne(Rt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(ne(t,De(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},st(Wt)),iN=qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=ze(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(l,p),Ke(ne(c,De(t,r,a,d,p,n)),([f,h,g,m,y,v,x])=>{const S=$j(h.sizeTree);m&&y!==null&&v!==null&&(g=y.scrollTop-v.offsetTop),g-=x,f({ranges:S,scrollTop:g})}),xe(ne(u,Ee(Kf),pe(aN)),o),xe(ne(i,De(u),Ee(([,f])=>f!==void 0),it(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},st(zn,Wt,Sa,Er,op));function aN(e){return{align:"start",index:0,offset:e.scrollTop}}const sN=qe(([{topItemsIndexes:e}])=>{const t=se(0);return xe(ne(t,Ee(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},st(ao));function $w(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const lN=$w(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),cN=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:h}])=>{const g=en(ne(l,De(a),In(([,y,v,x],[{bottom:S,items:T,offsetBottom:w,totalCount:C},k])=>{const I=S+w;let P=0;return v===C&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(P=I-x,P!==0&&(P+=k))),[P,T,C,I]},[0,[],0,0]),Ee(([y])=>y!==0),De(r,s,n,o,f,h),Ee(([,y,v,x,,,S])=>!S&&!x&&y!==0&&v===ia),pe(([[y],,,,,v])=>(v("Upward scrolling compensation",{amount:y},tn.DEBUG),y))));function m(y){y>0?(_e(t,{behavior:"auto",top:-y}),_e(e,0)):(_e(e,0),_e(t,{behavior:"auto",top:-y}))}return Ke(ne(g,De(e,i)),([y,v,x])=>{x&&lN()?_e(e,v-y):m(-y)}),Ke(ne(Rt(Vt(i,!1),e,h),Ee(([y,v,x])=>!y&&!x&&v!==0),pe(([y,v])=>v),lr(1)),m),xe(ne(d,pe(y=>({top:-y}))),t),Ke(ne(c,De(p,u),pe(([y,{groupIndices:v,lastSize:x,sizeTree:S},T])=>{function w(C){return C*(x+T)}if(v.length===0)return w(y);{let C=0;const k=na(S,0);let I=0,P=0;for(;I<y;){I++,C+=k;let D=v.length===P+1?1/0:v[P+1]-v[P]-1;I+D>y&&(C-=k,D=y-I+1),I+=D,C+=w(D),P++}return C}})),y=>{_e(e,y),requestAnimationFrame(()=>{_e(t,{top:y}),requestAnimationFrame(()=>{_e(e,0),_e(h,!1)})})}),{deviation:e}},st(Wt,Ea,ao,zn,Sr,Jf)),uN=qe(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),st(rp,tN,Er,zw,Vw,nN,Qj,op,oN,Sr)),Bw=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:h},g,m,y,{listState:v,topItemsIndexes:x,...S},{scrollToIndex:T},w,{topItemCount:C},{groupCounts:k},I])=>(xe(S.rangeChanged,I.scrollSeekRangeChanged),xe(ne(I.windowViewportRect,pe(P=>P.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h,sizeRanges:s,topItemCount:C,topItemsIndexes:x,totalCount:u,...y,groupIndices:i,itemSize:a,listState:v,scrollToIndex:T,statefulTotalCount:c,trackItemSizes:d,...S,...I,...g,sizes:l,...m}),st(zn,Sa,Wt,iN,eN,ao,Ta,cN,sN,jw,uN));function dN(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 Wa=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ip(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=E.createContext({});function l(m,y){m.propsReady&&_e(m.propsReady,!1);for(const v of r){const x=m[t.required[v]];_e(x,y[v])}for(const v of o)if(v in y){const x=m[t.optional[v]];_e(x,y[v])}m.propsReady&&_e(m.propsReady,!0)}function c(m){return i.reduce((y,v)=>(y[v]=x=>{const S=m[t.methods[v]];_e(S,x)},y),{})}function u(m){return a.reduce((y,v)=>(y[v]=Rj(m[t.events[v]]),y),{})}const d=E.forwardRef((m,y)=>{const{children:v,...x}=m,[S]=E.useState(()=>bl(Aj(e),C=>{l(C,x)})),[T]=E.useState(ev(u,S));Wa(()=>{for(const C of a)C in x&&Ke(T[C],x[C]);return()=>{Object.values(T).map(Zf)}},[x,T,S]),Wa(()=>{l(S,x)}),E.useImperativeHandle(y,Jg(c(S)));const w=n;return b.jsx(s.Provider,{value:S,children:n?b.jsx(w,{...dN([...r,...o,...a],x),children:v}):v})}),p=m=>E.useCallback(Sw(_e,E.useContext(s)[m]),[m]),f=m=>{const y=E.useContext(s)[m],v=E.useCallback(x=>Ke(y,x),[y]);return E.useSyncExternalStore(v,()=>Lt(y),()=>Lt(y))},h=m=>{const y=E.useContext(s)[m],[v,x]=E.useState(ev(Lt,y));return Wa(()=>Ke(y,S=>{S!==v&&x(Jg(S))}),[y,v]),v},g=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(m,y)=>{const v=E.useContext(s)[m];Wa(()=>Ke(v,y),[y,v])},useEmitterValue:g,usePublisher:p}}const Sl=E.createContext(void 0),Hw=E.createContext(void 0),Ww=typeof document<"u"?E.useLayoutEffect:E.useEffect;function tu(e){return"self"in e}function fN(e){return"body"in e}function qw(e,t,n,r=hi,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,h,g;const m=p.target;if(fN(m)||tu(m)){const v=tu(m)?m:m.defaultView;g=i?v.scrollX:v.scrollY,f=i?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight,h=i?v.innerWidth:v.innerHeight}else g=i?m.scrollLeft:m.scrollTop,f=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const y=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:h})};p.suppressFlushSync?y():ua.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===f-h)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.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 h=p.behavior==="smooth";let g,m,y;tu(f)?(m=Math.max(Tn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,y=i?window.scrollX:window.scrollY):(m=f[i?"scrollWidth":"scrollHeight"],g=Tn(f,i?"width":"height"),y=f[i?"scrollLeft":"scrollTop"]);const v=m-g;if(p.top=Math.ceil(Math.max(Math.min(v,p.top),0)),Fw(g,m)||p.top===y){e({scrollHeight:m,scrollTop:y,viewportHeight:g}),h&&t(!0);return}h?(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 nu="-webkit-sticky",dv="sticky",Uw=$w(()=>{if(typeof document>"u")return dv;const e=document.createElement("div");return e.style.position=nu,e.style.position===nu?nu:dv});function ap(e){return e}const pN=qe(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(ap),i=se("div"),a=se(hi),s=(l,c=null)=>Vt(ne(r,pe(u=>u[l]),it()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),hN=qe(([e,t])=>({...e,...t}),st(Bw,pN)),mN=({height:e})=>b.jsx("div",{style:{height:e}}),gN={overflowAnchor:"none",position:Uw(),zIndex:1},Gw={overflowAnchor:"none"},vN={...Gw,display:"inline-block",height:"100%"},fv=E.memo(function({showTopList:e=!1}){const t=Pe("listState"),n=sn("sizeRanges"),r=Pe("useWindowScroll"),o=Pe("customScrollParent"),i=sn("windowScrollContainerState"),a=sn("scrollContainerState"),s=o||r?i:a,l=Pe("itemContent"),c=Pe("context"),u=Pe("groupContent"),d=Pe("trackItemSizes"),p=Pe("itemSize"),f=Pe("log"),h=sn("gap"),g=Pe("horizontalDirection"),{callbackRef:m}=Cw(n,p,d,e?hi:s,f,h,o,g,Pe("skipAnimationFrameInResizeObserver")),[y,v]=E.useState(0);cp("deviation",R=>{y!==R&&v(R)});const x=Pe("EmptyPlaceholder"),S=Pe("ScrollSeekPlaceholder")||mN,T=Pe("ListComponent"),w=Pe("ItemComponent"),C=Pe("GroupComponent"),k=Pe("computeItemKey"),I=Pe("isSeeking"),P=Pe("groupIndices").length>0,D=Pe("alignToBottom"),N=Pe("initialItemFinalLocationReached"),V=e?{}:{boxSizing:"border-box",...g?{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},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?b.jsx(x,{...at(x,c)}):b.jsx(T,{...at(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:V,children:(e?t.topItems:t.items).map(R=>{const O=R.originalIndex,M=k(O+t.firstItemIndex,R.data,c);return I?E.createElement(S,{...at(S,c),height:R.size,index:R.index,key:M,type:R.type||"item",...R.type==="group"?{}:{groupIndex:R.groupIndex}}):R.type==="group"?E.createElement(C,{...at(C,c),"data-index":O,"data-item-index":R.index,"data-known-size":R.size,key:M,style:gN},u(R.index,c)):E.createElement(w,{...at(w,c),...Yw(w,R.data),"data-index":O,"data-item-group-index":R.groupIndex,"data-item-index":R.index,"data-known-size":R.size,key:M,style:g?vN:Gw},P?l(R.index,R.groupIndex,R.data,c):l(R.index,R.data,c))})})}),yN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},xN={outline:"none",overflowX:"auto",position:"relative"},mi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),bN={position:Uw(),top:0,width:"100%",zIndex:1};function at(e,t){if(typeof e!="string")return{context:t}}function Yw(e,t){return{item:typeof e=="string"?void 0:t}}const wN=E.memo(function(){const e=Pe("HeaderComponent"),t=sn("headerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...at(e,o)})}):null}),TN=E.memo(function(){const e=Pe("FooterComponent"),t=sn("footerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...at(e,o)})}):null});function sp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.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:h}=qw(a,l,s,c,void 0,d);return e("scrollTo",h),e("scrollBy",p),b.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?xN:yN,...o},tabIndex:0,...i,...at(s,u),children:r})})}function lp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.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=E.useRef(null),h=t("scrollerRef"),{scrollByCallback:g,scrollerRef:m,scrollToCallback:y}=qw(a,l,s,h,d);return Ww(()=>{var v;return m.current=d||((v=f.current)==null?void 0:v.ownerDocument.defaultView),()=>{m.current=null}},[m,d]),e("windowScrollTo",y),e("scrollBy",g),b.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...at(s,p),children:r})})}const SN=({children:e})=>{const t=E.useContext(Sl),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Pe("alignToBottom"),i=Pe("horizontalDirection"),a=E.useMemo(()=>ea(n,l=>Tn(l,i?"width":"height")),[n,i]),s=Fn(a,!0,Pe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:s,style:mi(o),children:e})},EN=({children:e})=>{const t=E.useContext(Sl),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Pe("customScrollParent"),i=Qf(n,o,Pe("skipAnimationFrameInResizeObserver")),a=Pe("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:mi(a),children:e})},CN=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...bN,marginTop:`${n}px`},o=Pe("context");return b.jsx(t,{style:r,...at(t,o),children:e})},kN=E.memo(function(e){const t=Pe("useWindowScroll"),n=Pe("topItemsIndexes").length>0,r=Pe("customScrollParent"),o=Pe("context"),i=r||t?AN:PN,a=r||t?EN:SN;return b.jsxs(i,{...e,...at(i,o),children:[n&&b.jsx(CN,{children:b.jsx(fv,{showTopList:!0})}),b.jsxs(a,{children:[b.jsx(wN,{}),b.jsx(fv,{}),b.jsx(TN,{})]})]})}),{Component:RN,useEmitter:cp,useEmitterValue:Pe,usePublisher:sn}=ip(hN,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},kN),PN=sp({useEmitter:cp,useEmitterValue:Pe,usePublisher:sn}),AN=lp({useEmitter:cp,useEmitterValue:Pe,usePublisher:sn}),up=RN,IN=qe(()=>{const e=se(l=>b.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(ap),a=se(hi),s=(l,c=null)=>Vt(ne(o,pe(u=>u[l]),it()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),ON=qe(([e,t])=>({...e,...t}),st(Bw,IN)),_N=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{height:e}})}),MN=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{border:0,height:e,padding:0}})}),DN={overflowAnchor:"none"},pv=E.memo(function({showTopList:e=!1}){const t=Me("listState"),n=Me("computeItemKey"),r=Me("firstItemIndex"),o=Me("isSeeking"),i=Me("ScrollSeekPlaceholder")||_N,a=Me("context"),s=Me("TableRowComponent"),l=Me("fixedHeaderHeight"),c=Me("itemContent"),u=(e?t.topItems:[]).reduce((p,f,h)=>(h===0?p.push(f.size):p.push(p[h-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,h=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...at(i,a),height:p.size,index:p.index,key:h,type:p.type||"item"}):E.createElement(s,{...at(s,a),...Yw(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:h,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:DN},c(p.index,p.data,a))});return b.jsx(b.Fragment,{children:d})}),jN=E.memo(function(){const e=Me("listState"),t=Me("topItemsIndexes").length>0,n=xn("sizeRanges"),r=Me("useWindowScroll"),o=Me("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Me("trackItemSizes"),c=Me("itemSize"),u=Me("log"),{callbackRef:d,ref:p}=Cw(n,c,l,s,u,void 0,o,!1,Me("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);dp("deviation",P=>{f!==P&&(p.current.style.marginTop=`${P}px`,h(P))});const g=Me("EmptyPlaceholder"),m=Me("FillerRow")||MN,y=Me("TableBodyComponent"),v=Me("paddingTopAddition"),x=Me("statefulTotalCount"),S=Me("context");if(x===0&&g)return b.jsx(g,{...at(g,S)});const T=(t?e.topItems:[]).reduce((P,D)=>P+D.size,0),w=e.offsetTop+v+f-T,C=e.offsetBottom,k=w>0?b.jsx(m,{context:S,height:w},"padding-top"):null,I=C>0?b.jsx(m,{context:S,height:C},"padding-bottom"):null;return b.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...at(y,S),children:[k,t&&b.jsx(pv,{showTopList:!0}),b.jsx(pv,{}),I]})}),NN=({children:e})=>{const t=E.useContext(Sl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Fn(E.useMemo(()=>ea(n,i=>Tn(i,"height")),[n]),!0,Me("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:o,style:mi(!1),children:e})},FN=({children:e})=>{const t=E.useContext(Sl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Me("customScrollParent"),i=Qf(n,o,Me("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:mi(!1),children:e})},LN=E.memo(function(e){const t=Me("useWindowScroll"),n=Me("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=Me("fixedHeaderContent"),a=Me("fixedFooterContent"),s=Me("context"),l=Fn(E.useMemo(()=>ea(r,y=>Tn(y,"height")),[r]),!0,Me("skipAnimationFrameInResizeObserver")),c=Fn(E.useMemo(()=>ea(o,y=>Tn(y,"height")),[o]),!0,Me("skipAnimationFrameInResizeObserver")),u=n||t?$N:zN,d=n||t?FN:NN,p=Me("TableComponent"),f=Me("TableHeadComponent"),h=Me("TableFooterComponent"),g=i?b.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...at(f,s),children:i()},"TableHead"):null,m=a?b.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...at(h,s),children:a()},"TableFoot"):null;return b.jsx(u,{...e,...at(u,s),children:b.jsx(d,{children:b.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...at(p,s),children:[g,b.jsx(jN,{},"TableBody"),m]})})})}),{Component:VN,useEmitter:dp,useEmitterValue:Me,usePublisher:xn}=ip(ON,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},LN),zN=sp({useEmitter:dp,useEmitterValue:Me,usePublisher:xn}),$N=lp({useEmitter:dp,useEmitterValue:Me,usePublisher:xn}),BN=VN,hv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},HN={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:mv,floor:Is,max:zi,min:ru,round:gv}=Math;function vv(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function WN(e){return{...HN,items:e}}function qa(e,t){return e&&e.width===t.width&&e.height===t.height}function qN(e,t){return e&&e.column===t.column&&e.row===t.row}const UN=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:h,propsReady:g},{customScrollParent:m,useWindowScroll:y,windowScrollContainerState:v,windowScrollTo:x,windowViewportRect:S},T])=>{const w=se(0),C=se(0),k=se(hv),I=se({height:0,width:0}),P=se({height:0,width:0}),D=ze(),N=ze(),V=se(0),R=se(null),O=se({column:0,row:0}),M=ze(),L=ze(),j=se(!1),$=se(0),_=se(!0),z=se(!1),J=se(!1);Ke(ne(h,De($),Ee(([F,W])=>!!W)),()=>{_e(_,!1)}),Ke(ne(Rt(h,_,P,I,$,z),Ee(([F,W,Y,ie,,B])=>F&&!W&&Y.height!==0&&ie.height!==0&&!B)),([,,,,F])=>{_e(z,!0),tp(1,()=>{_e(D,F)}),Nn(ne(c),()=>{_e(t,[0,0]),_e(_,!0)})}),xe(ne(L,Ee(F=>F!=null&&F.scrollTop>0),Cn(0)),C),Ke(ne(h,De(L),Ee(([,F])=>F!=null)),([,F])=>{F&&(_e(I,F.viewport),_e(P,F.item),_e(O,F.gap),F.scrollTop>0&&(_e(j,!0),Nn(ne(c,Go(1)),W=>{_e(j,!1)}),_e(l,{top:F.scrollTop})))}),xe(ne(I,pe(({height:F})=>F)),d),xe(ne(Rt(ke(I,qa),ke(P,qa),ke(O,(F,W)=>F&&F.column===W.column&&F.row===W.row),ke(c)),pe(([F,W,Y,ie])=>({gap:Y,item:W,scrollTop:ie,viewport:F}))),M),xe(ne(Rt(ke(w),r,ke(O,qN),ke(P,qa),ke(I,qa),ke(R),ke(C),ke(j),ke(_),ke($)),Ee(([,,,,,,,F])=>!F),pe(([F,[W,Y],ie,B,ye,Te,Ie,,Fe,ae])=>{const{column:ve,row:K}=ie,{height:le,width:Q}=B,{width:oe}=ye;if(Ie===0&&(F===0||oe===0))return hv;if(Q===0){const fn=np(ae,F),Sn=fn+Math.max(Ie-1,0);return WN(vv(fn,Sn,Te))}const be=Kw(oe,Q,ve);let X,ce;Fe?W===0&&Y===0&&Ie>0?(X=0,ce=Ie-1):(X=be*Is((W+K)/(le+K)),ce=be*mv((Y+K)/(le+K))-1,ce=ru(F-1,zi(ce,be-1)),X=ru(ce,zi(0,X))):(X=0,ce=-1);const Re=vv(X,ce,Te),{bottom:$e,top:xt}=yv(ye,ie,B,Re),ut=mv(F/be),_t=ut*le+(ut-1)*K-$e;return{bottom:$e,itemHeight:le,items:Re,itemWidth:Q,offsetBottom:_t,offsetTop:xt,top:xt}})),k),xe(ne(R,Ee(F=>F!==null),pe(F=>F.length)),w),xe(ne(Rt(I,P,k,O),Ee(([F,W,{items:Y}])=>Y.length>0&&W.height!==0&&F.height!==0),pe(([F,W,{items:Y},ie])=>{const{bottom:B,top:ye}=yv(F,ie,W,Y);return[ye,B]}),it(ra)),t);const te=se(!1);xe(ne(c,De(te),pe(([F,W])=>W||F!==0)),te);const ee=en(ne(Rt(k,w),Ee(([{items:F}])=>F.length>0),De(te),Ee(([[F,W],Y])=>{const ie=F.items[F.items.length-1].index===W-1;return(Y||F.bottom>0&&F.itemHeight>0&&F.offsetBottom===0&&F.items.length===W)&&ie}),pe(([[,F]])=>F-1),it())),Z=en(ne(ke(k),Ee(({items:F})=>F.length>0&&F[0].index===0),Cn(0),it())),U=en(ne(ke(k),De(j),Ee(([{items:F},W])=>F.length>0&&!W),pe(([{items:F}])=>({endIndex:F[F.length-1].index,startIndex:F[0].index})),it(Ow),lr(0)));xe(U,f.scrollSeekRangeChanged),xe(ne(D,De(I,P,w,O),pe(([F,W,Y,ie,B])=>{const ye=Nw(F),{align:Te,behavior:Ie,offset:Fe}=ye;let ae=ye.index;ae==="LAST"&&(ae=ie-1),ae=zi(0,ae,ru(ie-1,ae));let ve=md(W,B,Y,ae);return Te==="end"?ve=gv(ve-W.height+Y.height):Te==="center"&&(ve=gv(ve-W.height/2+Y.height/2)),Fe&&(ve+=Fe),{behavior:Ie,top:ve}})),l);const G=Vt(ne(k,pe(F=>F.offsetBottom+F.bottom)),0);return xe(ne(S,pe(F=>({height:F.visibleHeight,width:F.visibleWidth}))),I),{customScrollParent:m,data:R,deviation:V,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:P,overscan:n,restoreStateFrom:L,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:D,scrollTop:c,smoothScrollTargetReached:u,totalCount:w,useWindowScroll:y,viewportDimensions:I,windowScrollContainerState:v,windowScrollTo:x,windowViewportRect:S,...f,gridState:k,horizontalDirection:J,initialTopMostItemIndex:$,totalListHeight:G,...p,endReached:ee,propsReady:g,rangeChanged:U,startReached:Z,stateChanged:M,stateRestoreInProgress:j,...T}},st(rp,Wt,Ea,zw,Er,op,Sr));function Kw(e,t,n){return zi(1,Is((e+n)/(Is(t)+n)))}function yv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=md(e,t,n,r[0].index);return{bottom:md(e,t,n,r[r.length-1].index)+o,top:i}}function md(e,t,n,r){const o=Kw(e.width,n.width,t.column),i=Is(r/o),a=i*n.height+zi(0,i-1)*t.row;return a>0?a+t.row:a}const GN=qe(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(ap),a=se("div"),s=se(hi),l=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),it()),p),c=se(!1),u=se(!1);return xe(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")}}),YN=qe(([e,t])=>({...e,...t}),st(UN,GN)),KN=E.memo(function(){const e=lt("gridState"),t=lt("listClassName"),n=lt("itemClassName"),r=lt("itemContent"),o=lt("computeItemKey"),i=lt("isSeeking"),a=ln("scrollHeight"),s=lt("ItemComponent"),l=lt("ListComponent"),c=lt("ScrollSeekPlaceholder"),u=lt("context"),d=ln("itemDimensions"),p=ln("gap"),f=lt("log"),h=lt("stateRestoreInProgress"),g=ln("reportReadyState"),m=Fn(E.useMemo(()=>y=>{const v=y.parentElement.parentElement.scrollHeight;a(v);const x=y.firstChild;if(x){const{height:S,width:T}=x.getBoundingClientRect();d({height:S,width:T})}p({column:xv("column-gap",getComputedStyle(y).columnGap,f),row:xv("row-gap",getComputedStyle(y).rowGap,f)})},[a,d,p,f]),!0,!1);return Ww(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),h?null:b.jsx(l,{className:t,ref:m,...at(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const v=o(y.index,y.data,u);return i?b.jsx(c,{...at(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},v):E.createElement(s,{...at(s,u),className:n,"data-index":y.index,key:v},r(y.index,y.data,u))})})}),ZN=E.memo(function(){const e=lt("HeaderComponent"),t=ln("headerHeight"),n=lt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=lt("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...at(e,o)})}):null}),XN=E.memo(function(){const e=lt("FooterComponent"),t=ln("footerHeight"),n=lt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=lt("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...at(e,o)})}):null}),QN=({children:e})=>{const t=E.useContext(Hw),n=ln("itemDimensions"),r=ln("viewportDimensions"),o=Fn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.jsx("div",{ref:o,style:mi(!1),children:e})},JN=({children:e})=>{const t=E.useContext(Hw),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=lt("customScrollParent"),i=Qf(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.jsx("div",{ref:i,style:mi(!1),children:e})},eF=E.memo(function({...e}){const t=lt("useWindowScroll"),n=lt("customScrollParent"),r=n||t?nF:tF,o=n||t?JN:QN,i=lt("context");return b.jsx(r,{...e,...at(r,i),children:b.jsxs(o,{children:[b.jsx(ZN,{}),b.jsx(KN,{}),b.jsx(XN,{})]})})}),{useEmitter:Zw,useEmitterValue:lt,usePublisher:ln}=ip(YN,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},eF),tF=sp({useEmitter:Zw,useEmitterValue:lt,usePublisher:ln}),nF=lp({useEmitter:Zw,useEmitterValue:lt,usePublisher:ln});function xv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const fp=()=>{const e=E.useContext(ai);return e?e.tweaks:dl},Xw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>b.jsxs("span",{className:Ve("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:b.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:[i,e||r?b.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?b.jsx(ww,{as:"button",type:"button","aria-description":r,title:b.jsxs("span",{className:"cursor-help",children:[b.jsx("span",{className:"sr-only",children:r}),b.jsx(_b,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:b.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?b.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[b.jsx(Ib,{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}),b.jsx(HP,{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]}),o]}),Ca=E.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:h,componentName:g,placeholder:m,hideLeft:y=!1,required:v,disabled:x,reportStatus:S},T)=>{const w=fp(),C=S!==void 0?S:w.input.iconFeedback,k=d??f,I=Ot(),P=e??I.inputOptionalLabel;return b.jsxs("fieldset",{ref:T,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Ve("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[b.jsxs("label",{form:u,htmlFor:k,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:[b.jsx(Xw,{info:s,hideLeft:y,reportStatus:C,title:h,placeholder:m,children:P||n?b.jsxs(E.Fragment,{children:[v?null:b.jsx("span",{"aria-disabled":x,className:"text-opacity-70 aria-disabled:text-disabled",children:P}),n?b.jsx(E.Fragment,{children:n}):null]}):null}),b.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?b.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?b.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),b.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}),b.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})]})}),rF=e=>b.jsx(E.Fragment,{children:e.children}),oF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},iF={caseSensitive:!1,sort:!1},aF=[],sF=E.forwardRef(function(t,n){return b.jsx(pt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(vr,{children:t.children})})}),lF=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),cF={List:sF,Item:lF},go=320,ou=40,uF=E.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:h=!1,...g},m)=>{const y=E.useRef(null),v=E.useRef(null),x=g.value??g.defaultValue??"",S=Ot(),[T,w]=E.useState(()=>Math.min(go,ou*o.length)),[C,k]=E.useState(!1),[I,P]=E.useState(""),[D,N]=E.useState(x),[V,R]=E.useState(()=>{var K;return((K=o.find(le=>le.value===x))==null?void 0:K.label)??x}),[O,M]=E.useState(null),L=E.useRef(aF),j=h&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,$=new Vr(j,["value","label"],iF).search(I),_=()=>{k(!1),w(0)},z=$.filter(K=>K.hidden!==!0),J=h?void 0:`^(${o.map(K=>`${Xu(K.value)}${K.label?"|"+Xu(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(g.value){const K=o.find(le=>le.value===g.value);N((K==null?void 0:K.label)??g.value)}},[g.value]),E.useEffect(()=>{C||w(0)},[C]),E.useEffect(()=>{if(!C)return;const K=U.floating;if(K.current===null)return;let le=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min(z.length,10)).forEach(be=>{const X=be.getBoundingClientRect();le+=X.height});const oe=Math.min(le,go);w(oe)},[I,C]);const{x:te,y:ee,strategy:Z,refs:U,context:G}=ro({open:C,transform:!0,strategy:"absolute",onOpenChange:k,whileElementsMounted:ya,middleware:[xa(4),tw({padding:10,elementContext:"reference",apply(K){const le=y.current.getBoundingClientRect().width,Q=K.elements.floating.querySelector("ul"),oe=(Q==null?void 0:Q.getBoundingClientRect().height)||0,be=Math.min(oe<ou?go:oe,go);ua.flushSync(()=>setTimeout(()=>{const X=(Q==null?void 0:Q.getBoundingClientRect().height)??0;return X<ou?void w(be):void w(Math.min(X,go))},50)),Object.assign(K.elements.floating.style,{width:`${le}px`,maxWidth:`${le}px`,maxHeight:`${go}`})}})]}),F=vw(G,oF),{getReferenceProps:W,getFloatingProps:Y,getItemProps:ie}=oo([io(G,{role:"listbox"}),no(G),Yf(G,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:O,selectedIndex:O,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{const K=U.reference.current;if(K)return da(K)},[]);const B=(K,le)=>{N(K.value);const Q=U.reference.current;if(!Q)return;Q==null||Q.setAttribute("data-value",K.value),Q.value=K.value;const oe=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(oe),g.onChange&&g.onChange(oe),R(K.label??""),_(),P(""),M(le)},ye=K=>{var Q;const le=K.target.value;return P(le),!C&&le===""?k(!0):(K.target.name=g.name||"",le?k(!0):(Q=g.onChange)==null?void 0:Q.call(g,K))},Te=()=>{var K;k(!0),P(""),(K=U.reference.current)==null||K.focus()},Ie=()=>{M(K=>K===null?0:K),k(!0),P("")},Fe=()=>{var K;(K=U.reference.current)==null||K.setAttribute("data-value",""),P(""),N(""),R(""),jy(U.reference.current),_()},ae=g.id||g.name,ve=z.length===0;return b.jsxs(Ca,{...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:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Te,children:[b.jsx(yf,{size:20}),b.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),D?b.jsx("button",{type:"button",onClick:Fe,className:"p-2 transition-colors link:text-danger md:p-1",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("input",{"data-shadow":"true",...W({...g,onChange:ye,onFocus:Ie,pattern:J,ref:U.setReference,name:`${ae}-shadow`,id:`${ae}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var le,Q;if(K.key==="Escape")return K.currentTarget.blur(),_();if(C){if(K.key==="ArrowDown"){let oe=ct.number(O)?O+1:0;return oe>z.length-1&&(oe=0),(le=v.current)==null||le.scrollIntoView({index:oe}),M(oe)}if(K.key==="ArrowUp"){let oe=ct.number(O)?O-1:z.length-1;return oe<0&&(oe=z.length-1),(Q=v.current)==null||Q.scrollIntoView({index:oe}),M(oe)}if(K.key==="Enter"){if(O!==null&&z[O])return K.preventDefault(),B(z[O],O);if(z.length===1)return K.preventDefault(),B(z[0],0)}}}}),"data-value":D,"data-error":!!t,"data-name":ae,"data-target":ae,required:f,value:C?I:V||D,"aria-autocomplete":"list",autoComplete:"off",className:Ve("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","group-focus-within:border-primary group-hover:border-primary",g.className)}),b.jsx("input",{id:ae,name:ae,type:"hidden","data-origin":ae,ref:m,required:f,defaultValue:g.value||D||void 0}),b.jsx(to,{preserveTabOrder:!0,children:C?b.jsx(di,{guards:!0,returnFocus:!1,context:G,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs(pt.ul,{...Y({ref:U.setFloating,style:{...F.styles,top:ee??0,position:Z,left:(te??0)+(D?36:25)}}),initial:!1,"data-floating":"true",animate:{height:ve?"auto":T},className:"isolate z-floating m-0 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",children:[ve?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||S.autocompleteEmpty})}):null,b.jsx(up,{ref:v,hidden:ve,data:z,style:{height:T},components:cF,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(K,le)=>{const Q=le.Render??rF,oe=D===le.value||D===le.label,be=O===K,X=le.label??le.value;return b.jsx("button",{"data-value":le.value,...ie({ref:ce=>void(L.current[K]=ce),role:"option",type:"button","aria-checked":oe,"aria-current":oe,"aria-selected":oe,"aria-busy":le.disabled,onClick:()=>B(le,K),className:`cursor-pointer w-full p-2 text-left ${oe?"bg-primary-hover text-primary-foreground":""} ${be?"bg-floating-hover text-floating-foreground":""}`}),children:b.jsx(Q,{...g,label:le.label,value:le.value,children:X})})}})]})}):null})]})}),pp=E.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 b.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Ve("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[b.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Ve("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,b.jsx("span",{"data-name":"checkbox-label",className:Ve("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Qw=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:h="text",labelClassName:g,feedback:m=null,hideLeft:y=!1,loading:v,...x},S)=>{const T=e,w=x.id??x.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,I=da(C.current),P=r==null?void 0:r(k),D=N=>{const V=N;if(V.key==="Enter"&&k.enterKeyHint==="next"){const R=k.getAttribute("data-next");if(R){const O=document.getElementById(R);if(O)return O.focus(),void V.preventDefault()}}};return k.addEventListener("keydown",D),()=>{P==null||P(),I(),k.removeEventListener("keydown",D)}},[]),b.jsx(Ca,{...n,info:i,left:a,error:l,right:c,loading:v,form:x.form,name:x.name,feedback:m,hideLeft:y,title:x.title,container:Ve(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:b.jsx(T,{...n,...x,id:w,name:w,type:h,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Nd(S,C),className:Ve("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","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),ka=Qw(e0,"input",{type:"text"}),bv=new Date(1970,11,31),iu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},wv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},dF={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},au=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},fF=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=Rf(t),l=E.useId(),c=Ot(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,h]=E.useState(!1),g=au(u,bv).flatMap(C=>ct.keyof(iu,C.type)?iu[C.type](C.value):[]),m=au(u,bv).reduce((C,k)=>C+(ct.keyof(wv,k.type)?wv[k.type](k.value):""),""),[y,v]=E.useState(d?au(u,d).reduce((C,k)=>C+(ct.keyof(iu,k.type)?dF[k.type](d,k.value):""),""):""),x=C=>{const k=C.target.value;if(v(k),g.length===k.length&&g.every((P,D)=>{const N=k.charAt(D);return typeof P=="string"?N===P:P.test(N)})){const P=Vo(mO(k,m,new Date));return p(P),r==null?void 0:r(P)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),v(C?mI(C,m):"")),T=Fb(d),w=T?d.toISOString():void 0;return b.jsx(ka,{...i,mask:g,value:y,id:void 0,name:void 0,className:"uppercase","data-value":w,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??m,right:b.jsxs(E.Fragment,{children:[b.jsx("input",{"data-origin":i.name,defaultValue:w,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),b.jsx(fi,{open:f,onChange:h,trigger:b.jsxs("span",{"aria-labelledby":l,children:[b.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),b.jsx(NP,{})]}),buttonProps:{"aria-describedby":l},children:b.jsx(u0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?d:void 0})})]})})}),pF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],hF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],mF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],gF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Tv=(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};function Sv(e,t){if(!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?gF:mF:t.binary?hF:pF,r=t.space?" ":"";if(t.signed&&e===0)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=Tv(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=Tv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Ua={exports:{}},Ga={exports:{}},Ue={};/** @license React v16.13.1
172
+ */var JM=["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])"],Es=JM.join(","),rw=typeof Element>"u",qo=rw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Cs=!rw&&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==null?void 0:e.ownerDocument},ks=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},eD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},tD=function(t,n,r){if(ks(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Es));return n&&qo.call(t,Es)&&o.unshift(t),o=o.filter(r),o},nD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!ks(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=qo.call(a,Es);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!ks(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},ow=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},iw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||eD(t))&&!ow(t)?0:t.tabIndex},rD=function(t,n){var r=iw(t);return r<0&&n&&!ow(t)?0:r},oD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},aw=function(t){return t.tagName==="INPUT"},iD=function(t){return aw(t)&&t.type==="hidden"},aD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},sD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},lD=function(t){if(!t.name)return!0;var n=t.form||Cs(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=sD(o,t.form);return!i||i===t},cD=function(t){return aw(t)&&t.type==="radio"},uD=function(t){return cD(t)&&!lD(t)},dD=function(t){var n,r=t&&Cs(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=Cs(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},Fg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},fD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=qo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(qo.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=Cs(t);if(l&&!l.shadowRoot&&o(l)===!0)return Fg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(dD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Fg(t);return!1},pD=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return qo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},hD=function(t,n){return!(n.disabled||ks(n)||iD(n)||fD(n,t)||aD(n)||pD(n))},hd=function(t,n){return!(uD(n)||iw(n)<0||!hD(t,n))},mD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},gD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=rD(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(oD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},na=function(t,n){n=n||{};var r;return n.getShadowRoot?r=nD([t],n.includeContainer,{filter:hd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:mD}):r=tD(t,n.includeContainer,hd.bind(null,n)),gD(r)},vD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Es)===!1?!1:hd(n,t)};function Lg(e,t,n){let{reference:r,floating:o}=e;const i=Yr(t),a=Xf(t),s=Zf(a),l=hr(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(di(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const yD=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}=Lg(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:y,y:b,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=b??d,f={...f,[h]:{...f[h],...T}},w&&m<=50&&(m++,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}=Lg(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Qf(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}=ui(t,e),m=nw(f),h=s[p?d==="floating"?"reference":"floating":d],v=Ts(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(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,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=Ts(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(v.top-w.top+m.top)/T.y,bottom:(w.bottom-v.bottom+m.bottom)/T.y,left:(v.left-w.left+m.left)/T.x,right:(w.right-v.right+m.right)/T.x}}const xD=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}=ui(e,t)||{};if(c==null)return{};const d=nw(u),p={x:n,y:r},f=Xf(o),m=Zf(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",y=h?"bottom":"right",b=h?"clientHeight":"clientWidth",T=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=S?S[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(S)))&&(C=s.floating[b]||i.floating[m]);const R=T/2-w/2,I=C/2-g[m]/2-1,A=An(d[v],I),O=An(d[y],I),N=A,V=C-g[m]-O,P=C/2-g[m]/2+R,_=fd(N,P,V),D=!l.arrow&&di(o)!=null&&P!==_&&i.reference[m]/2-(P<N?A:O)-g[m]/2<0,F=D?P<N?P-N:P-V:0;return{[f]:p[f]+F,data:{[f]:_,centerOffset:P-_-F,...D&&{alignmentOffset:F}},reset:D}}}),bD=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:m="none",flipAlignment:g=!0,...h}=ui(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=hr(o),y=Yr(s),b=hr(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(b||!g?[Ss(s)]:KM(s)),S=m!=="none";!p&&S&&w.push(...XM(s,g,m,T));const C=[s,...w],R=await Qf(t,h),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(R[v]),d){const P=GM(o,a,T);I.push(R[P[0]],R[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var O,N;const P=(((O=i.flip)==null?void 0:O.index)||0)+1,_=C[P];if(_)return{data:{index:P,overflows:A},reset:{placement:_}};let D=(N=A.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(f){case"bestFit":{var V;const F=(V=A.filter(j=>{if(S){const z=Yr(j.placement);return z===y||z==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((j,z)=>j[1]-z[1])[0])==null?void 0:V[0];F&&(D=F);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function wD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=hr(n),s=di(n),l=Yr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=ui(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const SD=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 wD(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}}}}},TD=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:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=ui(e,t),c={x:n,y:r},u=await Qf(t,l),d=Yr(hr(o)),p=tw(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+u[h],b=f-u[v];f=fd(y,f,b)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[h],b=m-u[v];m=fd(y,m,b)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},ED=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ui(e,t),l=await Qf(t,s),c=hr(n),u=di(n),d=Yr(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,v=p-l.left-l.right,y=An(f-l[m],h),b=An(p-l[g],v),T=!t.middlewareData.shift;let w=y,S=b;if(d?S=u||T?An(b,v):v:w=u||T?An(y,h):h,T&&!u){const R=Xt(l.left,0),I=Xt(l.right,0),A=Xt(l.top,0),O=Xt(l.bottom,0);d?S=p-2*(R!==0||I!==0?R+I:Xt(l.left,l.right)):w=f-2*(A!==0||O!==0?A+O:Xt(l.top,l.bottom))}await a({...t,availableWidth:S,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function sw(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=bt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ws(n)!==i||ws(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Jf(e){return Qe(e)?e:e.contextElement}function Ro(e){const t=Jf(e);if(!bt(t))return pr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=sw(t);let a=(i?ws(n.width):n.width)/r,s=(i?ws(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const CD=pr(0);function lw(e){const t=Bt(e);return!qf()||!t.visualViewport?CD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Jf(e);let a=pr(1);t&&(r?Qe(r)&&(a=Ro(r)):a=Ro(e));const s=kD(i,n,r)?lw(i):pr(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=Bt(i),f=r&&Qe(r)?Bt(r):r;let m=p,g=ud(m);for(;g&&r&&f!==m;){const h=Ro(g),v=g.getBoundingClientRect(),y=nn(g),b=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=b,c+=T,m=Bt(g),g=ud(m)}}return Ts({width:u,height:d,x:l,y:c})}function RD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Zn(r),s=t?bl(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=pr(1);const u=pr(0),d=bt(r);if((d||!d&&!i)&&((xr(r)!=="body"||ba(a))&&(l=wl(r)),bt(r))){const p=Gr(r);c=Ro(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function PD(e){return Array.from(e.getClientRects())}function cw(e){return Gr(Zn(e)).left+wl(e).scrollLeft}function AD(e){const t=Zn(e),n=wl(e),r=e.ownerDocument.body,o=Xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+cw(e);const s=-n.scrollTop;return nn(r).direction==="rtl"&&(a+=Xt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function ID(e,t){const n=Bt(e),r=Zn(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=qf();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function _D(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=bt(e)?Ro(e):pr(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 Vg(e,t,n){let r;if(t==="viewport")r=ID(e,n);else if(t==="document")r=AD(Zn(e));else if(Qe(t))r=_D(t,n);else{const o=lw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ts(r)}function uw(e,t){const n=Yn(e);return n===t||!Qe(n)||fr(n)?!1:nn(n).position==="fixed"||uw(n,t)}function OD(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(s=>Qe(s)&&xr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Yn(e):e;for(;Qe(a)&&!fr(a);){const s=nn(a),l=Wf(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ba(a)&&!l&&uw(e,a))?r=r.filter(u=>u!==a):o=s,a=Yn(a)}return t.set(e,r),r}function MD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?bl(t)?[]:OD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Vg(t,u,o);return c.top=Xt(d.top,c.top),c.right=An(d.right,c.right),c.bottom=An(d.bottom,c.bottom),c.left=Xt(d.left,c.left),c},Vg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function DD(e){const{width:t,height:n}=sw(e);return{width:t,height:n}}function jD(e,t,n){const r=bt(t),o=Zn(t),i=n==="fixed",a=Gr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=pr(0);if(r||!r&&!i)if((xr(t)!=="body"||ba(o))&&(s=wl(t)),r){const d=Gr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=cw(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function Kc(e){return nn(e).position==="static"}function $g(e,t){return!bt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function dw(e,t){const n=Bt(e);if(bl(e))return n;if(!bt(e)){let o=Yn(e);for(;o&&!fr(o);){if(Qe(o)&&!Kc(o))return o;o=Yn(o)}return n}let r=$g(e,t);for(;r&&$M(r)&&Kc(r);)r=$g(r,t);return r&&fr(r)&&Kc(r)&&!Wf(r)?n:r||zM(e)||n}const ND=async function(e){const t=this.getOffsetParent||dw,n=this.getDimensions,r=await n(e.floating);return{reference:jD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function FD(e){return nn(e).direction==="rtl"}const LD={convertOffsetParentRelativeRectToViewportRelativeRect:RD,getDocumentElement:Zn,getClippingRect:MD,getOffsetParent:dw,getElementRects:ND,getClientRects:PD,getDimensions:DD,getScale:Ro,isElement:Qe,isRTL:FD};function VD(e,t){let n=null,r;const o=Zn(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{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=Co(u),m=Co(o.clientWidth-(c+d)),g=Co(o.clientHeight-(u+p)),h=Co(c),y={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Xt(0,An(1,l))||1};let b=!0;function T(w){const S=w[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(T,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return a(!0),i}function wa(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=Jf(e),u=o||i?[...c?cr(c):[],...cr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?VD(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 b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Gr(e):null;l&&h();function h(){const v=Gr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const $D=SD,zD=TD,BD=bD,HD=ED,zg=xD,WD=(e,t,n)=>{const r=new Map,o={platform:LD,...n},i={...o.platform,_c:r};return yD(e,t,{...o,platform:i})};var os=typeof document<"u"?E.useLayoutEffect:E.useEffect;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 fw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bg(e,t){const n=fw(e);return Math.round(t*n)/n}function Zc(e){const t=k.useRef(e);return os(()=>{t.current=e}),t}function qD(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]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=k.useState(r);Rs(p,r)||f(r);const[m,g]=k.useState(null),[h,v]=k.useState(null),y=k.useCallback(j=>{j!==S.current&&(S.current=j,g(j))},[]),b=k.useCallback(j=>{j!==C.current&&(C.current=j,v(j))},[]),T=i||m,w=a||h,S=k.useRef(null),C=k.useRef(null),R=k.useRef(u),I=l!=null,A=Zc(l),O=Zc(o),N=Zc(c),V=k.useCallback(()=>{if(!S.current||!C.current)return;const j={placement:t,strategy:n,middleware:p};O.current&&(j.platform=O.current),WD(S.current,C.current,j).then(z=>{const M={...z,isPositioned:N.current!==!1};P.current&&!Rs(R.current,M)&&(R.current=M,Xs.flushSync(()=>{d(M)}))})},[p,t,n,O,N]);os(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[c]);const P=k.useRef(!1);os(()=>(P.current=!0,()=>{P.current=!1}),[]),os(()=>{if(T&&(S.current=T),w&&(C.current=w),T&&w){if(A.current)return A.current(T,w,V);V()}},[T,w,V,A,I]);const _=k.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:b}),[y,b]),D=k.useMemo(()=>({reference:T,floating:w}),[T,w]),F=k.useMemo(()=>{const j={position:n,left:0,top:0};if(!D.floating)return j;const z=Bg(D.floating,u.x),M=Bg(D.floating,u.y);return s?{...j,transform:"translate("+z+"px, "+M+"px)",...fw(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:M}},[n,s,D.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:V,refs:_,elements:D,floatingStyles:F}),[u,V,_,D,F])}const UD=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?zg({element:r.current,padding:o}).fn(n):{}:r?zg({element:r,padding:o}).fn(n):{}}}},Sa=(e,t)=>({...$D(e),options:[e,t]}),ep=(e,t)=>({...zD(e),options:[e,t]}),tp=(e,t)=>({...BD(e),options:[e,t]}),pw=(e,t)=>({...HD(e),options:[e,t]}),hw=(e,t)=>({...UD(e),options:[e,t]});function md(e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const mw={...k},YD=mw.useInsertionEffect,GD=YD||(e=>e());function kt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return GD(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const np="ArrowUp",Ta="ArrowDown",Uo="ArrowLeft",fi="ArrowRight";function Ha(e,t,n){return Math.floor(e/t)!==n}function zi(e,t){return t<0||t>=e.current.length}function Xc(e,t){return Ft(e,{disabledIndices:t})}function Hg(e,t){return Ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&is(a,s,o));return s}function KD(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===np){if(u&&Dt(n),c===-1)d=l;else if(d=Ft(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}zi(e,d)&&(d=c)}if(n.key===Ta&&(u&&Dt(n),c===-1?d=s:(d=Ft(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Ft(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),zi(e,d)&&(d=c)),r==="both"){const p=Co(c/i);n.key===fi&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ha(d,i,p)&&(d=c)),n.key===Uo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ha(d,i,p)&&(d=c));const f=Co(l/i)===p;zi(e,d)&&(o&&f?d=n.key===Uo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function ZD(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 XD(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 QD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function is(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Wg=0;function ir(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Wg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Wg=requestAnimationFrame(i)}var Be=typeof document<"u"?E.useLayoutEffect:E.useEffect;function JD(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function ej(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const gw=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function tj(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=k.useState(()=>new Map),a=k.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=k.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Be(()=>{const l=new Map(o);Array.from(l.keys()).sort(JD).forEach((u,d)=>{l.set(u,d)}),ej(o,l)||i(l)},[o]),k.createElement(gw.Provider,{value:k.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function vw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=k.useContext(gw),[s,l]=k.useState(null),c=k.useRef(null),u=k.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==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return Be(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Be(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yo.apply(this,arguments)}let qg=!1,nj=0;const Ug=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nj++;function rj(){const[e,t]=k.useState(()=>qg?Ug():void 0);return Be(()=>{e==null&&t(Ug())},[]),k.useEffect(()=>{qg=!0},[]),e}const oj=mw.useId,pi=oj||rj;let ra;process.env.NODE_ENV!=="production"&&(ra=new Set);function as(){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=ra)!=null&&e.has(o))){var i;(i=ra)==null||i.add(o),console.warn(o)}}function ij(){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=ra)!=null&&e.has(o))){var i;(i=ra)==null||i.add(o),console.error(o)}}const yw=k.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||as("The `ref` prop is required for `FloatingArrow`."));const h=pi(),[v,y]=k.useState(!1);if(Be(()=>{if(!o)return;nn(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const b=c*2,T=b/2,w=a/2*(l/-8+1),S=s/2*l/4,[C,R]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",O=u&&R==="end"?"bottom":"top";let N=u&&R==="end"?"right":"left";u&&v&&(N=R==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",_=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",D={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return k.createElement("svg",Yo({},g,{"aria-hidden":!0,ref:n,width:I?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:V,[O]:P,[C]:A||I?"100%":"calc(100% - "+b/2+"px)",transform:""+D+(f??""),...m}}),b>0&&k.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:_}),k.createElement("path",{stroke:b&&!p?g.fill:"none",d:_}),k.createElement("clipPath",{id:h},k.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+b,height:a})))});function xw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const bw=k.createContext(null),ww=k.createContext(null),br=()=>{var e;return((e=k.useContext(bw))==null?void 0:e.id)||null},wr=()=>k.useContext(ww);function aj(e){const t=pi(),n=wr(),o=br();return Be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function sj(e){const{children:t,id:n}=e,r=br();return k.createElement(bw.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function lj(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(a=>{n.current=[...n.current,a]},[]),o=k.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=k.useState(()=>xw())[0];return k.createElement(ww.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function mr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return Be(()=>{t.current=e}),t}const Yg=mr("safe-polygon");function Qc(e,t,n){return n&&!Wo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Sw(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=wr(),m=br(),g=jt(c),h=jt(l),v=jt(n),y=k.useRef(),b=k.useRef(-1),T=k.useRef(),w=k.useRef(-1),S=k.useRef(!0),C=k.useRef(!1),R=k.useRef(()=>{}),I=k.useCallback(()=>{var _;const D=(_=o.current.openEvent)==null?void 0:_.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);k.useEffect(()=>{if(!s)return;function _(D){let{open:F}=D;F||(clearTimeout(b.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",_),()=>{i.off("openchange",_)}},[s,i]),k.useEffect(()=>{if(!s||!g.current||!n)return;function _(F){I()&&r(!1,F,"hover")}const D=It(a.floating).documentElement;return D.addEventListener("mouseleave",_),()=>{D.removeEventListener("mouseleave",_)}},[a.floating,n,r,s,g,I]);const A=k.useCallback(function(_,D,F){D===void 0&&(D=!0),F===void 0&&(F="hover");const j=Qc(h.current,"close",y.current);j&&!T.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,_,F),j)):D&&(clearTimeout(b.current),r(!1,_,F))},[h,r]),O=kt(()=>{R.current(),T.current=void 0}),N=kt(()=>{if(C.current){const _=It(a.floating).body;_.style.pointerEvents="",_.removeAttribute(Yg),C.current=!1}});k.useEffect(()=>{if(!s)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(M){if(clearTimeout(b.current),S.current=!1,u&&!Wo(y.current)||d>0&&!Qc(h.current,"open"))return;const $=Qc(h.current,"open",y.current);$?b.current=window.setTimeout(()=>{v.current||r(!0,M,"hover")},$):r(!0,M,"hover")}function F(M){if(_())return;R.current();const $=It(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),T.current=g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M,!0,"safe-polygon")}});const te=T.current;$.addEventListener("mousemove",te),R.current=()=>{$.removeEventListener("mousemove",te)};return}(y.current==="touch"?!gt(a.floating,M.relatedTarget):!0)&&A(M)}function j(M){_()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M)}})(M))}if(Qe(a.domReference)){var z;const M=a.domReference;return n&&M.addEventListener("mouseleave",j),(z=a.floating)==null||z.addEventListener("mouseleave",j),p&&M.addEventListener("mousemove",D,{once:!0}),M.addEventListener("mouseenter",D),M.addEventListener("mouseleave",F),()=>{var $;n&&M.removeEventListener("mouseleave",j),($=a.floating)==null||$.removeEventListener("mouseleave",j),p&&M.removeEventListener("mousemove",D),M.removeEventListener("mouseenter",D),M.removeEventListener("mouseleave",F)}}},[a,s,e,u,d,p,A,O,N,r,n,v,f,h,g,o]),Be(()=>{var _;if(s&&n&&(_=g.current)!=null&&_.__options.blockPointerEvents&&I()){const F=It(a.floating).body;F.setAttribute(Yg,""),F.style.pointerEvents="none",C.current=!0;const j=a.floating;if(Qe(a.domReference)&&j){var D;const z=a.domReference,M=f==null||(D=f.nodesRef.current.find($=>$.id===m))==null||(D=D.context)==null?void 0:D.elements.floating;return M&&(M.style.pointerEvents=""),z.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{z.style.pointerEvents="",j.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),Be(()=>{n||(y.current=void 0,O(),N())},[n,O,N]),k.useEffect(()=>()=>{O(),clearTimeout(b.current),clearTimeout(w.current),N()},[s,a.domReference,O,N]);const V=k.useMemo(()=>{function _(D){y.current=D.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(D){const{nativeEvent:F}=D;function j(){!S.current&&!v.current&&r(!0,F,"hover")}u&&!Wo(y.current)||n||d===0||(clearTimeout(w.current),y.current==="touch"?j():w.current=window.setTimeout(j,d))}}},[u,r,n,v,d]),P=k.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(_){A(_.nativeEvent,!1)}}),[A]);return k.useMemo(()=>s?{reference:V,floating:P}:{},[s,V,P])}function cj(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==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Hr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function uj(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Hr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let mo=new WeakMap,Wa=new WeakSet,qa={},Jc=0;const dj=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Tw=e=>e&&(e.host||Tw(e.parentNode)),fj=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Tw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function pj(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=fj(t,e),s=new Set,l=new Set(a),c=[];qa[o]||(qa[o]=new WeakMap);const u=qa[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,m=>{if(xr(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",v=(mo.get(m)||0)+1,y=(u.get(m)||0)+1;mo.set(m,v),u.set(m,y),c.push(m),v===1&&h&&Wa.add(m),y===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Jc++,()=>{c.forEach(f=>{const m=(mo.get(f)||0)-1,g=(u.get(f)||0)-1;mo.set(f,m),u.set(f,g),m||(!Wa.has(f)&&i&&f.removeAttribute(i),Wa.delete(f)),g||f.removeAttribute(o)}),Jc--,Jc||(mo=new WeakMap,mo=new WeakMap,Wa=new WeakSet,qa={})}}function Gg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=It(e[0]).body;return pj(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Go=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ew(e,t){const n=na(e,Go());t==="prev"&&n.reverse();const r=n.indexOf(gn(It(e)));return n.slice(r+1)[0]}function Cw(){return Ew(document.body,"next")}function kw(){return Ew(document.body,"prev")}function Bi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function hj(e){na(e,Go()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function mj(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 gj(e,t,n){const r=e.indexOf(t);function o(a){const s=mr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||gt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const rp={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};let vj;function Kg(e){e.key==="Tab"&&(e.target,clearTimeout(vj))}const Ps=k.forwardRef(function(t,n){const[r,o]=k.useState();Be(()=>(Gf()&&o("button"),document.addEventListener("keydown",Kg),()=>{document.removeEventListener("keydown",Kg)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[mr("focus-guard")]:"",style:rp};return k.createElement("span",Yo({},t,i))}),Rw=k.createContext(null),Zg=mr("portal");function yj(e){e===void 0&&(e={});const{id:t,root:n}=e,r=pi(),o=Pw(),[i,a]=k.useState(null),s=k.useRef(null);return Be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),Be(()=>{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(Zg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Be(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Qe(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(Zg,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function no(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=yj({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return k.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&Bi(m)&&(m.type==="focusin"?mj:hj)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),k.createElement(Rw.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(Ps,{"data-type":"outside",ref:l,onFocus:f=>{if(Bi(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=kw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:rp}),i&&Xs.createPortal(t,i),p&&i&&k.createElement(Ps,{"data-type":"outside",ref:c,onFocus:f=>{if(Bi(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Cw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Pw=()=>k.useContext(Rw),xj=20;let Mr=[];function eu(e){Mr=Mr.filter(n=>n.isConnected);let t=e;if(!(!t||xr(t)==="body")){if(!vD(t,Go())){const n=na(t,Go())[0];n&&(t=n)}Mr.push(t),Mr.length>xj&&(Mr=Mr.slice(-20))}}function Xg(){return Mr.slice().reverse().find(e=>e.isConnected)}const bj=k.forwardRef(function(t,n){return k.createElement("button",Yo({},t,{type:"button",ref:n,tabIndex:-1,style:rp}))});function hi(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}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:v,floatingId:y,elements:{domReference:b,floating:T}}=t,w=typeof a=="number"&&a<0,S=ew(b)&&w,C=dj()?i:!0,R=jt(o),I=jt(a),A=jt(s),O=wr(),N=Pw(),V=k.useRef(null),P=k.useRef(null),_=k.useRef(!1),D=k.useRef(!1),F=k.useRef(-1),j=N!=null,z=T==null?void 0:T.firstElementChild,M=(z==null?void 0:z.id)===y?z:T,$=kt(function(Z){return Z===void 0&&(Z=M),Z?na(Z,Go()):[]}),J=kt(Z=>{const U=$(Z);return R.current.map(Y=>b&&Y==="reference"?b:M&&Y==="floating"?M:U).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function Z(Y){if(Y.key==="Tab"){gt(M,gn(It(M)))&&$().length===0&&!S&&Dt(Y);const L=J(),W=Pn(Y);R.current[0]==="reference"&&W===b&&(Dt(Y),Y.shiftKey?ir(L[L.length-1]):ir(L[1])),R.current[1]==="floating"&&W===M&&Y.shiftKey&&(Dt(Y),ir(L[0]))}}const U=It(M);return U.addEventListener("keydown",Z),()=>{U.removeEventListener("keydown",Z)}},[r,b,M,c,R,S,$,J]),k.useEffect(()=>{if(r||!T)return;function Z(U){const Y=Pn(U),W=$().indexOf(Y);W!==-1&&(F.current=W)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,$]),k.useEffect(()=>{if(r||!d)return;function Z(){D.current=!0,setTimeout(()=>{D.current=!1})}function U(Y){const L=Y.relatedTarget;queueMicrotask(()=>{const W=!(gt(b,L)||gt(T,L)||gt(L,T)||gt(N==null?void 0:N.portalNode,L)||L!=null&&L.hasAttribute(mr("focus-guard"))||O&&(Hr(O.nodesRef.current,m).find(G=>{var ie,B;return gt((ie=G.context)==null?void 0:ie.elements.floating,L)||gt((B=G.context)==null?void 0:B.elements.domReference,L)})||cj(O.nodesRef.current,m).find(G=>{var ie,B;return((ie=G.context)==null?void 0:ie.elements.floating)===L||((B=G.context)==null?void 0:B.elements.domReference)===L})));if(l&&W&&gn(It(M))===It(M).body){bt(M)&&(M==null||M.focus());const G=F.current,ie=$(),B=ie[G]||ie[ie.length-1]||M;bt(B)&&B.focus()}(S||!c)&&L&&W&&!D.current&&L!==Xg()&&(_.current=!0,g(!1,Y))})}if(T&&bt(b))return b.addEventListener("focusout",U),b.addEventListener("pointerdown",Z),T.addEventListener("focusout",U),()=>{b.removeEventListener("focusout",U),b.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",U)}},[r,b,T,M,c,m,O,N,g,d,l,$,S]),k.useEffect(()=>{var Z;if(r)return;const U=Array.from((N==null||(Z=N.portalNode)==null?void 0:Z.querySelectorAll("["+mr("portal")+"]"))||[]);if(T){const Y=[T,...U,V.current,P.current,R.current.includes("reference")||S?b:null].filter(W=>W!=null),L=c||S?Gg(Y,C,!C):Gg(Y);return()=>{L()}}},[r,b,T,c,R,N,S,C]),Be(()=>{if(r||!bt(M))return;const Z=It(M),U=gn(Z);queueMicrotask(()=>{const Y=J(M),L=I.current,W=(typeof L=="number"?Y[L]:L.current)||M,G=gt(M,U);!w&&!G&&p&&ir(W,{preventScroll:W===M})})},[r,p,M,w,J,I]),Be(()=>{if(r||!M)return;let Z=!1;const U=It(M),Y=gn(U);let W=v.current.openEvent;const G=f.domReference.current;eu(Y);function ie(B){let{open:ye,reason:Se,event:Ie,nested:Le}=B;ye&&(W=Ie),Se==="escape-key"&&f.domReference.current&&eu(f.domReference.current),Se==="hover"&&Ie.type==="mouseleave"&&(_.current=!0),Se==="outside-press"&&(Le?(_.current=!1,Z=!0):_.current=!(Q0(Ie)||Yf(Ie)))}return h.on("openchange",ie),()=>{h.off("openchange",ie);const B=gn(U),ye=gt(T,B)||O&&Hr(O.nodesRef.current,m).some(ae=>{var ve;return gt((ve=ae.context)==null?void 0:ve.elements.floating,B)});(ye||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&eu(f.domReference.current);const Ie=G||Y,Le=na(It(Ie).body,Go());queueMicrotask(()=>{let ae=Xg();!ae&&bt(Ie)&&T&&(ae=gj(Le,Ie,T)),A.current&&!_.current&&bt(ae)&&(!(ae!==B&&B!==U.body)||ye)&&ae.focus({preventScroll:Z})})}},[r,T,M,A,v,f,h,O,m]),Be(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,g,f,d]),Be(()=>{if(r||!M||typeof MutationObserver!="function"||w)return;const Z=()=>{const Y=M.getAttribute("tabindex"),L=$(),W=gn(It(T)),G=L.indexOf(W);G!==-1&&(F.current=G),R.current.includes("floating")||W!==f.domReference.current&&L.length===0?Y!=="0"&&M.setAttribute("tabindex","0"):Y!=="-1"&&M.setAttribute("tabindex","-1")};Z();const U=new MutationObserver(Z);return U.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,T,M,f,R,$,w]);function te(Z){return r||!u||!c?null:k.createElement(bj,{ref:Z==="start"?V:P,onClick:U=>g(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!S:!0)&&(j||c);return k.createElement(k.Fragment,null,ee&&k.createElement(Ps,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:Z=>{if(c){const Y=J();ir(o[0]==="reference"?Y[0]:Y[Y.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(_.current=!1,Bi(Z,N.portalNode)){const Y=Cw()||b;Y==null||Y.focus()}else{var U;(U=N.beforeOutsideRef.current)==null||U.focus()}}}),!S&&te("start"),n,te("end"),ee&&k.createElement(Ps,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:Z=>{if(c)ir(J()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(_.current=!0),Bi(Z,N.portalNode)){const Y=kw()||b;Y==null||Y.focus()}else{var U;(U=N.afterOutsideRef.current)==null||U.focus()}}}))}const tu=new Set,wj=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=pi();return Be(()=>{if(!r)return;tu.add(i);const a=/iP(hone|ad|od)|iOS/.test(Uf()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,m;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,h=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(h))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{tu.delete(i),tu.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),k.createElement("div",Yo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Qg(e){return bt(e.target)&&e.target.tagName==="BUTTON"}function Jg(e){return Kf(e)}function Ea(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}=t,d=k.useRef(),p=k.useRef(!1),f=k.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(Wo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Wo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||Qg(m))&&(m.key===" "&&!Jg(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Qg(m)||Jg(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}function Sj(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0: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 ev(e){return e!=null&&e.clientX!=null}function Tj(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=k.useRef(!1),p=k.useRef(null),[f,m]=k.useState(),[g,h]=k.useState([]),v=kt((S,C)=>{d.current||r.current.openEvent&&!ev(r.current.openEvent)||a.setPositionReference(Sj(i,{x:S,y:C,axis:l,dataRef:r,pointerType:f}))}),y=kt(S=>{c!=null||u!=null||(n?p.current||h([]):v(S.clientX,S.clientY))}),b=Wo(f)?o:n,T=k.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const S=Bt(o);function C(R){const I=Pn(R);gt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):v(R.clientX,R.clientY)}if(!r.current.openEvent||ev(r.current.openEvent)){S.addEventListener("mousemove",C);const R=()=>{S.removeEventListener("mousemove",C),p.current=null};return p.current=R,R}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,v]);k.useEffect(()=>T(),[T,g]),k.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),k.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Be(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=k.useMemo(()=>{function S(C){let{pointerType:R}=C;m(R)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:y,onMouseEnter:y}},[y]);return k.useMemo(()=>s?{reference:w}:{},[s,w])}const Ej={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Cj={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},tv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function ro(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:m}=t,g=wr(),h=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=k.useRef(!1),b=k.useRef(!1),{escapeKey:T,outsidePress:w}=tv(f),{escapeKey:S,outsidePress:C}=tv(m),R=kt(P=>{var _;if(!n||!a||!s||P.key!=="Escape")return;const D=(_=i.current.floatingContext)==null?void 0:_.nodeId,F=g?Hr(g.nodesRef.current,D):[];if(!T&&(P.stopPropagation(),F.length>0)){let j=!0;if(F.forEach(z=>{var M;if((M=z.context)!=null&&M.open&&!z.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,HM(P)?P.nativeEvent:P,"escape-key")}),I=kt(P=>{var _;const D=()=>{var F;R(P),(F=Pn(P))==null||F.removeEventListener("keydown",D)};(_=Pn(P))==null||_.addEventListener("keydown",D)}),A=kt(P=>{var _;const D=y.current;y.current=!1;const F=b.current;if(b.current=!1,c==="click"&&F||D||typeof v=="function"&&!v(P))return;const j=Pn(P),z="["+mr("inert")+"]",M=It(o.floating).querySelectorAll(z);let $=Qe(j)?j:null;for(;$&&!fr($);){const Z=Yn($);if(fr(Z)||!Qe(Z))break;$=Z}if(M.length&&Qe(j)&&!WM(j)&&!gt(j,o.floating)&&Array.from(M).every(Z=>!gt($,Z)))return;if(bt(j)&&V){const Z=j.clientWidth>0&&j.scrollWidth>j.clientWidth,U=j.clientHeight>0&&j.scrollHeight>j.clientHeight;let Y=U&&P.offsetX>j.clientWidth;if(U&&nn(j).direction==="rtl"&&(Y=P.offsetX<=j.offsetWidth-j.clientWidth),Y||Z&&P.offsetY>j.clientHeight)return}const J=(_=i.current.floatingContext)==null?void 0:_.nodeId,te=g&&Hr(g.nodesRef.current,J).some(Z=>{var U;return Gc(P,(U=Z.context)==null?void 0:U.elements.floating)});if(Gc(P,o.floating)||Gc(P,o.domReference)||te)return;const ee=g?Hr(g.nodesRef.current,J):[];if(ee.length>0){let Z=!0;if(ee.forEach(U=>{var Y;if((Y=U.context)!=null&&Y.open&&!U.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,P,"outside-press")}),O=kt(P=>{var _;const D=()=>{var F;A(P),(F=Pn(P))==null||F.removeEventListener(c,D)};(_=Pn(P))==null||_.addEventListener(c,D)});k.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function P(F){r(!1,F,"ancestor-scroll")}const _=It(o.floating);s&&_.addEventListener("keydown",S?I:R,S),v&&_.addEventListener(c,C?O:A,C);let D=[];return p&&(Qe(o.domReference)&&(D=cr(o.domReference)),Qe(o.floating)&&(D=D.concat(cr(o.floating))),!Qe(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(cr(o.reference.contextElement)))),D=D.filter(F=>{var j;return F!==((j=_.defaultView)==null?void 0:j.visualViewport)}),D.forEach(F=>{F.addEventListener("scroll",P,{passive:!0})}),()=>{s&&_.removeEventListener("keydown",S?I:R,S),v&&_.removeEventListener(c,C?O:A,C),D.forEach(F=>{F.removeEventListener("scroll",P)})}},[i,o,s,v,c,n,r,p,a,T,w,R,S,I,A,C,O]),k.useEffect(()=>{y.current=!1},[v,c]);const N=k.useMemo(()=>({onKeyDown:R,[Ej[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[R,r,u,d]),V=k.useMemo(()=>({onKeyDown:R,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Cj[c]]:()=>{y.current=!0}}),[R,c]);return k.useMemo(()=>a?{reference:N,floating:V}:{},[a,N,V])}function kj(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=pi(),i=k.useRef({}),[a]=k.useState(()=>xw()),s=br()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Qe(f)&&ij("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=k.useState(r.reference),u=kt((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=k.useMemo(()=>({setPositionReference:c}),[]),p=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function oo(e){e===void 0&&(e={});const{nodeId:t}=e,n=kj({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=k.useState(null),[s,l]=k.useState(null),u=(o==null?void 0:o.reference)||i,d=k.useRef(null),p=wr();Be(()=>{u&&(d.current=u)},[u]);const f=qD({...e,elements:{...o,...s&&{reference:s}}}),m=k.useCallback(b=>{const T=Qe(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(T),f.refs.setReference(T)},[f.refs]),g=k.useCallback(b=>{(Qe(b)||b===null)&&(d.current=b,a(b)),(Qe(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!Qe(b))&&f.refs.setReference(b)},[f.refs]),h=k.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),v=k.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=k.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return Be(()=>{r.dataRef.current.floatingContext=y;const b=p==null?void 0:p.nodesRef.current.find(T=>T.id===t);b&&(b.context=y)}),k.useMemo(()=>({...f,context:y,refs:h,elements:v}),[f,h,v,y])}function Rj(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=k.useRef(!1),u=k.useRef(),d=k.useRef(!0);k.useEffect(()=>{if(!s)return;const f=Bt(a.domReference);function m(){!n&&bt(a.domReference)&&a.domReference===gn(It(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),k.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),k.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=k.useMemo(()=>({onPointerDown(f){Yf(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=Pn(f.nativeEvent);if(l&&Qe(m))try{if(Gf()&&J0())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Kf(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=Qe(m)&&m.hasAttribute(mr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=gn(a.domReference?a.domReference.ownerDocument:document);!m&&y===a.domReference||gt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||gt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return k.useMemo(()=>s?{reference:p}:{},[s,p])}const nv="active",rv="selected";function nu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[nv]:a,[rv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...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&&[nv,rv].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,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...m)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function io(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=k.useCallback(s=>nu(s,e,"reference"),t),i=k.useCallback(s=>nu(s,e,"floating"),n),a=k.useCallback(s=>nu(s,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let ov=!1;function Sl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function iv(e,t){return Sl(t,e===np||e===Ta,e===Uo||e===fi)}function ru(e,t,n){return Sl(t,e===Ta,n?e===Uo:e===fi)||e==="Enter"||e===" "||e===""}function Pj(e,t,n){return Sl(t,n?e===Uo:e===fi,e===Ta)}function av(e,t,n){return Sl(t,n?e===fi:e===Uo,e===np)}function op(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:b="vertical",cols:T=1,scrollItemIntoView:w=!0,virtualItemRef:S,itemSizes:C,dense:R=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||as("`useListNavigation` looping must be enabled to allow escaping."),m||as("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&T>1&&as("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=br(),A=wr(),O=kt(s),N=k.useRef(g),V=k.useRef(c??-1),P=k.useRef(null),_=k.useRef(!0),D=k.useRef(O),F=k.useRef(!!o.floating),j=k.useRef(n),z=k.useRef(!1),M=k.useRef(!1),$=jt(y),J=jt(n),te=jt(w),ee=jt(o.floating),Z=jt(c),[U,Y]=k.useState(),[L,W]=k.useState(),G=kt(function(ae,ve,K){K===void 0&&(K=!1);function le(oe){m?(Y(oe.id),A==null||A.events.emit("virtualfocus",oe),S&&(S.current=oe)):ir(oe,{preventScroll:!0,sync:J0()&&Gf()?ov||z.current:!1})}const Q=ae.current[ve.current];Q&&le(Q),requestAnimationFrame(()=>{const oe=ae.current[ve.current]||Q;if(!oe)return;Q||le(oe);const be=te.current;be&&B&&(K||!_.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof be=="boolean"?{block:"nearest",inline:"nearest"}:be))})});Be(()=>{document.createElement("div").focus({get preventScroll(){return ov=!0,!1}})},[]),Be(()=>{l&&(n&&o.floating?N.current&&c!=null&&(M.current=!0,V.current=c,O(c)):F.current&&(V.current=-1,D.current(null)))},[l,n,o.floating,c,O]),Be(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,Z.current!=null)return;if(F.current&&(V.current=-1,G(i,V)),(!j.current||!F.current)&&N.current&&(P.current!=null||N.current===!0&&P.current==null)){let ae=0;const ve=()=>{i.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(ve),ae++):(V.current=P.current==null||ru(P.current,b,f)||p?Xc(i,$.current):Hg(i,$.current),P.current=null,O(V.current))};ve()}}else zi(i,a)||(V.current=a,G(i,V,M.current),M.current=!1)},[l,n,o.floating,a,Z,p,i,b,f,O,G,$]),Be(()=>{var ae;if(!l||o.floating||!A||m||!F.current)return;const ve=A.nodesRef.current,K=(ae=ve.find(oe=>oe.id===I))==null||(ae=ae.context)==null?void 0:ae.elements.floating,le=gn(It(o.floating)),Q=ve.some(oe=>oe.context&&gt(oe.context.elements.floating,le));K&&!Q&&_.current&&K.focus({preventScroll:!0})},[l,o.floating,A,I,m]),Be(()=>{if(!l||!A||!m||I)return;function ae(ve){W(ve.id),S&&(S.current=ve)}return A.events.on("virtualfocus",ae),()=>{A.events.off("virtualfocus",ae)}},[l,A,m,I,S]),Be(()=>{D.current=O,F.current=!!o.floating}),Be(()=>{n||(P.current=null)},[n]),Be(()=>{j.current=n},[n]);const ie=a!=null,B=k.useMemo(()=>{function ae(K){if(!n)return;const le=i.current.indexOf(K);le!==-1&&O(le)}return{onFocus(K){let{currentTarget:le}=K;ae(le)},onClick:K=>{let{currentTarget:le}=K;return le.focus({preventScroll:!0})},...h&&{onMouseMove(K){let{currentTarget:le}=K;ae(le)},onPointerLeave(K){let{pointerType:le}=K;!_.current||le==="touch"||(V.current=-1,G(i,V),O(null),m||ir(ee.current,{preventScroll:!0}))}}}},[n,ee,G,h,i,O,m]),ye=kt(ae=>{if(_.current=!1,z.current=!0,!J.current&&ae.currentTarget===ee.current)return;if(p&&av(ae.key,b,f)){Dt(ae),r(!1,ae.nativeEvent,"list-navigation"),bt(o.domReference)&&!m&&o.domReference.focus();return}const ve=V.current,K=Xc(i,y),le=Hg(i,y);if(ae.key==="Home"&&(Dt(ae),V.current=K,O(V.current)),ae.key==="End"&&(Dt(ae),V.current=le,O(V.current)),T>1){const Q=C||Array.from({length:i.current.length},()=>({width:1,height:1})),oe=ZD(Q,T,R),be=oe.findIndex(ce=>ce!=null&&!is(i.current,ce,y)),X=oe.reduce((ce,Re,ze)=>Re!=null&&!is(i.current,Re,y)?ze:ce,-1);if(V.current=oe[KD({current:oe.map(ce=>ce!=null?i.current[ce]:null)},{event:ae,orientation:b,loop:d,cols:T,disabledIndices:QD([...y||i.current.map((ce,Re)=>is(i.current,Re)?Re:void 0),void 0],oe),minIndex:be,maxIndex:X,prevIndex:XD(V.current>le?K:V.current,Q,oe,T,ae.key===Ta?"bl":ae.key===fi?"tr":"tl"),stopEvent:!0})],O(V.current),b==="both")return}if(iv(ae.key,b)){if(Dt(ae),n&&!m&&gn(ae.currentTarget.ownerDocument)===ae.currentTarget){V.current=ru(ae.key,b,f)?K:le,O(V.current);return}ru(ae.key,b,f)?d?V.current=ve>=le?u&&ve!==i.current.length?-1:K:Ft(i,{startingIndex:ve,disabledIndices:y}):V.current=Math.min(le,Ft(i,{startingIndex:ve,disabledIndices:y})):d?V.current=ve<=K?u&&ve!==-1?i.current.length:le:Ft(i,{startingIndex:ve,decrement:!0,disabledIndices:y}):V.current=Math.max(K,Ft(i,{startingIndex:ve,decrement:!0,disabledIndices:y})),zi(i,V.current)?O(null):O(V.current)}}),Se=k.useMemo(()=>m&&n&&ie&&{"aria-activedescendant":L||U},[m,n,ie,L,U]),Ie=k.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!ew(o.domReference)&&Se,onKeyDown:ye,onPointerMove(){_.current=!0}}),[Se,ye,o.domReference,b]),Le=k.useMemo(()=>{function ae(K){g==="auto"&&Q0(K.nativeEvent)&&(N.current=!0)}function ve(K){N.current=g,g==="auto"&&Yf(K.nativeEvent)&&(N.current=!0)}return{...Se,onKeyDown(K){_.current=!1;const le=K.key.indexOf("Arrow")===0,Q=Pj(K.key,b,f),oe=av(K.key,b,f),be=iv(K.key,b),X=(p?Q:be)||K.key==="Enter"||K.key.trim()==="";if(m&&n){const xt=A==null?void 0:A.nodesRef.current.find(Ot=>Ot.parentId==null),ut=A&&xt?uj(A.nodesRef.current,xt.id):null;if(le&&ut&&S){const Ot=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Q||oe){var ce,Re;const fn=((ce=ut.context)==null?void 0:ce.elements.domReference)===K.currentTarget,Tn=oe&&!fn?(Re=ut.context)==null?void 0:Re.elements.domReference:Q?i.current.find(Xn=>(Xn==null?void 0:Xn.id)===U):null;Tn&&(Dt(K),Tn.dispatchEvent(Ot),W(void 0))}if(be&&ut.context&&ut.context.open&&ut.parentId&&K.currentTarget!==ut.context.elements.domReference){var ze;Dt(K),(ze=ut.context.elements.domReference)==null||ze.dispatchEvent(Ot);return}}return ye(K)}if(!(!n&&!v&&le)){if(X&&(P.current=p&&be?null:K.key),p){Q&&(Dt(K),n?(V.current=Xc(i,$.current),O(V.current)):r(!0,K.nativeEvent,"list-navigation"));return}be&&(c!=null&&(V.current=c),Dt(K),!n&&v?r(!0,K.nativeEvent,"list-navigation"):ye(K),n&&O(V.current))}},onFocus(){n&&!m&&O(null)},onPointerDown:ve,onMouseDown:ae,onClick:ae}},[U,Se,ye,$,g,i,p,O,r,n,v,b,f,c,A,m,S]);return k.useMemo(()=>l?{reference:Le,floating:Ie,item:B}:{},[l,Le,Ie,B])}const Aj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ao(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=Aj.get(a))!=null?n:a,l=pi(),u=br()!=null,d=k.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=k.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=k.useCallback(m=>{let{active:g,selected:h}=m;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&h};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return k.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const sv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function go(e,t){return typeof e=="function"?e(t):e}function Ij(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function _j(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]=k.useState("unmounted"),c=Ij(n,a);return!c&&s==="close"&&l("unmounted"),Be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Aw(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=k.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=k.useState(()=>({...go(i,c),...go(n,c)})),{isMounted:g,status:h}=_j(e,{duration:a}),v=jt(n),y=jt(r),b=jt(o),T=jt(i);return Be(()=>{const w=go(v.current,c),S=go(b.current,c),C=go(T.current,c),R=go(y.current,c)||Object.keys(w).reduce((I,A)=>(I[A]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(R).map(sv).join(","),transitionDuration:d+"ms",...C,...R}),h==="close"){const I=S||w;m({transitionProperty:Object.keys(I).map(sv).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,v,y,T,d,h,c]),{isMounted:g,styles:f}}function Oj(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,m=k.useRef(),g=k.useRef(""),h=k.useRef((n=f??a)!=null?n:-1),v=k.useRef(null),y=kt(s),b=kt(l),T=jt(u),w=jt(p);Be(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),Be(()=>{if(r&&g.current===""){var A;h.current=(A=f??a)!=null?A:-1}},[r,f,a]);const S=kt(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=kt(A=>{function O(D,F,j){const z=T.current?T.current(F,j):F.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return z?D.indexOf(z):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(O(N,N,g.current)===-1?S(!1):A.key===" "&&Dt(A)),N==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Dt(A),S(!0)),N.every(D=>{var F,j;return D?((F=D[0])==null?void 0:F.toLocaleLowerCase())!==((j=D[1])==null?void 0:j.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",h.current=v.current),g.current+=A.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=v.current,S(!1)},d);const P=h.current,_=O(N,[...N.slice((P||0)+1),...N.slice(0,(P||0)+1)],g.current);_!==-1?(y(_),v.current=_):A.key!==" "&&(g.current="",S(!1))}),R=k.useMemo(()=>({onKeyDown:C}),[C]),I=k.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&S(!1)}}),[C,S]);return k.useMemo(()=>c?{reference:R,floating:I}:{},[c,R,I])}function lv(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 Mj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Iw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,y=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,y}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:v,tree:y}=d;return function(T){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:S,clientY:C}=T,R=[S,C],I=Pn(T),A=T.type==="mouseleave",O=gt(g.floating,I),N=gt(g.domReference,I),V=g.domReference.getBoundingClientRect(),P=g.floating.getBoundingClientRect(),_=m.split("-")[0],D=p>P.right-P.width/2,F=f>P.bottom-P.height/2,j=Mj(R,V),z=P.width>V.width,M=P.height>V.height,$=(z?V:P).left,J=(z?V:P).right,te=(M?V:P).top,ee=(M?V:P).bottom;if(O&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&Qe(T.relatedTarget)&&gt(g.floating,T.relatedTarget)||y&&Hr(y.nodesRef.current,v).some(Y=>{let{context:L}=Y;return L==null?void 0:L.open}))return;if(_==="top"&&f>=V.bottom-1||_==="bottom"&&f<=V.top+1||_==="left"&&p>=V.right-1||_==="right"&&p<=V.left+1)return w();let Z=[];switch(_){case"top":Z=[[$,V.top+1],[$,P.bottom-1],[J,P.bottom-1],[J,V.top+1]];break;case"bottom":Z=[[$,P.top+1],[$,V.bottom-1],[J,V.bottom-1],[J,P.top+1]];break;case"left":Z=[[P.right-1,ee],[P.right-1,te],[V.left+1,te],[V.left+1,ee]];break;case"right":Z=[[V.right-1,ee],[V.right-1,te],[P.left+1,te],[P.left+1,ee]];break}function U(Y){let[L,W]=Y;switch(_){case"top":{const G=[z?L+t/2:D?L+t*4:L-t*4,W+t+1],ie=[z?L-t/2:D?L+t*4:L-t*4,W+t+1],B=[[P.left,D||z?P.bottom-t:P.top],[P.right,D?z?P.bottom-t:P.top:P.bottom-t]];return[G,ie,...B]}case"bottom":{const G=[z?L+t/2:D?L+t*4:L-t*4,W-t],ie=[z?L-t/2:D?L+t*4:L-t*4,W-t],B=[[P.left,D||z?P.top+t:P.bottom],[P.right,D?z?P.top+t:P.bottom:P.top+t]];return[G,ie,...B]}case"left":{const G=[L+t+1,M?W+t/2:F?W+t*4:W-t*4],ie=[L+t+1,M?W-t/2:F?W+t*4:W-t*4];return[...[[F||M?P.right-t:P.left,P.top],[F?M?P.right-t:P.left:P.right-t,P.bottom]],G,ie]}case"right":{const G=[L-t,M?W+t/2:F?W+t*4:W-t*4],ie=[L-t,M?W-t/2:F?W+t*4:W-t*4],B=[[F||M?P.left+t:P.right,P.top],[F?M?P.left+t:P.right:P.left+t,P.bottom]];return[G,ie,...B]}}}if(!lv([S,C],Z)){if(i&&!j)return w();if(!A&&r){const Y=c(T.clientX,T.clientY);if(Y!==null&&Y<.1)return w()}lv([S,C],U([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const mi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Sa(10),tp({fallbackAxisSideDirection:"end"}),ep(),hw({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=oo({open:n,middleware:i,transform:!0,whileElementsMounted:wa,onOpenChange:(m,g)=>{var v;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(v=e.onChange)==null||v.call(e,m))}}),c=Ea(l),u=ro(l),d=ao(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=io([c,u,d]);return x.jsxs(E.Fragment,{children:[x.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(no,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(hi,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[x.jsx(yw,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},Dj=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=oo({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Ea(s,{enabled:e.disabled??!0}),u=ao(s,{role:"tooltip"}),d=ro(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=io([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Oo,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:x.jsx(pt.span,{layoutId:o,children:e.trigger})}),x.jsx(vr,{children:i?x.jsx(no,{root:t,children:x.jsx(hi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:x.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},_w=300,jj=500,Ow=(e="")=>je("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),gd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),cv=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},l)=>{const[c,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,m]=E.useState(null),g=E.useRef([]),h=E.useRef([]),v=E.useContext(gd),y=br(),b=wr(),T=aj(),w=vw(),S=y!==null,{floatingStyles:C,refs:R,context:I}=oo({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:wa,placement:S?"right":"bottom-start",middleware:[Sa({mainAxis:S?0:4,alignmentAxis:S?-4:0}),tp(),ep()]}),A=ao(I,{role:"menu"}),O=ro(I,{bubbles:!0}),N=Sw(I,{move:!1,enabled:n,delay:{open:_w},handleClose:Iw({blockPointerEvents:!0})}),V=Ea(I,{event:"mousedown",toggle:!S,ignoreMouse:S,keyboardHandlers:!0}),P=op(I,{loop:!0,listRef:g,activeIndex:f,nested:S,onNavigate:m}),_=Oj(I,{activeIndex:f,listRef:h,resetMs:jj,onMatch:c?m:void 0}),{getReferenceProps:D,getFloatingProps:F,getItemProps:j}=io([N,V,A,O,P,_]);E.useEffect(()=>{if(!b)return;function M(){u(!1)}function $(J){J.nodeId!==T&&J.parentId===y&&u(!1)}return b.events.on("click",M),b.events.on("menuopen",$),()=>{b.events.off("click",M),b.events.off("menuopen",$)}},[b,T,y]),E.useEffect(()=>{c&&b&&b.events.emit("menuopen",{parentId:y,nodeId:T})},[b,c,T,y]);const z=o?s.className:je(Ow(s.className));return x.jsxs(sj,{id:T,children:[x.jsx(E.Fragment,{children:s.asChild?x.jsx(Ho,{...D(v.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:md([R.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:z}):x.jsxs("button",{type:"button",className:z,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:md([R.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,...D(v.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),v.setHasFocusInside(!0)}})),children:[a,S&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Pf,{size:14})]})]})}),x.jsx(gd.Provider,{value:{activeIndex:f,setActiveIndex:m,getItemProps:j,setHasFocusInside:p,isOpen:c},children:x.jsx(tj,{elementsRef:g,labelsRef:h,children:c&&x.jsx(no,{preserveTabOrder:!0,children:x.jsx(hi,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:x.jsx(t,{...F(),ref:R.setFloating,style:{...s.style,...C},className:je("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-xl outline-none",i),children:e})})})})})]})}),Nj=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(gd),s=vw({label:n?null:e}),l=wr(),c=s.index===a.activeIndex;return x.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:md([s.ref,i]),className:Ow(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?x.jsx(t,{size:16}):null]})}),Fj=E.forwardRef((e,t)=>br()!==null?x.jsx(cv,{...e,isParent:!1,ref:t}):x.jsx(lj,{children:x.jsx(cv,{...e,isParent:!0,ref:t})})),Lj=(e,t)=>qr()?t:window.matchMedia(e).matches,Vj=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(Lj(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},uv=()=>window.matchMedia("@media (pointer: coarse)"),$j=()=>{var r;const e=E.useRef(qr()?null:uv()),[t,n]=E.useState(qr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?uv():e.current).addEventListener("change",i=>n(i.matches))},[]),t},zj=e=>{const t=$j(),n=E.useRef(qr()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const r=document.documentElement;if(e){if(n.current=document.documentElement.style.overflowY,r.style.overflowY="hidden",t||b0())return;r.style.padding=Ky(r)?"0 15px 0 0":""}else r.style.padding="",document.documentElement.style.overflowY=n.current},[e,t]),E.useEffect(()=>{if(!e)return;const r=new AbortController,o=document.documentElement,i=a=>a.target===o&&e?a.preventDefault():void 0;return o.addEventListener("wheel",i,{signal:r.signal,passive:!1}),o.addEventListener("scroll",i,{signal:r.signal,passive:!1}),()=>{r.abort()}},[e])},vn="600ms",Bj={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},Hj={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},ou={drawer:e=>e==="left"?Bj:Hj,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.97,animationDuration:vn},initial:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},Wj=ti("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 h-[85vh] max-h-[85vh] max-h-[85svh] 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"}}),qj={top:0,left:0,right:0,bottom:-1},Uj=e=>e*.62,Yj=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=Uj(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return x.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:qj,whileDrag:{cursor:"grabbing"},className:je("absolute rounded-lg",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?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ua={drawer:"right",sheet:"none",dialog:"none"},Gj=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ua.drawer:Ua[o]:t?Ua[o]:Ua.sheet},Kj=({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,layoutId:a,onChange:s,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:p="",type:f="dialog",position:m,overlayClickClose:g=!1,ariaTitle:h,...v})=>{zj(e);const y=E.useId(),b=E.useId(),T=Vj("(min-width: 64rem)"),w=f!=="dialog",S=Gj(T,d,f,m),C=T||d?ou[f]:ou.sheet,R=typeof C=="function"?C(S):C,I=T||d?f:"sheet",{refs:A,context:O}=oo({open:e,onOpenChange:s}),N=Ea(O),V=ao(O,{role:"dialog"}),P=ro(O,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:_,getFloatingProps:D}=io([N,V,P]),F=o,j=Lo(void 0),z=()=>s(!1);return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(Ho,{ref:A.setReference,..._({layoutId:a}),children:F}):x.jsx(pt.button,{ref:A.setReference,..._(),layoutId:a,type:"button",children:F})}):null,x.jsx(no,{children:x.jsx(vr,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(wj,{lockScroll:!1,className:je(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:x.jsx(hi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:O,children:x.jsxs(pt.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:R,"data-component":"modal",ref:A.setFloating,"aria-modal":e,layoutId:a,className:je(Wj({position:S,type:I}),l),style:I==="drawer"?{width:j}:{height:j},...t?{"aria-labelledby":y,"aria-describedby":b}:{"aria-label":h},...D(),children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:y,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(ul,{})})}):null,w&&c?x.jsx(Yj,{onChange:s,parent:A.floating,position:S,sheet:I==="sheet",value:j}):null]})})}):null})})]})},Zj=e=>x.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),ip=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=Lf,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),v=t||"span",y=P=>{g(P),d==null||d(P)},{refs:b,floatingStyles:T,context:w}=oo({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:wa,onOpenChange:i?void 0:y,middleware:[ep(),Sa(5),tp({fallbackAxisSideDirection:"start"}),hw({padding:5,element:h})]}),S=Sw(w,{move:!0,delay:{open:_w},enabled:l?s:!1,handleClose:c?Iw():null}),C=Rj(w,{enabled:l?a:!1}),R=Ea(w,{enabled:l?c:!1}),I=ro(w,{enabled:l}),A=ao(w,{role:"tooltip",enabled:l}),O=Tj(w,{enabled:!!l&&!!u}),{getReferenceProps:N,getFloatingProps:V}=io([A,I,O,a?C:void 0,s?S:void 0,c?R:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),x.jsxs(E.Fragment,{children:[x.jsx(v,{...N(p),ref:el(b.setReference,f),children:n}),m&&x.jsx(no,{preserveTabOrder:!0,children:x.jsxs(cn,{...V(),ref:b.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(yw,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})});class As{static getDescendantProperty(t,n,r=[]){let o,i,a,s,l,c;if(n){if(a=n.indexOf("."),a===-1?o=n:(o=n.slice(0,a),i=n.slice(a+1)),s=t[o],s!==null&&typeof s<"u")if(!i&&(typeof s=="string"||typeof s=="number"))r.push(s);else if(Object.prototype.toString.call(s)==="[object Array]")for(l=0,c=s.length;l<c;l++)As.getDescendantProperty(s[l],i,r);else i&&As.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Vr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Vr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const a=As.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Vr.isMatch(a[l],t,this.options.caseSensitive);if(c){s=!0,n.push({item:o,score:c});break}}if(s)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Vr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Vr.indexesOfFirstLetter(t,n).forEach((a,s)=>{let l=a+1;o[s]=[a];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[s]=!1;break}o[s].push(l),l++}}),o=o.filter(a=>a!==!1),o.length?o.sort((a,s)=>a.length===1?a[0]-s[0]:(a=a[a.length-1]-a[0],s=s[s.length-1]-s[0],a-s))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Tl=0,Sr=1,gi=2,Mw=4;function dv(e){return()=>e}function Xj(e){e()}function oa(e,t){return n=>e(t(n))}function fv(e,t){return()=>e(t)}function Dw(e,t){return n=>e(t,n)}function ap(e){return e!==void 0}function Qj(...e){return()=>{e.map(Xj)}}function vi(){}function El(e,t){return t(e),e}function Jj(e,t){return t(e)}function lt(...e){return e}function Ke(e,t){return e(Sr,t)}function Oe(e,t){e(Tl,t)}function sp(e){e(gi)}function Lt(e){return e(Mw)}function xe(e,t){return Ke(e,Dw(t,Tl))}function Nn(e,t){const n=e(Sr,r=>{n(),t(r)});return n}function pv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function jw(e,t){return e===t}function at(e=jw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ee(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>oa(t,e)}function Cn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=eN(...t);return(r,o)=>{switch(r){case gi:sp(e);return;case Sr:return Ke(e,n(o))}}}function In(e,t){return n=>r=>{n(t=e(t,r))}}function Ko(e){return t=>n=>{e>0?e--:t(n)}}function lr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function De(...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);Ke(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 eN(...e){return t=>e.reduceRight(Jj,t)}function tN(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case Sr:return i?n===i?void 0:(r(),n=i,t=Ke(e,i),t):(r(),vi);case gi:r(),n=null;return}}}function se(e){let t=e;const n=$e();return(r,o)=>{switch(r){case Tl:t=o;break;case Sr:{o(t);break}case Mw:return t}return n(r,o)}}function Vt(e,t){return El(se(t),n=>xe(e,n))}function $e(){const e=[];return(t,n)=>{switch(t){case Tl:e.slice().forEach(r=>{r(n)});return;case gi:e.splice(0,e.length);return;case Sr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return El($e(),t=>xe(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:nN(),singleton:n}}const nN=()=>Symbol();function rN(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 Rt(...e){const t=$e(),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);Ke(i,l=>{n[a]=l,r=r|s,r===o&&Oe(t,n)})}),function(i,a){switch(i){case gi:{sp(t);return}case Sr:return r===o&&a(n),Ke(t,a)}}}function ke(e,t=jw){return ne(e,at(t))}function hv(...e){return function(t,n){switch(t){case gi:return;case Sr:return Qj(...e.map(r=>Ke(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const oN={0:"debug",3:"error",1:"log",2:"warn"},iN=()=>typeof globalThis>"u"?window:globalThis,Tr=qe(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=iN().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[oN[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Fn(e,t,n){return lp(e,t,n).callbackRef}function lp(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function Nw(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=aN(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 m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?mv("column-gap",getComputedStyle(u).columnGap,o):mv("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return lp(c,n,l)}function aN(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},tn.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 mv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function cp(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),m=c.top-f.top;p=f.height-Math.max(0,m),d=m+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}=lp(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.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==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=qe(()=>{const e=$e(),t=$e(),n=se(0),r=$e(),o=se(0),i=$e(),a=$e(),s=se(0),l=se(0),c=se(0),u=se(0),d=$e(),p=$e(),f=se(!1),m=se(!1),g=se(!1);return xe(ne(e,pe(({scrollTop:h})=>h)),t),xe(ne(e,pe(({scrollHeight:h})=>h)),a),xe(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ia={lvl:0};function Fw(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 tt(e){return e===ia}function aa(e,t){if(!tt(e))return t===e.k?e.v:t<e.k?aa(e.l,t):aa(e.r,t)}function wn(e,t,n="k"){if(tt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=wn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return wn(e.l,t,n)}function Jt(e,t,n){return tt(e)?$w(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?gv(Ct(e,{l:Jt(e.l,t,n)})):gv(Ct(e,{r:Jt(e.r,t,n)}))}function Po(){return ia}function Cl(e,t,n){if(tt(e))return[];const r=wn(e,t)[0];return sN(yd(e,r,n))}function vd(e,t){if(tt(e))return ia;const{k:n,l:r,r:o}=e;if(t===n){if(tt(r))return o;if(tt(o))return r;{const[i,a]=Vw(r);return ss(Ct(e,{k:i,l:Lw(r),v:a}))}}else return t<n?ss(Ct(e,{l:vd(r,t)})):ss(Ct(e,{r:vd(o,t)}))}function $r(e){return tt(e)?[]:[...$r(e.l),{k:e.k,v:e.v},...$r(e.r)]}function yd(e,t,n){if(tt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(yd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(yd(i,t,n))),s}function ss(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(iu(t))return zw(Ct(e,{lvl:n-1}));if(!tt(t)&&!tt(t.r))return Ct(t.r,{l:Ct(t,{r:t.r.l}),lvl:n,r:Ct(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(iu(e))return xd(Ct(e,{lvl:n-1}));if(!tt(r)&&!tt(r.l)){const o=r.l,i=iu(o)?r.lvl-1:r.lvl;return Ct(o,{l:Ct(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:xd(Ct(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ct(e,t){return $w(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 Lw(e){return tt(e.r)?e.l:ss(Ct(e,{r:Lw(e.r)}))}function iu(e){return tt(e)||e.lvl>e.r.lvl}function Vw(e){return tt(e.r)?[e.k,e.v]:Vw(e.r)}function $w(e,t,n,r=ia,o=ia){return{k:e,l:r,lvl:n,r:o,v:t}}function gv(e){return xd(zw(e))}function zw(e){const{l:t}=e;return!tt(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function xd(e){const{lvl:t,r:n}=e;return!tt(n)&&!tt(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function sN(e){return Fw(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 up=qe(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function Hw(e,t,n){return e[Is(e,t,n)]}function Is(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 lN(e,t,n,r){const o=Is(e,t,r),i=Is(e,n,r,o);return e.slice(o,i+1)}function Sn(e,t){return Math.round(e.getBoundingClientRect()[t])}function kl(e){return!tt(e.groupOffsetTree)}function dp({index:e},t){return t===e?0:t<e?-1:1}function cN(){return{groupIndices:[],groupOffsetTree:Po(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Po()}}function uN(e,t){let n=tt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),tt(e)){e=Jt(e,0,i);continue}const s=Cl(e,a-1,o+1);if(s.some(vN(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=vd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=Jt(e,o+1,p));c&&(e=Jt(e,a,i))}return[e,n]}function dN(e){return typeof e.groupIndex<"u"}function fN({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}=Hw(t,e,dp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Ww(e,t){if(!kl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function qw(e,t,n){if(dN(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 pN(e,t,n,r=0){return r>0&&(t=Math.max(t,Hw(e,r,dp).offset)),Fw(lN(e,t,n,fN),gN)}function hN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&tt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>Jt(Jt(m,g,p),g+1,f),a)}else[a,s]=uN(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=bd(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>Jt(p,f,la(f,d,o)),Po()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function mN(e){return $r(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 vv(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 bd(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Is(o,t-1,dp),s=o[l].offset;const c=wn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===wn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Cl(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 gN(e){return{index:e.index,value:e}}function vN(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 yN={offsetHeight:"height",offsetWidth:"width"},$n=qe(([{log:e},{recalcInProgress:t}])=>{const n=$e(),r=$e(),o=Vt(r,0),i=$e(),a=$e(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,S)=>Sn(w,yN[S])),p=se(void 0),f=se(0),m=cN(),g=Vt(ne(n,De(l,e,f),In(hN,m),at()),m),h=Vt(ne(l,at(),In((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);xe(ne(l,Ee(w=>w.length>0),De(g,f),pe(([w,S,C])=>{const R=w.reduce((I,A,O)=>Jt(I,A,la(A,S.offsetTree,C)||O),Po());return{...S,groupIndices:w,groupOffsetTree:R}})),g),xe(ne(r,De(g),Ee(([w,{lastIndex:S}])=>w<S),pe(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),xe(c,u);const v=Vt(ne(c,pe(w=>w===void 0)),!0);xe(ne(u,Ee(w=>w!==void 0&&tt(Lt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=en(ne(n,De(g),In(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),pe(w=>w.changed)));Ke(ne(s,In((w,S)=>({diff:w.prev-S,prev:S}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:S}=Lt(g);if(w>0)Oe(t,!0),Oe(i,w+vv(w,S));else if(w<0){const C=Lt(h);C.length>0&&(w-=vv(-w,C)),Oe(a,w)}}),Ke(ne(s,De(e)),([w,S])=>{w<0&&S("`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},tn.ERROR)});const b=en(i);xe(ne(i,De(g),pe(([w,S])=>{const C=S.groupIndices.length>0,R=[],I=S.lastSize;if(C){const A=aa(S.sizeTree,0);let O=0,N=0;for(;O<w;){const P=S.groupIndices[N],_=S.groupIndices.length===N+1?1/0:S.groupIndices[N+1]-P-1;R.push({endIndex:P,size:A,startIndex:P}),R.push({endIndex:P+1+_-1,size:I,startIndex:P+1}),N++,O+=_+1}const V=$r(S.sizeTree);return O!==w&&V.shift(),V.reduce((P,{k:_,v:D})=>{let F=P.ranges;return P.prevSize!==0&&(F=[...P.ranges,{endIndex:_+w-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:_+w,prevSize:D,ranges:F}},{prevIndex:w,prevSize:0,ranges:R}).ranges}return $r(S.sizeTree).reduce((A,{k:O,v:N})=>({prevIndex:O+w,prevSize:N,ranges:[...A.ranges,{endIndex:O+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const T=en(ne(a,De(g,f),pe(([w,{offsetTree:S},C])=>{const R=-w;return la(R,S,C)})));return xe(ne(a,De(g,f),pe(([w,S,C])=>{if(S.groupIndices.length>0){if(tt(S.sizeTree))return S;let R=Po();const I=Lt(h);let A=0,O=0,N=0;for(;A<-w;){N=I[O];const V=I[O+1]-N-1;O++,A+=V+1}if(R=$r(S.sizeTree).reduce((V,{k:P,v:_})=>Jt(V,Math.max(0,P+w),_),R),A!==-w){const V=aa(S.sizeTree,N);R=Jt(R,0,V);const P=wn(S.sizeTree,-w+1)[1];R=Jt(R,1,P)}return{...S,sizeTree:R,...bd(S.offsetTree,0,R,C)}}else{const R=$r(S.sizeTree).reduce((I,{k:A,v:O})=>Jt(I,Math.max(0,A+w),O),Po());return{...S,sizeTree:R,...bd(S.offsetTree,0,R,C)}}})),g),{beforeUnshiftWith:b,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}},lt(Tr,up),{singleton:!0});function xN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Uw=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=$e(),a=$e(),s=en(ne(i,pe(xN)));return xe(ne(s,pe(l=>l.totalCount)),n),xe(ne(s,pe(l=>l.groupIndices)),e),xe(ne(Rt(o,t,r),Ee(([l,c])=>kl(c)),pe(([l,c,u])=>wn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),at(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},lt($n,Wt)),Er=qe(([{log:e}])=>{const t=se(!1),n=en(ne(t,Ee(r=>r),at()));return Ke(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},lt(Tr),{singleton:!0}),bN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Yw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!bN)&&(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:p}])=>{const f=$e(),m=$e(),g=se(0);let h=null,v=null,y=null;function b(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Oe(l,!1)}return xe(ne(f,De(n,d,r,g,s,a,p),De(e,i,o),pe(([[T,w,S,C,R,I,A,O],N,V,P])=>{const _=Yw(T),{align:D,behavior:F,offset:j}=_,z=C-1,M=qw(_,w,z);let $=la(M,w.offsetTree,N)+I;D==="end"?($+=V+wn(w.sizeTree,M)[1]-S+P,M===z&&($+=A)):D==="center"?$+=(V+wn(w.sizeTree,M)[1]-S+P)/2:$-=R,j&&($+=j);const J=te=>{b(),te?(O("retrying to scroll to",{location:T},tn.DEBUG),Oe(f,T)):(Oe(m,!0),O("list did not change, scroll successful",{},tn.DEBUG))};if(b(),F==="smooth"){let te=!1;y=Ke(t,ee=>{te=te||ee}),h=Nn(u,()=>{J(te)})}else h=Nn(ne(t,wN(150)),J);return v=setTimeout(()=>{b()},1200),Oe(l,!0),O("scrolling from index to",{behavior:F,index:M,top:$},tn.DEBUG),{behavior:F,top:$}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},lt($n,Wt,Tr),{singleton:!0});function wN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function fp(e,t){e==0?t():requestAnimationFrame(()=>{fp(e-1,t)})}function pp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ka=qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),l=se(0),c=se(!0);return xe(ne(a,De(l),Ee(([u,d])=>!!d),Cn(!1)),s),xe(ne(a,De(l),Ee(([u,d])=>!!d),Cn(!1)),c),Ke(ne(Rt(t,a),De(s,n,e,c),Ee(([[,u],d,{sizeTree:p},f,m])=>u&&(!tt(p)||ap(f))&&!d&&!m),De(l)),([,u])=>{Nn(o,()=>{Oe(c,!0)}),fp(4,()=>{Nn(r,()=>{Oe(s,!0)}),Oe(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},lt($n,Wt,Ca,Er),{singleton:!0});function Gw(e,t){return Math.abs(e-t)<1.01}const ca="up",Hi="down",SN="none",TN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},EN=0,Ra=qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=$e(),c=$e(),u=se(4),d=se(EN),p=Vt(ne(hv(ne(ke(o),Ko(1),Cn(!0)),ne(ke(o),Ko(1),Cn(!1),pv(100))),at()),!1),f=Vt(ne(hv(ne(n,Cn(!0)),ne(n,Cn(!1),pv(200))),at()),!1);xe(ne(Rt(ke(o),ke(d)),pe(([y,b])=>y<=b),at()),s),xe(ne(s,lr(50)),c);const m=en(ne(Rt(r,ke(i),ke(t),ke(e),ke(u)),In((y,[{scrollHeight:b,scrollTop:T},w,S,C,R])=>{const I=T+w-b>-R,A={scrollHeight:b,scrollTop:T,viewportHeight:w};if(I){let N,V;return T>y.state.scrollTop?(N="SCROLLED_DOWN",V=y.state.scrollTop-T):(N="SIZE_DECREASED",V=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:V,state:A}}let O;return A.scrollHeight>y.state.scrollHeight?O="SIZE_INCREASED":w<y.state.viewportHeight?O="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?O="SCROLLING_UPWARDS":O="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:O,state:A}},TN),at((y,b)=>y&&y.atBottom===b.atBottom))),g=Vt(ne(r,In((y,{scrollHeight:b,scrollTop:T,viewportHeight:w})=>{if(Gw(y.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:T};{const S=b-(T+w)<1;return y.scrollTop!==T&&S?{changed:!0,jump:y.scrollTop-T,scrollHeight:b,scrollTop:T}:{changed:!0,jump:0,scrollHeight:b,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ee(y=>y.changed),pe(y=>y.jump)),0);xe(ne(m,pe(y=>y.atBottom)),a),xe(ne(a,lr(50)),l);const h=se(Hi);xe(ne(r,pe(({scrollTop:y})=>y),at(),In((y,b)=>Lt(f)?{direction:y.direction,prevScrollTop:b}:{direction:b<y.prevScrollTop?ca:Hi,prevScrollTop:b},{direction:Hi,prevScrollTop:0}),pe(y=>y.direction)),h),xe(ne(r,lr(50),Cn(SN)),h);const v=se(0);return xe(ne(p,Ee(y=>!y),Cn(0)),v),xe(ne(o,lr(100),De(p),Ee(([y,b])=>!!b),In(([y,b],[T])=>[b,T],[0,0]),pe(([y,b])=>b-y)),v),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},lt(Wt)),_s="top",Os="bottom",yv="none";function xv(e,t,n){return typeof e=="number"?n===ca&&t===_s||n===Hi&&t===Os?e:0:n===ca?t===_s?e.main:e.reverse:t===Os?e.main:e.reverse}function bv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const hp=qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=$e(),a=se(0),s=se(0),l=se(0),c=Vt(ne(Rt(ke(r),ke(o),ke(n),ke(i,sa),ke(l),ke(a),ke(t),ke(e),ke(s)),pe(([u,d,p,[f,m],g,h,v,y,b])=>{const T=u-y,w=h+v,S=Math.max(p-T,0);let C=yv;const R=bv(b,_s),I=bv(b,Os);return f-=y,f+=p+v,m+=p+v,m-=y,f>u+w-R&&(C=ca),m<u-S+d+I&&(C=Hi),C!==yv?[Math.max(T-p-xv(g,_s,C)-R,0),T-S-v+d+xv(g,Os,C)+I]:null}),Ee(u=>u!=null),at(sa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},lt(Wt),{singleton:!0});function CN(e,t,n){if(kl(t)){const r=Ww(e,t);return[{index:wn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const au={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ls(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,m=p-u;return{bottom:u,firstItemIndex:i,items:wv(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:wv(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function Kw(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=pp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return ls(c,[],s,o,n,r)}function wv(e,t,n){if(e.length===0)return[];if(!kl(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=Cl(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 so=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:m}])=>{const g=se([]),h=se(0),v=$e();xe(i.topItemsIndexes,g);const y=Vt(ne(Rt(f,m,ke(l,sa),ke(o),ke(r),ke(c),u,ke(g),ke(t),ke(n),e),Ee(([S,C,,R,,,,,,,I])=>{const A=I&&I.length!==R;return S&&!C&&!A}),pe(([,,[S,C],R,I,A,O,N,V,P,_])=>{const D=I,{offsetTree:F,sizeTree:j}=D,z=Lt(h);if(R===0)return{...au,totalCount:R};if(S===0&&C===0)return z===0?{...au,totalCount:R}:Kw(z,A,I,V,P,_||[]);if(tt(j))return z>0?null:ls(CN(pp(A,R),D,_),[],R,P,D,V);const M=[];if(N.length>0){const Z=N[0],U=N[N.length-1];let Y=0;for(const L of Cl(j,Z,U)){const W=L.value,G=Math.max(L.start,Z),ie=Math.min(L.end,U);for(let B=G;B<=ie;B++)M.push({data:_==null?void 0:_[B],index:B,offset:Y,size:W}),Y+=W}}if(!O)return ls([],M,R,P,D,V);const $=N.length>0?N[N.length-1]+1:0,J=pN(F,S,C,$);if(J.length===0)return null;const te=R-1,ee=El([],Z=>{for(const U of J){const Y=U.value;let L=Y.offset,W=U.start;const G=Y.size;if(Y.offset<S){W+=Math.floor((S-Y.offset+P)/(G+P));const B=W-U.start;L+=B*G+B*P}W<$&&(L+=($-W)*G,W=$);const ie=Math.min(U.end,te);for(let B=W;B<=ie&&!(L>=C);B++)Z.push({data:_==null?void 0:_[B],index:B,offset:L,size:G}),L+=G+P}});return ls(ee,M,R,P,D,V)}),Ee(S=>S!==null),at()),au);xe(ne(e,Ee(ap),pe(S=>S==null?void 0:S.length)),o),xe(ne(y,pe(S=>S.topListHeight)),d),xe(d,s),xe(ne(y,pe(S=>[S.top,S.bottom])),a),xe(ne(y,pe(S=>S.items)),v);const b=en(ne(y,Ee(({items:S})=>S.length>0),De(o,e),Ee(([{items:S},C])=>S[S.length-1].originalIndex===C-1),pe(([,S,C])=>[S-1,C]),at(sa),pe(([S])=>S))),T=en(ne(y,lr(200),Ee(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),pe(({items:S})=>S[0].index),at())),w=en(ne(y,Ee(({items:S})=>S.length>0),pe(({items:S})=>{let C=0,R=S.length-1;for(;S[C].type==="group"&&C<R;)C++;for(;S[R].type==="group"&&R>C;)R--;return{endIndex:S[R].index,startIndex:S[C].index}}),at(Bw)));return{endReached:b,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},lt($n,Uw,hp,ka,Ca,Ra,Er,up),{singleton:!0}),Zw=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=$e(),a=Vt(ne(Rt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(ke(a),i),{totalListHeight:a,totalListHeightChanged:i}},lt(Wt,so),{singleton:!0}),kN=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Vt(ne(Rt(n,e,t),Ee(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),lr(0),at()),0);return{alignToBottom:n,paddingTopAddition:r}},lt(Wt,Zw),{singleton:!0});function Sv(e){return e?e==="smooth"?"smooth":"auto":!1}const RN=(e,t)=>typeof e=="function"?Sv(e(t)):t&&Sv(e),PN=qe(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=se(!1),d=$e();let p=null;function f(g){Oe(o,{align:"end",behavior:g,index:"LAST"})}Ke(ne(Rt(ne(ke(t),Ko(1)),a),De(ke(u),r,i,c),pe(([[g,h],v,y,b,T])=>{let w=h&&b,S="auto";return w&&(S=RN(v,y||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),Ee(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Nn(e,()=>{Lt(l)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Nn(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return Ke(ne(Rt(ke(u),t,s),Ee(([g,,h])=>g&&h),In(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ee(({refreshed:g})=>g),De(u,t)),([,g])=>{Lt(i)&&m(g!==!1)}),Ke(d,()=>{m(Lt(u)!==!1)}),Ke(Rt(ke(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},lt($n,Ra,Ca,ka,Er,Tr,Wt)),AN=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(ne(s,De(i),Ee(([,l])=>l!==0),De(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>Kw(l,c,u,d,p,f))),a),{}),lt($n,ka,so,Er),{singleton:!0}),IN=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return Ke(ne(e,De(r),Ee(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Nn(ne(n,Ko(1),Ee(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Oe(t,o)})})}),{initialScrollTop:r}},lt(Er,Wt,so),{singleton:!0}),_N=({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,ON=qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=$e();return xe(ne(u,De(t,l,n,i,o,r,s),De(e),pe(([[d,p,f,m,g,h,v,y],b])=>{const{align:T,behavior:w,calculateViewLocation:S=_N,done:C,...R}=d,I=qw(d,p,m-1),A=la(I,p.offsetTree,b)+g+h,O=A+wn(p.sizeTree,I)[1],N=y+h,V=y+f-v,P=S({itemBottom:O,itemTop:A,locationParams:{align:T,behavior:w,...R},viewportBottom:V,viewportTop:N});return P?C&&Nn(ne(a,Ee(_=>!_),Ko(Lt(a)?1:2)),C):C&&C(),P}),Ee(d=>d!==null)),c),{scrollIntoView:u}},lt($n,Wt,Ca,so,Tr),{singleton:!0}),Xw=qe(([{scrollVelocity:e}])=>{const t=se(!1),n=$e(),r=se(!1);return xe(ne(e,De(r,t,n),Ee(([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}),at()),t),Ke(ne(Rt(t,e,n),De(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},lt(Ra),{singleton:!0}),mp=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=$e(),r=$e(),o=$e(),i=se(!1),a=se(void 0);return xe(ne(Rt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(ne(t,De(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},lt(Wt)),MN=qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=$e(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(l,p),Ke(ne(c,De(t,r,a,d,p,n)),([f,m,g,h,v,y,b])=>{const T=mN(m.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=b,f({ranges:T,scrollTop:g})}),xe(ne(u,Ee(ap),pe(DN)),o),xe(ne(i,De(u),Ee(([,f])=>f!==void 0),at(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},lt($n,Wt,ka,Er,mp));function DN(e){return{align:"start",index:0,offset:e.scrollTop}}const jN=qe(([{topItemsIndexes:e}])=>{const t=se(0);return xe(ne(t,Ee(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},lt(so));function Qw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const NN=Qw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),FN=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:m}])=>{const g=en(ne(l,De(a),In(([,v,y,b],[{bottom:T,items:w,offsetBottom:S,totalCount:C},R])=>{const I=T+S;let A=0;return y===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(A=I-b,A!==0&&(A+=R))),[A,w,C,I]},[0,[],0,0]),Ee(([v])=>v!==0),De(r,s,n,o,f,m),Ee(([,v,y,b,,,T])=>!T&&!b&&v!==0&&y===ca),pe(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Oe(t,{behavior:"auto",top:-v}),Oe(e,0)):(Oe(e,0),Oe(t,{behavior:"auto",top:-v}))}return Ke(ne(g,De(e,i)),([v,y,b])=>{b&&NN()?Oe(e,y-v):h(-v)}),Ke(ne(Rt(Vt(i,!1),e,m),Ee(([v,y,b])=>!v&&!b&&y!==0),pe(([v,y])=>y),lr(1)),h),xe(ne(d,pe(v=>({top:-v}))),t),Ke(ne(c,De(p,u),pe(([v,{groupIndices:y,lastSize:b,sizeTree:T},w])=>{function S(C){return C*(b+w)}if(y.length===0)return S(v);{let C=0;const R=aa(T,0);let I=0,A=0;for(;I<v;){I++,C+=R;let O=y.length===A+1?1/0:y[A+1]-y[A]-1;I+O>v&&(C-=R,O=v-I+1),I+=O,C+=S(O),A++}return C}})),v=>{Oe(e,v),requestAnimationFrame(()=>{Oe(t,{top:v}),requestAnimationFrame(()=>{Oe(e,0),Oe(m,!1)})})}),{deviation:e}},lt(Wt,Ra,so,$n,Tr,up)),LN=qe(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),lt(hp,AN,Er,Xw,Zw,IN,kN,mp,ON,Tr)),Jw=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:m},g,h,v,{listState:y,topItemsIndexes:b,...T},{scrollToIndex:w},S,{topItemCount:C},{groupCounts:R},I])=>(xe(T.rangeChanged,I.scrollSeekRangeChanged),xe(ne(I.windowViewportRect,pe(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:R,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...I,...g,sizes:l,...h}),lt($n,ka,Wt,MN,PN,so,Ca,FN,jN,Uw,LN));function VN(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 Ya=typeof document<"u"?E.useLayoutEffect:E.useEffect;function gp(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=E.createContext({});function l(h,v){h.propsReady&&Oe(h.propsReady,!1);for(const y of r){const b=h[t.required[y]];Oe(b,v[y])}for(const y of o)if(y in v){const b=h[t.optional[y]];Oe(b,v[y])}h.propsReady&&Oe(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=b=>{const T=h[t.methods[y]];Oe(T,b)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=tN(h[t.events[y]]),v),{})}const d=E.forwardRef((h,v)=>{const{children:y,...b}=h,[T]=E.useState(()=>El(rN(e),C=>{l(C,b)})),[w]=E.useState(fv(u,T));Ya(()=>{for(const C of a)C in b&&Ke(w[C],b[C]);return()=>{Object.values(w).map(sp)}},[b,w,T]),Ya(()=>{l(T,b)}),E.useImperativeHandle(v,dv(c(T)));const S=n;return x.jsx(s.Provider,{value:T,children:n?x.jsx(S,{...VN([...r,...o,...a],b),children:y}):y})}),p=h=>E.useCallback(Dw(Oe,E.useContext(s)[h]),[h]),f=h=>{const v=E.useContext(s)[h],y=E.useCallback(b=>Ke(v,b),[v]);return E.useSyncExternalStore(y,()=>Lt(v),()=>Lt(v))},m=h=>{const v=E.useContext(s)[h],[y,b]=E.useState(fv(Lt,v));return Ya(()=>Ke(v,T=>{T!==y&&b(dv(T))}),[v,y]),y},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const y=E.useContext(s)[h];Ya(()=>Ke(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const Rl=E.createContext(void 0),e1=E.createContext(void 0),t1=typeof document<"u"?E.useLayoutEffect:E.useEffect;function su(e){return"self"in e}function $N(e){return"body"in e}function n1(e,t,n,r=vi,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,m,g;const h=p.target;if($N(h)||su(h)){const y=su(h)?h:h.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,m=i?y.innerWidth:y.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?v():ha.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.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 m=p.behavior==="smooth";let g,h,v;su(f)?(h=Math.max(Sn(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):(h=f[i?"scrollWidth":"scrollHeight"],g=Sn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=h-g;if(p.top=Math.ceil(Math.max(Math.min(y,p.top),0)),Gw(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),m&&t(!0);return}m?(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 lu="-webkit-sticky",Tv="sticky",r1=Qw(()=>{if(typeof document>"u")return Tv;const e=document.createElement("div");return e.style.position=lu,e.style.position===lu?lu:Tv});function vp(e){return e}const zN=qe(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(vp),i=se("div"),a=se(vi),s=(l,c=null)=>Vt(ne(r,pe(u=>u[l]),at()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),BN=qe(([e,t])=>({...e,...t}),lt(Jw,zN)),HN=({height:e})=>x.jsx("div",{style:{height:e}}),WN={overflowAnchor:"none",position:r1(),zIndex:1},o1={overflowAnchor:"none"},qN={...o1,display:"inline-block",height:"100%"},Ev=E.memo(function({showTopList:e=!1}){const t=Pe("listState"),n=sn("sizeRanges"),r=Pe("useWindowScroll"),o=Pe("customScrollParent"),i=sn("windowScrollContainerState"),a=sn("scrollContainerState"),s=o||r?i:a,l=Pe("itemContent"),c=Pe("context"),u=Pe("groupContent"),d=Pe("trackItemSizes"),p=Pe("itemSize"),f=Pe("log"),m=sn("gap"),g=Pe("horizontalDirection"),{callbackRef:h}=Nw(n,p,d,e?vi:s,f,m,o,g,Pe("skipAnimationFrameInResizeObserver")),[v,y]=E.useState(0);bp("deviation",P=>{v!==P&&y(P)});const b=Pe("EmptyPlaceholder"),T=Pe("ScrollSeekPlaceholder")||HN,w=Pe("ListComponent"),S=Pe("ItemComponent"),C=Pe("GroupComponent"),R=Pe("computeItemKey"),I=Pe("isSeeking"),A=Pe("groupIndices").length>0,O=Pe("alignToBottom"),N=Pe("initialItemFinalLocationReached"),V=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:O?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:O?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...st(b,c)}):x.jsx(w,{...st(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:V,children:(e?t.topItems:t.items).map(P=>{const _=P.originalIndex,D=R(_+t.firstItemIndex,P.data,c);return I?E.createElement(T,{...st(T,c),height:P.size,index:P.index,key:D,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...st(C,c),"data-index":_,"data-item-index":P.index,"data-known-size":P.size,key:D,style:WN},u(P.index,c)):E.createElement(S,{...st(S,c),...i1(S,P.data),"data-index":_,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:D,style:g?qN:o1},A?l(P.index,P.groupIndex,P.data,c):l(P.index,P.data,c))})})}),UN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},YN={outline:"none",overflowX:"auto",position:"relative"},yi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),GN={position:r1(),top:0,width:"100%",zIndex:1};function st(e,t){if(typeof e!="string")return{context:t}}function i1(e,t){return{item:typeof e=="string"?void 0:t}}const KN=E.memo(function(){const e=Pe("HeaderComponent"),t=sn("headerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),ZN=E.memo(function(){const e=Pe("FooterComponent"),t=sn("footerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null});function yp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.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:m}=n1(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),x.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?YN:UN,...o},tabIndex:0,...i,...st(s,u),children:r})})}function xp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.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=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=n1(a,l,s,m,d);return t1(()=>{var y;return h.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),x.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...st(s,p),children:r})})}const XN=({children:e})=>{const t=E.useContext(Rl),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Pe("alignToBottom"),i=Pe("horizontalDirection"),a=E.useMemo(()=>oa(n,l=>Sn(l,i?"width":"height")),[n,i]),s=Fn(a,!0,Pe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:s,style:yi(o),children:e})},QN=({children:e})=>{const t=E.useContext(Rl),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Pe("customScrollParent"),i=cp(n,o,Pe("skipAnimationFrameInResizeObserver")),a=Pe("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(a),children:e})},JN=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...GN,marginTop:`${n}px`},o=Pe("context");return x.jsx(t,{style:r,...st(t,o),children:e})},eF=E.memo(function(e){const t=Pe("useWindowScroll"),n=Pe("topItemsIndexes").length>0,r=Pe("customScrollParent"),o=Pe("context"),i=r||t?rF:nF,a=r||t?QN:XN;return x.jsxs(i,{...e,...st(i,o),children:[n&&x.jsx(JN,{children:x.jsx(Ev,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(KN,{}),x.jsx(Ev,{}),x.jsx(ZN,{})]})]})}),{Component:tF,useEmitter:bp,useEmitterValue:Pe,usePublisher:sn}=gp(BN,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},eF),nF=yp({useEmitter:bp,useEmitterValue:Pe,usePublisher:sn}),rF=xp({useEmitter:bp,useEmitterValue:Pe,usePublisher:sn}),wp=tF,oF=qe(()=>{const e=se(l=>x.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(vp),a=se(vi),s=(l,c=null)=>Vt(ne(o,pe(u=>u[l]),at()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),iF=qe(([e,t])=>({...e,...t}),lt(Jw,oF)),aF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),sF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),lF={overflowAnchor:"none"},Cv=E.memo(function({showTopList:e=!1}){const t=Me("listState"),n=Me("computeItemKey"),r=Me("firstItemIndex"),o=Me("isSeeking"),i=Me("ScrollSeekPlaceholder")||aF,a=Me("context"),s=Me("TableRowComponent"),l=Me("fixedHeaderHeight"),c=Me("itemContent"),u=(e?t.topItems:[]).reduce((p,f,m)=>(m===0?p.push(f.size):p.push(p[m-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,m=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...st(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...st(s,a),...i1(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:lF},c(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),cF=E.memo(function(){const e=Me("listState"),t=Me("topItemsIndexes").length>0,n=xn("sizeRanges"),r=Me("useWindowScroll"),o=Me("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Me("trackItemSizes"),c=Me("itemSize"),u=Me("log"),{callbackRef:d,ref:p}=Nw(n,c,l,s,u,void 0,o,!1,Me("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Sp("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,m(A))});const g=Me("EmptyPlaceholder"),h=Me("FillerRow")||sF,v=Me("TableBodyComponent"),y=Me("paddingTopAddition"),b=Me("statefulTotalCount"),T=Me("context");if(b===0&&g)return x.jsx(g,{...st(g,T)});const w=(t?e.topItems:[]).reduce((A,O)=>A+O.size,0),S=e.offsetTop+y+f-w,C=e.offsetBottom,R=S>0?x.jsx(h,{context:T,height:S},"padding-top"):null,I=C>0?x.jsx(h,{context:T,height:C},"padding-bottom"):null;return x.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...st(v,T),children:[R,t&&x.jsx(Cv,{showTopList:!0}),x.jsx(Cv,{}),I]})}),uF=({children:e})=>{const t=E.useContext(Rl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Fn(E.useMemo(()=>oa(n,i=>Sn(i,"height")),[n]),!0,Me("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:yi(!1),children:e})},dF=({children:e})=>{const t=E.useContext(Rl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Me("customScrollParent"),i=cp(n,o,Me("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(!1),children:e})},fF=E.memo(function(e){const t=Me("useWindowScroll"),n=Me("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=Me("fixedHeaderContent"),a=Me("fixedFooterContent"),s=Me("context"),l=Fn(E.useMemo(()=>oa(r,v=>Sn(v,"height")),[r]),!0,Me("skipAnimationFrameInResizeObserver")),c=Fn(E.useMemo(()=>oa(o,v=>Sn(v,"height")),[o]),!0,Me("skipAnimationFrameInResizeObserver")),u=n||t?mF:hF,d=n||t?dF:uF,p=Me("TableComponent"),f=Me("TableHeadComponent"),m=Me("TableFooterComponent"),g=i?x.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...st(f,s),children:i()},"TableHead"):null,h=a?x.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...st(m,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...st(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...st(p,s),children:[g,x.jsx(cF,{},"TableBody"),h]})})})}),{Component:pF,useEmitter:Sp,useEmitterValue:Me,usePublisher:xn}=gp(iF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},fF),hF=yp({useEmitter:Sp,useEmitterValue:Me,usePublisher:xn}),mF=xp({useEmitter:Sp,useEmitterValue:Me,usePublisher:xn}),gF=pF,kv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},vF={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Rv,floor:Ms,max:Wi,min:cu,round:Pv}=Math;function Av(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function yF(e){return{...vF,items:e}}function Ga(e,t){return e&&e.width===t.width&&e.height===t.height}function xF(e,t){return e&&e.column===t.column&&e.row===t.row}const bF=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:m,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:T},w])=>{const S=se(0),C=se(0),R=se(kv),I=se({height:0,width:0}),A=se({height:0,width:0}),O=$e(),N=$e(),V=se(0),P=se(null),_=se({column:0,row:0}),D=$e(),F=$e(),j=se(!1),z=se(0),M=se(!0),$=se(!1),J=se(!1);Ke(ne(m,De(z),Ee(([L,W])=>!!W)),()=>{Oe(M,!1)}),Ke(ne(Rt(m,M,A,I,z,$),Ee(([L,W,G,ie,,B])=>L&&!W&&G.height!==0&&ie.height!==0&&!B)),([,,,,L])=>{Oe($,!0),fp(1,()=>{Oe(O,L)}),Nn(ne(c),()=>{Oe(t,[0,0]),Oe(M,!0)})}),xe(ne(F,Ee(L=>L!=null&&L.scrollTop>0),Cn(0)),C),Ke(ne(m,De(F),Ee(([,L])=>L!=null)),([,L])=>{L&&(Oe(I,L.viewport),Oe(A,L.item),Oe(_,L.gap),L.scrollTop>0&&(Oe(j,!0),Nn(ne(c,Ko(1)),W=>{Oe(j,!1)}),Oe(l,{top:L.scrollTop})))}),xe(ne(I,pe(({height:L})=>L)),d),xe(ne(Rt(ke(I,Ga),ke(A,Ga),ke(_,(L,W)=>L&&L.column===W.column&&L.row===W.row),ke(c)),pe(([L,W,G,ie])=>({gap:G,item:W,scrollTop:ie,viewport:L}))),D),xe(ne(Rt(ke(S),r,ke(_,xF),ke(A,Ga),ke(I,Ga),ke(P),ke(C),ke(j),ke(M),ke(z)),Ee(([,,,,,,,L])=>!L),pe(([L,[W,G],ie,B,ye,Se,Ie,,Le,ae])=>{const{column:ve,row:K}=ie,{height:le,width:Q}=B,{width:oe}=ye;if(Ie===0&&(L===0||oe===0))return kv;if(Q===0){const fn=pp(ae,L),Tn=fn+Math.max(Ie-1,0);return yF(Av(fn,Tn,Se))}const be=a1(oe,Q,ve);let X,ce;Le?W===0&&G===0&&Ie>0?(X=0,ce=Ie-1):(X=be*Ms((W+K)/(le+K)),ce=be*Rv((G+K)/(le+K))-1,ce=cu(L-1,Wi(ce,be-1)),X=cu(ce,Wi(0,X))):(X=0,ce=-1);const Re=Av(X,ce,Se),{bottom:ze,top:xt}=Iv(ye,ie,B,Re),ut=Rv(L/be),Ot=ut*le+(ut-1)*K-ze;return{bottom:ze,itemHeight:le,items:Re,itemWidth:Q,offsetBottom:Ot,offsetTop:xt,top:xt}})),R),xe(ne(P,Ee(L=>L!==null),pe(L=>L.length)),S),xe(ne(Rt(I,A,R,_),Ee(([L,W,{items:G}])=>G.length>0&&W.height!==0&&L.height!==0),pe(([L,W,{items:G},ie])=>{const{bottom:B,top:ye}=Iv(L,ie,W,G);return[ye,B]}),at(sa)),t);const te=se(!1);xe(ne(c,De(te),pe(([L,W])=>W||L!==0)),te);const ee=en(ne(Rt(R,S),Ee(([{items:L}])=>L.length>0),De(te),Ee(([[L,W],G])=>{const ie=L.items[L.items.length-1].index===W-1;return(G||L.bottom>0&&L.itemHeight>0&&L.offsetBottom===0&&L.items.length===W)&&ie}),pe(([[,L]])=>L-1),at())),Z=en(ne(ke(R),Ee(({items:L})=>L.length>0&&L[0].index===0),Cn(0),at())),U=en(ne(ke(R),De(j),Ee(([{items:L},W])=>L.length>0&&!W),pe(([{items:L}])=>({endIndex:L[L.length-1].index,startIndex:L[0].index})),at(Bw),lr(0)));xe(U,f.scrollSeekRangeChanged),xe(ne(O,De(I,A,S,_),pe(([L,W,G,ie,B])=>{const ye=Yw(L),{align:Se,behavior:Ie,offset:Le}=ye;let ae=ye.index;ae==="LAST"&&(ae=ie-1),ae=Wi(0,ae,cu(ie-1,ae));let ve=wd(W,B,G,ae);return Se==="end"?ve=Pv(ve-W.height+G.height):Se==="center"&&(ve=Pv(ve-W.height/2+G.height/2)),Le&&(ve+=Le),{behavior:Ie,top:ve}})),l);const Y=Vt(ne(R,pe(L=>L.offsetBottom+L.bottom)),0);return xe(ne(T,pe(L=>({height:L.visibleHeight,width:L.visibleWidth}))),I),{customScrollParent:h,data:P,deviation:V,footerHeight:o,gap:_,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:F,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:O,scrollTop:c,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:T,...f,gridState:R,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:Y,...p,endReached:ee,propsReady:g,rangeChanged:U,startReached:Z,stateChanged:D,stateRestoreInProgress:j,...w}},lt(hp,Wt,Ra,Xw,Er,mp,Tr));function a1(e,t,n){return Wi(1,Ms((e+n)/(Ms(t)+n)))}function Iv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=wd(e,t,n,r[0].index);return{bottom:wd(e,t,n,r[r.length-1].index)+o,top:i}}function wd(e,t,n,r){const o=a1(e.width,n.width,t.column),i=Ms(r/o),a=i*n.height+Wi(0,i-1)*t.row;return a>0?a+t.row:a}const wF=qe(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(vp),a=se("div"),s=se(vi),l=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),at()),p),c=se(!1),u=se(!1);return xe(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")}}),SF=qe(([e,t])=>({...e,...t}),lt(bF,wF)),TF=E.memo(function(){const e=ct("gridState"),t=ct("listClassName"),n=ct("itemClassName"),r=ct("itemContent"),o=ct("computeItemKey"),i=ct("isSeeking"),a=ln("scrollHeight"),s=ct("ItemComponent"),l=ct("ListComponent"),c=ct("ScrollSeekPlaceholder"),u=ct("context"),d=ln("itemDimensions"),p=ln("gap"),f=ct("log"),m=ct("stateRestoreInProgress"),g=ln("reportReadyState"),h=Fn(E.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const b=v.firstChild;if(b){const{height:T,width:w}=b.getBoundingClientRect();d({height:T,width:w})}p({column:_v("column-gap",getComputedStyle(v).columnGap,f),row:_v("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return t1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:x.jsx(l,{className:t,ref:h,...st(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?x.jsx(c,{...st(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):E.createElement(s,{...st(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),EF=E.memo(function(){const e=ct("HeaderComponent"),t=ln("headerHeight"),n=ct("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=ct("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),CF=E.memo(function(){const e=ct("FooterComponent"),t=ln("footerHeight"),n=ct("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=ct("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),kF=({children:e})=>{const t=E.useContext(e1),n=ln("itemDimensions"),r=ln("viewportDimensions"),o=Fn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.jsx("div",{ref:o,style:yi(!1),children:e})},RF=({children:e})=>{const t=E.useContext(e1),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=ct("customScrollParent"),i=cp(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.jsx("div",{ref:i,style:yi(!1),children:e})},PF=E.memo(function({...e}){const t=ct("useWindowScroll"),n=ct("customScrollParent"),r=n||t?IF:AF,o=n||t?RF:kF,i=ct("context");return x.jsx(r,{...e,...st(r,i),children:x.jsxs(o,{children:[x.jsx(EF,{}),x.jsx(TF,{}),x.jsx(CF,{})]})})}),{useEmitter:s1,useEmitterValue:ct,usePublisher:ln}=gp(SF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},PF),AF=yp({useEmitter:s1,useEmitterValue:ct,usePublisher:ln}),IF=xp({useEmitter:s1,useEmitterValue:ct,usePublisher:ln});function _v(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Tp=()=>{const e=E.useContext(li);return e?e.tweaks:ml},l1=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("span",{className:je("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.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:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(ip,{as:"button",type:"button","aria-description":r,title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(qb,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:x.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?x.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[x.jsx(Hb,{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}),x.jsx(vA,{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]}),o]}),Pa=E.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:m,componentName:g,placeholder:h,hideLeft:v=!1,required:y,disabled:b,reportStatus:T},w)=>{const S=Tp(),C=T!==void 0?T:S.input.iconFeedback,R=d??f,I=_t(),A=e??I.inputOptionalLabel;return x.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:je("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[x.jsxs("label",{form:u,htmlFor:R,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:[x.jsx(l1,{info:s,hideLeft:v,reportStatus:C,title:m,placeholder:h,children:A||n?x.jsxs(E.Fragment,{children:[y?null:x.jsx("span",{"aria-disabled":b,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?x.jsx(E.Fragment,{children:n}):null]}):null}),x.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?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),x.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}),x.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})]})}),_F=e=>x.jsx(E.Fragment,{children:e.children}),OF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},MF={caseSensitive:!1,sort:!1},DF=[],jF=E.forwardRef(function(t,n){return x.jsx(pt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),NF=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),FF={List:jF,Item:NF},vo=320,uu=40,LF=E.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:m=!1,...g},h)=>{const v=E.useRef(null),y=E.useRef(null),b=g.value??g.defaultValue??"",T=_t(),[w,S]=E.useState(()=>Math.min(vo,uu*o.length)),[C,R]=E.useState(!1),[I,A]=E.useState(""),[O,N]=E.useState(b),[V,P]=E.useState(()=>{var K;return((K=o.find(le=>le.value===b))==null?void 0:K.label)??b}),[_,D]=E.useState(null),F=E.useRef(DF),j=m&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,z=new Vr(j,["value","label"],MF).search(I),M=()=>{R(!1),S(0)},$=z.filter(K=>K.hidden!==!0),J=m?void 0:`^(${o.map(K=>`${rd(K.value)}${K.label?"|"+rd(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(g.value){const K=o.find(le=>le.value===g.value);N((K==null?void 0:K.label)??g.value)}},[g.value]),E.useEffect(()=>{C||S(0)},[C]),E.useEffect(()=>{if(!C)return;const K=U.floating;if(K.current===null)return;let le=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min($.length,10)).forEach(be=>{const X=be.getBoundingClientRect();le+=X.height});const oe=Math.min(le,vo);S(oe)},[I,C]);const{x:te,y:ee,strategy:Z,refs:U,context:Y}=oo({open:C,transform:!0,strategy:"absolute",onOpenChange:R,whileElementsMounted:wa,middleware:[Sa(4),pw({padding:10,elementContext:"reference",apply(K){const le=v.current.getBoundingClientRect().width,Q=K.elements.floating.querySelector("ul"),oe=(Q==null?void 0:Q.getBoundingClientRect().height)||0,be=Math.min(oe<uu?vo:oe,vo);ha.flushSync(()=>setTimeout(()=>{const X=(Q==null?void 0:Q.getBoundingClientRect().height)??0;return X<uu?void S(be):void S(Math.min(X,vo))},50)),Object.assign(K.elements.floating.style,{width:`${le}px`,maxWidth:`${le}px`,maxHeight:`${vo}`})}})]}),L=Aw(Y,OF),{getReferenceProps:W,getFloatingProps:G,getItemProps:ie}=io([ao(Y,{role:"listbox"}),ro(Y),op(Y,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{const K=U.reference.current;if(K)return ma(K)},[]);const B=(K,le)=>{N(K.value);const Q=U.reference.current;if(!Q)return;Q==null||Q.setAttribute("data-value",K.value),Q.value=K.value;const oe=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(oe),g.onChange&&g.onChange(oe),P(K.label??""),M(),A(""),D(le)},ye=K=>{var Q;const le=K.target.value;return A(le),!C&&le===""?R(!0):(K.target.name=g.name||"",le?R(!0):(Q=g.onChange)==null?void 0:Q.call(g,K))},Se=()=>{var K;R(!0),A(""),(K=U.reference.current)==null||K.focus()},Ie=()=>{D(K=>K===null?0:K),R(!0),A("")},Le=()=>{var K;(K=U.reference.current)==null||K.setAttribute("data-value",""),A(""),N(""),P(""),Gy(U.reference.current),M()},ae=g.id||g.name,ve=$.length===0;return x.jsxs(Pa,{...g,left:e,error:t,ref:v,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Se,children:[x.jsx(Rf,{size:20}),x.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),O?x.jsx("button",{type:"button",onClick:Le,className:"p-2 transition-colors link:text-danger md:p-1",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.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:[x.jsx("input",{"data-shadow":"true",...W({...g,onChange:ye,onFocus:Ie,pattern:J,ref:U.setReference,name:`${ae}-shadow`,id:`${ae}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var le,Q;if(K.key==="Escape")return K.currentTarget.blur(),M();if(C){if(K.key==="ArrowDown"){let oe=nt.number(_)?_+1:0;return oe>$.length-1&&(oe=0),(le=y.current)==null||le.scrollIntoView({index:oe}),D(oe)}if(K.key==="ArrowUp"){let oe=nt.number(_)?_-1:$.length-1;return oe<0&&(oe=$.length-1),(Q=y.current)==null||Q.scrollIntoView({index:oe}),D(oe)}if(K.key==="Enter"){if(_!==null&&$[_])return K.preventDefault(),B($[_],_);if($.length===1)return K.preventDefault(),B($[0],0)}}}}),"data-value":O,"data-error":!!t,"data-name":ae,"data-target":ae,required:f,value:C?I:V||O,"aria-autocomplete":"list",autoComplete:"off",className:je("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","group-focus-within:border-primary group-hover:border-primary",g.className)}),x.jsx("input",{id:ae,name:ae,type:"hidden","data-origin":ae,ref:h,required:f,defaultValue:g.value||O||void 0}),x.jsx(no,{preserveTabOrder:!0,children:C?x.jsx(hi,{guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs(pt.ul,{...G({ref:U.setFloating,style:{...L.styles,top:ee??0,position:Z,left:(te??0)+(O?36:25)}}),initial:!1,"data-floating":"true",animate:{height:ve?"auto":w},className:"isolate z-floating m-0 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",children:[ve?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||T.autocompleteEmpty})}):null,x.jsx(wp,{ref:y,hidden:ve,data:$,style:{height:w},components:FF,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(K,le)=>{const Q=le.Render??_F,oe=O===le.value||O===le.label,be=_===K,X=le.label??le.value;return x.jsx("button",{"data-value":le.value,...ie({ref:ce=>void(F.current[K]=ce),role:"option",type:"button","aria-checked":oe,"aria-current":oe,"aria-selected":oe,"aria-busy":le.disabled,onClick:()=>B(le,K),className:`cursor-pointer w-full p-2 text-left ${oe?"bg-primary-hover text-primary-foreground":""} ${be?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(Q,{...g,label:le.label,value:le.value,children:X})})}})]})}):null})]})}),Ep=E.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 x.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:je("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[x.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:je("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,x.jsx("span",{"data-name":"checkbox-label",className:je("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),c1=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:y,...b},T)=>{const w=e,S=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const R=C.current,I=ma(C.current),A=r==null?void 0:r(R),O=N=>{const V=N;if(V.key==="Enter"&&R.enterKeyHint==="next"){const P=R.getAttribute("data-next");if(P){const _=document.getElementById(P);if(_)return _.focus(),void V.preventDefault()}}};return R.addEventListener("keydown",O),()=>{A==null||A(),I(),R.removeEventListener("keydown",O)}},[]),x.jsx(Pa,{...n,info:i,left:a,error:l,right:c,loading:y,form:b.form,name:b.name,feedback:h,hideLeft:v,title:b.title,container:je(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:x.jsx(w,{...n,...b,id:S,name:S,type:m,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:el(T,C),className:je("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","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),Aa=c1(p0,"input",{type:"text"}),Ov=new Date(1970,11,31),du={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Mv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},VF={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},fu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},$F=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=Nf(t),l=E.useId(),c=_t(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=fu(u,Ov).flatMap(C=>nt.keyof(du,C.type)?du[C.type](C.value):[]),h=fu(u,Ov).reduce((C,R)=>C+(nt.keyof(Mv,R.type)?Mv[R.type](R.value):""),""),[v,y]=E.useState(d?fu(u,d).reduce((C,R)=>C+(nt.keyof(du,R.type)?VF[R.type](d,R.value):""),""):""),b=C=>{const R=C.target.value;if(y(R),g.length===R.length&&g.every((A,O)=>{const N=R.charAt(O);return typeof A=="string"?N===A:A.test(N)})){const A=zo(H_(R,h,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},T=C=>(p(C),r==null||r(C),y(C?HI(C,h):"")),w=Zb(d),S=w?d.toISOString():void 0;return x.jsx(Aa,{...i,mask:g,value:v,id:void 0,name:void 0,className:"uppercase","data-value":S,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:x.jsxs(E.Fragment,{children:[x.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),x.jsx(mi,{open:f,onChange:m,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(uA,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(T0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),zF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],BF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],HF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],WF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Dv=(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};function jv(e,t){if(!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?WF:HF:t.binary?BF:zF,r=t.space?" ":"";if(t.signed&&e===0)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=Dv(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=Dv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Ka={exports:{}},Za={exports:{}},Ue={};/** @license React v16.13.1
173
173
  * react-is.production.min.js
174
174
  *
175
175
  * Copyright (c) Facebook, Inc. and its affiliates.
176
176
  *
177
177
  * This source code is licensed under the MIT license found in the
178
178
  * LICENSE file in the root directory of this source tree.
179
- */var Ev;function vF(){if(Ev)return Ue;Ev=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,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function x(T){if(typeof T=="object"&&T!==null){var w=T.$$typeof;switch(w){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 h:case f:case a:return T;default:return w}}case n:return w}}}function S(T){return x(T)===c}return Ue.AsyncMode=l,Ue.ConcurrentMode=c,Ue.ContextConsumer=s,Ue.ContextProvider=a,Ue.Element=t,Ue.ForwardRef=u,Ue.Fragment=r,Ue.Lazy=h,Ue.Memo=f,Ue.Portal=n,Ue.Profiler=i,Ue.StrictMode=o,Ue.Suspense=d,Ue.isAsyncMode=function(T){return S(T)||x(T)===l},Ue.isConcurrentMode=S,Ue.isContextConsumer=function(T){return x(T)===s},Ue.isContextProvider=function(T){return x(T)===a},Ue.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Ue.isForwardRef=function(T){return x(T)===u},Ue.isFragment=function(T){return x(T)===r},Ue.isLazy=function(T){return x(T)===h},Ue.isMemo=function(T){return x(T)===f},Ue.isPortal=function(T){return x(T)===n},Ue.isProfiler=function(T){return x(T)===i},Ue.isStrictMode=function(T){return x(T)===o},Ue.isSuspense=function(T){return x(T)===d},Ue.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===p||typeof T=="object"&&T!==null&&(T.$$typeof===h||T.$$typeof===f||T.$$typeof===a||T.$$typeof===s||T.$$typeof===u||T.$$typeof===m||T.$$typeof===y||T.$$typeof===v||T.$$typeof===g)},Ue.typeOf=x,Ue}var Ge={};/** @license React v16.13.1
179
+ */var Nv;function qF(){if(Nv)return Ue;Nv=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,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){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 m:case f:case a:return w;default:return S}}case n:return S}}}function T(w){return b(w)===c}return Ue.AsyncMode=l,Ue.ConcurrentMode=c,Ue.ContextConsumer=s,Ue.ContextProvider=a,Ue.Element=t,Ue.ForwardRef=u,Ue.Fragment=r,Ue.Lazy=m,Ue.Memo=f,Ue.Portal=n,Ue.Profiler=i,Ue.StrictMode=o,Ue.Suspense=d,Ue.isAsyncMode=function(w){return T(w)||b(w)===l},Ue.isConcurrentMode=T,Ue.isContextConsumer=function(w){return b(w)===s},Ue.isContextProvider=function(w){return b(w)===a},Ue.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ue.isForwardRef=function(w){return b(w)===u},Ue.isFragment=function(w){return b(w)===r},Ue.isLazy=function(w){return b(w)===m},Ue.isMemo=function(w){return b(w)===f},Ue.isPortal=function(w){return b(w)===n},Ue.isProfiler=function(w){return b(w)===i},Ue.isStrictMode=function(w){return b(w)===o},Ue.isSuspense=function(w){return b(w)===d},Ue.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===m||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===v||w.$$typeof===y||w.$$typeof===g)},Ue.typeOf=b,Ue}var Ye={};/** @license React v16.13.1
180
180
  * react-is.development.js
181
181
  *
182
182
  * Copyright (c) Facebook, Inc. and its affiliates.
183
183
  *
184
184
  * This source code is licensed under the MIT license found in the
185
185
  * LICENSE file in the root directory of this source tree.
186
- */var Cv;function yF(){return Cv||(Cv=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,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=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===p||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===m||B.$$typeof===y||B.$$typeof===v||B.$$typeof===g)}function S(B){if(typeof B=="object"&&B!==null){var ye=B.$$typeof;switch(ye){case t:var Te=B.type;switch(Te){case l:case c:case r:case i:case o:case d:return Te;default:var Ie=Te&&Te.$$typeof;switch(Ie){case s:case u:case h:case f:case a:return Ie;default:return ye}}case n:return ye}}}var T=l,w=c,C=s,k=a,I=t,P=u,D=r,N=h,V=f,R=n,O=i,M=o,L=d,j=!1;function $(B){return j||(j=!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.")),_(B)||S(B)===l}function _(B){return S(B)===c}function z(B){return S(B)===s}function J(B){return S(B)===a}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return S(B)===u}function Z(B){return S(B)===r}function U(B){return S(B)===h}function G(B){return S(B)===f}function F(B){return S(B)===n}function W(B){return S(B)===i}function Y(B){return S(B)===o}function ie(B){return S(B)===d}Ge.AsyncMode=T,Ge.ConcurrentMode=w,Ge.ContextConsumer=C,Ge.ContextProvider=k,Ge.Element=I,Ge.ForwardRef=P,Ge.Fragment=D,Ge.Lazy=N,Ge.Memo=V,Ge.Portal=R,Ge.Profiler=O,Ge.StrictMode=M,Ge.Suspense=L,Ge.isAsyncMode=$,Ge.isConcurrentMode=_,Ge.isContextConsumer=z,Ge.isContextProvider=J,Ge.isElement=te,Ge.isForwardRef=ee,Ge.isFragment=Z,Ge.isLazy=U,Ge.isMemo=G,Ge.isPortal=F,Ge.isProfiler=W,Ge.isStrictMode=Y,Ge.isSuspense=ie,Ge.isValidElementType=x,Ge.typeOf=S}()),Ge}var kv;function Jw(){return kv||(kv=1,process.env.NODE_ENV==="production"?Ga.exports=vF():Ga.exports=yF()),Ga.exports}/*
186
+ */var Fv;function UF(){return Fv||(Fv=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,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===h||B.$$typeof===v||B.$$typeof===y||B.$$typeof===g)}function T(B){if(typeof B=="object"&&B!==null){var ye=B.$$typeof;switch(ye){case t:var Se=B.type;switch(Se){case l:case c:case r:case i:case o:case d:return Se;default:var Ie=Se&&Se.$$typeof;switch(Ie){case s:case u:case m:case f:case a:return Ie;default:return ye}}case n:return ye}}}var w=l,S=c,C=s,R=a,I=t,A=u,O=r,N=m,V=f,P=n,_=i,D=o,F=d,j=!1;function z(B){return j||(j=!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.")),M(B)||T(B)===l}function M(B){return T(B)===c}function $(B){return T(B)===s}function J(B){return T(B)===a}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return T(B)===u}function Z(B){return T(B)===r}function U(B){return T(B)===m}function Y(B){return T(B)===f}function L(B){return T(B)===n}function W(B){return T(B)===i}function G(B){return T(B)===o}function ie(B){return T(B)===d}Ye.AsyncMode=w,Ye.ConcurrentMode=S,Ye.ContextConsumer=C,Ye.ContextProvider=R,Ye.Element=I,Ye.ForwardRef=A,Ye.Fragment=O,Ye.Lazy=N,Ye.Memo=V,Ye.Portal=P,Ye.Profiler=_,Ye.StrictMode=D,Ye.Suspense=F,Ye.isAsyncMode=z,Ye.isConcurrentMode=M,Ye.isContextConsumer=$,Ye.isContextProvider=J,Ye.isElement=te,Ye.isForwardRef=ee,Ye.isFragment=Z,Ye.isLazy=U,Ye.isMemo=Y,Ye.isPortal=L,Ye.isProfiler=W,Ye.isStrictMode=G,Ye.isSuspense=ie,Ye.isValidElementType=b,Ye.typeOf=T}()),Ye}var Lv;function u1(){return Lv||(Lv=1,process.env.NODE_ENV==="production"?Za.exports=qF():Za.exports=UF()),Za.exports}/*
187
187
  object-assign
188
188
  (c) Sindre Sorhus
189
189
  @license MIT
190
- */var su,Rv;function xF(){if(Rv)return su;Rv=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 su=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},su}var lu,Pv;function hp(){if(Pv)return lu;Pv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lu=e,lu}var cu,Av;function e1(){return Av||(Av=1,cu=Function.call.bind(Object.prototype.hasOwnProperty)),cu}var uu,Iv;function bF(){if(Iv)return uu;Iv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=hp(),n={},r=e1();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(h){d=h}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={})},uu=o,uu}var du,Ov;function wF(){if(Ov)return du;Ov=1;var e=Jw(),t=xF(),n=hp(),r=e1(),o=bF(),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 du=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(_){var z=_&&(c&&_[c]||_[u]);if(typeof z=="function")return z}var p="<<anonymous>>",f={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:v(),arrayOf:x,element:S(),elementType:T(),instanceOf:w,node:P(),objectOf:k,oneOf:C,oneOfType:I,shape:N,exact:V};function h(_,z){return _===z?_!==0||1/_===1/z:_!==_&&z!==z}function g(_,z){this.message=_,this.data=z&&typeof z=="object"?z:{},this.stack=""}g.prototype=Error.prototype;function m(_){if(process.env.NODE_ENV!=="production")var z={},J=0;function te(Z,U,G,F,W,Y,ie){if(F=F||p,Y=Y||G,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 ye=F+":"+G;!z[ye]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+F+"`. 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."),z[ye]=!0,J++)}}return U[G]==null?Z?U[G]===null?new g("The "+W+" `"+Y+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new g("The "+W+" `"+Y+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:_(U,G,F,W,Y)}var ee=te.bind(null,!1);return ee.isRequired=te.bind(null,!0),ee}function y(_){function z(J,te,ee,Z,U,G){var F=J[te],W=M(F);if(W!==_){var Y=L(F);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+Y+"` supplied to `"+ee+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return m(z)}function v(){return m(a)}function x(_){function z(J,te,ee,Z,U){if(typeof _!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var G=J[te];if(!Array.isArray(G)){var F=M(G);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+F+"` supplied to `"+ee+"`, expected an array."))}for(var W=0;W<G.length;W++){var Y=_(G,W,ee,Z,U+"["+W+"]",n);if(Y instanceof Error)return Y}return null}return m(z)}function S(){function _(z,J,te,ee,Z){var U=z[J];if(!s(U)){var G=M(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+G+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return m(_)}function T(){function _(z,J,te,ee,Z){var U=z[J];if(!e.isValidElementType(U)){var G=M(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+G+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return m(_)}function w(_){function z(J,te,ee,Z,U){if(!(J[te]instanceof _)){var G=_.name||p,F=$(J[te]);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+F+"` supplied to `"+ee+"`, expected ")+("instance of `"+G+"`."))}return null}return m(z)}function C(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function z(J,te,ee,Z,U){for(var G=J[te],F=0;F<_.length;F++)if(h(G,_[F]))return null;var W=JSON.stringify(_,function(ie,B){var ye=L(B);return ye==="symbol"?String(B):B});return new g("Invalid "+Z+" `"+U+"` of value `"+String(G)+"` "+("supplied to `"+ee+"`, expected one of "+W+"."))}return m(z)}function k(_){function z(J,te,ee,Z,U){if(typeof _!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var G=J[te],F=M(G);if(F!=="object")return new g("Invalid "+Z+" `"+U+"` of type "+("`"+F+"` supplied to `"+ee+"`, expected an object."));for(var W in G)if(r(G,W)){var Y=_(G,W,ee,Z,U+"."+W,n);if(Y instanceof Error)return Y}return null}return m(z)}function I(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var z=0;z<_.length;z++){var J=_[z];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(J)+" at index "+z+"."),a}function te(ee,Z,U,G,F){for(var W=[],Y=0;Y<_.length;Y++){var ie=_[Y],B=ie(ee,Z,U,G,F,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&W.push(B.data.expectedType)}var ye=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new g("Invalid "+G+" `"+F+"` supplied to "+("`"+U+"`"+ye+"."))}return m(te)}function P(){function _(z,J,te,ee,Z){return R(z[J])?null:new g("Invalid "+ee+" `"+Z+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return m(_)}function D(_,z,J,te,ee){return new g((_||"React class")+": "+z+" type `"+J+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function N(_){function z(J,te,ee,Z,U){var G=J[te],F=M(G);if(F!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+F+"` "+("supplied to `"+ee+"`, expected `object`."));for(var W in _){var Y=_[W];if(typeof Y!="function")return D(ee,Z,U,W,L(Y));var ie=Y(G,W,ee,Z,U+"."+W,n);if(ie)return ie}return null}return m(z)}function V(_){function z(J,te,ee,Z,U){var G=J[te],F=M(G);if(F!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+F+"` "+("supplied to `"+ee+"`, expected `object`."));var W=t({},J[te],_);for(var Y in W){var ie=_[Y];if(r(_,Y)&&typeof ie!="function")return D(ee,Z,U,Y,L(ie));if(!ie)return new g("Invalid "+Z+" `"+U+"` key `"+Y+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(J[te],null," ")+`
191
- Valid keys: `+JSON.stringify(Object.keys(_),null," "));var B=ie(G,Y,ee,Z,U+"."+Y,n);if(B)return B}return null}return m(z)}function R(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(R);if(_===null||s(_))return!0;var z=d(_);if(z){var J=z.call(_),te;if(z!==_.entries){for(;!(te=J.next()).done;)if(!R(te.value))return!1}else for(;!(te=J.next()).done;){var ee=te.value;if(ee&&!R(ee[1]))return!1}}else return!1;return!0;default:return!1}}function O(_,z){return _==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function M(_){var z=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":O(z,_)?"symbol":z}function L(_){if(typeof _>"u"||_===null)return""+_;var z=M(_);if(z==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return z}function j(_){var z=L(_);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function $(_){return!_.constructor||!_.constructor.name?p:_.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},du}var fu,_v;function TF(){if(_v)return fu;_v=1;var e=hp();function t(){}function n(){}return n.resetWarningCache=t,fu=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},fu}var Mv;function SF(){if(Mv)return Ua.exports;if(Mv=1,process.env.NODE_ENV!=="production"){var e=Jw(),t=!0;Ua.exports=wF()(e.isElement,t)}else Ua.exports=TF()();return Ua.exports}var EF=SF();const et=vy(EF);function so(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())})}const CF=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 Yo(e,t,n){const r=kF(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Dv(r,"path",i),Dv(r,"relativePath",i),r}function kF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=CF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Dv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const RF=[".DS_Store","Thumbs.db"];function PF(e){return so(this,void 0,void 0,function*(){return Os(e)&&AF(e.dataTransfer)?MF(e.dataTransfer,e.type):IF(e)?OF(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?_F(e):[]})}function AF(e){return Os(e)}function IF(e){return Os(e)&&Os(e.target)}function Os(e){return typeof e=="object"&&e!==null}function OF(e){return gd(e.target.files).map(t=>Yo(t))}function _F(e){return so(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Yo(n))})}function MF(e,t){return so(this,void 0,void 0,function*(){if(e.items){const n=gd(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(DF));return jv(t1(r))}return jv(gd(e.files).map(n=>Yo(n)))})}function jv(e){return e.filter(t=>RF.indexOf(t.name)===-1)}function gd(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 DF(e){if(typeof e.webkitGetAsEntry!="function")return Nv(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?n1(t):Nv(e,t)}function t1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?t1(n):[n]],[])}function Nv(e,t){return so(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,Yo(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Yo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function jF(e){return so(this,void 0,void 0,function*(){return e.isDirectory?n1(e):NF(e)})}function n1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>so(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(jF));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function NF(e){return so(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Yo(r,e.fullPath);t(o)},r=>{n(r)})})})}var Ya={},Fv;function FF(){return Fv||(Fv=1,Ya.__esModule=!0,Ya.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}),Ya}var LF=FF();const pu=vy(LF);function Lv(e){return $F(e)||zF(e)||o1(e)||VF()}function VF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $F(e){if(Array.isArray(e))return vd(e)}function Vv(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 zv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vv(Object(n),!0).forEach(function(r){r1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aa(e,t){return WF(e)||HF(e,t)||o1(e,t)||BF()}function BF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
193
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o1(e,t){if(e){if(typeof e=="string")return vd(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 vd(e,t)}}function vd(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 HF(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 WF(e){if(Array.isArray(e))return e}var qF=typeof pu=="function"?pu:pu.default,UF="file-invalid-type",GF="file-too-large",YF="file-too-small",KF="too-many-files",ZF=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:UF,message:"File type must be ".concat(r)}},$v=function(t){return{code:GF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Bv=function(t){return{code:YF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},XF={code:KF,message:"Too many files"};function i1(e,t){var n=e.type==="application/x-moz-file"||qF(e,t);return[n,n?null:ZF(t)]}function a1(e,t,n){if(Nr(e.size))if(Nr(t)&&Nr(n)){if(e.size>n)return[!1,$v(n)];if(e.size<t)return[!1,Bv(t)]}else{if(Nr(t)&&e.size<t)return[!1,Bv(t)];if(Nr(n)&&e.size>n)return[!1,$v(n)]}return[!0,null]}function Nr(e){return e!=null}function QF(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=i1(l,n),u=aa(c,1),d=u[0],p=a1(l,r,o),f=aa(p,1),h=f[0],g=s?s(l):null;return d&&h&&!g})}function _s(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ka(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 Hv(e){e.preventDefault()}function JF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function eL(e){return e.indexOf("Edge/")!==-1}function tL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return JF(e)||eL(e)}function En(){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!_s(r)&&s&&s.apply(void 0,[r].concat(i)),_s(r)})}}function nL(){return"showOpenFilePicker"in window}function rL(e){if(Nr(e)){var t=Object.entries(e).filter(function(n){var r=aa(n,2),o=r[0],i=r[1],a=!0;return s1(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(l1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=aa(r,2),i=o[0],a=o[1];return zv(zv({},n),{},r1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function oL(e){if(Nr(e))return Object.entries(e).reduce(function(t,n){var r=aa(n,2),o=r[0],i=r[1];return[].concat(Lv(t),[o],Lv(i))},[]).filter(function(t){return s1(t)||l1(t)}).join(",")}function iL(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function aL(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function s1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function l1(e){return/^.*\.[\w]+$/.test(e)}var sL=["children"],lL=["open"],cL=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],uL=["refKey","onChange","onClick"];function dL(e){return hL(e)||pL(e)||c1(e)||fL()}function fL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
194
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hL(e){if(Array.isArray(e))return yd(e)}function hu(e,t){return vL(e)||gL(e,t)||c1(e,t)||mL()}function mL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c1(e,t){if(e){if(typeof e=="string")return yd(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 yd(e,t)}}function yd(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 gL(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 vL(e){if(Array.isArray(e))return e}function Wv(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 dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wv(Object(n),!0).forEach(function(r){xd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ms(e,t){if(e==null)return{};var n=yL(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 yL(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 mp=E.forwardRef(function(e,t){var n=e.children,r=Ms(e,sL),o=d1(r),i=o.open,a=Ms(o,lL);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(dt(dt({},a),{},{open:i})))});mp.displayName="Dropzone";var u1={disabled:!1,getFilesFromEvent:PF,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};mp.defaultProps=u1;mp.propTypes={children:et.func,accept:et.objectOf(et.arrayOf(et.string)),multiple:et.bool,preventDropOnDocument:et.bool,noClick:et.bool,noKeyboard:et.bool,noDrag:et.bool,noDragEventsBubbling:et.bool,minSize:et.number,maxSize:et.number,maxFiles:et.number,disabled:et.bool,getFilesFromEvent:et.func,onFileDialogCancel:et.func,onFileDialogOpen:et.func,useFsAccessApi:et.bool,autoFocus:et.bool,onDragEnter:et.func,onDragLeave:et.func,onDragOver:et.func,onDrop:et.func,onDropAccepted:et.func,onDropRejected:et.func,onError:et.func,validator:et.func};var bd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function d1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=dt(dt({},u1),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,h=t.onDropRejected,g=t.onFileDialogCancel,m=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,x=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,w=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,P=E.useMemo(function(){return oL(n)},[n]),D=E.useMemo(function(){return rL(n)},[n]),N=E.useMemo(function(){return typeof m=="function"?m:qv},[m]),V=E.useMemo(function(){return typeof g=="function"?g:qv},[g]),R=E.useRef(null),O=E.useRef(null),M=E.useReducer(xL,bd),L=hu(M,2),j=L[0],$=L[1],_=j.isFocused,z=j.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&y&&nL()),te=function(){!J.current&&z&&setTimeout(function(){if(O.current){var ce=O.current.files;ce.length||($({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[O,z,V,J]);var ee=E.useRef([]),Z=function(ce){R.current&&R.current.contains(ce.target)||(ce.preventDefault(),ee.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",Hv,!1),document.addEventListener("drop",Z,!1)),function(){x&&(document.removeEventListener("dragover",Hv),document.removeEventListener("drop",Z))}},[R,x]),E.useEffect(function(){return!r&&v&&R.current&&R.current.focus(),function(){}},[R,v,r]);var U=E.useCallback(function(X){k?k(X):console.error(X)},[k]),G=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X),ee.current=[].concat(dL(ee.current),[X.target]),Ka(X)&&Promise.resolve(o(X)).then(function(ce){if(!(_s(X)&&!C)){var Re=ce.length,$e=Re>0&&QF({files:ce,accept:P,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),xt=Re>0&&!$e;$({isDragAccept:$e,isDragReject:xt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(ce){return U(ce)})},[o,c,U,C,P,a,i,s,l,I]),F=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X);var ce=Ka(X);if(ce&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return ce&&d&&d(X),!1},[d,C]),W=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X);var ce=ee.current.filter(function($e){return R.current&&R.current.contains($e)}),Re=ce.indexOf(X.target);Re!==-1&&ce.splice(Re,1),ee.current=ce,!(ce.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ka(X)&&u&&u(X))},[R,u,C]),Y=E.useCallback(function(X,ce){var Re=[],$e=[];X.forEach(function(xt){var ut=i1(xt,P),_t=hu(ut,2),fn=_t[0],Sn=_t[1],Xn=a1(xt,a,i),Qn=hu(Xn,2),Jn=Qn[0],H=Qn[1],q=I?I(xt):null;if(fn&&Jn&&!q)Re.push(xt);else{var Le=[Sn,H];q&&(Le=Le.concat(q)),$e.push({file:xt,errors:Le.filter(function(Xe){return Xe})})}}),(!s&&Re.length>1||s&&l>=1&&Re.length>l)&&(Re.forEach(function(xt){$e.push({file:xt,errors:[XF]})}),Re.splice(0)),$({acceptedFiles:Re,fileRejections:$e,isDragReject:$e.length>0,type:"setFiles"}),p&&p(Re,$e,ce),$e.length>0&&h&&h($e,ce),Re.length>0&&f&&f(Re,ce)},[$,s,P,a,i,l,p,f,h,I]),ie=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X),ee.current=[],Ka(X)&&Promise.resolve(o(X)).then(function(ce){_s(X)&&!C||Y(ce,X)}).catch(function(ce){return U(ce)}),$({type:"reset"})},[o,Y,U,C]),B=E.useCallback(function(){if(J.current){$({type:"openDialog"}),N();var X={multiple:s,types:D};window.showOpenFilePicker(X).then(function(ce){return o(ce)}).then(function(ce){Y(ce,null),$({type:"closeDialog"})}).catch(function(ce){iL(ce)?(V(ce),$({type:"closeDialog"})):aL(ce)?(J.current=!1,O.current?(O.current.value=null,O.current.click()):U(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."))):U(ce)});return}O.current&&($({type:"openDialog"}),N(),O.current.value=null,O.current.click())},[$,N,V,y,Y,U,D,s]),ye=E.useCallback(function(X){!R.current||!R.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[R,B]),Te=E.useCallback(function(){$({type:"focus"})},[]),Ie=E.useCallback(function(){$({type:"blur"})},[]),Fe=E.useCallback(function(){S||(tL()?setTimeout(B,0):B())},[S,B]),ae=function(ce){return r?null:ce},ve=function(ce){return T?null:ae(ce)},K=function(ce){return w?null:ae(ce)},le=function(ce){C&&ce.stopPropagation()},Q=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=X.refKey,Re=ce===void 0?"ref":ce,$e=X.role,xt=X.onKeyDown,ut=X.onFocus,_t=X.onBlur,fn=X.onClick,Sn=X.onDragEnter,Xn=X.onDragOver,Qn=X.onDragLeave,Jn=X.onDrop,H=Ms(X,cL);return dt(dt(xd({onKeyDown:ve(En(xt,ye)),onFocus:ve(En(ut,Te)),onBlur:ve(En(_t,Ie)),onClick:ae(En(fn,Fe)),onDragEnter:K(En(Sn,G)),onDragOver:K(En(Xn,F)),onDragLeave:K(En(Qn,W)),onDrop:K(En(Jn,ie)),role:typeof $e=="string"&&$e!==""?$e:"presentation"},Re,R),!r&&!T?{tabIndex:0}:{}),H)}},[R,ye,Te,Ie,Fe,G,F,W,ie,T,w,r]),oe=E.useCallback(function(X){X.stopPropagation()},[]),be=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=X.refKey,Re=ce===void 0?"ref":ce,$e=X.onChange,xt=X.onClick,ut=Ms(X,uL),_t=xd({accept:P,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:ae(En($e,ie)),onClick:ae(En(xt,oe)),tabIndex:-1},Re,O);return dt(dt({},_t),ut)}},[O,n,s,ie,r]);return dt(dt({},j),{},{isFocused:_&&!r,getRootProps:Q,getInputProps:be,rootRef:R,inputRef:O,open:ae(B)})}function xL(e,t){switch(t.type){case"focus":return dt(dt({},e),{},{isFocused:!0});case"blur":return dt(dt({},e),{},{isFocused:!1});case"openDialog":return dt(dt({},bd),{},{isFileDialogActive:!0});case"closeDialog":return dt(dt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return dt(dt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return dt(dt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return dt({},bd);default:return e}}function qv(){}const bL={isImage:e=>e.type.includes("image")},wL=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(bL.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Sv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Sv(e.file.size)})},[e.file]),t.type==="img"?b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[b.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(Io,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Fo,{})})]}):b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"flex flex-row items-center gap-4",children:[b.jsx(Ob,{size:48}),b.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(Io,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Fo,{className:"text-danger"})})]})},TL=e=>b.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>b.jsx(wL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),SL=e=>e.isDragActive?b.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?b.jsx(TL,{onDeleteFile:e.onDeleteFile,files:e.files}):b.jsx(E.Fragment,{children:e.idle}),EL=b.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[b.jsx(sA,{size:64}),b.jsxs("p",{children:["You can drag your files or"," ",b.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),CL=({idle:e=EL,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=d1({onDrop:a});return b.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[b.jsx("input",{...l(r),name:r.name,id:r.name}),b.jsx(SL,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},kL=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return b.jsx("form",{...e,onSubmit:t})};class $r extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof $r&&(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 $r(this);return t?t(n):n}}const RL=e=>b.jsx(E.Fragment,{children:e.children}),PL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},AL={caseSensitive:!1,sort:!1},Uv=[],IL=E.forwardRef(function(t,n){return b.jsx(pt.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(vr,{children:t.children})})}),OL=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),_L={List:IL,Item:OL},ML=e=>{const t=Ot(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.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]),b.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?b.jsxs(Fd,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},DL=E.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:h=!1,onChangeOptions:g,...m},y)=>{const v=E.useMemo(()=>new $r(r.map(Q=>[Q.value,Q])),[r]),x=E.useRef(null),S=E.useRef(null),T=m.value??m.defaultValue??Uv,w=Ot(),[C,k]=E.useState(0),[I,P]=E.useState(!1),[D,N]=E.useState(""),[V,R]=E.useState(()=>{const Q=new $r;return T.forEach(oe=>{const be=v.get(oe);return be?Q.set(oe,be):void 0}),Q}),O=E.useMemo(()=>Array.from(V.keys()),[V]),[M,L]=E.useState(()=>{const Q=new Set(T);return r.reduce((oe,be)=>Q.has(be.value)?[...oe,be.label??be.value]:oe,[])??T}),[j,$]=E.useState(null),_=E.useRef(Uv),z=h&&D!==""?[{value:D,label:D,"data-dynamic":"true"},...r]:r,J=new Vr(z,["value","label"],AL).search(D);E.useEffect(()=>{I||k(0)},[I]),E.useEffect(()=>{m.value&&R(new $r(m.value.map(Q=>[Q,v.get(Q)])))},[m.value,v]);const te=J.filter(Q=>Q.hidden!==!0),ee=te.length===0,{x:Z,y:U,strategy:G,refs:F,context:W}=ro({open:I,transform:!0,strategy:"absolute",onOpenChange:P,whileElementsMounted:ya,middleware:[xa(4),tw({padding:10,elementContext:"reference",apply(Q){if(x.current===null)return;const oe=x.current.getBoundingClientRect().width,be=360;ua.flushSync(()=>setTimeout(()=>k(be),200)),Object.assign(Q.elements.floating.style,{width:`${oe}px`,maxWidth:`${oe}px`,maxHeight:ee?"auto":`${be}px`,height:ee?"auto":`${be}px`})}})]}),Y=vw(W,PL),{getReferenceProps:ie,getFloatingProps:B,getItemProps:ye}=oo([io(W,{role:"listbox"}),no(W),Yf(W,{cols:0,listRef:_,loop:!0,virtual:!0,allowEscape:!0,activeIndex:j,selectedIndex:j,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Q=>$(oe=>Q??oe)})]);E.useEffect(()=>{const Q=F.reference.current;if(Q)return da(Q)},[]);const Te=(Q,oe)=>{const be=V.clone(Re=>Re.has(Q.value)?Re.remove(Q.value):Re.set(Q.value,Q));R(be);const X=F.reference.current;if(!X)return;const ce=be.map(Re=>Re.value);X==null||X.setAttribute("data-value",JSON.stringify(ce)),g&&g(ce),L(Re=>Re.concat(Q.label??"")),N(""),$(oe)},Ie=Q=>{const oe=Q.target.value;return N(oe),!I&&oe===""?P(!0):(Q.target.name=m.name||"",oe?P(!0):void 0)},Fe=()=>{var Q;P(!0),N(""),(Q=F.reference.current)==null||Q.focus()},ae=()=>{P(!0),N("")},ve=()=>{var Q;(Q=F.reference.current)==null||Q.setAttribute("data-value","[]"),N(""),P(!1),R(new $r),g==null||g([])},K=m.id||m.name,le=V.map((Q,oe)=>b.jsx(Fd,{size:"small",icon:b.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:be=>{be.stopPropagation(),Te(Q,oe)},children:b.jsx(al,{size:14})}),children:Q.label??Q.value},`MultiSelect-${Q.value}-x`));return b.jsxs(Ca,{...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:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Fe,children:[b.jsx(yf,{size:20}),b.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),V?b.jsx("button",{type:"button",onClick:ve,className:"transition-colors link:text-danger",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("button",{...ie({...m,onFocus:ae,id:`${K}-shadow`,name:`${K}-shadow`,ref:F.setReference}),type:"button","data-name":K,"data-target":K,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":O.join(","),value:I?D:M||V,className:Ve("input 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:b.jsx(ML,{label:c,children:le})}),b.jsx("input",{id:K,name:K,type:"hidden","data-origin":K,ref:y,required:f,defaultValue:m.value||O||void 0}),b.jsx(to,{preserveTabOrder:!0,children:I?b.jsx(di,{modal:!0,guards:!0,returnFocus:!1,context:W,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("div",{...B({ref:F.setFloating,style:{...Y.styles,top:U??0,position:G,left:(Z??0)+(V?26:18)}}),"data-floating":"true",className:"isolate z-floating m-0 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 shadow-floating",children:[b.jsx("input",{autoFocus:!0,value:D,onChange:Ie,title:m.title,placeholder:w.multiSelectInnerPlaceholder,onKeyDown:Q=>{var oe,be;if(Q.key==="ArrowDown"){let X=j+1;return X>te.length-1&&(X=0),(oe=S.current)==null||oe.scrollIntoView({index:X}),$(X)}if(Q.key==="ArrowUp"){let X=j-1;return X<0&&(X=te.length-1),(be=S.current)==null||be.scrollIntoView({index:X}),$(X)}if(Q.key==="Escape")return Q.currentTarget.blur(),P(!1);if(Q.key==="Enter"){if(j!==null&&te[j])return Q.preventDefault(),Te(te[j],j);if(te.length===1)return Q.preventDefault(),Te(te[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 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"}),ee?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||w.autocompleteEmpty})}):null,ee?null:b.jsx(up,{ref:S,hidden:ee,data:te,components:_L,style:{height:ee?"0":V.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Q,oe)=>{const be=oe.Render??RL,X=V.has(oe.value)||V.has(oe.label??""),ce=j===Q,Re=oe.label??oe.value;return b.jsxs("button",{"data-value":oe.value,...ye({ref:$e=>void(_.current[Q]=$e),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":oe.disabled,onClick:()=>Te(oe,Q)}),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 ${X||ce?"bg-floating-hover text-floating-foreground":""}`,children:[b.jsx(pp,{onChange:Af,checked:X,"aria-checked":X,onClick:$e=>{$e.stopPropagation(),Te(oe,Q)}}),b.jsx(be,{...m,label:oe.label,value:oe.value,children:Re})]})}}),V.size===0?null:b.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:le})]})}):null})]})}),jL=({children:e,className:t="",size:n,...r})=>b.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:[b.jsx("input",{...r,type:"radio",className:Ve("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]}),Kr=E.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:h,...g},m)=>{const y=Ot(),v=E.useRef(null),x=g.id??g.name;E.useImperativeHandle(m,()=>v.current),E.useEffect(()=>{if(v.current===null)return;const T=new AbortController,w=v.current,C=da(v.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:T.signal}),()=>{C(),T.abort()}},[]);const S=()=>{var T;return(T=v.current)==null?void 0:T.focus()};return b.jsx(Ca,{info:n,left:f,error:h,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:b.jsxs("label",{htmlFor:x,children:[p,b.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[b.jsx(yf,{size:20}),b.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:b.jsxs("select",{...g,id:x,name:x,value:g.value,required:e,ref:Nd(m,v),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Ve("input select group 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:[b.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(T=>E.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${x}-select-option-${T.value}`}))]})})}),NL=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=Oo(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},h=u.current;return h.addEventListener("change",f),()=>h==null?void 0:h.removeEventListener("change",f)}},[]);const p=()=>{var h,g;const f=!((h=u.current)!=null&&h.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return b.jsxs("fieldset",{className:Ve("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[b.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[b.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)}),b.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:b.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"})}),b.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:b.jsx("span",{className:"font-medium text-foreground",children:e})})]}),b.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),FL=e=>{const[t,n]=mP();return E.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:bP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),b.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},LL=Qw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
196
- `);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)}),VL=e=>{const[t,n]=E.useState(0);return E.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},zL={Item:E.forwardRef(function(t,n){return b.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return b.jsx("ul",{...t,ref:n,className:"space-y-3"})})},$L=e=>{const t=E.useRef(null),n=VL(t);return b.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[b.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:[b.jsx("header",{className:"border-b border-card-border pb-2"}),b.jsxs("div",{className:"px-8 space-y-2",children:[b.jsx(ka,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),b.jsx(up,{height:n,useWindowScroll:!0,data:e.source,components:zL,itemContent:(r,o)=>b.jsx(E.Fragment,{children:b.jsx(pp,{children:b.jsx(e.Item,{data:o})})})})]})]}),b.jsx("div",{children:b.jsx(Io,{children:b.jsx(xf,{})})}),b.jsx("div",{})]})};var BL=Object.defineProperty,Gv=Object.getOwnPropertySymbols,HL=Object.prototype.hasOwnProperty,WL=Object.prototype.propertyIsEnumerable,Yv=(e,t,n)=>t in e?BL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qL=(e,t)=>{for(var n in t||(t={}))HL.call(t,n)&&Yv(e,n,t[n]);if(Gv)for(var n of Gv(t))WL.call(t,n)&&Yv(e,n,t[n]);return e},gp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},UL=(e,t,n,r)=>El(gp,e,t,n,r),Ko=e=>typeof e=="object",ur=(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=>ur(e[r],t[r]))},GL=(e,t)=>(Ko(e)||Array.isArray(e))&&t?e[t]:e,YL=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ds=e=>/[0-9.]+/.test(e),Kv=e=>["string","number"].includes(typeof e),Zv=e=>e==null||(e==null?void 0:e.length)===0||e==="",Xv={eq:ur,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:Zv,notEmpty:e=>!Zv(e),in:(e,t)=>gp(t,n=>ur(e,n)),notIn:(e,t)=>f1(t,n=>!ur(e,n))},KL=e=>{if(e in Xv)return Xv[e];throw new Error("Linq - Symbol not found")},Ro=(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},El=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=KL(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},ZL=(e,t,n,r)=>El(Ro,e,t,n,r),f1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},XL=(e,t,n,r)=>El(f1,e,t,n,r),p1=e=>{if(e===null)return null;const t=qL({},e);return Object.keys(t).forEach(n=>t[n]=Ko(e[n])?p1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Qv=(e,t)=>{if(Ko(t)){for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1},QL=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},JL=e=>Ro(e,(t,n,r)=>Ko(t)?n===r.findIndex(o=>ur(o,t)):n===r.indexOf(t)),e2=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},h1=(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())},t2=(e,t)=>h1(e,n=>n[t]),Jv=(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},n2=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},r2=(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 Ds(e)&&Ds(t)?r.map(a=>Number.parseInt(a)):r},mu=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ds(e)&&Ds(t)){const o=[],[i,a]=n2(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return r2(e,t,r)},o2=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?mu(r,o,1):mu(r,i,Number.parseInt(o,10))}return Kv(e)&&Kv(t)?mu(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},gu=(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},ey=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},i2=(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)},a2=(e,t,n,r)=>El(i2,e,t,n,r),ty=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(YL(t))},m1=(e=>(e.Asc="asc",e.Desc="desc",e))(m1||{}),s2=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(s2(t)),c2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Ro(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},u2=class wd{constructor(t=[]){this.array=t}static Range(...t){return o2(...t)}static New(t){return new wd(t)}Where(t,n,r){return this.array=ZL(this.array,t,n,r),this}Some(t,n,r){return UL(this.array,t,n,r)}All(t,n,r){return XL(this.array,t,n,r)}Reverse(){return this.array=ey(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=a2(this.array,t,n,r),this}Distinct(){return this.array=JL(this.array),this}First(t){return t===void 0?this.array[0]:e2(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?gu((n,r)=>n+r,0,this.array):gu((n,r)=>n+GL(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return t2(this.array,t)}GroupWith(t){return h1(this.array,t)}Except(t){return Ro(this.array,n=>!Qv(t,n))}Intersect(t){return Ro(this.array,n=>Qv(t,n))}OrderBy(t,n){let r;return r=t?ty(this.array,t):this.array.toSorted(),this.array=n==="desc"?ey(r):r,this}Includes(t){return gp(this.array,n=>ur(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 gu(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Jv(this.array,n=>[t,n]))}Zip(t,n){return Jv(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Ro(this.array,t).length}Get(t){return this.array[t]}Clone(){return new wd(p1(this.array))}ToObject(t){return QL(this.array,t)}Sort(t){return Array.isArray(t)?l2(this.array,t):ty(this.array,t)}Unique(t){return c2(this.array,t)}},g1=u2,vu={},ny;function d2(){return ny||(ny=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,y)=>{try{Object.keys(m).forEach(y)}catch(v){window.console.log(v)}},n=m=>m==null,r=m=>{const y=typeof m;return y==="string"||y==="number"||y==="boolean"||n(m)},o=(m,y)=>{const v=y.getItem(m);try{return JSON.parse(v)}catch{return v??null}},i=m=>Object.keys(m).reduce((y,v)=>({...y,[v]:o(v,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,y)=>(m[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(y=>y(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 y=m.domain??"";return y===""?"":`domain=${m.multiDomain?".":""}${y}`}},{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(y=>y.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const y=p.json()[m];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,y,v={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=d.reduce((T,w)=>{const C=w.parse(v);return C===""?T:T.concat(C)},[`${encodeURIComponent(m)}=${x}`]).join(";");document.cookie=S,u()}},f=m=>{const y=new Set,v=x=>{m().removeItem(x);const S=i(m());y.forEach(T=>T(S))};return{delete:v,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(m()):m(),has:x=>{const S=m().getItem(x);return!n(S)},deleteAll:()=>{t(m(),v),y.forEach(x=>x(m()))},get:x=>o(x,m()),set:(x,S)=>{m().setItem(x,JSON.stringify(S)),y.forEach(T=>T(m()))}}},h=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=h,e.createStorage=f}(vu)),vu}var $i=d2();const vp=e=>e.headerLabel??e.thead??e.id,yp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Po=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Po||{});const xp=e=>e.type==="number"?e.valueAsNumber:e.value,f2=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},p2={},h2=(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})},m2=(e,t,n=p2)=>{const r=qr()?null:$i.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Cf({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:h2(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return qr()||$i.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},g2=e=>{const t=Oo(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},Td=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??Po.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:ga(),operation:l,label:vp(e),name:o,type:i,value:"",...r}},bp=()=>{const e=Ot(),t=E.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:E.useMemo(()=>({[Po.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Po.Boolean]:[t.is,t.isNot],[Po.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},v2=e=>{const t=Ot(),n=bp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Td(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(h=>u===h.id);return Td(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=xp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return b.jsx(E.Fragment,{children:b.jsx(fi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(KP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(Kr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),b.jsx(Kr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),b.jsx(ka,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),b.jsx("div",{className:"mt-5 flex items-center justify-center",children:b.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:b.jsx(Fo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[b.jsx(bf,{size:14})," ",t.tableFilterNewFilter]})})]})})})},y2=({filter:e,onDelete:t,set:n})=>{const r=Ot(),o=bp(),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=xp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return b.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[b.jsx(Kr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),b.jsx(ka,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),b.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:b.jsx(Fo,{className:"text-danger",size:14})})]})},x2=({item:e,onPointerDown:t})=>{const n=No(0);return b.jsxs(Rb,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[b.jsx("button",{type:"button",className:"cursor-grab",children:b.jsx(UP,{size:14})}),b.jsx("span",{children:e.groupName})]},e.groupId)},b2=e=>{var l;const t=Ot(),n=yp(e.cols),r=yP(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var m;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((m=u.options.item(p))==null?void 0:m.label)||"";i(f);const h=new g1(e.rows).GroupBy(d),g=e.cols.find(y=>y.id===d);e.setGroups(bT(h).map((y,v)=>{const x=h[y];return{...g,groupId:ga(),groupKey:d,index:v,rows:x,groupName:y}}))},s=()=>e.setGroups([]);return b.jsx(E.Fragment,{children:b.jsxs(fi,{arrow:!1,title:t.tableGroupLabel,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(iA,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[b.jsxs("div",{className:"flex flex-nowrap items-center",children:[b.jsx(Kr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),b.jsx(Io,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:b.jsx(Fo,{size:16,className:"text-danger"})})]}),e.groups.length>0?b.jsxs("section",{className:"my-4",children:[b.jsx("header",{children:b.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),b.jsx(PS,{children:b.jsx(kb,{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(c=>b.jsx(x2,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},w2=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),T2=(e,t)=>e.toSorted(w2(t)),v1=(e,t,n)=>({label:t,id:ga(),type:n,value:e.id}),S2=e=>{const t=Ot(),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,v1(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 b.jsx(E.Fragment,{children:b.jsx(fi,{title:t.tableSortDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(Ab,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(Kr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),b.jsx(Kr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),b.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:b.jsx(Fo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[b.jsx(bf,{size:14})," ",t.tableSortAddButton]})})]})})})},E2=e=>{const t=Ot(),[n,r]=E.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");E.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=v1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=vp(e.col);return b.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[b.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?b.jsx(MP,{size:14}):null,n==="desc"?b.jsx(OP,{size:14}):null,n==="undefined"?b.jsx(Ab,{size:14}):null]})},C2=e=>b.jsx("header",{className:"min-w-full mb-1",children:b.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[b.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[b.jsx("span",{children:b.jsx(v2,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),b.jsx("span",{children:b.jsx(S2,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),b.jsx("span",{children:b.jsx(b2,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),b.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=>b.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[b.jsxs("span",{children:[b.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),b.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[b.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),b.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=xp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function k2(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 R2=e=>{const t=E.useId(),n=Ot(),r=E.useMemo(()=>k2(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return b.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[b.jsx("p",{children:b.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?b.jsxs(E.Fragment,{children:[b.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),b.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>b.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),b.jsx("nav",{children:b.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?b.jsx("li",{children:b.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:b.jsx(E.Fragment,{children:typeof i=="string"?b.jsx("li",{children:"..."}):b.jsx("li",{children:b.jsx(cn,{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?b.jsx("li",{children:b.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},P2={top:0,left:0,right:0,bottom:-1},A2=e=>{var g;const t=fp(),n=Ot(),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=bp(),l=o?QP:eA,c=E.useRef(null),u=m=>{const y=m.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(x=>x.id!==y))},d=E.useCallback(m=>{if(m===null)return;c.current=m;const y=new AbortController;return m.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),p=e.sorters.find(m=>e.header.id===m.value),f=p!=null&&p.type?p.type===m1.Asc?"ascending":"descending":"none",h=vp(e.header);return e.index===0||e.isLast,b.jsxs(Rb,{...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-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border-0 font-medium first:table-cell md:table-cell ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[b.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:b.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?b.jsx(fi,{arrow:!0,trigger:b.jsxs("span",{children:[b.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",h]}),b.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:b.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",b.jsx("span",{className:"font-medium",children:h})]}),children:b.jsxs("ul",{className:"font-medium",children:[r.length===0?null:b.jsx(E.Fragment,{children:r.map(m=>b.jsx("li",{className:"my-1",children:b.jsx(y2,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),b.jsx("li",{children:b.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(Td(e.header,s.options,s.operations))),children:[b.jsx(bf,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,b.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?b.jsx(E2,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:b.jsx(pt.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:P2,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:m=>void m.currentTarget.focus(),onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,x=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(y+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,y)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=y.delta.x;c.current.style.width=`${Math.abs(v+x)}px`}})]})},I2=e=>{const[t,n]=g2(e.setCols);return b.jsx(kb,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,className:"text-lg",children:b.jsx(vr,{children:e.headers.map((r,o)=>b.jsx(A2,{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}`))})})},y1=E.createContext({}),O2=()=>E.useContext(y1),_2=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:b.jsx(vr,{children:n.children})})),M2=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse border-0 divide-y divide-table-border text-left ${t??""}`})),D2=E.forwardRef(({context:e,...t},n)=>{const r=O2(),o={...t==null?void 0:t.style,top:ct.number(r.sticky)?`${r.sticky}px`:void 0};return b.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-transparent",ref:n})}),j2=E.forwardRef(({context:e,item:t,...n},r)=>b.jsx("tr",{...n,role:"row",ref:r,className:`table-row group ${(n==null?void 0:n.className)??""}`})),N2=E.forwardRef((e,t)=>e.context.loadingMore?b.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:b.jsx("tr",{role:"row",className:"bg-card-background",children:b.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:b.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),F2={TableHead:D2,Table:M2,TableBody:_2,TableRow:j2,TableFoot:N2},L2=[0,0,0,0,0,0,0,0,0,0],x1=b.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),V2=(e,t,n)=>b.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?x1:b.jsx(f0,{})}),z2=(e,t,n)=>{const r=n.cols,o=n.loading;return b.jsx(E.Fragment,{children:r.map((i,a)=>{var d;const s=`${a},${e}`,l=Pf(t,i.id),c=i.Element,u=((d=i.cellProps)==null?void 0:d.className)||"";return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?x1:c?b.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):b.jsx(E.Fragment,{children:ct.nil(l)?"":l}))})})},$2=()=>b.jsx(E.Fragment,{}),B2=[{}],ry=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),h=Oo(a),g=Oo(u.loadingMore),m=E.useMemo(()=>{if(u.loading)return L2;if(c)return u.rows;const y=new g1(u.rows);return t.length>0&&t.forEach(v=>v.value===""||Number.isNaN(v.value)?void 0:y.Where(v.name,v.operation.symbol,v.value)),r.length===0?y.Select():T2(y.Select(),r)},[u.loading,u.rows,c,t,r]);return E.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,v=new IntersectionObserver(x=>{var w;return x[x.length-1].isIntersecting&&g.current?((w=h.current)==null||w.call(h),void f(!0)):f(!1)});return v.observe(y),()=>v.disconnect()},[g,h]),b.jsxs("div",{className:"min-w-full",children:[b.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[b.jsx(BN,{useWindowScroll:!0,followOutput:"smooth",components:F2,totalCount:m.length,data:m.length===0?B2:m,fixedFooterContent:p?$2:null,itemContent:m.length===0?V2:z2,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>b.jsx(I2,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),b.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?b.jsx(R2,{...l}):null]})},H2=(e,t)=>typeof t=="function"?t(e):t,Za=(e,t,n)=>e===t||n==null?void 0:n(t),W2=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=fp(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>yp(e.cols),[e.cols]),[i,a]=Cf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:H2(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),Za((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),Za((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),Za((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),Za((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return b.jsx(y1.Provider,{value:t,children:b.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?b.jsx(C2,{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?b.jsx(ry,{...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}):b.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>b.jsx("div",{className:"min-w-full",children:b.jsx(ry,{...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}`))})]})})},q2=["INPUT","SELECT"],b1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{q2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var yu,oy;function wp(){if(oy)return yu;oy=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return yu={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},yu}var xu,iy;function w1(){if(iy)return xu;iy=1;var e=wp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var m=[],y=0;y<256;++y)m.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return m}(),o=function(y){for(;y.length>1;){var v=y.pop(),x=v.obj[v.prop];if(n(x)){for(var S=[],T=0;T<x.length;++T)typeof x[T]<"u"&&S.push(x[T]);v.obj[v.prop]=S}}},i=function(y,v){for(var x=v&&v.plainObjects?{__proto__:null}:{},S=0;S<y.length;++S)typeof y[S]<"u"&&(x[S]=y[S]);return x},a=function m(y,v,x){if(!v)return y;if(typeof v!="object"&&typeof v!="function"){if(n(y))y.push(v);else if(y&&typeof y=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,v))&&(y[v]=!0);else return[y,v];return y}if(!y||typeof y!="object")return[y].concat(v);var S=y;return n(y)&&!n(v)&&(S=i(y,x)),n(y)&&n(v)?(v.forEach(function(T,w){if(t.call(y,w)){var C=y[w];C&&typeof C=="object"&&T&&typeof T=="object"?y[w]=m(C,T,x):y.push(T)}else y[w]=T}),y):Object.keys(v).reduce(function(T,w){var C=v[w];return t.call(T,w)?T[w]=m(T[w],C,x):T[w]=C,T},S)},s=function(y,v){return Object.keys(v).reduce(function(x,S){return x[S]=v[S],x},y)},l=function(m,y,v){var x=m.replace(/\+/g," ");if(v==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(y,v,x,S,T){if(y.length===0)return y;var w=y;if(typeof y=="symbol"?w=Symbol.prototype.toString.call(y):typeof y!="string"&&(w=String(y)),x==="iso-8859-1")return escape(w).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var C="",k=0;k<w.length;k+=c){for(var I=w.length>=c?w.slice(k,k+c):w,P=[],D=0;D<I.length;++D){var N=I.charCodeAt(D);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||T===e.RFC1738&&(N===40||N===41)){P[P.length]=I.charAt(D);continue}if(N<128){P[P.length]=r[N];continue}if(N<2048){P[P.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){P[P.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}D+=1,N=65536+((N&1023)<<10|I.charCodeAt(D)&1023),P[P.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=P.join("")}return C},d=function(y){for(var v=[{obj:{o:y},prop:"o"}],x=[],S=0;S<v.length;++S)for(var T=v[S],w=T.obj[T.prop],C=Object.keys(w),k=0;k<C.length;++k){var I=C[k],P=w[I];typeof P=="object"&&P!==null&&x.indexOf(P)===-1&&(v.push({obj:w,prop:I}),x.push(P))}return o(v),y},p=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},h=function(y,v){return[].concat(y,v)},g=function(y,v){if(n(y)){for(var x=[],S=0;S<y.length;S+=1)x.push(v(y[S]));return x}return v(y)};return xu={arrayToObject:i,assign:s,combine:h,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},xu}var bu,ay;function U2(){if(ay)return bu;ay=1;var e=mT(),t=w1(),n=wp(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,y){return m+"["+y+"]"},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,y,v,x,S,T,w,C,k,I,P,D,N,V,R,O,M,L){for(var j=m,$=L,_=0,z=!1;($=$.get(p))!==void 0&&!z;){var J=$.get(m);if(_+=1,typeof J<"u"){if(J===_)throw new RangeError("Cyclic object value");z=!0}typeof $.get(p)>"u"&&(_=0)}if(typeof I=="function"?j=I(y,j):j instanceof Date?j=N(j):v==="comma"&&i(j)&&(j=t.maybeMap(j,function(Ie){return Ie instanceof Date?N(Ie):Ie})),j===null){if(T)return k&&!O?k(y,u.encoder,M,"key",V):y;j=""}if(d(j)||t.isBuffer(j)){if(k){var te=O?y:k(y,u.encoder,M,"key",V);return[R(te)+"="+R(k(j,u.encoder,M,"value",V))]}return[R(y)+"="+R(String(j))]}var ee=[];if(typeof j>"u")return ee;var Z;if(v==="comma"&&i(j))O&&k&&(j=t.maybeMap(j,k)),Z=[{value:j.length>0?j.join(",")||null:void 0}];else if(i(I))Z=I;else{var U=Object.keys(j);Z=P?U.sort(P):U}var G=C?String(y).replace(/\./g,"%2E"):String(y),F=x&&i(j)&&j.length===1?G+"[]":G;if(S&&i(j)&&j.length===0)return F+"[]";for(var W=0;W<Z.length;++W){var Y=Z[W],ie=typeof Y=="object"&&Y&&typeof Y.value<"u"?Y.value:j[Y];if(!(w&&ie===null)){var B=D&&C?String(Y).replace(/\./g,"%2E"):String(Y),ye=i(j)?typeof v=="function"?v(F,B):F:F+(D?"."+B:"["+B+"]");L.set(m,_);var Te=e();Te.set(p,L),s(ee,g(ie,ye,v,x,S,T,w,C,v==="comma"&&O&&i(j)?null:k,I,P,D,N,V,R,O,M,Te))}}return ee},h=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 y=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 v=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");v=m.format}var x=n.formatters[v],S=u.filter;(typeof m.filter=="function"||i(m.filter))&&(S=m.filter);var T;if(m.arrayFormat in o?T=m.arrayFormat:"indices"in m?T=m.indices?"indices":"repeat":T=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var w=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:w,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:T,charset:y,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:S,format:v,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 bu=function(g,m){var y=g,v=h(m),x,S;typeof v.filter=="function"?(S=v.filter,y=S("",y)):i(v.filter)&&(S=v.filter,x=S);var T=[];if(typeof y!="object"||y===null)return"";var w=o[v.arrayFormat],C=w==="comma"&&v.commaRoundTrip;x||(x=Object.keys(y)),v.sort&&x.sort(v.sort);for(var k=e(),I=0;I<x.length;++I){var P=x[I],D=y[P];v.skipNulls&&D===null||s(T,f(D,P,w,C,v.allowEmptyArrays,v.strictNullHandling,v.skipNulls,v.encodeDotInKeys,v.encode?v.encoder:null,v.filter,v.sort,v.allowDots,v.serializeDate,v.format,v.formatter,v.encodeValuesOnly,v.charset,k))}var N=T.join(v.delimiter),V=v.addQueryPrefix===!0?"?":"";return v.charsetSentinel&&(v.charset==="iso-8859-1"?V+="utf8=%26%2310003%3B&":V+="utf8=%E2%9C%93&"),N.length>0?V+N:""},bu}var wu,sy;function G2(){if(sy)return wu;sy=1;var e=w1(),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,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,f,h){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&h>=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,h){var g={__proto__:null},m=h.ignoreQueryPrefix?f.replace(/^\?/,""):f;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=h.parameterLimit===1/0?void 0:h.parameterLimit,v=m.split(h.delimiter,h.throwOnLimitExceeded?y+1:y);if(h.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var x=-1,S,T=h.charset;if(h.charsetSentinel)for(S=0;S<v.length;++S)v[S].indexOf("utf8=")===0&&(v[S]===s?T="utf-8":v[S]===a&&(T="iso-8859-1"),x=S,S=v.length);for(S=0;S<v.length;++S)if(S!==x){var w=v[S],C=w.indexOf("]="),k=C===-1?w.indexOf("="):C+1,I,P;k===-1?(I=h.decoder(w,r.decoder,T,"key"),P=h.strictNullHandling?null:""):(I=h.decoder(w.slice(0,k),r.decoder,T,"key"),P=e.maybeMap(i(w.slice(k+1),h,n(g[I])?g[I].length:0),function(N){return h.decoder(N,r.decoder,T,"value")})),P&&h.interpretNumericEntities&&T==="iso-8859-1"&&(P=o(String(P))),w.indexOf("[]=")>-1&&(P=n(P)?[P]:P);var D=t.call(g,I);D&&h.duplicates==="combine"?g[I]=e.combine(g[I],P):(!D||h.duplicates==="last")&&(g[I]=P)}return g},c=function(p,f,h,g){var m=0;if(p.length>0&&p[p.length-1]==="[]"){var y=p.slice(0,-1).join("");m=Array.isArray(f)&&f[y]?f[y].length:0}for(var v=g?f:i(f,h,m),x=p.length-1;x>=0;--x){var S,T=p[x];if(T==="[]"&&h.parseArrays)S=h.allowEmptyArrays&&(v===""||h.strictNullHandling&&v===null)?[]:e.combine([],v);else{S=h.plainObjects?{__proto__:null}:{};var w=T.charAt(0)==="["&&T.charAt(T.length-1)==="]"?T.slice(1,-1):T,C=h.decodeDotInKeys?w.replace(/%2E/g,"."):w,k=parseInt(C,10);!h.parseArrays&&C===""?S={0:v}:!isNaN(k)&&T!==C&&String(k)===C&&k>=0&&h.parseArrays&&k<=h.arrayLimit?(S=[],S[k]=v):C!=="__proto__"&&(S[C]=v)}v=S}return v},u=function(f,h,g,m){if(f){var y=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,v=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,S=g.depth>0&&v.exec(y),T=S?y.slice(0,S.index):y,w=[];if(T){if(!g.plainObjects&&t.call(Object.prototype,T)&&!g.allowPrototypes)return;w.push(T)}for(var C=0;g.depth>0&&(S=x.exec(y))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;w.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");w.push("["+y.slice(S.index)+"]")}return c(w,h,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 h=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:h,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 wu=function(p,f){var h=d(f);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,h):p,m=h.plainObjects?{__proto__:null}:{},y=Object.keys(g),v=0;v<y.length;++v){var x=y[v],S=u(x,g[x],h,typeof p=="string");m=e.merge(m,S,h)}return h.allowSparse===!0?m:e.compact(m)},wu}var Tu,ly;function Y2(){if(ly)return Tu;ly=1;var e=U2(),t=G2(),n=wp();return Tu={formats:n,parse:t,stringify:e},Tu}var K2=Y2(),He;(function(e){e.assertEqual=o=>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"&&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})(He||(He={}));var cy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(cy||(cy={}));const fe=He.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 fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},re=He.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 un 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 un))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.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()}}un.create=e=>new un(e);const sa=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.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}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.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 re.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 re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let Z2=sa;function Sd(){return Z2}const Ed=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 ue(e,t){const n=Sd(),r=Ed({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===sa?void 0:sa].filter(o=>!!o)});e.common.issues.push(r)}class Ht{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 Ce;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 Ht.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 Ce;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 Ce=Object.freeze({status:"aborted"}),ki=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),uy=e=>e.status==="aborted",dy=e=>e.status==="dirty",Zo=e=>e.status==="valid",js=e=>typeof Promise<"u"&&e instanceof Promise;function Ns(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function T1(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ge||(ge={}));var Ri,Pi;class Ln{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||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const fy=(e,t)=>{if(Zo(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 un(e.common.issues);return this._error=n,this._error}}};function Ae(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)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class je{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 Ht,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(js(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){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)},i=this._parseSync({data:t,path:o.path,parent:o});return fy(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Zo(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>Zo(i)?{value:i.value}:{issues:o.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==null?void 0:n.errorMap,async:!0},path:(n==null?void 0: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(js(o)?o:Promise.resolve(o));return fy(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:re.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 Kn({schema:this,typeName:Se.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 Hn.create(this,this._def)}nullable(){return Qr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dn.create(this)}promise(){return ca.create(this,this._def)}or(t){return Vs.create([this,t],this._def)}and(t){return zs.create(this,t,this._def)}transform(t){return new Kn({...Ae(this._def),schema:this,typeName:Se.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new qs({...Ae(this._def),innerType:this,defaultValue:n,typeName:Se.ZodDefault})}brand(){return new k1({typeName:Se.ZodBranded,type:this,...Ae(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Us({...Ae(this._def),innerType:this,catchValue:n,typeName:Se.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cl.create(this,t)}readonly(){return Gs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const X2=/^c[^\s-]{8,}$/i,Q2=/^[0-9a-z]+$/,J2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,eV=/^[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,tV=/^[a-z0-9_-]{21}$/i,nV=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,rV=/^[-+]?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)?)??$/,oV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,iV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Su;const aV=/^(?:(?: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])$/,sV=/^(?:(?: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])$/,lV=/^(([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]))$/,cV=/^(([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])$/,uV=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dV=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,S1="((\\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])))",fV=new RegExp(`^${S1}$`);function E1(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function pV(e){return new RegExp(`^${E1(e)}$`)}function hV(e){let t=`${S1}T${E1(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 mV(e,t){return!!((t==="v4"||!t)&&aV.test(e)||(t==="v6"||!t)&&lV.test(e))}function gV(e,t){if(!nV.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||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function vV(e,t){return!!((t==="v4"||!t)&&sV.test(e)||(t==="v6"||!t)&&cV.test(e))}class Bn extends je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),Ce}const r=new Ht;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:re.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),ue(o,{code:re.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?ue(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")oV.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Su||(Su=new RegExp(iV,"u")),Su.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")eV.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")tV.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")X2.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Q2.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")J2.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:re.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),ue(o,{validation:"regex",code:re.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),ue(o,{code:re.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),ue(o,{code:re.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?hV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?fV.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?pV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?rV.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?mV(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?gV(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?vV(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?uV.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?dV.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):He.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:re.invalid_string,...ge.errToObj(r)})}_addCheck(t){return new Bn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ge.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ge.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ge.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ge.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ge.errToObj(n)})}nonempty(t){return this.min(1,ge.errToObj(t))}trim(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Bn({...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}}Bn.create=e=>{var t;return new Bn({checks:[],typeName:Se.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};function yV(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class Zr extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==fe.number){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),Ce}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:re.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),ue(r,{code:re.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),ue(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?yV(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:re.not_finite,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new Zr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new Zr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.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"&&He.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)}}Zr.create=e=>new Zr({checks:[],typeName:Se.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class Xo extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Ht;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),ue(r,{code:re.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),ue(r,{code:re.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),ue(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),Ce}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new Xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new Xo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.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}}Xo.create=e=>{var t;return new Xo({checks:[],typeName:Se.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};class Cd extends je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),Ce}return Yt(t.data)}}Cd.create=e=>new Cd({typeName:Se.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class la extends je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),Ce}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_date}),Ce}const r=new Ht;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:re.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),ue(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):He.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new la({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ge.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}}la.create=e=>new la({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Se.ZodDate,...Ae(e)});class kd extends je{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),Ce}return Yt(t.data)}}kd.create=e=>new kd({typeName:Se.ZodSymbol,...Ae(e)});class Fs extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),Ce}return Yt(t.data)}}Fs.create=e=>new Fs({typeName:Se.ZodUndefined,...Ae(e)});class Ls extends je{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),Ce}return Yt(t.data)}}Ls.create=e=>new Ls({typeName:Se.ZodNull,...Ae(e)});class Rd extends je{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Rd.create=e=>new Rd({typeName:Se.ZodAny,...Ae(e)});class Ao extends je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}Ao.create=e=>new Ao({typeName:Se.ZodUnknown,...Ae(e)});class gr extends je{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),Ce}}gr.create=e=>new gr({typeName:Se.ZodNever,...Ae(e)});class Pd extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),Ce}return Yt(t.data)}}Pd.create=e=>new Pd({typeName:Se.ZodVoid,...Ae(e)});class Dn extends je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),Ce;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?re.too_big:re.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&&(ue(n,{code:re.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&&(ue(n,{code:re.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 Ln(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ln(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Dn({...this._def,minLength:{value:t,message:ge.toString(n)}})}max(t,n){return new Dn({...this._def,maxLength:{value:t,message:ge.toString(n)}})}length(t,n){return new Dn({...this._def,exactLength:{value:t,message:ge.toString(n)}})}nonempty(t){return this.min(1,t)}}Dn.create=(e,t)=>new Dn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Se.ZodArray,...Ae(t)});function vo(e){if(e instanceof vt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hn.create(vo(r))}return new vt({...e._def,shape:()=>t})}else return e instanceof Dn?new Dn({...e._def,type:vo(e.element)}):e instanceof Hn?Hn.create(vo(e.unwrap())):e instanceof Qr?Qr.create(vo(e.unwrap())):e instanceof Yn?Yn.create(e.items.map(t=>vo(t))):e}class vt extends je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ue(c,{code:re.invalid_type,expected:fe.object,received:c.parsedType}),Ce}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gr&&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 Ln(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof gr){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&&(ue(o,{code:re.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 Ln(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=>Ht.mergeObjectSync(r,c)):Ht.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ge.errToObj,new vt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ge.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(t){return new vt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new vt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Se.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new vt({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new vt({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new vt({...this._def,shape:()=>n})}deepPartial(){return vo(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new vt({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hn;)i=i._def.innerType;n[r]=i}}),new vt({...this._def,shape:()=>n})}keyof(){return C1(He.objectKeys(this.shape))}}vt.create=(e,t)=>new vt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:Se.ZodObject,...Ae(t)});vt.strictCreate=(e,t)=>new vt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:Se.ZodObject,...Ae(t)});vt.lazycreate=(e,t)=>new vt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:Se.ZodObject,...Ae(t)});class Vs extends je{_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 un(s.ctx.common.issues));return ue(n,{code:re.invalid_union,unionErrors:a}),Ce}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 un(l));return ue(n,{code:re.invalid_union,unionErrors:s}),Ce}}get options(){return this._def.options}}Vs.create=(e,t)=>new Vs({options:e,typeName:Se.ZodUnion,...Ae(t)});const $n=e=>e instanceof Bs?$n(e.schema):e instanceof Kn?$n(e.innerType()):e instanceof Hs?[e.value]:e instanceof Xr?e.options:e instanceof Ws?He.objectValues(e.enum):e instanceof qs?$n(e._def.innerType):e instanceof Fs?[void 0]:e instanceof Ls?[null]:e instanceof Hn?[void 0,...$n(e.unwrap())]:e instanceof Qr?[null,...$n(e.unwrap())]:e instanceof k1||e instanceof Gs?$n(e.unwrap()):e instanceof Us?$n(e._def.innerType):[];class Tp extends je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),Ce;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ue(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=$n(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Tp({typeName:Se.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ae(r)})}}function Ad(e,t){const n=ar(e),r=ar(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=He.objectKeys(t),i=He.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ad(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.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=Ad(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class zs extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(uy(i)||uy(a))return Ce;const s=Ad(i.value,a.value);return s.valid?((dy(i)||dy(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:re.invalid_intersection_types}),Ce)};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}))}}zs.create=(e,t,n)=>new zs({left:e,right:t,typeName:Se.ZodIntersection,...Ae(n)});class Yn extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),Ce;if(r.data.length<this._def.items.length)return ue(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:re.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 Ln(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ht.mergeArray(n,a)):Ht.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Yn({...this._def,rest:t})}}Yn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yn({items:e,typeName:Se.ZodTuple,rest:null,...Ae(t)})};class $s extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.object)return ue(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),Ce;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Ln(r,s,r.path,s)),value:a._parse(new Ln(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ht.mergeObjectAsync(n,o):Ht.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof je?new $s({keyType:t,valueType:n,typeName:Se.ZodRecord,...Ae(r)}):new $s({keyType:Bn.create(),valueType:t,typeName:Se.ZodRecord,...Ae(n)})}}class Id extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.map)return ue(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),Ce;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ln(r,s,r.path,[c,"key"])),value:i._parse(new Ln(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 Ce;(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 Ce;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Id.create=(e,t,n)=>new Id({valueType:t,keyType:e,typeName:Se.ZodMap,...Ae(n)});class Qo extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),Ce;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:re.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&&(ue(r,{code:re.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 Ce;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 Ln(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Qo({...this._def,minSize:{value:t,message:ge.toString(n)}})}max(t,n){return new Qo({...this._def,maxSize:{value:t,message:ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Qo.create=(e,t)=>new Qo({valueType:e,minSize:null,maxSize:null,typeName:Se.ZodSet,...Ae(t)});class Bi extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),Ce;function r(s,l){return Ed({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Sd(),sa].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function o(s,l){return Ed({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Sd(),sa].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ca){const s=this;return Yt(async function(...l){const c=new un([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Yt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new un([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new un([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Bi({...this._def,args:Yn.create(t).rest(Ao.create())})}returns(t){return new Bi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Bi({args:t||Yn.create([]).rest(Ao.create()),returns:n||Ao.create(),typeName:Se.ZodFunction,...Ae(r)})}}class Bs extends je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Bs.create=(e,t)=>new Bs({getter:e,typeName:Se.ZodLazy,...Ae(t)});class Hs extends je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:t.data}}get value(){return this._def.value}}Hs.create=(e,t)=>new Hs({value:e,typeName:Se.ZodLiteral,...Ae(t)});function C1(e,t){return new Xr({values:e,typeName:Se.ZodEnum,...Ae(t)})}class Xr extends je{constructor(){super(...arguments),Ri.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:He.joinValues(r),received:n.parsedType,code:re.invalid_type}),Ce}if(Ns(this,Ri)||T1(this,Ri,new Set(this._def.values)),!Ns(this,Ri).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:re.invalid_enum_value,options:r}),Ce}return Yt(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 Xr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Xr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ri=new WeakMap;Xr.create=C1;class Ws extends je{constructor(){super(...arguments),Pi.set(this,void 0)}_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=He.objectValues(n);return ue(r,{expected:He.joinValues(o),received:r.parsedType,code:re.invalid_type}),Ce}if(Ns(this,Pi)||T1(this,Pi,new Set(He.getValidEnumValues(this._def.values))),!Ns(this,Pi).has(t.data)){const o=He.objectValues(n);return ue(r,{received:r.data,code:re.invalid_enum_value,options:o}),Ce}return Yt(t.data)}get enum(){return this._def.values}}Pi=new WeakMap;Ws.create=(e,t)=>new Ws({values:e,typeName:Se.ZodNativeEnum,...Ae(t)});class ca extends je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ue(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),Ce;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ca.create=(e,t)=>new ca({type:e,typeName:Se.ZodPromise,...Ae(t)});class Kn extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Se.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=>{ue(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 Ce;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ce:l.status==="dirty"||n.value==="dirty"?ki(l.value):l});{if(n.value==="aborted")return Ce;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ce:s.status==="dirty"||n.value==="dirty"?ki(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"?Ce:(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"?Ce:(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(!Zo(a))return a;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=>Zo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);He.assertNever(o)}}Kn.create=(e,t,n)=>new Kn({schema:e,typeName:Se.ZodEffects,effect:t,...Ae(n)});Kn.createWithPreprocess=(e,t,n)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:Se.ZodEffects,...Ae(n)});class Hn extends je{_parse(t){return this._getType(t)===fe.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hn.create=(e,t)=>new Hn({innerType:e,typeName:Se.ZodOptional,...Ae(t)});class Qr extends je{_parse(t){return this._getType(t)===fe.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qr.create=(e,t)=>new Qr({innerType:e,typeName:Se.ZodNullable,...Ae(t)});class qs extends je{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}qs.create=(e,t)=>new qs({innerType:e,typeName:Se.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ae(t)});class Us extends je{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return js(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Us.create=(e,t)=>new Us({innerType:e,typeName:Se.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ae(t)});class Od extends je{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),Ce}return{status:"valid",value:t.data}}}Od.create=e=>new Od({typeName:Se.ZodNaN,...Ae(e)});class k1 extends je{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Cl extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ce:i.status==="dirty"?(n.dirty(),ki(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"?Ce: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 Cl({in:t,out:n,typeName:Se.ZodPipeline})}}class Gs extends je{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Zo(o)&&(o.value=Object.freeze(o.value)),o);return js(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Gs.create=(e,t)=>new Gs({innerType:e,typeName:Se.ZodReadonly,...Ae(t)});vt.lazycreate;var Se;(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"})(Se||(Se={}));Bn.create;Zr.create;Od.create;Xo.create;Cd.create;la.create;kd.create;Fs.create;Ls.create;Rd.create;Ao.create;gr.create;Pd.create;Dn.create;vt.create;vt.strictCreate;Vs.create;Tp.create;zs.create;Yn.create;$s.create;Id.create;Qo.create;Bi.create;Bs.create;Hs.create;Xr.create;Ws.create;ca.create;Kn.create;Hn.create;Qr.create;Kn.createWithPreprocess;Cl.create;const xV=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},bV=(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]}}},R1=e=>e.replace(/\[(\d+)]/g,".$1").split("."),hn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):R1(t),o=structuredClone(e);return bV(o,r,n),o},wV=(e,t)=>e.localeCompare(t),wi={},P1=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return A1(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=P1(e._def.innerType);return t==="ZodArray"?n??[]:n}},A1=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,P1(n)])),I1=(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]=I1(i,o):n[r]=o||i)}return n},TV={sort:wV,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},O1=e=>{const t=new FormData(e),n=new URLSearchParams(t);return K2.parse(n.toString(),TV)},Dr=(e,t)=>R1(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),sr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Eu=e=>{const t=e.dataset.target;if(!t)return sr(e);const n=document.querySelector(`[data-origin="${t}"]`);return sr(n||e)},SV={state:{},loading:!1,useOnChange:!1},py=e=>e.dataset.target||e.name,EV=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=$i.LocalStorage.get(t);return xV(n)?n:{}},clear:()=>void $i.LocalStorage.delete(t),set:n=>$i.LocalStorage.set(t,n)}},CV=(e,t,n=SV)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>ct.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??A1(e)??{}),l=E.useCallback(v=>{var I;const x=v.target,S=v.currentTarget;if(x.dataset.optional==="true")return;const w=py(x),C=Eu(x)||(S?sr(S):""),k=Dr(w,e);if(x.setAttribute("data-initialized","true"),k){const P=k.safeParse(C),D=P.success?void 0:((I=P.error.issues[0])==null?void 0:I.message)??"";o(N=>hn(N??{},w,D))}},[]),c=E.useCallback(v=>x=>{const S=x.currentTarget,T=Object.values(i.current).reduce((C,k)=>{var V;const I=k.element,P=k.schema.safeParse(sr(I));if(I.dataset.ignore==="ignore"||P.success)return C;const D=(V=P.error.issues[0])==null?void 0:V.message;I.setAttribute("data-initialized","true");const N=I.dataset.name||I.name||"";return hn(C,N,D)},{}),w=ct.empty(T)?null:T;o(w),console.error(w),v==null||v({form:S,errors:w||{}})},[]),u=(v,x=wi)=>{const S=Dr(v,e),T=w=>{var k;if(!w)return;const C=w instanceof Date?w.toISOString():w.target.value;s(I=>hn(I,v,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,w)};return{...x,loading:n.loading,name:v,id:v,onChange:T,form:t,date:ct.string(a[v])?new Date(a[v]):a[v],required:x.required??!S.isOptional(),error:r==null?void 0:r[v],ref:w=>{w!==null&&(i.current[v]={element:w,schema:S})}}},d=(v,x=wi)=>{const S=Dr(v,e);return{...x,name:v,id:v,onChange:w=>{var k;const C=w.target.value;s(I=>hn(I,v,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,w)},form:t,loading:n.loading,onInvalid:l,error:kr(r,v,void 0),value:kr(a,v,void 0)||"",required:x.required??!S.isOptional(),ref:w=>w!==null?i.current[v]={element:w,schema:S}:void 0}},p=(v,x=wi)=>{const S=Dr(v,e);return{...x,name:v,id:v,onChange:w=>{var k;const C=w.target.checked;s(I=>hn(I??{},v,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,w)},form:t,loading:n.loading,onInvalid:l,error:kr(r,v,void 0),required:x.required??!S.isOptional(),ref:w=>w!==null?void(i.current[v]={element:w,schema:S}):void 0}},f=(v,x=wi)=>{const S=Dr(v,e),T=w=>{var k,I;(k=w.persist)==null||k.call(w);const C=w.target.value;(I=x==null?void 0:x.onChange)==null||I.call(x,w),s(P=>hn(P,v,C))};return{...x,loading:n.loading,name:v,id:v,onChange:T,form:t,onInvalid:l,error:kr(r,v,void 0),required:x.required??!S.isOptional(),value:kr(a,v,void 0)||(x==null?void 0:x.value)||"",type:ct.instance(S,Zr)?"number":(x==null?void 0:x.type)??"text",ref:w=>w===null?void 0:i.current[v]={element:w,schema:S}}},h=(v,x=wi)=>{const S=Dr(v,e),T=S._def.typeName==="ZodNumber";return{...x,name:v,id:v,onChange:C=>{var I,P;(I=C.persist)==null||I.call(C);const k=T?C.target.valueAsNumber:C.target.value;(P=x==null?void 0:x.onChange)==null||P.call(x,C),s(D=>hn(D,v,k))},form:t,loading:n.loading,onInvalid:l,error:kr(r,v,void 0),required:x.required??!S.isOptional(),type:T?"number":(x==null?void 0:x.type)??"text",value:kr(a,v,void 0)||(x==null?void 0:x.value)||"",ref:C=>C===null?void 0:void(i.current[v]={element:C,schema:S})}};E.useEffect(()=>{const v=Object.values(i.current).map(S=>{const T=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,w=S.schema.safeParse(sr(T)),C=D=>{var M;const N=py(D.target);if(!N)return!1;const V=D.target,R=Eu(D.target)||(D.relatedTarget?sr(D.relatedTarget):""),O=S.schema.safeParse(R);if(V.setAttribute("value",R),O.success)return T.setCustomValidity(""),o(L=>{if(ct.null(L))return null;const j=hn(L,N,void 0);return ct.empty(L)||ct.nil(L)||ct.empty(j)?null:j}),!1;if(T.required){const L=((M=O.error.issues[0])==null?void 0:M.message)||"";T.setCustomValidity(L),o(j=>{if(ct.null(j))return null;const $=hn(j,N,L||void 0);return ct.empty($)?null:$})}return!1},k=new AbortController,I=T.getAttribute("data-trigger")||"blur";T.addEventListener(I,C,{signal:k.signal});const P=T.dataset.shadow?!1:T.required?!w.success:!1;return{input:S,hasInitialError:P,unsubscribe:()=>k.abort()}});return v.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>v.forEach(S=>S.unsubscribe())});const g=v=>x=>{var P;x.preventDefault();const S=x.currentTarget;let T=O1(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(D=>{if(D.tagName==="SELECT"){const N=D;T=hn(T,N.name,N.value)}if(D.tagName==="INPUT"){const N=D,V=Eu(N)||(N?sr(N):"");T=hn(T,N.dataset.target||N.name,V)}});const C=I1(T,a),k=e.safeParse(C),I=()=>{var D;b1(S),(D=n.interceptor)==null||D.clear()};if(k.success){const D=JSON.stringify(k.data);return S.setAttribute("data-json",D),(P=n.interceptor)==null||P.clear(),v==null?void 0:v(x,{form:S,event:x,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),S.reportValidity(),v==null?void 0:v(x,{form:S,json:T,event:x,reset:I,data:T,success:!1,errors:k.error.issues.map(D=>({message:D.message,path:D.path.map(N=>String(N))}))})},m=v=>Pf(a,v)||"",y=v=>({...v,id:t,name:t});return E.useEffect(()=>{var v;n.interceptor&&((v=n.interceptor)==null||v.set(a))},[a]),{get:m,input:h,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,disabled:r!==null}},kV=e=>e?JSON.parse(e.getAttribute("data-json")):{},RV=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},_1={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},M1={base:"1rem",lg:"1.5rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},D1={normal:"1",navbar:"19",calendar:"2",overlay:"20",tooltip:"13",floating:"21"},PV={name:"dark",zIndex:D1,rounded:_1,spacing:M1,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",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(161,62%,17%)"},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%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",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(0, 0%, 8%)",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%, 33%)",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%)"}}}},AV={rounded:_1,spacing:M1,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:D1,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",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%, 35%)",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%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",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(221, 20%, 97%)",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%)"}}}},IV=PV,OV=AV,_V=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...dl,...e.tweaks},parser:e.parser||cl.hsla,map:{...ul,...e.map}}),[e]);return b.jsx(ai.Provider,{value:t,children:e.children})},MV=()=>{const e=E.useContext(ai);return e?e.parser:cl.hsla};exports.Alert=dA;exports.Autocomplete=uF;exports.Button=Io;exports.Calendar=u0;exports.Card=d0;exports.Checkbox=pp;exports.ColType=Po;exports.Collapse=Mb;exports.ComponentsProvider=_V;exports.Context=ai;exports.DatePicker=fF;exports.Dropdown=fi;exports.Empty=f0;exports.Expand=aj;exports.FileUpload=CL;exports.Form=kL;exports.Input=ka;exports.InputFeedback=Xw;exports.InputField=Ca;exports.Menu=cj;exports.MenuItem=lj;exports.Modal=wj;exports.MultiSelect=DL;exports.Notifications=aM;exports.Polymorph=cn;exports.Radiobox=jL;exports.RenderOnView=pS;exports.Select=Kr;exports.Stats=sM;exports.Switch=NL;exports.Tab=uM;exports.Table=W2;exports.Tabs=lM;exports.Tag=Fd;exports.TaskList=FL;exports.Textarea=LL;exports.Timeline=dM;exports.TimelineItem=hl;exports.Toolbar=Tj;exports.Tooltip=ww;exports.TransferList=$L;exports.createColumns=f2;exports.createCssProperties=JO;exports.createDesignTokens=i0;exports.createFormStorage=EV;exports.createOptionCols=yp;exports.createStyles=ZO;exports.createTheme=QO;exports.createTokenStyles=e_;exports.css=Ve;exports.defaultDarkTheme=IV;exports.defaultLightTheme=OV;exports.defaultTranslations=ul;exports.defaultTweaks=dl;exports.dispatchInput=jy;exports.formReset=b1;exports.formToJson=O1;exports.getJsonForm=kV;exports.getSchemaShape=Dr;exports.hasVerticalScroll=Ny;exports.initializeInputDataset=da;exports.isMobile=s0;exports.isReactComponent=lS;exports.isReactFC=cS;exports.isSsr=qr;exports.mergeRefs=Nd;exports.negate=n_;exports.noop=Af;exports.parsers=cl;exports.path=Pf;exports.reduceTokens=jr;exports.safeRegex=Xu;exports.splitInto=a0;exports.useColorParser=MV;exports.useForm=CV;exports.useLocale=Rf;exports.useNotification=oM;exports.usePrevious=RV;exports.useReactive=j0;exports.useTablePreferences=m2;exports.useTranslations=Ot;exports.uuid=ga;
190
+ */var pu,Vv;function YF(){if(Vv)return pu;Vv=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 pu=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},pu}var hu,$v;function Cp(){if($v)return hu;$v=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hu=e,hu}var mu,zv;function d1(){return zv||(zv=1,mu=Function.call.bind(Object.prototype.hasOwnProperty)),mu}var gu,Bv;function GF(){if(Bv)return gu;Bv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Cp(),n={},r=d1();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(m){d=m}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={})},gu=o,gu}var vu,Hv;function KF(){if(Hv)return vu;Hv=1;var e=u1(),t=YF(),n=Cp(),r=d1(),o=GF(),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 vu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(M){var $=M&&(c&&M[c]||M[u]);if(typeof $=="function")return $}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:b,element:T(),elementType:w(),instanceOf:S,node:A(),objectOf:R,oneOf:C,oneOfType:I,shape:N,exact:V};function m(M,$){return M===$?M!==0||1/M===1/$:M!==M&&$!==$}function g(M,$){this.message=M,this.data=$&&typeof $=="object"?$:{},this.stack=""}g.prototype=Error.prototype;function h(M){if(process.env.NODE_ENV!=="production")var $={},J=0;function te(Z,U,Y,L,W,G,ie){if(L=L||p,G=G||Y,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 ye=L+":"+Y;!$[ye]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+L+"`. 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."),$[ye]=!0,J++)}}return U[Y]==null?Z?U[Y]===null?new g("The "+W+" `"+G+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new g("The "+W+" `"+G+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:M(U,Y,L,W,G)}var ee=te.bind(null,!1);return ee.isRequired=te.bind(null,!0),ee}function v(M){function $(J,te,ee,Z,U,Y){var L=J[te],W=D(L);if(W!==M){var G=F(L);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+G+"` supplied to `"+ee+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return h($)}function y(){return h(a)}function b(M){function $(J,te,ee,Z,U){if(typeof M!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var Y=J[te];if(!Array.isArray(Y)){var L=D(Y);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+L+"` supplied to `"+ee+"`, expected an array."))}for(var W=0;W<Y.length;W++){var G=M(Y,W,ee,Z,U+"["+W+"]",n);if(G instanceof Error)return G}return null}return h($)}function T(){function M($,J,te,ee,Z){var U=$[J];if(!s(U)){var Y=D(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return h(M)}function w(){function M($,J,te,ee,Z){var U=$[J];if(!e.isValidElementType(U)){var Y=D(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return h(M)}function S(M){function $(J,te,ee,Z,U){if(!(J[te]instanceof M)){var Y=M.name||p,L=z(J[te]);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+L+"` supplied to `"+ee+"`, expected ")+("instance of `"+Y+"`."))}return null}return h($)}function C(M){if(!Array.isArray(M))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 $(J,te,ee,Z,U){for(var Y=J[te],L=0;L<M.length;L++)if(m(Y,M[L]))return null;var W=JSON.stringify(M,function(ie,B){var ye=F(B);return ye==="symbol"?String(B):B});return new g("Invalid "+Z+" `"+U+"` of value `"+String(Y)+"` "+("supplied to `"+ee+"`, expected one of "+W+"."))}return h($)}function R(M){function $(J,te,ee,Z,U){if(typeof M!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var Y=J[te],L=D(Y);if(L!=="object")return new g("Invalid "+Z+" `"+U+"` of type "+("`"+L+"` supplied to `"+ee+"`, expected an object."));for(var W in Y)if(r(Y,W)){var G=M(Y,W,ee,Z,U+"."+W,n);if(G instanceof Error)return G}return null}return h($)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var $=0;$<M.length;$++){var J=M[$];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(J)+" at index "+$+"."),a}function te(ee,Z,U,Y,L){for(var W=[],G=0;G<M.length;G++){var ie=M[G],B=ie(ee,Z,U,Y,L,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&W.push(B.data.expectedType)}var ye=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new g("Invalid "+Y+" `"+L+"` supplied to "+("`"+U+"`"+ye+"."))}return h(te)}function A(){function M($,J,te,ee,Z){return P($[J])?null:new g("Invalid "+ee+" `"+Z+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return h(M)}function O(M,$,J,te,ee){return new g((M||"React class")+": "+$+" type `"+J+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function N(M){function $(J,te,ee,Z,U){var Y=J[te],L=D(Y);if(L!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+L+"` "+("supplied to `"+ee+"`, expected `object`."));for(var W in M){var G=M[W];if(typeof G!="function")return O(ee,Z,U,W,F(G));var ie=G(Y,W,ee,Z,U+"."+W,n);if(ie)return ie}return null}return h($)}function V(M){function $(J,te,ee,Z,U){var Y=J[te],L=D(Y);if(L!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+L+"` "+("supplied to `"+ee+"`, expected `object`."));var W=t({},J[te],M);for(var G in W){var ie=M[G];if(r(M,G)&&typeof ie!="function")return O(ee,Z,U,G,F(ie));if(!ie)return new g("Invalid "+Z+" `"+U+"` key `"+G+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(J[te],null," ")+`
191
+ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var B=ie(Y,G,ee,Z,U+"."+G,n);if(B)return B}return null}return h($)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||s(M))return!0;var $=d(M);if($){var J=$.call(M),te;if($!==M.entries){for(;!(te=J.next()).done;)if(!P(te.value))return!1}else for(;!(te=J.next()).done;){var ee=te.value;if(ee&&!P(ee[1]))return!1}}else return!1;return!0;default:return!1}}function _(M,$){return M==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function D(M){var $=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":_($,M)?"symbol":$}function F(M){if(typeof M>"u"||M===null)return""+M;var $=D(M);if($==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return $}function j(M){var $=F(M);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function z(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},vu}var yu,Wv;function ZF(){if(Wv)return yu;Wv=1;var e=Cp();function t(){}function n(){}return n.resetWarningCache=t,yu=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},yu}var qv;function XF(){if(qv)return Ka.exports;if(qv=1,process.env.NODE_ENV!=="production"){var e=u1(),t=!0;Ka.exports=KF()(e.isElement,t)}else Ka.exports=ZF()();return Ka.exports}var QF=XF();const et=Iy(QF);function lo(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())})}const JF=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 Zo(e,t,n){const r=eL(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Uv(r,"path",i),Uv(r,"relativePath",i),r}function eL(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=JF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Uv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const tL=[".DS_Store","Thumbs.db"];function nL(e){return lo(this,void 0,void 0,function*(){return Ds(e)&&rL(e.dataTransfer)?sL(e.dataTransfer,e.type):oL(e)?iL(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?aL(e):[]})}function rL(e){return Ds(e)}function oL(e){return Ds(e)&&Ds(e.target)}function Ds(e){return typeof e=="object"&&e!==null}function iL(e){return Sd(e.target.files).map(t=>Zo(t))}function aL(e){return lo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Zo(n))})}function sL(e,t){return lo(this,void 0,void 0,function*(){if(e.items){const n=Sd(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(lL));return Yv(f1(r))}return Yv(Sd(e.files).map(n=>Zo(n)))})}function Yv(e){return e.filter(t=>tL.indexOf(t.name)===-1)}function Sd(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 lL(e){if(typeof e.webkitGetAsEntry!="function")return Gv(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?p1(t):Gv(e,t)}function f1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?f1(n):[n]],[])}function Gv(e,t){return lo(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,Zo(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Zo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function cL(e){return lo(this,void 0,void 0,function*(){return e.isDirectory?p1(e):uL(e)})}function p1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>lo(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(cL));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function uL(e){return lo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Zo(r,e.fullPath);t(o)},r=>{n(r)})})})}var Xa={},Kv;function dL(){return Kv||(Kv=1,Xa.__esModule=!0,Xa.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}),Xa}var fL=dL();const xu=Iy(fL);function Zv(e){return mL(e)||hL(e)||m1(e)||pL()}function pL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mL(e){if(Array.isArray(e))return Td(e)}function Xv(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 Qv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xv(Object(n),!0).forEach(function(r){h1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ua(e,t){return yL(e)||vL(e,t)||m1(e,t)||gL()}function gL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
193
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m1(e,t){if(e){if(typeof e=="string")return Td(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 Td(e,t)}}function Td(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 vL(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 yL(e){if(Array.isArray(e))return e}var xL=typeof xu=="function"?xu:xu.default,bL="file-invalid-type",wL="file-too-large",SL="file-too-small",TL="too-many-files",EL=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:bL,message:"File type must be ".concat(r)}},Jv=function(t){return{code:wL,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ey=function(t){return{code:SL,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},CL={code:TL,message:"Too many files"};function g1(e,t){var n=e.type==="application/x-moz-file"||xL(e,t);return[n,n?null:EL(t)]}function v1(e,t,n){if(Nr(e.size))if(Nr(t)&&Nr(n)){if(e.size>n)return[!1,Jv(n)];if(e.size<t)return[!1,ey(t)]}else{if(Nr(t)&&e.size<t)return[!1,ey(t)];if(Nr(n)&&e.size>n)return[!1,Jv(n)]}return[!0,null]}function Nr(e){return e!=null}function kL(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=g1(l,n),u=ua(c,1),d=u[0],p=v1(l,r,o),f=ua(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function js(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Qa(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 ty(e){e.preventDefault()}function RL(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function PL(e){return e.indexOf("Edge/")!==-1}function AL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return RL(e)||PL(e)}function En(){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!js(r)&&s&&s.apply(void 0,[r].concat(i)),js(r)})}}function IL(){return"showOpenFilePicker"in window}function _L(e){if(Nr(e)){var t=Object.entries(e).filter(function(n){var r=ua(n,2),o=r[0],i=r[1],a=!0;return y1(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(x1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ua(r,2),i=o[0],a=o[1];return Qv(Qv({},n),{},h1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function OL(e){if(Nr(e))return Object.entries(e).reduce(function(t,n){var r=ua(n,2),o=r[0],i=r[1];return[].concat(Zv(t),[o],Zv(i))},[]).filter(function(t){return y1(t)||x1(t)}).join(",")}function ML(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function DL(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function y1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function x1(e){return/^.*\.[\w]+$/.test(e)}var jL=["children"],NL=["open"],FL=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],LL=["refKey","onChange","onClick"];function VL(e){return BL(e)||zL(e)||b1(e)||$L()}function $L(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
194
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BL(e){if(Array.isArray(e))return Ed(e)}function bu(e,t){return qL(e)||WL(e,t)||b1(e,t)||HL()}function HL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b1(e,t){if(e){if(typeof e=="string")return Ed(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 Ed(e,t)}}function Ed(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 WL(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 qL(e){if(Array.isArray(e))return e}function ny(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 dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ny(Object(n),!0).forEach(function(r){Cd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ny(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e,t){if(e==null)return{};var n=UL(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 UL(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=E.forwardRef(function(e,t){var n=e.children,r=Ns(e,jL),o=S1(r),i=o.open,a=Ns(o,NL);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(dt(dt({},a),{},{open:i})))});kp.displayName="Dropzone";var w1={disabled:!1,getFilesFromEvent:nL,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=w1;kp.propTypes={children:et.func,accept:et.objectOf(et.arrayOf(et.string)),multiple:et.bool,preventDropOnDocument:et.bool,noClick:et.bool,noKeyboard:et.bool,noDrag:et.bool,noDragEventsBubbling:et.bool,minSize:et.number,maxSize:et.number,maxFiles:et.number,disabled:et.bool,getFilesFromEvent:et.func,onFileDialogCancel:et.func,onFileDialogOpen:et.func,useFsAccessApi:et.bool,autoFocus:et.bool,onDragEnter:et.func,onDragLeave:et.func,onDragOver:et.func,onDrop:et.func,onDropAccepted:et.func,onDropRejected:et.func,onError:et.func,validator:et.func};var kd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function S1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=dt(dt({},w1),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,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,b=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,R=t.onError,I=t.validator,A=E.useMemo(function(){return OL(n)},[n]),O=E.useMemo(function(){return _L(n)},[n]),N=E.useMemo(function(){return typeof h=="function"?h:ry},[h]),V=E.useMemo(function(){return typeof g=="function"?g:ry},[g]),P=E.useRef(null),_=E.useRef(null),D=E.useReducer(YL,kd),F=bu(D,2),j=F[0],z=F[1],M=j.isFocused,$=j.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&IL()),te=function(){!J.current&&$&&setTimeout(function(){if(_.current){var ce=_.current.files;ce.length||(z({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[_,$,V,J]);var ee=E.useRef([]),Z=function(ce){P.current&&P.current.contains(ce.target)||(ce.preventDefault(),ee.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",ty,!1),document.addEventListener("drop",Z,!1)),function(){b&&(document.removeEventListener("dragover",ty),document.removeEventListener("drop",Z))}},[P,b]),E.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var U=E.useCallback(function(X){R?R(X):console.error(X)},[R]),Y=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X),ee.current=[].concat(VL(ee.current),[X.target]),Qa(X)&&Promise.resolve(o(X)).then(function(ce){if(!(js(X)&&!C)){var Re=ce.length,ze=Re>0&&kL({files:ce,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),xt=Re>0&&!ze;z({isDragAccept:ze,isDragReject:xt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(ce){return U(ce)})},[o,c,U,C,A,a,i,s,l,I]),L=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X);var ce=Qa(X);if(ce&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return ce&&d&&d(X),!1},[d,C]),W=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X);var ce=ee.current.filter(function(ze){return P.current&&P.current.contains(ze)}),Re=ce.indexOf(X.target);Re!==-1&&ce.splice(Re,1),ee.current=ce,!(ce.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qa(X)&&u&&u(X))},[P,u,C]),G=E.useCallback(function(X,ce){var Re=[],ze=[];X.forEach(function(xt){var ut=g1(xt,A),Ot=bu(ut,2),fn=Ot[0],Tn=Ot[1],Xn=v1(xt,a,i),Qn=bu(Xn,2),Jn=Qn[0],H=Qn[1],q=I?I(xt):null;if(fn&&Jn&&!q)Re.push(xt);else{var Ve=[Tn,H];q&&(Ve=Ve.concat(q)),ze.push({file:xt,errors:Ve.filter(function(Xe){return Xe})})}}),(!s&&Re.length>1||s&&l>=1&&Re.length>l)&&(Re.forEach(function(xt){ze.push({file:xt,errors:[CL]})}),Re.splice(0)),z({acceptedFiles:Re,fileRejections:ze,isDragReject:ze.length>0,type:"setFiles"}),p&&p(Re,ze,ce),ze.length>0&&m&&m(ze,ce),Re.length>0&&f&&f(Re,ce)},[z,s,A,a,i,l,p,f,m,I]),ie=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X),ee.current=[],Qa(X)&&Promise.resolve(o(X)).then(function(ce){js(X)&&!C||G(ce,X)}).catch(function(ce){return U(ce)}),z({type:"reset"})},[o,G,U,C]),B=E.useCallback(function(){if(J.current){z({type:"openDialog"}),N();var X={multiple:s,types:O};window.showOpenFilePicker(X).then(function(ce){return o(ce)}).then(function(ce){G(ce,null),z({type:"closeDialog"})}).catch(function(ce){ML(ce)?(V(ce),z({type:"closeDialog"})):DL(ce)?(J.current=!1,_.current?(_.current.value=null,_.current.click()):U(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."))):U(ce)});return}_.current&&(z({type:"openDialog"}),N(),_.current.value=null,_.current.click())},[z,N,V,v,G,U,O,s]),ye=E.useCallback(function(X){!P.current||!P.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[P,B]),Se=E.useCallback(function(){z({type:"focus"})},[]),Ie=E.useCallback(function(){z({type:"blur"})},[]),Le=E.useCallback(function(){T||(AL()?setTimeout(B,0):B())},[T,B]),ae=function(ce){return r?null:ce},ve=function(ce){return w?null:ae(ce)},K=function(ce){return S?null:ae(ce)},le=function(ce){C&&ce.stopPropagation()},Q=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=X.refKey,Re=ce===void 0?"ref":ce,ze=X.role,xt=X.onKeyDown,ut=X.onFocus,Ot=X.onBlur,fn=X.onClick,Tn=X.onDragEnter,Xn=X.onDragOver,Qn=X.onDragLeave,Jn=X.onDrop,H=Ns(X,FL);return dt(dt(Cd({onKeyDown:ve(En(xt,ye)),onFocus:ve(En(ut,Se)),onBlur:ve(En(Ot,Ie)),onClick:ae(En(fn,Le)),onDragEnter:K(En(Tn,Y)),onDragOver:K(En(Xn,L)),onDragLeave:K(En(Qn,W)),onDrop:K(En(Jn,ie)),role:typeof ze=="string"&&ze!==""?ze:"presentation"},Re,P),!r&&!w?{tabIndex:0}:{}),H)}},[P,ye,Se,Ie,Le,Y,L,W,ie,w,S,r]),oe=E.useCallback(function(X){X.stopPropagation()},[]),be=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=X.refKey,Re=ce===void 0?"ref":ce,ze=X.onChange,xt=X.onClick,ut=Ns(X,LL),Ot=Cd({accept:A,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:ae(En(ze,ie)),onClick:ae(En(xt,oe)),tabIndex:-1},Re,_);return dt(dt({},Ot),ut)}},[_,n,s,ie,r]);return dt(dt({},j),{},{isFocused:M&&!r,getRootProps:Q,getInputProps:be,rootRef:P,inputRef:_,open:ae(B)})}function YL(e,t){switch(t.type){case"focus":return dt(dt({},e),{},{isFocused:!0});case"blur":return dt(dt({},e),{},{isFocused:!1});case"openDialog":return dt(dt({},kd),{},{isFileDialogActive:!0});case"closeDialog":return dt(dt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return dt(dt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return dt(dt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return dt({},kd);default:return e}}function ry(){}const GL={isImage:e=>e.type.includes("image")},KL=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(GL.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:jv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:jv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Oo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Vo,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(Wb,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Oo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Vo,{className:"text-danger"})})]})},ZL=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(KL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),XL=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(ZL,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),QL=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(jA,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),JL=({idle:e=QL,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=S1({onDrop:a});return x.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(XL,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},e2=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})};class zr extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zr&&(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 zr(this);return t?t(n):n}}const t2=e=>x.jsx(E.Fragment,{children:e.children}),n2={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},r2={caseSensitive:!1,sort:!1},oy=[],o2=E.forwardRef(function(t,n){return x.jsx(pt.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),i2=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),a2={List:o2,Item:i2},s2=e=>{const t=_t(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.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]),x.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?x.jsxs(Ud,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},l2=E.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:m=!1,onChangeOptions:g,...h},v)=>{const y=E.useMemo(()=>new zr(r.map(Q=>[Q.value,Q])),[r]),b=E.useRef(null),T=E.useRef(null),w=h.value??h.defaultValue??oy,S=_t(),[C,R]=E.useState(0),[I,A]=E.useState(!1),[O,N]=E.useState(""),[V,P]=E.useState(()=>{const Q=new zr;return w.forEach(oe=>{const be=y.get(oe);return be?Q.set(oe,be):void 0}),Q}),_=E.useMemo(()=>Array.from(V.keys()),[V]),[D,F]=E.useState(()=>{const Q=new Set(w);return r.reduce((oe,be)=>Q.has(be.value)?[...oe,be.label??be.value]:oe,[])??w}),[j,z]=E.useState(null),M=E.useRef(oy),$=m&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...r]:r,J=new Vr($,["value","label"],r2).search(O);E.useEffect(()=>{I||R(0)},[I]),E.useEffect(()=>{h.value&&P(new zr(h.value.map(Q=>[Q,y.get(Q)])))},[h.value,y]);const te=J.filter(Q=>Q.hidden!==!0),ee=te.length===0,{x:Z,y:U,strategy:Y,refs:L,context:W}=oo({open:I,transform:!0,strategy:"absolute",onOpenChange:A,whileElementsMounted:wa,middleware:[Sa(4),pw({padding:10,elementContext:"reference",apply(Q){if(b.current===null)return;const oe=b.current.getBoundingClientRect().width,be=360;ha.flushSync(()=>setTimeout(()=>R(be),200)),Object.assign(Q.elements.floating.style,{width:`${oe}px`,maxWidth:`${oe}px`,maxHeight:ee?"auto":`${be}px`,height:ee?"auto":`${be}px`})}})]}),G=Aw(W,n2),{getReferenceProps:ie,getFloatingProps:B,getItemProps:ye}=io([ao(W,{role:"listbox"}),ro(W),op(W,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:j,selectedIndex:j,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Q=>z(oe=>Q??oe)})]);E.useEffect(()=>{const Q=L.reference.current;if(Q)return ma(Q)},[]);const Se=(Q,oe)=>{const be=V.clone(Re=>Re.has(Q.value)?Re.remove(Q.value):Re.set(Q.value,Q));P(be);const X=L.reference.current;if(!X)return;const ce=be.map(Re=>Re.value);X==null||X.setAttribute("data-value",JSON.stringify(ce)),g&&g(ce),F(Re=>Re.concat(Q.label??"")),N(""),z(oe)},Ie=Q=>{const oe=Q.target.value;return N(oe),!I&&oe===""?A(!0):(Q.target.name=h.name||"",oe?A(!0):void 0)},Le=()=>{var Q;A(!0),N(""),(Q=L.reference.current)==null||Q.focus()},ae=()=>{A(!0),N("")},ve=()=>{var Q;(Q=L.reference.current)==null||Q.setAttribute("data-value","[]"),N(""),A(!1),P(new zr),g==null||g([])},K=h.id||h.name,le=V.map((Q,oe)=>x.jsx(Ud,{size:"small",icon:x.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:be=>{be.stopPropagation(),Se(Q,oe)},children:x.jsx(ul,{size:14})}),children:Q.label??Q.value},`MultiSelect-${Q.value}-x`));return x.jsxs(Pa,{...h,left:e,error:t,ref:b,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Le,children:[x.jsx(Rf,{size:20}),x.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),V?x.jsx("button",{type:"button",onClick:ve,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.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:[x.jsx("button",{...ie({...h,onFocus:ae,id:`${K}-shadow`,name:`${K}-shadow`,ref:L.setReference}),type:"button","data-name":K,"data-target":K,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":_.join(","),value:I?O:D||V,className:je("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:x.jsx(s2,{label:c,children:le})}),x.jsx("input",{id:K,name:K,type:"hidden","data-origin":K,ref:v,required:f,defaultValue:h.value||_||void 0}),x.jsx(no,{preserveTabOrder:!0,children:I?x.jsx(hi,{modal:!0,guards:!0,returnFocus:!1,context:W,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...B({ref:L.setFloating,style:{...G.styles,top:U??0,position:Y,left:(Z??0)+(V?26:18)}}),"data-floating":"true",className:"isolate z-floating m-0 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 shadow-floating",children:[x.jsx("input",{autoFocus:!0,value:O,onChange:Ie,title:h.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:Q=>{var oe,be;if(Q.key==="ArrowDown"){let X=j+1;return X>te.length-1&&(X=0),(oe=T.current)==null||oe.scrollIntoView({index:X}),z(X)}if(Q.key==="ArrowUp"){let X=j-1;return X<0&&(X=te.length-1),(be=T.current)==null||be.scrollIntoView({index:X}),z(X)}if(Q.key==="Escape")return Q.currentTarget.blur(),A(!1);if(Q.key==="Enter"){if(j!==null&&te[j])return Q.preventDefault(),Se(te[j],j);if(te.length===1)return Q.preventDefault(),Se(te[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 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"}),ee?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||S.autocompleteEmpty})}):null,ee?null:x.jsx(wp,{ref:T,hidden:ee,data:te,components:a2,style:{height:ee?"0":V.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Q,oe)=>{const be=oe.Render??t2,X=V.has(oe.value)||V.has(oe.label??""),ce=j===Q,Re=oe.label??oe.value;return x.jsxs("button",{"data-value":oe.value,...ye({ref:ze=>void(M.current[Q]=ze),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":oe.disabled,onClick:()=>Se(oe,Q)}),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 ${X||ce?"bg-floating-hover text-floating-foreground":""}`,children:[x.jsx(Ep,{onChange:Lf,checked:X,"aria-checked":X,onClick:ze=>{ze.stopPropagation(),Se(oe,Q)}}),x.jsx(be,{...h,label:oe.label,value:oe.value,children:Re})]})}}),V.size===0?null:x.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:le})]})}):null})]})}),c2=({children:e,className:t="",size:n,...r})=>x.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:[x.jsx("input",{...r,type:"radio",className:je("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]}),Kr=E.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:m,...g},h)=>{const v=_t(),y=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(h,()=>y.current),E.useEffect(()=>{if(y.current===null)return;const w=new AbortController,S=y.current,C=ma(y.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const T=()=>{var w;return(w=y.current)==null?void 0:w.focus()};return x.jsx(Pa,{info:n,left:f,error:m,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:x.jsxs("label",{htmlFor:b,children:[p,x.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Rf,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:x.jsxs("select",{...g,id:b,name:b,value:g.value,required:e,ref:el(h,y),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:je("input select group 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:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${b}-select-option-${w.value}`}))]})})});function T1(e,[t,n]){return Math.min(n,Math.max(t,e))}function ko(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function iy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function E1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=iy(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():iy(e[o],null)}}}}function Zr(...e){return k.useCallback(E1(...e),e)}function C1(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return x.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;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=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,u2(o,...t)]}function u2(...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 k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function k1(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function d2({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=f2({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=k1(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function f2({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=k1(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var p2=k.createContext(void 0);function h2(e){const t=k.useContext(p2);return e||t||"ltr"}function m2(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var g2=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function v2(e){const[t,n]=k.useState(void 0);return g2(()=>{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 Rd(e){const t=y2(e),n=k.forwardRef((r,o)=>{const{children:i,...a}=r,s=k.Children.toArray(i),l=s.find(b2);if(l){const c=l.props.children,u=s.map(d=>d===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:d);return x.jsx(t,{...a,ref:o,children:k.isValidElement(c)?k.cloneElement(c,void 0,u):null})}return x.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function y2(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const a=S2(o),s=w2(i,o.props);return o.type!==k.Fragment&&(s.ref=r?E1(r,a):a),k.cloneElement(o,s)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var x2=Symbol("radix.slottable");function b2(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===x2}function w2(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function S2(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var T2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Pl=T2.reduce((e,t)=>{const n=Rd(`Primitive.${t}`),r=k.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function E2(e){const t=e+"CollectionProvider",[n,r]=C1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,y=E.useRef(null),b=E.useRef(new Map).current;return x.jsx(o,{scope:h,itemMap:b,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=Rd(s),c=E.forwardRef((g,h)=>{const{scope:v,children:y}=g,b=i(s,v),T=Zr(h,b.collectionRef);return x.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=Rd(u),f=E.forwardRef((g,h)=>{const{scope:v,children:y,...b}=g,T=E.useRef(null),w=Zr(h,T),S=i(u,v);return E.useEffect(()=>(S.itemMap.set(T,{ref:T,...b}),()=>void S.itemMap.delete(T))),x.jsx(p,{[d]:"",ref:w,children:y})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((S,C)=>b.indexOf(S.ref.current)-b.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}var R1=["PageUp","PageDown"],P1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],A1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},xi="Slider",[Pd,C2,k2]=E2(xi),[I1,G$]=C1(xi,[k2]),[R2,Al]=I1(xi),_1=k.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:m,...g}=e,h=k.useRef(new Set),v=k.useRef(0),b=a==="horizontal"?P2:A2,[T=[],w]=d2({prop:u,defaultProp:c,onChange:O=>{var V;(V=[...h.current][v.current])==null||V.focus(),d(O)}}),S=k.useRef(T);function C(O){const N=D2(T,O);A(O,N)}function R(O){A(O,v.current)}function I(){const O=S.current[v.current];T[v.current]!==O&&p(T)}function A(O,N,{commit:V}={commit:!1}){const P=L2(i),_=V2(Math.round((O-r)/i)*i+r,P),D=T1(_,[r,o]);w((F=[])=>{const j=O2(F,D,N);if(F2(j,l*i)){v.current=j.indexOf(D);const z=String(j)!==String(F);return z&&V&&p(j),z?j:F}else return F})}return x.jsx(R2,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:T,orientation:a,form:m,children:x.jsx(Pd.Provider,{scope:e.__scopeSlider,children:x.jsx(Pd.Slot,{scope:e.__scopeSlider,children:x.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:ko(g.onPointerDown,()=>{s||(S.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:R,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,T.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:N})=>{if(!s){const _=R1.includes(O.key)||O.shiftKey&&P1.includes(O.key)?10:1,D=v.current,F=T[D],j=i*_*N;A(F+j,D,{commit:!0})}}})})})})});_1.displayName=xi;var[O1,M1]=I1(xi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),P2=k.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=k.useState(null),f=Zr(t,b=>p(b)),m=k.useRef(void 0),g=h2(o),h=g==="ltr",v=h&&!i||!h&&i;function y(b){const T=m.current||d.getBoundingClientRect(),w=[0,T.width],C=Rp(w,v?[n,r]:[r,n]);return m.current=T,C(b-T.left)}return x.jsx(O1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:x.jsx(D1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const T=y(b.clientX);a==null||a(T)},onSlideMove:b=>{const T=y(b.clientX);s==null||s(T)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:b=>{const w=A1[v?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),A2=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=k.useRef(null),d=Zr(t,u),p=k.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],b=Rp(v,f?[r,n]:[n,r]);return p.current=h,b(g-h.top)}return x.jsx(O1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:x.jsx(D1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=A1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),D1=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Al(xi,n);return x.jsx(Pl.span,{...c,ref:t,onKeyDown:ko(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):R1.concat(P1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ko(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:ko(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:ko(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),j1="SliderTrack",N1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Al(j1,n);return x.jsx(Pl.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});N1.displayName=j1;var Ad="SliderRange",F1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Al(Ad,n),i=M1(Ad,n),a=k.useRef(null),s=Zr(t,a),l=o.values.length,c=o.values.map(p=>V1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return x.jsx(Pl.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});F1.displayName=Ad;var Id="SliderThumb",L1=k.forwardRef((e,t)=>{const n=C2(e.__scopeSlider),[r,o]=k.useState(null),i=Zr(t,s=>o(s)),a=k.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return x.jsx(I2,{...e,ref:i,index:a})}),I2=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=Al(Id,n),s=M1(Id,n),[l,c]=k.useState(null),u=Zr(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=v2(l),f=a.values[r],m=f===void 0?0:V1(f,a.min,a.max),g=M2(r,a.values.length),h=p==null?void 0:p[s.size],v=h?j2(h,m,s.direction):0;return k.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),x.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${v}px)`},children:[x.jsx(Pd.ItemSlot,{scope:e.__scopeSlider,children:x.jsx(Pl.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:ko(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&x.jsx(_2,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});L1.displayName=Id;var _2=e=>{const{value:t,...n}=e,r=k.useRef(null),o=m2(t);return k.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),x.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function O2(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function V1(e,t,n){const i=100/(n-t)*(e-t);return T1(i,[0,100])}function M2(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function D2(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 j2(e,t,n){const r=e/2,i=Rp([0,50],[0,r]);return(r-i(t)*n)*n}function N2(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function F2(e,t){if(t>0){const n=N2(e);return Math.min(...n)>=t}return!0}function Rp(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 L2(e){return(String(e).split(".")[1]||"").length}function V2(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var $2=_1,z2=N1,B2=F1,H2=L1;const W2=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));nt.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(nt.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),x.jsx(ip,{title:"",ref:r,as:H2,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},q2=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(ci()),s=r||o||[];return x.jsxs($2,{...i,defaultValue:r,value:o,className:je("relative flex h-5 w-full touch-none select-none items-center",n),children:[x.jsx(z2,{className:"relative h-2 grow rounded-full bg-background",children:x.jsx(B2,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>x.jsx(W2,{tooltip:t??!1},`${a.current}-${c}`))]})},U2=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=Mo(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:je("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.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)}),x.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:x.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"})}),x.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Y2=e=>{const[t,n]=HP();return E.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:GP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},G2=c1("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
196
+ `);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)}),K2=e=>{const[t,n]=E.useState(0);return E.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},Z2={Item:E.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},X2=e=>{const t=E.useRef(null),n=K2(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.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:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Aa,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(wp,{height:n,useWindowScroll:!0,data:e.source,components:Z2,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(Ep,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Oo,{children:x.jsx(Pf,{})})}),x.jsx("div",{})]})};var Q2=Object.defineProperty,ay=Object.getOwnPropertySymbols,J2=Object.prototype.hasOwnProperty,eV=Object.prototype.propertyIsEnumerable,sy=(e,t,n)=>t in e?Q2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tV=(e,t)=>{for(var n in t||(t={}))J2.call(t,n)&&sy(e,n,t[n]);if(ay)for(var n of ay(t))eV.call(t,n)&&sy(e,n,t[n]);return e},Pp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},nV=(e,t,n,r)=>Il(Pp,e,t,n,r),Xo=e=>typeof e=="object",ur=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Xo(e)&&!Xo(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=>ur(e[r],t[r]))},rV=(e,t)=>(Xo(e)||Array.isArray(e))&&t?e[t]:e,oV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Fs=e=>/[0-9.]+/.test(e),ly=e=>["string","number"].includes(typeof e),cy=e=>e==null||(e==null?void 0:e.length)===0||e==="",uy={eq:ur,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:cy,notEmpty:e=>!cy(e),in:(e,t)=>Pp(t,n=>ur(e,n)),notIn:(e,t)=>$1(t,n=>!ur(e,n))},iV=e=>{if(e in uy)return uy[e];throw new Error("Linq - Symbol not found")},Ao=(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},Il=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=iV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},aV=(e,t,n,r)=>Il(Ao,e,t,n,r),$1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},sV=(e,t,n,r)=>Il($1,e,t,n,r),z1=e=>{if(e===null)return null;const t=tV({},e);return Object.keys(t).forEach(n=>t[n]=Xo(e[n])?z1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},dy=(e,t)=>{if(Xo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1},lV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},cV=e=>Ao(e,(t,n,r)=>Xo(t)?n===r.findIndex(o=>ur(o,t)):n===r.indexOf(t)),uV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},B1=(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())},dV=(e,t)=>B1(e,n=>n[t]),fy=(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},fV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},pV=(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 Fs(e)&&Fs(t)?r.map(a=>Number.parseInt(a)):r},wu=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Fs(e)&&Fs(t)){const o=[],[i,a]=fV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return pV(e,t,r)},hV=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?wu(r,o,1):wu(r,i,Number.parseInt(o,10))}return ly(e)&&ly(t)?wu(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Su=(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},py=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},mV=(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)},gV=(e,t,n,r)=>Il(mV,e,t,n,r),hy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(oV(t))},H1=(e=>(e.Asc="asc",e.Desc="desc",e))(H1||{}),vV=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),yV=(e,t)=>e.sort(vV(t)),xV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Ao(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},bV=class _d{constructor(t=[]){this.array=t}static Range(...t){return hV(...t)}static New(t){return new _d(t)}Where(t,n,r){return this.array=aV(this.array,t,n,r),this}Some(t,n,r){return nV(this.array,t,n,r)}All(t,n,r){return sV(this.array,t,n,r)}Reverse(){return this.array=py(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=gV(this.array,t,n,r),this}Distinct(){return this.array=cV(this.array),this}First(t){return t===void 0?this.array[0]:uV(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?Su((n,r)=>n+r,0,this.array):Su((n,r)=>n+rV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return dV(this.array,t)}GroupWith(t){return B1(this.array,t)}Except(t){return Ao(this.array,n=>!dy(t,n))}Intersect(t){return Ao(this.array,n=>dy(t,n))}OrderBy(t,n){let r;return r=t?hy(this.array,t):this.array.toSorted(),this.array=n==="desc"?py(r):r,this}Includes(t){return Pp(this.array,n=>ur(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 Su(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(fy(this.array,n=>[t,n]))}Zip(t,n){return fy(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Ao(this.array,t).length}Get(t){return this.array[t]}Clone(){return new _d(z1(this.array))}ToObject(t){return lV(this.array,t)}Sort(t){return Array.isArray(t)?yV(this.array,t):hy(this.array,t)}Unique(t){return xV(this.array,t)}},W1=bV,Tu={},my;function wV(){return my||(my=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(y){window.console.log(y)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const y=v.getItem(h);try{return JSON.parse(y)}catch{return y??null}},i=h=>Object.keys(h).reduce((v,y)=>({...v,[y]:o(y,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,y={})=>{const b=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,S)=>{const C=S.parse(y);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${b}`]).join(";");document.cookie=T,u()}},f=h=>{const v=new Set,y=b=>{h().removeItem(b);const T=i(h());v.forEach(w=>w(T))};return{delete:y,listener:b=>(v.add(b),()=>v.delete(b)),clearListeners:()=>v.clear(),json:(b=!1)=>b?i(h()):h(),has:b=>{const T=h().getItem(b);return!n(T)},deleteAll:()=>{t(h(),y),v.forEach(b=>b(h()))},get:b=>o(b,h()),set:(b,T)=>{h().setItem(b,JSON.stringify(T)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(Tu)),Tu}var qi=wV();const Ap=e=>e.headerLabel??e.thead??e.id,Ip=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Io=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Io||{});const _p=e=>e.type==="number"?e.valueAsNumber:e.value,SV=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},TV={},EV=(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})},CV=(e,t,n=TV)=>{const r=qr()?null:qi.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Df({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:EV(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return qr()||qi.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},kV=e=>{const t=Mo(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},Od=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??Io.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:ci(),operation:l,label:Ap(e),name:o,type:i,value:"",...r}},Op=()=>{const e=_t(),t=E.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:E.useMemo(()=>({[Io.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Io.Boolean]:[t.is,t.isNot],[Io.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},RV=e=>{const t=_t(),n=Op(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Od(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(m=>u===m.id);return Od(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=_p(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(TA,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Kr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(Kr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Aa,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:x.jsx(Vo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(Af,{size:14})," ",t.tableFilterNewFilter]})})]})})})},PV=({filter:e,onDelete:t,set:n})=>{const r=_t(),o=Op(),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=_p(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Kr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Aa,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Vo,{className:"text-danger",size:14})})]})},AV=({item:e,onPointerDown:t})=>{const n=Lo(0);return x.jsxs($b,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(bA,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},IV=e=>{var l;const t=_t(),n=Ip(e.cols),r=UP(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new W1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(GS(m).map((v,y)=>{const b=m[v];return{...g,groupId:ci(),groupKey:d,index:y,rows:b,groupName:v}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(MA,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Kr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),x.jsx(Oo,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:x.jsx(Vo,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(nE,{children:x.jsx(Vb,{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(c=>x.jsx(AV,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},_V=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),OV=(e,t)=>e.toSorted(_V(t)),q1=(e,t,n)=>({label:t,id:ci(),type:n,value:e.id}),MV=e=>{const t=_t(),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,q1(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 x.jsx(E.Fragment,{children:x.jsx(mi,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Bb,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Kr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Kr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:x.jsx(Vo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Af,{size:14})," ",t.tableSortAddButton]})})]})})})},DV=e=>{const t=_t(),[n,r]=E.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");E.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=q1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Ap(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?x.jsx(sA,{size:14}):null,n==="desc"?x.jsx(iA,{size:14}):null,n==="undefined"?x.jsx(Bb,{size:14}):null]})},jV=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(RV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(MV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(IV,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.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=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.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=_p(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function NV(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 FV=e=>{const t=E.useId(),n=_t(),r=E.useMemo(()=>NV(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return x.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(E.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:x.jsx(E.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(cn,{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?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},LV={top:0,left:0,right:0,bottom:-1},VV=e=>{var g;const t=Tp(),n=_t(),r=e.filters.filter(h=>h.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=Op(),l=o?kA:PA,c=E.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==v))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===H1.Asc?"ascending":"descending":"none",m=Ap(e.header);return x.jsxs($b,{...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-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border-0 font-medium first:table-cell md:table-cell ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[x.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?x.jsx(mi,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),x.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"font-medium",children:m})]}),children:x.jsxs("ul",{className:"font-medium",children:[r.length===0?null:x.jsx(E.Fragment,{children:r.map(h=>x.jsx("li",{className:"my-1",children:x.jsx(PV,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(Od(e.header,s.options,s.operations))),children:[x.jsx(Af,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?x.jsx(DV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:x.jsx(pt.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:LV,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=v.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},$V=e=>{const[t,n]=kV(e.setCols);return x.jsx(Vb,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,className:"text-lg",children:x.jsx(vr,{children:e.headers.map((r,o)=>x.jsx(VV,{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}`))})})},U1=E.createContext({}),zV=()=>E.useContext(U1),BV=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(vr,{children:n.children})})),HV=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse divide-y divide-table-border border-0 text-left ${t??""}`})),WV=E.forwardRef(({context:e,...t},n)=>{const r=zV(),o={...t==null?void 0:t.style,top:nt.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-transparent",ref:n})}),qV=E.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`group table-row ${(n==null?void 0:n.className)??""}`})),UV=E.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),YV={TableHead:WV,Table:HV,TableBody:BV,TableRow:qV,TableFoot:UV},GV=[0,0,0,0,0,0,0,0,0,0],Y1=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),KV=e=>x.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?Y1:x.jsx(E0,{})}),ZV=()=>x.jsx(E.Fragment,{}),XV=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(E.Fragment,{children:r.map((i,a)=>{var d;const s=`${a},${e}`,l=Ff(t,i.id),c=i.Element,u=((d=i.cellProps)==null?void 0:d.className)||"";return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?Y1:c?x.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):x.jsx(E.Fragment,{children:nt.nil(l)?"":l}))})})},QV=()=>x.jsx(E.Fragment,{}),JV=[],gy=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),m=Mo(a),g=Mo(u.loadingMore),h=E.useMemo(()=>{if(u.loading)return GV;if(c)return u.rows;const y=new W1(u.rows);return t.length>0&&t.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:y.Where(b.name,b.operation.symbol,b.value)),r.length===0?y.Select():OV(y.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,b=new IntersectionObserver(T=>{var C;return T[T.length-1].isIntersecting&&g.current?((C=m.current)==null||C.call(m),void f(!0)):f(!1)});return b.observe(y),()=>b.disconnect()},[g,m]);const v=h.length===0;return x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(gF,{useWindowScroll:!0,followOutput:"smooth",components:YV,totalCount:h.length,data:v?JV:h,itemContent:v?ZV:XV,fixedFooterContent:p?QV:null,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx($V,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?x.jsx(KV,{loading:u.loading}):null,x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(FV,{...l}):null]})},e$=(e,t)=>typeof t=="function"?t(e):t,Ja=(e,t,n)=>e===t||n==null?void 0:n(t),t$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Tp(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>Ip(e.cols),[e.cols]),[i,a]=Df({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:e$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),Ja((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),Ja((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),Ja((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),Ja((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return x.jsx(U1.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?x.jsx(jV,{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?x.jsx(gy,{...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}):x.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>x.jsx("div",{className:"min-w-full",children:x.jsx(gy,{...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}`))})]})})},n$=["INPUT","SELECT"],G1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{n$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Eu,vy;function Mp(){if(vy)return Eu;vy=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Eu={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Eu}var Cu,yy;function K1(){if(yy)return Cu;yy=1;var e=Mp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var y=v.pop(),b=y.obj[y.prop];if(n(b)){for(var T=[],w=0;w<b.length;++w)typeof b[w]<"u"&&T.push(b[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var b=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(b[T]=v[T]);return b},a=function h(v,y,b){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(b&&(b.plainObjects||b.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,b)),n(v)&&n(y)?(y.forEach(function(w,S){if(t.call(v,S)){var C=v[S];C&&typeof C=="object"&&w&&typeof w=="object"?v[S]=h(C,w,b):v.push(w)}else v[S]=w}),v):Object.keys(y).reduce(function(w,S){var C=y[S];return t.call(w,S)?w[S]=h(w[S],C,b):w[S]=C,w},T)},s=function(v,y){return Object.keys(y).reduce(function(b,T){return b[T]=y[T],b},v)},l=function(h,v,y){var b=h.replace(/\+/g," ");if(y==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(v,y,b,T,w){if(v.length===0)return v;var S=v;if(typeof v=="symbol"?S=Symbol.prototype.toString.call(v):typeof v!="string"&&(S=String(v)),b==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var C="",R=0;R<S.length;R+=c){for(var I=S.length>=c?S.slice(R,R+c):S,A=[],O=0;O<I.length;++O){var N=I.charCodeAt(O);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){A[A.length]=I.charAt(O);continue}if(N<128){A[A.length]=r[N];continue}if(N<2048){A[A.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){A[A.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}O+=1,N=65536+((N&1023)<<10|I.charCodeAt(O)&1023),A[A.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=A.join("")}return C},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],b=[],T=0;T<y.length;++T)for(var w=y[T],S=w.obj[w.prop],C=Object.keys(S),R=0;R<C.length;++R){var I=C[R],A=S[I];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(y.push({obj:S,prop:I}),b.push(A))}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))},m=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var b=[],T=0;T<v.length;T+=1)b.push(y(v[T]));return b}return y(v)};return Cu={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},Cu}var ku,xy;function r$(){if(xy)return ku;xy=1;var e=HS(),t=K1(),n=Mp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,y,b,T,w,S,C,R,I,A,O,N,V,P,_,D,F){for(var j=h,z=F,M=0,$=!1;(z=z.get(p))!==void 0&&!$;){var J=z.get(h);if(M+=1,typeof J<"u"){if(J===M)throw new RangeError("Cyclic object value");$=!0}typeof z.get(p)>"u"&&(M=0)}if(typeof I=="function"?j=I(v,j):j instanceof Date?j=N(j):y==="comma"&&i(j)&&(j=t.maybeMap(j,function(Ie){return Ie instanceof Date?N(Ie):Ie})),j===null){if(w)return R&&!_?R(v,u.encoder,D,"key",V):v;j=""}if(d(j)||t.isBuffer(j)){if(R){var te=_?v:R(v,u.encoder,D,"key",V);return[P(te)+"="+P(R(j,u.encoder,D,"value",V))]}return[P(v)+"="+P(String(j))]}var ee=[];if(typeof j>"u")return ee;var Z;if(y==="comma"&&i(j))_&&R&&(j=t.maybeMap(j,R)),Z=[{value:j.length>0?j.join(",")||null:void 0}];else if(i(I))Z=I;else{var U=Object.keys(j);Z=A?U.sort(A):U}var Y=C?String(v).replace(/\./g,"%2E"):String(v),L=b&&i(j)&&j.length===1?Y+"[]":Y;if(T&&i(j)&&j.length===0)return L+"[]";for(var W=0;W<Z.length;++W){var G=Z[W],ie=typeof G=="object"&&G&&typeof G.value<"u"?G.value:j[G];if(!(S&&ie===null)){var B=O&&C?String(G).replace(/\./g,"%2E"):String(G),ye=i(j)?typeof y=="function"?y(L,B):L:L+(O?"."+B:"["+B+"]");F.set(h,M);var Se=e();Se.set(p,F),s(ee,g(ie,ye,y,b,T,w,S,C,y==="comma"&&_&&i(j)?null:R,I,A,O,N,V,P,_,D,Se))}}return ee},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");y=h.format}var b=n.formatters[y],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var S=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:S,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:b,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return ku=function(g,h){var v=g,y=m(h),b,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,b=T);var w=[];if(typeof v!="object"||v===null)return"";var S=o[y.arrayFormat],C=S==="comma"&&y.commaRoundTrip;b||(b=Object.keys(v)),y.sort&&b.sort(y.sort);for(var R=e(),I=0;I<b.length;++I){var A=b[I],O=v[A];y.skipNulls&&O===null||s(w,f(O,A,S,C,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,R))}var N=w.join(y.delimiter),V=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?V+="utf8=%26%2310003%3B&":V+="utf8=%E2%9C%93&"),N.length>0?V+N:""},ku}var Ru,by;function o$(){if(by)return Ru;by=1;var e=K1(),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,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=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,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,y=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var b=-1,T,w=m.charset;if(m.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"),b=T,T=y.length);for(T=0;T<y.length;++T)if(T!==b){var S=y[T],C=S.indexOf("]="),R=C===-1?S.indexOf("="):C+1,I,A;R===-1?(I=m.decoder(S,r.decoder,w,"key"),A=m.strictNullHandling?null:""):(I=m.decoder(S.slice(0,R),r.decoder,w,"key"),A=e.maybeMap(i(S.slice(R+1),m,n(g[I])?g[I].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),A&&m.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),S.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var O=t.call(g,I);O&&m.duplicates==="combine"?g[I]=e.combine(g[I],A):(!O||m.duplicates==="last")&&(g[I]=A)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,m,h),b=p.length-1;b>=0;--b){var T,w=p[b];if(w==="[]"&&m.parseArrays)T=m.allowEmptyArrays&&(y===""||m.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=m.plainObjects?{__proto__:null}:{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?S.replace(/%2E/g,"."):S,R=parseInt(C,10);!m.parseArrays&&C===""?T={0:y}:!isNaN(R)&&w!==C&&String(R)===C&&R>=0&&m.parseArrays&&R<=m.arrayLimit?(T=[],T[R]=y):C!=="__proto__"&&(T[C]=y)}y=T}return y},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,S=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;S.push(w)}for(var C=0;g.depth>0&&(T=b.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;S.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");S.push("["+v.slice(T.index)+"]")}return c(S,m,g,h)}},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 m=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 h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,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:m,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 Ru=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var b=v[y],T=u(b,g[b],m,typeof p=="string");h=e.merge(h,T,m)}return m.allowSparse===!0?h:e.compact(h)},Ru}var Pu,wy;function i$(){if(wy)return Pu;wy=1;var e=r$(),t=o$(),n=Mp();return Pu={formats:n,parse:t,stringify:e},Pu}var a$=i$(),He;(function(e){e.assertEqual=o=>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"&&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})(He||(He={}));var Sy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Sy||(Sy={}));const fe=He.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 fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},re=He.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 un 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 un))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.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()}}un.create=e=>new un(e);const da=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.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}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.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 re.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 re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let s$=da;function Md(){return s$}const Dd=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 ue(e,t){const n=Md(),r=Dd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===da?void 0:da].filter(o=>!!o)});e.common.issues.push(r)}class Ht{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 Ce;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 Ht.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 Ce;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 Ce=Object.freeze({status:"aborted"}),Ii=e=>({status:"dirty",value:e}),Gt=e=>({status:"valid",value:e}),Ty=e=>e.status==="aborted",Ey=e=>e.status==="dirty",Qo=e=>e.status==="valid",Ls=e=>typeof Promise<"u"&&e instanceof Promise;function Vs(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Z1(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ge||(ge={}));var _i,Oi;class Ln{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||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Cy=(e,t)=>{if(Qo(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 un(e.common.issues);return this._error=n,this._error}}};function Ae(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)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Ne{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 Ht,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(Ls(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){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)},i=this._parseSync({data:t,path:o.path,parent:o});return Cy(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Qo(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>Qo(i)?{value:i.value}:{issues:o.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==null?void 0:n.errorMap,async:!0},path:(n==null?void 0: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(Ls(o)?o:Promise.resolve(o));return Cy(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:re.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 Kn({schema:this,typeName:Te.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 Hn.create(this,this._def)}nullable(){return Jr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dn.create(this)}promise(){return pa.create(this,this._def)}or(t){return Bs.create([this,t],this._def)}and(t){return Hs.create(this,t,this._def)}transform(t){return new Kn({...Ae(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Gs({...Ae(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new eS({typeName:Te.ZodBranded,type:this,...Ae(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ks({...Ae(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _l.create(this,t)}readonly(){return Zs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const l$=/^c[^\s-]{8,}$/i,c$=/^[0-9a-z]+$/,u$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,d$=/^[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,f$=/^[a-z0-9_-]{21}$/i,p$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,h$=/^[-+]?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)?)??$/,m$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,g$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Au;const v$=/^(?:(?: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])$/,y$=/^(?:(?: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])$/,x$=/^(([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]))$/,b$=/^(([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])$/,w$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,S$=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,X1="((\\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])))",T$=new RegExp(`^${X1}$`);function Q1(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function E$(e){return new RegExp(`^${Q1(e)}$`)}function C$(e){let t=`${X1}T${Q1(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 k$(e,t){return!!((t==="v4"||!t)&&v$.test(e)||(t==="v6"||!t)&&x$.test(e))}function R$(e,t){if(!p$.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||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function P$(e,t){return!!((t==="v4"||!t)&&y$.test(e)||(t==="v6"||!t)&&b$.test(e))}class Bn extends Ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),Ce}const r=new Ht;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:re.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),ue(o,{code:re.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?ue(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")m$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Au||(Au=new RegExp(g$,"u")),Au.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")d$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")f$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")l$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")c$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")u$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:re.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),ue(o,{validation:"regex",code:re.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),ue(o,{code:re.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),ue(o,{code:re.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?C$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?T$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?E$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?h$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?k$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?R$(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?P$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?w$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?S$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):He.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:re.invalid_string,...ge.errToObj(r)})}_addCheck(t){return new Bn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ge.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ge.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ge.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ge.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ge.errToObj(n)})}nonempty(t){return this.min(1,ge.errToObj(t))}trim(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Bn({...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}}Bn.create=e=>{var t;return new Bn({checks:[],typeName:Te.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};function A$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class Xr extends Ne{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)!==fe.number){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),Ce}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:re.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),ue(r,{code:re.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),ue(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?A$(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:re.not_finite,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new Xr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.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"&&He.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)}}Xr.create=e=>new Xr({checks:[],typeName:Te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class Jo extends Ne{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)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Ht;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),ue(r,{code:re.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),ue(r,{code:re.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),ue(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),Ce}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new Jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new Jo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.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}}Jo.create=e=>{var t;return new Jo({checks:[],typeName:Te.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};class jd extends Ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),Ce}return Gt(t.data)}}jd.create=e=>new jd({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class fa extends Ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),Ce}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_date}),Ce}const r=new Ht;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:re.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),ue(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):He.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new fa({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ge.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}}fa.create=e=>new fa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Ae(e)});class Nd extends Ne{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),Ce}return Gt(t.data)}}Nd.create=e=>new Nd({typeName:Te.ZodSymbol,...Ae(e)});class $s extends Ne{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),Ce}return Gt(t.data)}}$s.create=e=>new $s({typeName:Te.ZodUndefined,...Ae(e)});class zs extends Ne{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),Ce}return Gt(t.data)}}zs.create=e=>new zs({typeName:Te.ZodNull,...Ae(e)});class Fd extends Ne{constructor(){super(...arguments),this._any=!0}_parse(t){return Gt(t.data)}}Fd.create=e=>new Fd({typeName:Te.ZodAny,...Ae(e)});class _o extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Gt(t.data)}}_o.create=e=>new _o({typeName:Te.ZodUnknown,...Ae(e)});class gr extends Ne{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),Ce}}gr.create=e=>new gr({typeName:Te.ZodNever,...Ae(e)});class Ld extends Ne{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),Ce}return Gt(t.data)}}Ld.create=e=>new Ld({typeName:Te.ZodVoid,...Ae(e)});class Dn extends Ne{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),Ce;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?re.too_big:re.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&&(ue(n,{code:re.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&&(ue(n,{code:re.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 Ln(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ln(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Dn({...this._def,minLength:{value:t,message:ge.toString(n)}})}max(t,n){return new Dn({...this._def,maxLength:{value:t,message:ge.toString(n)}})}length(t,n){return new Dn({...this._def,exactLength:{value:t,message:ge.toString(n)}})}nonempty(t){return this.min(1,t)}}Dn.create=(e,t)=>new Dn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Ae(t)});function yo(e){if(e instanceof vt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hn.create(yo(r))}return new vt({...e._def,shape:()=>t})}else return e instanceof Dn?new Dn({...e._def,type:yo(e.element)}):e instanceof Hn?Hn.create(yo(e.unwrap())):e instanceof Jr?Jr.create(yo(e.unwrap())):e instanceof Gn?Gn.create(e.items.map(t=>yo(t))):e}class vt extends Ne{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=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ue(c,{code:re.invalid_type,expected:fe.object,received:c.parsedType}),Ce}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gr&&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 Ln(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof gr){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&&(ue(o,{code:re.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 Ln(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=>Ht.mergeObjectSync(r,c)):Ht.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ge.errToObj,new vt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ge.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(t){return new vt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new vt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new vt({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new vt({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new vt({...this._def,shape:()=>n})}deepPartial(){return yo(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new vt({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hn;)i=i._def.innerType;n[r]=i}}),new vt({...this._def,shape:()=>n})}keyof(){return J1(He.objectKeys(this.shape))}}vt.create=(e,t)=>new vt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ae(t)});vt.strictCreate=(e,t)=>new vt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:Te.ZodObject,...Ae(t)});vt.lazycreate=(e,t)=>new vt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ae(t)});class Bs extends Ne{_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 un(s.ctx.common.issues));return ue(n,{code:re.invalid_union,unionErrors:a}),Ce}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 un(l));return ue(n,{code:re.invalid_union,unionErrors:s}),Ce}}get options(){return this._def.options}}Bs.create=(e,t)=>new Bs({options:e,typeName:Te.ZodUnion,...Ae(t)});const zn=e=>e instanceof qs?zn(e.schema):e instanceof Kn?zn(e.innerType()):e instanceof Us?[e.value]:e instanceof Qr?e.options:e instanceof Ys?He.objectValues(e.enum):e instanceof Gs?zn(e._def.innerType):e instanceof $s?[void 0]:e instanceof zs?[null]:e instanceof Hn?[void 0,...zn(e.unwrap())]:e instanceof Jr?[null,...zn(e.unwrap())]:e instanceof eS||e instanceof Zs?zn(e.unwrap()):e instanceof Ks?zn(e._def.innerType):[];class Dp extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),Ce;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ue(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=zn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Dp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ae(r)})}}function Vd(e,t){const n=ar(e),r=ar(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=He.objectKeys(t),i=He.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Vd(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.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=Vd(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Hs extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(Ty(i)||Ty(a))return Ce;const s=Vd(i.value,a.value);return s.valid?((Ey(i)||Ey(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:re.invalid_intersection_types}),Ce)};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}))}}Hs.create=(e,t,n)=>new Hs({left:e,right:t,typeName:Te.ZodIntersection,...Ae(n)});class Gn extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),Ce;if(r.data.length<this._def.items.length)return ue(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:re.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 Ln(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ht.mergeArray(n,a)):Ht.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Gn({...this._def,rest:t})}}Gn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gn({items:e,typeName:Te.ZodTuple,rest:null,...Ae(t)})};class Ws extends Ne{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!==fe.object)return ue(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),Ce;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Ln(r,s,r.path,s)),value:a._parse(new Ln(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ht.mergeObjectAsync(n,o):Ht.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ne?new Ws({keyType:t,valueType:n,typeName:Te.ZodRecord,...Ae(r)}):new Ws({keyType:Bn.create(),valueType:t,typeName:Te.ZodRecord,...Ae(n)})}}class $d extends Ne{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!==fe.map)return ue(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),Ce;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ln(r,s,r.path,[c,"key"])),value:i._parse(new Ln(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 Ce;(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 Ce;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}$d.create=(e,t,n)=>new $d({valueType:t,keyType:e,typeName:Te.ZodMap,...Ae(n)});class ei extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),Ce;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:re.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&&(ue(r,{code:re.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 Ce;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 Ln(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new ei({...this._def,minSize:{value:t,message:ge.toString(n)}})}max(t,n){return new ei({...this._def,maxSize:{value:t,message:ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ei.create=(e,t)=>new ei({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...Ae(t)});class Ui extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),Ce;function r(s,l){return Dd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),da].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function o(s,l){return Dd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),da].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof pa){const s=this;return Gt(async function(...l){const c=new un([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Gt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new un([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new un([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ui({...this._def,args:Gn.create(t).rest(_o.create())})}returns(t){return new Ui({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ui({args:t||Gn.create([]).rest(_o.create()),returns:n||_o.create(),typeName:Te.ZodFunction,...Ae(r)})}}class qs extends Ne{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})}}qs.create=(e,t)=>new qs({getter:e,typeName:Te.ZodLazy,...Ae(t)});class Us extends Ne{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:t.data}}get value(){return this._def.value}}Us.create=(e,t)=>new Us({value:e,typeName:Te.ZodLiteral,...Ae(t)});function J1(e,t){return new Qr({values:e,typeName:Te.ZodEnum,...Ae(t)})}class Qr extends Ne{constructor(){super(...arguments),_i.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:He.joinValues(r),received:n.parsedType,code:re.invalid_type}),Ce}if(Vs(this,_i)||Z1(this,_i,new Set(this._def.values)),!Vs(this,_i).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:re.invalid_enum_value,options:r}),Ce}return Gt(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 Qr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Qr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}_i=new WeakMap;Qr.create=J1;class Ys extends Ne{constructor(){super(...arguments),Oi.set(this,void 0)}_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=He.objectValues(n);return ue(r,{expected:He.joinValues(o),received:r.parsedType,code:re.invalid_type}),Ce}if(Vs(this,Oi)||Z1(this,Oi,new Set(He.getValidEnumValues(this._def.values))),!Vs(this,Oi).has(t.data)){const o=He.objectValues(n);return ue(r,{received:r.data,code:re.invalid_enum_value,options:o}),Ce}return Gt(t.data)}get enum(){return this._def.values}}Oi=new WeakMap;Ys.create=(e,t)=>new Ys({values:e,typeName:Te.ZodNativeEnum,...Ae(t)});class pa extends Ne{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ue(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),Ce;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Gt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}pa.create=(e,t)=>new pa({type:e,typeName:Te.ZodPromise,...Ae(t)});class Kn extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.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=>{ue(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 Ce;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ce:l.status==="dirty"||n.value==="dirty"?Ii(l.value):l});{if(n.value==="aborted")return Ce;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ce:s.status==="dirty"||n.value==="dirty"?Ii(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"?Ce:(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"?Ce:(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(!Qo(a))return a;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=>Qo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);He.assertNever(o)}}Kn.create=(e,t,n)=>new Kn({schema:e,typeName:Te.ZodEffects,effect:t,...Ae(n)});Kn.createWithPreprocess=(e,t,n)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Ae(n)});class Hn extends Ne{_parse(t){return this._getType(t)===fe.undefined?Gt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hn.create=(e,t)=>new Hn({innerType:e,typeName:Te.ZodOptional,...Ae(t)});class Jr extends Ne{_parse(t){return this._getType(t)===fe.null?Gt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jr.create=(e,t)=>new Jr({innerType:e,typeName:Te.ZodNullable,...Ae(t)});class Gs extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Gs.create=(e,t)=>new Gs({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ae(t)});class Ks extends Ne{_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 Ls(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ks.create=(e,t)=>new Ks({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ae(t)});class zd extends Ne{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),Ce}return{status:"valid",value:t.data}}}zd.create=e=>new zd({typeName:Te.ZodNaN,...Ae(e)});class eS extends Ne{_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 _l extends Ne{_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"?Ce:i.status==="dirty"?(n.dirty(),Ii(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"?Ce: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 _l({in:t,out:n,typeName:Te.ZodPipeline})}}class Zs extends Ne{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Qo(o)&&(o.value=Object.freeze(o.value)),o);return Ls(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:Te.ZodReadonly,...Ae(t)});vt.lazycreate;var Te;(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"})(Te||(Te={}));Bn.create;Xr.create;zd.create;Jo.create;jd.create;fa.create;Nd.create;$s.create;zs.create;Fd.create;_o.create;gr.create;Ld.create;Dn.create;vt.create;vt.strictCreate;Bs.create;Dp.create;Hs.create;Gn.create;Ws.create;$d.create;ei.create;Ui.create;qs.create;Us.create;Qr.create;Ys.create;pa.create;Kn.create;Hn.create;Jr.create;Kn.createWithPreprocess;_l.create;const I$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},_$=(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]}}},tS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),hn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):tS(t),o=structuredClone(e);return _$(o,r,n),o},O$=(e,t)=>e.localeCompare(t),Ci={},nS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return rS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=nS(e._def.innerType);return t==="ZodArray"?n??[]:n}},rS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,nS(n)])),oS=(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]=oS(i,o):n[r]=o||i)}return n},M$={sort:O$,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},iS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return a$.parse(n.toString(),M$)},Dr=(e,t)=>tS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),sr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Iu=e=>{const t=e.dataset.target;if(!t)return sr(e);const n=document.querySelector(`[data-origin="${t}"]`);return sr(n||e)},D$={state:{},loading:!1,useOnChange:!1},ky=e=>e.dataset.target||e.name,j$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=qi.LocalStorage.get(t);return I$(n)?n:{}},clear:()=>void qi.LocalStorage.delete(t),set:n=>qi.LocalStorage.set(t,n)}},N$=(e,t,n=D$)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>nt.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??rS(e)??{}),l=E.useCallback(y=>{var I;const b=y.target,T=y.currentTarget;if(b.dataset.optional==="true")return;const S=ky(b),C=Iu(b)||(T?sr(T):""),R=Dr(S,e);if(b.setAttribute("data-initialized","true"),R){const A=R.safeParse(C),O=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(N=>hn(N??{},S,O))}},[]),c=E.useCallback(y=>b=>{const T=b.currentTarget,w=Object.values(i.current).reduce((C,R)=>{var V;const I=R.element,A=R.schema.safeParse(sr(I));if(I.dataset.ignore==="ignore"||A.success)return C;const O=(V=A.error.issues[0])==null?void 0:V.message;I.setAttribute("data-initialized","true");const N=I.dataset.name||I.name||"";return hn(C,N,O)},{}),S=nt.empty(w)?null:w;o(S),console.error(S),y==null||y({form:T,errors:S||{}})},[]),u=(y,b=Ci)=>{const T=Dr(y,e),w=S=>{var R;if(!S)return;const C=S instanceof Date?S.toISOString():S.target.value;s(I=>hn(I,y,C)),(R=b==null?void 0:b.onChange)==null||R.call(b,S)};return{...b,loading:n.loading,name:y,id:y,onChange:w,form:t,date:nt.string(a[y])?new Date(a[y]):a[y],required:b.required??!T.isOptional(),error:r==null?void 0:r[y],ref:S=>{S!==null&&(i.current[y]={element:S,schema:T})}}},d=(y,b=Ci)=>{const T=Dr(y,e);return{...b,name:y,id:y,onChange:S=>{var R;const C=S.target.value;s(I=>hn(I,y,C)),(R=b==null?void 0:b.onChange)==null||R.call(b,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),value:kr(a,y,void 0)||"",required:b.required??!T.isOptional(),ref:S=>S!==null?i.current[y]={element:S,schema:T}:void 0}},p=(y,b=Ci)=>{const T=Dr(y,e);return{...b,name:y,id:y,onChange:S=>{var R;const C=S.target.checked;s(I=>hn(I??{},y,C)),(R=b==null?void 0:b.onChange)==null||R.call(b,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:b.required??!T.isOptional(),ref:S=>S!==null?void(i.current[y]={element:S,schema:T}):void 0}},f=(y,b=Ci)=>{const T=Dr(y,e),w=S=>{var R,I;(R=S.persist)==null||R.call(S);const C=S.target.value;(I=b==null?void 0:b.onChange)==null||I.call(b,S),s(A=>hn(A,y,C))};return{...b,loading:n.loading,name:y,id:y,onChange:w,form:t,onInvalid:l,error:kr(r,y,void 0),required:b.required??!T.isOptional(),value:kr(a,y,void 0)||(b==null?void 0:b.value)||"",type:nt.instance(T,Xr)?"number":(b==null?void 0:b.type)??"text",ref:S=>S===null?void 0:i.current[y]={element:S,schema:T}}},m=(y,b=Ci)=>{const T=Dr(y,e),w=T._def.typeName==="ZodNumber";return{...b,name:y,id:y,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const R=w?C.target.valueAsNumber:C.target.value;(A=b==null?void 0:b.onChange)==null||A.call(b,C),s(O=>hn(O,y,R))},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:b.required??!T.isOptional(),type:w?"number":(b==null?void 0:b.type)??"text",value:kr(a,y,void 0)||(b==null?void 0:b.value)||"",ref:C=>C===null?void 0:void(i.current[y]={element:C,schema:T})}};E.useEffect(()=>{const y=Object.values(i.current).map(T=>{const w=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,S=T.schema.safeParse(sr(w)),C=O=>{var D;const N=ky(O.target);if(!N)return!1;const V=O.target,P=Iu(O.target)||(O.relatedTarget?sr(O.relatedTarget):""),_=T.schema.safeParse(P);if(V.setAttribute("value",P),_.success)return w.setCustomValidity(""),o(F=>{if(nt.null(F))return null;const j=hn(F,N,void 0);return nt.empty(F)||nt.nil(F)||nt.empty(j)?null:j}),!1;if(w.required){const F=((D=_.error.issues[0])==null?void 0:D.message)||"";w.setCustomValidity(F),o(j=>{if(nt.null(j))return null;const z=hn(j,N,F||void 0);return nt.empty(z)?null:z})}return!1},R=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:R.signal});const A=w.dataset.shadow?!1:w.required?!S.success:!1;return{input:T,hasInitialError:A,unsubscribe:()=>R.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const g=y=>b=>{var A;b.preventDefault();const T=b.currentTarget;let w=iS(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(O=>{if(O.tagName==="SELECT"){const N=O;w=hn(w,N.name,N.value)}if(O.tagName==="INPUT"){const N=O,V=Iu(N)||(N?sr(N):"");w=hn(w,N.dataset.target||N.name,V)}});const C=oS(w,a),R=e.safeParse(C),I=()=>{var O;G1(T),(O=n.interceptor)==null||O.clear()};if(R.success){const O=JSON.stringify(R.data);return T.setAttribute("data-json",O),(A=n.interceptor)==null||A.clear(),y==null?void 0:y(b,{form:T,event:b,reset:I,errors:[],success:!0,data:R.data,json:R.data})}return console.group("useForm error"),console.info(R),console.info(R.error.issues),console.error(R.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(b,{form:T,json:w,event:b,reset:I,data:w,success:!1,errors:R.error.issues.map(O=>({message:O.message,path:O.path.map(N=>String(N))}))})},h=y=>Ff(a,y)||"",v=y=>({...y,id:t,name:t});return E.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(a))},[a]),{get:h,input:m,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},F$=e=>e?JSON.parse(e.getAttribute("data-json")):{},L$=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},aS={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},sS={base:"1rem",lg:"1.5rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},lS={normal:"1",navbar:"19",calendar:"2",overlay:"20",tooltip:"13",floating:"21"},V$={name:"dark",zIndex:lS,rounded:aS,spacing:sS,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",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(161,62%,17%)"},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%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",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(0, 0%, 8%)",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%, 33%)",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%)"}}}},$$={rounded:aS,spacing:sS,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:lS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",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%, 35%)",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%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",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(221, 20%, 97%)",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%)"}}}},z$=V$,B$=$$,H$=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...ml,...e.tweaks},parser:e.parser||pl.hsla,map:{...hl,...e.map}}),[e]);return x.jsx(li.Provider,{value:t,children:e.children})},W$=()=>{const e=E.useContext(li);return e?e.parser:pl.hsla};exports.Alert=VA;exports.Autocomplete=LF;exports.Button=Oo;exports.Calendar=T0;exports.Card=Vf;exports.Checkbox=Ep;exports.ColType=Io;exports.Collapse=Ub;exports.ComponentsProvider=H$;exports.Context=li;exports.DatePicker=$F;exports.Dropdown=mi;exports.Empty=E0;exports.Expand=Dj;exports.FileUpload=JL;exports.Form=e2;exports.Input=Aa;exports.InputFeedback=l1;exports.InputField=Pa;exports.Menu=Fj;exports.MenuItem=Nj;exports.Modal=Kj;exports.MultiSelect=l2;exports.Notifications=DM;exports.Polymorph=cn;exports.Radiobox=c2;exports.RenderOnView=zT;exports.Select=Kr;exports.Slider=q2;exports.Stats=jM;exports.Switch=U2;exports.Tab=LM;exports.Table=t$;exports.Tabs=NM;exports.Tag=Ud;exports.TaskList=Y2;exports.Textarea=G2;exports.Timeline=VM;exports.TimelineItem=yl;exports.Toolbar=Zj;exports.Tooltip=ip;exports.TransferList=X2;exports.createColumns=SV;exports.createCssProperties=RO;exports.createDesignTokens=y0;exports.createFormStorage=j$;exports.createOptionCols=Ip;exports.createStyles=EO;exports.createTheme=kO;exports.createTokenStyles=PO;exports.css=je;exports.defaultDarkTheme=z$;exports.defaultLightTheme=B$;exports.defaultTranslations=hl;exports.defaultTweaks=ml;exports.dispatchInput=Gy;exports.formReset=G1;exports.formToJson=iS;exports.getJsonForm=F$;exports.getSchemaShape=Dr;exports.hasVerticalScroll=Ky;exports.initializeInputDataset=ma;exports.isMobile=b0;exports.isReactComponent=NT;exports.isReactFC=FT;exports.isSsr=qr;exports.mergeRefs=el;exports.negate=IO;exports.noop=Lf;exports.parsers=pl;exports.path=Ff;exports.reduceTokens=jr;exports.safeRegex=rd;exports.splitInto=x0;exports.useColorParser=W$;exports.useForm=N$;exports.useLocale=Nf;exports.useNotification=OM;exports.usePrevious=L$;exports.useReactive=Y0;exports.useTablePreferences=CV;exports.useTranslations=_t;exports.uuid=ci;
197
197
  //# sourceMappingURL=index.js.map