@g4rcez/components 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +41 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2189 -2187
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +15 -15
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/core/button.d.ts +41 -11
- package/dist/src/components/core/button.d.ts.map +1 -1
- package/dist/src/components/core/button.js +36 -35
- package/dist/src/components/core/polymorph.d.ts +5 -7
- package/dist/src/components/core/polymorph.d.ts.map +1 -1
- package/dist/src/components/core/tag.d.ts +22 -6
- package/dist/src/components/core/tag.d.ts.map +1 -1
- package/dist/src/components/core/tag.js +21 -20
- package/dist/src/components/display/alert.d.ts +15 -7
- package/dist/src/components/display/alert.d.ts.map +1 -1
- package/dist/src/components/display/alert.js +12 -11
- package/dist/src/components/floating/menu.d.ts +2 -2
- package/dist/src/types.d.ts +3 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +9 -11
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";var pS=Object.defineProperty;var hS=(e,t,n)=>t in e?pS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>hS(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),x=require("react/jsx-runtime"),ga=require("react-dom");function Ay(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=Ay(E),Js=Ay(ga);function Iy(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=Iy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _y(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Iy(e))&&(r&&(r+=" "),r+=t);return r}const Wp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qp=_y,ti=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return qp(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=Wp(u)||Wp(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 qp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Up=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mS(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 zl,Yp;function ni(){return Yp||(Yp=1,zl=TypeError),zl}const gS={},vS=Object.freeze(Object.defineProperty({__proto__:null,default:gS},Symbol.toStringTag,{value:"Module"})),yS=mS(vS);var $l,Gp;function el(){if(Gp)return $l;Gp=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,j=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,P=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||!0)?Symbol.toStringTag:null,_=Object.prototype.propertyIsEnumerable,L=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function N(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||S.call(/e/,U))return U;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var Je=W<0?-A(-W):A(W);if(Je!==W){var at=String(Je),Oe=y.call(U,at.length+1);return b.call(at,ze,"$&_")+"."+b.call(b.call(Oe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(U,ze,"$&_")}var z=yS,M=z.custom,B=Ee(M)?M:null,Q={__proto__:null,double:'"',single:"'"},ee={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};$l=function W(U,ze,Je,at){var Oe=ze||{};if(se(Oe,"quoteStyle")&&!se(Q,Oe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(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=se(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(se(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(se(Oe,"numericSeparator")&&typeof Oe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Cr=Oe.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return _e(U,Oe);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var Zt=String(U);return Cr?N(U,Zt):Zt}if(typeof U=="bigint"){var tr=String(U)+"n";return Cr?N(U,tr):tr}var Ml=typeof Oe.depth>"u"?5:Oe.depth;if(typeof Je>"u"&&(Je=0),Je>=Ml&&Ml>0&&typeof U=="object")return K(U)?"[Array]":"[Object]";var co=Xn(Oe,Je);if(typeof at>"u")at=[];else if(be(at,U)>=0)return"[Circular]";function pn(uo,Ma,fS){if(Ma&&(at=I.call(at),at.push(Ma)),fS){var Hp={depth:Oe.depth};return se(Oe,"quoteStyle")&&(Hp.quoteStyle=Oe.quoteStyle),W(uo,Hp,Je+1,at)}return W(uo,Oe,Je+1,at)}if(typeof U=="function"&&!$(U)){var Np=le(U),Fp=Jn(U,pn);return"[Function"+(Np?": "+Np:" (anonymous)")+"]"+(Fp.length>0?" { "+R.call(Fp,", ")+" }":"")}if(Ee(U)){var Lp=P?b.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(U);return typeof U=="object"&&!P?Ye(Lp):Lp}if(he(U)){for(var wi="<"+w.call(String(U.nodeName)),Dl=U.attributes||[],Oa=0;Oa<Dl.length;Oa++)wi+=" "+Dl[Oa].name+"="+X(Z(Dl[Oa].value),"double",Oe);return wi+=">",U.childNodes&&U.childNodes.length&&(wi+="..."),wi+="</"+w.call(String(U.nodeName))+">",wi}if(K(U)){if(U.length===0)return"[]";var jl=Jn(U,pn);return co&&!Tn(jl)?"["+Qn(jl,co)+"]":"[ "+R.call(jl,", ")+" ]"}if(Y(U)){var Nl=Jn(U,pn);return!("cause"in Error.prototype)&&"cause"in U&&!_.call(U,"cause")?"{ ["+String(U)+"] "+R.call(C.call("[cause]: "+pn(U.cause),Nl),", ")+" }":Nl.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+R.call(Nl,", ")+" }"}if(typeof U=="object"&&er){if(B&&typeof U[B]=="function"&&z)return z(U,{depth:Ml-Je});if(er!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(oe(U)){var Vp=[];return r&&r.call(U,function(uo,Ma){Vp.push(pn(Ma,U,!0)+" => "+pn(uo,U))}),fn("Map",n.call(U),Vp,co)}if(q(U)){var zp=[];return s&&s.call(U,function(uo){zp.push(pn(uo,U))}),fn("Set",a.call(U),zp,co)}if(ue(U))return Ot("WeakMap");if(te(U))return Ot("WeakSet");if(J(U))return Ot("WeakRef");if(H(U))return Ye(pn(Number(U)));if(ke(U))return Ye(pn(O.call(U)));if(ye(U))return Ye(m.call(U));if(ie(U))return Ye(pn(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Up<"u"&&U===Up)return"{ [object globalThis] }";if(!F(U)&&!$(U)){var Fl=Jn(U,pn),$p=L?L(U)===Object.prototype:U instanceof Object||U.constructor===Object,Ll=U instanceof Object?"":"null prototype",Bp=!$p&&D&&Object(U)===U&&D in U?y.call(xe(U),8,-1):Ll?"Object":"",dS=$p||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",Vl=dS+(Bp||Ll?"["+R.call(C.call([],Bp||[],Ll||[]),": ")+"] ":"");return Fl.length===0?Vl+"{}":co?Vl+"{"+Qn(Fl,co)+"}":Vl+"{ "+R.call(Fl,", ")+" }"}return String(U)};function X(W,U,ze){var Je=ze.quoteStyle||U,at=Q[Je];return at+W+at}function Z(W){return b.call(String(W),/"/g,""")}function G(W){return!D||!(typeof W=="object"&&(D in W||typeof W[D]<"u"))}function K(W){return xe(W)==="[object Array]"&&G(W)}function F(W){return xe(W)==="[object Date]"&&G(W)}function $(W){return xe(W)==="[object RegExp]"&&G(W)}function Y(W){return xe(W)==="[object Error]"&&G(W)}function ie(W){return xe(W)==="[object String]"&&G(W)}function H(W){return xe(W)==="[object Number]"&&G(W)}function ye(W){return xe(W)==="[object Boolean]"&&G(W)}function Ee(W){if(P)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!V)return!1;try{return V.call(W),!0}catch{}return!1}function ke(W){if(!W||typeof W!="object"||!O)return!1;try{return O.call(W),!0}catch{}return!1}var Ve=Object.prototype.hasOwnProperty||function(W){return W in this};function se(W,U){return Ve.call(W,U)}function xe(W){return g.call(W)}function le(W){if(W.name)return W.name;var U=v.call(h.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function be(W,U){if(W.indexOf)return W.indexOf(U);for(var ze=0,Je=W.length;ze<Je;ze++)if(W[ze]===U)return ze;return-1}function oe(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function J(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function te(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function he(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function _e(W,U){if(W.length>U.maxStringLength){var ze=W.length-U.maxStringLength,Je="... "+ze+" more character"+(ze>1?"s":"");return _e(y.call(W,0,U.maxStringLength),U)+Je}var at=ee[U.quoteStyle||"single"];at.lastIndex=0;var Oe=b.call(b.call(W,at,"\\$1"),/[\x00-\x1f]/g,Be);return X(Oe,"single",U)}function Be(W){var U=W.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return ze?"\\"+ze:"\\x"+(U<16?"0":"")+T.call(U.toString(16))}function Ye(W){return"Object("+W+")"}function Ot(W){return W+" { ? }"}function fn(W,U,ze,Je){var at=Je?Qn(ze,Je):R.call(ze,", ");return W+" ("+U+") {"+at+"}"}function Tn(W){for(var U=0;U<W.length;U++)if(be(W[U],`
|
|
2
2
|
`)>=0)return!1;return!0}function Xn(W,U){var ze;if(W.indent===" ")ze=" ";else if(typeof W.indent=="number"&&W.indent>0)ze=R.call(Array(W.indent+1)," ");else return null;return{base:ze,prev:R.call(Array(U+1),ze)}}function Qn(W,U){if(W.length===0)return"";var ze=`
|
|
3
3
|
`+U.prev+U.base;return ze+R.call(W,","+ze)+`
|
|
4
|
-
`+U.prev}function Jn(W,U){var ze=K(W),Je=[];if(ze){Je.length=W.length;for(var at=0;at<W.length;at++)Je[at]=se(W,at)?U(W[at],W):""}var Oe=typeof j=="function"?j(W):[],er;if(P){er={};for(var Cr=0;Cr<Oe.length;Cr++)er["$"+Oe[Cr]]=Oe[Cr]}for(var Zt in W)se(W,Zt)&&(ze&&String(Number(Zt))===Zt&&Zt<W.length||P&&er["$"+Zt]instanceof Symbol||(S.call(/[^\w$]/,Zt)?Je.push(U(Zt,W)+": "+U(W[Zt],W)):Je.push(Zt+": "+U(W[Zt],W))));if(typeof j=="function")for(var tr=0;tr<Oe.length;tr++)_.call(W,Oe[tr])&&Je.push("["+U(Oe[tr])+"]: "+U(W[Oe[tr]],W));return Je}return $l}var Bl,Kp;function xS(){if(Kp)return Bl;Kp=1;var e=el(),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 Bl=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},Bl}var Hl,Zp;function My(){return Zp||(Zp=1,Hl=Object),Hl}var Wl,Xp;function bS(){return Xp||(Xp=1,Wl=Error),Wl}var ql,Qp;function wS(){return Qp||(Qp=1,ql=EvalError),ql}var Ul,Jp;function SS(){return Jp||(Jp=1,Ul=RangeError),Ul}var Yl,eh;function TS(){return eh||(eh=1,Yl=ReferenceError),Yl}var Gl,th;function ES(){return th||(th=1,Gl=SyntaxError),Gl}var Kl,nh;function CS(){return nh||(nh=1,Kl=URIError),Kl}var Zl,rh;function RS(){return rh||(rh=1,Zl=Math.abs),Zl}var Xl,oh;function kS(){return oh||(oh=1,Xl=Math.floor),Xl}var Ql,ih;function PS(){return ih||(ih=1,Ql=Math.max),Ql}var Jl,ah;function AS(){return ah||(ah=1,Jl=Math.min),Jl}var ec,sh;function IS(){return sh||(sh=1,ec=Math.pow),ec}var tc,lh;function _S(){return lh||(lh=1,tc=Math.round),tc}var nc,ch;function OS(){return ch||(ch=1,nc=Number.isNaN||function(t){return t!==t}),nc}var rc,uh;function MS(){if(uh)return rc;uh=1;var e=OS();return rc=function(n){return e(n)||n===0?n:n<0?-1:1},rc}var oc,dh;function DS(){return dh||(dh=1,oc=Object.getOwnPropertyDescriptor),oc}var ic,fh;function Dy(){if(fh)return ic;fh=1;var e=DS();if(e)try{e([],"length")}catch{e=null}return ic=e,ic}var ac,ph;function jS(){if(ph)return ac;ph=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ac=e,ac}var sc,hh;function NS(){return hh||(hh=1,sc=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}),sc}var lc,mh;function FS(){if(mh)return lc;mh=1;var e=typeof Symbol<"u"&&Symbol,t=NS();return lc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},lc}var cc,gh;function jy(){return gh||(gh=1,cc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),cc}var uc,vh;function Ny(){if(vh)return uc;vh=1;var e=My();return uc=e.getPrototypeOf||null,uc}var dc,yh;function LS(){if(yh)return dc;yh=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 dc=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},dc}var fc,xh;function tl(){if(xh)return fc;xh=1;var e=LS();return fc=Function.prototype.bind||e,fc}var pc,bh;function Bd(){return bh||(bh=1,pc=Function.prototype.call),pc}var hc,wh;function Fy(){return wh||(wh=1,hc=Function.prototype.apply),hc}var mc,Sh;function VS(){return Sh||(Sh=1,mc=typeof Reflect<"u"&&Reflect&&Reflect.apply),mc}var gc,Th;function zS(){if(Th)return gc;Th=1;var e=tl(),t=Fy(),n=Bd(),r=VS();return gc=r||e.call(n,t),gc}var vc,Eh;function Ly(){if(Eh)return vc;Eh=1;var e=tl(),t=ni(),n=Bd(),r=zS();return vc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},vc}var yc,Ch;function $S(){if(Ch)return yc;Ch=1;var e=Ly(),t=Dy(),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 yc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,yc}var xc,Rh;function BS(){if(Rh)return xc;Rh=1;var e=jy(),t=Ny(),n=$S();return xc=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,xc}var bc,kh;function HS(){if(kh)return bc;kh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=tl();return bc=n.call(e,t),bc}var wc,Ph;function Hd(){if(Ph)return wc;Ph=1;var e,t=My(),n=bS(),r=wS(),o=SS(),i=TS(),a=ES(),s=ni(),l=CS(),c=RS(),u=kS(),d=PS(),p=AS(),f=IS(),m=_S(),g=MS(),h=Function,v=function($){try{return h('"use strict"; return ('+$+").constructor;")()}catch{}},y=Dy(),b=jS(),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=FS()(),C=BS(),R=Ny(),I=jy(),A=Fy(),O=Bd(),j={},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%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":j,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":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($){var D=C(C($));P["%Error.prototype%"]=D}var _=function $(Y){var ie;if(Y==="%AsyncFunction%")ie=v("async function () {}");else if(Y==="%GeneratorFunction%")ie=v("function* () {}");else if(Y==="%AsyncGeneratorFunction%")ie=v("async function* () {}");else if(Y==="%AsyncGenerator%"){var H=$("%AsyncGeneratorFunction%");H&&(ie=H.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ye=$("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return P[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"]},N=tl(),z=HS(),M=N.call(O,Array.prototype.concat),B=N.call(A,Array.prototype.splice),Q=N.call(O,String.prototype.replace),ee=N.call(O,String.prototype.slice),X=N.call(O,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,K=function(Y){var ie=ee(Y,0,1),H=ee(Y,-1);if(ie==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return Q(Y,Z,function(Ee,ke,Ve,se){ye[ye.length]=Ve?Q(se,G,"$1"):ke||Ee}),ye},F=function(Y,ie){var H=Y,ye;if(z(L,H)&&(ye=L[H],H="%"+ye[0]+"%"),z(P,H)){var Ee=P[H];if(Ee===j&&(Ee=_(H)),typeof Ee>"u"&&!ie)throw new s("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ye,name:H,value:Ee}}throw new a("intrinsic "+Y+" does not exist!")};return wc=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(X(/^%?[^%]*%?$/,Y)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=K(Y),ye=H.length>0?H[0]:"",Ee=F("%"+ye+"%",ie),ke=Ee.name,Ve=Ee.value,se=!1,xe=Ee.alias;xe&&(ye=xe[0],B(H,M([0,1],xe)));for(var le=1,be=!0;le<H.length;le+=1){var oe=H[le],ue=ee(oe,0,1),J=ee(oe,-1);if((ue==='"'||ue==="'"||ue==="`"||J==='"'||J==="'"||J==="`")&&ue!==J)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!be)&&(se=!0),ye+="."+oe,ke="%"+ye+"%",z(P,ke))Ve=P[ke];else if(Ve!=null){if(!(oe in Ve)){if(!ie)throw new s("base intrinsic for "+Y+" exists, but the property is not available.");return}if(y&&le+1>=H.length){var q=y(Ve,oe);be=!!q,be&&"get"in q&&!("originalValue"in q.get)?Ve=q.get:Ve=Ve[oe]}else be=z(Ve,oe),Ve=Ve[oe];be&&!se&&(P[ke]=Ve)}}return Ve},wc}var Sc,Ah;function Vy(){if(Ah)return Sc;Ah=1;var e=Hd(),t=Ly(),n=t([e("%String.prototype.indexOf%")]);return Sc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},Sc}var Tc,Ih;function zy(){if(Ih)return Tc;Ih=1;var e=Hd(),t=Vy(),n=el(),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 Tc=!!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},Tc}var Ec,_h;function WS(){if(_h)return Ec;_h=1;var e=Hd(),t=Vy(),n=el(),r=zy(),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 Ec=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,Ec}var Cc,Oh;function qS(){if(Oh)return Cc;Oh=1;var e=ni(),t=el(),n=xS(),r=zy(),o=WS(),i=o||r||n;return Cc=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},Cc}var Mh=e=>Array.isArray(e),Rc=e=>e===void 0,kc=e=>e===null,US=Function.bind.call(Function.call,Object.prototype.toString),YS=e=>!!e&&US(e)==="[object Error]"||e instanceof Error,$y=(e,t)=>e instanceof t,GS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},KS=e=>Object.prototype.toString.call(e)==="[object Date]"&&$y(e,Date),et={array:Mh,date:KS,empty:e=>kc(e)||Rc(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:$y,isError:YS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>kc(e)||Rc(e),null:kc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Mh(e)&&typeof e=="object",primitive:GS,string:e=>typeof e=="string",undefined:Rc},ZS=e=>Object.keys(e),Rr=(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},XS=e=>e.replace(/[^0-9]/g,"");const Wd="-",QS=e=>{const t=eT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Wd);return s[0]===""&&s.length!==1&&s.shift(),By(s,t)||JS(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},By=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?By(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},Dh=/^\[(.+)\]$/,JS=e=>{if(Dh.test(e)){const t=Dh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},eT=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:jh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(tT(o)){_u(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{_u(a,jh(t,i),n,r)})})},jh=(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},tT=e=>e.isThemeGetter,nT=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=":",rT=Mu.length,oT=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+rT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=iT(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},iT=e=>e.endsWith(Ou)?e.substring(0,e.length-1):e.startsWith(Ou)?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}},sT=e=>({cache:nT(e.cacheSize),parseClassName:oT(e),sortModifiers:aT(e),...QS(e)}),lT=/\s+/,cT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(lT);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 uT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Hy(t))&&(r&&(r+=" "),r+=n);return r}const Hy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Hy(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=sT(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=cT(l,n);return o(l,u),u}return function(){return i(uT.apply(null,arguments))}}const At=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Wy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fT=/^\d+\/\d+$/,pT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hT=/\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$/,mT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=e=>fT.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),kr=e=>!!e&&Number.isInteger(Number(e)),Nh=e=>e.endsWith("%")&&Le(e.slice(0,-1)),nr=e=>pT.test(e),yT=()=>!0,xT=e=>hT.test(e)&&!mT.test(e),qd=()=>!1,bT=e=>gT.test(e),wT=e=>vT.test(e),ST=e=>!me(e)&&!ge(e),TT=e=>ri(e,Gy,qd),me=e=>Wy.test(e),Pr=e=>ri(e,Ky,xT),Pc=e=>ri(e,DT,Le),ET=e=>ri(e,Uy,qd),CT=e=>ri(e,Yy,wT),RT=e=>ri(e,qd,bT),ge=e=>qy.test(e),Da=e=>oi(e,Ky),kT=e=>oi(e,jT),PT=e=>oi(e,Uy),AT=e=>oi(e,Gy),IT=e=>oi(e,Yy),_T=e=>oi(e,NT,!0),ri=(e,t,n)=>{const r=Wy.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},oi=(e,t,n=!1)=>{const r=qy.exec(e);return r?r[1]?t(r[1]):n:!1},Uy=e=>e==="position",OT=new Set(["image","url"]),Yy=e=>OT.has(e),MT=new Set(["length","size","percentage"]),Gy=e=>MT.has(e),Ky=e=>e==="length",DT=e=>e==="number",jT=e=>e==="family-name",NT=e=>e==="shadow",FT=()=>{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=()=>[ge,me,l],C=()=>[fo,"full","auto",...S()],R=()=>[kr,"none","subgrid",ge,me],I=()=>["auto",{span:["full",kr,ge,me]},ge,me],A=()=>[kr,"auto",ge,me],O=()=>["auto","min","max","fr",ge,me],j=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],P=()=>["auto",...S()],D=()=>[fo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],_=()=>[e,ge,me],L=()=>[Nh,Pr],N=()=>["","none","full",c,ge,me],z=()=>["",Le,Da,Pr],M=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["","none",f,ge,me],ee=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,me],X=()=>["none",Le,ge,me],Z=()=>["none",Le,ge,me],G=()=>[Le,ge,me],K=()=>[fo,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nr],breakpoint:[nr],color:[yT],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[ST],"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",Le],text:[nr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fo,me,ge,g]}],container:["container"],columns:[{columns:[Le,me,ge,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(),me,ge]}],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:[kr,"auto",ge,me]}],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:[Le,fo,"auto","initial","none",me]}],grow:[{grow:["",Le,ge,me]}],shrink:[{shrink:["",Le,ge,me]}],order:[{order:[kr,"first","last","none",ge,me]}],"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:[...j(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":j()}],"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:D()}],w:[{w:[s,"screen",...D()]}],"min-w":[{"min-w":[s,"screen","none",...D()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen",...D()]}],"min-h":[{"min-h":["screen","none",...D()]}],"max-h":[{"max-h":["screen",...D()]}],"font-size":[{text:["base",n,Da,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Pc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nh,me]}],"font-family":[{font:[kT,me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[Le,"none",ge,Pc]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ge,Pr]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Le,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),PT,ET]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",AT,TT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kr,ge,me],radial:["",ge,me],conic:[kr,ge,me]},IT,CT]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"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:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ge,me]}],"outline-w":[{outline:["",Le,Da,Pr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,_T,RT]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",ge,me,d]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Le,Pr]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":_()}],opacity:[{opacity:[Le,ge,me]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none",ge,me]}],blur:[{blur:Q()}],brightness:[{brightness:[Le,ge,me]}],contrast:[{contrast:[Le,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,me]}],grayscale:[{grayscale:["",Le,ge,me]}],"hue-rotate":[{"hue-rotate":[Le,ge,me]}],invert:[{invert:["",Le,ge,me]}],saturate:[{saturate:[Le,ge,me]}],sepia:[{sepia:["",Le,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Le,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ge,me]}],"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",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ge,me]}],ease:[{ease:["linear","initial",h,ge,me]}],delay:[{delay:[Le,ge,me]}],animate:[{animate:["none",v,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ge,me]}],"perspective-origin":[{"perspective-origin":ee()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:ee()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",ge,me]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Le,Da,Pr,Pc]}],stroke:[{stroke:["none",..._()]}],"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","*","**"]}},LT=dT(FT),ii=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},VT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),zT=e=>et.function(e),Ne=(...e)=>LT(_y(e)),Zy=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},va=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Xy=e=>e.scrollHeight>e.clientHeight,Gi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},$T="span",cn=E.forwardRef(function(t,n){const r=t.as||$T;return x.jsx(r,{ref:n,...t,as:void 0})}),BT=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:Ne(BT({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 HT(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 WT=({children:e,...t})=>{const n=Mo(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:HT(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})},qT=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"}}}),UT=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:Ne(UT({size:a,theme:i}),t),children:[n?x.jsx("span",{"aria-hidden":"true",className:qT({theme:n})}):null,r,s.children]})}),Ki=E.createContext({});function bn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yd=typeof window<"u",nl=Yd?E.useLayoutEffect:E.useEffect,rl=E.createContext(null),Do=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class YT 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 GT({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(`
|
|
4
|
+
`+U.prev}function Jn(W,U){var ze=K(W),Je=[];if(ze){Je.length=W.length;for(var at=0;at<W.length;at++)Je[at]=se(W,at)?U(W[at],W):""}var Oe=typeof j=="function"?j(W):[],er;if(P){er={};for(var Cr=0;Cr<Oe.length;Cr++)er["$"+Oe[Cr]]=Oe[Cr]}for(var Zt in W)se(W,Zt)&&(ze&&String(Number(Zt))===Zt&&Zt<W.length||P&&er["$"+Zt]instanceof Symbol||(S.call(/[^\w$]/,Zt)?Je.push(U(Zt,W)+": "+U(W[Zt],W)):Je.push(Zt+": "+U(W[Zt],W))));if(typeof j=="function")for(var tr=0;tr<Oe.length;tr++)_.call(W,Oe[tr])&&Je.push("["+U(Oe[tr])+"]: "+U(W[Oe[tr]],W));return Je}return $l}var Bl,Kp;function xS(){if(Kp)return Bl;Kp=1;var e=el(),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 Bl=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},Bl}var Hl,Zp;function My(){return Zp||(Zp=1,Hl=Object),Hl}var Wl,Xp;function bS(){return Xp||(Xp=1,Wl=Error),Wl}var ql,Qp;function wS(){return Qp||(Qp=1,ql=EvalError),ql}var Ul,Jp;function SS(){return Jp||(Jp=1,Ul=RangeError),Ul}var Yl,eh;function TS(){return eh||(eh=1,Yl=ReferenceError),Yl}var Gl,th;function ES(){return th||(th=1,Gl=SyntaxError),Gl}var Kl,nh;function CS(){return nh||(nh=1,Kl=URIError),Kl}var Zl,rh;function RS(){return rh||(rh=1,Zl=Math.abs),Zl}var Xl,oh;function kS(){return oh||(oh=1,Xl=Math.floor),Xl}var Ql,ih;function PS(){return ih||(ih=1,Ql=Math.max),Ql}var Jl,ah;function AS(){return ah||(ah=1,Jl=Math.min),Jl}var ec,sh;function IS(){return sh||(sh=1,ec=Math.pow),ec}var tc,lh;function _S(){return lh||(lh=1,tc=Math.round),tc}var nc,ch;function OS(){return ch||(ch=1,nc=Number.isNaN||function(t){return t!==t}),nc}var rc,uh;function MS(){if(uh)return rc;uh=1;var e=OS();return rc=function(n){return e(n)||n===0?n:n<0?-1:1},rc}var oc,dh;function DS(){return dh||(dh=1,oc=Object.getOwnPropertyDescriptor),oc}var ic,fh;function Dy(){if(fh)return ic;fh=1;var e=DS();if(e)try{e([],"length")}catch{e=null}return ic=e,ic}var ac,ph;function jS(){if(ph)return ac;ph=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ac=e,ac}var sc,hh;function NS(){return hh||(hh=1,sc=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}),sc}var lc,mh;function FS(){if(mh)return lc;mh=1;var e=typeof Symbol<"u"&&Symbol,t=NS();return lc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},lc}var cc,gh;function jy(){return gh||(gh=1,cc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),cc}var uc,vh;function Ny(){if(vh)return uc;vh=1;var e=My();return uc=e.getPrototypeOf||null,uc}var dc,yh;function LS(){if(yh)return dc;yh=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 dc=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},dc}var fc,xh;function tl(){if(xh)return fc;xh=1;var e=LS();return fc=Function.prototype.bind||e,fc}var pc,bh;function Bd(){return bh||(bh=1,pc=Function.prototype.call),pc}var hc,wh;function Fy(){return wh||(wh=1,hc=Function.prototype.apply),hc}var mc,Sh;function VS(){return Sh||(Sh=1,mc=typeof Reflect<"u"&&Reflect&&Reflect.apply),mc}var gc,Th;function zS(){if(Th)return gc;Th=1;var e=tl(),t=Fy(),n=Bd(),r=VS();return gc=r||e.call(n,t),gc}var vc,Eh;function Ly(){if(Eh)return vc;Eh=1;var e=tl(),t=ni(),n=Bd(),r=zS();return vc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},vc}var yc,Ch;function $S(){if(Ch)return yc;Ch=1;var e=Ly(),t=Dy(),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 yc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,yc}var xc,Rh;function BS(){if(Rh)return xc;Rh=1;var e=jy(),t=Ny(),n=$S();return xc=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,xc}var bc,kh;function HS(){if(kh)return bc;kh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=tl();return bc=n.call(e,t),bc}var wc,Ph;function Hd(){if(Ph)return wc;Ph=1;var e,t=My(),n=bS(),r=wS(),o=SS(),i=TS(),a=ES(),s=ni(),l=CS(),c=RS(),u=kS(),d=PS(),p=AS(),f=IS(),m=_S(),g=MS(),h=Function,v=function($){try{return h('"use strict"; return ('+$+").constructor;")()}catch{}},y=Dy(),b=jS(),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=FS()(),C=BS(),R=Ny(),I=jy(),A=Fy(),O=Bd(),j={},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%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":j,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":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($){var D=C(C($));P["%Error.prototype%"]=D}var _=function $(Y){var ie;if(Y==="%AsyncFunction%")ie=v("async function () {}");else if(Y==="%GeneratorFunction%")ie=v("function* () {}");else if(Y==="%AsyncGeneratorFunction%")ie=v("async function* () {}");else if(Y==="%AsyncGenerator%"){var H=$("%AsyncGeneratorFunction%");H&&(ie=H.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ye=$("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return P[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"]},N=tl(),z=HS(),M=N.call(O,Array.prototype.concat),B=N.call(A,Array.prototype.splice),Q=N.call(O,String.prototype.replace),ee=N.call(O,String.prototype.slice),X=N.call(O,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,K=function(Y){var ie=ee(Y,0,1),H=ee(Y,-1);if(ie==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return Q(Y,Z,function(Ee,ke,Ve,se){ye[ye.length]=Ve?Q(se,G,"$1"):ke||Ee}),ye},F=function(Y,ie){var H=Y,ye;if(z(L,H)&&(ye=L[H],H="%"+ye[0]+"%"),z(P,H)){var Ee=P[H];if(Ee===j&&(Ee=_(H)),typeof Ee>"u"&&!ie)throw new s("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ye,name:H,value:Ee}}throw new a("intrinsic "+Y+" does not exist!")};return wc=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(X(/^%?[^%]*%?$/,Y)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=K(Y),ye=H.length>0?H[0]:"",Ee=F("%"+ye+"%",ie),ke=Ee.name,Ve=Ee.value,se=!1,xe=Ee.alias;xe&&(ye=xe[0],B(H,M([0,1],xe)));for(var le=1,be=!0;le<H.length;le+=1){var oe=H[le],ue=ee(oe,0,1),J=ee(oe,-1);if((ue==='"'||ue==="'"||ue==="`"||J==='"'||J==="'"||J==="`")&&ue!==J)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!be)&&(se=!0),ye+="."+oe,ke="%"+ye+"%",z(P,ke))Ve=P[ke];else if(Ve!=null){if(!(oe in Ve)){if(!ie)throw new s("base intrinsic for "+Y+" exists, but the property is not available.");return}if(y&&le+1>=H.length){var q=y(Ve,oe);be=!!q,be&&"get"in q&&!("originalValue"in q.get)?Ve=q.get:Ve=Ve[oe]}else be=z(Ve,oe),Ve=Ve[oe];be&&!se&&(P[ke]=Ve)}}return Ve},wc}var Sc,Ah;function Vy(){if(Ah)return Sc;Ah=1;var e=Hd(),t=Ly(),n=t([e("%String.prototype.indexOf%")]);return Sc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},Sc}var Tc,Ih;function zy(){if(Ih)return Tc;Ih=1;var e=Hd(),t=Vy(),n=el(),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 Tc=!!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},Tc}var Ec,_h;function WS(){if(_h)return Ec;_h=1;var e=Hd(),t=Vy(),n=el(),r=zy(),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 Ec=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,Ec}var Cc,Oh;function qS(){if(Oh)return Cc;Oh=1;var e=ni(),t=el(),n=xS(),r=zy(),o=WS(),i=o||r||n;return Cc=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},Cc}var Mh=e=>Array.isArray(e),Rc=e=>e===void 0,kc=e=>e===null,US=Function.bind.call(Function.call,Object.prototype.toString),YS=e=>!!e&&US(e)==="[object Error]"||e instanceof Error,$y=(e,t)=>e instanceof t,GS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},KS=e=>Object.prototype.toString.call(e)==="[object Date]"&&$y(e,Date),et={array:Mh,date:KS,empty:e=>kc(e)||Rc(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:$y,isError:YS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>kc(e)||Rc(e),null:kc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Mh(e)&&typeof e=="object",primitive:GS,string:e=>typeof e=="string",undefined:Rc},ZS=e=>Object.keys(e),Rr=(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},XS=e=>e.replace(/[^0-9]/g,"");const Wd="-",QS=e=>{const t=eT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Wd);return s[0]===""&&s.length!==1&&s.shift(),By(s,t)||JS(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},By=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?By(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},Dh=/^\[(.+)\]$/,JS=e=>{if(Dh.test(e)){const t=Dh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},eT=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:jh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(tT(o)){_u(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{_u(a,jh(t,i),n,r)})})},jh=(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},tT=e=>e.isThemeGetter,nT=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=":",rT=Mu.length,oT=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+rT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=iT(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},iT=e=>e.endsWith(Ou)?e.substring(0,e.length-1):e.startsWith(Ou)?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}},sT=e=>({cache:nT(e.cacheSize),parseClassName:oT(e),sortModifiers:aT(e),...QS(e)}),lT=/\s+/,cT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(lT);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 uT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Hy(t))&&(r&&(r+=" "),r+=n);return r}const Hy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Hy(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=sT(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=cT(l,n);return o(l,u),u}return function(){return i(uT.apply(null,arguments))}}const At=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Wy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fT=/^\d+\/\d+$/,pT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hT=/\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$/,mT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=e=>fT.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),kr=e=>!!e&&Number.isInteger(Number(e)),Nh=e=>e.endsWith("%")&&Le(e.slice(0,-1)),nr=e=>pT.test(e),yT=()=>!0,xT=e=>hT.test(e)&&!mT.test(e),qd=()=>!1,bT=e=>gT.test(e),wT=e=>vT.test(e),ST=e=>!me(e)&&!ge(e),TT=e=>ri(e,Gy,qd),me=e=>Wy.test(e),Pr=e=>ri(e,Ky,xT),Pc=e=>ri(e,DT,Le),ET=e=>ri(e,Uy,qd),CT=e=>ri(e,Yy,wT),RT=e=>ri(e,qd,bT),ge=e=>qy.test(e),Da=e=>oi(e,Ky),kT=e=>oi(e,jT),PT=e=>oi(e,Uy),AT=e=>oi(e,Gy),IT=e=>oi(e,Yy),_T=e=>oi(e,NT,!0),ri=(e,t,n)=>{const r=Wy.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},oi=(e,t,n=!1)=>{const r=qy.exec(e);return r?r[1]?t(r[1]):n:!1},Uy=e=>e==="position",OT=new Set(["image","url"]),Yy=e=>OT.has(e),MT=new Set(["length","size","percentage"]),Gy=e=>MT.has(e),Ky=e=>e==="length",DT=e=>e==="number",jT=e=>e==="family-name",NT=e=>e==="shadow",FT=()=>{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=()=>[ge,me,l],C=()=>[fo,"full","auto",...S()],R=()=>[kr,"none","subgrid",ge,me],I=()=>["auto",{span:["full",kr,ge,me]},ge,me],A=()=>[kr,"auto",ge,me],O=()=>["auto","min","max","fr",ge,me],j=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],P=()=>["auto",...S()],D=()=>[fo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],_=()=>[e,ge,me],L=()=>[Nh,Pr],N=()=>["","none","full",c,ge,me],z=()=>["",Le,Da,Pr],M=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["","none",f,ge,me],ee=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,me],X=()=>["none",Le,ge,me],Z=()=>["none",Le,ge,me],G=()=>[Le,ge,me],K=()=>[fo,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nr],breakpoint:[nr],color:[yT],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[ST],"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",Le],text:[nr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fo,me,ge,g]}],container:["container"],columns:[{columns:[Le,me,ge,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(),me,ge]}],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:[kr,"auto",ge,me]}],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:[Le,fo,"auto","initial","none",me]}],grow:[{grow:["",Le,ge,me]}],shrink:[{shrink:["",Le,ge,me]}],order:[{order:[kr,"first","last","none",ge,me]}],"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:[...j(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":j()}],"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:D()}],w:[{w:[s,"screen",...D()]}],"min-w":[{"min-w":[s,"screen","none",...D()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen",...D()]}],"min-h":[{"min-h":["screen","none",...D()]}],"max-h":[{"max-h":["screen",...D()]}],"font-size":[{text:["base",n,Da,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Pc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nh,me]}],"font-family":[{font:[kT,me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[Le,"none",ge,Pc]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ge,Pr]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Le,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),PT,ET]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",AT,TT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kr,ge,me],radial:["",ge,me],conic:[kr,ge,me]},IT,CT]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"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:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ge,me]}],"outline-w":[{outline:["",Le,Da,Pr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,_T,RT]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",ge,me,d]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Le,Pr]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":_()}],opacity:[{opacity:[Le,ge,me]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none",ge,me]}],blur:[{blur:Q()}],brightness:[{brightness:[Le,ge,me]}],contrast:[{contrast:[Le,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,me]}],grayscale:[{grayscale:["",Le,ge,me]}],"hue-rotate":[{"hue-rotate":[Le,ge,me]}],invert:[{invert:["",Le,ge,me]}],saturate:[{saturate:[Le,ge,me]}],sepia:[{sepia:["",Le,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Le,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ge,me]}],"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",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ge,me]}],ease:[{ease:["linear","initial",h,ge,me]}],delay:[{delay:[Le,ge,me]}],animate:[{animate:["none",v,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ge,me]}],"perspective-origin":[{"perspective-origin":ee()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:ee()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",ge,me]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Le,Da,Pr,Pc]}],stroke:[{stroke:["none",..._()]}],"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","*","**"]}},LT=dT(FT),ii=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},VT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),zT=e=>et.function(e),Ne=(...e)=>LT(_y(e)),Zy=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},va=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Xy=e=>e.scrollHeight>e.clientHeight,Gi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},$T="span",cn=E.forwardRef(function(t,n){const r=t.as||$T;return x.jsx(r,{ref:n,...t,as:void 0})}),BT={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"}},HT=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:BT,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:Ne(HT({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 WT(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 qT=({children:e,...t})=>{const n=Mo(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:WT(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})},UT=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"}}}),YT={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"}},GT=ti("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:YT,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:Ne(GT({size:a,theme:i}),t),children:[n?x.jsx("span",{"aria-hidden":"true",className:UT({theme:n})}):null,r,s.children]})}),Ki=E.createContext({});function bn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yd=typeof window<"u",nl=Yd?E.useLayoutEffect:E.useEffect,rl=E.createContext(null),Do=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class KT 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 ZT({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]),x.jsx(YT,{isPresent:t,childRef:o,sizeRef:i,children:k.cloneElement(e,{ref:o})})}const KT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(ZT),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(GT,{isPresent:n,anchorX:s,children:e})),x.jsx(rl.Provider,{value:d,children:e})};function ZT(){return new Map}function Qy(e=!0){const t=E.useContext(rl);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 ja=e=>e.key||"";function Fh(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]=Qy(a),u=E.useMemo(()=>Fh(e),[e]),d=a&&!l?[]:u.map(ja),p=E.useRef(!0),f=E.useRef(u),m=bn(()=>new Map),[g,h]=E.useState(u),[v,y]=E.useState(u);nl(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const S=ja(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=ja(C);d.includes(R)||(w.splice(S,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),y(Fh(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(Ki);return x.jsx(x.Fragment,{children:v.map(w=>{const S=ja(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(KT,{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)})})},XT=E.createContext(null),Yt=e=>e;let ai=Yt,dn=Yt;process.env.NODE_ENV!=="production"&&(ai=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},dn=(e,t)=>{if(!e)throw new Error(t)});const QT={useManualTiming:!1},Na=["read","resolveKeyframes","update","preRender","render","postRender"];function JT(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 eE=40;function Jy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Na.reduce((v,y)=>(v[y]=JT(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,eE),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:Na.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<Na.length;y++)a[Na[y]].cancel(v)},state:o,steps:a}}const{schedule:nt,cancel:Wn,state:Mt,steps:Ac}=Jy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);function tE(){const e=E.useRef(!1);return nl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function nE(){const e=tE(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>nt.postRender(r),[r]),t]}const rE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Lh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(rE);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 ex=e=>e===!0,oE=e=>ex(e===!0)||e==="id",iE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Ki),o=E.useContext(XT),[i,a]=nE(),s=E.useRef(null),l=r.id||o;s.current===null&&(oE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:ex(n)&&r.group||Lh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx(Ki.Provider,{value:c,children:e})},tx=E.createContext({strict:!1}),Vh={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 Vh)jo[e]={isEnabled:t=>Vh[e].some(n=>!!t[n])};function aE(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const sE=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 ds(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||sE.has(e)}let nx=e=>!ds(e);function rx(e){e&&(nx=t=>t.startsWith("on")?!ds(t):e(t))}try{rx(require("@emotion/is-prop-valid").default)}catch{}function lE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(nx(o)||n===!0&&ds(o)||!t&&!ds(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function cE({children:e,isValidProp:t,...n}){t&&rx(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 zh=new Set;function ol(e,t,n){e||zh.has(t)||(console.warn(t),zh.add(t))}function uE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&ol(!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 il=E.createContext({});function al(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Zi(e){return typeof e=="string"||Array.isArray(e)}const Gd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kd=["initial",...Gd];function sl(e){return al(e.animate)||Kd.some(t=>Zi(e[t]))}function ox(e){return!!(sl(e)||e.variants)}function dE(e,t){if(sl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Zi(n)?n:void 0,animate:Zi(r)?r:void 0}}return e.inherit!==!1?t:{}}function fE(e){const{initial:t,animate:n}=dE(e,E.useContext(il));return E.useMemo(()=>({initial:t,animate:n}),[$h(t),$h(n)])}function $h(e){return Array.isArray(e)?e.join(" "):e}const pE=Symbol.for("motionComponentSymbol");function xo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function hE(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}=Jy(queueMicrotask,!1),Xd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),mE="framerAppearId",ix="data-"+Xd(mE),ax=E.createContext({});function gE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(il),l=E.useContext(tx),c=E.useContext(rl),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(ax);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&vE(d.current,n,o,f);const m=E.useRef(!1);E.useInsertionEffect(()=>{p&&m.current&&p.update(n,c)});const g=n[ix],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 nl(()=>{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 vE(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:sx(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 sx(e){if(e)return e.options.allowProjection!==!1?e.projection:sx(e.parent)}function yE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&aE(e);function s(c,u){let d;const p={...E.useContext(Do),...c,layoutId:xE(c)},{isStatic:f}=p,m=fE(c),g=r(c,f);if(!f&&Yd){bE(p,e);const h=wE(p);d=h.MeasureLayout,m.visualElement=gE(o,g,p,t,h.ProjectionNode)}return x.jsxs(il.Provider,{value:m,children:[d&&m.visualElement?x.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,c,hE(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[pE]=o,l}function xE({layoutId:e}){const t=E.useContext(Ki).id;return t&&e!==void 0?t+"-"+e:e}function bE(e,t){const n=E.useContext(tx).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ai(!1,r):dn(!1,r)}}function wE(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 lx=e=>t=>typeof t=="string"&&t.startsWith(e),Qd=lx("--"),SE=lx("var(--"),Jd=e=>SE(e)?TE.test(e.split("/*")[0].trim()):!1,TE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xi={};function EE(e){for(const t in e)Xi[t]=e[t],Qd(t)&&(Xi[t].isCSSVariable=!0)}const si=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],eo=new Set(si);function cx(e,{layout:t,layoutId:n}){return eo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xi[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),ux=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,li={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Qi={...li,transform:e=>qn(0,1,e)},Fa={...li,default:1},ya=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),or=ya("deg"),_n=ya("%"),Se=ya("px"),CE=ya("vh"),RE=ya("vw"),Bh={..._n,parse:e=>_n.parse(e)/100,transform:e=>_n.transform(e*100)},kE={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se},PE={rotate:or,rotateX:or,rotateY:or,rotateZ:or,scale:Fa,scaleX:Fa,scaleY:Fa,scaleZ:Fa,skew:or,skewX:or,skewY:or,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:Qi,originX:Bh,originY:Bh,originZ:Se},Hh={...li,transform:Math.round},ef={...kE,...PE,zIndex:Hh,size:Se,fillOpacity:Qi,strokeOpacity:Qi,numOctaves:Hh},AE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},IE=si.length;function _E(e,t,n){let r="",o=!0;for(let i=0;i<IE;i++){const a=si[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=ux(s,ef[a]);if(!l){o=!1;const u=AE[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=ux(c,ef[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=_E(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 dx(e,t,n){for(const r in t)!Pt(t[r])&&!cx(r,n)&&(e[r]=t[r])}function OE({transformTemplate:e},t){return E.useMemo(()=>{const n=nf();return tf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ME(e,t){const n=e.style||{},r={};return dx(r,n,e),Object.assign(r,OE(e,t)),r}function DE(e,t){const n={},r=ME(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 jE=["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:!!(jE.indexOf(e)>-1||/[A-Z]/u.test(e))}const NE={offset:"stroke-dashoffset",array:"stroke-dasharray"},FE={offset:"strokeDashoffset",array:"strokeDasharray"};function LE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?NE:FE;e[i.offset]=Se.transform(-r);const a=Se.transform(t),s=Se.transform(n);e[i.array]=`${a} ${s}`}function Wh(e,t,n){return typeof e=="string"?e:Se.transform(t+n*e)}function VE(e,t,n){const r=Wh(t,e.x,e.width),o=Wh(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=VE(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&&LE(p,a,s,l,!1)}const fx=()=>({...nf(),attrs:{}}),af=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zE(e,t,n,r){const o=E.useMemo(()=>{const i=fx();return of(i,t,af(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};dx(i,e.style,e),o.style={...i,...o.style}}return o}function $E(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(rf(n)?zE:DE)(r,i,a,n),c=lE(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 qh(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]=qh(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]=qh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Du=e=>Array.isArray(e),BE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),HE=e=>Du(e)?e[e.length-1]||0:e;function ns(e){const t=Pt(e)?e.get():e;return BE(t)?t.toValue():t}function WE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:qE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const px=e=>(t,n)=>{const r=E.useContext(il),o=E.useContext(rl),i=()=>WE(e,t,r,o);return n?i():bn(i)};function qE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=ns(i[p]);let{initial:a,animate:s}=e;const l=sl(e),c=ox(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"&&!al(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])||cx(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 UE={useVisualState:px({scrapeMotionValuesFromProps:lf,createRenderState:nf})};function hx(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 mx(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 gx=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 vx(e,t,n,r){mx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(gx.has(o)?o:Xd(o),t.attrs[o])}function yx(e,t,n){const r=lf(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=si.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Uh=["x","y","width","height","cx","cy","r"],YE={useVisualState:px({scrapeMotionValuesFromProps:yx,createRenderState:fx,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<Uh.length;s++){const l=Uh[s];e[l]!==t[l]&&(a=!0)}a&&nt.read(()=>{hx(n,r),nt.render(()=>{of(r,o,af(n.tagName),e.transformTemplate),vx(n,r)})})}})};function GE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...rf(r)?YE:UE,preloadedFeatures:e,useRender:$E(o),createVisualElement:t,Component:r};return yE(a)}}function Ji(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 xx=new Set(["width","height","top","left","right","bottom",...si]);function uf(e,t){e.indexOf(t)===-1&&e.push(t)}function ll(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function KE([...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),()=>ll(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 bx(e,t){return t?e*(1e3/t):0}let rs;function ZE(){rs=void 0}const On={now:()=>(rs===void 0&&On.set(Mt.isProcessing||QT.useManualTiming?Mt.timestamp:performance.now()),rs),set:e=>{rs=e,queueMicrotask(ZE)}},Yh=30,XE=e=>!isNaN(parseFloat(e)),Di={current:void 0};class QE{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=XE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ol(!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(),nt.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 Di.current&&Di.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Yh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Yh);return bx(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 QE(e,t)}function JE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function eC(e,t){const n=Ji(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=HE(i[a]);JE(e,a,s)}}function tC(e){return!!(Pt(e)&&e.add)}function ju(e,t){const n=e.getValue("willChange");if(tC(n))return n.add(t)}function wx(e){return e.props[ix]}function ff(e){let t;return()=>(t===void 0&&(t=e()),t)}const nC=ff(()=>window.ScrollTimeline!==void 0);class rC{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(nC()&&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 rC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const yn=e=>e*1e3,Mn=e=>e/1e3;function cl(e){return typeof e=="function"}function Gh(e,t){e.timeline=t,e.onfinish=null}const pf=e=>Array.isArray(e)&&typeof e[0]=="number",oC={linearEasing:void 0};function iC(e,t){const n=ff(e);return()=>{var r;return(r=oC[t])!==null&&r!==void 0?r:n()}}const fs=iC(()=>{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},Tx=(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 Ex(e){return!!(typeof e=="function"&&fs()||!e||typeof e=="string"&&(e in Nu||fs())||pf(e)||Array.isArray(e)&&e.every(Ex))}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 Cx(e,t){if(e)return typeof e=="function"&&fs()?Tx(e,t):pf(e)?ki(e):Array.isArray(e)?e.map(n=>Cx(n,t)||Nu.easeOut):Nu[e]}const Rx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,aC=1e-7,sC=12;function lC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Rx(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>aC&&++s<sC);return a}function xa(e,t,n,r){if(e===t&&n===r)return Yt;const o=i=>lC(i,0,1,e,n);return i=>i===0||i===1?i:Rx(o(i),t,r)}const kx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Px=e=>t=>1-e(1-t),Ax=xa(.33,1.53,.69,.99),hf=Px(Ax),Ix=kx(hf),_x=e=>(e*=2)<1?.5*hf(e):.5*(2-Math.pow(2,-10*(e-1))),mf=e=>1-Math.sin(Math.acos(e)),Ox=Px(mf),Mx=kx(mf),Dx=e=>/^0[^.\s]+$/u.test(e);function cC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Dx(e):!0}const ji=e=>Math.round(e*1e5)/1e5,gf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uC(e){return e==null}const dC=/^(?:#[\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"&&dC.test(n)&&n.startsWith(e)||t&&!uC(n)&&Object.prototype.hasOwnProperty.call(n,t)),jx=(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}},fC=e=>qn(0,255,e),Ic={...li,transform:e=>Math.round(fC(e))},Fr={test:vf("rgb","red"),parse:jx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ic.transform(e)+", "+Ic.transform(t)+", "+Ic.transform(n)+", "+ji(Qi.transform(r))+")"};function pC(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:pC,transform:Fr.transform},bo={test:vf("hsl","hue"),parse:jx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_n.transform(ji(t))+", "+_n.transform(ji(n))+", "+ji(Qi.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)},hC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mC(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(hC))===null||n===void 0?void 0:n.length)||0)>0}const Nx="number",Fx="color",gC="var",vC="var(",Kh="${}",yC=/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 ea(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(yC,l=>(Nt.test(l)?(r.color.push(i),o.push(Fx),n.push(Nt.parse(l))):l.startsWith(vC)?(r.var.push(i),o.push(gC),n.push(l)):(r.number.push(i),o.push(Nx),n.push(parseFloat(l))),++i,Kh)).split(Kh);return{values:n,split:s,indexes:r,types:o}}function Lx(e){return ea(e).values}function Vx(e){const{split:t,types:n}=ea(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===Nx?i+=ji(o[a]):s===Fx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const xC=e=>typeof e=="number"?0:e;function bC(e){const t=Lx(e);return Vx(e)(t.map(xC))}const dr={test:mC,parse:Lx,createTransformer:Vx,getAnimatableNone:bC},wC=new Set(["brightness","contrast","saturate","opacity"]);function SC(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=wC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const TC=/\b([a-z-]*)\(.*?\)/gu,Lu={...dr,getAnimatableNone:e=>{const t=e.match(TC);return t?t.map(SC).join(" "):e}},EC={...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},zx=e=>EC[e];function $x(e,t){let n=zx(e);return n!==Lu&&(n=dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const CC=new Set(["auto","none","0"]);function RC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!CC.has(i)&&ea(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=$x(n,o)}const Lr=e=>e*180/Math.PI,Vu=e=>{const t=Lr(Math.atan2(e[1],e[0]));return zu(t)},kC={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},zu=e=>(e=e%360,e<0&&(e+=360),e),Zh=Vu,Xh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Qh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),PC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xh,scaleY:Qh,scale:e=>(Xh(e)+Qh(e))/2,rotateX:e=>zu(Lr(Math.atan2(e[6],e[5]))),rotateY:e=>zu(Lr(Math.atan2(-e[2],e[0]))),rotateZ:Zh,rotate:Zh,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 Jh(e){return e.includes("scale")?1:0}function $u(e,t){if(!e||e==="none")return Jh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=PC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=kC,o=s}if(!o)return Jh(t);const i=r[t],a=o[1].split(",").map(IC);return typeof i=="function"?i(a):a[i]}const AC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return $u(n,t)};function IC(e){return parseFloat(e.trim())}const em=e=>e===li||e===Se,_C=new Set(["x","y","z"]),OC=si.filter(e=>!_C.has(e));function MC(e){const t=[];return OC.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})=>$u(t,"x"),y:(e,{transform:t})=>$u(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const Br=new Set;let Bu=!1,Hu=!1;function Bx(){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=MC(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 Hx(){Br.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hu=!0)})}function DC(){Hx(),Bx()}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,nt.read(Hx),nt.resolveKeyframes(Bx))):(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 Wx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),jC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function NC(e){const t=jC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const FC=4;function qx(e,t,n=1){dn(n<=FC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=NC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Wx(a)?parseFloat(a):a}return Jd(o)?qx(o,t,n+1):o}const Ux=e=>t=>t.test(e),LC={test:e=>e==="auto",parse:e=>e},Yx=[li,Se,_n,or,RE,CE,LC],tm=e=>Yx.find(Ux(e));class Gx 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=qx(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!xx.has(r)||t.length!==2)return;const[o,i]=t,a=tm(o),s=tm(i);if(a!==s)if(em(a)&&em(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++)cC(t[o])&&r.push(o);r.length&&RC(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 nm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dr.test(e)||e==="0")&&!e.startsWith("url("));function VC(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 zC(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=nm(o,t),s=nm(i,t);return ai(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:VC(e)||(n==="spring"||cl(n))&&r}const $C=e=>e!==null;function ul(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter($C),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const BC=40;class Kx{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>BC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&DC(),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&&!zC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(ul(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 ps=2e4;function xf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ps;)t+=n,r=e.next(t);return t>=ps?1/0:t}const st=(e,t,n)=>e+(t-e)*n;function _c(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 HC({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=_c(l,s,e+1/3),i=_c(l,s,e),a=_c(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function hs(e,t){return n=>n>0?t:e}const Oc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},WC=[Fu,Fr,bo],qC=e=>WC.find(t=>t.test(e));function rm(e){const t=qC(e);if(ai(!!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=HC(n)),n}const om=(e,t)=>{const n=rm(e),r=rm(t);if(!n||!r)return hs(e,t);const o={...n};return i=>(o.red=Oc(n.red,r.red,i),o.green=Oc(n.green,r.green,i),o.blue=Oc(n.blue,r.blue,i),o.alpha=st(n.alpha,r.alpha,i),Fr.transform(o))},UC=(e,t)=>n=>t(e(n)),ba=(...e)=>e.reduce(UC),Wu=new Set(["none","hidden"]);function YC(e,t){return Wu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function GC(e,t){return n=>st(e,t,n)}function bf(e){return typeof e=="number"?GC:typeof e=="string"?Jd(e)?hs:Nt.test(e)?om:XC:Array.isArray(e)?Zx:typeof e=="object"?Nt.test(e)?om:KC:hs}function Zx(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 KC(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 ZC(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 XC=(e,t)=>{const n=dr.createTransformer(t),r=ea(e),o=ea(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?YC(e,t):ba(Zx(ZC(r,o),o.values),n):(ai(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),hs(e,t))};function Xx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?st(e,t,n):bf(e)(e,t)}const QC=5;function Qx(e,t,n){const r=Math.max(t-QC,0);return bx(n-e(r),t-r)}const ht={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},im=.001;function JC({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;ai(e<=yn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=qn(ht.minDamping,ht.maxDamping,a),e=qn(ht.minDuration,ht.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 im-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)+im>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=tR(o,i,s);if(e=yn(e),isNaN(l))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const eR=12;function tR(e,t,n){let r=n;for(let o=1;o<eR;o++)r=r-e(r)/t(r);return r}function qu(e,t){return e*Math.sqrt(1-t*t)}const nR=["duration","bounce"],rR=["stiffness","damping","mass"];function am(e,t){return t.some(n=>e[n]!==void 0)}function oR(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!am(e,rR)&&am(e,nR))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:ht.mass,stiffness:o,damping:i}}else{const n=JC(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function wf(e=ht.visualDuration,t=ht.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}=oR({...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?ht.restSpeed.granular:ht.restSpeed.default),o||(o=y?ht.restDelta.granular:ht.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):Qx(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),ps),S=Tx(C=>T.next(w*C).value,w,30);return w+"ms "+S}};return T}function sm({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:Qx(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 iR=xa(.42,0,1,1),aR=xa(0,0,.58,1),Jx=xa(.42,0,.58,1),eb=e=>Array.isArray(e)&&typeof e[0]!="number",lm={linear:Yt,easeIn:iR,easeInOut:Jx,easeOut:aR,circIn:mf,circInOut:Mx,circOut:Ox,backIn:hf,backInOut:Ix,backOut:Ax,anticipate:_x},Uu=e=>{if(pf(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return xa(t,n,r,o)}else if(typeof e=="string")return dn(lm[e]!==void 0,`Invalid easing type '${e}'`),lm[e];return e};function sR(e,t,n){const r=[],o=n||Xx,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=ba(l,s)}r.push(s)}return r}function tb(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=sR(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 nb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wr(0,t,r);e.push(st(n,1,o))}}function rb(e){const t=[0];return nb(t,e.length-1),t}function lR(e,t){return e.map(n=>n*t)}function cR(e,t){return e.map(()=>t||Jx).splice(0,e.length-1)}function Ni({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=eb(r)?r.map(Uu):Uu(r),i={done:!1,value:t[0]},a=lR(n&&n.length===t.length?n:rb(t),e),s=tb(a,t,{ease:Array.isArray(o)?o:cR(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const uR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>nt.update(t,!0),stop:()=>Wn(t),now:()=>Mt.isProcessing?Mt.timestamp:On.now()}},dR={decay:sm,inertia:sm,tween:Ni,keyframes:Ni,spring:wf},fR=e=>e/100;class Sf extends Kx{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=cl(n)?n:dR[n]||Ni;let l,c;process.env.NODE_ENV!=="production"&&s!==Ni&&dn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Ni&&typeof t[0]!="number"&&(l=ba(fR,Xx(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=ul(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=uR,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 pR=new Set(["opacity","clipPath","filter","transform"]);function hR(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=Cx(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 mR=ff(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ms=10,gR=2e4;function vR(e){return cl(e.type)||e.type==="spring"||!Ex(e.ease)}function yR(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<gR;)r=n.sample(i),o.push(r.value),i+=ms;return{times:void 0,keyframes:o,duration:i-ms,ease:"linear"}}const ob={anticipate:_x,backInOut:Ix,circInOut:Mx};function xR(e){return e in ob}class cm extends Kx{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new Gx(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"&&fs()&&xR(i)&&(i=ob[i]),vR(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=yR(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=hR(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Gh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(ul(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;Gh(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-ms).value,m.sample(g).value,ms)}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 mR()&&r&&pR.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const bR={type:"spring",stiffness:500,damping:25,restSpeed:10},wR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),SR={type:"keyframes",duration:.8},TR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ER=(e,{keyframes:t})=>t.length>2?SR:eo.has(e)?e.startsWith("scale")?wR(t[1]):bR:TR;function CR({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};CR(s)||(u={...u,...ER(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=ul(u.keyframes,s);if(p!==void 0)return nt.update(()=>{u.onUpdate(p),u.onComplete()}),new Sx([])}return!i&&cm.supports(u)?new cm(u):new Sf(u)};function RR({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&&RR(u,d))continue;const m={delay:n,...cf(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=wx(e);if(v){const y=window.MotionHandoffAnimation(v,d,nt);y!==null&&(m.startTime=y,g=!0)}}ju(e,d),p.start(Tf(d,p,f,e.shouldReduceMotion&&xx.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return s&&Promise.all(c).then(()=>{nt.update(()=>{s&&eC(e,s)})}),c}function Yu(e,t,n={}){var r;const o=Ji(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 kR(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 kR(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(PR).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 PR(e,t){return e.sortNodePosition(t)}function AR(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"?Ji(e,t,n.custom):t;r=Promise.all(Ef(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function ib(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 IR=Kd.length;function ab(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ab(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<IR;n++){const r=Kd[n],o=e.props[r];(Zi(o)||o===!1)&&(t[r]=o)}return t}const _R=[...Gd].reverse(),OR=Gd.length;function MR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>AR(e,n,r)))}function DR(e){let t=MR(e),n=um(),r=!0;const o=l=>(c,u)=>{var d;const p=Ji(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=ab(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<OR;h++){const v=_R[h],y=n[v],b=c[v]!==void 0?c[v]:u[v],T=Zi(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||al(b)||typeof b=="boolean")continue;const C=jR(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:j={}}=y,V={...j,...O},P=L=>{R=!0,p.has(L)&&(I=!0,p.delete(L)),y.needsAnimating[L]=!0;const N=e.getValue(L);N&&(N.liveStyle=!1)};for(const L in V){const N=O[L],z=j[L];if(f.hasOwnProperty(L))continue;let M=!1;Du(N)&&Du(z)?M=!ib(N,z):M=N!==z,M?N!=null?P(L):p.add(L):N!==void 0&&p.has(L)?P(L):y.protectedKeys[L]=!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(L=>({animation:L,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=Ji(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=um(),r=!0}}}function jR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ib(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function um(){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 NR extends yr{constructor(t){super(t),t.animationState||(t.animationState=DR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();al(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 FR=0;class LR extends yr{constructor(){super(...arguments),this.id=FR++}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 VR={animation:{Feature:NR},exit:{Feature:LR}},mn={x:!1,y:!1};function sb(){return mn.x||mn.y}function zR(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 ta(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 wa(e){return{point:{x:e.pageX,y:e.pageY}}}const $R=e=>t=>Cf(t)&&e(t,wa(t));function Fi(e,t,n,r){return ta(e,t,$R(n),r)}function lb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function HR(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 cb=1e-4,WR=1-cb,qR=1+cb,ub=.01,UR=0-ub,YR=0+ub;function $t(e){return e.max-e.min}function GR(e,t,n){return Math.abs(e-t)<=n}function dm(e,t,n,r=.5){e.origin=r,e.originPoint=st(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=st(n.min,n.max,e.origin)-e.originPoint,(e.scale>=WR&&e.scale<=qR||isNaN(e.scale))&&(e.scale=1),(e.translate>=UR&&e.translate<=YR||isNaN(e.translate))&&(e.translate=0)}function Li(e,t,n,r){dm(e.x,t.x,n.x,r?r.originX:void 0),dm(e.y,t.y,n.y,r?r.originY:void 0)}function fm(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function KR(e,t,n){fm(e.x,t.x,n.x),fm(e.y,t.y,n.y)}function pm(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function Vi(e,t,n){pm(e.x,t.x,n.x),pm(e.y,t.y,n.y)}const hm=()=>({translate:0,scale:1,origin:0,originPoint:0}),wo=()=>({x:hm(),y:hm()}),mm=()=>({min:0,max:0}),gt=()=>({x:mm(),y:mm()});function an(e){return[e("x"),e("y")]}function Mc(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:n}){return!Mc(e)||!Mc(t)||!Mc(n)}function _r(e){return Gu(e)||db(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function db(e){return gm(e.x)||gm(e.y)}function gm(e){return e&&e!=="0%"}function gs(e,t,n){const r=e-n,o=t*r;return n+o}function vm(e,t,n,r,o){return o!==void 0&&(e=gs(e,o,r)),gs(e,n,r)+t}function Ku(e,t=0,n=1,r,o){e.min=vm(e.min,t,n,r,o),e.max=vm(e.max,t,n,r,o)}function fb(e,{x:t,y:n}){Ku(e.x,t.translate,t.scale,t.originPoint),Ku(e.y,n.translate,n.scale,n.originPoint)}const ym=.999999999999,xm=1.0000000000001;function ZR(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,fb(e,a)),r&&_r(i.latestValues)&&To(e,i.latestValues))}t.x<xm&&t.x>ym&&(t.x=1),t.y<xm&&t.y>ym&&(t.y=1)}function So(e,t){e.min=e.min+t,e.max=e.max+t}function bm(e,t,n,r,o=.5){const i=st(e.min,e.max,o);Ku(e,t,n,i,r)}function To(e,t){bm(e.x,t.x,t.scaleX,t.scale,t.originX),bm(e.y,t.y,t.scaleY,t.scale,t.originY)}function pb(e,t){return lb(HR(e.getBoundingClientRect(),t))}function XR(e,t,n){const r=pb(e,n),{scroll:o}=t;return o&&(So(r.x,o.offset.x),So(r.y,o.offset.y)),r}const hb=({current:e})=>e?e.ownerDocument.defaultView:null,wm=(e,t)=>Math.abs(e-t);function QR(e,t){const n=wm(e.x,t.x),r=wm(e.y,t.y);return Math.sqrt(n**2+r**2)}class mb{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=jc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=QR(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=Dc(p,this.transformPagePoint),nt.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=jc(d.type==="pointercancel"?this.lastMoveEventInfo:Dc(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=wa(t),s=Dc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,jc(s,this.history)),this.removeListeners=ba(Fi(this.contextWindow,"pointermove",this.handlePointerMove),Fi(this.contextWindow,"pointerup",this.handlePointerUp),Fi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wn(this.updatePoint)}}function Dc(e,t){return t?{point:t(e.point)}:e}function Sm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jc({point:e},t){return{point:e,delta:Sm(e,gb(t)),offset:Sm(e,JR(t)),velocity:ek(t,.1)}}function JR(e){return e[0]}function gb(e){return e[e.length-1]}function ek(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=gb(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 tk(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?st(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?st(n,e,r.max):Math.min(e,n)),e}function Tm(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 nk(e,{top:t,left:n,bottom:r,right:o}){return{x:Tm(e.x,n,o),y:Tm(e.y,t,r)}}function Em(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 rk(e,t){return{x:Em(e.x,t.x),y:Em(e.y,t.y)}}function ok(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 ik(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 ak(e=Zu){return e===!1?e=0:e===!0&&(e=Zu),{x:Cm(e,"left","right"),y:Cm(e,"top","bottom")}}function Cm(e,t,n){return{min:Rm(e,t),max:Rm(e,n)}}function Rm(e,t){return typeof e=="number"?e:e[t]||0}const sk=new WeakMap;class lk{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=gt(),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(wa(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zR(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=$t(b)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&nt.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=ck(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 mb(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:hb(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&&nt.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||!La(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=tk(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=nk(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]=ik(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=XR(r,o.root,this.visualElement.getTransformPagePoint());let a=rk(o.layout.layoutBox,i);if(n){const s=n(BR(a));this.hasMutatedConstraints=!!s,s&&(a=lb(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(!La(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(!La(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]-st(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]=ok({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(!La(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(st(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;sk.set(this.visualElement,this);const t=this.visualElement.current,n=Fi(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()),nt.read(r);const a=ta(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 La(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ck(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class uk extends yr{constructor(t){super(t),this.removeGroupControls=Yt,this.removeListeners=Yt,this.controls=new lk(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&&nt.postRender(()=>e(t,n))};class dk extends yr{constructor(){super(...arguments),this.removePointerDownListener=Yt}onPointerDown(t){this.session=new mb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hb(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&&nt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Fi(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 os={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Pm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Si={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=Pm(e,t.target.x),r=Pm(e,t.target.y);return`${n}% ${r}%`}},fk={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=st(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 pk extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;EE(hk),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()})),os.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()||nt.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 vb(e){const[t,n]=Qy(),r=E.useContext(Ki);return x.jsx(pk,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(ax),isPresent:t,safeToRemove:n})}const hk={borderRadius:{...Si,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Si,borderTopRightRadius:Si,borderBottomLeftRadius:Si,borderBottomRightRadius:Si,boxShadow:fk};function yb(e,t,n){const r=Pt(e)?e:No(e);return r.start(Tf("",r,t,n)),r.animation}function xb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const mk=(e,t)=>e.depth-t.depth;class gk{constructor(){this.children=[],this.isDirty=!1}add(t){uf(this.children,t),this.isDirty=!0}remove(t){ll(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mk),this.isDirty=!1,this.children.forEach(t)}}function vk(e,t){const n=On.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wn(r),e(i-t))};return nt.read(r,!0),()=>Wn(r)}const bb=["TopLeft","TopRight","BottomLeft","BottomRight"],yk=bb.length,Am=e=>typeof e=="string"?parseFloat(e):e,Im=e=>typeof e=="number"||Se.test(e);function xk(e,t,n,r,o,i){o?(e.opacity=st(0,n.opacity!==void 0?n.opacity:1,bk(r)),e.opacityExit=st(t.opacity!==void 0?t.opacity:1,0,wk(r))):i&&(e.opacity=st(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<yk;a++){const s=`border${bb[a]}Radius`;let l=_m(t,s),c=_m(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Im(l)===Im(c)?(e[s]=Math.max(st(Am(l),Am(c),r),0),(_n.test(c)||_n.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=st(t.rotate||0,n.rotate||0,r))}function _m(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bk=wb(0,.5,Ox),wk=wb(.5,.95,Yt);function wb(e,t,n){return r=>r<e?0:r>t?1:n(Wr(e,t,r))}function Om(e,t){e.min=t.min,e.max=t.max}function rn(e,t){Om(e.x,t.x),Om(e.y,t.y)}function Mm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Dm(e,t,n,r,o){return e-=t,e=gs(e,1/n,r),o!==void 0&&(e=gs(e,1/o,r)),e}function Sk(e,t=0,n=1,r=.5,o,i=e,a=e){if(_n.test(t)&&(t=parseFloat(t),t=st(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=st(i.min,i.max,r);e===i&&(s-=t),e.min=Dm(e.min,t,n,s,o),e.max=Dm(e.max,t,n,s,o)}function jm(e,t,[n,r,o],i,a){Sk(e,t[n],t[r],t[o],t.scale,i,a)}const Tk=["x","scaleX","originX"],Ek=["y","scaleY","originY"];function Nm(e,t,n,r){jm(e.x,t,Tk,n?n.x:void 0,r?r.x:void 0),jm(e.y,t,Ek,n?n.y:void 0,r?r.y:void 0)}function Fm(e){return e.translate===0&&e.scale===1}function Sb(e){return Fm(e.x)&&Fm(e.y)}function Lm(e,t){return e.min===t.min&&e.max===t.max}function Ck(e,t){return Lm(e.x,t.x)&&Lm(e.y,t.y)}function Vm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Tb(e,t){return Vm(e.x,t.x)&&Vm(e.y,t.y)}function zm(e){return $t(e.x)/$t(e.y)}function $m(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Rk{constructor(){this.members=[]}add(t){uf(this.members,t),t.scheduleRender()}remove(t){if(ll(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 kk(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 Nc=["","X","Y","Z"],Pk={visibility:"hidden"},Bm=1e3;let Ak=0;function Fc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Eb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",nt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Eb(r)}function Cb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=Ak++,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(Ok),this.nodes.forEach(Fk),this.nodes.forEach(Lk),this.nodes.forEach(Mk)},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 gk)}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=xb(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=vk(p,250),os.hasAnimatedSinceResize&&(os.hasAnimatedSinceResize=!1,this.nodes.forEach(Wm))})}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()||Hk,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!Tb(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||Wm(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(Vk),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&&Eb(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(Hm);return}this.isUpdating||this.nodes.forEach(jk),this.isUpdating=!1,this.nodes.forEach(Nk),this.nodes.forEach(Ik),this.nodes.forEach(_k),this.clearAllSnapshots();const s=On.now();Mt.delta=qn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Ac.update.process(Mt),Ac.preRender.process(Mt),Ac.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Dk),this.sharedNodes.forEach(zk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){nt.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=gt(),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||_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)),Wk(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return gt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(qk))){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=gt();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=gt();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=gt();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=gt(),d=c.measurePageBox();rn(u,d),Nm(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return _r(this.latestValues)&&Nm(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=gt(),this.relativeTargetOrigin=gt(),Vi(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=gt(),this.targetWithTransforms=gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),KR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),fb(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=gt(),this.relativeTargetOrigin=gt(),Vi(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)||db(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;ZR(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=gt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Mm(this.prevProjectionDelta.x,this.projectionDelta.x),Mm(this.prevProjectionDelta.y,this.projectionDelta.y)),Li(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=gt(),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(Bk));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const w=T/1e3;qm(d.x,a.x,w),qm(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$k(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&Ck(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=gt()),rn(b,this.relativeTarget)),g&&(this.animationValues=u,xk(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=nt.update(()=>{os.hasAnimatedSinceResize=!0,this.currentAnimation=yb(0,Bm,{...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(Bm),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&&Rb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||gt();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),Li(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rk),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&&Fc("z",a,c,this.animationValues);for(let u=0;u<Nc.length;u++)Fc(`rotate${Nc[u]}`,a,c,this.animationValues),Fc(`skew${Nc[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 Pk;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ns(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=ns(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=kk(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 Xi){if(p[g]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:y}=Xi[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?ns(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(Hm),this.root.sharedNodes.clear()}}}function Ik(e){e.updateLayout()}function _k(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}):Rb(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=wo();Li(s,r,n.layoutBox);const l=wo();a?Li(l,e.applyTransform(o,!0),n.measuredBox):Li(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 m=gt();Vi(m,n.layoutBox,p.layoutBox);const g=gt();Vi(g,r,f.layoutBox),Tb(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 Ok(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 Mk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Dk(e){e.clearSnapshot()}function Hm(e){e.clearMeasurements()}function jk(e){e.isLayoutDirty=!1}function Nk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Fk(e){e.resolveTargetDelta()}function Lk(e){e.calcProjection()}function Vk(e){e.resetSkewAndRotation()}function zk(e){e.removeLeadSnapshot()}function qm(e,t,n){e.translate=st(t.translate,0,n),e.scale=st(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Um(e,t,n,r){e.min=st(t.min,n.min,r),e.max=st(t.max,n.max,r)}function $k(e,t,n,r){Um(e.x,t.x,n.x,r),Um(e.y,t.y,n.y,r)}function Bk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Hk={duration:.45,ease:[.4,0,.1,1]},Ym=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gm=Ym("applewebkit/")&&!Ym("chrome/")?Math.round:Yt;function Km(e){e.min=Gm(e.min),e.max=Gm(e.max)}function Wk(e){Km(e.x),Km(e.y)}function Rb(e,t,n){return e==="position"||e==="preserve-aspect"&&!GR(zm(t),zm(n),.2)}function qk(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Uk=Cb({attachResizeListener:(e,t)=>ta(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Lc={current:void 0},kb=Cb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Lc.current){const e=new Uk({});e.mount(window),e.setOptions({layoutScroll:!0}),Lc.current=e}return Lc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Yk={pan:{Feature:dk},drag:{Feature:uk,ProjectionNode:kb,MeasureLayout:vb}};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 Ab(e,t){const n=Pb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Zm(e){return!(e.pointerType==="touch"||sb())}function Gk(e,t,n={}){const[r,o,i]=Ab(e,n),a=s=>{if(!Zm(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Zm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Xm(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&&nt.postRender(()=>i(t,wa(t)))}class Kk extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=Gk(t,(n,r)=>(Xm(this.node,r,"Start"),o=>Xm(this.node,o,"End"))))}unmount(){}}class Zk 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=ba(ta(this.node.current,"focus",()=>this.onFocus()),ta(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ib=(e,t)=>t?e===t?!0:Ib(e,t.parentElement):!1,Xk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Qk(e){return Xk.has(e.tagName)||e.tabIndex!==-1}const Pi=new WeakSet;function Qm(e){return t=>{t.key==="Enter"&&e(t)}}function Vc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Jk=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Qm(()=>{if(Pi.has(n))return;Vc(n,"down");const o=Qm(()=>{Vc(n,"up")}),i=()=>Vc(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 Jm(e){return Cf(e)&&!sb()}function eP(e,t,n={}){const[r,o,i]=Ab(e,n),a=s=>{const l=s.currentTarget;if(!Jm(s)||Pi.has(l))return;Pi.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Jm(f)||!Pi.has(l))&&(Pi.delete(l),typeof c=="function"&&c(f,{success:m}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Ib(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=>Jk(c,o)),!Qk(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function eg(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&&nt.postRender(()=>i(t,wa(t)))}class tP extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=eP(t,(n,r)=>(eg(this.node,r,"Start"),(o,{success:i})=>eg(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xu=new WeakMap,zc=new WeakMap,nP=e=>{const t=Xu.get(e.target);t&&t(e)},rP=e=>{e.forEach(nP)};function oP({root:e,...t}){const n=e||document;zc.has(n)||zc.set(n,{});const r=zc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(rP,{root:e,...t})),r[o]}function iP(e,t,n){const r=oP(t);return Xu.set(e,n),r.observe(e),()=>{Xu.delete(e),r.unobserve(e)}}const aP={some:0,all:1};class sP 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:aP[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 iP(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(lP(t,n))&&this.startObserver()}unmount(){}}function lP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const cP={inView:{Feature:sP},tap:{Feature:tP},focus:{Feature:Zk},hover:{Feature:Kk}},uP={layout:{ProjectionNode:kb,MeasureLayout:vb}},Qu={current:null},_b={current:!1};function dP(){if(_b.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 fP=[...Yx,Nt,dr],pP=e=>fP.find(Ux(e)),na=new WeakMap;function hP(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"&&ol(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 tg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ob{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,nt.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=sl(n),this.isVariantNode=ox(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,na.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)),_b.current||dP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qu.current,process.env.NODE_ENV!=="production"&&ol(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&&nt.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):gt()}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<tg.length;r++){const o=tg[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=hP(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"&&(Wx(o)||Dx(o))?o=parseFloat(o):!pP(o)&&dr.test(n)&&(o=$x(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 Mb extends Ob{constructor(){super(...arguments),this.KeyframeResolver=Gx}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 mP(e){return window.getComputedStyle(e)}class Db extends Mb{constructor(){super(...arguments),this.type="html",this.renderInstance=mx}readValueFromInstance(t,n){if(eo.has(n))return AC(t,n);{const r=mP(t),o=(Qd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return pb(t,n)}build(t,n,r){tf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return lf(t,n,r)}}class jb extends Mb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&hx(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(eo.has(n)){const r=zx(n);return r&&r.default||0}return n=gx.has(n)?n:Xd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return yx(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&nt.postRender(this.updateDimensions)}build(t,n,r){of(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){vx(t,n,r,o)}mount(t){this.isSVGTag=af(t.tagName),super.mount(t)}}const gP=(e,t)=>rf(e)?new jb(t):new Db(t,{allowProjection:e!==E.Fragment}),vP=GE({...VR,...cP,...Yk,...uP},gP),ft=uE(vP);function yP(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 Nb(e,t){const n=Lo(t()),r=()=>n.set(t());return r(),nl(()=>{const o=()=>nt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Wn(r)}}),n}const xP=e=>e&&typeof e=="object"&&e.mix,bP=e=>xP(e)?e.mix:void 0;function wP(...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=tb(o,i,{mixer:bP(i[0]),...a});return t?s(r):s}function SP(e){Di.current=[],e();const t=Nb(Di.current,e);return Di.current=void 0,t}function TP(e,t,n,r){if(typeof e=="function")return SP(e);const o=typeof t=="function"?t:wP(t,n,r);return Array.isArray(e)?ng(e,o):ng([e],([i])=>o(i))}function ng(e,t){const n=bn(()=>[]);return Nb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function EP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(xf(r),ps);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Mn(o)}}const CP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Fb(e,t){return eb(e)?e[CP(0,e.length,t)]:e}function Rf(e){return typeof e=="object"&&!Array.isArray(e)}function Lb(e,t,n,r){return typeof e=="string"&&Rf(t)?Pb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function RP(e,t,n){return e*(t+1)}function rg(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 kP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ll(e,o),r--)}}function PP(e,t,n,r,o,i){kP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:st(o,i,r[a]),easing:Fb(n,a)})}function AP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function IP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const _P="easeInOut",OP=20;function MP(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,rg(d,m.at,u,c));continue}let[g,h,v={}]=m;v.at!==void 0&&(d=rg(d,v.at,u,c));let y=0;const b=(T,w,S,C=0,R=0)=>{const I=DP(T),{delay:A=0,times:O=rb(I),type:j="keyframes",repeat:V,repeatType:P,repeatDelay:D=0,..._}=w;let{ease:L=t.ease||"easeOut",duration:N}=w;const z=typeof A=="function"?A(C,R):A,M=I.length,B=cl(j)?j:o==null?void 0:o[j];if(M<=2&&B){let Z=100;if(M===2&&FP(I)){const F=I[1]-I[0];Z=Math.abs(F)}const G={..._};N!==void 0&&(G.duration=yn(N));const K=EP(G,Z,B);L=K.ease,N=K.duration}N??(N=i);const Q=d+z;O.length===1&&O[0]===0&&(O[1]=1);const ee=O.length-I.length;if(ee>0&&nb(O,ee),I.length===1&&I.unshift(null),V){dn(V<OP,"Repeat count too high, must be less than 20"),N=RP(N,V);const Z=[...I],G=[...O];L=Array.isArray(L)?[...L]:[L];const K=[...L];for(let F=0;F<V;F++){I.push(...Z);for(let $=0;$<Z.length;$++)O.push(G[$]+(F+1)),L.push($===0?"linear":Fb(K,$-1))}AP(O,V)}const X=Q+N;PP(S,I,L,O,Q,X),y=Math.max(z+N,y),p=Math.max(X,p)};if(Pt(g)){const T=og(g,s);b(h,v,ig("default",T))}else{const T=Lb(g,h,r,l),w=T.length;for(let S=0;S<w;S++){h=h,v=v;const C=T[S],R=og(C,s);for(const I in h)b(h[I],jP(v,I),ig(I,R),S,w)}}u=d,d+=y}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(IP);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(_P)),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 og(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ig(e,t){return t[e]||(t[e]=[]),t[e]}function DP(e){return Array.isArray(e)?e:[e]}function jP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const NP=e=>typeof e=="number",FP=e=>e.every(NP);function LP(e,t){return e in t}class VP extends Ob{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(LP(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 gt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function zP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=xb(e)?new jb(t):new Db(t);n.mount(e),na.set(e,n)}function $P(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new VP(t);n.mount(e),na.set(e,n)}function BP(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!Rf(t)}function Vb(e,t,n,r){const o=[];if(BP(e,t))o.push(yb(e,Rf(t)&&t.default||t,n&&(n.default||n)));else{const i=Lb(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?zP:$P;na.has(l)||c(l);const u=na.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 HP(e,t,n){const r=[];return MP(e,t,n,{spring:wf}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Vb(s,i,a))}),r}function WP(e){return Array.isArray(e)&&e.some(Array.isArray)}function qP(e){function t(n,r,o){let i=[];WP(n)?i=HP(n,r,e):i=Vb(n,r,o,e);const a=new Sx(i);return e&&e.animations.push(a),a}return t}function UP(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>qP(e));return yP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class YP{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 GP=()=>new YP;function KP(){return bn(GP)}function ZP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function XP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:ZP(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 zb=E.createContext(null);function QP(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=st(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?KE(e,o,o+i):e}function JP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>ft[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(tA)},updateOrder:(d,p,f)=>{if(c.current)return;const m=QP(l,d,p,f);l!==m&&(c.current=!0,r(m.map(eA).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(zb.Provider,{value:u,children:e})})}const $b=E.forwardRef(JP);function eA(e){return e.value}function tA(e,t){return e.layout.min-t.layout.min}function ag(e,t=0){return Pt(e)?e:Lo(t)}function nA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>ft[r]),c=E.useContext(zb),u={x:ag(t.x),y:ag(t.y)},d=TP([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 Bb=E.forwardRef(nA);/**
|
|
12
|
+
`),()=>{document.head.removeChild(f)}},[t]),x.jsx(KT,{isPresent:t,childRef:o,sizeRef:i,children:k.cloneElement(e,{ref:o})})}const XT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(QT),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(ZT,{isPresent:n,anchorX:s,children:e})),x.jsx(rl.Provider,{value:d,children:e})};function QT(){return new Map}function Qy(e=!0){const t=E.useContext(rl);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 ja=e=>e.key||"";function Fh(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]=Qy(a),u=E.useMemo(()=>Fh(e),[e]),d=a&&!l?[]:u.map(ja),p=E.useRef(!0),f=E.useRef(u),m=bn(()=>new Map),[g,h]=E.useState(u),[v,y]=E.useState(u);nl(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const S=ja(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=ja(C);d.includes(R)||(w.splice(S,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),y(Fh(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(Ki);return x.jsx(x.Fragment,{children:v.map(w=>{const S=ja(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(XT,{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)})})},JT=E.createContext(null),Yt=e=>e;let ai=Yt,dn=Yt;process.env.NODE_ENV!=="production"&&(ai=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},dn=(e,t)=>{if(!e)throw new Error(t)});const eE={useManualTiming:!1},Na=["read","resolveKeyframes","update","preRender","render","postRender"];function tE(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 nE=40;function Jy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Na.reduce((v,y)=>(v[y]=tE(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,nE),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:Na.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<Na.length;y++)a[Na[y]].cancel(v)},state:o,steps:a}}const{schedule:nt,cancel:Wn,state:Mt,steps:Ac}=Jy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);function rE(){const e=E.useRef(!1);return nl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function oE(){const e=rE(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>nt.postRender(r),[r]),t]}const iE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Lh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(iE);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 ex=e=>e===!0,aE=e=>ex(e===!0)||e==="id",sE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Ki),o=E.useContext(JT),[i,a]=oE(),s=E.useRef(null),l=r.id||o;s.current===null&&(aE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:ex(n)&&r.group||Lh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx(Ki.Provider,{value:c,children:e})},tx=E.createContext({strict:!1}),Vh={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 Vh)jo[e]={isEnabled:t=>Vh[e].some(n=>!!t[n])};function lE(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const cE=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 ds(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cE.has(e)}let nx=e=>!ds(e);function rx(e){e&&(nx=t=>t.startsWith("on")?!ds(t):e(t))}try{rx(require("@emotion/is-prop-valid").default)}catch{}function uE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(nx(o)||n===!0&&ds(o)||!t&&!ds(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function dE({children:e,isValidProp:t,...n}){t&&rx(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 zh=new Set;function ol(e,t,n){e||zh.has(t)||(console.warn(t),zh.add(t))}function fE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&ol(!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 il=E.createContext({});function al(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Zi(e){return typeof e=="string"||Array.isArray(e)}const Gd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kd=["initial",...Gd];function sl(e){return al(e.animate)||Kd.some(t=>Zi(e[t]))}function ox(e){return!!(sl(e)||e.variants)}function pE(e,t){if(sl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Zi(n)?n:void 0,animate:Zi(r)?r:void 0}}return e.inherit!==!1?t:{}}function hE(e){const{initial:t,animate:n}=pE(e,E.useContext(il));return E.useMemo(()=>({initial:t,animate:n}),[$h(t),$h(n)])}function $h(e){return Array.isArray(e)?e.join(" "):e}const mE=Symbol.for("motionComponentSymbol");function xo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gE(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}=Jy(queueMicrotask,!1),Xd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vE="framerAppearId",ix="data-"+Xd(vE),ax=E.createContext({});function yE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(il),l=E.useContext(tx),c=E.useContext(rl),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(ax);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&xE(d.current,n,o,f);const m=E.useRef(!1);E.useInsertionEffect(()=>{p&&m.current&&p.update(n,c)});const g=n[ix],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 nl(()=>{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 xE(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:sx(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 sx(e){if(e)return e.options.allowProjection!==!1?e.projection:sx(e.parent)}function bE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&lE(e);function s(c,u){let d;const p={...E.useContext(Do),...c,layoutId:wE(c)},{isStatic:f}=p,m=hE(c),g=r(c,f);if(!f&&Yd){SE(p,e);const h=TE(p);d=h.MeasureLayout,m.visualElement=yE(o,g,p,t,h.ProjectionNode)}return x.jsxs(il.Provider,{value:m,children:[d&&m.visualElement?x.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,c,gE(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[mE]=o,l}function wE({layoutId:e}){const t=E.useContext(Ki).id;return t&&e!==void 0?t+"-"+e:e}function SE(e,t){const n=E.useContext(tx).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ai(!1,r):dn(!1,r)}}function TE(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 lx=e=>t=>typeof t=="string"&&t.startsWith(e),Qd=lx("--"),EE=lx("var(--"),Jd=e=>EE(e)?CE.test(e.split("/*")[0].trim()):!1,CE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xi={};function RE(e){for(const t in e)Xi[t]=e[t],Qd(t)&&(Xi[t].isCSSVariable=!0)}const si=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],eo=new Set(si);function cx(e,{layout:t,layoutId:n}){return eo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xi[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),ux=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,li={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Qi={...li,transform:e=>qn(0,1,e)},Fa={...li,default:1},ya=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),or=ya("deg"),_n=ya("%"),Se=ya("px"),kE=ya("vh"),PE=ya("vw"),Bh={..._n,parse:e=>_n.parse(e)/100,transform:e=>_n.transform(e*100)},AE={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se},IE={rotate:or,rotateX:or,rotateY:or,rotateZ:or,scale:Fa,scaleX:Fa,scaleY:Fa,scaleZ:Fa,skew:or,skewX:or,skewY:or,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:Qi,originX:Bh,originY:Bh,originZ:Se},Hh={...li,transform:Math.round},ef={...AE,...IE,zIndex:Hh,size:Se,fillOpacity:Qi,strokeOpacity:Qi,numOctaves:Hh},_E={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},OE=si.length;function ME(e,t,n){let r="",o=!0;for(let i=0;i<OE;i++){const a=si[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=ux(s,ef[a]);if(!l){o=!1;const u=_E[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=ux(c,ef[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=ME(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 dx(e,t,n){for(const r in t)!Pt(t[r])&&!cx(r,n)&&(e[r]=t[r])}function DE({transformTemplate:e},t){return E.useMemo(()=>{const n=nf();return tf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function jE(e,t){const n=e.style||{},r={};return dx(r,n,e),Object.assign(r,DE(e,t)),r}function NE(e,t){const n={},r=jE(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 FE=["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:!!(FE.indexOf(e)>-1||/[A-Z]/u.test(e))}const LE={offset:"stroke-dashoffset",array:"stroke-dasharray"},VE={offset:"strokeDashoffset",array:"strokeDasharray"};function zE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?LE:VE;e[i.offset]=Se.transform(-r);const a=Se.transform(t),s=Se.transform(n);e[i.array]=`${a} ${s}`}function Wh(e,t,n){return typeof e=="string"?e:Se.transform(t+n*e)}function $E(e,t,n){const r=Wh(t,e.x,e.width),o=Wh(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=$E(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&&zE(p,a,s,l,!1)}const fx=()=>({...nf(),attrs:{}}),af=e=>typeof e=="string"&&e.toLowerCase()==="svg";function BE(e,t,n,r){const o=E.useMemo(()=>{const i=fx();return of(i,t,af(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};dx(i,e.style,e),o.style={...i,...o.style}}return o}function HE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(rf(n)?BE:NE)(r,i,a,n),c=uE(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 qh(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]=qh(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]=qh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Du=e=>Array.isArray(e),WE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),qE=e=>Du(e)?e[e.length-1]||0:e;function ns(e){const t=Pt(e)?e.get():e;return WE(t)?t.toValue():t}function UE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:YE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const px=e=>(t,n)=>{const r=E.useContext(il),o=E.useContext(rl),i=()=>UE(e,t,r,o);return n?i():bn(i)};function YE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=ns(i[p]);let{initial:a,animate:s}=e;const l=sl(e),c=ox(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"&&!al(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])||cx(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 GE={useVisualState:px({scrapeMotionValuesFromProps:lf,createRenderState:nf})};function hx(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 mx(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 gx=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 vx(e,t,n,r){mx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(gx.has(o)?o:Xd(o),t.attrs[o])}function yx(e,t,n){const r=lf(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=si.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Uh=["x","y","width","height","cx","cy","r"],KE={useVisualState:px({scrapeMotionValuesFromProps:yx,createRenderState:fx,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<Uh.length;s++){const l=Uh[s];e[l]!==t[l]&&(a=!0)}a&&nt.read(()=>{hx(n,r),nt.render(()=>{of(r,o,af(n.tagName),e.transformTemplate),vx(n,r)})})}})};function ZE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...rf(r)?KE:GE,preloadedFeatures:e,useRender:HE(o),createVisualElement:t,Component:r};return bE(a)}}function Ji(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 xx=new Set(["width","height","top","left","right","bottom",...si]);function uf(e,t){e.indexOf(t)===-1&&e.push(t)}function ll(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function XE([...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),()=>ll(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 bx(e,t){return t?e*(1e3/t):0}let rs;function QE(){rs=void 0}const On={now:()=>(rs===void 0&&On.set(Mt.isProcessing||eE.useManualTiming?Mt.timestamp:performance.now()),rs),set:e=>{rs=e,queueMicrotask(QE)}},Yh=30,JE=e=>!isNaN(parseFloat(e)),Di={current:void 0};class eC{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=JE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ol(!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(),nt.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 Di.current&&Di.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Yh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Yh);return bx(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 eC(e,t)}function tC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function nC(e,t){const n=Ji(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=qE(i[a]);tC(e,a,s)}}function rC(e){return!!(Pt(e)&&e.add)}function ju(e,t){const n=e.getValue("willChange");if(rC(n))return n.add(t)}function wx(e){return e.props[ix]}function ff(e){let t;return()=>(t===void 0&&(t=e()),t)}const oC=ff(()=>window.ScrollTimeline!==void 0);class iC{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(oC()&&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 iC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const yn=e=>e*1e3,Mn=e=>e/1e3;function cl(e){return typeof e=="function"}function Gh(e,t){e.timeline=t,e.onfinish=null}const pf=e=>Array.isArray(e)&&typeof e[0]=="number",aC={linearEasing:void 0};function sC(e,t){const n=ff(e);return()=>{var r;return(r=aC[t])!==null&&r!==void 0?r:n()}}const fs=sC(()=>{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},Tx=(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 Ex(e){return!!(typeof e=="function"&&fs()||!e||typeof e=="string"&&(e in Nu||fs())||pf(e)||Array.isArray(e)&&e.every(Ex))}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 Cx(e,t){if(e)return typeof e=="function"&&fs()?Tx(e,t):pf(e)?ki(e):Array.isArray(e)?e.map(n=>Cx(n,t)||Nu.easeOut):Nu[e]}const Rx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lC=1e-7,cC=12;function uC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Rx(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>lC&&++s<cC);return a}function xa(e,t,n,r){if(e===t&&n===r)return Yt;const o=i=>uC(i,0,1,e,n);return i=>i===0||i===1?i:Rx(o(i),t,r)}const kx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Px=e=>t=>1-e(1-t),Ax=xa(.33,1.53,.69,.99),hf=Px(Ax),Ix=kx(hf),_x=e=>(e*=2)<1?.5*hf(e):.5*(2-Math.pow(2,-10*(e-1))),mf=e=>1-Math.sin(Math.acos(e)),Ox=Px(mf),Mx=kx(mf),Dx=e=>/^0[^.\s]+$/u.test(e);function dC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Dx(e):!0}const ji=e=>Math.round(e*1e5)/1e5,gf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function fC(e){return e==null}const pC=/^(?:#[\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"&&pC.test(n)&&n.startsWith(e)||t&&!fC(n)&&Object.prototype.hasOwnProperty.call(n,t)),jx=(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}},hC=e=>qn(0,255,e),Ic={...li,transform:e=>Math.round(hC(e))},Fr={test:vf("rgb","red"),parse:jx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ic.transform(e)+", "+Ic.transform(t)+", "+Ic.transform(n)+", "+ji(Qi.transform(r))+")"};function mC(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:mC,transform:Fr.transform},bo={test:vf("hsl","hue"),parse:jx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_n.transform(ji(t))+", "+_n.transform(ji(n))+", "+ji(Qi.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)},gC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vC(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(gC))===null||n===void 0?void 0:n.length)||0)>0}const Nx="number",Fx="color",yC="var",xC="var(",Kh="${}",bC=/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 ea(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(bC,l=>(Nt.test(l)?(r.color.push(i),o.push(Fx),n.push(Nt.parse(l))):l.startsWith(xC)?(r.var.push(i),o.push(yC),n.push(l)):(r.number.push(i),o.push(Nx),n.push(parseFloat(l))),++i,Kh)).split(Kh);return{values:n,split:s,indexes:r,types:o}}function Lx(e){return ea(e).values}function Vx(e){const{split:t,types:n}=ea(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===Nx?i+=ji(o[a]):s===Fx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const wC=e=>typeof e=="number"?0:e;function SC(e){const t=Lx(e);return Vx(e)(t.map(wC))}const dr={test:vC,parse:Lx,createTransformer:Vx,getAnimatableNone:SC},TC=new Set(["brightness","contrast","saturate","opacity"]);function EC(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=TC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const CC=/\b([a-z-]*)\(.*?\)/gu,Lu={...dr,getAnimatableNone:e=>{const t=e.match(CC);return t?t.map(EC).join(" "):e}},RC={...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},zx=e=>RC[e];function $x(e,t){let n=zx(e);return n!==Lu&&(n=dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const kC=new Set(["auto","none","0"]);function PC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!kC.has(i)&&ea(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=$x(n,o)}const Lr=e=>e*180/Math.PI,Vu=e=>{const t=Lr(Math.atan2(e[1],e[0]));return zu(t)},AC={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},zu=e=>(e=e%360,e<0&&(e+=360),e),Zh=Vu,Xh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Qh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),IC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xh,scaleY:Qh,scale:e=>(Xh(e)+Qh(e))/2,rotateX:e=>zu(Lr(Math.atan2(e[6],e[5]))),rotateY:e=>zu(Lr(Math.atan2(-e[2],e[0]))),rotateZ:Zh,rotate:Zh,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 Jh(e){return e.includes("scale")?1:0}function $u(e,t){if(!e||e==="none")return Jh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=IC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=AC,o=s}if(!o)return Jh(t);const i=r[t],a=o[1].split(",").map(OC);return typeof i=="function"?i(a):a[i]}const _C=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return $u(n,t)};function OC(e){return parseFloat(e.trim())}const em=e=>e===li||e===Se,MC=new Set(["x","y","z"]),DC=si.filter(e=>!MC.has(e));function jC(e){const t=[];return DC.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})=>$u(t,"x"),y:(e,{transform:t})=>$u(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const Br=new Set;let Bu=!1,Hu=!1;function Bx(){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=jC(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 Hx(){Br.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hu=!0)})}function NC(){Hx(),Bx()}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,nt.read(Hx),nt.resolveKeyframes(Bx))):(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 Wx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),FC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function LC(e){const t=FC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const VC=4;function qx(e,t,n=1){dn(n<=VC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=LC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Wx(a)?parseFloat(a):a}return Jd(o)?qx(o,t,n+1):o}const Ux=e=>t=>t.test(e),zC={test:e=>e==="auto",parse:e=>e},Yx=[li,Se,_n,or,PE,kE,zC],tm=e=>Yx.find(Ux(e));class Gx 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=qx(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!xx.has(r)||t.length!==2)return;const[o,i]=t,a=tm(o),s=tm(i);if(a!==s)if(em(a)&&em(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++)dC(t[o])&&r.push(o);r.length&&PC(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 nm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dr.test(e)||e==="0")&&!e.startsWith("url("));function $C(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 BC(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=nm(o,t),s=nm(i,t);return ai(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:$C(e)||(n==="spring"||cl(n))&&r}const HC=e=>e!==null;function ul(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(HC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const WC=40;class Kx{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>WC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&NC(),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&&!BC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(ul(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 ps=2e4;function xf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ps;)t+=n,r=e.next(t);return t>=ps?1/0:t}const st=(e,t,n)=>e+(t-e)*n;function _c(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 qC({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=_c(l,s,e+1/3),i=_c(l,s,e),a=_c(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function hs(e,t){return n=>n>0?t:e}const Oc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},UC=[Fu,Fr,bo],YC=e=>UC.find(t=>t.test(e));function rm(e){const t=YC(e);if(ai(!!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=qC(n)),n}const om=(e,t)=>{const n=rm(e),r=rm(t);if(!n||!r)return hs(e,t);const o={...n};return i=>(o.red=Oc(n.red,r.red,i),o.green=Oc(n.green,r.green,i),o.blue=Oc(n.blue,r.blue,i),o.alpha=st(n.alpha,r.alpha,i),Fr.transform(o))},GC=(e,t)=>n=>t(e(n)),ba=(...e)=>e.reduce(GC),Wu=new Set(["none","hidden"]);function KC(e,t){return Wu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ZC(e,t){return n=>st(e,t,n)}function bf(e){return typeof e=="number"?ZC:typeof e=="string"?Jd(e)?hs:Nt.test(e)?om:JC:Array.isArray(e)?Zx:typeof e=="object"?Nt.test(e)?om:XC:hs}function Zx(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 XC(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 QC(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 JC=(e,t)=>{const n=dr.createTransformer(t),r=ea(e),o=ea(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?KC(e,t):ba(Zx(QC(r,o),o.values),n):(ai(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),hs(e,t))};function Xx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?st(e,t,n):bf(e)(e,t)}const eR=5;function Qx(e,t,n){const r=Math.max(t-eR,0);return bx(n-e(r),t-r)}const ht={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},im=.001;function tR({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;ai(e<=yn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=qn(ht.minDamping,ht.maxDamping,a),e=qn(ht.minDuration,ht.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 im-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)+im>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=rR(o,i,s);if(e=yn(e),isNaN(l))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const nR=12;function rR(e,t,n){let r=n;for(let o=1;o<nR;o++)r=r-e(r)/t(r);return r}function qu(e,t){return e*Math.sqrt(1-t*t)}const oR=["duration","bounce"],iR=["stiffness","damping","mass"];function am(e,t){return t.some(n=>e[n]!==void 0)}function aR(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!am(e,iR)&&am(e,oR))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:ht.mass,stiffness:o,damping:i}}else{const n=tR(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function wf(e=ht.visualDuration,t=ht.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}=aR({...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?ht.restSpeed.granular:ht.restSpeed.default),o||(o=y?ht.restDelta.granular:ht.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):Qx(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),ps),S=Tx(C=>T.next(w*C).value,w,30);return w+"ms "+S}};return T}function sm({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:Qx(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 sR=xa(.42,0,1,1),lR=xa(0,0,.58,1),Jx=xa(.42,0,.58,1),eb=e=>Array.isArray(e)&&typeof e[0]!="number",lm={linear:Yt,easeIn:sR,easeInOut:Jx,easeOut:lR,circIn:mf,circInOut:Mx,circOut:Ox,backIn:hf,backInOut:Ix,backOut:Ax,anticipate:_x},Uu=e=>{if(pf(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return xa(t,n,r,o)}else if(typeof e=="string")return dn(lm[e]!==void 0,`Invalid easing type '${e}'`),lm[e];return e};function cR(e,t,n){const r=[],o=n||Xx,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=ba(l,s)}r.push(s)}return r}function tb(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=cR(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 nb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wr(0,t,r);e.push(st(n,1,o))}}function rb(e){const t=[0];return nb(t,e.length-1),t}function uR(e,t){return e.map(n=>n*t)}function dR(e,t){return e.map(()=>t||Jx).splice(0,e.length-1)}function Ni({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=eb(r)?r.map(Uu):Uu(r),i={done:!1,value:t[0]},a=uR(n&&n.length===t.length?n:rb(t),e),s=tb(a,t,{ease:Array.isArray(o)?o:dR(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const fR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>nt.update(t,!0),stop:()=>Wn(t),now:()=>Mt.isProcessing?Mt.timestamp:On.now()}},pR={decay:sm,inertia:sm,tween:Ni,keyframes:Ni,spring:wf},hR=e=>e/100;class Sf extends Kx{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=cl(n)?n:pR[n]||Ni;let l,c;process.env.NODE_ENV!=="production"&&s!==Ni&&dn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Ni&&typeof t[0]!="number"&&(l=ba(hR,Xx(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=ul(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=fR,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 mR=new Set(["opacity","clipPath","filter","transform"]);function gR(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=Cx(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 vR=ff(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ms=10,yR=2e4;function xR(e){return cl(e.type)||e.type==="spring"||!Ex(e.ease)}function bR(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<yR;)r=n.sample(i),o.push(r.value),i+=ms;return{times:void 0,keyframes:o,duration:i-ms,ease:"linear"}}const ob={anticipate:_x,backInOut:Ix,circInOut:Mx};function wR(e){return e in ob}class cm extends Kx{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new Gx(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"&&fs()&&wR(i)&&(i=ob[i]),xR(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=bR(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=gR(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Gh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(ul(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;Gh(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-ms).value,m.sample(g).value,ms)}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 vR()&&r&&mR.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const SR={type:"spring",stiffness:500,damping:25,restSpeed:10},TR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ER={type:"keyframes",duration:.8},CR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RR=(e,{keyframes:t})=>t.length>2?ER:eo.has(e)?e.startsWith("scale")?TR(t[1]):SR:CR;function kR({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};kR(s)||(u={...u,...RR(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=ul(u.keyframes,s);if(p!==void 0)return nt.update(()=>{u.onUpdate(p),u.onComplete()}),new Sx([])}return!i&&cm.supports(u)?new cm(u):new Sf(u)};function PR({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&&PR(u,d))continue;const m={delay:n,...cf(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=wx(e);if(v){const y=window.MotionHandoffAnimation(v,d,nt);y!==null&&(m.startTime=y,g=!0)}}ju(e,d),p.start(Tf(d,p,f,e.shouldReduceMotion&&xx.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return s&&Promise.all(c).then(()=>{nt.update(()=>{s&&nC(e,s)})}),c}function Yu(e,t,n={}){var r;const o=Ji(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 AR(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 AR(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(IR).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 IR(e,t){return e.sortNodePosition(t)}function _R(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"?Ji(e,t,n.custom):t;r=Promise.all(Ef(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function ib(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 OR=Kd.length;function ab(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ab(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<OR;n++){const r=Kd[n],o=e.props[r];(Zi(o)||o===!1)&&(t[r]=o)}return t}const MR=[...Gd].reverse(),DR=Gd.length;function jR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>_R(e,n,r)))}function NR(e){let t=jR(e),n=um(),r=!0;const o=l=>(c,u)=>{var d;const p=Ji(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=ab(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<DR;h++){const v=MR[h],y=n[v],b=c[v]!==void 0?c[v]:u[v],T=Zi(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||al(b)||typeof b=="boolean")continue;const C=FR(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:j={}}=y,V={...j,...O},P=L=>{R=!0,p.has(L)&&(I=!0,p.delete(L)),y.needsAnimating[L]=!0;const N=e.getValue(L);N&&(N.liveStyle=!1)};for(const L in V){const N=O[L],z=j[L];if(f.hasOwnProperty(L))continue;let M=!1;Du(N)&&Du(z)?M=!ib(N,z):M=N!==z,M?N!=null?P(L):p.add(L):N!==void 0&&p.has(L)?P(L):y.protectedKeys[L]=!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(L=>({animation:L,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=Ji(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=um(),r=!0}}}function FR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ib(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function um(){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 LR extends yr{constructor(t){super(t),t.animationState||(t.animationState=NR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();al(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 VR=0;class zR extends yr{constructor(){super(...arguments),this.id=VR++}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 $R={animation:{Feature:LR},exit:{Feature:zR}},mn={x:!1,y:!1};function sb(){return mn.x||mn.y}function BR(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 ta(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 wa(e){return{point:{x:e.pageX,y:e.pageY}}}const HR=e=>t=>Cf(t)&&e(t,wa(t));function Fi(e,t,n,r){return ta(e,t,HR(n),r)}function lb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function WR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function qR(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 cb=1e-4,UR=1-cb,YR=1+cb,ub=.01,GR=0-ub,KR=0+ub;function $t(e){return e.max-e.min}function ZR(e,t,n){return Math.abs(e-t)<=n}function dm(e,t,n,r=.5){e.origin=r,e.originPoint=st(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=st(n.min,n.max,e.origin)-e.originPoint,(e.scale>=UR&&e.scale<=YR||isNaN(e.scale))&&(e.scale=1),(e.translate>=GR&&e.translate<=KR||isNaN(e.translate))&&(e.translate=0)}function Li(e,t,n,r){dm(e.x,t.x,n.x,r?r.originX:void 0),dm(e.y,t.y,n.y,r?r.originY:void 0)}function fm(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function XR(e,t,n){fm(e.x,t.x,n.x),fm(e.y,t.y,n.y)}function pm(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function Vi(e,t,n){pm(e.x,t.x,n.x),pm(e.y,t.y,n.y)}const hm=()=>({translate:0,scale:1,origin:0,originPoint:0}),wo=()=>({x:hm(),y:hm()}),mm=()=>({min:0,max:0}),gt=()=>({x:mm(),y:mm()});function an(e){return[e("x"),e("y")]}function Mc(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:n}){return!Mc(e)||!Mc(t)||!Mc(n)}function _r(e){return Gu(e)||db(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function db(e){return gm(e.x)||gm(e.y)}function gm(e){return e&&e!=="0%"}function gs(e,t,n){const r=e-n,o=t*r;return n+o}function vm(e,t,n,r,o){return o!==void 0&&(e=gs(e,o,r)),gs(e,n,r)+t}function Ku(e,t=0,n=1,r,o){e.min=vm(e.min,t,n,r,o),e.max=vm(e.max,t,n,r,o)}function fb(e,{x:t,y:n}){Ku(e.x,t.translate,t.scale,t.originPoint),Ku(e.y,n.translate,n.scale,n.originPoint)}const ym=.999999999999,xm=1.0000000000001;function QR(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,fb(e,a)),r&&_r(i.latestValues)&&To(e,i.latestValues))}t.x<xm&&t.x>ym&&(t.x=1),t.y<xm&&t.y>ym&&(t.y=1)}function So(e,t){e.min=e.min+t,e.max=e.max+t}function bm(e,t,n,r,o=.5){const i=st(e.min,e.max,o);Ku(e,t,n,i,r)}function To(e,t){bm(e.x,t.x,t.scaleX,t.scale,t.originX),bm(e.y,t.y,t.scaleY,t.scale,t.originY)}function pb(e,t){return lb(qR(e.getBoundingClientRect(),t))}function JR(e,t,n){const r=pb(e,n),{scroll:o}=t;return o&&(So(r.x,o.offset.x),So(r.y,o.offset.y)),r}const hb=({current:e})=>e?e.ownerDocument.defaultView:null,wm=(e,t)=>Math.abs(e-t);function ek(e,t){const n=wm(e.x,t.x),r=wm(e.y,t.y);return Math.sqrt(n**2+r**2)}class mb{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=jc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=ek(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=Dc(p,this.transformPagePoint),nt.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=jc(d.type==="pointercancel"?this.lastMoveEventInfo:Dc(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=wa(t),s=Dc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,jc(s,this.history)),this.removeListeners=ba(Fi(this.contextWindow,"pointermove",this.handlePointerMove),Fi(this.contextWindow,"pointerup",this.handlePointerUp),Fi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wn(this.updatePoint)}}function Dc(e,t){return t?{point:t(e.point)}:e}function Sm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jc({point:e},t){return{point:e,delta:Sm(e,gb(t)),offset:Sm(e,tk(t)),velocity:nk(t,.1)}}function tk(e){return e[0]}function gb(e){return e[e.length-1]}function nk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=gb(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 rk(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?st(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?st(n,e,r.max):Math.min(e,n)),e}function Tm(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 ok(e,{top:t,left:n,bottom:r,right:o}){return{x:Tm(e.x,n,o),y:Tm(e.y,t,r)}}function Em(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 ik(e,t){return{x:Em(e.x,t.x),y:Em(e.y,t.y)}}function ak(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 sk(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 lk(e=Zu){return e===!1?e=0:e===!0&&(e=Zu),{x:Cm(e,"left","right"),y:Cm(e,"top","bottom")}}function Cm(e,t,n){return{min:Rm(e,t),max:Rm(e,n)}}function Rm(e,t){return typeof e=="number"?e:e[t]||0}const ck=new WeakMap;class uk{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=gt(),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(wa(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=BR(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=$t(b)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&nt.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=dk(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 mb(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:hb(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&&nt.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||!La(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=rk(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=ok(o.layoutBox,n):this.constraints=!1,this.elastic=lk(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=sk(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=JR(r,o.root,this.visualElement.getTransformPagePoint());let a=ik(o.layout.layoutBox,i);if(n){const s=n(WR(a));this.hasMutatedConstraints=!!s,s&&(a=lb(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(!La(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(!La(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]-st(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]=ak({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(!La(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(st(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;ck.set(this.visualElement,this);const t=this.visualElement.current,n=Fi(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()),nt.read(r);const a=ta(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 La(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function dk(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class fk extends yr{constructor(t){super(t),this.removeGroupControls=Yt,this.removeListeners=Yt,this.controls=new uk(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&&nt.postRender(()=>e(t,n))};class pk extends yr{constructor(){super(...arguments),this.removePointerDownListener=Yt}onPointerDown(t){this.session=new mb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hb(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&&nt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Fi(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 os={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Pm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Si={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=Pm(e,t.target.x),r=Pm(e,t.target.y);return`${n}% ${r}%`}},hk={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=st(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 mk extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;RE(gk),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()})),os.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()||nt.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 vb(e){const[t,n]=Qy(),r=E.useContext(Ki);return x.jsx(mk,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(ax),isPresent:t,safeToRemove:n})}const gk={borderRadius:{...Si,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Si,borderTopRightRadius:Si,borderBottomLeftRadius:Si,borderBottomRightRadius:Si,boxShadow:hk};function yb(e,t,n){const r=Pt(e)?e:No(e);return r.start(Tf("",r,t,n)),r.animation}function xb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const vk=(e,t)=>e.depth-t.depth;class yk{constructor(){this.children=[],this.isDirty=!1}add(t){uf(this.children,t),this.isDirty=!0}remove(t){ll(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(vk),this.isDirty=!1,this.children.forEach(t)}}function xk(e,t){const n=On.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wn(r),e(i-t))};return nt.read(r,!0),()=>Wn(r)}const bb=["TopLeft","TopRight","BottomLeft","BottomRight"],bk=bb.length,Am=e=>typeof e=="string"?parseFloat(e):e,Im=e=>typeof e=="number"||Se.test(e);function wk(e,t,n,r,o,i){o?(e.opacity=st(0,n.opacity!==void 0?n.opacity:1,Sk(r)),e.opacityExit=st(t.opacity!==void 0?t.opacity:1,0,Tk(r))):i&&(e.opacity=st(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<bk;a++){const s=`border${bb[a]}Radius`;let l=_m(t,s),c=_m(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Im(l)===Im(c)?(e[s]=Math.max(st(Am(l),Am(c),r),0),(_n.test(c)||_n.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=st(t.rotate||0,n.rotate||0,r))}function _m(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Sk=wb(0,.5,Ox),Tk=wb(.5,.95,Yt);function wb(e,t,n){return r=>r<e?0:r>t?1:n(Wr(e,t,r))}function Om(e,t){e.min=t.min,e.max=t.max}function rn(e,t){Om(e.x,t.x),Om(e.y,t.y)}function Mm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Dm(e,t,n,r,o){return e-=t,e=gs(e,1/n,r),o!==void 0&&(e=gs(e,1/o,r)),e}function Ek(e,t=0,n=1,r=.5,o,i=e,a=e){if(_n.test(t)&&(t=parseFloat(t),t=st(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=st(i.min,i.max,r);e===i&&(s-=t),e.min=Dm(e.min,t,n,s,o),e.max=Dm(e.max,t,n,s,o)}function jm(e,t,[n,r,o],i,a){Ek(e,t[n],t[r],t[o],t.scale,i,a)}const Ck=["x","scaleX","originX"],Rk=["y","scaleY","originY"];function Nm(e,t,n,r){jm(e.x,t,Ck,n?n.x:void 0,r?r.x:void 0),jm(e.y,t,Rk,n?n.y:void 0,r?r.y:void 0)}function Fm(e){return e.translate===0&&e.scale===1}function Sb(e){return Fm(e.x)&&Fm(e.y)}function Lm(e,t){return e.min===t.min&&e.max===t.max}function kk(e,t){return Lm(e.x,t.x)&&Lm(e.y,t.y)}function Vm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Tb(e,t){return Vm(e.x,t.x)&&Vm(e.y,t.y)}function zm(e){return $t(e.x)/$t(e.y)}function $m(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Pk{constructor(){this.members=[]}add(t){uf(this.members,t),t.scheduleRender()}remove(t){if(ll(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 Ak(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 Nc=["","X","Y","Z"],Ik={visibility:"hidden"},Bm=1e3;let _k=0;function Fc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Eb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",nt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Eb(r)}function Cb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=_k++,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(Dk),this.nodes.forEach(Vk),this.nodes.forEach(zk),this.nodes.forEach(jk)},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 yk)}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=xb(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=xk(p,250),os.hasAnimatedSinceResize&&(os.hasAnimatedSinceResize=!1,this.nodes.forEach(Wm))})}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()||qk,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!Tb(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||Wm(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($k),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&&Eb(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(Hm);return}this.isUpdating||this.nodes.forEach(Fk),this.isUpdating=!1,this.nodes.forEach(Lk),this.nodes.forEach(Ok),this.nodes.forEach(Mk),this.clearAllSnapshots();const s=On.now();Mt.delta=qn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Ac.update.process(Mt),Ac.preRender.process(Mt),Ac.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Nk),this.sharedNodes.forEach(Bk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){nt.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=gt(),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||_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)),Uk(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return gt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(Yk))){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=gt();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=gt();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=gt();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=gt(),d=c.measurePageBox();rn(u,d),Nm(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return _r(this.latestValues)&&Nm(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=gt(),this.relativeTargetOrigin=gt(),Vi(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=gt(),this.targetWithTransforms=gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),XR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),fb(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=gt(),this.relativeTargetOrigin=gt(),Vi(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)||db(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;QR(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=gt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Mm(this.prevProjectionDelta.x,this.projectionDelta.x),Mm(this.prevProjectionDelta.y,this.projectionDelta.y)),Li(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=gt(),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(Wk));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const w=T/1e3;qm(d.x,a.x,w),qm(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Hk(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&kk(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=gt()),rn(b,this.relativeTarget)),g&&(this.animationValues=u,wk(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=nt.update(()=>{os.hasAnimatedSinceResize=!0,this.currentAnimation=yb(0,Bm,{...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(Bm),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&&Rb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||gt();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),Li(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Pk),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&&Fc("z",a,c,this.animationValues);for(let u=0;u<Nc.length;u++)Fc(`rotate${Nc[u]}`,a,c,this.animationValues),Fc(`skew${Nc[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 Ik;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ns(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=ns(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=Ak(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 Xi){if(p[g]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:y}=Xi[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?ns(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(Hm),this.root.sharedNodes.clear()}}}function Ok(e){e.updateLayout()}function Mk(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}):Rb(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=wo();Li(s,r,n.layoutBox);const l=wo();a?Li(l,e.applyTransform(o,!0),n.measuredBox):Li(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 m=gt();Vi(m,n.layoutBox,p.layoutBox);const g=gt();Vi(g,r,f.layoutBox),Tb(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 Dk(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 jk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Nk(e){e.clearSnapshot()}function Hm(e){e.clearMeasurements()}function Fk(e){e.isLayoutDirty=!1}function Lk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Vk(e){e.resolveTargetDelta()}function zk(e){e.calcProjection()}function $k(e){e.resetSkewAndRotation()}function Bk(e){e.removeLeadSnapshot()}function qm(e,t,n){e.translate=st(t.translate,0,n),e.scale=st(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Um(e,t,n,r){e.min=st(t.min,n.min,r),e.max=st(t.max,n.max,r)}function Hk(e,t,n,r){Um(e.x,t.x,n.x,r),Um(e.y,t.y,n.y,r)}function Wk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qk={duration:.45,ease:[.4,0,.1,1]},Ym=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gm=Ym("applewebkit/")&&!Ym("chrome/")?Math.round:Yt;function Km(e){e.min=Gm(e.min),e.max=Gm(e.max)}function Uk(e){Km(e.x),Km(e.y)}function Rb(e,t,n){return e==="position"||e==="preserve-aspect"&&!ZR(zm(t),zm(n),.2)}function Yk(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Gk=Cb({attachResizeListener:(e,t)=>ta(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Lc={current:void 0},kb=Cb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Lc.current){const e=new Gk({});e.mount(window),e.setOptions({layoutScroll:!0}),Lc.current=e}return Lc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Kk={pan:{Feature:pk},drag:{Feature:fk,ProjectionNode:kb,MeasureLayout:vb}};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 Ab(e,t){const n=Pb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Zm(e){return!(e.pointerType==="touch"||sb())}function Zk(e,t,n={}){const[r,o,i]=Ab(e,n),a=s=>{if(!Zm(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Zm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Xm(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&&nt.postRender(()=>i(t,wa(t)))}class Xk extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=Zk(t,(n,r)=>(Xm(this.node,r,"Start"),o=>Xm(this.node,o,"End"))))}unmount(){}}class Qk 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=ba(ta(this.node.current,"focus",()=>this.onFocus()),ta(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ib=(e,t)=>t?e===t?!0:Ib(e,t.parentElement):!1,Jk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eP(e){return Jk.has(e.tagName)||e.tabIndex!==-1}const Pi=new WeakSet;function Qm(e){return t=>{t.key==="Enter"&&e(t)}}function Vc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Qm(()=>{if(Pi.has(n))return;Vc(n,"down");const o=Qm(()=>{Vc(n,"up")}),i=()=>Vc(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 Jm(e){return Cf(e)&&!sb()}function nP(e,t,n={}){const[r,o,i]=Ab(e,n),a=s=>{const l=s.currentTarget;if(!Jm(s)||Pi.has(l))return;Pi.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Jm(f)||!Pi.has(l))&&(Pi.delete(l),typeof c=="function"&&c(f,{success:m}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Ib(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=>tP(c,o)),!eP(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function eg(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&&nt.postRender(()=>i(t,wa(t)))}class rP extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=nP(t,(n,r)=>(eg(this.node,r,"Start"),(o,{success:i})=>eg(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xu=new WeakMap,zc=new WeakMap,oP=e=>{const t=Xu.get(e.target);t&&t(e)},iP=e=>{e.forEach(oP)};function aP({root:e,...t}){const n=e||document;zc.has(n)||zc.set(n,{});const r=zc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(iP,{root:e,...t})),r[o]}function sP(e,t,n){const r=aP(t);return Xu.set(e,n),r.observe(e),()=>{Xu.delete(e),r.unobserve(e)}}const lP={some:0,all:1};class cP 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:lP[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 sP(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(uP(t,n))&&this.startObserver()}unmount(){}}function uP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const dP={inView:{Feature:cP},tap:{Feature:rP},focus:{Feature:Qk},hover:{Feature:Xk}},fP={layout:{ProjectionNode:kb,MeasureLayout:vb}},Qu={current:null},_b={current:!1};function pP(){if(_b.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 hP=[...Yx,Nt,dr],mP=e=>hP.find(Ux(e)),na=new WeakMap;function gP(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"&&ol(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 tg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ob{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,nt.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=sl(n),this.isVariantNode=ox(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,na.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)),_b.current||pP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qu.current,process.env.NODE_ENV!=="production"&&ol(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&&nt.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):gt()}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<tg.length;r++){const o=tg[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=gP(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"&&(Wx(o)||Dx(o))?o=parseFloat(o):!mP(o)&&dr.test(n)&&(o=$x(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 Mb extends Ob{constructor(){super(...arguments),this.KeyframeResolver=Gx}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 vP(e){return window.getComputedStyle(e)}class Db extends Mb{constructor(){super(...arguments),this.type="html",this.renderInstance=mx}readValueFromInstance(t,n){if(eo.has(n))return _C(t,n);{const r=vP(t),o=(Qd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return pb(t,n)}build(t,n,r){tf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return lf(t,n,r)}}class jb extends Mb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&hx(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(eo.has(n)){const r=zx(n);return r&&r.default||0}return n=gx.has(n)?n:Xd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return yx(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&nt.postRender(this.updateDimensions)}build(t,n,r){of(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){vx(t,n,r,o)}mount(t){this.isSVGTag=af(t.tagName),super.mount(t)}}const yP=(e,t)=>rf(e)?new jb(t):new Db(t,{allowProjection:e!==E.Fragment}),xP=ZE({...$R,...dP,...Kk,...fP},yP),ft=fE(xP);function bP(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 Nb(e,t){const n=Lo(t()),r=()=>n.set(t());return r(),nl(()=>{const o=()=>nt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Wn(r)}}),n}const wP=e=>e&&typeof e=="object"&&e.mix,SP=e=>wP(e)?e.mix:void 0;function TP(...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=tb(o,i,{mixer:SP(i[0]),...a});return t?s(r):s}function EP(e){Di.current=[],e();const t=Nb(Di.current,e);return Di.current=void 0,t}function CP(e,t,n,r){if(typeof e=="function")return EP(e);const o=typeof t=="function"?t:TP(t,n,r);return Array.isArray(e)?ng(e,o):ng([e],([i])=>o(i))}function ng(e,t){const n=bn(()=>[]);return Nb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function RP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(xf(r),ps);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Mn(o)}}const kP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Fb(e,t){return eb(e)?e[kP(0,e.length,t)]:e}function Rf(e){return typeof e=="object"&&!Array.isArray(e)}function Lb(e,t,n,r){return typeof e=="string"&&Rf(t)?Pb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function PP(e,t,n){return e*(t+1)}function rg(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 AP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ll(e,o),r--)}}function IP(e,t,n,r,o,i){AP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:st(o,i,r[a]),easing:Fb(n,a)})}function _P(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function OP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const MP="easeInOut",DP=20;function jP(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,rg(d,m.at,u,c));continue}let[g,h,v={}]=m;v.at!==void 0&&(d=rg(d,v.at,u,c));let y=0;const b=(T,w,S,C=0,R=0)=>{const I=NP(T),{delay:A=0,times:O=rb(I),type:j="keyframes",repeat:V,repeatType:P,repeatDelay:D=0,..._}=w;let{ease:L=t.ease||"easeOut",duration:N}=w;const z=typeof A=="function"?A(C,R):A,M=I.length,B=cl(j)?j:o==null?void 0:o[j];if(M<=2&&B){let Z=100;if(M===2&&VP(I)){const F=I[1]-I[0];Z=Math.abs(F)}const G={..._};N!==void 0&&(G.duration=yn(N));const K=RP(G,Z,B);L=K.ease,N=K.duration}N??(N=i);const Q=d+z;O.length===1&&O[0]===0&&(O[1]=1);const ee=O.length-I.length;if(ee>0&&nb(O,ee),I.length===1&&I.unshift(null),V){dn(V<DP,"Repeat count too high, must be less than 20"),N=PP(N,V);const Z=[...I],G=[...O];L=Array.isArray(L)?[...L]:[L];const K=[...L];for(let F=0;F<V;F++){I.push(...Z);for(let $=0;$<Z.length;$++)O.push(G[$]+(F+1)),L.push($===0?"linear":Fb(K,$-1))}_P(O,V)}const X=Q+N;IP(S,I,L,O,Q,X),y=Math.max(z+N,y),p=Math.max(X,p)};if(Pt(g)){const T=og(g,s);b(h,v,ig("default",T))}else{const T=Lb(g,h,r,l),w=T.length;for(let S=0;S<w;S++){h=h,v=v;const C=T[S],R=og(C,s);for(const I in h)b(h[I],FP(v,I),ig(I,R),S,w)}}u=d,d+=y}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(OP);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(MP)),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 og(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ig(e,t){return t[e]||(t[e]=[]),t[e]}function NP(e){return Array.isArray(e)?e:[e]}function FP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const LP=e=>typeof e=="number",VP=e=>e.every(LP);function zP(e,t){return e in t}class $P extends Ob{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(zP(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 gt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function BP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=xb(e)?new jb(t):new Db(t);n.mount(e),na.set(e,n)}function HP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new $P(t);n.mount(e),na.set(e,n)}function WP(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!Rf(t)}function Vb(e,t,n,r){const o=[];if(WP(e,t))o.push(yb(e,Rf(t)&&t.default||t,n&&(n.default||n)));else{const i=Lb(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?BP:HP;na.has(l)||c(l);const u=na.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 qP(e,t,n){const r=[];return jP(e,t,n,{spring:wf}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Vb(s,i,a))}),r}function UP(e){return Array.isArray(e)&&e.some(Array.isArray)}function YP(e){function t(n,r,o){let i=[];UP(n)?i=qP(n,r,e):i=Vb(n,r,o,e);const a=new Sx(i);return e&&e.animations.push(a),a}return t}function GP(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>YP(e));return bP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class KP{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 ZP=()=>new KP;function XP(){return bn(ZP)}function QP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function JP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:QP(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 zb=E.createContext(null);function eA(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=st(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?XE(e,o,o+i):e}function tA({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>ft[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(rA)},updateOrder:(d,p,f)=>{if(c.current)return;const m=eA(l,d,p,f);l!==m&&(c.current=!0,r(m.map(nA).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(zb.Provider,{value:u,children:e})})}const $b=E.forwardRef(tA);function nA(e){return e.value}function rA(e,t){return e.layout.min-t.layout.min}function ag(e,t=0){return Pt(e)?e:Lo(t)}function oA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>ft[r]),c=E.useContext(zb),u={x:ag(t.x),y:ag(t.y)},d=CP([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 Bb=E.forwardRef(oA);/**
|
|
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
|
|
17
|
+
*/const iA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),sg=e=>{const t=aA(e);return t.charAt(0).toUpperCase()+t.slice(1)},Hb=(...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
|
|
22
|
+
*/var sA={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
|
|
27
|
+
*/const lA=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,...sA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Hb("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(
|
|
32
|
+
*/const Et=(e,t)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(lA,{ref:i,iconNode:t,className:Hb(`lucide-${iA(sg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=sg(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
|
|
37
|
+
*/const cA=[["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"}]],uA=Et("arrow-down-0-1",cA);/**
|
|
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
|
|
42
|
+
*/const dA=[["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"}]],fA=Et("arrow-up-0-1",dA);/**
|
|
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
|
|
47
|
+
*/const pA=[["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"}]],Wb=Et("arrow-up-down",pA);/**
|
|
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
|
|
52
|
+
*/const hA=[["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"}]],mA=Et("calendar",hA);/**
|
|
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
|
|
57
|
+
*/const gA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kf=Et("chevron-down",gA);/**
|
|
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
|
|
62
|
+
*/const vA=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],yA=Et("chevron-left",vA);/**
|
|
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
|
|
67
|
+
*/const xA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pf=Et("chevron-right",xA);/**
|
|
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
|
|
72
|
+
*/const bA=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],qb=Et("circle-check-big",bA);/**
|
|
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
|
|
77
|
+
*/const wA=[["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"}]],SA=Et("circle-x",wA);/**
|
|
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
|
|
82
|
+
*/const TA=[["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"}]],Ub=Et("file",TA);/**
|
|
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
|
|
87
|
+
*/const EA=[["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"}]],CA=Et("grip-vertical",EA);/**
|
|
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
|
|
92
|
+
*/const RA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Yb=Et("info",RA);/**
|
|
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
|
|
97
|
+
*/const kA=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],PA=Et("list-filter",kA);/**
|
|
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
|
|
102
|
+
*/const AA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Af=Et("plus",AA);/**
|
|
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
|
|
107
|
+
*/const IA=[["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"}]],_A=Et("search-check",IA);/**
|
|
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
|
|
112
|
+
*/const OA=[["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"}]],MA=Et("search-x",OA);/**
|
|
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
|
|
117
|
+
*/const DA=[["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",DA);/**
|
|
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
|
|
122
|
+
*/const jA=[["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"}]],NA=Et("triangle-alert",jA);/**
|
|
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
|
|
127
|
+
*/const FA=[["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"}]],LA=Et("ungroup",FA);/**
|
|
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
|
|
132
|
+
*/const VA=[["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"}]],zA=Et("upload",VA);/**
|
|
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 VA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dl=Et("x",VA),lg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},zA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Gb=e=>x.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:lg,exit:lg.false,transition:zA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ne("aria-hidden:pointer-events-none",e.className),children:e.children}),$A=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"}}),BA=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:Ne("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Gb,{"data-open":!!i,open:!!i,children:x.jsxs(cn,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Ne($A({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(qb,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?x.jsx(Yb,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?x.jsx(DA,{"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(dl,{size:20})}):null]})})})}),Kb=6048e5,HA=864e5,WA=6e4,qA=36e5,UA=1e3,cg=Symbol.for("constructDateFrom");function it(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&cg in e?e[cg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qe(e,t){return it(t||e,e)}function fl(e,t,n){const r=Qe(e,n==null?void 0:n.in);return isNaN(t)?it((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Zb(e,t,n){const r=Qe(e,n==null?void 0:n.in);if(isNaN(t))return it(e,NaN);if(!t)return r;const o=r.getDate(),i=it(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=Qe(e,n==null?void 0:n.in),d=o||r?Zb(u,o+r*12):u,p=a||i?fl(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return it(e,+p+g)}let YA={};function to(){return YA}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=Qe(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 zo(e,t){return jn(e,{...t,weekStartsOn:1})}function Xb(e,t){const n=Qe(e,t==null?void 0:t.in),r=n.getFullYear(),o=it(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=zo(o),a=it(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=zo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function vs(e){const t=Qe(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 pl(e,...t){const n=it.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function $o(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function GA(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t),i=$o(r),a=$o(o),s=+i-vs(i),l=+a-vs(a);return Math.round((s-l)/HA)}function KA(e,t){const n=Xb(e,t),r=it(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),zo(r)}function ZA(e){return it(e,Date.now())}function XA(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return+$o(r)==+$o(o)}function QA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Qb(e){return!(!QA(e)&&typeof e!="number"||isNaN(+Qe(e)))}function JA(e,t){const[n,r]=pl(e,t.start,t.end);return{start:n,end:r}}function Jb(e,t){const{start:n,end:r}=JA(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(it(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function e0(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function eI(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function tI(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=Qe(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 nI={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"}},rI=(e,t,n)=>{let r;const o=nI[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 oI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},aI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sI={date:$c({formats:oI,defaultWidth:"full"}),time:$c({formats:iI,defaultWidth:"full"}),dateTime:$c({formats:aI,defaultWidth:"full"})},lI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cI=(e,t,n,r)=>lI[e];function Ti(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 uI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},dI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fI={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"]},pI={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"]},hI={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"}},mI={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"}},gI=(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"},vI={ordinalNumber:gI,era:Ti({values:uI,defaultWidth:"wide"}),quarter:Ti({values:dI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ti({values:fI,defaultWidth:"wide"}),day:Ti({values:pI,defaultWidth:"wide"}),dayPeriod:Ti({values:hI,defaultWidth:"wide",formattingValues:mI,defaultFormattingWidth:"wide"})};function Ei(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)?xI(s,d=>d.test(a)):yI(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 yI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function xI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function bI(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 wI=/^(\d+)(th|st|nd|rd)?/i,SI=/\d+/i,TI={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},EI={any:[/^b/i,/^(a|c)/i]},CI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},RI={any:[/1/i,/2/i,/3/i,/4/i]},kI={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},PI={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]},AI={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},II={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_I={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},OI={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}},MI={ordinalNumber:bI({matchPattern:wI,parsePattern:SI,valueCallback:e=>parseInt(e,10)}),era:Ei({matchPatterns:TI,defaultMatchWidth:"wide",parsePatterns:EI,defaultParseWidth:"any"}),quarter:Ei({matchPatterns:CI,defaultMatchWidth:"wide",parsePatterns:RI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ei({matchPatterns:kI,defaultMatchWidth:"wide",parsePatterns:PI,defaultParseWidth:"any"}),day:Ei({matchPatterns:AI,defaultMatchWidth:"wide",parsePatterns:II,defaultParseWidth:"any"}),dayPeriod:Ei({matchPatterns:_I,defaultMatchWidth:"any",parsePatterns:OI,defaultParseWidth:"any"})},t0={code:"en-US",formatDistance:rI,formatLong:sI,formatRelative:cI,localize:vI,match:MI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function DI(e,t){const n=Qe(e,t==null?void 0:t.in);return GA(n,eI(n))+1}function n0(e,t){const n=Qe(e,t==null?void 0:t.in),r=+zo(n)-+KA(n);return Math.round(r/Kb)+1}function If(e,t){var u,d,p,f;const n=Qe(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=it((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=it((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 jI(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=it((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),jn(i,t)}function r0(e,t){const n=Qe(e,t==null?void 0:t.in),r=+jn(n,t)-+jI(n,t);return Math.round(r/Kb)+1}function Ze(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 Ze(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ze(n+1,2)},d(e,t){return Ze(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 Ze(e.getHours()%12||12,t.length)},H(e,t){return Ze(e.getHours(),t.length)},m(e,t){return Ze(e.getMinutes(),t.length)},s(e,t){return Ze(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ze(o,t.length)}},po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ug={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 Ze(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ze(i,t.length)},R:function(e,t){const n=Xb(e);return Ze(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ze(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 Ze(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 Ze(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 Ze(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=r0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ze(o,t.length)},I:function(e,t,n){const r=n0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ze(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=DI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ze(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 Ze(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 Ze(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 Ze(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"}):Ze(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(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 fg(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 fg(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"+dg(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"+dg(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ze(r,t.length)},T:function(e,t,n){return Ze(+e,t.length)}};function dg(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+Ze(i,2)}function fg(e,t){return e%60===0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ze(Math.trunc(r/60),2),i=Ze(r%60,2);return n+o+t+i}const pg=(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"})}},o0=(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"})}},NI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return pg(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}}",pg(r,t)).replace("{{time}}",o0(o,t))},Ju={p:o0,P:NI},FI=/^D+$/,LI=/^Y+$/,VI=["D","DD","YY","YYYY"];function i0(e){return FI.test(e)}function a0(e){return LI.test(e)}function ed(e,t,n){const r=zI(e,t,n);if(console.warn(r),VI.includes(e))throw new RangeError(r)}function zI(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 $I=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,BI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HI=/^'([^]*?)'?$/,WI=/''/g,qI=/[a-zA-Z]/;function UI(e,t,n){var u,d,p,f;const r=to(),o=r.locale??t0,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=Qe(e,n==null?void 0:n.in);if(!Qb(s))throw new RangeError("Invalid time value");let l=t.match(BI).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Ju[g];return h(m,o.formatLong)}return m}).join("").match($I).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:YI(m)};if(ug[g])return{isToken:!0,value:m};if(g.match(qI))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;(a0(g)||i0(g))&&ed(g,t,String(e));const h=ug[g[0]];return h(s,g,o.localize,c)}).join("")}function YI(e){const t=e.match(HI);return t?t[1].replace(WI,"'"):e}function GI(){return Object.assign({},to())}function KI(e,t){const n=Qe(e,t==null?void 0:t.in).getDay();return n===0?7:n}function ZI(e,t){return+Qe(e)>+Qe(t)}function XI(e,t){return+Qe(e)<+Qe(t)}function QI(e,t){const n=JI(t)?new t(0):it(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function JI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const e_=10;class s0{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class t_ extends s0{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 n_ extends s0{constructor(n,r){super();de(this,"priority",e_);de(this,"subPriority",-1);this.context=n||(o=>it(r,o))}set(n,r){return r.timestampIsSet?n:it(n,QI(n,this.context))}}class qe{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new t_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class r_ extends qe{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}/},Rn={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 mt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function kn(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*qA+i*WA+a*UA),rest:t.slice(n[0].length)}}function l0(e){return mt(wt.anyDigitsSigned,e)}function xt(e,t){switch(e){case 1:return mt(wt.singleDigit,t);case 2:return mt(wt.twoDigits,t);case 3:return mt(wt.threeDigits,t);case 4:return mt(wt.fourDigits,t);default:return mt(new RegExp("^\\d{1,"+e+"}"),t)}}function ys(e,t){switch(e){case 1:return mt(wt.singleDigitSigned,t);case 2:return mt(wt.twoDigitsSigned,t);case 3:return mt(wt.threeDigitsSigned,t);case 4:return mt(wt.fourDigitsSigned,t);default:return mt(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 c0(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 u0(e){return e%400===0||e%4===0&&e%100!==0}class o_ extends qe{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(xt(4,n),i);case"yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(xt(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=c0(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 i_ extends qe{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(xt(4,n),i);case"Yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(xt(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=c0(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 a_ extends qe{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 ys(r==="R"?4:r.length,n)}set(n,r,o){const i=it(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),zo(i)}}class s_ extends qe{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 ys(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class l_ extends qe{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 xt(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 c_ extends qe{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 xt(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 u_ extends qe{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(mt(wt.month,n),i);case"MM":return St(xt(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 d_ extends qe{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(mt(wt.month,n),i);case"LL":return St(xt(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 f_(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=r0(r,n)-t;return r.setDate(r.getDate()-o*7),Qe(r,n==null?void 0:n.in)}class p_ extends qe{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 mt(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return xt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return jn(f_(n,o,i),i)}}function h_(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=n0(r,n)-t;return r.setDate(r.getDate()-o*7),r}class m_ extends qe{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 mt(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return xt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return zo(h_(n,o))}}const g_=[31,28,31,30,31,30,31,31,30,31,30,31],v_=[31,29,31,30,31,30,31,31,30,31,30,31];class y_ extends qe{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 mt(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return xt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=u0(o),a=n.getMonth();return i?r>=1&&r<=v_[a]:r>=1&&r<=g_[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class x_ extends qe{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 mt(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return xt(r.length,n)}}validate(n,r){const o=n.getFullYear();return u0(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=Qe(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 fl(i,u,n)}class b_ extends qe{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 w_ extends qe{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(xt(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 S_ extends qe{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(xt(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 T_(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=KI(r,n),i=t-o;return fl(r,i,n)}class E_ extends qe{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 xt(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=T_(n,o),n.setHours(0,0,0,0),n}}class C_ extends qe{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 R_ extends qe{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 k_ extends qe{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 P_ extends qe{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return mt(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return xt(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 A_ extends qe{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 mt(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return xt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class I_ extends qe{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return mt(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return xt(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 __ extends qe{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 mt(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return xt(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 O_ extends qe{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return mt(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return xt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class M_ extends qe{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return mt(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return xt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class D_ extends qe{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(xt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class j_ extends qe{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return kn(Rn.basicOptionalMinutes,n);case"XX":return kn(Rn.basic,n);case"XXXX":return kn(Rn.basicOptionalSeconds,n);case"XXXXX":return kn(Rn.extendedOptionalSeconds,n);case"XXX":default:return kn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:it(n,n.getTime()-vs(n)-o)}}class N_ extends qe{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return kn(Rn.basicOptionalMinutes,n);case"xx":return kn(Rn.basic,n);case"xxxx":return kn(Rn.basicOptionalSeconds,n);case"xxxxx":return kn(Rn.extendedOptionalSeconds,n);case"xxx":default:return kn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:it(n,n.getTime()-vs(n)-o)}}class F_ extends qe{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return l0(n)}set(n,r,o){return[it(n,o*1e3),{timestampIsSet:!0}]}}class L_ extends qe{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return l0(n)}set(n,r,o){return[it(n,o),{timestampIsSet:!0}]}}const V_={G:new r_,y:new o_,Y:new i_,R:new a_,u:new s_,Q:new l_,q:new c_,M:new u_,L:new d_,w:new p_,I:new m_,d:new y_,D:new x_,E:new b_,e:new w_,c:new S_,i:new E_,a:new C_,b:new R_,B:new k_,h:new P_,H:new A_,K:new I_,k:new __,m:new O_,s:new M_,S:new D_,X:new j_,x:new N_,t:new F_,T:new L_},z_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,B_=/^'([^]*?)'?$/,H_=/''/g,W_=/\S/,q_=/[a-zA-Z]/;function U_(e,t,n,r){var h,v,y,b;const o=()=>it(n,NaN),i=GI(),a=i.locale??t0,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():Qe(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new n_(r==null?void 0:r.in,n)],d=t.match($_).map(T=>{const w=T[0];if(w in Ju){const S=Ju[w];return S(T,a.formatLong)}return T}).join("").match(z_),p=[];for(let T of d){a0(T)&&ed(T,t,e),i0(T)&&ed(T,t,e);const w=T[0],S=V_[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(q_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(T==="''"?T="'":w==="'"&&(T=Y_(T)),e.indexOf(T)===0)e=e.slice(T.length);else return o()}}if(e.length>0&&W_.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=Qe(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 Y_(e){return e.match(B_)[1].replace(H_,"'")}function G_(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function K_(e,t){return XA(it(e,e),ZA(e))}function Z_(e,t,n){return fl(e,-t,n)}function X_(e,t,n){const r=Qe(e,n==null?void 0:n.in);return isNaN(+r)?it(e,NaN):(r.setFullYear(t),r)}function Q_(e,t,n){return Zb(e,-t,n)}function Ai(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=Q_(e,o+r*12,n),d=Z_(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return it(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 ra=function(e){return e.replace(new RegExp(" ","g")," ")},d0=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)},J_=function(e){return e.replace(/^0+([0-9]+)/,"$1")},f0=function(e,t,n){var r=e.length-2,o=J_(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},p0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},xs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},eO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Bc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},tO=function(e){return e==="money"||e==="currency"},nO=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:""})},Va=function(e,t){var n=d0(p0(e),t.fraction.length),r="".concat(t.currency).concat(f0(n,t.group,t.decimal));return ra(r)},rO=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=nO(r,i,s);return m.currency=ra("".concat(m.currency.trim()," ")),m.literal=ra(m.literal.trim()),m},[r,i]),p=function(m){var g=Va(m.target.value,d),h=xs(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=Va(m,d),h=xs(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?Va(c.defaultValue,d):void 0;return E.createElement("input",Tt({},c,{value:typeof c.value=="string"?Va(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),oO=1,iO=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 Tt(Tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},za=function(e,t){var n=d0(p0(e),t.fraction.length),r="".concat(f0(n,t.group,t.decimal)," ").concat(t.percentSign);return ra(r)},sO=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(za(y,d))},[a.value]);var d=E.useMemo(function(){var v=aO(r);return v.percentSign=ra("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-oO,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=za(v.target.value,d),b=xs(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=za(v,d),b=xs(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?za(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"}))}),Ii={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},lO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=bs[i];a===void 0?r.push(i.replace(Ii.dots,"\\.").replace(Ii.openParenthesis,"\\(").replace(Ii.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ii.leadingBars,"\\")},zi=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=lO(o);return n?"^".concat(i,"$"):i},cO=function(e){return e.replace(Ii.escape,"\\$&")},nd=function(e,t){var n=e.map(function(r){return typeof r=="string"?cO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},bs={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]/}},uO=/\d/,hg="(dd) 9dddd-dddd",mg="(dd) dddd-dddd",gg="ddd.ddd.ddd-dd",vg="dd.ddd.ddd/dddd-dd",is=function(e){return e.replace(/\D/g,"")},dO=["2",/[0-3]/,":",/[0-5]/,/\d/],fO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:gg,isoDate:"dddd-dd-dd",cnpj:vg,telephone:mg,cellphone:hg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return is(e).length<=11?gg:vg},int:function(e){return e===void 0&&(e=""),uO.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=is(e);return t.length<11?mg:hg},time:function(e){var t=is(e),n=t[0];return n==="2"?dO:fO}},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:zi(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:is}),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 yg(e,t,n,r){var o,i;r===void 0&&(r=bs);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 xg=function(e){return e},pO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(zi(e,n,t));return r.test(n)};function hO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var mO=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=Bc(s),h=Bc(d),v=Bc(u),y=E.useRef(pO(u,i,f.value||f.defaultValue)),b=p??"input",T=td(E.useState(""),2),w=T[0],S=T[1],C=hO(w),R=E.useCallback(function(D,_){var L,N,z=(L=D??_)!==null&&L!==void 0?L:"";if(u===void 0)return z;var M=(N=z==null?void 0:z.toString())!==null&&N!==void 0?N:"";return yg(M,typeof u=="function"?u(M):u,a??xg,c??bs)},[a,u,c]),I=td(E.useState(function(){return R(f.value,f.defaultValue)}),2),A=I[0],O=I[1],j=R(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(A);return Array.isArray(D)?nd(D,i):zi(u,A,i)}return typeof u=="string"?zi(u,A,i):nd(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var D=R(f.value,f.defaultValue);O(D),m.current!==null&&(m.current.value=D)}},[f.value,u,a,f.defaultValue]);var P=function(D){var _,L,N,z,M,B=D.currentTarget,Q=D.target.value;if(v.current===void 0)return O(Q),(_=h.current)===null||_===void 0||_.call(h,Q),(L=g.current)===null||L===void 0||L.call(g,D),d==null?void 0:d(Q);var ee=new RegExp(zi(v.current,Q,i)),X=(N=B.selectionEnd)!==null&&N!==void 0?N:0,Z=function(Y,ie,H){if(Y.type!=="number")return Y.setSelectionRange(ie,H)};if(r&&y.current&&Q.length>=A.length)return B.value=A,Z(B,X-1,X-1);var G=!1;Q.length<C.length&&(y.current=!1,G=!0),ee.test(Q)&&(y.current=!0);var K=X,F=Q[K-1],$=yg(Q,typeof v.current=="function"?v.current(Q):v.current,a??xg,c??bs);for(B.value=$,O($);K<$.length&&$.charAt(K-1)!==F;)K+=1;G?Z(B,X,X):Z(B,K,K),D.target.value=$,S($),(z=h.current)===null||z===void 0||z.call(h,$),(M=g.current)===null||M===void 0||M.call(g,D)};return E.createElement(b,Tt({},f,{ref:m,pattern:V,onChange:P,defaultValue:bg(f.defaultValue)?j:void 0,value:bg(f.value)?R(f.value,f.value):f.value}))}),bg=function(e){return typeof e=="string"},h0=E.forwardRef(function(e,t){return tO(e.mask)?E.createElement(rO,Tt({},e,{mask:void 0,ref:t})):iO(e.mask)?E.createElement(sO,Tt({},e,{mask:void 0,ref:t})):E.createElement(mO,Tt({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(h0,Tt({},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 m0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&eO(zt,t.mask)?zt[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return E.createElement(h0,Tt({},o,{ref:n}))}),$a={exports:{}},Hc={},Ba={exports:{}},Wc={};/**
|
|
137
|
+
*/const $A=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dl=Et("x",$A),lg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},BA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Gb=e=>x.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:lg,exit:lg.false,transition:BA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ne("aria-hidden:pointer-events-none",e.className),children:e.children}),HA={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"}},WA=ti("p-4 w-full block border relative rounded-lg text-sm",{variants:HA,defaultVariants:{theme:"neutral"}}),qA=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:Ne("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Gb,{"data-open":!!i,open:!!i,children:x.jsxs(cn,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Ne(WA({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(qb,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?x.jsx(Yb,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?x.jsx(NA,{"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(dl,{size:20})}):null]})})})}),Kb=6048e5,UA=864e5,YA=6e4,GA=36e5,KA=1e3,cg=Symbol.for("constructDateFrom");function it(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&cg in e?e[cg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qe(e,t){return it(t||e,e)}function fl(e,t,n){const r=Qe(e,n==null?void 0:n.in);return isNaN(t)?it((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Zb(e,t,n){const r=Qe(e,n==null?void 0:n.in);if(isNaN(t))return it(e,NaN);if(!t)return r;const o=r.getDate(),i=it(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=Qe(e,n==null?void 0:n.in),d=o||r?Zb(u,o+r*12):u,p=a||i?fl(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return it(e,+p+g)}let ZA={};function to(){return ZA}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=Qe(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 zo(e,t){return jn(e,{...t,weekStartsOn:1})}function Xb(e,t){const n=Qe(e,t==null?void 0:t.in),r=n.getFullYear(),o=it(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=zo(o),a=it(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=zo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function vs(e){const t=Qe(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 pl(e,...t){const n=it.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function $o(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function XA(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t),i=$o(r),a=$o(o),s=+i-vs(i),l=+a-vs(a);return Math.round((s-l)/UA)}function QA(e,t){const n=Xb(e,t),r=it(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),zo(r)}function JA(e){return it(e,Date.now())}function eI(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return+$o(r)==+$o(o)}function tI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Qb(e){return!(!tI(e)&&typeof e!="number"||isNaN(+Qe(e)))}function nI(e,t){const[n,r]=pl(e,t.start,t.end);return{start:n,end:r}}function Jb(e,t){const{start:n,end:r}=nI(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(it(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function e0(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function rI(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function oI(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=Qe(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 iI={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"}},aI=(e,t,n)=>{let r;const o=iI[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 sI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},lI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},uI={date:$c({formats:sI,defaultWidth:"full"}),time:$c({formats:lI,defaultWidth:"full"}),dateTime:$c({formats:cI,defaultWidth:"full"})},dI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},fI=(e,t,n,r)=>dI[e];function Ti(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 pI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},hI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mI={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"]},gI={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"]},vI={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"}},yI={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"}},xI=(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"},bI={ordinalNumber:xI,era:Ti({values:pI,defaultWidth:"wide"}),quarter:Ti({values:hI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ti({values:mI,defaultWidth:"wide"}),day:Ti({values:gI,defaultWidth:"wide"}),dayPeriod:Ti({values:vI,defaultWidth:"wide",formattingValues:yI,defaultFormattingWidth:"wide"})};function Ei(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)?SI(s,d=>d.test(a)):wI(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 wI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function SI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function TI(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 EI=/^(\d+)(th|st|nd|rd)?/i,CI=/\d+/i,RI={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},kI={any:[/^b/i,/^(a|c)/i]},PI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},AI={any:[/1/i,/2/i,/3/i,/4/i]},II={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},_I={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]},OI={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},MI={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]},DI={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},jI={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:TI({matchPattern:EI,parsePattern:CI,valueCallback:e=>parseInt(e,10)}),era:Ei({matchPatterns:RI,defaultMatchWidth:"wide",parsePatterns:kI,defaultParseWidth:"any"}),quarter:Ei({matchPatterns:PI,defaultMatchWidth:"wide",parsePatterns:AI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ei({matchPatterns:II,defaultMatchWidth:"wide",parsePatterns:_I,defaultParseWidth:"any"}),day:Ei({matchPatterns:OI,defaultMatchWidth:"wide",parsePatterns:MI,defaultParseWidth:"any"}),dayPeriod:Ei({matchPatterns:DI,defaultMatchWidth:"any",parsePatterns:jI,defaultParseWidth:"any"})},t0={code:"en-US",formatDistance:aI,formatLong:uI,formatRelative:fI,localize:bI,match:NI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function FI(e,t){const n=Qe(e,t==null?void 0:t.in);return XA(n,rI(n))+1}function n0(e,t){const n=Qe(e,t==null?void 0:t.in),r=+zo(n)-+QA(n);return Math.round(r/Kb)+1}function If(e,t){var u,d,p,f;const n=Qe(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=it((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=it((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 LI(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=it((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),jn(i,t)}function r0(e,t){const n=Qe(e,t==null?void 0:t.in),r=+jn(n,t)-+LI(n,t);return Math.round(r/Kb)+1}function Ze(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 Ze(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ze(n+1,2)},d(e,t){return Ze(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 Ze(e.getHours()%12||12,t.length)},H(e,t){return Ze(e.getHours(),t.length)},m(e,t){return Ze(e.getMinutes(),t.length)},s(e,t){return Ze(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ze(o,t.length)}},po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ug={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 Ze(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ze(i,t.length)},R:function(e,t){const n=Xb(e);return Ze(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ze(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 Ze(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 Ze(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 Ze(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=r0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ze(o,t.length)},I:function(e,t,n){const r=n0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ze(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=FI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ze(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 Ze(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 Ze(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 Ze(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"}):Ze(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(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 fg(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 fg(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"+dg(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"+dg(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ze(r,t.length)},T:function(e,t,n){return Ze(+e,t.length)}};function dg(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+Ze(i,2)}function fg(e,t){return e%60===0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ze(Math.trunc(r/60),2),i=Ze(r%60,2);return n+o+t+i}const pg=(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"})}},o0=(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"})}},VI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return pg(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}}",pg(r,t)).replace("{{time}}",o0(o,t))},Ju={p:o0,P:VI},zI=/^D+$/,$I=/^Y+$/,BI=["D","DD","YY","YYYY"];function i0(e){return zI.test(e)}function a0(e){return $I.test(e)}function ed(e,t,n){const r=HI(e,t,n);if(console.warn(r),BI.includes(e))throw new RangeError(r)}function HI(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 WI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,UI=/^'([^]*?)'?$/,YI=/''/g,GI=/[a-zA-Z]/;function KI(e,t,n){var u,d,p,f;const r=to(),o=r.locale??t0,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=Qe(e,n==null?void 0:n.in);if(!Qb(s))throw new RangeError("Invalid time value");let l=t.match(qI).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Ju[g];return h(m,o.formatLong)}return m}).join("").match(WI).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:ZI(m)};if(ug[g])return{isToken:!0,value:m};if(g.match(GI))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;(a0(g)||i0(g))&&ed(g,t,String(e));const h=ug[g[0]];return h(s,g,o.localize,c)}).join("")}function ZI(e){const t=e.match(UI);return t?t[1].replace(YI,"'"):e}function XI(){return Object.assign({},to())}function QI(e,t){const n=Qe(e,t==null?void 0:t.in).getDay();return n===0?7:n}function JI(e,t){return+Qe(e)>+Qe(t)}function e_(e,t){return+Qe(e)<+Qe(t)}function t_(e,t){const n=n_(t)?new t(0):it(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function n_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const r_=10;class s0{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class o_ extends s0{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 i_ extends s0{constructor(n,r){super();de(this,"priority",r_);de(this,"subPriority",-1);this.context=n||(o=>it(r,o))}set(n,r){return r.timestampIsSet?n:it(n,t_(n,this.context))}}class qe{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new o_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class a_ extends qe{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}/},Rn={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 mt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function kn(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*GA+i*YA+a*KA),rest:t.slice(n[0].length)}}function l0(e){return mt(wt.anyDigitsSigned,e)}function xt(e,t){switch(e){case 1:return mt(wt.singleDigit,t);case 2:return mt(wt.twoDigits,t);case 3:return mt(wt.threeDigits,t);case 4:return mt(wt.fourDigits,t);default:return mt(new RegExp("^\\d{1,"+e+"}"),t)}}function ys(e,t){switch(e){case 1:return mt(wt.singleDigitSigned,t);case 2:return mt(wt.twoDigitsSigned,t);case 3:return mt(wt.threeDigitsSigned,t);case 4:return mt(wt.fourDigitsSigned,t);default:return mt(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 c0(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 u0(e){return e%400===0||e%4===0&&e%100!==0}class s_ extends qe{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(xt(4,n),i);case"yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(xt(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=c0(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 l_ extends qe{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(xt(4,n),i);case"Yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(xt(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=c0(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 c_ extends qe{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 ys(r==="R"?4:r.length,n)}set(n,r,o){const i=it(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),zo(i)}}class u_ extends qe{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 ys(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class d_ extends qe{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 xt(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 f_ extends qe{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 xt(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 p_ extends qe{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(mt(wt.month,n),i);case"MM":return St(xt(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 h_ extends qe{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(mt(wt.month,n),i);case"LL":return St(xt(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 m_(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=r0(r,n)-t;return r.setDate(r.getDate()-o*7),Qe(r,n==null?void 0:n.in)}class g_ extends qe{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 mt(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return xt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return jn(m_(n,o,i),i)}}function v_(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=n0(r,n)-t;return r.setDate(r.getDate()-o*7),r}class y_ extends qe{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 mt(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return xt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return zo(v_(n,o))}}const x_=[31,28,31,30,31,30,31,31,30,31,30,31],b_=[31,29,31,30,31,30,31,31,30,31,30,31];class w_ extends qe{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 mt(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return xt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=u0(o),a=n.getMonth();return i?r>=1&&r<=b_[a]:r>=1&&r<=x_[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class S_ extends qe{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 mt(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return xt(r.length,n)}}validate(n,r){const o=n.getFullYear();return u0(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=Qe(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 fl(i,u,n)}class T_ extends qe{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 E_ extends qe{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(xt(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 C_ extends qe{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(xt(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 R_(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=QI(r,n),i=t-o;return fl(r,i,n)}class k_ extends qe{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 xt(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=R_(n,o),n.setHours(0,0,0,0),n}}class P_ extends qe{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 A_ extends qe{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 I_ extends qe{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 __ extends qe{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return mt(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return xt(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 O_ extends qe{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 mt(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return xt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class M_ extends qe{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return mt(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return xt(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 D_ extends qe{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 mt(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return xt(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 j_ extends qe{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return mt(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return xt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class N_ extends qe{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return mt(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return xt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class F_ extends qe{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(xt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class L_ extends qe{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return kn(Rn.basicOptionalMinutes,n);case"XX":return kn(Rn.basic,n);case"XXXX":return kn(Rn.basicOptionalSeconds,n);case"XXXXX":return kn(Rn.extendedOptionalSeconds,n);case"XXX":default:return kn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:it(n,n.getTime()-vs(n)-o)}}class V_ extends qe{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return kn(Rn.basicOptionalMinutes,n);case"xx":return kn(Rn.basic,n);case"xxxx":return kn(Rn.basicOptionalSeconds,n);case"xxxxx":return kn(Rn.extendedOptionalSeconds,n);case"xxx":default:return kn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:it(n,n.getTime()-vs(n)-o)}}class z_ extends qe{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return l0(n)}set(n,r,o){return[it(n,o*1e3),{timestampIsSet:!0}]}}class $_ extends qe{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return l0(n)}set(n,r,o){return[it(n,o),{timestampIsSet:!0}]}}const B_={G:new a_,y:new s_,Y:new l_,R:new c_,u:new u_,Q:new d_,q:new f_,M:new p_,L:new h_,w:new g_,I:new y_,d:new w_,D:new S_,E:new T_,e:new E_,c:new C_,i:new k_,a:new P_,b:new A_,B:new I_,h:new __,H:new O_,K:new M_,k:new D_,m:new j_,s:new N_,S:new F_,X:new L_,x:new V_,t:new z_,T:new $_},H_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,W_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,q_=/^'([^]*?)'?$/,U_=/''/g,Y_=/\S/,G_=/[a-zA-Z]/;function K_(e,t,n,r){var h,v,y,b;const o=()=>it(n,NaN),i=XI(),a=i.locale??t0,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():Qe(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new i_(r==null?void 0:r.in,n)],d=t.match(W_).map(T=>{const w=T[0];if(w in Ju){const S=Ju[w];return S(T,a.formatLong)}return T}).join("").match(H_),p=[];for(let T of d){a0(T)&&ed(T,t,e),i0(T)&&ed(T,t,e);const w=T[0],S=B_[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(G_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(T==="''"?T="'":w==="'"&&(T=Z_(T)),e.indexOf(T)===0)e=e.slice(T.length);else return o()}}if(e.length>0&&Y_.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=Qe(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 Z_(e){return e.match(q_)[1].replace(U_,"'")}function X_(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Q_(e,t){return eI(it(e,e),JA(e))}function J_(e,t,n){return fl(e,-t,n)}function eO(e,t,n){const r=Qe(e,n==null?void 0:n.in);return isNaN(+r)?it(e,NaN):(r.setFullYear(t),r)}function tO(e,t,n){return Zb(e,-t,n)}function Ai(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=tO(e,o+r*12,n),d=J_(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return it(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 ra=function(e){return e.replace(new RegExp(" ","g")," ")},d0=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)},nO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},f0=function(e,t,n){var r=e.length-2,o=nO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},p0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},xs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},rO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Bc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},oO=function(e){return e==="money"||e==="currency"},iO=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:""})},Va=function(e,t){var n=d0(p0(e),t.fraction.length),r="".concat(t.currency).concat(f0(n,t.group,t.decimal));return ra(r)},aO=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=iO(r,i,s);return m.currency=ra("".concat(m.currency.trim()," ")),m.literal=ra(m.literal.trim()),m},[r,i]),p=function(m){var g=Va(m.target.value,d),h=xs(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=Va(m,d),h=xs(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?Va(c.defaultValue,d):void 0;return E.createElement("input",Tt({},c,{value:typeof c.value=="string"?Va(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),sO=1,lO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},cO=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:""})},za=function(e,t){var n=d0(p0(e),t.fraction.length),r="".concat(f0(n,t.group,t.decimal)," ").concat(t.percentSign);return ra(r)},uO=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(za(y,d))},[a.value]);var d=E.useMemo(function(){var v=cO(r);return v.percentSign=ra("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-sO,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=za(v.target.value,d),b=xs(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=za(v,d),b=xs(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?za(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"}))}),Ii={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},dO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=bs[i];a===void 0?r.push(i.replace(Ii.dots,"\\.").replace(Ii.openParenthesis,"\\(").replace(Ii.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ii.leadingBars,"\\")},zi=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=dO(o);return n?"^".concat(i,"$"):i},fO=function(e){return e.replace(Ii.escape,"\\$&")},nd=function(e,t){var n=e.map(function(r){return typeof r=="string"?fO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},bs={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]/}},pO=/\d/,hg="(dd) 9dddd-dddd",mg="(dd) dddd-dddd",gg="ddd.ddd.ddd-dd",vg="dd.ddd.ddd/dddd-dd",is=function(e){return e.replace(/\D/g,"")},hO=["2",/[0-3]/,":",/[0-5]/,/\d/],mO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:gg,isoDate:"dddd-dd-dd",cnpj:vg,telephone:mg,cellphone:hg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return is(e).length<=11?gg:vg},int:function(e){return e===void 0&&(e=""),pO.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=is(e);return t.length<11?mg:hg},time:function(e){var t=is(e),n=t[0];return n==="2"?hO:mO}},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:zi(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:is}),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 yg(e,t,n,r){var o,i;r===void 0&&(r=bs);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 xg=function(e){return e},gO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(zi(e,n,t));return r.test(n)};function vO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var yO=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=Bc(s),h=Bc(d),v=Bc(u),y=E.useRef(gO(u,i,f.value||f.defaultValue)),b=p??"input",T=td(E.useState(""),2),w=T[0],S=T[1],C=vO(w),R=E.useCallback(function(D,_){var L,N,z=(L=D??_)!==null&&L!==void 0?L:"";if(u===void 0)return z;var M=(N=z==null?void 0:z.toString())!==null&&N!==void 0?N:"";return yg(M,typeof u=="function"?u(M):u,a??xg,c??bs)},[a,u,c]),I=td(E.useState(function(){return R(f.value,f.defaultValue)}),2),A=I[0],O=I[1],j=R(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(A);return Array.isArray(D)?nd(D,i):zi(u,A,i)}return typeof u=="string"?zi(u,A,i):nd(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var D=R(f.value,f.defaultValue);O(D),m.current!==null&&(m.current.value=D)}},[f.value,u,a,f.defaultValue]);var P=function(D){var _,L,N,z,M,B=D.currentTarget,Q=D.target.value;if(v.current===void 0)return O(Q),(_=h.current)===null||_===void 0||_.call(h,Q),(L=g.current)===null||L===void 0||L.call(g,D),d==null?void 0:d(Q);var ee=new RegExp(zi(v.current,Q,i)),X=(N=B.selectionEnd)!==null&&N!==void 0?N:0,Z=function(Y,ie,H){if(Y.type!=="number")return Y.setSelectionRange(ie,H)};if(r&&y.current&&Q.length>=A.length)return B.value=A,Z(B,X-1,X-1);var G=!1;Q.length<C.length&&(y.current=!1,G=!0),ee.test(Q)&&(y.current=!0);var K=X,F=Q[K-1],$=yg(Q,typeof v.current=="function"?v.current(Q):v.current,a??xg,c??bs);for(B.value=$,O($);K<$.length&&$.charAt(K-1)!==F;)K+=1;G?Z(B,X,X):Z(B,K,K),D.target.value=$,S($),(z=h.current)===null||z===void 0||z.call(h,$),(M=g.current)===null||M===void 0||M.call(g,D)};return E.createElement(b,Tt({},f,{ref:m,pattern:V,onChange:P,defaultValue:bg(f.defaultValue)?j:void 0,value:bg(f.value)?R(f.value,f.value):f.value}))}),bg=function(e){return typeof e=="string"},h0=E.forwardRef(function(e,t){return oO(e.mask)?E.createElement(aO,Tt({},e,{mask:void 0,ref:t})):lO(e.mask)?E.createElement(uO,Tt({},e,{mask:void 0,ref:t})):E.createElement(yO,Tt({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(h0,Tt({},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 m0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&rO(zt,t.mask)?zt[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return E.createElement(h0,Tt({},o,{ref:n}))}),$a={exports:{}},Hc={},Ba={exports:{}},Wc={};/**
|
|
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 wg;function
|
|
145
|
+
*/var wg;function xO(){if(wg)return Wc;wg=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 Wc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Wc}var qc={};/**
|
|
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 Sg;function
|
|
153
|
+
*/var Sg;function bO(){return Sg||(Sg=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;qc.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())}()),qc}var Tg;function g0(){return Tg||(Tg=1,process.env.NODE_ENV==="production"?Ba.exports=xO():Ba.exports=bO()),Ba.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 Eg;function
|
|
161
|
+
*/var Eg;function wO(){if(Eg)return Hc;Eg=1;var e=E,t=g0();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 Hc.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},Hc}var Uc={};/**
|
|
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 Cg;function xO(){return Cg||(Cg=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=g0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Uc.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())}()),Uc}var Rg;function bO(){return Rg||(Rg=1,process.env.NODE_ENV==="production"?$a.exports=yO():$a.exports=xO()),$a.exports}bO();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 v0(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},wO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},SO=function(e){return Object.entries(e)},y0=function(e){return e instanceof Promise},x0=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)},TO=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,v0([],$i(a),!1)),u=function(d,p){return n(function(f){return x0(d,f,i,p)})};return y0(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))}},EO=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,v0([],$i(a),!1)),c=function(u){return n(function(d){return x0(u,d,i,o.current)})};return y0(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=wO(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 SO(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?TO(A,O,l,T,v,f.current):EO(A,O,l,T,v,f.current),R))},{})}),1),b=y[0];return[s,b,u.current]};const CO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function RO(e,t){return E.useRef(CO(e,t)).current}const hl={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))},[]),b0=(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]:b0(a,t,n,s)}},{}),kg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ws=(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)},kO={default:e=>ws(e,{result:kg.default}),dark:e=>ws(e,{result:kg.dark})},Ci=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},PO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),jf=(e,t)=>{const n=jr(e.colors,Ci(t==null?void 0:t.colors)),r=jr(e.spacing,Ci(t==null?void 0:t.spacing)),o=jr(e.rounded,Ci(t==null?void 0:t.rounded)),i=jr(e.zIndex,Ci((t==null?void 0:t.zIndex)??PO)),a=e.custom?jr(e.custom,Ci(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},AO=(e,t)=>ws(jf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),IO=(e,t)=>jf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),_O=(e,t)=>ws(jf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ml={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..."},gl={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},ci=E.createContext({tweaks:gl,parser:hl.hsla,map:ml,locale:void 0}),Nf=e=>{const t=E.useContext(ci);if(e)return e;if(t)return t.locale||e};function OO(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(ci);return e?e.map:ml},on=(e,t=2)=>e.toString(16).padStart(t,"0"),ui=()=>{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])}`},Pg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Ag={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ff=(e,t)=>{const n=Pg(t,Ag.basic,e)||Pg(t,Ag.extend,e);return n===void 0||n===e?void 0:n},qr=()=>typeof window>"u",rd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),w0=(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},MO=e=>!e,Lf=()=>{},S0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},DO={type:"spring",bounce:.3,duration:.6},Ig=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),T0={enter:Ig(1),exit:Ig(-1),middle:{x:"0%",opacity:1}},_g={exit:{visibility:"hidden"}},jO=e=>{const t=jn(e0(e));return Jb({start:t,end:Eo(t,{days:41})})},E0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),NO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=e0(new Date(1970,o,1).setMonth(o)),a=E0(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Yc={ArrowLeft:(e,t)=>t==="days"?Ai(e,{days:1}):Ai(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Eo(e,{days:1}):Eo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ai(e,{weeks:1}):Ai(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Eo(e,{weeks:1}):Eo(e,{years:1})},Og=(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"),FO=(e,t,n)=>e===void 0||n===void 0?!1:ZI(t,e)&&XI(t,n),LO=e=>{var n;const t=_t();return x.jsx(ft.tbody,{layout:!0,variants:T0,custom:e.direction,onKeyDown:e.onKeyDown,className:Ne((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=et.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,j,V,P,D,_,L,N;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=K_(c)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,c))||!1,m=G_(c,e.stateDate),g=!m||f,h=e.rangeMode?FO((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:Ne("relative",et.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:Ne(`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":"",et.function((j=e.styles)==null?void 0:j.day)?(V=e.styles)==null?void 0:V.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((D=e.stateRange.from)==null?void 0:D.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:((_=e.labelRange)==null?void 0:_.from)??t.calendarFromDate})}):null,d&&((L=e.stateRange.to)==null?void 0:L.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:((N=e.labelRange)==null?void 0:N.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},VO=()=>$o(new Date),C0=({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(ui()),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:NO(f.current,b,g),selectMode:l?"from":void 0,week:Jb({start:jn(b),end:tI(b)})},P=>({onChangeYear:D=>({year:D}),onExitComplete:()=>(Og(T.current||null,h,P.state().date,200),T.current=null,{isAnimating:!1}),date:D=>{const _=D(P.state().date);return{date:_,year:Ir(_)}},nextMonth:D=>{D&&(T.current=D.currentTarget);const _=P.state();if(_.isAnimating)return _;const L=Eo(_.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:Ir(L)}},previousMonth:D=>{D&&(T.current=D.currentTarget);const _=P.state();if(_.isAnimating)return _;const L=Ai(_.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:Ir(L)}},onSelectDate:D=>{const _=P.state(),L=D.currentTarget.dataset.range==="true",N=D.currentTarget.dataset.date||"",z=new Date(N);return{date:z,year:Ir(z),selectMode:_.selectMode===void 0?void 0:_.selectMode==="from"?"to":"from",range:L?{from:_.selectMode==="from"?z:_.range.from,to:_.selectMode==="to"?z:_.range.to}:_.range}},onChangeMonth:D=>{const _=D.target.value,N=Array.from(D.target.options).find(M=>M.value===_),z=P.state();if(N){const M=N.dataset.index||"",B=new Date(P.state().date);return B.setMonth(+M),{...z,date:B,year:Ir(B)}}return z},onKeyDown:D=>{const _=D.key,L=P.state();if(_ in Yc){(_==="ArrowUp"||_==="ArrowDown")&&D.preventDefault();const N=P.state().date,z=et.keyof(Yc,_)?Yc[_](N,D.shiftKey?"month":"days"):null;if(z!==null)return Og(D.target,h,z),{...L,date:z,year:Ir(z)}}return P.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(P,D,_)=>{var N,z;return(_.method==="onChangeMonth"||_.method==="previousMonth"||_.method==="nextMonth")&&((z=(N=_.props).onChangeMonth)==null||z.call(N,P.date)),P},(P,D,_)=>{var N,z;return _.method==="onChangeYear"&&((z=(N=_.props).onChangeYear)==null||z.call(N,P.date)),P},(P,D,_)=>{const L=_.method==="onSelectDate"||_.method==="setToday"||_.method==="onKeyDown";return l&&L&&t?(c==null||c(P.range),P):(L&&t&&(c==null||c(P.date)),P)}]}),C=jO(w.date),R=w0(C,7),I=w.date.toISOString(),A=E0(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const O=RO(P=>S.date(D=>X_(new Date(D),+P)),1200),j=P=>{const D=P.currentTarget.value;S.onChangeYear(D),s==null||s(new Date(D)),O(D)},V=OO((P,D)=>(P.preventDefault(),D==="right"?S.previousMonth():S.nextMonth()),10);return x.jsx(cE,{transition:DO,children:x.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:Ne("relative overflow-hidden",et.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(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:_g,onClick:S.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(gA,{className:"h-4 w-4"})}),x.jsx(ft.span,{layout:!0,variants:T0,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(m0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:j,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:_g,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(ft.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:Ne("py-2 text-sm font-medium capitalize",et.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(LO,{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(VO),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-component":"card",className:Ne("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",{"data-component":"card-title",className:Ne("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",{"data-component":"card-body",className:Ne("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,title:et.string(o.title)?o.title:void 0,className:Ne("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 R0=e=>{const t=e.Icon??Ub,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 Mg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function k0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Mg(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():Mg(e[o],null)}}}}function Ur(...e){return k.useCallback(k0(...e),e)}function P0(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,zO(o,...t)]}function zO(...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(BO);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=WO(n),i=HO(r,n.props);return n.type!==k.Fragment&&(i.ref=t?k0(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});od.displayName="SlotClone";var $O=({children:e})=>x.jsx(x.Fragment,{children:e});function BO(e){return k.isValidElement(e)&&e.type===$O}function HO(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 WO(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 qO(e){const t=e+"CollectionProvider",[n,r]=P0(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 UO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vn=UO.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 A0(e,t){e&&Js.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 YO(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 GO="DismissableLayer",id="dismissableLayer.update",KO="dismissableLayer.pointerDownOutside",ZO="dismissableLayer.focusOutside",Dg,I0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(I0),[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=QO(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=JO(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 YO(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&&(Dg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),jg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Dg)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),jg())},[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)})});_0.displayName=GO;var XO="DismissableLayerBranch",O0=k.forwardRef((e,t)=>{const n=k.useContext(I0),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})});O0.displayName=XO;function QO(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(){M0(KO,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 JO(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&&M0(ZO,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 jg(){const e=new CustomEvent(id);document.dispatchEvent(e)}function M0(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?A0(o,i):o.dispatchEvent(i)}var eM=_0,tM=O0,Ss=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},nM="Portal",D0=k.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=k.useState(!1);Ss(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ga.createPortal(x.jsx(Vn.div,{...r,ref:t}),a):null});D0.displayName=nM;function rM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var j0=e=>{const{present:t,children:n}=e,r=oM(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=Ur(r.ref,iM(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};j0.displayName="Presence";function oM(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=rM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=Ha(r.current);i.current=s==="mounted"?c:"none"},[s]),Ss(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=Ha(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]),Ss(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=Ha(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=Ha(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 Ha(e){return(e==null?void 0:e.animationName)||"none"}function iM(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 aM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=sM({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 sM({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 lM="VisuallyHidden",zf=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}}));zf.displayName=lM;var $f="ToastProvider",[Bf,cM,uM]=qO("Toast"),[N0,Zz]=P0("Toast",[uM]),[dM,vl]=N0($f),F0=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 \`${$f}\`. Expected non-empty \`string\`.`),x.jsx(Bf.Provider,{scope:t,children:x.jsx(dM,{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})})};F0.displayName=$f;var L0="ToastViewport",fM=["F8"],ad="toast.viewportPause",sd="toast.viewportResume",V0=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=fM,label:o="Notifications ({hotkey})",...i}=e,a=vl(L0,n),s=cM(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,...RM(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 j=g({tabbingDirection:I?"backwards":"forwards"}),V=j.findIndex(P=>P===R);Gc(j.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(tM,{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"});Gc(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"});Gc(h)}})]})});V0.displayName=L0;var z0="ToastFocusProxy",ld=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=vl(z0,n);return x.jsx(zf,{"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=z0;var yl="Toast",pM="toast.swipeStart",hM="toast.swipeMove",mM="toast.swipeCancel",gM="toast.swipeEnd",$0=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=aM({prop:r,defaultProp:o,onChange:i});return x.jsx(j0,{present:n||s,children:x.jsx(xM,{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)})})})});$0.displayName=yl;var[vM,yM]=N0(yl,{onClose(){}}),xM=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=vl(yl,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 D;(h==null?void 0:h.contains(document.activeElement))&&((D=g.viewport)==null||D.focus()),a()}),j=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 D=()=>{j(C.current),c==null||c()},_=()=>{const L=new Date().getTime()-S.current;C.current=C.current-L,window.clearTimeout(R.current),l==null||l()};return P.addEventListener(ad,_),P.addEventListener(sd,D),()=>{P.removeEventListener(ad,_),P.removeEventListener(sd,D)}}},[g.viewport,w,l,c,j]),k.useEffect(()=>{i&&!g.isClosePausedRef.current&&j(w)},[i,w,g.isClosePausedRef,j]),k.useEffect(()=>(I(),()=>A()),[I,A]);const V=k.useMemo(()=>h?Y0(h):null,[h]);return g.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(bM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx(vM,{scope:n,onClose:O,children:Js.createPortal(x.jsx(Bf.ItemSlot,{scope:n,children:x.jsx(eM,{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 D=P.clientX-b.current.x,_=P.clientY-b.current.y,L=!!T.current,N=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=N?z(0,D):0,B=N?0:z(0,_),Q=P.pointerType==="touch"?10:2,ee={x:M,y:B},X={originalEvent:P,delta:ee};L?(T.current=ee,Wa(hM,d,X,{discrete:!1})):Ng(ee,g.swipeDirection,Q)?(T.current=ee,Wa(pM,u,X,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(D)>Q||Math.abs(_)>Q)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,P=>{const D=T.current,_=P.target;if(_.hasPointerCapture(P.pointerId)&&_.releasePointerCapture(P.pointerId),T.current=null,b.current=null,D){const L=P.currentTarget,N={originalEvent:P,delta:D};Ng(D,g.swipeDirection,g.swipeThreshold)?Wa(gM,f,N,{discrete:!0}):Wa(mM,p,N,{discrete:!0}),L.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),bM=e=>{const{__scopeToast:t,children:n,...r}=e,o=vl(yl,t),[i,a]=k.useState(!1),[s,l]=k.useState(!1);return EM(()=>a(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:x.jsx(D0,{asChild:!0,children:x.jsx(zf,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},wM="ToastTitle",B0=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});B0.displayName=wM;var SM="ToastDescription",H0=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});H0.displayName=SM;var W0="ToastAction",TM=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(U0,{altText:n,asChild:!0,children:x.jsx(Hf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${W0}\`. Expected non-empty \`string\`.`),null)});TM.displayName=W0;var q0="ToastClose",Hf=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=yM(q0,n);return x.jsx(U0,{asChild:!0,children:x.jsx(Vn.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});Hf.displayName=q0;var U0=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 Y0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),CM(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(...Y0(r))}}),t}function Wa(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?A0(o,i):o.dispatchEvent(i)}var Ng=(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 EM(e=()=>{}){const t=Un(e);Ss(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function CM(e){return e.nodeType===e.ELEMENT_NODE}function RM(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 Gc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var kM=F0,PM=V0,AM=$0,IM=B0,_M=H0,OM=Hf;const MM=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},DM=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"}}),G0=E.createContext(()=>{throw new Error("Not implemented")}),jM=()=>E.useContext(G0),Fg={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]}},NM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=DM({theme:t.theme||"default"});return x.jsx(AM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(ft.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:Fg[t.reversedIndex]||Fg.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(IM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(_M,{className:"select-text truncate",children:t.text})]}),r?x.jsx(OM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(dl,{className:"h-5 w-5"})}):null]})})})});function FM({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=MM(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(kM,{duration:n,swipeThreshold:150,children:[x.jsx(G0.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(NM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(PM,{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 LM=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:Ne("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]}),K0=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Z0=E.createContext(""),VM=e=>{const[t,n]=K0(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(Z0.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})})},zM=()=>E.useContext(Z0),$M=e=>{const t=zM();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})},xl=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})]});xl.Icon=function(t){return x.jsx("header",{...t,className:Ne("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};xl.Body=function(t){return x.jsx(cn,{...t,className:Ne("min-w-0 flex-1",t.className),children:t.children})};xl.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 BM=e=>x.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function bl(){return typeof window<"u"}function xr(e){return X0(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=(X0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function X0(e){return bl()?e instanceof Node||e instanceof Bt(e).Node:!1}function tt(e){return bl()?e instanceof Element||e instanceof Bt(e).Element:!1}function bt(e){return bl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function cd(e){return!bl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function Sa(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 HM(e){return["table","td","th"].includes(xr(e))}function wl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Wf(e){const t=qf(),n=tt(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 WM(e){let t=Yn(e);for(;bt(t)&&!fr(t);){if(Wf(t))return t;if(wl(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 Sl(e){return tt(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 Q0(e){const t=Yn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:bt(t)&&Sa(t)?t:Q0(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Q0(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||[],Sa(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 vt(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 J0(){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 ew(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 qM()?!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(J0())}function tw(){return Uf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function qM(){return J0().includes("jsdom/")}function Wo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function UM(e){return"nativeEvent"in e}function YM(e){return e.matches("html,body")}function It(e){return(e==null?void 0:e.ownerDocument)||document}function Kc(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 GM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Kf(e){return bt(e)&&e.matches(GM)}function Dt(e){e.preventDefault(),e.stopPropagation()}function nw(e){return e?e.getAttribute("role")==="combobox"&&Kf(e):!1}const An=Math.min,Xt=Math.max,Ts=Math.round,Co=Math.floor,pr=e=>({x:e,y:e}),KM={left:"right",right:"left",bottom:"top",top:"bottom"},ZM={start:"end",end:"start"};function fd(e,t,n){return Xt(e,An(t,n))}function di(e,t){return typeof e=="function"?e(t):e}function hr(e){return e.split("-")[0]}function fi(e){return e.split("-")[1]}function rw(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 rw(Yr(e))}function XM(e,t,n){n===void 0&&(n=!1);const r=fi(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=Es(a)),[a,Es(a)]}function QM(e){const t=Es(e);return[pd(e),t,pd(t)]}function pd(e){return e.replace(/start|end/g,t=>ZM[t])}function JM(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 eD(e,t,n,r){const o=fi(e);let i=JM(hr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(pd)))),i}function Es(e){return e.replace(/left|right|bottom|top/g,t=>KM[t])}function tD(e){return{top:0,right:0,bottom:0,left:0,...e}}function ow(e){return typeof e!="number"?tD(e):{top:e,right:e,bottom:e,left:e}}function Cs(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 Cg;function SO(){return Cg||(Cg=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=g0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Uc.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())}()),Uc}var Rg;function TO(){return Rg||(Rg=1,process.env.NODE_ENV==="production"?$a.exports=wO():$a.exports=SO()),$a.exports}TO();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 v0(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},EO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},CO=function(e){return Object.entries(e)},y0=function(e){return e instanceof Promise},x0=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)},RO=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,v0([],$i(a),!1)),u=function(d,p){return n(function(f){return x0(d,f,i,p)})};return y0(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))}},kO=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,v0([],$i(a),!1)),c=function(u){return n(function(d){return x0(u,d,i,o.current)})};return y0(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=EO(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 CO(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?RO(A,O,l,T,v,f.current):kO(A,O,l,T,v,f.current),R))},{})}),1),b=y[0];return[s,b,u.current]};const PO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function AO(e,t){return E.useRef(PO(e,t)).current}const hl={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))},[]),b0=(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]:b0(a,t,n,s)}},{}),kg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ws=(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)},IO={default:e=>ws(e,{result:kg.default}),dark:e=>ws(e,{result:kg.dark})},Ci=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},_O=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),jf=(e,t)=>{const n=jr(e.colors,Ci(t==null?void 0:t.colors)),r=jr(e.spacing,Ci(t==null?void 0:t.spacing)),o=jr(e.rounded,Ci(t==null?void 0:t.rounded)),i=jr(e.zIndex,Ci((t==null?void 0:t.zIndex)??_O)),a=e.custom?jr(e.custom,Ci(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},OO=(e,t)=>ws(jf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),MO=(e,t)=>jf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),DO=(e,t)=>ws(jf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ml={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..."},gl={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},ci=E.createContext({tweaks:gl,parser:hl.hsla,map:ml,locale:void 0}),Nf=e=>{const t=E.useContext(ci);if(e)return e;if(t)return t.locale||e};function jO(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(ci);return e?e.map:ml},on=(e,t=2)=>e.toString(16).padStart(t,"0"),ui=()=>{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])}`},Pg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Ag={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ff=(e,t)=>{const n=Pg(t,Ag.basic,e)||Pg(t,Ag.extend,e);return n===void 0||n===e?void 0:n},qr=()=>typeof window>"u",rd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),w0=(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},NO=e=>!e,Lf=()=>{},S0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},FO={type:"spring",bounce:.3,duration:.6},Ig=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),T0={enter:Ig(1),exit:Ig(-1),middle:{x:"0%",opacity:1}},_g={exit:{visibility:"hidden"}},LO=e=>{const t=jn(e0(e));return Jb({start:t,end:Eo(t,{days:41})})},E0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),VO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=e0(new Date(1970,o,1).setMonth(o)),a=E0(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Yc={ArrowLeft:(e,t)=>t==="days"?Ai(e,{days:1}):Ai(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Eo(e,{days:1}):Eo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ai(e,{weeks:1}):Ai(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Eo(e,{weeks:1}):Eo(e,{years:1})},Og=(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"),zO=(e,t,n)=>e===void 0||n===void 0?!1:JI(t,e)&&e_(t,n),$O=e=>{var n;const t=_t();return x.jsx(ft.tbody,{layout:!0,variants:T0,custom:e.direction,onKeyDown:e.onKeyDown,className:Ne((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=et.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,j,V,P,D,_,L,N;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=Q_(c)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,c))||!1,m=X_(c,e.stateDate),g=!m||f,h=e.rangeMode?zO((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:Ne("relative",et.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:Ne(`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":"",et.function((j=e.styles)==null?void 0:j.day)?(V=e.styles)==null?void 0:V.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((D=e.stateRange.from)==null?void 0:D.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:((_=e.labelRange)==null?void 0:_.from)??t.calendarFromDate})}):null,d&&((L=e.stateRange.to)==null?void 0:L.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:((N=e.labelRange)==null?void 0:N.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},BO=()=>$o(new Date),C0=({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(ui()),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:VO(f.current,b,g),selectMode:l?"from":void 0,week:Jb({start:jn(b),end:oI(b)})},P=>({onChangeYear:D=>({year:D}),onExitComplete:()=>(Og(T.current||null,h,P.state().date,200),T.current=null,{isAnimating:!1}),date:D=>{const _=D(P.state().date);return{date:_,year:Ir(_)}},nextMonth:D=>{D&&(T.current=D.currentTarget);const _=P.state();if(_.isAnimating)return _;const L=Eo(_.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:Ir(L)}},previousMonth:D=>{D&&(T.current=D.currentTarget);const _=P.state();if(_.isAnimating)return _;const L=Ai(_.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:Ir(L)}},onSelectDate:D=>{const _=P.state(),L=D.currentTarget.dataset.range==="true",N=D.currentTarget.dataset.date||"",z=new Date(N);return{date:z,year:Ir(z),selectMode:_.selectMode===void 0?void 0:_.selectMode==="from"?"to":"from",range:L?{from:_.selectMode==="from"?z:_.range.from,to:_.selectMode==="to"?z:_.range.to}:_.range}},onChangeMonth:D=>{const _=D.target.value,N=Array.from(D.target.options).find(M=>M.value===_),z=P.state();if(N){const M=N.dataset.index||"",B=new Date(P.state().date);return B.setMonth(+M),{...z,date:B,year:Ir(B)}}return z},onKeyDown:D=>{const _=D.key,L=P.state();if(_ in Yc){(_==="ArrowUp"||_==="ArrowDown")&&D.preventDefault();const N=P.state().date,z=et.keyof(Yc,_)?Yc[_](N,D.shiftKey?"month":"days"):null;if(z!==null)return Og(D.target,h,z),{...L,date:z,year:Ir(z)}}return P.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(P,D,_)=>{var N,z;return(_.method==="onChangeMonth"||_.method==="previousMonth"||_.method==="nextMonth")&&((z=(N=_.props).onChangeMonth)==null||z.call(N,P.date)),P},(P,D,_)=>{var N,z;return _.method==="onChangeYear"&&((z=(N=_.props).onChangeYear)==null||z.call(N,P.date)),P},(P,D,_)=>{const L=_.method==="onSelectDate"||_.method==="setToday"||_.method==="onKeyDown";return l&&L&&t?(c==null||c(P.range),P):(L&&t&&(c==null||c(P.date)),P)}]}),C=LO(w.date),R=w0(C,7),I=w.date.toISOString(),A=E0(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const O=AO(P=>S.date(D=>eO(new Date(D),+P)),1200),j=P=>{const D=P.currentTarget.value;S.onChangeYear(D),s==null||s(new Date(D)),O(D)},V=jO((P,D)=>(P.preventDefault(),D==="right"?S.previousMonth():S.nextMonth()),10);return x.jsx(dE,{transition:FO,children:x.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:Ne("relative overflow-hidden",et.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(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:_g,onClick:S.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(yA,{className:"h-4 w-4"})}),x.jsx(ft.span,{layout:!0,variants:T0,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(m0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:j,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:_g,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(ft.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:Ne("py-2 text-sm font-medium capitalize",et.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($O,{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(BO),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-component":"card",className:Ne("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",{"data-component":"card-title",className:Ne("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",{"data-component":"card-body",className:Ne("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,title:et.string(o.title)?o.title:void 0,className:Ne("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 R0=e=>{const t=e.Icon??Ub,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 Mg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function k0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Mg(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():Mg(e[o],null)}}}}function Ur(...e){return k.useCallback(k0(...e),e)}function P0(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,HO(o,...t)]}function HO(...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(qO);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=YO(n),i=UO(r,n.props);return n.type!==k.Fragment&&(i.ref=t?k0(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});od.displayName="SlotClone";var WO=({children:e})=>x.jsx(x.Fragment,{children:e});function qO(e){return k.isValidElement(e)&&e.type===WO}function UO(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 YO(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 GO(e){const t=e+"CollectionProvider",[n,r]=P0(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 KO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vn=KO.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 A0(e,t){e&&Js.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 ZO(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 XO="DismissableLayer",id="dismissableLayer.update",QO="dismissableLayer.pointerDownOutside",JO="dismissableLayer.focusOutside",Dg,I0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(I0),[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=tM(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=nM(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 ZO(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&&(Dg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),jg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Dg)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),jg())},[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)})});_0.displayName=XO;var eM="DismissableLayerBranch",O0=k.forwardRef((e,t)=>{const n=k.useContext(I0),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})});O0.displayName=eM;function tM(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(){M0(QO,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 nM(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&&M0(JO,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 jg(){const e=new CustomEvent(id);document.dispatchEvent(e)}function M0(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?A0(o,i):o.dispatchEvent(i)}var rM=_0,oM=O0,Ss=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},iM="Portal",D0=k.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=k.useState(!1);Ss(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ga.createPortal(x.jsx(Vn.div,{...r,ref:t}),a):null});D0.displayName=iM;function aM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var j0=e=>{const{present:t,children:n}=e,r=sM(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=Ur(r.ref,lM(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};j0.displayName="Presence";function sM(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=aM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=Ha(r.current);i.current=s==="mounted"?c:"none"},[s]),Ss(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=Ha(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]),Ss(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=Ha(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=Ha(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 Ha(e){return(e==null?void 0:e.animationName)||"none"}function lM(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 cM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=uM({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 uM({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 dM="VisuallyHidden",zf=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}}));zf.displayName=dM;var $f="ToastProvider",[Bf,fM,pM]=GO("Toast"),[N0,Jz]=P0("Toast",[pM]),[hM,vl]=N0($f),F0=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 \`${$f}\`. Expected non-empty \`string\`.`),x.jsx(Bf.Provider,{scope:t,children:x.jsx(hM,{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})})};F0.displayName=$f;var L0="ToastViewport",mM=["F8"],ad="toast.viewportPause",sd="toast.viewportResume",V0=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=mM,label:o="Notifications ({hotkey})",...i}=e,a=vl(L0,n),s=fM(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,...AM(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 j=g({tabbingDirection:I?"backwards":"forwards"}),V=j.findIndex(P=>P===R);Gc(j.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(oM,{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"});Gc(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"});Gc(h)}})]})});V0.displayName=L0;var z0="ToastFocusProxy",ld=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=vl(z0,n);return x.jsx(zf,{"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=z0;var yl="Toast",gM="toast.swipeStart",vM="toast.swipeMove",yM="toast.swipeCancel",xM="toast.swipeEnd",$0=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=cM({prop:r,defaultProp:o,onChange:i});return x.jsx(j0,{present:n||s,children:x.jsx(SM,{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)})})})});$0.displayName=yl;var[bM,wM]=N0(yl,{onClose(){}}),SM=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=vl(yl,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 D;(h==null?void 0:h.contains(document.activeElement))&&((D=g.viewport)==null||D.focus()),a()}),j=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 D=()=>{j(C.current),c==null||c()},_=()=>{const L=new Date().getTime()-S.current;C.current=C.current-L,window.clearTimeout(R.current),l==null||l()};return P.addEventListener(ad,_),P.addEventListener(sd,D),()=>{P.removeEventListener(ad,_),P.removeEventListener(sd,D)}}},[g.viewport,w,l,c,j]),k.useEffect(()=>{i&&!g.isClosePausedRef.current&&j(w)},[i,w,g.isClosePausedRef,j]),k.useEffect(()=>(I(),()=>A()),[I,A]);const V=k.useMemo(()=>h?Y0(h):null,[h]);return g.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(TM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx(bM,{scope:n,onClose:O,children:Js.createPortal(x.jsx(Bf.ItemSlot,{scope:n,children:x.jsx(rM,{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 D=P.clientX-b.current.x,_=P.clientY-b.current.y,L=!!T.current,N=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=N?z(0,D):0,B=N?0:z(0,_),Q=P.pointerType==="touch"?10:2,ee={x:M,y:B},X={originalEvent:P,delta:ee};L?(T.current=ee,Wa(vM,d,X,{discrete:!1})):Ng(ee,g.swipeDirection,Q)?(T.current=ee,Wa(gM,u,X,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(D)>Q||Math.abs(_)>Q)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,P=>{const D=T.current,_=P.target;if(_.hasPointerCapture(P.pointerId)&&_.releasePointerCapture(P.pointerId),T.current=null,b.current=null,D){const L=P.currentTarget,N={originalEvent:P,delta:D};Ng(D,g.swipeDirection,g.swipeThreshold)?Wa(xM,f,N,{discrete:!0}):Wa(yM,p,N,{discrete:!0}),L.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),TM=e=>{const{__scopeToast:t,children:n,...r}=e,o=vl(yl,t),[i,a]=k.useState(!1),[s,l]=k.useState(!1);return kM(()=>a(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:x.jsx(D0,{asChild:!0,children:x.jsx(zf,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},EM="ToastTitle",B0=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});B0.displayName=EM;var CM="ToastDescription",H0=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});H0.displayName=CM;var W0="ToastAction",RM=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(U0,{altText:n,asChild:!0,children:x.jsx(Hf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${W0}\`. Expected non-empty \`string\`.`),null)});RM.displayName=W0;var q0="ToastClose",Hf=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=wM(q0,n);return x.jsx(U0,{asChild:!0,children:x.jsx(Vn.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});Hf.displayName=q0;var U0=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 Y0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),PM(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(...Y0(r))}}),t}function Wa(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?A0(o,i):o.dispatchEvent(i)}var Ng=(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 kM(e=()=>{}){const t=Un(e);Ss(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function PM(e){return e.nodeType===e.ELEMENT_NODE}function AM(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 Gc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var IM=F0,_M=V0,OM=$0,MM=B0,DM=H0,jM=Hf;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},FM=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"}}),G0=E.createContext(()=>{throw new Error("Not implemented")}),LM=()=>E.useContext(G0),Fg={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]}},VM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=FM({theme:t.theme||"default"});return x.jsx(OM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(ft.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:Fg[t.reversedIndex]||Fg.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(MM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(DM,{className:"select-text truncate",children:t.text})]}),r?x.jsx(jM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(dl,{className:"h-5 w-5"})}):null]})})})});function zM({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 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(IM,{duration:n,swipeThreshold:150,children:[x.jsx(G0.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(VM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(_M,{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 $M=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:Ne("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]}),K0=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Z0=E.createContext(""),BM=e=>{const[t,n]=K0(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(Z0.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})})},HM=()=>E.useContext(Z0),WM=e=>{const t=HM();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})},xl=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})]});xl.Icon=function(t){return x.jsx("header",{...t,className:Ne("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};xl.Body=function(t){return x.jsx(cn,{...t,className:Ne("min-w-0 flex-1",t.className),children:t.children})};xl.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 qM=e=>x.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function bl(){return typeof window<"u"}function xr(e){return X0(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=(X0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function X0(e){return bl()?e instanceof Node||e instanceof Bt(e).Node:!1}function tt(e){return bl()?e instanceof Element||e instanceof Bt(e).Element:!1}function bt(e){return bl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function cd(e){return!bl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function Sa(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 UM(e){return["table","td","th"].includes(xr(e))}function wl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Wf(e){const t=qf(),n=tt(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 YM(e){let t=Yn(e);for(;bt(t)&&!fr(t);){if(Wf(t))return t;if(wl(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 Sl(e){return tt(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 Q0(e){const t=Yn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:bt(t)&&Sa(t)?t:Q0(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Q0(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||[],Sa(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 vt(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 J0(){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 ew(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 GM()?!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(J0())}function tw(){return Uf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function GM(){return J0().includes("jsdom/")}function Wo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function KM(e){return"nativeEvent"in e}function ZM(e){return e.matches("html,body")}function It(e){return(e==null?void 0:e.ownerDocument)||document}function Kc(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 XM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Kf(e){return bt(e)&&e.matches(XM)}function Dt(e){e.preventDefault(),e.stopPropagation()}function nw(e){return e?e.getAttribute("role")==="combobox"&&Kf(e):!1}const An=Math.min,Xt=Math.max,Ts=Math.round,Co=Math.floor,pr=e=>({x:e,y:e}),QM={left:"right",right:"left",bottom:"top",top:"bottom"},JM={start:"end",end:"start"};function fd(e,t,n){return Xt(e,An(t,n))}function di(e,t){return typeof e=="function"?e(t):e}function hr(e){return e.split("-")[0]}function fi(e){return e.split("-")[1]}function rw(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 rw(Yr(e))}function eD(e,t,n){n===void 0&&(n=!1);const r=fi(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=Es(a)),[a,Es(a)]}function tD(e){const t=Es(e);return[pd(e),t,pd(t)]}function pd(e){return e.replace(/start|end/g,t=>JM[t])}function nD(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 rD(e,t,n,r){const o=fi(e);let i=nD(hr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(pd)))),i}function Es(e){return e.replace(/left|right|bottom|top/g,t=>QM[t])}function oD(e){return{top:0,right:0,bottom:0,left:0,...e}}function ow(e){return typeof e!="number"?oD(e):{top:e,right:e,bottom:e,left:e}}function Cs(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 nD=["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])"],Rs=nD.join(","),iw=typeof Element>"u",qo=iw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ks=!iw&&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},Ps=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},rD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},oD=function(t,n,r){if(Ps(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Rs));return n&&qo.call(t,Rs)&&o.unshift(t),o=o.filter(r),o},iD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ps(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,Rs);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ps(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},aw=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},sw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||rD(t))&&!aw(t)?0:t.tabIndex},aD=function(t,n){var r=sw(t);return r<0&&n&&!aw(t)?0:r},sD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},lw=function(t){return t.tagName==="INPUT"},lD=function(t){return lw(t)&&t.type==="hidden"},cD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},uD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},dD=function(t){if(!t.name)return!0;var n=t.form||ks(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=uD(o,t.form);return!i||i===t},fD=function(t){return lw(t)&&t.type==="radio"},pD=function(t){return fD(t)&&!dD(t)},hD=function(t){var n,r=t&&ks(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=ks(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},Lg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},mD=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=ks(t);if(l&&!l.shadowRoot&&o(l)===!0)return Lg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(hD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Lg(t);return!1},gD=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},vD=function(t,n){return!(n.disabled||Ps(n)||lD(n)||mD(n,t)||cD(n)||gD(n))},hd=function(t,n){return!(pD(n)||sw(n)<0||!vD(t,n))},yD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},xD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=aD(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(sD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},oa=function(t,n){n=n||{};var r;return n.getShadowRoot?r=iD([t],n.includeContainer,{filter:hd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:yD}):r=oD(t,n.includeContainer,hd.bind(null,n)),xD(r)},bD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Rs)===!1?!1:hd(n,t)};function Vg(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(fi(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const wD=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}=Vg(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}=Vg(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}=di(t,e),m=ow(f),h=s[p?d==="floating"?"reference":"floating":d],v=Cs(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=Cs(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 SD=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}=di(e,t)||{};if(c==null)return{};const d=ow(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),j=A,V=C-g[m]-O,P=C/2-g[m]/2+R,D=fd(j,P,V),_=!l.arrow&&fi(o)!=null&&P!==D&&i.reference[m]/2-(P<j?A:O)-g[m]/2<0,L=_?P<j?P-j:P-V:0;return{[f]:p[f]+L,data:{[f]:D,centerOffset:P-D-L,..._&&{alignmentOffset:L}},reset:_}}}),TD=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}=di(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?[Es(s)]:QM(s)),S=m!=="none";!p&&S&&w.push(...eD(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=XM(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,j;const P=(((O=i.flip)==null?void 0:O.index)||0)+1,D=C[P];if(D)return{data:{index:P,overflows:A},reset:{placement:D}};let _=(j=A.filter(L=>L.overflows[0]<=0).sort((L,N)=>L.overflows[1]-N.overflows[1])[0])==null?void 0:j.placement;if(!_)switch(f){case"bestFit":{var V;const L=(V=A.filter(N=>{if(S){const z=Yr(N.placement);return z===y||z==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((N,z)=>N[1]-z[1])[0])==null?void 0:V[0];L&&(_=L);break}case"initialPlacement":_=s;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function ED(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=fi(n),l=Yr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=di(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 CD=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 ED(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}}}}},RD=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}=di(e,t),c={x:n,y:r},u=await Qf(t,l),d=Yr(hr(o)),p=rw(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}}}}},kD=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}=di(e,t),l=await Qf(t,s),c=hr(n),u=fi(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 cw(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=Ts(n)!==i||Ts(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Jf(e){return tt(e)?e:e.contextElement}function ko(e){const t=Jf(e);if(!bt(t))return pr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=cw(t);let a=(i?Ts(n.width):n.width)/r,s=(i?Ts(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const PD=pr(0);function uw(e){const t=Bt(e);return!qf()||!t.visualViewport?PD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AD(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?tt(r)&&(a=ko(r)):a=ko(e));const s=AD(i,n,r)?uw(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&&tt(r)?Bt(r):r;let m=p,g=ud(m);for(;g&&r&&f!==m;){const h=ko(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 Cs({width:u,height:d,x:l,y:c})}function ID(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Zn(r),s=t?wl(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"||Sa(a))&&(l=Sl(r)),bt(r))){const p=Gr(r);c=ko(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 _D(e){return Array.from(e.getClientRects())}function dw(e){return Gr(Zn(e)).left+Sl(e).scrollLeft}function OD(e){const t=Zn(e),n=Sl(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+dw(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 MD(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 DD(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=bt(e)?ko(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 zg(e,t,n){let r;if(t==="viewport")r=MD(e,n);else if(t==="document")r=OD(Zn(e));else if(tt(t))r=DD(t,n);else{const o=uw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Cs(r)}function fw(e,t){const n=Yn(e);return n===t||!tt(n)||fr(n)?!1:nn(n).position==="fixed"||fw(n,t)}function jD(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(s=>tt(s)&&xr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Yn(e):e;for(;tt(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)||Sa(a)&&!l&&fw(e,a))?r=r.filter(u=>u!==a):o=s,a=Yn(a)}return t.set(e,r),r}function ND(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?wl(t)?[]:jD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=zg(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},zg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function FD(e){const{width:t,height:n}=cw(e);return{width:t,height:n}}function LD(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"||Sa(o))&&(s=Sl(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=dw(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 Zc(e){return nn(e).position==="static"}function $g(e,t){return!bt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function pw(e,t){const n=Bt(e);if(wl(e))return n;if(!bt(e)){let o=Yn(e);for(;o&&!fr(o);){if(tt(o)&&!Zc(o))return o;o=Yn(o)}return n}let r=$g(e,t);for(;r&&HM(r)&&Zc(r);)r=$g(r,t);return r&&fr(r)&&Zc(r)&&!Wf(r)?n:r||WM(e)||n}const VD=async function(e){const t=this.getOffsetParent||pw,n=this.getDimensions,r=await n(e.floating);return{reference:LD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zD(e){return nn(e).direction==="rtl"}const $D={convertOffsetParentRelativeRectToViewportRelativeRect:ID,getDocumentElement:Zn,getClippingRect:ND,getOffsetParent:pw,getElementRects:VD,getClientRects:_D,getDimensions:FD,getScale:ko,isElement:tt,isRTL:zD};function BD(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 Ta(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?BD(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 HD=CD,WD=RD,qD=TD,UD=kD,Bg=SD,YD=(e,t,n)=>{const r=new Map,o={platform:$D,...n},i={...o.platform,_c:r};return wD(e,t,{...o,platform:i})};var as=typeof document<"u"?E.useLayoutEffect:E.useEffect;function As(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(!As(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)&&!As(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hg(e,t){const n=hw(e);return Math.round(t*n)/n}function Xc(e){const t=k.useRef(e);return as(()=>{t.current=e}),t}function GD(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);As(p,r)||f(r);const[m,g]=k.useState(null),[h,v]=k.useState(null),y=k.useCallback(N=>{N!==S.current&&(S.current=N,g(N))},[]),b=k.useCallback(N=>{N!==C.current&&(C.current=N,v(N))},[]),T=i||m,w=a||h,S=k.useRef(null),C=k.useRef(null),R=k.useRef(u),I=l!=null,A=Xc(l),O=Xc(o),j=Xc(c),V=k.useCallback(()=>{if(!S.current||!C.current)return;const N={placement:t,strategy:n,middleware:p};O.current&&(N.platform=O.current),YD(S.current,C.current,N).then(z=>{const M={...z,isPositioned:j.current!==!1};P.current&&!As(R.current,M)&&(R.current=M,Js.flushSync(()=>{d(M)}))})},[p,t,n,O,j]);as(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[c]);const P=k.useRef(!1);as(()=>(P.current=!0,()=>{P.current=!1}),[]),as(()=>{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 D=k.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:b}),[y,b]),_=k.useMemo(()=>({reference:T,floating:w}),[T,w]),L=k.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const z=Hg(_.floating,u.x),M=Hg(_.floating,u.y);return s?{...N,transform:"translate("+z+"px, "+M+"px)",...hw(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:M}},[n,s,_.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:V,refs:D,elements:_,floatingStyles:L}),[u,V,D,_,L])}const KD=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?Bg({element:r.current,padding:o}).fn(n):{}:r?Bg({element:r,padding:o}).fn(n):{}}}},Ea=(e,t)=>({...HD(e),options:[e,t]}),ep=(e,t)=>({...WD(e),options:[e,t]}),tp=(e,t)=>({...qD(e),options:[e,t]}),mw=(e,t)=>({...UD(e),options:[e,t]}),gw=(e,t)=>({...KD(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 vw={...k},ZD=vw.useInsertionEffect,XD=ZD||(e=>e());function Rt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return XD(()=>{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",Ca="ArrowDown",Uo="ArrowLeft",pi="ArrowRight";function qa(e,t,n){return Math.floor(e/t)!==n}function Bi(e,t){return t<0||t>=e.current.length}function Qc(e,t){return Ft(e,{disabledIndices:t})}function Wg(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&&ss(a,s,o));return s}function QD(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}Bi(e,d)&&(d=c)}if(n.key===Ca&&(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}))),Bi(e,d)&&(d=c)),r==="both"){const p=Co(c/i);n.key===pi&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&qa(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),qa(d,i,p)&&(d=c)),n.key===Uo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&qa(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})),qa(d,i,p)&&(d=c));const f=Co(l/i)===p;Bi(e,d)&&(o&&f?d=n.key===Uo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function JD(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 ej(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 tj(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ss(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 qg=0;function ir(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():qg=requestAnimationFrame(i)}var He=typeof document<"u"?E.useLayoutEffect:E.useEffect;function nj(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 rj(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 yw=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function oj(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 He(()=>{const l=new Map(o);Array.from(l.keys()).sort(nj).forEach((u,d)=>{l.set(u,d)}),rj(o,l)||i(l)},[o]),k.createElement(yw.Provider,{value:k.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function xw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=k.useContext(yw),[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 He(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),He(()=>{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 Ug=!1,ij=0;const Yg=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ij++;function aj(){const[e,t]=k.useState(()=>Ug?Yg():void 0);return He(()=>{e==null&&t(Yg())},[]),k.useEffect(()=>{Ug=!0},[]),e}const sj=vw.useId,hi=sj||aj;let ia;process.env.NODE_ENV!=="production"&&(ia=new Set);function ls(){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=ia)!=null&&e.has(o))){var i;(i=ia)==null||i.add(o),console.warn(o)}}function lj(){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=ia)!=null&&e.has(o))){var i;(i=ia)==null||i.add(o),console.error(o)}}const bw=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||ls("The `ref` prop is required for `FloatingArrow`."));const h=hi(),[v,y]=k.useState(!1);if(He(()=>{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 j=u&&R==="end"?"right":"left";u&&v&&(j=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:"",D=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",_={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",[j]:V,[O]:P,[C]:A||I?"100%":"calc(100% - "+b/2+"px)",transform:""+_+(f??""),...m}}),b>0&&k.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:D}),k.createElement("path",{stroke:b&&!p?g.fill:"none",d:D}),k.createElement("clipPath",{id:h},k.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+b,height:a})))});function ww(){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 Sw=k.createContext(null),Tw=k.createContext(null),br=()=>{var e;return((e=k.useContext(Sw))==null?void 0:e.id)||null},wr=()=>k.useContext(Tw);function cj(e){const t=hi(),n=wr(),o=br();return He(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function uj(e){const{children:t,id:n}=e,r=br();return k.createElement(Sw.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function dj(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(()=>ww())[0];return k.createElement(Tw.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 He(()=>{t.current=e}),t}const Gg=mr("safe-polygon");function Jc(e,t,n){return n&&!Wo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Ew(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 D;const _=(D=o.current.openEvent)==null?void 0:D.type;return(_==null?void 0:_.includes("mouse"))&&_!=="mousedown"},[o]);k.useEffect(()=>{if(!s)return;function D(_){let{open:L}=_;L||(clearTimeout(b.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[s,i]),k.useEffect(()=>{if(!s||!g.current||!n)return;function D(L){I()&&r(!1,L,"hover")}const _=It(a.floating).documentElement;return _.addEventListener("mouseleave",D),()=>{_.removeEventListener("mouseleave",D)}},[a.floating,n,r,s,g,I]);const A=k.useCallback(function(D,_,L){_===void 0&&(_=!0),L===void 0&&(L="hover");const N=Jc(h.current,"close",y.current);N&&!T.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,D,L),N)):_&&(clearTimeout(b.current),r(!1,D,L))},[h,r]),O=Rt(()=>{R.current(),T.current=void 0}),j=Rt(()=>{if(C.current){const D=It(a.floating).body;D.style.pointerEvents="",D.removeAttribute(Gg),C.current=!1}});k.useEffect(()=>{if(!s)return;function D(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function _(M){if(clearTimeout(b.current),S.current=!1,u&&!Wo(y.current)||d>0&&!Jc(h.current,"open"))return;const B=Jc(h.current,"open",y.current);B?b.current=window.setTimeout(()=>{v.current||r(!0,M,"hover")},B):r(!0,M,"hover")}function L(M){if(D())return;R.current();const B=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(){j(),O(),A(M,!0,"safe-polygon")}});const ee=T.current;B.addEventListener("mousemove",ee),R.current=()=>{B.removeEventListener("mousemove",ee)};return}(y.current==="touch"?!vt(a.floating,M.relatedTarget):!0)&&A(M)}function N(M){D()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){j(),O(),A(M)}})(M))}if(tt(a.domReference)){var z;const M=a.domReference;return n&&M.addEventListener("mouseleave",N),(z=a.floating)==null||z.addEventListener("mouseleave",N),p&&M.addEventListener("mousemove",_,{once:!0}),M.addEventListener("mouseenter",_),M.addEventListener("mouseleave",L),()=>{var B;n&&M.removeEventListener("mouseleave",N),(B=a.floating)==null||B.removeEventListener("mouseleave",N),p&&M.removeEventListener("mousemove",_),M.removeEventListener("mouseenter",_),M.removeEventListener("mouseleave",L)}}},[a,s,e,u,d,p,A,O,j,r,n,v,f,h,g,o]),He(()=>{var D;if(s&&n&&(D=g.current)!=null&&D.__options.blockPointerEvents&&I()){const L=It(a.floating).body;L.setAttribute(Gg,""),L.style.pointerEvents="none",C.current=!0;const N=a.floating;if(tt(a.domReference)&&N){var _;const z=a.domReference,M=f==null||(_=f.nodesRef.current.find(B=>B.id===m))==null||(_=_.context)==null?void 0:_.elements.floating;return M&&(M.style.pointerEvents=""),z.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{z.style.pointerEvents="",N.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),He(()=>{n||(y.current=void 0,O(),j())},[n,O,j]),k.useEffect(()=>()=>{O(),clearTimeout(b.current),clearTimeout(w.current),j()},[s,a.domReference,O,j]);const V=k.useMemo(()=>{function D(_){y.current=_.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(_){const{nativeEvent:L}=_;function N(){!S.current&&!v.current&&r(!0,L,"hover")}u&&!Wo(y.current)||n||d===0||(clearTimeout(w.current),y.current==="touch"?N():w.current=window.setTimeout(N,d))}}},[u,r,n,v,d]),P=k.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(D){A(D.nativeEvent,!1)}}),[A]);return k.useMemo(()=>s?{reference:V,floating:P}:{},[s,V,P])}function fj(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 pj(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,Ua=new WeakSet,Ya={},eu=0;const hj=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Cw=e=>e&&(e.host||Cw(e.parentNode)),mj=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Cw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function gj(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=mj(t,e),s=new Set,l=new Set(a),c=[];Ya[o]||(Ya[o]=new WeakMap);const u=Ya[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&&Ua.add(m),y===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return eu++,()=>{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||(!Ua.has(f)&&i&&f.removeAttribute(i),Ua.delete(f)),g||f.removeAttribute(o)}),eu--,eu||(mo=new WeakMap,mo=new WeakMap,Ua=new WeakSet,Ya={})}}function Kg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=It(e[0]).body;return gj(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 Rw(e,t){const n=oa(e,Go());t==="prev"&&n.reverse();const r=n.indexOf(gn(It(e)));return n.slice(r+1)[0]}function kw(){return Rw(document.body,"next")}function Pw(){return Rw(document.body,"prev")}function Hi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!vt(n,r)}function vj(e){oa(e,Go()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function yj(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 xj(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)||vt(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 bj;function Zg(e){e.key==="Tab"&&(e.target,clearTimeout(bj))}const Is=k.forwardRef(function(t,n){const[r,o]=k.useState();He(()=>(Gf()&&o("button"),document.addEventListener("keydown",Zg),()=>{document.removeEventListener("keydown",Zg)}),[]);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))}),Aw=k.createContext(null),Xg=mr("portal");function wj(e){e===void 0&&(e={});const{id:t,root:n}=e,r=hi(),o=Iw(),[i,a]=k.useState(null),s=k.useRef(null);return He(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),He(()=>{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(Xg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),He(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!tt(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(Xg,""),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=wj({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&&Hi(m)&&(m.type==="focusin"?yj:vj)(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(Aw.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(Is,{"data-type":"outside",ref:l,onFocus:f=>{if(Hi(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=Pw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:rp}),i&&Js.createPortal(t,i),p&&i&&k.createElement(Is,{"data-type":"outside",ref:c,onFocus:f=>{if(Hi(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=kw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Iw=()=>k.useContext(Aw),Sj=20;let Mr=[];function tu(e){Mr=Mr.filter(n=>n.isConnected);let t=e;if(!(!t||xr(t)==="body")){if(!bD(t,Go())){const n=oa(t,Go())[0];n&&(t=n)}Mr.push(t),Mr.length>Sj&&(Mr=Mr.slice(-20))}}function Qg(){return Mr.slice().reverse().find(e=>e.isConnected)}const Tj=k.forwardRef(function(t,n){return k.createElement("button",Yo({},t,{type:"button",ref:n,tabIndex:-1,style:rp}))});function mi(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=nw(b)&&w,C=hj()?i:!0,R=jt(o),I=jt(a),A=jt(s),O=wr(),j=Iw(),V=k.useRef(null),P=k.useRef(null),D=k.useRef(!1),_=k.useRef(!1),L=k.useRef(-1),N=j!=null,z=T==null?void 0:T.firstElementChild,M=(z==null?void 0:z.id)===y?z:T,B=Rt(function(Z){return Z===void 0&&(Z=M),Z?oa(Z,Go()):[]}),Q=Rt(Z=>{const G=B(Z);return R.current.map(K=>b&&K==="reference"?b:M&&K==="floating"?M:G).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function Z(K){if(K.key==="Tab"){vt(M,gn(It(M)))&&B().length===0&&!S&&Dt(K);const F=Q(),$=Pn(K);R.current[0]==="reference"&&$===b&&(Dt(K),K.shiftKey?ir(F[F.length-1]):ir(F[1])),R.current[1]==="floating"&&$===M&&K.shiftKey&&(Dt(K),ir(F[0]))}}const G=It(M);return G.addEventListener("keydown",Z),()=>{G.removeEventListener("keydown",Z)}},[r,b,M,c,R,S,B,Q]),k.useEffect(()=>{if(r||!T)return;function Z(G){const K=Pn(G),$=B().indexOf(K);$!==-1&&(L.current=$)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,B]),k.useEffect(()=>{if(r||!d)return;function Z(){_.current=!0,setTimeout(()=>{_.current=!1})}function G(K){const F=K.relatedTarget;queueMicrotask(()=>{const $=!(vt(b,F)||vt(T,F)||vt(F,T)||vt(j==null?void 0:j.portalNode,F)||F!=null&&F.hasAttribute(mr("focus-guard"))||O&&(Hr(O.nodesRef.current,m).find(Y=>{var ie,H;return vt((ie=Y.context)==null?void 0:ie.elements.floating,F)||vt((H=Y.context)==null?void 0:H.elements.domReference,F)})||fj(O.nodesRef.current,m).find(Y=>{var ie,H;return((ie=Y.context)==null?void 0:ie.elements.floating)===F||((H=Y.context)==null?void 0:H.elements.domReference)===F})));if(l&&$&&gn(It(M))===It(M).body){bt(M)&&(M==null||M.focus());const Y=L.current,ie=B(),H=ie[Y]||ie[ie.length-1]||M;bt(H)&&H.focus()}(S||!c)&&F&&$&&!_.current&&F!==Qg()&&(D.current=!0,g(!1,K))})}if(T&&bt(b))return b.addEventListener("focusout",G),b.addEventListener("pointerdown",Z),T.addEventListener("focusout",G),()=>{b.removeEventListener("focusout",G),b.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",G)}},[r,b,T,M,c,m,O,j,g,d,l,B,S]),k.useEffect(()=>{var Z;if(r)return;const G=Array.from((j==null||(Z=j.portalNode)==null?void 0:Z.querySelectorAll("["+mr("portal")+"]"))||[]);if(T){const K=[T,...G,V.current,P.current,R.current.includes("reference")||S?b:null].filter($=>$!=null),F=c||S?Kg(K,C,!C):Kg(K);return()=>{F()}}},[r,b,T,c,R,j,S,C]),He(()=>{if(r||!bt(M))return;const Z=It(M),G=gn(Z);queueMicrotask(()=>{const K=Q(M),F=I.current,$=(typeof F=="number"?K[F]:F.current)||M,Y=vt(M,G);!w&&!Y&&p&&ir($,{preventScroll:$===M})})},[r,p,M,w,Q,I]),He(()=>{if(r||!M)return;let Z=!1;const G=It(M),K=gn(G);let $=v.current.openEvent;const Y=f.domReference.current;tu(K);function ie(H){let{open:ye,reason:Ee,event:ke,nested:Ve}=H;ye&&($=ke),Ee==="escape-key"&&f.domReference.current&&tu(f.domReference.current),Ee==="hover"&&ke.type==="mouseleave"&&(D.current=!0),Ee==="outside-press"&&(Ve?(D.current=!1,Z=!0):D.current=!(ew(ke)||Yf(ke)))}return h.on("openchange",ie),()=>{h.off("openchange",ie);const H=gn(G),ye=vt(T,H)||O&&Hr(O.nodesRef.current,m).some(se=>{var xe;return vt((xe=se.context)==null?void 0:xe.elements.floating,H)});(ye||$&&["click","mousedown"].includes($.type))&&f.domReference.current&&tu(f.domReference.current);const ke=Y||K,Ve=oa(It(ke).body,Go());queueMicrotask(()=>{let se=Qg();!se&&bt(ke)&&T&&(se=xj(Ve,ke,T)),A.current&&!D.current&&bt(se)&&(!(se!==H&&H!==G.body)||ye)&&se.focus({preventScroll:Z})})}},[r,T,M,A,v,f,h,O,m]),He(()=>{if(!r&&j)return j.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{j.setFocusManagerState(null)}},[r,j,c,p,g,f,d]),He(()=>{if(r||!M||typeof MutationObserver!="function"||w)return;const Z=()=>{const K=M.getAttribute("tabindex"),F=B(),$=gn(It(T)),Y=F.indexOf($);Y!==-1&&(L.current=Y),R.current.includes("floating")||$!==f.domReference.current&&F.length===0?K!=="0"&&M.setAttribute("tabindex","0"):K!=="-1"&&M.setAttribute("tabindex","-1")};Z();const G=new MutationObserver(Z);return G.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{G.disconnect()}},[r,T,M,f,R,B,w]);function ee(Z){return r||!u||!c?null:k.createElement(Tj,{ref:Z==="start"?V:P,onClick:G=>g(!1,G.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&C&&(c?!S:!0)&&(N||c);return k.createElement(k.Fragment,null,X&&k.createElement(Is,{"data-type":"inside",ref:j==null?void 0:j.beforeInsideRef,onFocus:Z=>{if(c){const K=Q();ir(o[0]==="reference"?K[0]:K[K.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(D.current=!1,Hi(Z,j.portalNode)){const K=kw()||b;K==null||K.focus()}else{var G;(G=j.beforeOutsideRef.current)==null||G.focus()}}}),!S&&ee("start"),n,ee("end"),X&&k.createElement(Is,{"data-type":"inside",ref:j==null?void 0:j.afterInsideRef,onFocus:Z=>{if(c)ir(Q()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(d&&(D.current=!0),Hi(Z,j.portalNode)){const K=Pw()||b;K==null||K.focus()}else{var G;(G=j.afterOutsideRef.current)==null||G.focus()}}}))}const nu=new Set,Ej=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=hi();return He(()=>{if(!r)return;nu.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()=>{nu.delete(i),nu.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 Jg(e){return bt(e.target)&&e.target.tagName==="BUTTON"}function ev(e){return Kf(e)}function Ra(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||Jg(m))&&(m.key===" "&&!ev(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Jg(m)||ev(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 Cj(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 tv(e){return e!=null&&e.clientX!=null}function Rj(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=Rt((S,C)=>{d.current||r.current.openEvent&&!tv(r.current.openEvent)||a.setPositionReference(Cj(i,{x:S,y:C,axis:l,dataRef:r,pointerType:f}))}),y=Rt(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);vt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):v(R.clientX,R.clientY)}if(!r.current.openEvent||tv(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]),He(()=>{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 kj={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Pj={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},nv=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=Rt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=k.useRef(!1),b=k.useRef(!1),{escapeKey:T,outsidePress:w}=nv(f),{escapeKey:S,outsidePress:C}=nv(m),R=Rt(P=>{var D;if(!n||!a||!s||P.key!=="Escape")return;const _=(D=i.current.floatingContext)==null?void 0:D.nodeId,L=g?Hr(g.nodesRef.current,_):[];if(!T&&(P.stopPropagation(),L.length>0)){let N=!0;if(L.forEach(z=>{var M;if((M=z.context)!=null&&M.open&&!z.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}r(!1,UM(P)?P.nativeEvent:P,"escape-key")}),I=Rt(P=>{var D;const _=()=>{var L;R(P),(L=Pn(P))==null||L.removeEventListener("keydown",_)};(D=Pn(P))==null||D.addEventListener("keydown",_)}),A=Rt(P=>{var D;const _=y.current;y.current=!1;const L=b.current;if(b.current=!1,c==="click"&&L||_||typeof v=="function"&&!v(P))return;const N=Pn(P),z="["+mr("inert")+"]",M=It(o.floating).querySelectorAll(z);let B=tt(N)?N:null;for(;B&&!fr(B);){const Z=Yn(B);if(fr(Z)||!tt(Z))break;B=Z}if(M.length&&tt(N)&&!YM(N)&&!vt(N,o.floating)&&Array.from(M).every(Z=>!vt(B,Z)))return;if(bt(N)&&V){const Z=N.clientWidth>0&&N.scrollWidth>N.clientWidth,G=N.clientHeight>0&&N.scrollHeight>N.clientHeight;let K=G&&P.offsetX>N.clientWidth;if(G&&nn(N).direction==="rtl"&&(K=P.offsetX<=N.offsetWidth-N.clientWidth),K||Z&&P.offsetY>N.clientHeight)return}const Q=(D=i.current.floatingContext)==null?void 0:D.nodeId,ee=g&&Hr(g.nodesRef.current,Q).some(Z=>{var G;return Kc(P,(G=Z.context)==null?void 0:G.elements.floating)});if(Kc(P,o.floating)||Kc(P,o.domReference)||ee)return;const X=g?Hr(g.nodesRef.current,Q):[];if(X.length>0){let Z=!0;if(X.forEach(G=>{var K;if((K=G.context)!=null&&K.open&&!G.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,P,"outside-press")}),O=Rt(P=>{var D;const _=()=>{var L;A(P),(L=Pn(P))==null||L.removeEventListener(c,_)};(D=Pn(P))==null||D.addEventListener(c,_)});k.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function P(L){r(!1,L,"ancestor-scroll")}const D=It(o.floating);s&&D.addEventListener("keydown",S?I:R,S),v&&D.addEventListener(c,C?O:A,C);let _=[];return p&&(tt(o.domReference)&&(_=cr(o.domReference)),tt(o.floating)&&(_=_.concat(cr(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(_=_.concat(cr(o.reference.contextElement)))),_=_.filter(L=>{var N;return L!==((N=D.defaultView)==null?void 0:N.visualViewport)}),_.forEach(L=>{L.addEventListener("scroll",P,{passive:!0})}),()=>{s&&D.removeEventListener("keydown",S?I:R,S),v&&D.removeEventListener(c,C?O:A,C),_.forEach(L=>{L.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 j=k.useMemo(()=>({onKeyDown:R,[kj[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},[Pj[c]]:()=>{y.current=!0}}),[R,c]);return k.useMemo(()=>a?{reference:j,floating:V}:{},[a,j,V])}function Aj(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=hi(),i=k.useRef({}),[a]=k.useState(()=>ww()),s=br()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!tt(f)&&lj("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=Rt((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=Aj({...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();He(()=>{u&&(d.current=u)},[u]);const f=GD({...e,elements:{...o,...s&&{reference:s}}}),m=k.useCallback(b=>{const T=tt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(T),f.refs.setReference(T)},[f.refs]),g=k.useCallback(b=>{(tt(b)||b===null)&&(d.current=b,a(b)),(tt(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!tt(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 He(()=>{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 Ij(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&&tt(m))try{if(Gf()&&tw())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=tt(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||vt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||vt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return k.useMemo(()=>s?{reference:p}:{},[s,p])}const rv="active",ov="selected";function ru(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[rv]:a,[ov]: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&&[rv,ov].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=>ru(s,e,"reference"),t),i=k.useCallback(s=>ru(s,e,"floating"),n),a=k.useCallback(s=>ru(s,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let iv=!1;function Tl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function av(e,t){return Tl(t,e===np||e===Ca,e===Uo||e===pi)}function ou(e,t,n){return Tl(t,e===Ca,n?e===Uo:e===pi)||e==="Enter"||e===" "||e===""}function _j(e,t,n){return Tl(t,n?e===Uo:e===pi,e===Ca)}function sv(e,t,n){return Tl(t,n?e===pi: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||ls("`useListNavigation` looping must be enabled to allow escaping."),m||ls("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&T>1&&ls("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=br(),A=wr(),O=Rt(s),j=k.useRef(g),V=k.useRef(c??-1),P=k.useRef(null),D=k.useRef(!0),_=k.useRef(O),L=k.useRef(!!o.floating),N=k.useRef(n),z=k.useRef(!1),M=k.useRef(!1),B=jt(y),Q=jt(n),ee=jt(w),X=jt(o.floating),Z=jt(c),[G,K]=k.useState(),[F,$]=k.useState(),Y=Rt(function(se,xe,le){le===void 0&&(le=!1);function be(ue){m?(K(ue.id),A==null||A.events.emit("virtualfocus",ue),S&&(S.current=ue)):ir(ue,{preventScroll:!0,sync:tw()&&Gf()?iv||z.current:!1})}const oe=se.current[xe.current];oe&&be(oe),requestAnimationFrame(()=>{const ue=se.current[xe.current]||oe;if(!ue)return;oe||be(ue);const J=ee.current;J&&H&&(le||!D.current)&&(ue.scrollIntoView==null||ue.scrollIntoView(typeof J=="boolean"?{block:"nearest",inline:"nearest"}:J))})});He(()=>{document.createElement("div").focus({get preventScroll(){return iv=!0,!1}})},[]),He(()=>{l&&(n&&o.floating?j.current&&c!=null&&(M.current=!0,V.current=c,O(c)):L.current&&(V.current=-1,_.current(null)))},[l,n,o.floating,c,O]),He(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,Z.current!=null)return;if(L.current&&(V.current=-1,Y(i,V)),(!N.current||!L.current)&&j.current&&(P.current!=null||j.current===!0&&P.current==null)){let se=0;const xe=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(xe),se++):(V.current=P.current==null||ou(P.current,b,f)||p?Qc(i,B.current):Wg(i,B.current),P.current=null,O(V.current))};xe()}}else Bi(i,a)||(V.current=a,Y(i,V,M.current),M.current=!1)},[l,n,o.floating,a,Z,p,i,b,f,O,Y,B]),He(()=>{var se;if(!l||o.floating||!A||m||!L.current)return;const xe=A.nodesRef.current,le=(se=xe.find(ue=>ue.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,be=gn(It(o.floating)),oe=xe.some(ue=>ue.context&&vt(ue.context.elements.floating,be));le&&!oe&&D.current&&le.focus({preventScroll:!0})},[l,o.floating,A,I,m]),He(()=>{if(!l||!A||!m||I)return;function se(xe){$(xe.id),S&&(S.current=xe)}return A.events.on("virtualfocus",se),()=>{A.events.off("virtualfocus",se)}},[l,A,m,I,S]),He(()=>{_.current=O,L.current=!!o.floating}),He(()=>{n||(P.current=null)},[n]),He(()=>{N.current=n},[n]);const ie=a!=null,H=k.useMemo(()=>{function se(le){if(!n)return;const be=i.current.indexOf(le);be!==-1&&O(be)}return{onFocus(le){let{currentTarget:be}=le;se(be)},onClick:le=>{let{currentTarget:be}=le;return be.focus({preventScroll:!0})},...h&&{onMouseMove(le){let{currentTarget:be}=le;se(be)},onPointerLeave(le){let{pointerType:be}=le;!D.current||be==="touch"||(V.current=-1,Y(i,V),O(null),m||ir(X.current,{preventScroll:!0}))}}}},[n,X,Y,h,i,O,m]),ye=Rt(se=>{if(D.current=!1,z.current=!0,!Q.current&&se.currentTarget===X.current)return;if(p&&sv(se.key,b,f)){Dt(se),r(!1,se.nativeEvent,"list-navigation"),bt(o.domReference)&&!m&&o.domReference.focus();return}const xe=V.current,le=Qc(i,y),be=Wg(i,y);if(se.key==="Home"&&(Dt(se),V.current=le,O(V.current)),se.key==="End"&&(Dt(se),V.current=be,O(V.current)),T>1){const oe=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ue=JD(oe,T,R),J=ue.findIndex(te=>te!=null&&!ss(i.current,te,y)),q=ue.reduce((te,he,_e)=>he!=null&&!ss(i.current,he,y)?_e:te,-1);if(V.current=ue[QD({current:ue.map(te=>te!=null?i.current[te]:null)},{event:se,orientation:b,loop:d,cols:T,disabledIndices:tj([...y||i.current.map((te,he)=>ss(i.current,he)?he:void 0),void 0],ue),minIndex:J,maxIndex:q,prevIndex:ej(V.current>be?le:V.current,oe,ue,T,se.key===Ca?"bl":se.key===pi?"tr":"tl"),stopEvent:!0})],O(V.current),b==="both")return}if(av(se.key,b)){if(Dt(se),n&&!m&&gn(se.currentTarget.ownerDocument)===se.currentTarget){V.current=ou(se.key,b,f)?le:be,O(V.current);return}ou(se.key,b,f)?d?V.current=xe>=be?u&&xe!==i.current.length?-1:le:Ft(i,{startingIndex:xe,disabledIndices:y}):V.current=Math.min(be,Ft(i,{startingIndex:xe,disabledIndices:y})):d?V.current=xe<=le?u&&xe!==-1?i.current.length:be:Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:y}):V.current=Math.max(le,Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:y})),Bi(i,V.current)?O(null):O(V.current)}}),Ee=k.useMemo(()=>m&&n&&ie&&{"aria-activedescendant":F||G},[m,n,ie,F,G]),ke=k.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!nw(o.domReference)&&Ee,onKeyDown:ye,onPointerMove(){D.current=!0}}),[Ee,ye,o.domReference,b]),Ve=k.useMemo(()=>{function se(le){g==="auto"&&ew(le.nativeEvent)&&(j.current=!0)}function xe(le){j.current=g,g==="auto"&&Yf(le.nativeEvent)&&(j.current=!0)}return{...Ee,onKeyDown(le){D.current=!1;const be=le.key.indexOf("Arrow")===0,oe=_j(le.key,b,f),ue=sv(le.key,b,f),J=av(le.key,b),q=(p?oe:J)||le.key==="Enter"||le.key.trim()==="";if(m&&n){const Be=A==null?void 0:A.nodesRef.current.find(Ot=>Ot.parentId==null),Ye=A&&Be?pj(A.nodesRef.current,Be.id):null;if(be&&Ye&&S){const Ot=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(oe||ue){var te,he;const fn=((te=Ye.context)==null?void 0:te.elements.domReference)===le.currentTarget,Tn=ue&&!fn?(he=Ye.context)==null?void 0:he.elements.domReference:oe?i.current.find(Xn=>(Xn==null?void 0:Xn.id)===G):null;Tn&&(Dt(le),Tn.dispatchEvent(Ot),$(void 0))}if(J&&Ye.context&&Ye.context.open&&Ye.parentId&&le.currentTarget!==Ye.context.elements.domReference){var _e;Dt(le),(_e=Ye.context.elements.domReference)==null||_e.dispatchEvent(Ot);return}}return ye(le)}if(!(!n&&!v&&be)){if(q&&(P.current=p&&J?null:le.key),p){oe&&(Dt(le),n?(V.current=Qc(i,B.current),O(V.current)):r(!0,le.nativeEvent,"list-navigation"));return}J&&(c!=null&&(V.current=c),Dt(le),!n&&v?r(!0,le.nativeEvent,"list-navigation"):ye(le),n&&O(V.current))}},onFocus(){n&&!m&&O(null)},onPointerDown:xe,onMouseDown:se,onClick:se}},[G,Ee,ye,B,g,i,p,O,r,n,v,b,f,c,A,m,S]);return k.useMemo(()=>l?{reference:Ve,floating:ke,item:H}:{},[l,Ve,ke,H])}const Oj=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=Oj.get(a))!=null?n:a,l=hi(),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 lv=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 Mj(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 Dj(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=Mj(n,a);return!c&&s==="close"&&l("unmounted"),He(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function _w(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}=Dj(e,{duration:a}),v=jt(n),y=jt(r),b=jt(o),T=jt(i);return He(()=>{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(lv).join(","),transitionDuration:d+"ms",...C,...R}),h==="close"){const I=S||w;m({transitionProperty:Object.keys(I).map(lv).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,v,y,T,d,h,c]),{isMounted:g,styles:f}}function jj(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=Rt(s),b=Rt(l),T=jt(u),w=jt(p);He(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),He(()=>{if(r&&g.current===""){var A;h.current=(A=f??a)!=null?A:-1}},[r,f,a]);const S=Rt(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=Rt(A=>{function O(_,L,N){const z=T.current?T.current(L,N):L.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(N.toLocaleLowerCase()))===0);return z?_.indexOf(z):-1}const j=i.current;if(g.current.length>0&&g.current[0]!==" "&&(O(j,j,g.current)===-1?S(!1):A.key===" "&&Dt(A)),j==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Dt(A),S(!0)),j.every(_=>{var L,N;return _?((L=_[0])==null?void 0:L.toLocaleLowerCase())!==((N=_[1])==null?void 0:N.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,D=O(j,[...j.slice((P||0)+1),...j.slice(0,(P||0)+1)],g.current);D!==-1?(y(D),v.current=D):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 cv(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 Nj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Ow(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=vt(g.floating,I),j=vt(g.domReference,I),V=g.domReference.getBoundingClientRect(),P=g.floating.getBoundingClientRect(),D=m.split("-")[0],_=p>P.right-P.width/2,L=f>P.bottom-P.height/2,N=Nj(R,V),z=P.width>V.width,M=P.height>V.height,B=(z?V:P).left,Q=(z?V:P).right,ee=(M?V:P).top,X=(M?V:P).bottom;if(O&&(i=!0,!A))return;if(j&&(i=!1),j&&!A){i=!0;return}if(A&&tt(T.relatedTarget)&&vt(g.floating,T.relatedTarget)||y&&Hr(y.nodesRef.current,v).some(K=>{let{context:F}=K;return F==null?void 0:F.open}))return;if(D==="top"&&f>=V.bottom-1||D==="bottom"&&f<=V.top+1||D==="left"&&p>=V.right-1||D==="right"&&p<=V.left+1)return w();let Z=[];switch(D){case"top":Z=[[B,V.top+1],[B,P.bottom-1],[Q,P.bottom-1],[Q,V.top+1]];break;case"bottom":Z=[[B,P.top+1],[B,V.bottom-1],[Q,V.bottom-1],[Q,P.top+1]];break;case"left":Z=[[P.right-1,X],[P.right-1,ee],[V.left+1,ee],[V.left+1,X]];break;case"right":Z=[[V.right-1,X],[V.right-1,ee],[P.left+1,ee],[P.left+1,X]];break}function G(K){let[F,$]=K;switch(D){case"top":{const Y=[z?F+t/2:_?F+t*4:F-t*4,$+t+1],ie=[z?F-t/2:_?F+t*4:F-t*4,$+t+1],H=[[P.left,_||z?P.bottom-t:P.top],[P.right,_?z?P.bottom-t:P.top:P.bottom-t]];return[Y,ie,...H]}case"bottom":{const Y=[z?F+t/2:_?F+t*4:F-t*4,$-t],ie=[z?F-t/2:_?F+t*4:F-t*4,$-t],H=[[P.left,_||z?P.top+t:P.bottom],[P.right,_?z?P.top+t:P.bottom:P.top+t]];return[Y,ie,...H]}case"left":{const Y=[F+t+1,M?$+t/2:L?$+t*4:$-t*4],ie=[F+t+1,M?$-t/2:L?$+t*4:$-t*4];return[...[[L||M?P.right-t:P.left,P.top],[L?M?P.right-t:P.left:P.right-t,P.bottom]],Y,ie]}case"right":{const Y=[F-t,M?$+t/2:L?$+t*4:$-t*4],ie=[F-t,M?$-t/2:L?$+t*4:$-t*4],H=[[L||M?P.left+t:P.right,P.top],[L?M?P.left+t:P.right:P.left+t,P.bottom]];return[Y,ie,...H]}}}if(!cv([S,C],Z)){if(i&&!N)return w();if(!A&&r){const K=c(T.clientX,T.clientY);if(K!==null&&K<.1)return w()}cv([S,C],G([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const gi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Ea(10),tp({fallbackAxisSideDirection:"end"}),ep(),gw({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=oo({open:n,middleware:i,transform:!0,whileElementsMounted:Ta,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=Ra(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(mi,{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(bw,{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]})})})]})},Fj=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=Ra(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:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:x.jsx(ft.span,{layoutId:o,children:e.trigger})}),x.jsx(vr,{children:i?x.jsx(no,{root:t,children:x.jsx(mi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:x.jsx(ft.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Mw=300,Lj=500,Dw=(e="")=>Ne("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:()=>{}}),uv=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=cj(),w=xw(),S=y!==null,{floatingStyles:C,refs:R,context:I}=oo({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:Ta,placement:S?"right":"bottom-start",middleware:[Ea({mainAxis:S?0:4,alignmentAxis:S?-4:0}),tp(),ep()]}),A=ao(I,{role:"menu"}),O=ro(I,{bubbles:!0}),j=Ew(I,{move:!1,enabled:n,delay:{open:Mw},handleClose:Ow({blockPointerEvents:!0})}),V=Ra(I,{event:"mousedown",toggle:!S,ignoreMouse:S,keyboardHandlers:!0}),P=op(I,{loop:!0,listRef:g,activeIndex:f,nested:S,onNavigate:m}),D=jj(I,{activeIndex:f,listRef:h,resetMs:Lj,onMatch:c?m:void 0}),{getReferenceProps:_,getFloatingProps:L,getItemProps:N}=io([j,V,A,O,P,D]);E.useEffect(()=>{if(!b)return;function M(){u(!1)}function B(Q){Q.nodeId!==T&&Q.parentId===y&&u(!1)}return b.events.on("click",M),b.events.on("menuopen",B),()=>{b.events.off("click",M),b.events.off("menuopen",B)}},[b,T,y]),E.useEffect(()=>{c&&b&&b.events.emit("menuopen",{parentId:y,nodeId:T})},[b,c,T,y]);const z=o?s.className:Ne(Dw(s.className));return x.jsxs(uj,{id:T,children:[x.jsx(E.Fragment,{children:s.asChild?x.jsx(Ho,{..._(v.getItemProps({...s,onFocus(M){var B;(B=s.onFocus)==null||B.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,..._(v.getItemProps({...s,onFocus(M){var B;(B=s.onFocus)==null||B.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:N,setHasFocusInside:p,isOpen:c},children:x.jsx(oj,{elementsRef:g,labelsRef:h,children:c&&x.jsx(no,{preserveTabOrder:!0,children:x.jsx(mi,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:x.jsx(t,{...L(),ref:R.setFloating,style:{...s.style,...C},className:Ne("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})})})})})]})}),Vj=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(gd),s=xw({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:Dw(`${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]})}),zj=E.forwardRef((e,t)=>br()!==null?x.jsx(uv,{...e,isParent:!1,ref:t}):x.jsx(dj,{children:x.jsx(uv,{...e,isParent:!0,ref:t})})),$j=(e,t)=>qr()?t:window.matchMedia(e).matches,Bj=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r($j(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},dv=()=>window.matchMedia("@media (pointer: coarse)"),Hj=()=>{var r;const e=E.useRef(qr()?null:dv()),[t,n]=E.useState(qr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?dv():e.current).addEventListener("change",i=>n(i.matches))},[]),t},ip=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=Hj(),o=E.useRef(qr()?"":document.documentElement.style.overflowY);return E.useEffect(()=>{const i=document.documentElement;if(t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,i.style.overflowY="hidden",r||S0())return;i.style.padding=Xy(i)?"0 15px 0 0":""}else i.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),E.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(XS(c.style.height)):null,p=et.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},vn="600ms",Wj={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},qj={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},iu={drawer:e=>e==="left"?Wj:qj,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}}},Uj=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"}}),Yj={top:0,left:0,right:0,bottom:-1},Gj=e=>e*.62,Kj=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=Gj(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return x.jsx(ft.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:Yj,whileDrag:{cursor:"grabbing"},className:Ne("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})},Ga={drawer:"right",sheet:"none",dialog:"none"},Zj=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ga.drawer:Ga[o]:t?Ga[o]:Ga.sheet},Xj=({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})=>{const y=ip(e,"overflow-hidden"),b=E.useId(),T=E.useId(),w=Bj("(min-width: 64rem)"),S=f!=="dialog",C=Zj(w,d,f,m),R=w||d?iu[f]:iu.sheet,I=typeof R=="function"?R(C):R,A=w||d?f:"sheet",{refs:O,context:j}=oo({open:e,onOpenChange:s}),V=Ra(j),P=ao(j,{role:"dialog"}),D=ro(j,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:_,getFloatingProps:L}=io([V,P,D]),N=o,z=Lo(void 0),M=()=>s(!1);return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(Ho,{ref:O.setReference,..._({layoutId:a}),children:N}):x.jsx(ft.button,{ref:O.setReference,..._(),layoutId:a,type:"button",children:N})}):null,x.jsx(no,{children:x.jsx(vr,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(Ej,{lockScroll:!1,className:Ne(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${A==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:x.jsx(mi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:j,children:x.jsxs(ft.div,{...v,exit:"exit",animate:"enter","aria-modal":e,initial:"initial",layoutId:a,variants:I,"data-component":"modal",ref:ii(O.setFloating,y),className:Ne(Uj({position:C,type:A}),l),style:A==="drawer"?{width:z}:{height:z},...t?{"aria-labelledby":b,"aria-describedby":T}:{"aria-label":h},...L(),children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:b,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:M,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(dl,{})})}):null,S&&c?x.jsx(Kj,{onChange:s,parent:O.floating,position:C,sheet:A==="sheet",value:z}):null]})})}):null})})]})},Qj=e=>x.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),ap=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:Ta,onOpenChange:i?void 0:y,middleware:[ep(),Ea(5),tp({fallbackAxisSideDirection:"start"}),gw({padding:5,element:h})]}),S=Ew(w,{move:!0,delay:{open:Mw},enabled:l?s:!1,handleClose:c?Ow():null}),C=Ij(w,{enabled:l?a:!1}),R=Ra(w,{enabled:l?c:!1}),I=ro(w,{enabled:l}),A=ao(w,{role:"tooltip",enabled:l}),O=Rj(w,{enabled:!!l&&!!u}),{getReferenceProps:j,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,{...j(p),ref:ii(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(bw,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})});class _s{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++)_s.getDescendantProperty(s[l],i,r);else i&&_s.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=_s.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 El=0,Sr=1,vi=2,jw=4;function fv(e){return()=>e}function Jj(e){e()}function aa(e,t){return n=>e(t(n))}function pv(e,t){return()=>e(t)}function Nw(e,t){return n=>e(t,n)}function sp(e){return e!==void 0}function eN(...e){return()=>{e.map(Jj)}}function yi(){}function Cl(e,t){return t(e),e}function tN(e,t){return t(e)}function ut(...e){return e}function Xe(e,t){return e(Sr,t)}function Me(e,t){e(El,t)}function lp(e){e(vi)}function Lt(e){return e(jw)}function we(e,t){return Xe(e,Nw(t,El))}function Nn(e,t){const n=e(Sr,r=>{n(),t(r)});return n}function hv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Fw(e,t){return e===t}function lt(e=Fw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>aa(t,e)}function Cn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=nN(...t);return(r,o)=>{switch(r){case vi:lp(e);return;case Sr:return Xe(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 je(...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);Xe(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 nN(...e){return t=>e.reduceRight(tN,t)}function rN(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=Xe(e,i),t):(r(),yi);case vi:r(),n=null;return}}}function ae(e){let t=e;const n=$e();return(r,o)=>{switch(r){case El:t=o;break;case Sr:{o(t);break}case jw:return t}return n(r,o)}}function Vt(e,t){return Cl(ae(t),n=>we(e,n))}function $e(){const e=[];return(t,n)=>{switch(t){case El:e.slice().forEach(r=>{r(n)});return;case vi: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 Cl($e(),t=>we(e,t))}function Ue(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:oN(),singleton:n}}const oN=()=>Symbol();function iN(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 kt(...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);Xe(i,l=>{n[a]=l,r=r|s,r===o&&Me(t,n)})}),function(i,a){switch(i){case vi:{lp(t);return}case Sr:return r===o&&a(n),Xe(t,a)}}}function Pe(e,t=Fw){return ne(e,lt(t))}function mv(...e){return function(t,n){switch(t){case vi:return;case Sr:return eN(...e.map(r=>Xe(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 aN={0:"debug",3:"error",1:"log",2:"warn"},sN=()=>typeof globalThis>"u"?window:globalThis,Tr=Ue(()=>{const e=ae(3);return{log:ae((t,n,r=1)=>{var o;const i=(o=sN().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[aN[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 cp(e,t,n).callbackRef}function cp(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 Lw(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=lN(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?gv("column-gap",getComputedStyle(u).columnGap,o):gv("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return cp(c,n,l)}function lN(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 gv(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 up(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}=cp(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=Ue(()=>{const e=$e(),t=$e(),n=ae(0),r=$e(),o=ae(0),i=$e(),a=$e(),s=ae(0),l=ae(0),c=ae(0),u=ae(0),d=$e(),p=$e(),f=ae(!1),m=ae(!1),g=ae(!1);return we(ne(e,pe(({scrollTop:h})=>h)),t),we(ne(e,pe(({scrollHeight:h})=>h)),a),we(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}),sa={lvl:0};function Vw(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ot(e){return e===sa}function la(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?la(e.l,t):la(e.r,t)}function wn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=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 ot(e)?Bw(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?vv(Ct(e,{l:Jt(e.l,t,n)})):vv(Ct(e,{r:Jt(e.r,t,n)}))}function Po(){return sa}function Rl(e,t,n){if(ot(e))return[];const r=wn(e,t)[0];return cN(yd(e,r,n))}function vd(e,t){if(ot(e))return sa;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=$w(r);return cs(Ct(e,{k:i,l:zw(r),v:a}))}}else return t<n?cs(Ct(e,{l:vd(r,t)})):cs(Ct(e,{r:vd(o,t)}))}function zr(e){return ot(e)?[]:[...zr(e.l),{k:e.k,v:e.v},...zr(e.r)]}function yd(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(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 cs(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(au(t))return Hw(Ct(e,{lvl:n-1}));if(!ot(t)&&!ot(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(au(e))return xd(Ct(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=au(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 Bw(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 zw(e){return ot(e.r)?e.l:cs(Ct(e,{r:zw(e.r)}))}function au(e){return ot(e)||e.lvl>e.r.lvl}function $w(e){return ot(e.r)?[e.k,e.v]:$w(e.r)}function Bw(e,t,n,r=sa,o=sa){return{k:e,l:r,lvl:n,r:o,v:t}}function vv(e){return xd(Hw(e))}function Hw(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function xd(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function cN(e){return Vw(e,({k:t,v:n})=>({index:t,value:n}))}function Ww(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ca(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const dp=Ue(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function qw(e,t,n){return e[Os(e,t,n)]}function Os(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 uN(e,t,n,r){const o=Os(e,t,r),i=Os(e,n,r,o);return e.slice(o,i+1)}function Sn(e,t){return Math.round(e.getBoundingClientRect()[t])}function kl(e){return!ot(e.groupOffsetTree)}function fp({index:e},t){return t===e?0:t<e?-1:1}function dN(){return{groupIndices:[],groupOffsetTree:Po(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Po()}}function fN(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=Jt(e,0,i);continue}const s=Rl(e,a-1,o+1);if(s.some(xN(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 pN(e){return typeof e.groupIndex<"u"}function hN({offset:e},t){return t===e?0:t<e?-1:1}function ua(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=qw(t,e,fp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Uw(e,t){if(!kl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Yw(e,t,n){if(pN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Uw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function mN(e,t,n,r=0){return r>0&&(t=Math.max(t,qw(e,r,fp).offset)),Vw(uN(e,t,n,hN),yN)}function gN(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&&ot(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]=fN(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,ua(f,d,o)),Po()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function vN(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 yv(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=Os(o,t-1,fp),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 Rl(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 yN(e){return{index:e.index,value:e}}function xN(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 bN={offsetHeight:"height",offsetWidth:"width"},zn=Ue(([{log:e},{recalcInProgress:t}])=>{const n=$e(),r=$e(),o=Vt(r,0),i=$e(),a=$e(),s=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((w,S)=>Sn(w,bN[S])),p=ae(void 0),f=ae(0),m=dN(),g=Vt(ne(n,je(l,e,f),In(gN,m),lt()),m),h=Vt(ne(l,lt(),In((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);we(ne(l,Ce(w=>w.length>0),je(g,f),pe(([w,S,C])=>{const R=w.reduce((I,A,O)=>Jt(I,A,ua(A,S.offsetTree,C)||O),Po());return{...S,groupIndices:w,groupOffsetTree:R}})),g),we(ne(r,je(g),Ce(([w,{lastIndex:S}])=>w<S),pe(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),we(c,u);const v=Vt(ne(c,pe(w=>w===void 0)),!0);we(ne(u,Ce(w=>w!==void 0&&ot(Lt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=en(ne(n,je(g),In(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),pe(w=>w.changed)));Xe(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)Me(t,!0),Me(i,w+yv(w,S));else if(w<0){const C=Lt(h);C.length>0&&(w-=yv(-w,C)),Me(a,w)}}),Xe(ne(s,je(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);we(ne(i,je(g),pe(([w,S])=>{const C=S.groupIndices.length>0,R=[],I=S.lastSize;if(C){const A=la(S.sizeTree,0);let O=0,j=0;for(;O<w;){const P=S.groupIndices[j],D=S.groupIndices.length===j+1?1/0:S.groupIndices[j+1]-P-1;R.push({endIndex:P,size:A,startIndex:P}),R.push({endIndex:P+1+D-1,size:I,startIndex:P+1}),j++,O+=D+1}const V=zr(S.sizeTree);return O!==w&&V.shift(),V.reduce((P,{k:D,v:_})=>{let L=P.ranges;return P.prevSize!==0&&(L=[...P.ranges,{endIndex:D+w-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:D+w,prevSize:_,ranges:L}},{prevIndex:w,prevSize:0,ranges:R}).ranges}return zr(S.sizeTree).reduce((A,{k:O,v:j})=>({prevIndex:O+w,prevSize:j,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,je(g,f),pe(([w,{offsetTree:S},C])=>{const R=-w;return ua(R,S,C)})));return we(ne(a,je(g,f),pe(([w,S,C])=>{if(S.groupIndices.length>0){if(ot(S.sizeTree))return S;let R=Po();const I=Lt(h);let A=0,O=0,j=0;for(;A<-w;){j=I[O];const V=I[O+1]-j-1;O++,A+=V+1}if(R=zr(S.sizeTree).reduce((V,{k:P,v:D})=>Jt(V,Math.max(0,P+w),D),R),A!==-w){const V=la(S.sizeTree,j);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=zr(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}},ut(Tr,dp),{singleton:!0});function wN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Gw=Ue(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=$e(),a=$e(),s=en(ne(i,pe(wN)));return we(ne(s,pe(l=>l.totalCount)),n),we(ne(s,pe(l=>l.groupIndices)),e),we(ne(kt(o,t,r),Ce(([l,c])=>kl(c)),pe(([l,c,u])=>wn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),lt(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ut(zn,Wt)),Er=Ue(([{log:e}])=>{const t=ae(!1),n=en(ne(t,Ce(r=>r),lt()));return Xe(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},ut(Tr),{singleton:!0}),SN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Kw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!SN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ka=Ue(([{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=ae(0);let h=null,v=null,y=null;function b(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Me(l,!1)}return we(ne(f,je(n,d,r,g,s,a,p),je(e,i,o),pe(([[T,w,S,C,R,I,A,O],j,V,P])=>{const D=Kw(T),{align:_,behavior:L,offset:N}=D,z=C-1,M=Yw(D,w,z);let B=ua(M,w.offsetTree,j)+I;_==="end"?(B+=V+wn(w.sizeTree,M)[1]-S+P,M===z&&(B+=A)):_==="center"?B+=(V+wn(w.sizeTree,M)[1]-S+P)/2:B-=R,N&&(B+=N);const Q=ee=>{b(),ee?(O("retrying to scroll to",{location:T},tn.DEBUG),Me(f,T)):(Me(m,!0),O("list did not change, scroll successful",{},tn.DEBUG))};if(b(),L==="smooth"){let ee=!1;y=Xe(t,X=>{ee=ee||X}),h=Nn(u,()=>{Q(ee)})}else h=Nn(ne(t,TN(150)),Q);return v=setTimeout(()=>{b()},1200),Me(l,!0),O("scrolling from index to",{behavior:L,index:M,top:B},tn.DEBUG),{behavior:L,top:B}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},ut(zn,Wt,Tr),{singleton:!0});function TN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function pp(e,t){e==0?t():requestAnimationFrame(()=>{pp(e-1,t)})}function hp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Pa=Ue(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=ae(!0),l=ae(0),c=ae(!0);return we(ne(a,je(l),Ce(([u,d])=>!!d),Cn(!1)),s),we(ne(a,je(l),Ce(([u,d])=>!!d),Cn(!1)),c),Xe(ne(kt(t,a),je(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,m])=>u&&(!ot(p)||sp(f))&&!d&&!m),je(l)),([,u])=>{Nn(o,()=>{Me(c,!0)}),pp(4,()=>{Nn(r,()=>{Me(s,!0)}),Me(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ut(zn,Wt,ka,Er),{singleton:!0});function Zw(e,t){return Math.abs(e-t)<1.01}const da="up",Wi="down",EN="none",CN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},RN=0,Aa=Ue(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=ae(!1),s=ae(!0),l=$e(),c=$e(),u=ae(4),d=ae(RN),p=Vt(ne(mv(ne(Pe(o),Ko(1),Cn(!0)),ne(Pe(o),Ko(1),Cn(!1),hv(100))),lt()),!1),f=Vt(ne(mv(ne(n,Cn(!0)),ne(n,Cn(!1),hv(200))),lt()),!1);we(ne(kt(Pe(o),Pe(d)),pe(([y,b])=>y<=b),lt()),s),we(ne(s,lr(50)),c);const m=en(ne(kt(r,Pe(i),Pe(t),Pe(e),Pe(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 j,V;return T>y.state.scrollTop?(j="SCROLLED_DOWN",V=y.state.scrollTop-T):(j="SIZE_DECREASED",V=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:j,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}},CN),lt((y,b)=>y&&y.atBottom===b.atBottom))),g=Vt(ne(r,In((y,{scrollHeight:b,scrollTop:T,viewportHeight:w})=>{if(Zw(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}),Ce(y=>y.changed),pe(y=>y.jump)),0);we(ne(m,pe(y=>y.atBottom)),a),we(ne(a,lr(50)),l);const h=ae(Wi);we(ne(r,pe(({scrollTop:y})=>y),lt(),In((y,b)=>Lt(f)?{direction:y.direction,prevScrollTop:b}:{direction:b<y.prevScrollTop?da:Wi,prevScrollTop:b},{direction:Wi,prevScrollTop:0}),pe(y=>y.direction)),h),we(ne(r,lr(50),Cn(EN)),h);const v=ae(0);return we(ne(p,Ce(y=>!y),Cn(0)),v),we(ne(o,lr(100),je(p),Ce(([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}},ut(Wt)),Ms="top",Ds="bottom",xv="none";function bv(e,t,n){return typeof e=="number"?n===da&&t===Ms||n===Wi&&t===Ds?e:0:n===da?t===Ms?e.main:e.reverse:t===Ds?e.main:e.reverse}function wv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const mp=Ue(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=$e(),a=ae(0),s=ae(0),l=ae(0),c=Vt(ne(kt(Pe(r),Pe(o),Pe(n),Pe(i,ca),Pe(l),Pe(a),Pe(t),Pe(e),Pe(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=xv;const R=wv(b,Ms),I=wv(b,Ds);return f-=y,f+=p+v,m+=p+v,m-=y,f>u+w-R&&(C=da),m<u-S+d+I&&(C=Wi),C!==xv?[Math.max(T-p-bv(g,Ms,C)-R,0),T-S-v+d+bv(g,Ds,C)+I]:null}),Ce(u=>u!=null),lt(ca)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ut(Wt),{singleton:!0});function kN(e,t,n){if(kl(t)){const r=Uw(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 su={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function us(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:Sv(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:Sv(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function Xw(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=hp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return us(c,[],s,o,n,r)}function Sv(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=Rl(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=Ue(([{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=ae([]),h=ae(0),v=$e();we(i.topItemsIndexes,g);const y=Vt(ne(kt(f,m,Pe(l,ca),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ce(([S,C,,R,,,,,,,I])=>{const A=I&&I.length!==R;return S&&!C&&!A}),pe(([,,[S,C],R,I,A,O,j,V,P,D])=>{const _=I,{offsetTree:L,sizeTree:N}=_,z=Lt(h);if(R===0)return{...su,totalCount:R};if(S===0&&C===0)return z===0?{...su,totalCount:R}:Xw(z,A,I,V,P,D||[]);if(ot(N))return z>0?null:us(kN(hp(A,R),_,D),[],R,P,_,V);const M=[];if(j.length>0){const Z=j[0],G=j[j.length-1];let K=0;for(const F of Rl(N,Z,G)){const $=F.value,Y=Math.max(F.start,Z),ie=Math.min(F.end,G);for(let H=Y;H<=ie;H++)M.push({data:D==null?void 0:D[H],index:H,offset:K,size:$}),K+=$}}if(!O)return us([],M,R,P,_,V);const B=j.length>0?j[j.length-1]+1:0,Q=mN(L,S,C,B);if(Q.length===0)return null;const ee=R-1,X=Cl([],Z=>{for(const G of Q){const K=G.value;let F=K.offset,$=G.start;const Y=K.size;if(K.offset<S){$+=Math.floor((S-K.offset+P)/(Y+P));const H=$-G.start;F+=H*Y+H*P}$<B&&(F+=(B-$)*Y,$=B);const ie=Math.min(G.end,ee);for(let H=$;H<=ie&&!(F>=C);H++)Z.push({data:D==null?void 0:D[H],index:H,offset:F,size:Y}),F+=Y+P}});return us(X,M,R,P,_,V)}),Ce(S=>S!==null),lt()),su);we(ne(e,Ce(sp),pe(S=>S==null?void 0:S.length)),o),we(ne(y,pe(S=>S.topListHeight)),d),we(d,s),we(ne(y,pe(S=>[S.top,S.bottom])),a),we(ne(y,pe(S=>S.items)),v);const b=en(ne(y,Ce(({items:S})=>S.length>0),je(o,e),Ce(([{items:S},C])=>S[S.length-1].originalIndex===C-1),pe(([,S,C])=>[S-1,C]),lt(ca),pe(([S])=>S))),T=en(ne(y,lr(200),Ce(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),pe(({items:S})=>S[0].index),lt())),w=en(ne(y,Ce(({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}}),lt(Ww)));return{endReached:b,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},ut(zn,Gw,mp,Pa,ka,Aa,Er,dp),{singleton:!0}),Qw=Ue(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=$e(),a=Vt(ne(kt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return we(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},ut(Wt,so),{singleton:!0}),PN=Ue(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),r=Vt(ne(kt(n,e,t),Ce(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),lr(0),lt()),0);return{alignToBottom:n,paddingTopAddition:r}},ut(Wt,Qw),{singleton:!0});function Tv(e){return e?e==="smooth"?"smooth":"auto":!1}const AN=(e,t)=>typeof e=="function"?Tv(e(t)):t&&Tv(e),IN=Ue(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=ae(!1),d=$e();let p=null;function f(g){Me(o,{align:"end",behavior:g,index:"LAST"})}Xe(ne(kt(ne(Pe(t),Ko(1)),a),je(Pe(u),r,i,c),pe(([[g,h],v,y,b,T])=>{let w=h&&b,S="auto";return w&&(S=AN(v,y||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),Ce(({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 Xe(ne(kt(Pe(u),t,s),Ce(([g,,h])=>g&&h),In(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),je(u,t)),([,g])=>{Lt(i)&&m(g!==!1)}),Xe(d,()=>{m(Lt(u)!==!1)}),Xe(kt(Pe(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ut(zn,Aa,ka,Pa,Er,Tr,Wt)),_N=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(we(ne(s,je(i),Ce(([,l])=>l!==0),je(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>Xw(l,c,u,d,p,f))),a),{}),ut(zn,Pa,so,Er),{singleton:!0}),ON=Ue(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ae(0);return Xe(ne(e,je(r),Ce(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Nn(ne(n,Ko(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Me(t,o)})})}),{initialScrollTop:r}},ut(Er,Wt,so),{singleton:!0}),MN=({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,DN=Ue(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=$e();return we(ne(u,je(t,l,n,i,o,r,s),je(e),pe(([[d,p,f,m,g,h,v,y],b])=>{const{align:T,behavior:w,calculateViewLocation:S=MN,done:C,...R}=d,I=Yw(d,p,m-1),A=ua(I,p.offsetTree,b)+g+h,O=A+wn(p.sizeTree,I)[1],j=y+h,V=y+f-v,P=S({itemBottom:O,itemTop:A,locationParams:{align:T,behavior:w,...R},viewportBottom:V,viewportTop:j});return P?C&&Nn(ne(a,Ce(D=>!D),Ko(Lt(a)?1:2)),C):C&&C(),P}),Ce(d=>d!==null)),c),{scrollIntoView:u}},ut(zn,Wt,ka,so,Tr),{singleton:!0}),Jw=Ue(([{scrollVelocity:e}])=>{const t=ae(!1),n=$e(),r=ae(!1);return we(ne(e,je(r,t,n),Ce(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),lt()),t),Xe(ne(kt(t,e,n),je(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ut(Aa),{singleton:!0}),gp=Ue(([{scrollContainerState:e,scrollTo:t}])=>{const n=$e(),r=$e(),o=$e(),i=ae(!1),a=ae(void 0);return we(ne(kt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),we(ne(t,je(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ut(Wt)),jN=Ue(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=$e(),u=ae(void 0),d=ae(null),p=ae(null);return we(s,d),we(l,p),Xe(ne(c,je(t,r,a,d,p,n)),([f,m,g,h,v,y,b])=>{const T=vN(m.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=b,f({ranges:T,scrollTop:g})}),we(ne(u,Ce(sp),pe(NN)),o),we(ne(i,je(u),Ce(([,f])=>f!==void 0),lt(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},ut(zn,Wt,Pa,Er,gp));function NN(e){return{align:"start",index:0,offset:e.scrollTop}}const FN=Ue(([{topItemsIndexes:e}])=>{const t=ae(0);return we(ne(t,Ce(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ut(so));function e1(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const LN=e1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),VN=Ue(([{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,je(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]),Ce(([v])=>v!==0),je(r,s,n,o,f,m),Ce(([,v,y,b,,,T])=>!T&&!b&&v!==0&&y===da),pe(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Me(t,{behavior:"auto",top:-v}),Me(e,0)):(Me(e,0),Me(t,{behavior:"auto",top:-v}))}return Xe(ne(g,je(e,i)),([v,y,b])=>{b&&LN()?Me(e,y-v):h(-v)}),Xe(ne(kt(Vt(i,!1),e,m),Ce(([v,y,b])=>!v&&!b&&y!==0),pe(([v,y])=>y),lr(1)),h),we(ne(d,pe(v=>({top:-v}))),t),Xe(ne(c,je(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=la(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=>{Me(e,v),requestAnimationFrame(()=>{Me(t,{top:v}),requestAnimationFrame(()=>{Me(e,0),Me(m,!1)})})}),{deviation:e}},ut(Wt,Aa,so,zn,Tr,dp)),zN=Ue(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),ut(mp,_N,Er,Jw,Qw,ON,PN,gp,DN,Tr)),t1=Ue(([{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])=>(we(T.rangeChanged,I.scrollSeekRangeChanged),we(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}),ut(zn,Pa,Wt,jN,IN,so,ka,VN,FN,Gw,zN));function $N(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 Ka=typeof document<"u"?E.useLayoutEffect:E.useEffect;function vp(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&&Me(h.propsReady,!1);for(const y of r){const b=h[t.required[y]];Me(b,v[y])}for(const y of o)if(y in v){const b=h[t.optional[y]];Me(b,v[y])}h.propsReady&&Me(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=b=>{const T=h[t.methods[y]];Me(T,b)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=rN(h[t.events[y]]),v),{})}const d=E.forwardRef((h,v)=>{const{children:y,...b}=h,[T]=E.useState(()=>Cl(iN(e),C=>{l(C,b)})),[w]=E.useState(pv(u,T));Ka(()=>{for(const C of a)C in b&&Xe(w[C],b[C]);return()=>{Object.values(w).map(lp)}},[b,w,T]),Ka(()=>{l(T,b)}),E.useImperativeHandle(v,fv(c(T)));const S=n;return x.jsx(s.Provider,{value:T,children:n?x.jsx(S,{...$N([...r,...o,...a],b),children:y}):y})}),p=h=>E.useCallback(Nw(Me,E.useContext(s)[h]),[h]),f=h=>{const v=E.useContext(s)[h],y=E.useCallback(b=>Xe(v,b),[v]);return E.useSyncExternalStore(y,()=>Lt(v),()=>Lt(v))},m=h=>{const v=E.useContext(s)[h],[y,b]=E.useState(pv(Lt,v));return Ka(()=>Xe(v,T=>{T!==y&&b(fv(T))}),[v,y]),y},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const y=E.useContext(s)[h];Ka(()=>Xe(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const Pl=E.createContext(void 0),n1=E.createContext(void 0),r1=typeof document<"u"?E.useLayoutEffect:E.useEffect;function lu(e){return"self"in e}function BN(e){return"body"in e}function o1(e,t,n,r=yi,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(BN(h)||lu(h)){const y=lu(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():ga.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;lu(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)),Zw(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 cu="-webkit-sticky",Ev="sticky",i1=e1(()=>{if(typeof document>"u")return Ev;const e=document.createElement("div");return e.style.position=cu,e.style.position===cu?cu:Ev});function yp(e){return e}const HN=Ue(()=>{const e=ae(l=>`Item ${l}`),t=ae(null),n=ae(l=>`Group ${l}`),r=ae({}),o=ae(yp),i=ae("div"),a=ae(yi),s=(l,c=null)=>Vt(ne(r,pe(u=>u[l]),lt()),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")}}),WN=Ue(([e,t])=>({...e,...t}),ut(t1,HN)),qN=({height:e})=>x.jsx("div",{style:{height:e}}),UN={overflowAnchor:"none",position:i1(),zIndex:1},a1={overflowAnchor:"none"},YN={...a1,display:"inline-block",height:"100%"},Cv=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=sn("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=sn("windowScrollContainerState"),a=sn("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),m=sn("gap"),g=Ae("horizontalDirection"),{callbackRef:h}=Lw(n,p,d,e?yi:s,f,m,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,y]=E.useState(0);wp("deviation",P=>{v!==P&&y(P)});const b=Ae("EmptyPlaceholder"),T=Ae("ScrollSeekPlaceholder")||qN,w=Ae("ListComponent"),S=Ae("ItemComponent"),C=Ae("GroupComponent"),R=Ae("computeItemKey"),I=Ae("isSeeking"),A=Ae("groupIndices").length>0,O=Ae("alignToBottom"),j=Ae("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},...j?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...ct(b,c)}):x.jsx(w,{...ct(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 D=P.originalIndex,_=R(D+t.firstItemIndex,P.data,c);return I?E.createElement(T,{...ct(T,c),height:P.size,index:P.index,key:_,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...ct(C,c),"data-index":D,"data-item-index":P.index,"data-known-size":P.size,key:_,style:UN},u(P.index,c)):E.createElement(S,{...ct(S,c),...s1(S,P.data),"data-index":D,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:_,style:g?YN:a1},A?l(P.index,P.groupIndex,P.data,c):l(P.index,P.data,c))})})}),GN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},KN={outline:"none",overflowX:"auto",position:"relative"},xi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),ZN={position:i1(),top:0,width:"100%",zIndex:1};function ct(e,t){if(typeof e!="string")return{context:t}}function s1(e,t){return{item:typeof e=="string"?void 0:t}}const XN=E.memo(function(){const e=Ae("HeaderComponent"),t=sn("headerHeight"),n=Ae("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),QN=E.memo(function(){const e=Ae("FooterComponent"),t=sn("footerHeight"),n=Ae("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null});function xp({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}=o1(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?KN:GN,...o},tabIndex:0,...i,...ct(s,u),children:r})})}function bp({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}=o1(a,l,s,m,d);return r1(()=>{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,...ct(s,p),children:r})})}const JN=({children:e})=>{const t=E.useContext(Pl),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>aa(n,l=>Sn(l,i?"width":"height")),[n,i]),s=Fn(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:s,style:xi(o),children:e})},eF=({children:e})=>{const t=E.useContext(Pl),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Ae("customScrollParent"),i=up(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("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:xi(a),children:e})},tF=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...ZN,marginTop:`${n}px`},o=Ae("context");return x.jsx(t,{style:r,...ct(t,o),children:e})},nF=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?iF:oF,a=r||t?eF:JN;return x.jsxs(i,{...e,...ct(i,o),children:[n&&x.jsx(tF,{children:x.jsx(Cv,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(XN,{}),x.jsx(Cv,{}),x.jsx(QN,{})]})]})}),{Component:rF,useEmitter:wp,useEmitterValue:Ae,usePublisher:sn}=vp(WN,{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:{}},nF),oF=xp({useEmitter:wp,useEmitterValue:Ae,usePublisher:sn}),iF=bp({useEmitter:wp,useEmitterValue:Ae,usePublisher:sn}),Sp=rF,aF=Ue(()=>{const e=ae(l=>x.jsxs("td",{children:["Item $",l]})),t=ae(null),n=ae(null),r=ae(null),o=ae({}),i=ae(yp),a=ae(yi),s=(l,c=null)=>Vt(ne(o,pe(u=>u[l]),lt()),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")}}),sF=Ue(([e,t])=>({...e,...t}),ut(t1,aF)),lF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),cF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),uF={overflowAnchor:"none"},Rv=E.memo(function({showTopList:e=!1}){const t=De("listState"),n=De("computeItemKey"),r=De("firstItemIndex"),o=De("isSeeking"),i=De("ScrollSeekPlaceholder")||lF,a=De("context"),s=De("TableRowComponent"),l=De("fixedHeaderHeight"),c=De("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,{...ct(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...ct(s,a),...s1(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}:uF},c(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),dF=E.memo(function(){const e=De("listState"),t=De("topItemsIndexes").length>0,n=xn("sizeRanges"),r=De("useWindowScroll"),o=De("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=De("trackItemSizes"),c=De("itemSize"),u=De("log"),{callbackRef:d,ref:p}=Lw(n,c,l,s,u,void 0,o,!1,De("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Tp("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,m(A))});const g=De("EmptyPlaceholder"),h=De("FillerRow")||cF,v=De("TableBodyComponent"),y=De("paddingTopAddition"),b=De("statefulTotalCount"),T=De("context");if(b===0&&g)return x.jsx(g,{...ct(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,...ct(v,T),children:[R,t&&x.jsx(Rv,{showTopList:!0}),x.jsx(Rv,{}),I]})}),fF=({children:e})=>{const t=E.useContext(Pl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Fn(E.useMemo(()=>aa(n,i=>Sn(i,"height")),[n]),!0,De("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:xi(!1),children:e})},pF=({children:e})=>{const t=E.useContext(Pl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=De("customScrollParent"),i=up(n,o,De("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:xi(!1),children:e})},hF=E.memo(function(e){const t=De("useWindowScroll"),n=De("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=De("fixedHeaderContent"),a=De("fixedFooterContent"),s=De("context"),l=Fn(E.useMemo(()=>aa(r,v=>Sn(v,"height")),[r]),!0,De("skipAnimationFrameInResizeObserver")),c=Fn(E.useMemo(()=>aa(o,v=>Sn(v,"height")),[o]),!0,De("skipAnimationFrameInResizeObserver")),u=n||t?vF:gF,d=n||t?pF:fF,p=De("TableComponent"),f=De("TableHeadComponent"),m=De("TableFooterComponent"),g=i?x.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...ct(f,s),children:i()},"TableHead"):null,h=a?x.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...ct(m,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...ct(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(p,s),children:[g,x.jsx(dF,{},"TableBody"),h]})})})}),{Component:mF,useEmitter:Tp,useEmitterValue:De,usePublisher:xn}=vp(sF,{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:{}},hF),gF=xp({useEmitter:Tp,useEmitterValue:De,usePublisher:xn}),vF=bp({useEmitter:Tp,useEmitterValue:De,usePublisher:xn}),yF=mF,kv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},xF={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Pv,floor:js,max:qi,min:uu,round:Av}=Math;function Iv(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function bF(e){return{...xF,items:e}}function Za(e,t){return e&&e.width===t.width&&e.height===t.height}function wF(e,t){return e&&e.column===t.column&&e.row===t.row}const SF=Ue(([{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=ae(0),C=ae(0),R=ae(kv),I=ae({height:0,width:0}),A=ae({height:0,width:0}),O=$e(),j=$e(),V=ae(0),P=ae(null),D=ae({column:0,row:0}),_=$e(),L=$e(),N=ae(!1),z=ae(0),M=ae(!0),B=ae(!1),Q=ae(!1);Xe(ne(m,je(z),Ce(([F,$])=>!!$)),()=>{Me(M,!1)}),Xe(ne(kt(m,M,A,I,z,B),Ce(([F,$,Y,ie,,H])=>F&&!$&&Y.height!==0&&ie.height!==0&&!H)),([,,,,F])=>{Me(B,!0),pp(1,()=>{Me(O,F)}),Nn(ne(c),()=>{Me(t,[0,0]),Me(M,!0)})}),we(ne(L,Ce(F=>F!=null&&F.scrollTop>0),Cn(0)),C),Xe(ne(m,je(L),Ce(([,F])=>F!=null)),([,F])=>{F&&(Me(I,F.viewport),Me(A,F.item),Me(D,F.gap),F.scrollTop>0&&(Me(N,!0),Nn(ne(c,Ko(1)),$=>{Me(N,!1)}),Me(l,{top:F.scrollTop})))}),we(ne(I,pe(({height:F})=>F)),d),we(ne(kt(Pe(I,Za),Pe(A,Za),Pe(D,(F,$)=>F&&F.column===$.column&&F.row===$.row),Pe(c)),pe(([F,$,Y,ie])=>({gap:Y,item:$,scrollTop:ie,viewport:F}))),_),we(ne(kt(Pe(S),r,Pe(D,wF),Pe(A,Za),Pe(I,Za),Pe(P),Pe(C),Pe(N),Pe(M),Pe(z)),Ce(([,,,,,,,F])=>!F),pe(([F,[$,Y],ie,H,ye,Ee,ke,,Ve,se])=>{const{column:xe,row:le}=ie,{height:be,width:oe}=H,{width:ue}=ye;if(ke===0&&(F===0||ue===0))return kv;if(oe===0){const fn=hp(se,F),Tn=fn+Math.max(ke-1,0);return bF(Iv(fn,Tn,Ee))}const J=l1(ue,oe,xe);let q,te;Ve?$===0&&Y===0&&ke>0?(q=0,te=ke-1):(q=J*js(($+le)/(be+le)),te=J*Pv((Y+le)/(be+le))-1,te=uu(F-1,qi(te,J-1)),q=uu(te,qi(0,q))):(q=0,te=-1);const he=Iv(q,te,Ee),{bottom:_e,top:Be}=_v(ye,ie,H,he),Ye=Pv(F/J),Ot=Ye*be+(Ye-1)*le-_e;return{bottom:_e,itemHeight:be,items:he,itemWidth:oe,offsetBottom:Ot,offsetTop:Be,top:Be}})),R),we(ne(P,Ce(F=>F!==null),pe(F=>F.length)),S),we(ne(kt(I,A,R,D),Ce(([F,$,{items:Y}])=>Y.length>0&&$.height!==0&&F.height!==0),pe(([F,$,{items:Y},ie])=>{const{bottom:H,top:ye}=_v(F,ie,$,Y);return[ye,H]}),lt(ca)),t);const ee=ae(!1);we(ne(c,je(ee),pe(([F,$])=>$||F!==0)),ee);const X=en(ne(kt(R,S),Ce(([{items:F}])=>F.length>0),je(ee),Ce(([[F,$],Y])=>{const ie=F.items[F.items.length-1].index===$-1;return(Y||F.bottom>0&&F.itemHeight>0&&F.offsetBottom===0&&F.items.length===$)&&ie}),pe(([[,F]])=>F-1),lt())),Z=en(ne(Pe(R),Ce(({items:F})=>F.length>0&&F[0].index===0),Cn(0),lt())),G=en(ne(Pe(R),je(N),Ce(([{items:F},$])=>F.length>0&&!$),pe(([{items:F}])=>({endIndex:F[F.length-1].index,startIndex:F[0].index})),lt(Ww),lr(0)));we(G,f.scrollSeekRangeChanged),we(ne(O,je(I,A,S,D),pe(([F,$,Y,ie,H])=>{const ye=Kw(F),{align:Ee,behavior:ke,offset:Ve}=ye;let se=ye.index;se==="LAST"&&(se=ie-1),se=qi(0,se,uu(ie-1,se));let xe=wd($,H,Y,se);return Ee==="end"?xe=Av(xe-$.height+Y.height):Ee==="center"&&(xe=Av(xe-$.height/2+Y.height/2)),Ve&&(xe+=Ve),{behavior:ke,top:xe}})),l);const K=Vt(ne(R,pe(F=>F.offsetBottom+F.bottom)),0);return we(ne(T,pe(F=>({height:F.visibleHeight,width:F.visibleWidth}))),I),{customScrollParent:h,data:P,deviation:V,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:L,scrollBy:a,scrollContainerState:s,scrollHeight:j,scrollTo:l,scrollToIndex:O,scrollTop:c,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:T,...f,gridState:R,horizontalDirection:Q,initialTopMostItemIndex:z,totalListHeight:K,...p,endReached:X,propsReady:g,rangeChanged:G,startReached:Z,stateChanged:_,stateRestoreInProgress:N,...w}},ut(mp,Wt,Aa,Jw,Er,gp,Tr));function l1(e,t,n){return qi(1,js((e+n)/(js(t)+n)))}function _v(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=l1(e.width,n.width,t.column),i=js(r/o),a=i*n.height+qi(0,i-1)*t.row;return a>0?a+t.row:a}const TF=Ue(()=>{const e=ae(d=>`Item ${d}`),t=ae({}),n=ae(null),r=ae("virtuoso-grid-item"),o=ae("virtuoso-grid-list"),i=ae(yp),a=ae("div"),s=ae(yi),l=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),lt()),p),c=ae(!1),u=ae(!1);return we(Pe(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),EF=Ue(([e,t])=>({...e,...t}),ut(SF,TF)),CF=E.memo(function(){const e=dt("gridState"),t=dt("listClassName"),n=dt("itemClassName"),r=dt("itemContent"),o=dt("computeItemKey"),i=dt("isSeeking"),a=ln("scrollHeight"),s=dt("ItemComponent"),l=dt("ListComponent"),c=dt("ScrollSeekPlaceholder"),u=dt("context"),d=ln("itemDimensions"),p=ln("gap"),f=dt("log"),m=dt("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:Ov("column-gap",getComputedStyle(v).columnGap,f),row:Ov("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return r1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:x.jsx(l,{className:t,ref:h,...ct(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,{...ct(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):E.createElement(s,{...ct(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),RF=E.memo(function(){const e=dt("HeaderComponent"),t=ln("headerHeight"),n=dt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=dt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),kF=E.memo(function(){const e=dt("FooterComponent"),t=ln("footerHeight"),n=dt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=dt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),PF=({children:e})=>{const t=E.useContext(n1),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:xi(!1),children:e})},AF=({children:e})=>{const t=E.useContext(n1),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=dt("customScrollParent"),i=up(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:xi(!1),children:e})},IF=E.memo(function({...e}){const t=dt("useWindowScroll"),n=dt("customScrollParent"),r=n||t?OF:_F,o=n||t?AF:PF,i=dt("context");return x.jsx(r,{...e,...ct(r,i),children:x.jsxs(o,{children:[x.jsx(RF,{}),x.jsx(CF,{}),x.jsx(kF,{})]})})}),{useEmitter:c1,useEmitterValue:dt,usePublisher:ln}=vp(EF,{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"}},IF),_F=xp({useEmitter:c1,useEmitterValue:dt,usePublisher:ln}),OF=bp({useEmitter:c1,useEmitterValue:dt,usePublisher:ln});function Ov(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 Ep=()=>{const e=E.useContext(ci);return e?e.tweaks:gl},u1=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("span",{className:Ne("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(ap,{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(Yb,{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(qb,{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(bA,{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]}),Ia=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=Ep(),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:Ne("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(u1,{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})]})}),MF=e=>x.jsx(E.Fragment,{children:e.children}),DF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},jF={caseSensitive:!1,sort:!1},NF=[],FF=E.forwardRef(function(t,n){return x.jsx(ft.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),LF=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),VF={List:FF,Item:LF},vo=40,zF=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=E.useRef(null),T=g.value??g.defaultValue??"",w=_t(),[S,C]=E.useState(()=>Math.min(320,vo*o.length)),[R,I]=E.useState(!1),[A,O]=E.useState(""),[j,V]=E.useState(T),[P,D]=E.useState(()=>{var oe;return((oe=o.find(ue=>ue.value===T))==null?void 0:oe.label)??T}),[_,L]=E.useState(null),N=E.useRef(NF),z=m&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...o]:o,M=new Vr(z,["value","label"],jF).search(A),B=ip(R,"block-only"),Q=()=>{I(!1),C(0)},ee=M.filter(oe=>oe.hidden!==!0),X=m?void 0:`^(${o.map(oe=>`${rd(oe.value)}${oe.label?"|"+rd(oe.label):""}`).join("|")})$`,{x:Z,y:G,strategy:K,refs:F,context:$}=oo({open:R,transform:!0,placement:"bottom-start",onOpenChange:I,whileElementsMounted:Ta,middleware:[Ea(4),mw({padding:10,elementContext:"reference",apply(oe){const ue=oe.elements.floating.querySelector("ul"),J=(ue==null?void 0:ue.getBoundingClientRect().height)||0,q=Gi(F.reference.current,window.innerHeight),te=Math.min(J<vo?q:J,q,oe.availableHeight),he=ee.length===0?vo:Math.min(te,q,J),_e=`${y.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:_e,maxWidth:_e,height:he})}})]}),Y=_w($,DF),{getReferenceProps:ie,getFloatingProps:H,getItemProps:ye}=io([ao($,{role:"listbox"}),ro($),op($,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const oe=o.find(ue=>ue.value===g.value);V((oe==null?void 0:oe.label)??g.value)}},[g.value]),E.useEffect(()=>{if(!R)return C(0);const oe=F.reference;if(oe.current===null)return;const ue=Gi(oe.current,window.innerHeight);setTimeout(()=>C(Math.min(ue,ee.length*vo)),100)},[A,R,F.reference]),E.useEffect(()=>{const oe=F.reference.current;if(oe)return va(oe)},[]);const Ee=(oe,ue)=>{V(oe.value);const J=F.reference.current;if(!J)return;J==null||J.setAttribute("data-value",oe.value),J.value=oe.value;const q=new Event("change",{bubbles:!1,cancelable:!0});J.dispatchEvent(q),g.onChange&&g.onChange(q),D(oe.label??""),Q(),O(""),L(ue)},ke=oe=>{var J;const ue=oe.target.value;return O(ue),!R&&ue===""?I(!0):(oe.target.name=g.name||"",ue?I(!0):(J=g.onChange)==null?void 0:J.call(g,oe))},Ve=()=>{var oe;I(!0),O(""),(oe=F.reference.current)==null||oe.focus()},se=()=>{L(oe=>oe===null?0:oe),I(!0),O("")},xe=()=>{var oe;(oe=F.reference.current)==null||oe.setAttribute("data-value",""),O(""),V(""),D(""),Zy(F.reference.current),Q()},le=g.id||g.name,be=ee.length===0;return x.jsxs(Ia,{...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: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:Ve,children:[x.jsx(kf,{size:20}),x.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),j?x.jsx("button",{type:"button",onClick:xe,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",...ie({...g,onChange:ke,onFocus:se,pattern:X,ref:F.setReference,name:`${le}-shadow`,id:`${le}-shadow`,onClick:oe=>oe.currentTarget.focus(),onKeyDown(oe){var ue,J;if(oe.key==="Escape")return oe.currentTarget.blur(),Q();if(R){if(oe.key==="ArrowDown"){let q=et.number(_)?_+1:0;return q>ee.length-1&&(q=0),(ue=b.current)==null||ue.scrollIntoView({index:q}),L(q)}if(oe.key==="ArrowUp"){let q=et.number(_)?_-1:ee.length-1;return q<0&&(q=ee.length-1),(J=b.current)==null||J.scrollIntoView({index:q}),L(q)}if(oe.key==="Enter"){if(_!==null&&ee[_])return oe.preventDefault(),Ee(ee[_],_);if(ee.length===1)return oe.preventDefault(),Ee(ee[0],0)}}}}),"data-value":j,"data-error":!!t,"data-name":le,"data-target":le,required:f,value:R?A:P||j,"aria-autocomplete":"list",autoComplete:"off",className:Ne("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:le,name:le,type:"hidden","data-origin":le,ref:h,required:f,defaultValue:g.value||j||void 0}),x.jsx(no,{preserveTabOrder:!0,children:R?x.jsx(mi,{modal:!0,guards:!0,returnFocus:!1,context:$,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs(ft.div,{...H({ref:ii(B,F.setFloating),style:{...Y.styles,left:Z,top:G??0,position:K}}),initial:!1,"data-floating":"true",animate:{height:be?"auto":S},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!R)return C(0);const ue=F.floating.current.querySelectorAll("li").item(0),J=(ue?ue.getBoundingClientRect().height:vo)*ee.length;return ga.flushSync(()=>C(J+2))},children:[be?x.jsx("div",{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||w.autocompleteEmpty})}):null,x.jsx(Sp,{overscan:40,ref:b,hidden:be,data:ee,style:{height:S},defaultItemHeight:vo,components:VF,scrollerRef:oe=>void(v.current=oe),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(oe,ue)=>{const J=ue.Render??MF,q=j===ue.value||j===ue.label,te=_===oe,he=ue.label??ue.value;return x.jsx("button",{"data-value":ue.value,...ye({ref:_e=>void(N.current[oe]=_e),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":ue.disabled,onClick:()=>Ee(ue,oe),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${te?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(J,{...g,label:ue.label,value:ue.value,children:he})})}})]})}):null})]})}),Cp=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:Ne("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:Ne("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:Ne("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),d1=(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=va(C.current),A=r==null?void 0:r(R),O=j=>{const V=j;if(V.key==="Enter"&&R.enterKeyHint==="next"){const P=R.getAttribute("data-next");if(P){const D=document.getElementById(P);if(D)return D.focus(),void V.preventDefault()}}};return R.addEventListener("keydown",O),()=>{A==null||A(),I(),R.removeEventListener("keydown",O)}},[]),x.jsx(Ia,{...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:Ne(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:ii(T,C),className:Ne("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)})})}),_a=d1(m0,"input",{type:"text"}),Mv=new Date(1970,11,31),du={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Dv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},$F={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[]}},BF=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,Mv).flatMap(C=>et.keyof(du,C.type)?du[C.type](C.value):[]),h=fu(u,Mv).reduce((C,R)=>C+(et.keyof(Dv,R.type)?Dv[R.type](R.value):""),""),[v,y]=E.useState(d?fu(u,d).reduce((C,R)=>C+(et.keyof(du,R.type)?$F[R.type](d,R.value):""),""):""),b=C=>{const R=C.target.value;if(y(R),g.length===R.length&&g.every((A,O)=>{const j=R.charAt(O);return typeof A=="string"?j===A:A.test(j)})){const A=$o(U_(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?UI(C,h):"")),w=Qb(d),S=w?d.toISOString():void 0;return x.jsx(_a,{...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(gi,{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(pA,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(C0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),HF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],WF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],qF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],UF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],jv=(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 Nv(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?UF:qF:t.binary?WF:HF,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=jv(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=jv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Xa={exports:{}},Qa={exports:{}},Ge={};/** @license React v16.13.1
|
|
172
|
+
*/var iD=["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])"],Rs=iD.join(","),iw=typeof Element>"u",qo=iw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ks=!iw&&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},Ps=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},aD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},sD=function(t,n,r){if(Ps(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Rs));return n&&qo.call(t,Rs)&&o.unshift(t),o=o.filter(r),o},lD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ps(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,Rs);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ps(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},aw=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},sw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||aD(t))&&!aw(t)?0:t.tabIndex},cD=function(t,n){var r=sw(t);return r<0&&n&&!aw(t)?0:r},uD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},lw=function(t){return t.tagName==="INPUT"},dD=function(t){return lw(t)&&t.type==="hidden"},fD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},pD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},hD=function(t){if(!t.name)return!0;var n=t.form||ks(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=pD(o,t.form);return!i||i===t},mD=function(t){return lw(t)&&t.type==="radio"},gD=function(t){return mD(t)&&!hD(t)},vD=function(t){var n,r=t&&ks(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=ks(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},Lg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},yD=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=ks(t);if(l&&!l.shadowRoot&&o(l)===!0)return Lg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(vD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Lg(t);return!1},xD=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},bD=function(t,n){return!(n.disabled||Ps(n)||dD(n)||yD(n,t)||fD(n)||xD(n))},hd=function(t,n){return!(gD(n)||sw(n)<0||!bD(t,n))},wD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},SD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=cD(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(uD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},oa=function(t,n){n=n||{};var r;return n.getShadowRoot?r=lD([t],n.includeContainer,{filter:hd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:wD}):r=sD(t,n.includeContainer,hd.bind(null,n)),SD(r)},TD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Rs)===!1?!1:hd(n,t)};function Vg(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(fi(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const ED=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}=Vg(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}=Vg(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}=di(t,e),m=ow(f),h=s[p?d==="floating"?"reference":"floating":d],v=Cs(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=Cs(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 CD=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}=di(e,t)||{};if(c==null)return{};const d=ow(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),j=A,V=C-g[m]-O,P=C/2-g[m]/2+R,D=fd(j,P,V),_=!l.arrow&&fi(o)!=null&&P!==D&&i.reference[m]/2-(P<j?A:O)-g[m]/2<0,L=_?P<j?P-j:P-V:0;return{[f]:p[f]+L,data:{[f]:D,centerOffset:P-D-L,..._&&{alignmentOffset:L}},reset:_}}}),RD=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}=di(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?[Es(s)]:tD(s)),S=m!=="none";!p&&S&&w.push(...rD(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=eD(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,j;const P=(((O=i.flip)==null?void 0:O.index)||0)+1,D=C[P];if(D)return{data:{index:P,overflows:A},reset:{placement:D}};let _=(j=A.filter(L=>L.overflows[0]<=0).sort((L,N)=>L.overflows[1]-N.overflows[1])[0])==null?void 0:j.placement;if(!_)switch(f){case"bestFit":{var V;const L=(V=A.filter(N=>{if(S){const z=Yr(N.placement);return z===y||z==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((N,z)=>N[1]-z[1])[0])==null?void 0:V[0];L&&(_=L);break}case"initialPlacement":_=s;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function kD(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=fi(n),l=Yr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=di(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 PD=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 kD(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}}}}},AD=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}=di(e,t),c={x:n,y:r},u=await Qf(t,l),d=Yr(hr(o)),p=rw(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}}}}},ID=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}=di(e,t),l=await Qf(t,s),c=hr(n),u=fi(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 cw(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=Ts(n)!==i||Ts(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Jf(e){return tt(e)?e:e.contextElement}function ko(e){const t=Jf(e);if(!bt(t))return pr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=cw(t);let a=(i?Ts(n.width):n.width)/r,s=(i?Ts(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const _D=pr(0);function uw(e){const t=Bt(e);return!qf()||!t.visualViewport?_D:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function OD(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?tt(r)&&(a=ko(r)):a=ko(e));const s=OD(i,n,r)?uw(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&&tt(r)?Bt(r):r;let m=p,g=ud(m);for(;g&&r&&f!==m;){const h=ko(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 Cs({width:u,height:d,x:l,y:c})}function MD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Zn(r),s=t?wl(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"||Sa(a))&&(l=Sl(r)),bt(r))){const p=Gr(r);c=ko(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 DD(e){return Array.from(e.getClientRects())}function dw(e){return Gr(Zn(e)).left+Sl(e).scrollLeft}function jD(e){const t=Zn(e),n=Sl(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+dw(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=qf();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function FD(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=bt(e)?ko(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 zg(e,t,n){let r;if(t==="viewport")r=ND(e,n);else if(t==="document")r=jD(Zn(e));else if(tt(t))r=FD(t,n);else{const o=uw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Cs(r)}function fw(e,t){const n=Yn(e);return n===t||!tt(n)||fr(n)?!1:nn(n).position==="fixed"||fw(n,t)}function LD(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(s=>tt(s)&&xr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Yn(e):e;for(;tt(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)||Sa(a)&&!l&&fw(e,a))?r=r.filter(u=>u!==a):o=s,a=Yn(a)}return t.set(e,r),r}function VD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?wl(t)?[]:LD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=zg(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},zg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function zD(e){const{width:t,height:n}=cw(e);return{width:t,height:n}}function $D(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"||Sa(o))&&(s=Sl(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=dw(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 Zc(e){return nn(e).position==="static"}function $g(e,t){return!bt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function pw(e,t){const n=Bt(e);if(wl(e))return n;if(!bt(e)){let o=Yn(e);for(;o&&!fr(o);){if(tt(o)&&!Zc(o))return o;o=Yn(o)}return n}let r=$g(e,t);for(;r&&UM(r)&&Zc(r);)r=$g(r,t);return r&&fr(r)&&Zc(r)&&!Wf(r)?n:r||YM(e)||n}const BD=async function(e){const t=this.getOffsetParent||pw,n=this.getDimensions,r=await n(e.floating);return{reference:$D(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function HD(e){return nn(e).direction==="rtl"}const WD={convertOffsetParentRelativeRectToViewportRelativeRect:MD,getDocumentElement:Zn,getClippingRect:VD,getOffsetParent:pw,getElementRects:BD,getClientRects:DD,getDimensions:zD,getScale:ko,isElement:tt,isRTL:HD};function qD(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 Ta(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?qD(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 UD=PD,YD=AD,GD=RD,KD=ID,Bg=CD,ZD=(e,t,n)=>{const r=new Map,o={platform:WD,...n},i={...o.platform,_c:r};return ED(e,t,{...o,platform:i})};var as=typeof document<"u"?E.useLayoutEffect:E.useEffect;function As(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(!As(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)&&!As(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hg(e,t){const n=hw(e);return Math.round(t*n)/n}function Xc(e){const t=k.useRef(e);return as(()=>{t.current=e}),t}function XD(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);As(p,r)||f(r);const[m,g]=k.useState(null),[h,v]=k.useState(null),y=k.useCallback(N=>{N!==S.current&&(S.current=N,g(N))},[]),b=k.useCallback(N=>{N!==C.current&&(C.current=N,v(N))},[]),T=i||m,w=a||h,S=k.useRef(null),C=k.useRef(null),R=k.useRef(u),I=l!=null,A=Xc(l),O=Xc(o),j=Xc(c),V=k.useCallback(()=>{if(!S.current||!C.current)return;const N={placement:t,strategy:n,middleware:p};O.current&&(N.platform=O.current),ZD(S.current,C.current,N).then(z=>{const M={...z,isPositioned:j.current!==!1};P.current&&!As(R.current,M)&&(R.current=M,Js.flushSync(()=>{d(M)}))})},[p,t,n,O,j]);as(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[c]);const P=k.useRef(!1);as(()=>(P.current=!0,()=>{P.current=!1}),[]),as(()=>{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 D=k.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:b}),[y,b]),_=k.useMemo(()=>({reference:T,floating:w}),[T,w]),L=k.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const z=Hg(_.floating,u.x),M=Hg(_.floating,u.y);return s?{...N,transform:"translate("+z+"px, "+M+"px)",...hw(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:M}},[n,s,_.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:V,refs:D,elements:_,floatingStyles:L}),[u,V,D,_,L])}const QD=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?Bg({element:r.current,padding:o}).fn(n):{}:r?Bg({element:r,padding:o}).fn(n):{}}}},Ea=(e,t)=>({...UD(e),options:[e,t]}),ep=(e,t)=>({...YD(e),options:[e,t]}),tp=(e,t)=>({...GD(e),options:[e,t]}),mw=(e,t)=>({...KD(e),options:[e,t]}),gw=(e,t)=>({...QD(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 vw={...k},JD=vw.useInsertionEffect,ej=JD||(e=>e());function Rt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ej(()=>{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",Ca="ArrowDown",Uo="ArrowLeft",pi="ArrowRight";function qa(e,t,n){return Math.floor(e/t)!==n}function Bi(e,t){return t<0||t>=e.current.length}function Qc(e,t){return Ft(e,{disabledIndices:t})}function Wg(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&&ss(a,s,o));return s}function tj(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}Bi(e,d)&&(d=c)}if(n.key===Ca&&(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}))),Bi(e,d)&&(d=c)),r==="both"){const p=Co(c/i);n.key===pi&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&qa(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),qa(d,i,p)&&(d=c)),n.key===Uo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&qa(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})),qa(d,i,p)&&(d=c));const f=Co(l/i)===p;Bi(e,d)&&(o&&f?d=n.key===Uo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function nj(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 rj(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 oj(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ss(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 qg=0;function ir(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():qg=requestAnimationFrame(i)}var He=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ij(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 aj(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 yw=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function sj(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 He(()=>{const l=new Map(o);Array.from(l.keys()).sort(ij).forEach((u,d)=>{l.set(u,d)}),aj(o,l)||i(l)},[o]),k.createElement(yw.Provider,{value:k.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function xw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=k.useContext(yw),[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 He(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),He(()=>{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 Ug=!1,lj=0;const Yg=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+lj++;function cj(){const[e,t]=k.useState(()=>Ug?Yg():void 0);return He(()=>{e==null&&t(Yg())},[]),k.useEffect(()=>{Ug=!0},[]),e}const uj=vw.useId,hi=uj||cj;let ia;process.env.NODE_ENV!=="production"&&(ia=new Set);function ls(){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=ia)!=null&&e.has(o))){var i;(i=ia)==null||i.add(o),console.warn(o)}}function dj(){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=ia)!=null&&e.has(o))){var i;(i=ia)==null||i.add(o),console.error(o)}}const bw=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||ls("The `ref` prop is required for `FloatingArrow`."));const h=hi(),[v,y]=k.useState(!1);if(He(()=>{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 j=u&&R==="end"?"right":"left";u&&v&&(j=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:"",D=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",_={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",[j]:V,[O]:P,[C]:A||I?"100%":"calc(100% - "+b/2+"px)",transform:""+_+(f??""),...m}}),b>0&&k.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:D}),k.createElement("path",{stroke:b&&!p?g.fill:"none",d:D}),k.createElement("clipPath",{id:h},k.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+b,height:a})))});function ww(){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 Sw=k.createContext(null),Tw=k.createContext(null),br=()=>{var e;return((e=k.useContext(Sw))==null?void 0:e.id)||null},wr=()=>k.useContext(Tw);function fj(e){const t=hi(),n=wr(),o=br();return He(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function pj(e){const{children:t,id:n}=e,r=br();return k.createElement(Sw.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function hj(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(()=>ww())[0];return k.createElement(Tw.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 He(()=>{t.current=e}),t}const Gg=mr("safe-polygon");function Jc(e,t,n){return n&&!Wo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Ew(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 D;const _=(D=o.current.openEvent)==null?void 0:D.type;return(_==null?void 0:_.includes("mouse"))&&_!=="mousedown"},[o]);k.useEffect(()=>{if(!s)return;function D(_){let{open:L}=_;L||(clearTimeout(b.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[s,i]),k.useEffect(()=>{if(!s||!g.current||!n)return;function D(L){I()&&r(!1,L,"hover")}const _=It(a.floating).documentElement;return _.addEventListener("mouseleave",D),()=>{_.removeEventListener("mouseleave",D)}},[a.floating,n,r,s,g,I]);const A=k.useCallback(function(D,_,L){_===void 0&&(_=!0),L===void 0&&(L="hover");const N=Jc(h.current,"close",y.current);N&&!T.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,D,L),N)):_&&(clearTimeout(b.current),r(!1,D,L))},[h,r]),O=Rt(()=>{R.current(),T.current=void 0}),j=Rt(()=>{if(C.current){const D=It(a.floating).body;D.style.pointerEvents="",D.removeAttribute(Gg),C.current=!1}});k.useEffect(()=>{if(!s)return;function D(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function _(M){if(clearTimeout(b.current),S.current=!1,u&&!Wo(y.current)||d>0&&!Jc(h.current,"open"))return;const B=Jc(h.current,"open",y.current);B?b.current=window.setTimeout(()=>{v.current||r(!0,M,"hover")},B):r(!0,M,"hover")}function L(M){if(D())return;R.current();const B=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(){j(),O(),A(M,!0,"safe-polygon")}});const ee=T.current;B.addEventListener("mousemove",ee),R.current=()=>{B.removeEventListener("mousemove",ee)};return}(y.current==="touch"?!vt(a.floating,M.relatedTarget):!0)&&A(M)}function N(M){D()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){j(),O(),A(M)}})(M))}if(tt(a.domReference)){var z;const M=a.domReference;return n&&M.addEventListener("mouseleave",N),(z=a.floating)==null||z.addEventListener("mouseleave",N),p&&M.addEventListener("mousemove",_,{once:!0}),M.addEventListener("mouseenter",_),M.addEventListener("mouseleave",L),()=>{var B;n&&M.removeEventListener("mouseleave",N),(B=a.floating)==null||B.removeEventListener("mouseleave",N),p&&M.removeEventListener("mousemove",_),M.removeEventListener("mouseenter",_),M.removeEventListener("mouseleave",L)}}},[a,s,e,u,d,p,A,O,j,r,n,v,f,h,g,o]),He(()=>{var D;if(s&&n&&(D=g.current)!=null&&D.__options.blockPointerEvents&&I()){const L=It(a.floating).body;L.setAttribute(Gg,""),L.style.pointerEvents="none",C.current=!0;const N=a.floating;if(tt(a.domReference)&&N){var _;const z=a.domReference,M=f==null||(_=f.nodesRef.current.find(B=>B.id===m))==null||(_=_.context)==null?void 0:_.elements.floating;return M&&(M.style.pointerEvents=""),z.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{z.style.pointerEvents="",N.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),He(()=>{n||(y.current=void 0,O(),j())},[n,O,j]),k.useEffect(()=>()=>{O(),clearTimeout(b.current),clearTimeout(w.current),j()},[s,a.domReference,O,j]);const V=k.useMemo(()=>{function D(_){y.current=_.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(_){const{nativeEvent:L}=_;function N(){!S.current&&!v.current&&r(!0,L,"hover")}u&&!Wo(y.current)||n||d===0||(clearTimeout(w.current),y.current==="touch"?N():w.current=window.setTimeout(N,d))}}},[u,r,n,v,d]),P=k.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(D){A(D.nativeEvent,!1)}}),[A]);return k.useMemo(()=>s?{reference:V,floating:P}:{},[s,V,P])}function mj(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 gj(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,Ua=new WeakSet,Ya={},eu=0;const vj=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Cw=e=>e&&(e.host||Cw(e.parentNode)),yj=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Cw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function xj(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=yj(t,e),s=new Set,l=new Set(a),c=[];Ya[o]||(Ya[o]=new WeakMap);const u=Ya[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&&Ua.add(m),y===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return eu++,()=>{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||(!Ua.has(f)&&i&&f.removeAttribute(i),Ua.delete(f)),g||f.removeAttribute(o)}),eu--,eu||(mo=new WeakMap,mo=new WeakMap,Ua=new WeakSet,Ya={})}}function Kg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=It(e[0]).body;return xj(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 Rw(e,t){const n=oa(e,Go());t==="prev"&&n.reverse();const r=n.indexOf(gn(It(e)));return n.slice(r+1)[0]}function kw(){return Rw(document.body,"next")}function Pw(){return Rw(document.body,"prev")}function Hi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!vt(n,r)}function bj(e){oa(e,Go()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function wj(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 Sj(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)||vt(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 Tj;function Zg(e){e.key==="Tab"&&(e.target,clearTimeout(Tj))}const Is=k.forwardRef(function(t,n){const[r,o]=k.useState();He(()=>(Gf()&&o("button"),document.addEventListener("keydown",Zg),()=>{document.removeEventListener("keydown",Zg)}),[]);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))}),Aw=k.createContext(null),Xg=mr("portal");function Ej(e){e===void 0&&(e={});const{id:t,root:n}=e,r=hi(),o=Iw(),[i,a]=k.useState(null),s=k.useRef(null);return He(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),He(()=>{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(Xg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),He(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!tt(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(Xg,""),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=Ej({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&&Hi(m)&&(m.type==="focusin"?wj:bj)(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(Aw.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(Is,{"data-type":"outside",ref:l,onFocus:f=>{if(Hi(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=Pw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:rp}),i&&Js.createPortal(t,i),p&&i&&k.createElement(Is,{"data-type":"outside",ref:c,onFocus:f=>{if(Hi(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=kw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Iw=()=>k.useContext(Aw),Cj=20;let Mr=[];function tu(e){Mr=Mr.filter(n=>n.isConnected);let t=e;if(!(!t||xr(t)==="body")){if(!TD(t,Go())){const n=oa(t,Go())[0];n&&(t=n)}Mr.push(t),Mr.length>Cj&&(Mr=Mr.slice(-20))}}function Qg(){return Mr.slice().reverse().find(e=>e.isConnected)}const Rj=k.forwardRef(function(t,n){return k.createElement("button",Yo({},t,{type:"button",ref:n,tabIndex:-1,style:rp}))});function mi(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=nw(b)&&w,C=vj()?i:!0,R=jt(o),I=jt(a),A=jt(s),O=wr(),j=Iw(),V=k.useRef(null),P=k.useRef(null),D=k.useRef(!1),_=k.useRef(!1),L=k.useRef(-1),N=j!=null,z=T==null?void 0:T.firstElementChild,M=(z==null?void 0:z.id)===y?z:T,B=Rt(function(Z){return Z===void 0&&(Z=M),Z?oa(Z,Go()):[]}),Q=Rt(Z=>{const G=B(Z);return R.current.map(K=>b&&K==="reference"?b:M&&K==="floating"?M:G).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function Z(K){if(K.key==="Tab"){vt(M,gn(It(M)))&&B().length===0&&!S&&Dt(K);const F=Q(),$=Pn(K);R.current[0]==="reference"&&$===b&&(Dt(K),K.shiftKey?ir(F[F.length-1]):ir(F[1])),R.current[1]==="floating"&&$===M&&K.shiftKey&&(Dt(K),ir(F[0]))}}const G=It(M);return G.addEventListener("keydown",Z),()=>{G.removeEventListener("keydown",Z)}},[r,b,M,c,R,S,B,Q]),k.useEffect(()=>{if(r||!T)return;function Z(G){const K=Pn(G),$=B().indexOf(K);$!==-1&&(L.current=$)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,B]),k.useEffect(()=>{if(r||!d)return;function Z(){_.current=!0,setTimeout(()=>{_.current=!1})}function G(K){const F=K.relatedTarget;queueMicrotask(()=>{const $=!(vt(b,F)||vt(T,F)||vt(F,T)||vt(j==null?void 0:j.portalNode,F)||F!=null&&F.hasAttribute(mr("focus-guard"))||O&&(Hr(O.nodesRef.current,m).find(Y=>{var ie,H;return vt((ie=Y.context)==null?void 0:ie.elements.floating,F)||vt((H=Y.context)==null?void 0:H.elements.domReference,F)})||mj(O.nodesRef.current,m).find(Y=>{var ie,H;return((ie=Y.context)==null?void 0:ie.elements.floating)===F||((H=Y.context)==null?void 0:H.elements.domReference)===F})));if(l&&$&&gn(It(M))===It(M).body){bt(M)&&(M==null||M.focus());const Y=L.current,ie=B(),H=ie[Y]||ie[ie.length-1]||M;bt(H)&&H.focus()}(S||!c)&&F&&$&&!_.current&&F!==Qg()&&(D.current=!0,g(!1,K))})}if(T&&bt(b))return b.addEventListener("focusout",G),b.addEventListener("pointerdown",Z),T.addEventListener("focusout",G),()=>{b.removeEventListener("focusout",G),b.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",G)}},[r,b,T,M,c,m,O,j,g,d,l,B,S]),k.useEffect(()=>{var Z;if(r)return;const G=Array.from((j==null||(Z=j.portalNode)==null?void 0:Z.querySelectorAll("["+mr("portal")+"]"))||[]);if(T){const K=[T,...G,V.current,P.current,R.current.includes("reference")||S?b:null].filter($=>$!=null),F=c||S?Kg(K,C,!C):Kg(K);return()=>{F()}}},[r,b,T,c,R,j,S,C]),He(()=>{if(r||!bt(M))return;const Z=It(M),G=gn(Z);queueMicrotask(()=>{const K=Q(M),F=I.current,$=(typeof F=="number"?K[F]:F.current)||M,Y=vt(M,G);!w&&!Y&&p&&ir($,{preventScroll:$===M})})},[r,p,M,w,Q,I]),He(()=>{if(r||!M)return;let Z=!1;const G=It(M),K=gn(G);let $=v.current.openEvent;const Y=f.domReference.current;tu(K);function ie(H){let{open:ye,reason:Ee,event:ke,nested:Ve}=H;ye&&($=ke),Ee==="escape-key"&&f.domReference.current&&tu(f.domReference.current),Ee==="hover"&&ke.type==="mouseleave"&&(D.current=!0),Ee==="outside-press"&&(Ve?(D.current=!1,Z=!0):D.current=!(ew(ke)||Yf(ke)))}return h.on("openchange",ie),()=>{h.off("openchange",ie);const H=gn(G),ye=vt(T,H)||O&&Hr(O.nodesRef.current,m).some(se=>{var xe;return vt((xe=se.context)==null?void 0:xe.elements.floating,H)});(ye||$&&["click","mousedown"].includes($.type))&&f.domReference.current&&tu(f.domReference.current);const ke=Y||K,Ve=oa(It(ke).body,Go());queueMicrotask(()=>{let se=Qg();!se&&bt(ke)&&T&&(se=Sj(Ve,ke,T)),A.current&&!D.current&&bt(se)&&(!(se!==H&&H!==G.body)||ye)&&se.focus({preventScroll:Z})})}},[r,T,M,A,v,f,h,O,m]),He(()=>{if(!r&&j)return j.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{j.setFocusManagerState(null)}},[r,j,c,p,g,f,d]),He(()=>{if(r||!M||typeof MutationObserver!="function"||w)return;const Z=()=>{const K=M.getAttribute("tabindex"),F=B(),$=gn(It(T)),Y=F.indexOf($);Y!==-1&&(L.current=Y),R.current.includes("floating")||$!==f.domReference.current&&F.length===0?K!=="0"&&M.setAttribute("tabindex","0"):K!=="-1"&&M.setAttribute("tabindex","-1")};Z();const G=new MutationObserver(Z);return G.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{G.disconnect()}},[r,T,M,f,R,B,w]);function ee(Z){return r||!u||!c?null:k.createElement(Rj,{ref:Z==="start"?V:P,onClick:G=>g(!1,G.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&C&&(c?!S:!0)&&(N||c);return k.createElement(k.Fragment,null,X&&k.createElement(Is,{"data-type":"inside",ref:j==null?void 0:j.beforeInsideRef,onFocus:Z=>{if(c){const K=Q();ir(o[0]==="reference"?K[0]:K[K.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(D.current=!1,Hi(Z,j.portalNode)){const K=kw()||b;K==null||K.focus()}else{var G;(G=j.beforeOutsideRef.current)==null||G.focus()}}}),!S&&ee("start"),n,ee("end"),X&&k.createElement(Is,{"data-type":"inside",ref:j==null?void 0:j.afterInsideRef,onFocus:Z=>{if(c)ir(Q()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(d&&(D.current=!0),Hi(Z,j.portalNode)){const K=Pw()||b;K==null||K.focus()}else{var G;(G=j.afterOutsideRef.current)==null||G.focus()}}}))}const nu=new Set,kj=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=hi();return He(()=>{if(!r)return;nu.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()=>{nu.delete(i),nu.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 Jg(e){return bt(e.target)&&e.target.tagName==="BUTTON"}function ev(e){return Kf(e)}function Ra(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||Jg(m))&&(m.key===" "&&!ev(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Jg(m)||ev(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 Pj(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 tv(e){return e!=null&&e.clientX!=null}function Aj(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=Rt((S,C)=>{d.current||r.current.openEvent&&!tv(r.current.openEvent)||a.setPositionReference(Pj(i,{x:S,y:C,axis:l,dataRef:r,pointerType:f}))}),y=Rt(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);vt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):v(R.clientX,R.clientY)}if(!r.current.openEvent||tv(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]),He(()=>{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 Ij={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},_j={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},nv=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=Rt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=k.useRef(!1),b=k.useRef(!1),{escapeKey:T,outsidePress:w}=nv(f),{escapeKey:S,outsidePress:C}=nv(m),R=Rt(P=>{var D;if(!n||!a||!s||P.key!=="Escape")return;const _=(D=i.current.floatingContext)==null?void 0:D.nodeId,L=g?Hr(g.nodesRef.current,_):[];if(!T&&(P.stopPropagation(),L.length>0)){let N=!0;if(L.forEach(z=>{var M;if((M=z.context)!=null&&M.open&&!z.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}r(!1,KM(P)?P.nativeEvent:P,"escape-key")}),I=Rt(P=>{var D;const _=()=>{var L;R(P),(L=Pn(P))==null||L.removeEventListener("keydown",_)};(D=Pn(P))==null||D.addEventListener("keydown",_)}),A=Rt(P=>{var D;const _=y.current;y.current=!1;const L=b.current;if(b.current=!1,c==="click"&&L||_||typeof v=="function"&&!v(P))return;const N=Pn(P),z="["+mr("inert")+"]",M=It(o.floating).querySelectorAll(z);let B=tt(N)?N:null;for(;B&&!fr(B);){const Z=Yn(B);if(fr(Z)||!tt(Z))break;B=Z}if(M.length&&tt(N)&&!ZM(N)&&!vt(N,o.floating)&&Array.from(M).every(Z=>!vt(B,Z)))return;if(bt(N)&&V){const Z=N.clientWidth>0&&N.scrollWidth>N.clientWidth,G=N.clientHeight>0&&N.scrollHeight>N.clientHeight;let K=G&&P.offsetX>N.clientWidth;if(G&&nn(N).direction==="rtl"&&(K=P.offsetX<=N.offsetWidth-N.clientWidth),K||Z&&P.offsetY>N.clientHeight)return}const Q=(D=i.current.floatingContext)==null?void 0:D.nodeId,ee=g&&Hr(g.nodesRef.current,Q).some(Z=>{var G;return Kc(P,(G=Z.context)==null?void 0:G.elements.floating)});if(Kc(P,o.floating)||Kc(P,o.domReference)||ee)return;const X=g?Hr(g.nodesRef.current,Q):[];if(X.length>0){let Z=!0;if(X.forEach(G=>{var K;if((K=G.context)!=null&&K.open&&!G.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,P,"outside-press")}),O=Rt(P=>{var D;const _=()=>{var L;A(P),(L=Pn(P))==null||L.removeEventListener(c,_)};(D=Pn(P))==null||D.addEventListener(c,_)});k.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function P(L){r(!1,L,"ancestor-scroll")}const D=It(o.floating);s&&D.addEventListener("keydown",S?I:R,S),v&&D.addEventListener(c,C?O:A,C);let _=[];return p&&(tt(o.domReference)&&(_=cr(o.domReference)),tt(o.floating)&&(_=_.concat(cr(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(_=_.concat(cr(o.reference.contextElement)))),_=_.filter(L=>{var N;return L!==((N=D.defaultView)==null?void 0:N.visualViewport)}),_.forEach(L=>{L.addEventListener("scroll",P,{passive:!0})}),()=>{s&&D.removeEventListener("keydown",S?I:R,S),v&&D.removeEventListener(c,C?O:A,C),_.forEach(L=>{L.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 j=k.useMemo(()=>({onKeyDown:R,[Ij[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},[_j[c]]:()=>{y.current=!0}}),[R,c]);return k.useMemo(()=>a?{reference:j,floating:V}:{},[a,j,V])}function Oj(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=hi(),i=k.useRef({}),[a]=k.useState(()=>ww()),s=br()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!tt(f)&&dj("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=Rt((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=Oj({...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();He(()=>{u&&(d.current=u)},[u]);const f=XD({...e,elements:{...o,...s&&{reference:s}}}),m=k.useCallback(b=>{const T=tt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(T),f.refs.setReference(T)},[f.refs]),g=k.useCallback(b=>{(tt(b)||b===null)&&(d.current=b,a(b)),(tt(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!tt(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 He(()=>{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 Mj(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&&tt(m))try{if(Gf()&&tw())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=tt(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||vt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||vt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return k.useMemo(()=>s?{reference:p}:{},[s,p])}const rv="active",ov="selected";function ru(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[rv]:a,[ov]: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&&[rv,ov].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=>ru(s,e,"reference"),t),i=k.useCallback(s=>ru(s,e,"floating"),n),a=k.useCallback(s=>ru(s,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let iv=!1;function Tl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function av(e,t){return Tl(t,e===np||e===Ca,e===Uo||e===pi)}function ou(e,t,n){return Tl(t,e===Ca,n?e===Uo:e===pi)||e==="Enter"||e===" "||e===""}function Dj(e,t,n){return Tl(t,n?e===Uo:e===pi,e===Ca)}function sv(e,t,n){return Tl(t,n?e===pi: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||ls("`useListNavigation` looping must be enabled to allow escaping."),m||ls("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&T>1&&ls("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=br(),A=wr(),O=Rt(s),j=k.useRef(g),V=k.useRef(c??-1),P=k.useRef(null),D=k.useRef(!0),_=k.useRef(O),L=k.useRef(!!o.floating),N=k.useRef(n),z=k.useRef(!1),M=k.useRef(!1),B=jt(y),Q=jt(n),ee=jt(w),X=jt(o.floating),Z=jt(c),[G,K]=k.useState(),[F,$]=k.useState(),Y=Rt(function(se,xe,le){le===void 0&&(le=!1);function be(ue){m?(K(ue.id),A==null||A.events.emit("virtualfocus",ue),S&&(S.current=ue)):ir(ue,{preventScroll:!0,sync:tw()&&Gf()?iv||z.current:!1})}const oe=se.current[xe.current];oe&&be(oe),requestAnimationFrame(()=>{const ue=se.current[xe.current]||oe;if(!ue)return;oe||be(ue);const J=ee.current;J&&H&&(le||!D.current)&&(ue.scrollIntoView==null||ue.scrollIntoView(typeof J=="boolean"?{block:"nearest",inline:"nearest"}:J))})});He(()=>{document.createElement("div").focus({get preventScroll(){return iv=!0,!1}})},[]),He(()=>{l&&(n&&o.floating?j.current&&c!=null&&(M.current=!0,V.current=c,O(c)):L.current&&(V.current=-1,_.current(null)))},[l,n,o.floating,c,O]),He(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,Z.current!=null)return;if(L.current&&(V.current=-1,Y(i,V)),(!N.current||!L.current)&&j.current&&(P.current!=null||j.current===!0&&P.current==null)){let se=0;const xe=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(xe),se++):(V.current=P.current==null||ou(P.current,b,f)||p?Qc(i,B.current):Wg(i,B.current),P.current=null,O(V.current))};xe()}}else Bi(i,a)||(V.current=a,Y(i,V,M.current),M.current=!1)},[l,n,o.floating,a,Z,p,i,b,f,O,Y,B]),He(()=>{var se;if(!l||o.floating||!A||m||!L.current)return;const xe=A.nodesRef.current,le=(se=xe.find(ue=>ue.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,be=gn(It(o.floating)),oe=xe.some(ue=>ue.context&&vt(ue.context.elements.floating,be));le&&!oe&&D.current&&le.focus({preventScroll:!0})},[l,o.floating,A,I,m]),He(()=>{if(!l||!A||!m||I)return;function se(xe){$(xe.id),S&&(S.current=xe)}return A.events.on("virtualfocus",se),()=>{A.events.off("virtualfocus",se)}},[l,A,m,I,S]),He(()=>{_.current=O,L.current=!!o.floating}),He(()=>{n||(P.current=null)},[n]),He(()=>{N.current=n},[n]);const ie=a!=null,H=k.useMemo(()=>{function se(le){if(!n)return;const be=i.current.indexOf(le);be!==-1&&O(be)}return{onFocus(le){let{currentTarget:be}=le;se(be)},onClick:le=>{let{currentTarget:be}=le;return be.focus({preventScroll:!0})},...h&&{onMouseMove(le){let{currentTarget:be}=le;se(be)},onPointerLeave(le){let{pointerType:be}=le;!D.current||be==="touch"||(V.current=-1,Y(i,V),O(null),m||ir(X.current,{preventScroll:!0}))}}}},[n,X,Y,h,i,O,m]),ye=Rt(se=>{if(D.current=!1,z.current=!0,!Q.current&&se.currentTarget===X.current)return;if(p&&sv(se.key,b,f)){Dt(se),r(!1,se.nativeEvent,"list-navigation"),bt(o.domReference)&&!m&&o.domReference.focus();return}const xe=V.current,le=Qc(i,y),be=Wg(i,y);if(se.key==="Home"&&(Dt(se),V.current=le,O(V.current)),se.key==="End"&&(Dt(se),V.current=be,O(V.current)),T>1){const oe=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ue=nj(oe,T,R),J=ue.findIndex(te=>te!=null&&!ss(i.current,te,y)),q=ue.reduce((te,he,_e)=>he!=null&&!ss(i.current,he,y)?_e:te,-1);if(V.current=ue[tj({current:ue.map(te=>te!=null?i.current[te]:null)},{event:se,orientation:b,loop:d,cols:T,disabledIndices:oj([...y||i.current.map((te,he)=>ss(i.current,he)?he:void 0),void 0],ue),minIndex:J,maxIndex:q,prevIndex:rj(V.current>be?le:V.current,oe,ue,T,se.key===Ca?"bl":se.key===pi?"tr":"tl"),stopEvent:!0})],O(V.current),b==="both")return}if(av(se.key,b)){if(Dt(se),n&&!m&&gn(se.currentTarget.ownerDocument)===se.currentTarget){V.current=ou(se.key,b,f)?le:be,O(V.current);return}ou(se.key,b,f)?d?V.current=xe>=be?u&&xe!==i.current.length?-1:le:Ft(i,{startingIndex:xe,disabledIndices:y}):V.current=Math.min(be,Ft(i,{startingIndex:xe,disabledIndices:y})):d?V.current=xe<=le?u&&xe!==-1?i.current.length:be:Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:y}):V.current=Math.max(le,Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:y})),Bi(i,V.current)?O(null):O(V.current)}}),Ee=k.useMemo(()=>m&&n&&ie&&{"aria-activedescendant":F||G},[m,n,ie,F,G]),ke=k.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!nw(o.domReference)&&Ee,onKeyDown:ye,onPointerMove(){D.current=!0}}),[Ee,ye,o.domReference,b]),Ve=k.useMemo(()=>{function se(le){g==="auto"&&ew(le.nativeEvent)&&(j.current=!0)}function xe(le){j.current=g,g==="auto"&&Yf(le.nativeEvent)&&(j.current=!0)}return{...Ee,onKeyDown(le){D.current=!1;const be=le.key.indexOf("Arrow")===0,oe=Dj(le.key,b,f),ue=sv(le.key,b,f),J=av(le.key,b),q=(p?oe:J)||le.key==="Enter"||le.key.trim()==="";if(m&&n){const Be=A==null?void 0:A.nodesRef.current.find(Ot=>Ot.parentId==null),Ye=A&&Be?gj(A.nodesRef.current,Be.id):null;if(be&&Ye&&S){const Ot=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(oe||ue){var te,he;const fn=((te=Ye.context)==null?void 0:te.elements.domReference)===le.currentTarget,Tn=ue&&!fn?(he=Ye.context)==null?void 0:he.elements.domReference:oe?i.current.find(Xn=>(Xn==null?void 0:Xn.id)===G):null;Tn&&(Dt(le),Tn.dispatchEvent(Ot),$(void 0))}if(J&&Ye.context&&Ye.context.open&&Ye.parentId&&le.currentTarget!==Ye.context.elements.domReference){var _e;Dt(le),(_e=Ye.context.elements.domReference)==null||_e.dispatchEvent(Ot);return}}return ye(le)}if(!(!n&&!v&&be)){if(q&&(P.current=p&&J?null:le.key),p){oe&&(Dt(le),n?(V.current=Qc(i,B.current),O(V.current)):r(!0,le.nativeEvent,"list-navigation"));return}J&&(c!=null&&(V.current=c),Dt(le),!n&&v?r(!0,le.nativeEvent,"list-navigation"):ye(le),n&&O(V.current))}},onFocus(){n&&!m&&O(null)},onPointerDown:xe,onMouseDown:se,onClick:se}},[G,Ee,ye,B,g,i,p,O,r,n,v,b,f,c,A,m,S]);return k.useMemo(()=>l?{reference:Ve,floating:ke,item:H}:{},[l,Ve,ke,H])}const jj=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=jj.get(a))!=null?n:a,l=hi(),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 lv=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 Nj(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 Fj(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=Nj(n,a);return!c&&s==="close"&&l("unmounted"),He(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function _w(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}=Fj(e,{duration:a}),v=jt(n),y=jt(r),b=jt(o),T=jt(i);return He(()=>{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(lv).join(","),transitionDuration:d+"ms",...C,...R}),h==="close"){const I=S||w;m({transitionProperty:Object.keys(I).map(lv).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,v,y,T,d,h,c]),{isMounted:g,styles:f}}function Lj(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=Rt(s),b=Rt(l),T=jt(u),w=jt(p);He(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),He(()=>{if(r&&g.current===""){var A;h.current=(A=f??a)!=null?A:-1}},[r,f,a]);const S=Rt(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=Rt(A=>{function O(_,L,N){const z=T.current?T.current(L,N):L.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(N.toLocaleLowerCase()))===0);return z?_.indexOf(z):-1}const j=i.current;if(g.current.length>0&&g.current[0]!==" "&&(O(j,j,g.current)===-1?S(!1):A.key===" "&&Dt(A)),j==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Dt(A),S(!0)),j.every(_=>{var L,N;return _?((L=_[0])==null?void 0:L.toLocaleLowerCase())!==((N=_[1])==null?void 0:N.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,D=O(j,[...j.slice((P||0)+1),...j.slice(0,(P||0)+1)],g.current);D!==-1?(y(D),v.current=D):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 cv(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 Vj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Ow(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=vt(g.floating,I),j=vt(g.domReference,I),V=g.domReference.getBoundingClientRect(),P=g.floating.getBoundingClientRect(),D=m.split("-")[0],_=p>P.right-P.width/2,L=f>P.bottom-P.height/2,N=Vj(R,V),z=P.width>V.width,M=P.height>V.height,B=(z?V:P).left,Q=(z?V:P).right,ee=(M?V:P).top,X=(M?V:P).bottom;if(O&&(i=!0,!A))return;if(j&&(i=!1),j&&!A){i=!0;return}if(A&&tt(T.relatedTarget)&&vt(g.floating,T.relatedTarget)||y&&Hr(y.nodesRef.current,v).some(K=>{let{context:F}=K;return F==null?void 0:F.open}))return;if(D==="top"&&f>=V.bottom-1||D==="bottom"&&f<=V.top+1||D==="left"&&p>=V.right-1||D==="right"&&p<=V.left+1)return w();let Z=[];switch(D){case"top":Z=[[B,V.top+1],[B,P.bottom-1],[Q,P.bottom-1],[Q,V.top+1]];break;case"bottom":Z=[[B,P.top+1],[B,V.bottom-1],[Q,V.bottom-1],[Q,P.top+1]];break;case"left":Z=[[P.right-1,X],[P.right-1,ee],[V.left+1,ee],[V.left+1,X]];break;case"right":Z=[[V.right-1,X],[V.right-1,ee],[P.left+1,ee],[P.left+1,X]];break}function G(K){let[F,$]=K;switch(D){case"top":{const Y=[z?F+t/2:_?F+t*4:F-t*4,$+t+1],ie=[z?F-t/2:_?F+t*4:F-t*4,$+t+1],H=[[P.left,_||z?P.bottom-t:P.top],[P.right,_?z?P.bottom-t:P.top:P.bottom-t]];return[Y,ie,...H]}case"bottom":{const Y=[z?F+t/2:_?F+t*4:F-t*4,$-t],ie=[z?F-t/2:_?F+t*4:F-t*4,$-t],H=[[P.left,_||z?P.top+t:P.bottom],[P.right,_?z?P.top+t:P.bottom:P.top+t]];return[Y,ie,...H]}case"left":{const Y=[F+t+1,M?$+t/2:L?$+t*4:$-t*4],ie=[F+t+1,M?$-t/2:L?$+t*4:$-t*4];return[...[[L||M?P.right-t:P.left,P.top],[L?M?P.right-t:P.left:P.right-t,P.bottom]],Y,ie]}case"right":{const Y=[F-t,M?$+t/2:L?$+t*4:$-t*4],ie=[F-t,M?$-t/2:L?$+t*4:$-t*4],H=[[L||M?P.left+t:P.right,P.top],[L?M?P.left+t:P.right:P.left+t,P.bottom]];return[Y,ie,...H]}}}if(!cv([S,C],Z)){if(i&&!N)return w();if(!A&&r){const K=c(T.clientX,T.clientY);if(K!==null&&K<.1)return w()}cv([S,C],G([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const gi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Ea(10),tp({fallbackAxisSideDirection:"end"}),ep(),gw({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=oo({open:n,middleware:i,transform:!0,whileElementsMounted:Ta,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=Ra(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(mi,{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(bw,{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]})})})]})},zj=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=Ra(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:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:x.jsx(ft.span,{layoutId:o,children:e.trigger})}),x.jsx(vr,{children:i?x.jsx(no,{root:t,children:x.jsx(mi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:x.jsx(ft.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Mw=300,$j=500,Dw=(e="")=>Ne("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:()=>{}}),uv=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=fj(),w=xw(),S=y!==null,{floatingStyles:C,refs:R,context:I}=oo({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:Ta,placement:S?"right":"bottom-start",middleware:[Ea({mainAxis:S?0:4,alignmentAxis:S?-4:0}),tp(),ep()]}),A=ao(I,{role:"menu"}),O=ro(I,{bubbles:!0}),j=Ew(I,{move:!1,enabled:n,delay:{open:Mw},handleClose:Ow({blockPointerEvents:!0})}),V=Ra(I,{event:"mousedown",toggle:!S,ignoreMouse:S,keyboardHandlers:!0}),P=op(I,{loop:!0,listRef:g,activeIndex:f,nested:S,onNavigate:m}),D=Lj(I,{activeIndex:f,listRef:h,resetMs:$j,onMatch:c?m:void 0}),{getReferenceProps:_,getFloatingProps:L,getItemProps:N}=io([j,V,A,O,P,D]);E.useEffect(()=>{if(!b)return;function M(){u(!1)}function B(Q){Q.nodeId!==T&&Q.parentId===y&&u(!1)}return b.events.on("click",M),b.events.on("menuopen",B),()=>{b.events.off("click",M),b.events.off("menuopen",B)}},[b,T,y]),E.useEffect(()=>{c&&b&&b.events.emit("menuopen",{parentId:y,nodeId:T})},[b,c,T,y]);const z=o?s.className:Ne(Dw(s.className));return x.jsxs(pj,{id:T,children:[x.jsx(E.Fragment,{children:s.asChild?x.jsx(Ho,{..._(v.getItemProps({...s,onFocus(M){var B;(B=s.onFocus)==null||B.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,..._(v.getItemProps({...s,onFocus(M){var B;(B=s.onFocus)==null||B.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:N,setHasFocusInside:p,isOpen:c},children:x.jsx(sj,{elementsRef:g,labelsRef:h,children:c&&x.jsx(no,{preserveTabOrder:!0,children:x.jsx(mi,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:x.jsx(t,{...L(),ref:R.setFloating,style:{...s.style,...C},className:Ne("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})})})})})]})}),Bj=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(gd),s=xw({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:Dw(`${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]})}),Hj=E.forwardRef((e,t)=>br()!==null?x.jsx(uv,{...e,isParent:!1,ref:t}):x.jsx(hj,{children:x.jsx(uv,{...e,isParent:!0,ref:t})})),Wj=(e,t)=>qr()?t:window.matchMedia(e).matches,qj=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(Wj(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},dv=()=>window.matchMedia("@media (pointer: coarse)"),Uj=()=>{var r;const e=E.useRef(qr()?null:dv()),[t,n]=E.useState(qr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?dv():e.current).addEventListener("change",i=>n(i.matches))},[]),t},ip=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=Uj(),o=E.useRef(qr()?"":document.documentElement.style.overflowY);return E.useEffect(()=>{const i=document.documentElement;if(t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,i.style.overflowY="hidden",r||S0())return;i.style.padding=Xy(i)?"0 15px 0 0":""}else i.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),E.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(XS(c.style.height)):null,p=et.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},vn="600ms",Yj={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},Gj={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},iu={drawer:e=>e==="left"?Yj:Gj,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}}},Kj=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"}}),Zj={top:0,left:0,right:0,bottom:-1},Xj=e=>e*.62,Qj=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=Xj(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return x.jsx(ft.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:Zj,whileDrag:{cursor:"grabbing"},className:Ne("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})},Ga={drawer:"right",sheet:"none",dialog:"none"},Jj=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ga.drawer:Ga[o]:t?Ga[o]:Ga.sheet},eN=({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})=>{const y=ip(e,"overflow-hidden"),b=E.useId(),T=E.useId(),w=qj("(min-width: 64rem)"),S=f!=="dialog",C=Jj(w,d,f,m),R=w||d?iu[f]:iu.sheet,I=typeof R=="function"?R(C):R,A=w||d?f:"sheet",{refs:O,context:j}=oo({open:e,onOpenChange:s}),V=Ra(j),P=ao(j,{role:"dialog"}),D=ro(j,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:_,getFloatingProps:L}=io([V,P,D]),N=o,z=Lo(void 0),M=()=>s(!1);return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(Ho,{ref:O.setReference,..._({layoutId:a}),children:N}):x.jsx(ft.button,{ref:O.setReference,..._(),layoutId:a,type:"button",children:N})}):null,x.jsx(no,{children:x.jsx(vr,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(kj,{lockScroll:!1,className:Ne(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${A==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:x.jsx(mi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:j,children:x.jsxs(ft.div,{...v,exit:"exit",animate:"enter","aria-modal":e,initial:"initial",layoutId:a,variants:I,"data-component":"modal",ref:ii(O.setFloating,y),className:Ne(Kj({position:C,type:A}),l),style:A==="drawer"?{width:z}:{height:z},...t?{"aria-labelledby":b,"aria-describedby":T}:{"aria-label":h},...L(),children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:b,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:M,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(dl,{})})}):null,S&&c?x.jsx(Qj,{onChange:s,parent:O.floating,position:C,sheet:A==="sheet",value:z}):null]})})}):null})})]})},tN=e=>x.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),ap=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:Ta,onOpenChange:i?void 0:y,middleware:[ep(),Ea(5),tp({fallbackAxisSideDirection:"start"}),gw({padding:5,element:h})]}),S=Ew(w,{move:!0,delay:{open:Mw},enabled:l?s:!1,handleClose:c?Ow():null}),C=Mj(w,{enabled:l?a:!1}),R=Ra(w,{enabled:l?c:!1}),I=ro(w,{enabled:l}),A=ao(w,{role:"tooltip",enabled:l}),O=Aj(w,{enabled:!!l&&!!u}),{getReferenceProps:j,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,{...j(p),ref:ii(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(bw,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})});class _s{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++)_s.getDescendantProperty(s[l],i,r);else i&&_s.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=_s.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 El=0,Sr=1,vi=2,jw=4;function fv(e){return()=>e}function nN(e){e()}function aa(e,t){return n=>e(t(n))}function pv(e,t){return()=>e(t)}function Nw(e,t){return n=>e(t,n)}function sp(e){return e!==void 0}function rN(...e){return()=>{e.map(nN)}}function yi(){}function Cl(e,t){return t(e),e}function oN(e,t){return t(e)}function ut(...e){return e}function Xe(e,t){return e(Sr,t)}function Me(e,t){e(El,t)}function lp(e){e(vi)}function Lt(e){return e(jw)}function we(e,t){return Xe(e,Nw(t,El))}function Nn(e,t){const n=e(Sr,r=>{n(),t(r)});return n}function hv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Fw(e,t){return e===t}function lt(e=Fw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>aa(t,e)}function Cn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=iN(...t);return(r,o)=>{switch(r){case vi:lp(e);return;case Sr:return Xe(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 je(...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);Xe(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 iN(...e){return t=>e.reduceRight(oN,t)}function aN(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=Xe(e,i),t):(r(),yi);case vi:r(),n=null;return}}}function ae(e){let t=e;const n=$e();return(r,o)=>{switch(r){case El:t=o;break;case Sr:{o(t);break}case jw:return t}return n(r,o)}}function Vt(e,t){return Cl(ae(t),n=>we(e,n))}function $e(){const e=[];return(t,n)=>{switch(t){case El:e.slice().forEach(r=>{r(n)});return;case vi: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 Cl($e(),t=>we(e,t))}function Ue(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:sN(),singleton:n}}const sN=()=>Symbol();function lN(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 kt(...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);Xe(i,l=>{n[a]=l,r=r|s,r===o&&Me(t,n)})}),function(i,a){switch(i){case vi:{lp(t);return}case Sr:return r===o&&a(n),Xe(t,a)}}}function Pe(e,t=Fw){return ne(e,lt(t))}function mv(...e){return function(t,n){switch(t){case vi:return;case Sr:return rN(...e.map(r=>Xe(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 cN={0:"debug",3:"error",1:"log",2:"warn"},uN=()=>typeof globalThis>"u"?window:globalThis,Tr=Ue(()=>{const e=ae(3);return{log:ae((t,n,r=1)=>{var o;const i=(o=uN().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[cN[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 cp(e,t,n).callbackRef}function cp(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 Lw(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=dN(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?gv("column-gap",getComputedStyle(u).columnGap,o):gv("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return cp(c,n,l)}function dN(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 gv(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 up(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}=cp(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=Ue(()=>{const e=$e(),t=$e(),n=ae(0),r=$e(),o=ae(0),i=$e(),a=$e(),s=ae(0),l=ae(0),c=ae(0),u=ae(0),d=$e(),p=$e(),f=ae(!1),m=ae(!1),g=ae(!1);return we(ne(e,pe(({scrollTop:h})=>h)),t),we(ne(e,pe(({scrollHeight:h})=>h)),a),we(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}),sa={lvl:0};function Vw(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ot(e){return e===sa}function la(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?la(e.l,t):la(e.r,t)}function wn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=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 ot(e)?Bw(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?vv(Ct(e,{l:Jt(e.l,t,n)})):vv(Ct(e,{r:Jt(e.r,t,n)}))}function Po(){return sa}function Rl(e,t,n){if(ot(e))return[];const r=wn(e,t)[0];return fN(yd(e,r,n))}function vd(e,t){if(ot(e))return sa;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=$w(r);return cs(Ct(e,{k:i,l:zw(r),v:a}))}}else return t<n?cs(Ct(e,{l:vd(r,t)})):cs(Ct(e,{r:vd(o,t)}))}function zr(e){return ot(e)?[]:[...zr(e.l),{k:e.k,v:e.v},...zr(e.r)]}function yd(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(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 cs(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(au(t))return Hw(Ct(e,{lvl:n-1}));if(!ot(t)&&!ot(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(au(e))return xd(Ct(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=au(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 Bw(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 zw(e){return ot(e.r)?e.l:cs(Ct(e,{r:zw(e.r)}))}function au(e){return ot(e)||e.lvl>e.r.lvl}function $w(e){return ot(e.r)?[e.k,e.v]:$w(e.r)}function Bw(e,t,n,r=sa,o=sa){return{k:e,l:r,lvl:n,r:o,v:t}}function vv(e){return xd(Hw(e))}function Hw(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function xd(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function fN(e){return Vw(e,({k:t,v:n})=>({index:t,value:n}))}function Ww(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ca(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const dp=Ue(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function qw(e,t,n){return e[Os(e,t,n)]}function Os(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 pN(e,t,n,r){const o=Os(e,t,r),i=Os(e,n,r,o);return e.slice(o,i+1)}function Sn(e,t){return Math.round(e.getBoundingClientRect()[t])}function kl(e){return!ot(e.groupOffsetTree)}function fp({index:e},t){return t===e?0:t<e?-1:1}function hN(){return{groupIndices:[],groupOffsetTree:Po(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Po()}}function mN(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=Jt(e,0,i);continue}const s=Rl(e,a-1,o+1);if(s.some(SN(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 gN(e){return typeof e.groupIndex<"u"}function vN({offset:e},t){return t===e?0:t<e?-1:1}function ua(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=qw(t,e,fp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Uw(e,t){if(!kl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Yw(e,t,n){if(gN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Uw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function yN(e,t,n,r=0){return r>0&&(t=Math.max(t,qw(e,r,fp).offset)),Vw(pN(e,t,n,vN),wN)}function xN(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&&ot(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]=mN(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,ua(f,d,o)),Po()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function bN(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 yv(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=Os(o,t-1,fp),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 Rl(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 wN(e){return{index:e.index,value:e}}function SN(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 TN={offsetHeight:"height",offsetWidth:"width"},zn=Ue(([{log:e},{recalcInProgress:t}])=>{const n=$e(),r=$e(),o=Vt(r,0),i=$e(),a=$e(),s=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((w,S)=>Sn(w,TN[S])),p=ae(void 0),f=ae(0),m=hN(),g=Vt(ne(n,je(l,e,f),In(xN,m),lt()),m),h=Vt(ne(l,lt(),In((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);we(ne(l,Ce(w=>w.length>0),je(g,f),pe(([w,S,C])=>{const R=w.reduce((I,A,O)=>Jt(I,A,ua(A,S.offsetTree,C)||O),Po());return{...S,groupIndices:w,groupOffsetTree:R}})),g),we(ne(r,je(g),Ce(([w,{lastIndex:S}])=>w<S),pe(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),we(c,u);const v=Vt(ne(c,pe(w=>w===void 0)),!0);we(ne(u,Ce(w=>w!==void 0&&ot(Lt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=en(ne(n,je(g),In(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),pe(w=>w.changed)));Xe(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)Me(t,!0),Me(i,w+yv(w,S));else if(w<0){const C=Lt(h);C.length>0&&(w-=yv(-w,C)),Me(a,w)}}),Xe(ne(s,je(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);we(ne(i,je(g),pe(([w,S])=>{const C=S.groupIndices.length>0,R=[],I=S.lastSize;if(C){const A=la(S.sizeTree,0);let O=0,j=0;for(;O<w;){const P=S.groupIndices[j],D=S.groupIndices.length===j+1?1/0:S.groupIndices[j+1]-P-1;R.push({endIndex:P,size:A,startIndex:P}),R.push({endIndex:P+1+D-1,size:I,startIndex:P+1}),j++,O+=D+1}const V=zr(S.sizeTree);return O!==w&&V.shift(),V.reduce((P,{k:D,v:_})=>{let L=P.ranges;return P.prevSize!==0&&(L=[...P.ranges,{endIndex:D+w-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:D+w,prevSize:_,ranges:L}},{prevIndex:w,prevSize:0,ranges:R}).ranges}return zr(S.sizeTree).reduce((A,{k:O,v:j})=>({prevIndex:O+w,prevSize:j,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,je(g,f),pe(([w,{offsetTree:S},C])=>{const R=-w;return ua(R,S,C)})));return we(ne(a,je(g,f),pe(([w,S,C])=>{if(S.groupIndices.length>0){if(ot(S.sizeTree))return S;let R=Po();const I=Lt(h);let A=0,O=0,j=0;for(;A<-w;){j=I[O];const V=I[O+1]-j-1;O++,A+=V+1}if(R=zr(S.sizeTree).reduce((V,{k:P,v:D})=>Jt(V,Math.max(0,P+w),D),R),A!==-w){const V=la(S.sizeTree,j);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=zr(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}},ut(Tr,dp),{singleton:!0});function EN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Gw=Ue(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=$e(),a=$e(),s=en(ne(i,pe(EN)));return we(ne(s,pe(l=>l.totalCount)),n),we(ne(s,pe(l=>l.groupIndices)),e),we(ne(kt(o,t,r),Ce(([l,c])=>kl(c)),pe(([l,c,u])=>wn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),lt(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ut(zn,Wt)),Er=Ue(([{log:e}])=>{const t=ae(!1),n=en(ne(t,Ce(r=>r),lt()));return Xe(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},ut(Tr),{singleton:!0}),CN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Kw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!CN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ka=Ue(([{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=ae(0);let h=null,v=null,y=null;function b(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Me(l,!1)}return we(ne(f,je(n,d,r,g,s,a,p),je(e,i,o),pe(([[T,w,S,C,R,I,A,O],j,V,P])=>{const D=Kw(T),{align:_,behavior:L,offset:N}=D,z=C-1,M=Yw(D,w,z);let B=ua(M,w.offsetTree,j)+I;_==="end"?(B+=V+wn(w.sizeTree,M)[1]-S+P,M===z&&(B+=A)):_==="center"?B+=(V+wn(w.sizeTree,M)[1]-S+P)/2:B-=R,N&&(B+=N);const Q=ee=>{b(),ee?(O("retrying to scroll to",{location:T},tn.DEBUG),Me(f,T)):(Me(m,!0),O("list did not change, scroll successful",{},tn.DEBUG))};if(b(),L==="smooth"){let ee=!1;y=Xe(t,X=>{ee=ee||X}),h=Nn(u,()=>{Q(ee)})}else h=Nn(ne(t,RN(150)),Q);return v=setTimeout(()=>{b()},1200),Me(l,!0),O("scrolling from index to",{behavior:L,index:M,top:B},tn.DEBUG),{behavior:L,top:B}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},ut(zn,Wt,Tr),{singleton:!0});function RN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function pp(e,t){e==0?t():requestAnimationFrame(()=>{pp(e-1,t)})}function hp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Pa=Ue(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=ae(!0),l=ae(0),c=ae(!0);return we(ne(a,je(l),Ce(([u,d])=>!!d),Cn(!1)),s),we(ne(a,je(l),Ce(([u,d])=>!!d),Cn(!1)),c),Xe(ne(kt(t,a),je(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,m])=>u&&(!ot(p)||sp(f))&&!d&&!m),je(l)),([,u])=>{Nn(o,()=>{Me(c,!0)}),pp(4,()=>{Nn(r,()=>{Me(s,!0)}),Me(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ut(zn,Wt,ka,Er),{singleton:!0});function Zw(e,t){return Math.abs(e-t)<1.01}const da="up",Wi="down",kN="none",PN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},AN=0,Aa=Ue(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=ae(!1),s=ae(!0),l=$e(),c=$e(),u=ae(4),d=ae(AN),p=Vt(ne(mv(ne(Pe(o),Ko(1),Cn(!0)),ne(Pe(o),Ko(1),Cn(!1),hv(100))),lt()),!1),f=Vt(ne(mv(ne(n,Cn(!0)),ne(n,Cn(!1),hv(200))),lt()),!1);we(ne(kt(Pe(o),Pe(d)),pe(([y,b])=>y<=b),lt()),s),we(ne(s,lr(50)),c);const m=en(ne(kt(r,Pe(i),Pe(t),Pe(e),Pe(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 j,V;return T>y.state.scrollTop?(j="SCROLLED_DOWN",V=y.state.scrollTop-T):(j="SIZE_DECREASED",V=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:j,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}},PN),lt((y,b)=>y&&y.atBottom===b.atBottom))),g=Vt(ne(r,In((y,{scrollHeight:b,scrollTop:T,viewportHeight:w})=>{if(Zw(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}),Ce(y=>y.changed),pe(y=>y.jump)),0);we(ne(m,pe(y=>y.atBottom)),a),we(ne(a,lr(50)),l);const h=ae(Wi);we(ne(r,pe(({scrollTop:y})=>y),lt(),In((y,b)=>Lt(f)?{direction:y.direction,prevScrollTop:b}:{direction:b<y.prevScrollTop?da:Wi,prevScrollTop:b},{direction:Wi,prevScrollTop:0}),pe(y=>y.direction)),h),we(ne(r,lr(50),Cn(kN)),h);const v=ae(0);return we(ne(p,Ce(y=>!y),Cn(0)),v),we(ne(o,lr(100),je(p),Ce(([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}},ut(Wt)),Ms="top",Ds="bottom",xv="none";function bv(e,t,n){return typeof e=="number"?n===da&&t===Ms||n===Wi&&t===Ds?e:0:n===da?t===Ms?e.main:e.reverse:t===Ds?e.main:e.reverse}function wv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const mp=Ue(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=$e(),a=ae(0),s=ae(0),l=ae(0),c=Vt(ne(kt(Pe(r),Pe(o),Pe(n),Pe(i,ca),Pe(l),Pe(a),Pe(t),Pe(e),Pe(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=xv;const R=wv(b,Ms),I=wv(b,Ds);return f-=y,f+=p+v,m+=p+v,m-=y,f>u+w-R&&(C=da),m<u-S+d+I&&(C=Wi),C!==xv?[Math.max(T-p-bv(g,Ms,C)-R,0),T-S-v+d+bv(g,Ds,C)+I]:null}),Ce(u=>u!=null),lt(ca)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ut(Wt),{singleton:!0});function IN(e,t,n){if(kl(t)){const r=Uw(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 su={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function us(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:Sv(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:Sv(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function Xw(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=hp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return us(c,[],s,o,n,r)}function Sv(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=Rl(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=Ue(([{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=ae([]),h=ae(0),v=$e();we(i.topItemsIndexes,g);const y=Vt(ne(kt(f,m,Pe(l,ca),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ce(([S,C,,R,,,,,,,I])=>{const A=I&&I.length!==R;return S&&!C&&!A}),pe(([,,[S,C],R,I,A,O,j,V,P,D])=>{const _=I,{offsetTree:L,sizeTree:N}=_,z=Lt(h);if(R===0)return{...su,totalCount:R};if(S===0&&C===0)return z===0?{...su,totalCount:R}:Xw(z,A,I,V,P,D||[]);if(ot(N))return z>0?null:us(IN(hp(A,R),_,D),[],R,P,_,V);const M=[];if(j.length>0){const Z=j[0],G=j[j.length-1];let K=0;for(const F of Rl(N,Z,G)){const $=F.value,Y=Math.max(F.start,Z),ie=Math.min(F.end,G);for(let H=Y;H<=ie;H++)M.push({data:D==null?void 0:D[H],index:H,offset:K,size:$}),K+=$}}if(!O)return us([],M,R,P,_,V);const B=j.length>0?j[j.length-1]+1:0,Q=yN(L,S,C,B);if(Q.length===0)return null;const ee=R-1,X=Cl([],Z=>{for(const G of Q){const K=G.value;let F=K.offset,$=G.start;const Y=K.size;if(K.offset<S){$+=Math.floor((S-K.offset+P)/(Y+P));const H=$-G.start;F+=H*Y+H*P}$<B&&(F+=(B-$)*Y,$=B);const ie=Math.min(G.end,ee);for(let H=$;H<=ie&&!(F>=C);H++)Z.push({data:D==null?void 0:D[H],index:H,offset:F,size:Y}),F+=Y+P}});return us(X,M,R,P,_,V)}),Ce(S=>S!==null),lt()),su);we(ne(e,Ce(sp),pe(S=>S==null?void 0:S.length)),o),we(ne(y,pe(S=>S.topListHeight)),d),we(d,s),we(ne(y,pe(S=>[S.top,S.bottom])),a),we(ne(y,pe(S=>S.items)),v);const b=en(ne(y,Ce(({items:S})=>S.length>0),je(o,e),Ce(([{items:S},C])=>S[S.length-1].originalIndex===C-1),pe(([,S,C])=>[S-1,C]),lt(ca),pe(([S])=>S))),T=en(ne(y,lr(200),Ce(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),pe(({items:S})=>S[0].index),lt())),w=en(ne(y,Ce(({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}}),lt(Ww)));return{endReached:b,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},ut(zn,Gw,mp,Pa,ka,Aa,Er,dp),{singleton:!0}),Qw=Ue(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=$e(),a=Vt(ne(kt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return we(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},ut(Wt,so),{singleton:!0}),_N=Ue(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),r=Vt(ne(kt(n,e,t),Ce(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),lr(0),lt()),0);return{alignToBottom:n,paddingTopAddition:r}},ut(Wt,Qw),{singleton:!0});function Tv(e){return e?e==="smooth"?"smooth":"auto":!1}const ON=(e,t)=>typeof e=="function"?Tv(e(t)):t&&Tv(e),MN=Ue(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=ae(!1),d=$e();let p=null;function f(g){Me(o,{align:"end",behavior:g,index:"LAST"})}Xe(ne(kt(ne(Pe(t),Ko(1)),a),je(Pe(u),r,i,c),pe(([[g,h],v,y,b,T])=>{let w=h&&b,S="auto";return w&&(S=ON(v,y||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),Ce(({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 Xe(ne(kt(Pe(u),t,s),Ce(([g,,h])=>g&&h),In(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),je(u,t)),([,g])=>{Lt(i)&&m(g!==!1)}),Xe(d,()=>{m(Lt(u)!==!1)}),Xe(kt(Pe(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ut(zn,Aa,ka,Pa,Er,Tr,Wt)),DN=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(we(ne(s,je(i),Ce(([,l])=>l!==0),je(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>Xw(l,c,u,d,p,f))),a),{}),ut(zn,Pa,so,Er),{singleton:!0}),jN=Ue(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ae(0);return Xe(ne(e,je(r),Ce(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Nn(ne(n,Ko(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Me(t,o)})})}),{initialScrollTop:r}},ut(Er,Wt,so),{singleton:!0}),NN=({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,FN=Ue(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=$e();return we(ne(u,je(t,l,n,i,o,r,s),je(e),pe(([[d,p,f,m,g,h,v,y],b])=>{const{align:T,behavior:w,calculateViewLocation:S=NN,done:C,...R}=d,I=Yw(d,p,m-1),A=ua(I,p.offsetTree,b)+g+h,O=A+wn(p.sizeTree,I)[1],j=y+h,V=y+f-v,P=S({itemBottom:O,itemTop:A,locationParams:{align:T,behavior:w,...R},viewportBottom:V,viewportTop:j});return P?C&&Nn(ne(a,Ce(D=>!D),Ko(Lt(a)?1:2)),C):C&&C(),P}),Ce(d=>d!==null)),c),{scrollIntoView:u}},ut(zn,Wt,ka,so,Tr),{singleton:!0}),Jw=Ue(([{scrollVelocity:e}])=>{const t=ae(!1),n=$e(),r=ae(!1);return we(ne(e,je(r,t,n),Ce(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),lt()),t),Xe(ne(kt(t,e,n),je(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ut(Aa),{singleton:!0}),gp=Ue(([{scrollContainerState:e,scrollTo:t}])=>{const n=$e(),r=$e(),o=$e(),i=ae(!1),a=ae(void 0);return we(ne(kt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),we(ne(t,je(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ut(Wt)),LN=Ue(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=$e(),u=ae(void 0),d=ae(null),p=ae(null);return we(s,d),we(l,p),Xe(ne(c,je(t,r,a,d,p,n)),([f,m,g,h,v,y,b])=>{const T=bN(m.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=b,f({ranges:T,scrollTop:g})}),we(ne(u,Ce(sp),pe(VN)),o),we(ne(i,je(u),Ce(([,f])=>f!==void 0),lt(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},ut(zn,Wt,Pa,Er,gp));function VN(e){return{align:"start",index:0,offset:e.scrollTop}}const zN=Ue(([{topItemsIndexes:e}])=>{const t=ae(0);return we(ne(t,Ce(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ut(so));function e1(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const $N=e1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),BN=Ue(([{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,je(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]),Ce(([v])=>v!==0),je(r,s,n,o,f,m),Ce(([,v,y,b,,,T])=>!T&&!b&&v!==0&&y===da),pe(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Me(t,{behavior:"auto",top:-v}),Me(e,0)):(Me(e,0),Me(t,{behavior:"auto",top:-v}))}return Xe(ne(g,je(e,i)),([v,y,b])=>{b&&$N()?Me(e,y-v):h(-v)}),Xe(ne(kt(Vt(i,!1),e,m),Ce(([v,y,b])=>!v&&!b&&y!==0),pe(([v,y])=>y),lr(1)),h),we(ne(d,pe(v=>({top:-v}))),t),Xe(ne(c,je(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=la(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=>{Me(e,v),requestAnimationFrame(()=>{Me(t,{top:v}),requestAnimationFrame(()=>{Me(e,0),Me(m,!1)})})}),{deviation:e}},ut(Wt,Aa,so,zn,Tr,dp)),HN=Ue(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),ut(mp,DN,Er,Jw,Qw,jN,_N,gp,FN,Tr)),t1=Ue(([{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])=>(we(T.rangeChanged,I.scrollSeekRangeChanged),we(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}),ut(zn,Pa,Wt,LN,MN,so,ka,BN,zN,Gw,HN));function WN(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 Ka=typeof document<"u"?E.useLayoutEffect:E.useEffect;function vp(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&&Me(h.propsReady,!1);for(const y of r){const b=h[t.required[y]];Me(b,v[y])}for(const y of o)if(y in v){const b=h[t.optional[y]];Me(b,v[y])}h.propsReady&&Me(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=b=>{const T=h[t.methods[y]];Me(T,b)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=aN(h[t.events[y]]),v),{})}const d=E.forwardRef((h,v)=>{const{children:y,...b}=h,[T]=E.useState(()=>Cl(lN(e),C=>{l(C,b)})),[w]=E.useState(pv(u,T));Ka(()=>{for(const C of a)C in b&&Xe(w[C],b[C]);return()=>{Object.values(w).map(lp)}},[b,w,T]),Ka(()=>{l(T,b)}),E.useImperativeHandle(v,fv(c(T)));const S=n;return x.jsx(s.Provider,{value:T,children:n?x.jsx(S,{...WN([...r,...o,...a],b),children:y}):y})}),p=h=>E.useCallback(Nw(Me,E.useContext(s)[h]),[h]),f=h=>{const v=E.useContext(s)[h],y=E.useCallback(b=>Xe(v,b),[v]);return E.useSyncExternalStore(y,()=>Lt(v),()=>Lt(v))},m=h=>{const v=E.useContext(s)[h],[y,b]=E.useState(pv(Lt,v));return Ka(()=>Xe(v,T=>{T!==y&&b(fv(T))}),[v,y]),y},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const y=E.useContext(s)[h];Ka(()=>Xe(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const Pl=E.createContext(void 0),n1=E.createContext(void 0),r1=typeof document<"u"?E.useLayoutEffect:E.useEffect;function lu(e){return"self"in e}function qN(e){return"body"in e}function o1(e,t,n,r=yi,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(qN(h)||lu(h)){const y=lu(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():ga.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;lu(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)),Zw(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 cu="-webkit-sticky",Ev="sticky",i1=e1(()=>{if(typeof document>"u")return Ev;const e=document.createElement("div");return e.style.position=cu,e.style.position===cu?cu:Ev});function yp(e){return e}const UN=Ue(()=>{const e=ae(l=>`Item ${l}`),t=ae(null),n=ae(l=>`Group ${l}`),r=ae({}),o=ae(yp),i=ae("div"),a=ae(yi),s=(l,c=null)=>Vt(ne(r,pe(u=>u[l]),lt()),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")}}),YN=Ue(([e,t])=>({...e,...t}),ut(t1,UN)),GN=({height:e})=>x.jsx("div",{style:{height:e}}),KN={overflowAnchor:"none",position:i1(),zIndex:1},a1={overflowAnchor:"none"},ZN={...a1,display:"inline-block",height:"100%"},Cv=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=sn("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=sn("windowScrollContainerState"),a=sn("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),m=sn("gap"),g=Ae("horizontalDirection"),{callbackRef:h}=Lw(n,p,d,e?yi:s,f,m,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,y]=E.useState(0);wp("deviation",P=>{v!==P&&y(P)});const b=Ae("EmptyPlaceholder"),T=Ae("ScrollSeekPlaceholder")||GN,w=Ae("ListComponent"),S=Ae("ItemComponent"),C=Ae("GroupComponent"),R=Ae("computeItemKey"),I=Ae("isSeeking"),A=Ae("groupIndices").length>0,O=Ae("alignToBottom"),j=Ae("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},...j?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...ct(b,c)}):x.jsx(w,{...ct(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 D=P.originalIndex,_=R(D+t.firstItemIndex,P.data,c);return I?E.createElement(T,{...ct(T,c),height:P.size,index:P.index,key:_,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...ct(C,c),"data-index":D,"data-item-index":P.index,"data-known-size":P.size,key:_,style:KN},u(P.index,c)):E.createElement(S,{...ct(S,c),...s1(S,P.data),"data-index":D,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:_,style:g?ZN:a1},A?l(P.index,P.groupIndex,P.data,c):l(P.index,P.data,c))})})}),XN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},QN={outline:"none",overflowX:"auto",position:"relative"},xi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),JN={position:i1(),top:0,width:"100%",zIndex:1};function ct(e,t){if(typeof e!="string")return{context:t}}function s1(e,t){return{item:typeof e=="string"?void 0:t}}const eF=E.memo(function(){const e=Ae("HeaderComponent"),t=sn("headerHeight"),n=Ae("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),tF=E.memo(function(){const e=Ae("FooterComponent"),t=sn("footerHeight"),n=Ae("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null});function xp({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}=o1(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?QN:XN,...o},tabIndex:0,...i,...ct(s,u),children:r})})}function bp({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}=o1(a,l,s,m,d);return r1(()=>{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,...ct(s,p),children:r})})}const nF=({children:e})=>{const t=E.useContext(Pl),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>aa(n,l=>Sn(l,i?"width":"height")),[n,i]),s=Fn(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:s,style:xi(o),children:e})},rF=({children:e})=>{const t=E.useContext(Pl),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Ae("customScrollParent"),i=up(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("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:xi(a),children:e})},oF=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...JN,marginTop:`${n}px`},o=Ae("context");return x.jsx(t,{style:r,...ct(t,o),children:e})},iF=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?lF:sF,a=r||t?rF:nF;return x.jsxs(i,{...e,...ct(i,o),children:[n&&x.jsx(oF,{children:x.jsx(Cv,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(eF,{}),x.jsx(Cv,{}),x.jsx(tF,{})]})]})}),{Component:aF,useEmitter:wp,useEmitterValue:Ae,usePublisher:sn}=vp(YN,{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:{}},iF),sF=xp({useEmitter:wp,useEmitterValue:Ae,usePublisher:sn}),lF=bp({useEmitter:wp,useEmitterValue:Ae,usePublisher:sn}),Sp=aF,cF=Ue(()=>{const e=ae(l=>x.jsxs("td",{children:["Item $",l]})),t=ae(null),n=ae(null),r=ae(null),o=ae({}),i=ae(yp),a=ae(yi),s=(l,c=null)=>Vt(ne(o,pe(u=>u[l]),lt()),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")}}),uF=Ue(([e,t])=>({...e,...t}),ut(t1,cF)),dF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),fF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),pF={overflowAnchor:"none"},Rv=E.memo(function({showTopList:e=!1}){const t=De("listState"),n=De("computeItemKey"),r=De("firstItemIndex"),o=De("isSeeking"),i=De("ScrollSeekPlaceholder")||dF,a=De("context"),s=De("TableRowComponent"),l=De("fixedHeaderHeight"),c=De("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,{...ct(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...ct(s,a),...s1(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}:pF},c(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),hF=E.memo(function(){const e=De("listState"),t=De("topItemsIndexes").length>0,n=xn("sizeRanges"),r=De("useWindowScroll"),o=De("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=De("trackItemSizes"),c=De("itemSize"),u=De("log"),{callbackRef:d,ref:p}=Lw(n,c,l,s,u,void 0,o,!1,De("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Tp("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,m(A))});const g=De("EmptyPlaceholder"),h=De("FillerRow")||fF,v=De("TableBodyComponent"),y=De("paddingTopAddition"),b=De("statefulTotalCount"),T=De("context");if(b===0&&g)return x.jsx(g,{...ct(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,...ct(v,T),children:[R,t&&x.jsx(Rv,{showTopList:!0}),x.jsx(Rv,{}),I]})}),mF=({children:e})=>{const t=E.useContext(Pl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Fn(E.useMemo(()=>aa(n,i=>Sn(i,"height")),[n]),!0,De("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:xi(!1),children:e})},gF=({children:e})=>{const t=E.useContext(Pl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=De("customScrollParent"),i=up(n,o,De("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:xi(!1),children:e})},vF=E.memo(function(e){const t=De("useWindowScroll"),n=De("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=De("fixedHeaderContent"),a=De("fixedFooterContent"),s=De("context"),l=Fn(E.useMemo(()=>aa(r,v=>Sn(v,"height")),[r]),!0,De("skipAnimationFrameInResizeObserver")),c=Fn(E.useMemo(()=>aa(o,v=>Sn(v,"height")),[o]),!0,De("skipAnimationFrameInResizeObserver")),u=n||t?bF:xF,d=n||t?gF:mF,p=De("TableComponent"),f=De("TableHeadComponent"),m=De("TableFooterComponent"),g=i?x.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...ct(f,s),children:i()},"TableHead"):null,h=a?x.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...ct(m,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...ct(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(p,s),children:[g,x.jsx(hF,{},"TableBody"),h]})})})}),{Component:yF,useEmitter:Tp,useEmitterValue:De,usePublisher:xn}=vp(uF,{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:{}},vF),xF=xp({useEmitter:Tp,useEmitterValue:De,usePublisher:xn}),bF=bp({useEmitter:Tp,useEmitterValue:De,usePublisher:xn}),wF=yF,kv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},SF={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Pv,floor:js,max:qi,min:uu,round:Av}=Math;function Iv(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function TF(e){return{...SF,items:e}}function Za(e,t){return e&&e.width===t.width&&e.height===t.height}function EF(e,t){return e&&e.column===t.column&&e.row===t.row}const CF=Ue(([{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=ae(0),C=ae(0),R=ae(kv),I=ae({height:0,width:0}),A=ae({height:0,width:0}),O=$e(),j=$e(),V=ae(0),P=ae(null),D=ae({column:0,row:0}),_=$e(),L=$e(),N=ae(!1),z=ae(0),M=ae(!0),B=ae(!1),Q=ae(!1);Xe(ne(m,je(z),Ce(([F,$])=>!!$)),()=>{Me(M,!1)}),Xe(ne(kt(m,M,A,I,z,B),Ce(([F,$,Y,ie,,H])=>F&&!$&&Y.height!==0&&ie.height!==0&&!H)),([,,,,F])=>{Me(B,!0),pp(1,()=>{Me(O,F)}),Nn(ne(c),()=>{Me(t,[0,0]),Me(M,!0)})}),we(ne(L,Ce(F=>F!=null&&F.scrollTop>0),Cn(0)),C),Xe(ne(m,je(L),Ce(([,F])=>F!=null)),([,F])=>{F&&(Me(I,F.viewport),Me(A,F.item),Me(D,F.gap),F.scrollTop>0&&(Me(N,!0),Nn(ne(c,Ko(1)),$=>{Me(N,!1)}),Me(l,{top:F.scrollTop})))}),we(ne(I,pe(({height:F})=>F)),d),we(ne(kt(Pe(I,Za),Pe(A,Za),Pe(D,(F,$)=>F&&F.column===$.column&&F.row===$.row),Pe(c)),pe(([F,$,Y,ie])=>({gap:Y,item:$,scrollTop:ie,viewport:F}))),_),we(ne(kt(Pe(S),r,Pe(D,EF),Pe(A,Za),Pe(I,Za),Pe(P),Pe(C),Pe(N),Pe(M),Pe(z)),Ce(([,,,,,,,F])=>!F),pe(([F,[$,Y],ie,H,ye,Ee,ke,,Ve,se])=>{const{column:xe,row:le}=ie,{height:be,width:oe}=H,{width:ue}=ye;if(ke===0&&(F===0||ue===0))return kv;if(oe===0){const fn=hp(se,F),Tn=fn+Math.max(ke-1,0);return TF(Iv(fn,Tn,Ee))}const J=l1(ue,oe,xe);let q,te;Ve?$===0&&Y===0&&ke>0?(q=0,te=ke-1):(q=J*js(($+le)/(be+le)),te=J*Pv((Y+le)/(be+le))-1,te=uu(F-1,qi(te,J-1)),q=uu(te,qi(0,q))):(q=0,te=-1);const he=Iv(q,te,Ee),{bottom:_e,top:Be}=_v(ye,ie,H,he),Ye=Pv(F/J),Ot=Ye*be+(Ye-1)*le-_e;return{bottom:_e,itemHeight:be,items:he,itemWidth:oe,offsetBottom:Ot,offsetTop:Be,top:Be}})),R),we(ne(P,Ce(F=>F!==null),pe(F=>F.length)),S),we(ne(kt(I,A,R,D),Ce(([F,$,{items:Y}])=>Y.length>0&&$.height!==0&&F.height!==0),pe(([F,$,{items:Y},ie])=>{const{bottom:H,top:ye}=_v(F,ie,$,Y);return[ye,H]}),lt(ca)),t);const ee=ae(!1);we(ne(c,je(ee),pe(([F,$])=>$||F!==0)),ee);const X=en(ne(kt(R,S),Ce(([{items:F}])=>F.length>0),je(ee),Ce(([[F,$],Y])=>{const ie=F.items[F.items.length-1].index===$-1;return(Y||F.bottom>0&&F.itemHeight>0&&F.offsetBottom===0&&F.items.length===$)&&ie}),pe(([[,F]])=>F-1),lt())),Z=en(ne(Pe(R),Ce(({items:F})=>F.length>0&&F[0].index===0),Cn(0),lt())),G=en(ne(Pe(R),je(N),Ce(([{items:F},$])=>F.length>0&&!$),pe(([{items:F}])=>({endIndex:F[F.length-1].index,startIndex:F[0].index})),lt(Ww),lr(0)));we(G,f.scrollSeekRangeChanged),we(ne(O,je(I,A,S,D),pe(([F,$,Y,ie,H])=>{const ye=Kw(F),{align:Ee,behavior:ke,offset:Ve}=ye;let se=ye.index;se==="LAST"&&(se=ie-1),se=qi(0,se,uu(ie-1,se));let xe=wd($,H,Y,se);return Ee==="end"?xe=Av(xe-$.height+Y.height):Ee==="center"&&(xe=Av(xe-$.height/2+Y.height/2)),Ve&&(xe+=Ve),{behavior:ke,top:xe}})),l);const K=Vt(ne(R,pe(F=>F.offsetBottom+F.bottom)),0);return we(ne(T,pe(F=>({height:F.visibleHeight,width:F.visibleWidth}))),I),{customScrollParent:h,data:P,deviation:V,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:L,scrollBy:a,scrollContainerState:s,scrollHeight:j,scrollTo:l,scrollToIndex:O,scrollTop:c,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:T,...f,gridState:R,horizontalDirection:Q,initialTopMostItemIndex:z,totalListHeight:K,...p,endReached:X,propsReady:g,rangeChanged:G,startReached:Z,stateChanged:_,stateRestoreInProgress:N,...w}},ut(mp,Wt,Aa,Jw,Er,gp,Tr));function l1(e,t,n){return qi(1,js((e+n)/(js(t)+n)))}function _v(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=l1(e.width,n.width,t.column),i=js(r/o),a=i*n.height+qi(0,i-1)*t.row;return a>0?a+t.row:a}const RF=Ue(()=>{const e=ae(d=>`Item ${d}`),t=ae({}),n=ae(null),r=ae("virtuoso-grid-item"),o=ae("virtuoso-grid-list"),i=ae(yp),a=ae("div"),s=ae(yi),l=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),lt()),p),c=ae(!1),u=ae(!1);return we(Pe(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),kF=Ue(([e,t])=>({...e,...t}),ut(CF,RF)),PF=E.memo(function(){const e=dt("gridState"),t=dt("listClassName"),n=dt("itemClassName"),r=dt("itemContent"),o=dt("computeItemKey"),i=dt("isSeeking"),a=ln("scrollHeight"),s=dt("ItemComponent"),l=dt("ListComponent"),c=dt("ScrollSeekPlaceholder"),u=dt("context"),d=ln("itemDimensions"),p=ln("gap"),f=dt("log"),m=dt("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:Ov("column-gap",getComputedStyle(v).columnGap,f),row:Ov("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return r1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:x.jsx(l,{className:t,ref:h,...ct(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,{...ct(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):E.createElement(s,{...ct(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),AF=E.memo(function(){const e=dt("HeaderComponent"),t=ln("headerHeight"),n=dt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=dt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),IF=E.memo(function(){const e=dt("FooterComponent"),t=ln("footerHeight"),n=dt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=dt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),_F=({children:e})=>{const t=E.useContext(n1),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:xi(!1),children:e})},OF=({children:e})=>{const t=E.useContext(n1),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=dt("customScrollParent"),i=up(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:xi(!1),children:e})},MF=E.memo(function({...e}){const t=dt("useWindowScroll"),n=dt("customScrollParent"),r=n||t?jF:DF,o=n||t?OF:_F,i=dt("context");return x.jsx(r,{...e,...ct(r,i),children:x.jsxs(o,{children:[x.jsx(AF,{}),x.jsx(PF,{}),x.jsx(IF,{})]})})}),{useEmitter:c1,useEmitterValue:dt,usePublisher:ln}=vp(kF,{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"}},MF),DF=xp({useEmitter:c1,useEmitterValue:dt,usePublisher:ln}),jF=bp({useEmitter:c1,useEmitterValue:dt,usePublisher:ln});function Ov(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 Ep=()=>{const e=E.useContext(ci);return e?e.tweaks:gl},u1=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("span",{className:Ne("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(ap,{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(Yb,{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(qb,{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(SA,{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]}),Ia=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=Ep(),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:Ne("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(u1,{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})]})}),NF=e=>x.jsx(E.Fragment,{children:e.children}),FF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},LF={caseSensitive:!1,sort:!1},VF=[],zF=E.forwardRef(function(t,n){return x.jsx(ft.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),$F=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),BF={List:zF,Item:$F},vo=40,HF=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=E.useRef(null),T=g.value??g.defaultValue??"",w=_t(),[S,C]=E.useState(()=>Math.min(320,vo*o.length)),[R,I]=E.useState(!1),[A,O]=E.useState(""),[j,V]=E.useState(T),[P,D]=E.useState(()=>{var oe;return((oe=o.find(ue=>ue.value===T))==null?void 0:oe.label)??T}),[_,L]=E.useState(null),N=E.useRef(VF),z=m&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...o]:o,M=new Vr(z,["value","label"],LF).search(A),B=ip(R,"block-only"),Q=()=>{I(!1),C(0)},ee=M.filter(oe=>oe.hidden!==!0),X=m?void 0:`^(${o.map(oe=>`${rd(oe.value)}${oe.label?"|"+rd(oe.label):""}`).join("|")})$`,{x:Z,y:G,strategy:K,refs:F,context:$}=oo({open:R,transform:!0,placement:"bottom-start",onOpenChange:I,whileElementsMounted:Ta,middleware:[Ea(4),mw({padding:10,elementContext:"reference",apply(oe){const ue=oe.elements.floating.querySelector("ul"),J=(ue==null?void 0:ue.getBoundingClientRect().height)||0,q=Gi(F.reference.current,window.innerHeight),te=Math.min(J<vo?q:J,q,oe.availableHeight),he=ee.length===0?vo:Math.min(te,q,J),_e=`${y.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:_e,maxWidth:_e,height:he})}})]}),Y=_w($,FF),{getReferenceProps:ie,getFloatingProps:H,getItemProps:ye}=io([ao($,{role:"listbox"}),ro($),op($,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const oe=o.find(ue=>ue.value===g.value);V((oe==null?void 0:oe.label)??g.value)}},[g.value]),E.useEffect(()=>{if(!R)return C(0);const oe=F.reference;if(oe.current===null)return;const ue=Gi(oe.current,window.innerHeight);setTimeout(()=>C(Math.min(ue,ee.length*vo)),100)},[A,R,F.reference]),E.useEffect(()=>{const oe=F.reference.current;if(oe)return va(oe)},[]);const Ee=(oe,ue)=>{V(oe.value);const J=F.reference.current;if(!J)return;J==null||J.setAttribute("data-value",oe.value),J.value=oe.value;const q=new Event("change",{bubbles:!1,cancelable:!0});J.dispatchEvent(q),g.onChange&&g.onChange(q),D(oe.label??""),Q(),O(""),L(ue)},ke=oe=>{var J;const ue=oe.target.value;return O(ue),!R&&ue===""?I(!0):(oe.target.name=g.name||"",ue?I(!0):(J=g.onChange)==null?void 0:J.call(g,oe))},Ve=()=>{var oe;I(!0),O(""),(oe=F.reference.current)==null||oe.focus()},se=()=>{L(oe=>oe===null?0:oe),I(!0),O("")},xe=()=>{var oe;(oe=F.reference.current)==null||oe.setAttribute("data-value",""),O(""),V(""),D(""),Zy(F.reference.current),Q()},le=g.id||g.name,be=ee.length===0;return x.jsxs(Ia,{...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: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:Ve,children:[x.jsx(kf,{size:20}),x.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),j?x.jsx("button",{type:"button",onClick:xe,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",...ie({...g,onChange:ke,onFocus:se,pattern:X,ref:F.setReference,name:`${le}-shadow`,id:`${le}-shadow`,onClick:oe=>oe.currentTarget.focus(),onKeyDown(oe){var ue,J;if(oe.key==="Escape")return oe.currentTarget.blur(),Q();if(R){if(oe.key==="ArrowDown"){let q=et.number(_)?_+1:0;return q>ee.length-1&&(q=0),(ue=b.current)==null||ue.scrollIntoView({index:q}),L(q)}if(oe.key==="ArrowUp"){let q=et.number(_)?_-1:ee.length-1;return q<0&&(q=ee.length-1),(J=b.current)==null||J.scrollIntoView({index:q}),L(q)}if(oe.key==="Enter"){if(_!==null&&ee[_])return oe.preventDefault(),Ee(ee[_],_);if(ee.length===1)return oe.preventDefault(),Ee(ee[0],0)}}}}),"data-value":j,"data-error":!!t,"data-name":le,"data-target":le,required:f,value:R?A:P||j,"aria-autocomplete":"list",autoComplete:"off",className:Ne("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:le,name:le,type:"hidden","data-origin":le,ref:h,required:f,defaultValue:g.value||j||void 0}),x.jsx(no,{preserveTabOrder:!0,children:R?x.jsx(mi,{modal:!0,guards:!0,returnFocus:!1,context:$,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs(ft.div,{...H({ref:ii(B,F.setFloating),style:{...Y.styles,left:Z,top:G??0,position:K}}),initial:!1,"data-floating":"true",animate:{height:be?"auto":S},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!R)return C(0);const ue=F.floating.current.querySelectorAll("li").item(0),J=(ue?ue.getBoundingClientRect().height:vo)*ee.length;return ga.flushSync(()=>C(J+2))},children:[be?x.jsx("div",{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||w.autocompleteEmpty})}):null,x.jsx(Sp,{overscan:40,ref:b,hidden:be,data:ee,style:{height:S},defaultItemHeight:vo,components:BF,scrollerRef:oe=>void(v.current=oe),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(oe,ue)=>{const J=ue.Render??NF,q=j===ue.value||j===ue.label,te=_===oe,he=ue.label??ue.value;return x.jsx("button",{"data-value":ue.value,...ye({ref:_e=>void(N.current[oe]=_e),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":ue.disabled,onClick:()=>Ee(ue,oe),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${te?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(J,{...g,label:ue.label,value:ue.value,children:he})})}})]})}):null})]})}),Cp=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:Ne("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:Ne("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:Ne("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),d1=(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=va(C.current),A=r==null?void 0:r(R),O=j=>{const V=j;if(V.key==="Enter"&&R.enterKeyHint==="next"){const P=R.getAttribute("data-next");if(P){const D=document.getElementById(P);if(D)return D.focus(),void V.preventDefault()}}};return R.addEventListener("keydown",O),()=>{A==null||A(),I(),R.removeEventListener("keydown",O)}},[]),x.jsx(Ia,{...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:Ne(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:ii(T,C),className:Ne("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)})})}),_a=d1(m0,"input",{type:"text"}),Mv=new Date(1970,11,31),du={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Dv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},WF={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[]}},qF=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,Mv).flatMap(C=>et.keyof(du,C.type)?du[C.type](C.value):[]),h=fu(u,Mv).reduce((C,R)=>C+(et.keyof(Dv,R.type)?Dv[R.type](R.value):""),""),[v,y]=E.useState(d?fu(u,d).reduce((C,R)=>C+(et.keyof(du,R.type)?WF[R.type](d,R.value):""),""):""),b=C=>{const R=C.target.value;if(y(R),g.length===R.length&&g.every((A,O)=>{const j=R.charAt(O);return typeof A=="string"?j===A:A.test(j)})){const A=$o(K_(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?KI(C,h):"")),w=Qb(d),S=w?d.toISOString():void 0;return x.jsx(_a,{...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(gi,{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(mA,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(C0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),UF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],YF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],GF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],KF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],jv=(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 Nv(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?KF:GF:t.binary?YF:UF,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=jv(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=jv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Xa={exports:{}},Qa={exports:{}},Ge={};/** @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 Fv;function
|
|
179
|
+
*/var Fv;function ZF(){if(Fv)return Ge;Fv=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 Ge.AsyncMode=l,Ge.ConcurrentMode=c,Ge.ContextConsumer=s,Ge.ContextProvider=a,Ge.Element=t,Ge.ForwardRef=u,Ge.Fragment=r,Ge.Lazy=m,Ge.Memo=f,Ge.Portal=n,Ge.Profiler=i,Ge.StrictMode=o,Ge.Suspense=d,Ge.isAsyncMode=function(w){return T(w)||b(w)===l},Ge.isConcurrentMode=T,Ge.isContextConsumer=function(w){return b(w)===s},Ge.isContextProvider=function(w){return b(w)===a},Ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ge.isForwardRef=function(w){return b(w)===u},Ge.isFragment=function(w){return b(w)===r},Ge.isLazy=function(w){return b(w)===m},Ge.isMemo=function(w){return b(w)===f},Ge.isPortal=function(w){return b(w)===n},Ge.isProfiler=function(w){return b(w)===i},Ge.isStrictMode=function(w){return b(w)===o},Ge.isSuspense=function(w){return b(w)===d},Ge.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)},Ge.typeOf=b,Ge}var Ke={};/** @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 Lv;function
|
|
186
|
+
*/var Lv;function XF(){return Lv||(Lv=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(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===p||typeof H=="object"&&H!==null&&(H.$$typeof===m||H.$$typeof===f||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===h||H.$$typeof===v||H.$$typeof===y||H.$$typeof===g)}function T(H){if(typeof H=="object"&&H!==null){var ye=H.$$typeof;switch(ye){case t:var Ee=H.type;switch(Ee){case l:case c:case r:case i:case o:case d:return Ee;default:var ke=Ee&&Ee.$$typeof;switch(ke){case s:case u:case m:case f:case a:return ke;default:return ye}}case n:return ye}}}var w=l,S=c,C=s,R=a,I=t,A=u,O=r,j=m,V=f,P=n,D=i,_=o,L=d,N=!1;function z(H){return N||(N=!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(H)||T(H)===l}function M(H){return T(H)===c}function B(H){return T(H)===s}function Q(H){return T(H)===a}function ee(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function X(H){return T(H)===u}function Z(H){return T(H)===r}function G(H){return T(H)===m}function K(H){return T(H)===f}function F(H){return T(H)===n}function $(H){return T(H)===i}function Y(H){return T(H)===o}function ie(H){return T(H)===d}Ke.AsyncMode=w,Ke.ConcurrentMode=S,Ke.ContextConsumer=C,Ke.ContextProvider=R,Ke.Element=I,Ke.ForwardRef=A,Ke.Fragment=O,Ke.Lazy=j,Ke.Memo=V,Ke.Portal=P,Ke.Profiler=D,Ke.StrictMode=_,Ke.Suspense=L,Ke.isAsyncMode=z,Ke.isConcurrentMode=M,Ke.isContextConsumer=B,Ke.isContextProvider=Q,Ke.isElement=ee,Ke.isForwardRef=X,Ke.isFragment=Z,Ke.isLazy=G,Ke.isMemo=K,Ke.isPortal=F,Ke.isProfiler=$,Ke.isStrictMode=Y,Ke.isSuspense=ie,Ke.isValidElementType=b,Ke.typeOf=T}()),Ke}var Vv;function f1(){return Vv||(Vv=1,process.env.NODE_ENV==="production"?Qa.exports=ZF():Qa.exports=XF()),Qa.exports}/*
|
|
187
187
|
object-assign
|
|
188
188
|
(c) Sindre Sorhus
|
|
189
189
|
@license MIT
|
|
190
|
-
*/var pu,zv;function
|
|
191
|
-
Valid keys: `+JSON.stringify(Object.keys(M),null," "));var H=ie(K,Y,X,Z,G+"."+Y,n);if(H)return H}return null}return h(B)}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 B=d(M);if(B){var Q=B.call(M),ee;if(B!==M.entries){for(;!(ee=Q.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=Q.next()).done;){var X=ee.value;if(X&&!P(X[1]))return!1}}else return!1;return!0;default:return!1}}function D(M,B){return M==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function _(M){var B=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":D(B,M)?"symbol":B}function L(M){if(typeof M>"u"||M===null)return""+M;var B=_(M);if(B==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return B}function N(M){var B=L(M);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}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,qv;function QF(){if(qv)return yu;qv=1;var e=Rp();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 Uv;function JF(){if(Uv)return Xa.exports;if(Uv=1,process.env.NODE_ENV!=="production"){var e=f1(),t=!0;Xa.exports=XF()(e.isElement,t)}else Xa.exports=QF()();return Xa.exports}var e2=JF();const rt=Oy(e2);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 t2=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=n2(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Yv(r,"path",i),Yv(r,"relativePath",i),r}function n2(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=t2.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Yv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const r2=[".DS_Store","Thumbs.db"];function o2(e){return lo(this,void 0,void 0,function*(){return Ns(e)&&i2(e.dataTransfer)?c2(e.dataTransfer,e.type):a2(e)?s2(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?l2(e):[]})}function i2(e){return Ns(e)}function a2(e){return Ns(e)&&Ns(e.target)}function Ns(e){return typeof e=="object"&&e!==null}function s2(e){return Sd(e.target.files).map(t=>Zo(t))}function l2(e){return lo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Zo(n))})}function c2(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(u2));return Gv(h1(r))}return Gv(Sd(e.files).map(n=>Zo(n)))})}function Gv(e){return e.filter(t=>r2.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 u2(e){if(typeof e.webkitGetAsEntry!="function")return Kv(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?m1(t):Kv(e,t)}function h1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?h1(n):[n]],[])}function Kv(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 d2(e){return lo(this,void 0,void 0,function*(){return e.isDirectory?m1(e):f2(e)})}function m1(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(d2));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function f2(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 Ja={},Zv;function p2(){return Zv||(Zv=1,Ja.__esModule=!0,Ja.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}),Ja}var h2=p2();const xu=Oy(h2);function Xv(e){return v2(e)||g2(e)||v1(e)||m2()}function m2(){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
|
|
193
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v1(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
|
|
194
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
195
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S1(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 U2(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 Y2(e){if(Array.isArray(e))return e}function ry(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 pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(n),!0).forEach(function(r){Cd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ry(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 Ls(e,t){if(e==null)return{};var n=G2(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 G2(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=Ls(e,F2),o=E1(r),i=o.open,a=Ls(o,L2);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(pt(pt({},a),{},{open:i})))});kp.displayName="Dropzone";var T1={disabled:!1,getFilesFromEvent:o2,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=T1;kp.propTypes={children:rt.func,accept:rt.objectOf(rt.arrayOf(rt.string)),multiple:rt.bool,preventDropOnDocument:rt.bool,noClick:rt.bool,noKeyboard:rt.bool,noDrag:rt.bool,noDragEventsBubbling:rt.bool,minSize:rt.number,maxSize:rt.number,maxFiles:rt.number,disabled:rt.bool,getFilesFromEvent:rt.func,onFileDialogCancel:rt.func,onFileDialogOpen:rt.func,useFsAccessApi:rt.bool,autoFocus:rt.bool,onDragEnter:rt.func,onDragLeave:rt.func,onDragOver:rt.func,onDrop:rt.func,onDropAccepted:rt.func,onDropRejected:rt.func,onError:rt.func,validator:rt.func};var Rd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function E1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=pt(pt({},T1),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 D2(n)},[n]),O=E.useMemo(function(){return M2(n)},[n]),j=E.useMemo(function(){return typeof h=="function"?h:oy},[h]),V=E.useMemo(function(){return typeof g=="function"?g:oy},[g]),P=E.useRef(null),D=E.useRef(null),_=E.useReducer(K2,Rd),L=bu(_,2),N=L[0],z=L[1],M=N.isFocused,B=N.isFileDialogActive,Q=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&O2()),ee=function(){!Q.current&&B&&setTimeout(function(){if(D.current){var te=D.current.files;te.length||(z({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[D,B,V,Q]);var X=E.useRef([]),Z=function(te){P.current&&P.current.contains(te.target)||(te.preventDefault(),X.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",ny,!1),document.addEventListener("drop",Z,!1)),function(){b&&(document.removeEventListener("dragover",ny),document.removeEventListener("drop",Z))}},[P,b]),E.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var G=E.useCallback(function(q){R?R(q):console.error(q)},[R]),K=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),X.current=[].concat($2(X.current),[q.target]),es(q)&&Promise.resolve(o(q)).then(function(te){if(!(Fs(q)&&!C)){var he=te.length,_e=he>0&&P2({files:te,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Be=he>0&&!_e;z({isDragAccept:_e,isDragReject:Be,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(te){return G(te)})},[o,c,G,C,A,a,i,s,l,I]),F=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=es(q);if(te&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return te&&d&&d(q),!1},[d,C]),$=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=X.current.filter(function(_e){return P.current&&P.current.contains(_e)}),he=te.indexOf(q.target);he!==-1&&te.splice(he,1),X.current=te,!(te.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),es(q)&&u&&u(q))},[P,u,C]),Y=E.useCallback(function(q,te){var he=[],_e=[];q.forEach(function(Be){var Ye=y1(Be,A),Ot=bu(Ye,2),fn=Ot[0],Tn=Ot[1],Xn=x1(Be,a,i),Qn=bu(Xn,2),Jn=Qn[0],W=Qn[1],U=I?I(Be):null;if(fn&&Jn&&!U)he.push(Be);else{var ze=[Tn,W];U&&(ze=ze.concat(U)),_e.push({file:Be,errors:ze.filter(function(Je){return Je})})}}),(!s&&he.length>1||s&&l>=1&&he.length>l)&&(he.forEach(function(Be){_e.push({file:Be,errors:[k2]})}),he.splice(0)),z({acceptedFiles:he,fileRejections:_e,isDragReject:_e.length>0,type:"setFiles"}),p&&p(he,_e,te),_e.length>0&&m&&m(_e,te),he.length>0&&f&&f(he,te)},[z,s,A,a,i,l,p,f,m,I]),ie=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),X.current=[],es(q)&&Promise.resolve(o(q)).then(function(te){Fs(q)&&!C||Y(te,q)}).catch(function(te){return G(te)}),z({type:"reset"})},[o,Y,G,C]),H=E.useCallback(function(){if(Q.current){z({type:"openDialog"}),j();var q={multiple:s,types:O};window.showOpenFilePicker(q).then(function(te){return o(te)}).then(function(te){Y(te,null),z({type:"closeDialog"})}).catch(function(te){j2(te)?(V(te),z({type:"closeDialog"})):N2(te)?(Q.current=!1,D.current?(D.current.value=null,D.current.click()):G(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."))):G(te)});return}D.current&&(z({type:"openDialog"}),j(),D.current.value=null,D.current.click())},[z,j,V,v,Y,G,O,s]),ye=E.useCallback(function(q){!P.current||!P.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),H())},[P,H]),Ee=E.useCallback(function(){z({type:"focus"})},[]),ke=E.useCallback(function(){z({type:"blur"})},[]),Ve=E.useCallback(function(){T||(_2()?setTimeout(H,0):H())},[T,H]),se=function(te){return r?null:te},xe=function(te){return w?null:se(te)},le=function(te){return S?null:se(te)},be=function(te){C&&te.stopPropagation()},oe=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,he=te===void 0?"ref":te,_e=q.role,Be=q.onKeyDown,Ye=q.onFocus,Ot=q.onBlur,fn=q.onClick,Tn=q.onDragEnter,Xn=q.onDragOver,Qn=q.onDragLeave,Jn=q.onDrop,W=Ls(q,V2);return pt(pt(Cd({onKeyDown:xe(En(Be,ye)),onFocus:xe(En(Ye,Ee)),onBlur:xe(En(Ot,ke)),onClick:se(En(fn,Ve)),onDragEnter:le(En(Tn,K)),onDragOver:le(En(Xn,F)),onDragLeave:le(En(Qn,$)),onDrop:le(En(Jn,ie)),role:typeof _e=="string"&&_e!==""?_e:"presentation"},he,P),!r&&!w?{tabIndex:0}:{}),W)}},[P,ye,Ee,ke,Ve,K,F,$,ie,w,S,r]),ue=E.useCallback(function(q){q.stopPropagation()},[]),J=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,he=te===void 0?"ref":te,_e=q.onChange,Be=q.onClick,Ye=Ls(q,z2),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:se(En(_e,ie)),onClick:se(En(Be,ue)),tabIndex:-1},he,D);return pt(pt({},Ot),Ye)}},[D,n,s,ie,r]);return pt(pt({},N),{},{isFocused:M&&!r,getRootProps:oe,getInputProps:J,rootRef:P,inputRef:D,open:se(H)})}function K2(e,t){switch(t.type){case"focus":return pt(pt({},e),{},{isFocused:!0});case"blur":return pt(pt({},e),{},{isFocused:!1});case"openDialog":return pt(pt({},Rd),{},{isFileDialogActive:!0});case"closeDialog":return pt(pt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return pt(pt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return pt(pt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return pt({},Rd);default:return e}}function oy(){}const Z2={isImage:e=>e.type.includes("image")},X2=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(Z2.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Nv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Nv(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(Ub,{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"})})]})},Q2=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(X2,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),J2=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(Q2,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),eL=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(LA,{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"})]})]}),tL=({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}=E1({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(J2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},nL=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 $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 iy=40,rL=e=>x.jsx(E.Fragment,{children:e.children}),oL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},iL={caseSensitive:!1,sort:!1},ay=[],aL=E.forwardRef(function(t,n){return x.jsx(ft.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})})}),sL=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),lL={List:aL,Item:sL},cL=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})},uL=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 $r(r.map(J=>[J.value,J])),[r]),b=E.useRef(null),T=E.useRef(null),w=h.value??h.defaultValue??ay,S=_t(),[C,R]=E.useState(0),[I,A]=E.useState(!1),[O,j]=E.useState(""),[V,P]=E.useState(()=>{const J=new $r;return w.forEach(q=>{const te=y.get(q);return te?J.set(q,te):void 0}),J}),D=E.useMemo(()=>Array.from(V.keys()),[V]),[_,L]=E.useState(()=>{const J=new Set(w);return r.reduce((q,te)=>J.has(te.value)?[...q,te.label??te.value]:q,[])??w}),[N,z]=E.useState(null),M=E.useRef(ay),B=m&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...r]:r,Q=new Vr(B,["value","label"],iL).search(O),ee=ip(I,"block-only"),X=Q.filter(J=>J.hidden!==!0),Z=X.length===0,{x:G,y:K,strategy:F,refs:$,context:Y}=oo({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:A,whileElementsMounted:Ta,middleware:[Ea(4),mw({padding:10,elementContext:"reference",apply(J){const q=J.elements.floating.querySelector("ul"),te=(q==null?void 0:q.getBoundingClientRect().height)||0,he=Gi($.reference.current,window.innerHeight),_e=Math.min(te<iy?he:te,he,J.availableHeight),Be=X.length===0?iy:Math.min(_e,he,te),Ye=`${b.current.getBoundingClientRect().width}px`;Object.assign(J.elements.floating.style,{width:Ye,maxWidth:Ye,height:Be})}})]}),ie=_w(Y,oL),{getReferenceProps:H,getFloatingProps:ye,getItemProps:Ee}=io([ao(Y,{role:"listbox"}),ro(Y),op(Y,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:N,selectedIndex:N,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:J=>z(q=>J??q)})]);E.useEffect(()=>{if(!I)return R(0);const J=$.reference;if(J.current===null)return;const q=Gi(J.current,window.innerHeight);setTimeout(()=>R(Math.min(q,X.length*40)),100)},[O,I,$.reference]),E.useEffect(()=>{h.value&&P(new $r(h.value.map(J=>[J,y.get(J)])))},[h.value,y]),E.useEffect(()=>{const J=$.reference.current;if(J)return va(J)},[]);const ke=(J,q)=>{const te=V.clone(Be=>Be.has(J.value)?Be.remove(J.value):Be.set(J.value,J));P(te);const he=$.reference.current;if(!he)return;const _e=te.map(Be=>Be.value);he==null||he.setAttribute("data-value",JSON.stringify(_e)),g&&g(_e),L(Be=>Be.concat(J.label??"")),j(""),z(q)},Ve=J=>{const q=J.target.value;return j(q),!I&&q===""?A(!0):(J.target.name=h.name||"",q?A(!0):void 0)},se=()=>{var J;A(!0),j(""),(J=$.reference.current)==null||J.focus()},xe=()=>{A(!0),j("")},le=()=>{var J;(J=$.reference.current)==null||J.setAttribute("data-value","[]"),j(""),A(!1),P(new $r),g==null||g([])},be=h.id||h.name,oe=V.map((J,q)=>x.jsx(Ud,{size:"small",icon:x.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:te=>{te.preventDefault(),te.stopPropagation(),ke(J,q),A(!1)},children:x.jsx(dl,{size:14})}),children:J.label??J.value},`MultiSelect-${J.value}-x`)),ue={height:Z?"0":V.size===0?C-49:C-86};return x.jsxs(Ia,{...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:se,children:[x.jsx(kf,{size:20}),x.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),V?x.jsx("button",{type:"button",onClick:le,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("li",{...H({...h,onFocus:xe,id:`${be}-shadow`,name:`${be}-shadow`,ref:$.setReference}),tabIndex:0,role:"button","data-name":be,"data-target":be,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),value:I?O:_||V,className:Ne("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(cL,{label:c,children:oe})}),x.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:v,required:f,defaultValue:h.value||D||void 0}),x.jsx(no,{preserveTabOrder:!0,children:I?x.jsx(mi,{modal:!0,guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...ye({ref:$.setFloating,style:{...ie.styles,top:K??0,position:F,left:G}}),"data-floating":"true",className:"isolate z-floating m-0 max-h-80 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:Ve,title:h.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:J=>{var q,te;if(J.key==="ArrowDown"){let he=N+1;return he>X.length-1&&(he=0),(q=T.current)==null||q.scrollIntoView({index:he}),z(he)}if(J.key==="ArrowUp"){let he=N-1;return he<0&&(he=X.length-1),(te=T.current)==null||te.scrollIntoView({index:he}),z(he)}if(J.key==="Escape")return J.currentTarget.blur(),A(!1);if(J.key==="Enter"){if(N!==null&&X[N])return J.preventDefault(),ke(X[N],N);if(X.length===1)return J.preventDefault(),ke(X[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"}),Z?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,Z?null:x.jsx(ft.div,{initial:!1,"data-floating":"true",ref:ee,animate:{height:Z?"auto":C},style:ue,className:"max-h-80 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return R(0);const q=$.floating.current.querySelectorAll("li").item(0),te=(q?q.getBoundingClientRect().height:40)*X.length;return ga.flushSync(()=>R(te+2))},children:x.jsx(Sp,{ref:T,hidden:Z,data:X,components:lL,style:ue,className:"max-h-80 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(J,q)=>{const te=q.Render??rL,he=V.has(q.value)||V.has(q.label??""),_e=N===J,Be=q.label??q.value;return x.jsxs("button",{"data-value":q.value,...Ee({ref:Ye=>void(M.current[J]=Ye),role:"option",type:"button","aria-checked":he,"aria-current":he,"aria-selected":he,"aria-busy":q.disabled,onClick:()=>ke(q,J)}),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 ${he||_e?"bg-floating-hover text-floating-foreground":""}`,children:[x.jsx(Cp,{onChange:Lf,checked:he,"aria-checked":he,onClick:Ye=>{Ye.stopPropagation(),ke(q,J)}}),x.jsx(te,{...h,label:q.label,value:q.value,children:Be})]})}})}),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:oe})]})}):null})]})}),dL=({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:Ne("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=va(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(Ia,{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(kf,{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:ii(h,y),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Ne("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 C1(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ro(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 sy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function R1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=sy(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():sy(e[o],null)}}}}function Zr(...e){return k.useCallback(R1(...e),e)}function k1(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,fL(o,...t)]}function fL(...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 P1(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 pL({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=hL({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=P1(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 hL({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=P1(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var mL=k.createContext(void 0);function gL(e){const t=k.useContext(mL);return e||t||"ltr"}function vL(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 yL=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function xL(e){const[t,n]=k.useState(void 0);return yL(()=>{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 kd(e){const t=bL(e),n=k.forwardRef((r,o)=>{const{children:i,...a}=r,s=k.Children.toArray(i),l=s.find(SL);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 bL(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const a=EL(o),s=TL(i,o.props);return o.type!==k.Fragment&&(s.ref=r?R1(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 wL=Symbol("radix.slottable");function SL(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wL}function TL(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 EL(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 CL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Al=CL.reduce((e,t)=>{const n=kd(`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 RL(e){const t=e+"CollectionProvider",[n,r]=k1(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=kd(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=kd(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 A1=["PageUp","PageDown"],I1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},bi="Slider",[Pd,kL,PL]=RL(bi),[O1,Xz]=k1(bi,[PL]),[AL,Il]=O1(bi),M1=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"?IL:_L,[T=[],w]=pL({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 j=NL(T,O);A(O,j)}function R(O){A(O,v.current)}function I(){const O=S.current[v.current];T[v.current]!==O&&p(T)}function A(O,j,{commit:V}={commit:!1}){const P=zL(i),D=$L(Math.round((O-r)/i)*i+r,P),_=C1(D,[r,o]);w((L=[])=>{const N=DL(L,_,j);if(VL(N,l*i)){v.current=N.indexOf(_);const z=String(N)!==String(L);return z&&V&&p(N),z?N:L}else return L})}return x.jsx(AL,{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:Ro(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:j})=>{if(!s){const D=A1.includes(O.key)||O.shiftKey&&I1.includes(O.key)?10:1,_=v.current,L=T[_],N=i*D*j;A(L+N,_,{commit:!0})}}})})})})});M1.displayName=bi;var[D1,j1]=O1(bi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),IL=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=gL(o),h=g==="ltr",v=h&&!i||!h&&i;function y(b){const T=m.current||d.getBoundingClientRect(),w=[0,T.width],C=Pp(w,v?[n,r]:[r,n]);return m.current=T,C(b-T.left)}return x.jsx(D1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:x.jsx(N1,{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=_1[v?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),_L=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=Pp(v,f?[r,n]:[n,r]);return p.current=h,b(g-h.top)}return x.jsx(D1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:x.jsx(N1,{"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=_1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),N1=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Il(bi,n);return x.jsx(Al.span,{...c,ref:t,onKeyDown:Ro(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):A1.concat(I1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Ro(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:Ro(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Ro(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),F1="SliderTrack",L1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Il(F1,n);return x.jsx(Al.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});L1.displayName=F1;var Ad="SliderRange",V1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Il(Ad,n),i=j1(Ad,n),a=k.useRef(null),s=Zr(t,a),l=o.values.length,c=o.values.map(p=>$1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return x.jsx(Al.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});V1.displayName=Ad;var Id="SliderThumb",z1=k.forwardRef((e,t)=>{const n=kL(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(OL,{...e,ref:i,index:a})}),OL=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=Il(Id,n),s=j1(Id,n),[l,c]=k.useState(null),u=Zr(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=xL(l),f=a.values[r],m=f===void 0?0:$1(f,a.min,a.max),g=jL(r,a.values.length),h=p==null?void 0:p[s.size],v=h?FL(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(Al.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:Ro(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&x.jsx(ML,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});z1.displayName=Id;var ML=e=>{const{value:t,...n}=e,r=k.useRef(null),o=vL(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 DL(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function $1(e,t,n){const i=100/(n-t)*(e-t);return C1(i,[0,100])}function jL(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function NL(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 FL(e,t,n){const r=e/2,i=Pp([0,50],[0,r]);return(r-i(t)*n)*n}function LL(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function VL(e,t){if(t>0){const n=LL(e);return Math.min(...n)>=t}return!0}function Pp(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 zL(e){return(String(e).split(".")[1]||"").length}function $L(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var BL=M1,HL=L1,WL=V1,qL=z1;const UL=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"));et.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(et.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),x.jsx(ap,{title:"",ref:r,as:qL,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})},YL=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(ui()),s=r||o||[];return x.jsxs(BL,{...i,defaultValue:r,value:o,className:Ne("relative flex h-5 w-full touch-none select-none items-center",n),children:[x.jsx(HL,{className:"relative h-2 grow rounded-full bg-background",children:x.jsx(WL,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>x.jsx(UL,{tooltip:t??!1},`${a.current}-${c}`))]})},GL=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:Ne("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})]})}),KL=e=>{const[t,n]=UP();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:XP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},ZL=d1("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)}),XL=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},QL={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"})})},JL=e=>{const t=E.useRef(null),n=XL(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(_a,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(Sp,{height:n,useWindowScroll:!0,data:e.source,components:QL,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(Cp,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Oo,{children:x.jsx(Pf,{})})}),x.jsx("div",{})]})};var eV=Object.defineProperty,ly=Object.getOwnPropertySymbols,tV=Object.prototype.hasOwnProperty,nV=Object.prototype.propertyIsEnumerable,cy=(e,t,n)=>t in e?eV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rV=(e,t)=>{for(var n in t||(t={}))tV.call(t,n)&&cy(e,n,t[n]);if(ly)for(var n of ly(t))nV.call(t,n)&&cy(e,n,t[n]);return e},Ap=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},oV=(e,t,n,r)=>_l(Ap,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]))},iV=(e,t)=>(Xo(e)||Array.isArray(e))&&t?e[t]:e,aV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Vs=e=>/[0-9.]+/.test(e),uy=e=>["string","number"].includes(typeof e),dy=e=>e==null||(e==null?void 0:e.length)===0||e==="",fy={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:dy,notEmpty:e=>!dy(e),in:(e,t)=>Ap(t,n=>ur(e,n)),notIn:(e,t)=>B1(t,n=>!ur(e,n))},sV=e=>{if(e in fy)return fy[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},_l=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=sV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},lV=(e,t,n,r)=>_l(Ao,e,t,n,r),B1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},cV=(e,t,n,r)=>_l(B1,e,t,n,r),H1=e=>{if(e===null)return null;const t=rV({},e);return Object.keys(t).forEach(n=>t[n]=Xo(e[n])?H1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},py=(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},uV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},dV=e=>Ao(e,(t,n,r)=>Xo(t)?n===r.findIndex(o=>ur(o,t)):n===r.indexOf(t)),fV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},W1=(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())},pV=(e,t)=>W1(e,n=>n[t]),hy=(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},hV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},mV=(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 Vs(e)&&Vs(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)&&Vs(e)&&Vs(t)){const o=[],[i,a]=hV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return mV(e,t,r)},gV=(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 uy(e)&&uy(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},my=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},vV=(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)},yV=(e,t,n,r)=>_l(vV,e,t,n,r),gy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(aV(t))},q1=(e=>(e.Asc="asc",e.Desc="desc",e))(q1||{}),xV=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),bV=(e,t)=>e.sort(xV(t)),wV=(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})},SV=class _d{constructor(t=[]){this.array=t}static Range(...t){return gV(...t)}static New(t){return new _d(t)}Where(t,n,r){return this.array=lV(this.array,t,n,r),this}Some(t,n,r){return oV(this.array,t,n,r)}All(t,n,r){return cV(this.array,t,n,r)}Reverse(){return this.array=my(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=yV(this.array,t,n,r),this}Distinct(){return this.array=dV(this.array),this}First(t){return t===void 0?this.array[0]:fV(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+iV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return pV(this.array,t)}GroupWith(t){return W1(this.array,t)}Except(t){return Ao(this.array,n=>!py(t,n))}Intersect(t){return Ao(this.array,n=>py(t,n))}OrderBy(t,n){let r;return r=t?gy(this.array,t):this.array.toSorted(),this.array=n==="desc"?my(r):r,this}Includes(t){return Ap(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(hy(this.array,n=>[t,n]))}Zip(t,n){return hy(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(H1(this.array))}ToObject(t){return uV(this.array,t)}Sort(t){return Array.isArray(t)?bV(this.array,t):gy(this.array,t)}Unique(t){return wV(this.array,t)}},U1=SV;const Y1=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"});var Tu={},vy;function TV(){return vy||(vy=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 Ui=TV();const Ip=e=>e.headerLabel??e.thead??e.id,_p=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 Op=e=>e.type==="number"?e.valueAsNumber:e.value,EV=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},CV={},RV=(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})},kV=(e,t,n=CV)=>{const r=qr()?null:Ui.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:RV(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return qr()||Ui.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},PV=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:ui(),operation:l,label:Ip(e),name:o,type:i,value:"",...r}},Mp=()=>{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}},AV=e=>{const t=_t(),n=Mp(),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=Op(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(gi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(RA,{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(_a,{"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]})})]})})})},IV=({filter:e,onDelete:t,set:n})=>{const r=_t(),o=Mp(),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=Op(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(_a,{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})})]})},_V=({item:e,onPointerDown:t})=>{const n=Lo(0);return x.jsxs(Bb,{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(TA,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},OV=e=>{var l;const t=_t(),n=_p(e.cols),r=KP(),[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 U1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(ZS(m).map((v,y)=>{const b=m[v];return{...g,groupId:ui(),groupKey:d,index:y,rows:b,groupName:v}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(gi,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(NA,{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(iE,{children:x.jsx($b,{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(_V,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},MV=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),DV=(e,t)=>e.toSorted(MV(t)),G1=(e,t,n)=>({label:t,id:ui(),type:n,value:e.id}),jV=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,G1(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(gi,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Wb,{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]})})]})})})},NV=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=G1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Ip(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(uA,{size:14}):null,n==="desc"?x.jsx(lA,{size:14}):null,n==="undefined"?x.jsx(Wb,{size:14}):null]})},FV=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(AV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(jV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(OV,{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=Op(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function LV(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 VV=e=>{const t=E.useId(),n=_t(),r=E.useMemo(()=>LV(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]})})]})},zV=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return E.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),x.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:x.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},$V=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=Ff(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},d?x.jsx(zV,{children:x.jsx(p,{col:i,row:t,rowIndex:e})}):null,x.jsx("span",{className:"relative",children:o?Y1:c?x.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):x.jsx(E.Fragment,{children:et.nil(l)?"":l})}))})})},BV={top:0,left:0,right:0,bottom:-1},HV=e=>{var g;const t=Ep(),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=Mp(),l=o?AA:_A,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===q1.Asc?"ascending":"descending":"none",m=Ip(e.header);return x.jsxs(Bb,{...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(gi,{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(IV,{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(NV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:x.jsx(ft.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:BV,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`}})]})},WV=e=>{const[t,n]=PV(e.setCols);return x.jsx($b,{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(HV,{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}`))})})},K1=E.createContext({}),qV=()=>E.useContext(K1),UV=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})})),YV=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??""}`})),GV=E.forwardRef(({context:e,...t},n)=>{const r=qV(),o={...t==null?void 0:t.style,top:et.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})}),KV=E.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row table-row ${(n==null?void 0:n.className)??""}`})),ZV=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),XV={TableHead:GV,Table:YV,TableBody:UV,TableRow:KV,TableFoot:ZV},QV=[0,0,0,0,0,0,0,0,0,0],JV=e=>x.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?Y1:x.jsx(R0,{})}),ez=()=>x.jsx(E.Fragment,{}),tz=()=>x.jsx(E.Fragment,{}),nz=[],yy=({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 QV;if(c)return u.rows;const b=new U1(u.rows);return t.length>0&&t.forEach(T=>T.value===""||Number.isNaN(T.value)?void 0:b.Where(T.name,T.operation.symbol,T.value)),r.length===0?b.Select():DV(b.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,T=new IntersectionObserver(w=>{var R;return w[w.length-1].isIntersecting&&g.current?((R=m.current)==null||R.call(m),void f(!0)):f(!1)});return T.observe(b),()=>T.disconnect()},[g,m]);const v=h.length===0,y={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(yF,{useWindowScroll:!0,followOutput:"smooth",components:XV,totalCount:h.length,data:v?nz:h,itemContent:v?ez:$V,fixedFooterContent:p?tz:null,context:y,fixedHeaderContent:()=>x.jsx(WV,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?x.jsx(JV,{loading:u.loading}):null,x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(VV,{...l}):null]})},rz=(e,t)=>typeof t=="function"?t(e):t,ts=(e,t,n)=>e===t||n==null?void 0:n(t),oz=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Ep(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>_p(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]:rz(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),ts((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),ts((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),ts((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),ts((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return x.jsx(K1.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?x.jsx(FV,{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(yy,{...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(yy,{...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}`))})]})})},iz=["INPUT","SELECT"],Z1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{iz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Eu,xy;function Dp(){if(xy)return Eu;xy=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,by;function X1(){if(by)return Cu;by=1;var e=Dp(),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 j=I.charCodeAt(O);if(j===45||j===46||j===95||j===126||j>=48&&j<=57||j>=65&&j<=90||j>=97&&j<=122||w===e.RFC1738&&(j===40||j===41)){A[A.length]=I.charAt(O);continue}if(j<128){A[A.length]=r[j];continue}if(j<2048){A[A.length]=r[192|j>>6]+r[128|j&63];continue}if(j<55296||j>=57344){A[A.length]=r[224|j>>12]+r[128|j>>6&63]+r[128|j&63];continue}O+=1,j=65536+((j&1023)<<10|I.charCodeAt(O)&1023),A[A.length]=r[240|j>>18]+r[128|j>>12&63]+r[128|j>>6&63]+r[128|j&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 Ru,wy;function az(){if(wy)return Ru;wy=1;var e=qS(),t=X1(),n=Dp(),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,j,V,P,D,_,L){for(var N=h,z=L,M=0,B=!1;(z=z.get(p))!==void 0&&!B;){var Q=z.get(h);if(M+=1,typeof Q<"u"){if(Q===M)throw new RangeError("Cyclic object value");B=!0}typeof z.get(p)>"u"&&(M=0)}if(typeof I=="function"?N=I(v,N):N instanceof Date?N=j(N):y==="comma"&&i(N)&&(N=t.maybeMap(N,function(ke){return ke instanceof Date?j(ke):ke})),N===null){if(w)return R&&!D?R(v,u.encoder,_,"key",V):v;N=""}if(d(N)||t.isBuffer(N)){if(R){var ee=D?v:R(v,u.encoder,_,"key",V);return[P(ee)+"="+P(R(N,u.encoder,_,"value",V))]}return[P(v)+"="+P(String(N))]}var X=[];if(typeof N>"u")return X;var Z;if(y==="comma"&&i(N))D&&R&&(N=t.maybeMap(N,R)),Z=[{value:N.length>0?N.join(",")||null:void 0}];else if(i(I))Z=I;else{var G=Object.keys(N);Z=A?G.sort(A):G}var K=C?String(v).replace(/\./g,"%2E"):String(v),F=b&&i(N)&&N.length===1?K+"[]":K;if(T&&i(N)&&N.length===0)return F+"[]";for(var $=0;$<Z.length;++$){var Y=Z[$],ie=typeof Y=="object"&&Y&&typeof Y.value<"u"?Y.value:N[Y];if(!(S&&ie===null)){var H=O&&C?String(Y).replace(/\./g,"%2E"):String(Y),ye=i(N)?typeof y=="function"?y(F,H):F:F+(O?"."+H:"["+H+"]");L.set(h,M);var Ee=e();Ee.set(p,L),s(X,g(ie,ye,y,b,T,w,S,C,y==="comma"&&D&&i(N)?null:R,I,A,O,j,V,P,D,_,Ee))}}return X},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 Ru=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 j=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&"),j.length>0?V+j:""},Ru}var ku,Sy;function sz(){if(Sy)return ku;Sy=1;var e=X1(),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(j){return m.decoder(j,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 ku=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)},ku}var Pu,Ty;function lz(){if(Ty)return Pu;Ty=1;var e=az(),t=sz(),n=Dp();return Pu={formats:n,parse:t,stringify:e},Pu}var cz=lz(),We;(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})(We||(We={}));var Ey;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Ey||(Ey={}));const fe=We.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=We.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,We.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 pa=(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,We.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${We.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${We.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${We.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}"`:We.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,We.assertNever(e)}return{message:n}};let uz=pa;function Md(){return uz}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 ce(e,t){const n=Md(),r=Dd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===pa?void 0:pa].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 Re;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 Re;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 Re=Object.freeze({status:"aborted"}),_i=e=>({status:"dirty",value:e}),Gt=e=>({status:"valid",value:e}),Cy=e=>e.status==="aborted",Ry=e=>e.status==="dirty",Qo=e=>e.status==="valid",zs=e=>typeof Promise<"u"&&e instanceof Promise;function $s(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 Q1(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 ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var Oi,Mi;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 ky=(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 Ie(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 Fe{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(zs(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 ky(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(zs(o)?o:Promise.resolve(o));return ky(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 ma.create(this,this._def)}or(t){return Ws.create([this,t],this._def)}and(t){return qs.create(this,t,this._def)}transform(t){return new Kn({...Ie(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Zs({...Ie(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new nS({typeName:Te.ZodBranded,type:this,...Ie(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Xs({...Ie(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 Ol.create(this,t)}readonly(){return Qs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const dz=/^c[^\s-]{8,}$/i,fz=/^[0-9a-z]+$/,pz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hz=/^[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,mz=/^[a-z0-9_-]{21}$/i,gz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vz=/^[-+]?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)?)??$/,yz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Au;const bz=/^(?:(?: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])$/,wz=/^(?:(?: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])$/,Sz=/^(([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]))$/,Tz=/^(([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])$/,Ez=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,J1="((\\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])))",Rz=new RegExp(`^${J1}$`);function eS(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 kz(e){return new RegExp(`^${eS(e)}$`)}function Pz(e){let t=`${J1}T${eS(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 Az(e,t){return!!((t==="v4"||!t)&&bz.test(e)||(t==="v6"||!t)&&Sz.test(e))}function Iz(e,t){if(!gz.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 _z(e,t){return!!((t==="v4"||!t)&&wz.test(e)||(t==="v6"||!t)&&Tz.test(e))}class Bn extends Fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),Re}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),ce(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),ce(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?ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ce(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")yz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Au||(Au=new RegExp(xz,"u")),Au.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")hz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")mz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")dz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")fz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")pz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(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),ce(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),ce(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),ce(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),ce(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),ce(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Pz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Rz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?kz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?vz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Az(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Iz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?_z(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Ez.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Cz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):We.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,...ve.errToObj(r)})}_addCheck(t){return new Bn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.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,...ve.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,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.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,...Ie(e)})};function Oz(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 Fe{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 ce(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),Re}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?We.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ce(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),ce(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),ce(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Oz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ce(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),ce(r,{code:re.not_finite,message:i.message}),o.dirty()):We.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Xr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.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"&&We.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,...Ie(e)});class Jo extends Fe{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),ce(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),ce(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),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):We.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),Re}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.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:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.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,...Ie(e)})};class jd extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),Re}return Gt(t.data)}}jd.create=e=>new jd({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class ha extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),Re}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_date}),Re}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),ce(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),ce(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):We.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ha({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.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}}ha.create=e=>new ha({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Ie(e)});class Nd extends Fe{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),Re}return Gt(t.data)}}Nd.create=e=>new Nd({typeName:Te.ZodSymbol,...Ie(e)});class Bs extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),Re}return Gt(t.data)}}Bs.create=e=>new Bs({typeName:Te.ZodUndefined,...Ie(e)});class Hs extends Fe{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),Re}return Gt(t.data)}}Hs.create=e=>new Hs({typeName:Te.ZodNull,...Ie(e)});class Fd extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Gt(t.data)}}Fd.create=e=>new Fd({typeName:Te.ZodAny,...Ie(e)});class _o extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Gt(t.data)}}_o.create=e=>new _o({typeName:Te.ZodUnknown,...Ie(e)});class gr extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),Re}}gr.create=e=>new gr({typeName:Te.ZodNever,...Ie(e)});class Ld extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),Re}return Gt(t.data)}}Ld.create=e=>new Ld({typeName:Te.ZodVoid,...Ie(e)});class Dn extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ce(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),Re;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ce(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&&(ce(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&&(ce(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:ve.toString(n)}})}max(t,n){return new Dn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Dn({...this._def,exactLength:{value:t,message:ve.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,...Ie(t)});function yo(e){if(e instanceof yt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hn.create(yo(r))}return new yt({...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 yt extends Fe{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=We.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ce(c,{code:re.invalid_type,expected:fe.object,received:c.parsedType}),Re}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&&(ce(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 ve.errToObj,new yt({...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=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new yt({...this._def,unknownKeys:"strip"})}passthrough(){return new yt({...this._def,unknownKeys:"passthrough"})}extend(t){return new yt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new yt({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 yt({...this._def,catchall:t})}pick(t){const n={};return We.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}omit(t){const n={};return We.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}deepPartial(){return yo(this)}partial(t){const n={};return We.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new yt({...this._def,shape:()=>n})}required(t){const n={};return We.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 yt({...this._def,shape:()=>n})}keyof(){return tS(We.objectKeys(this.shape))}}yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ie(t)});yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:Te.ZodObject,...Ie(t)});yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ie(t)});class Ws extends Fe{_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 ce(n,{code:re.invalid_union,unionErrors:a}),Re}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 ce(n,{code:re.invalid_union,unionErrors:s}),Re}}get options(){return this._def.options}}Ws.create=(e,t)=>new Ws({options:e,typeName:Te.ZodUnion,...Ie(t)});const $n=e=>e instanceof Ys?$n(e.schema):e instanceof Kn?$n(e.innerType()):e instanceof Gs?[e.value]:e instanceof Qr?e.options:e instanceof Ks?We.objectValues(e.enum):e instanceof Zs?$n(e._def.innerType):e instanceof Bs?[void 0]:e instanceof Hs?[null]:e instanceof Hn?[void 0,...$n(e.unwrap())]:e instanceof Jr?[null,...$n(e.unwrap())]:e instanceof nS||e instanceof Qs?$n(e.unwrap()):e instanceof Xs?$n(e._def.innerType):[];class jp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ce(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),Re;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}):(ce(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Re)}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 jp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ie(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=We.objectKeys(t),i=We.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 qs extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(Cy(i)||Cy(a))return Re;const s=Vd(i.value,a.value);return s.valid?((Ry(i)||Ry(a))&&n.dirty(),{status:n.value,value:s.data}):(ce(r,{code:re.invalid_intersection_types}),Re)};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}))}}qs.create=(e,t,n)=>new qs({left:e,right:t,typeName:Te.ZodIntersection,...Ie(n)});class Gn extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ce(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),Re;if(r.data.length<this._def.items.length)return ce(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Re;!this._def.rest&&r.data.length>this._def.items.length&&(ce(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,...Ie(t)})};class Us extends Fe{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 ce(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),Re;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 Fe?new Us({keyType:t,valueType:n,typeName:Te.ZodRecord,...Ie(r)}):new Us({keyType:Bn.create(),valueType:t,typeName:Te.ZodRecord,...Ie(n)})}}class zd extends Fe{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 ce(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),Re;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 Re;(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 Re;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}zd.create=(e,t,n)=>new zd({valueType:t,keyType:e,typeName:Te.ZodMap,...Ie(n)});class ei extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ce(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),Re;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ce(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&&(ce(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 Re;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:ve.toString(n)}})}max(t,n){return new ei({...this._def,maxSize:{value:t,message:ve.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,...Ie(t)});class Yi extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ce(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),Re;function r(s,l){return Dd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),pa].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(),pa].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 ma){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 Yi({...this._def,args:Gn.create(t).rest(_o.create())})}returns(t){return new Yi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Yi({args:t||Gn.create([]).rest(_o.create()),returns:n||_o.create(),typeName:Te.ZodFunction,...Ie(r)})}}class Ys extends Fe{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})}}Ys.create=(e,t)=>new Ys({getter:e,typeName:Te.ZodLazy,...Ie(t)});class Gs extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ce(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Re}return{status:"valid",value:t.data}}get value(){return this._def.value}}Gs.create=(e,t)=>new Gs({value:e,typeName:Te.ZodLiteral,...Ie(t)});function tS(e,t){return new Qr({values:e,typeName:Te.ZodEnum,...Ie(t)})}class Qr extends Fe{constructor(){super(...arguments),Oi.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{expected:We.joinValues(r),received:n.parsedType,code:re.invalid_type}),Re}if($s(this,Oi)||Q1(this,Oi,new Set(this._def.values)),!$s(this,Oi).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{received:n.data,code:re.invalid_enum_value,options:r}),Re}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})}}Oi=new WeakMap;Qr.create=tS;class Ks extends Fe{constructor(){super(...arguments),Mi.set(this,void 0)}_parse(t){const n=We.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=We.objectValues(n);return ce(r,{expected:We.joinValues(o),received:r.parsedType,code:re.invalid_type}),Re}if($s(this,Mi)||Q1(this,Mi,new Set(We.getValidEnumValues(this._def.values))),!$s(this,Mi).has(t.data)){const o=We.objectValues(n);return ce(r,{received:r.data,code:re.invalid_enum_value,options:o}),Re}return Gt(t.data)}get enum(){return this._def.values}}Mi=new WeakMap;Ks.create=(e,t)=>new Ks({values:e,typeName:Te.ZodNativeEnum,...Ie(t)});class ma extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ce(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),Re;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})))}}ma.create=(e,t)=>new ma({type:e,typeName:Te.ZodPromise,...Ie(t)});class Kn extends Fe{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=>{ce(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 Re;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Re:l.status==="dirty"||n.value==="dirty"?_i(l.value):l});{if(n.value==="aborted")return Re;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Re:s.status==="dirty"||n.value==="dirty"?_i(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"?Re:(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"?Re:(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);We.assertNever(o)}}Kn.create=(e,t,n)=>new Kn({schema:e,typeName:Te.ZodEffects,effect:t,...Ie(n)});Kn.createWithPreprocess=(e,t,n)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Ie(n)});class Hn extends Fe{_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,...Ie(t)});class Jr extends Fe{_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,...Ie(t)});class Zs extends Fe{_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}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ie(t)});class Xs extends Fe{_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 zs(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}}Xs.create=(e,t)=>new Xs({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ie(t)});class $d extends Fe{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),Re}return{status:"valid",value:t.data}}}$d.create=e=>new $d({typeName:Te.ZodNaN,...Ie(e)});class nS extends Fe{_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 Ol extends Fe{_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"?Re:i.status==="dirty"?(n.dirty(),_i(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"?Re: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 Ol({in:t,out:n,typeName:Te.ZodPipeline})}}class Qs extends Fe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Qo(o)&&(o.value=Object.freeze(o.value)),o);return zs(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Qs.create=(e,t)=>new Qs({innerType:e,typeName:Te.ZodReadonly,...Ie(t)});yt.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;$d.create;Jo.create;jd.create;ha.create;Nd.create;Bs.create;Hs.create;Fd.create;_o.create;gr.create;Ld.create;Dn.create;yt.create;yt.strictCreate;Ws.create;jp.create;qs.create;Gn.create;Us.create;zd.create;ei.create;Yi.create;Ys.create;Gs.create;Qr.create;Ks.create;ma.create;Kn.create;Hn.create;Jr.create;Kn.createWithPreprocess;Ol.create;const Mz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Dz=(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]}}},rS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),hn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):rS(t),o=structuredClone(e);return Dz(o,r,n),o},jz=(e,t)=>e.localeCompare(t),Ri={},oS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return iS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=oS(e._def.innerType);return t==="ZodArray"?n??[]:n}},iS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,oS(n)])),aS=(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]=aS(i,o):n[r]=o||i)}return n},Nz={sort:jz,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},sS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return cz.parse(n.toString(),Nz)},Dr=(e,t)=>rS(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)},Fz={state:{},loading:!1,useOnChange:!1},Py=e=>e.dataset.target||e.name,Lz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Ui.LocalStorage.get(t);return Mz(n)?n:{}},clear:()=>void Ui.LocalStorage.delete(t),set:n=>Ui.LocalStorage.set(t,n)}},Vz=(e,t,n=Fz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>et.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??iS(e)??{}),l=E.useCallback(y=>{var I;const b=y.target,T=y.currentTarget;if(b.dataset.optional==="true")return;const S=Py(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(j=>hn(j??{},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 j=I.dataset.name||I.name||"";return hn(C,j,O)},{}),S=et.empty(w)?null:w;o(S),console.error(S),y==null||y({form:T,errors:S||{}})},[]),u=(y,b=Ri)=>{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:et.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=Ri)=>{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:Rr(r,y,void 0),value:Rr(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=Ri)=>{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:Rr(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=Ri)=>{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:Rr(r,y,void 0),required:b.required??!T.isOptional(),value:Rr(a,y,void 0)||(b==null?void 0:b.value)||"",type:et.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=Ri)=>{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:Rr(r,y,void 0),required:b.required??!T.isOptional(),type:w?"number":(b==null?void 0:b.type)??"text",value:Rr(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 _;const j=Py(O.target);if(!j)return!1;const V=O.target,P=Iu(O.target)||(O.relatedTarget?sr(O.relatedTarget):""),D=T.schema.safeParse(P);if(V.setAttribute("value",P),D.success)return w.setCustomValidity(""),o(L=>{if(et.null(L))return null;const N=hn(L,j,void 0);return et.empty(L)||et.nil(L)||et.empty(N)?null:N}),!1;if(w.required){const L=((_=D.error.issues[0])==null?void 0:_.message)||"";w.setCustomValidity(L),o(N=>{if(et.null(N))return null;const z=hn(N,j,L||void 0);return et.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=sS(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(O=>{if(O.tagName==="SELECT"){const j=O;w=hn(w,j.name,j.value)}if(O.tagName==="INPUT"){const j=O,V=Iu(j)||(j?sr(j):"");w=hn(w,j.dataset.target||j.name,V)}});const C=aS(w,a),R=e.safeParse(C),I=()=>{var O;Z1(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(j=>String(j))}))})},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}},zz=e=>e?JSON.parse(e.getAttribute("data-json")):{},$z=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},lS={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},cS={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"},uS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Bz={name:"dark",zIndex:uS,rounded:lS,spacing:cS,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%)"}}}},Hz={rounded:lS,spacing:cS,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:uS,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%)"}}}},Wz=Bz,qz=Hz,Uz=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...gl,...e.tweaks},parser:e.parser||hl.hsla,map:{...ml,...e.map}}),[e]);return x.jsx(ci.Provider,{value:t,children:e.children})},Yz=()=>{const e=E.useContext(ci);return e?e.parser:hl.hsla};exports.Alert=BA;exports.Autocomplete=zF;exports.Button=Oo;exports.Calendar=C0;exports.Card=Vf;exports.Checkbox=Cp;exports.ColType=Io;exports.Collapse=Gb;exports.ComponentsProvider=Uz;exports.Context=ci;exports.DatePicker=BF;exports.Dropdown=gi;exports.Empty=R0;exports.Expand=Fj;exports.FileUpload=tL;exports.Form=nL;exports.Input=_a;exports.InputFeedback=u1;exports.InputField=Ia;exports.Menu=zj;exports.MenuItem=Vj;exports.Modal=Xj;exports.MultiSelect=uL;exports.Notifications=FM;exports.Polymorph=cn;exports.Radiobox=dL;exports.RenderOnView=WT;exports.Select=Kr;exports.Slider=YL;exports.Stats=LM;exports.Switch=GL;exports.Tab=$M;exports.Table=oz;exports.Tabs=VM;exports.Tag=Ud;exports.TaskList=KL;exports.Textarea=ZL;exports.Timeline=BM;exports.TimelineItem=xl;exports.Toolbar=Qj;exports.Tooltip=ap;exports.TransferList=JL;exports.createColumns=EV;exports.createCssProperties=IO;exports.createDesignTokens=b0;exports.createFormStorage=Lz;exports.createOptionCols=_p;exports.createStyles=kO;exports.createTheme=AO;exports.createTokenStyles=_O;exports.css=Ne;exports.defaultDarkTheme=Wz;exports.defaultLightTheme=qz;exports.defaultTranslations=ml;exports.defaultTweaks=gl;exports.dispatchInput=Zy;exports.formReset=Z1;exports.formToJson=sS;exports.getJsonForm=zz;exports.getRemainingSize=Gi;exports.getSchemaShape=Dr;exports.hasVerticalScroll=Xy;exports.initializeInputDataset=va;exports.isMobile=S0;exports.isReactComponent=VT;exports.isReactFC=zT;exports.isSsr=qr;exports.mergeRefs=ii;exports.negate=MO;exports.noop=Lf;exports.parsers=hl;exports.path=Ff;exports.reduceTokens=jr;exports.safeRegex=rd;exports.splitInto=w0;exports.useColorParser=Yz;exports.useForm=Vz;exports.useLocale=Nf;exports.useNotification=jM;exports.usePrevious=$z;exports.useReactive=K0;exports.useTablePreferences=kV;exports.useTranslations=_t;exports.uuid=ui;
|
|
190
|
+
*/var pu,zv;function QF(){if(zv)return pu;zv=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 Rp(){if($v)return hu;$v=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hu=e,hu}var mu,Bv;function p1(){return Bv||(Bv=1,mu=Function.call.bind(Object.prototype.hasOwnProperty)),mu}var gu,Hv;function JF(){if(Hv)return gu;Hv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Rp(),n={},r=p1();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,Wv;function e2(){if(Wv)return vu;Wv=1;var e=f1(),t=QF(),n=Rp(),r=p1(),o=JF(),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 B=M&&(c&&M[c]||M[u]);if(typeof B=="function")return B}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:j,exact:V};function m(M,B){return M===B?M!==0||1/M===1/B:M!==M&&B!==B}function g(M,B){this.message=M,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function h(M){if(process.env.NODE_ENV!=="production")var B={},Q=0;function ee(Z,G,K,F,$,Y,ie){if(F=F||p,Y=Y||K,ie!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=F+":"+K;!B[ye]&&Q<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."),B[ye]=!0,Q++)}}return G[K]==null?Z?G[K]===null?new g("The "+$+" `"+Y+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new g("The "+$+" `"+Y+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:M(G,K,F,$,Y)}var X=ee.bind(null,!1);return X.isRequired=ee.bind(null,!0),X}function v(M){function B(Q,ee,X,Z,G,K){var F=Q[ee],$=_(F);if($!==M){var Y=L(F);return new g("Invalid "+Z+" `"+G+"` of type "+("`"+Y+"` supplied to `"+X+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return h(B)}function y(){return h(a)}function b(M){function B(Q,ee,X,Z,G){if(typeof M!="function")return new g("Property `"+G+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var K=Q[ee];if(!Array.isArray(K)){var F=_(K);return new g("Invalid "+Z+" `"+G+"` of type "+("`"+F+"` supplied to `"+X+"`, expected an array."))}for(var $=0;$<K.length;$++){var Y=M(K,$,X,Z,G+"["+$+"]",n);if(Y instanceof Error)return Y}return null}return h(B)}function T(){function M(B,Q,ee,X,Z){var G=B[Q];if(!s(G)){var K=_(G);return new g("Invalid "+X+" `"+Z+"` of type "+("`"+K+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return h(M)}function w(){function M(B,Q,ee,X,Z){var G=B[Q];if(!e.isValidElementType(G)){var K=_(G);return new g("Invalid "+X+" `"+Z+"` of type "+("`"+K+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return h(M)}function S(M){function B(Q,ee,X,Z,G){if(!(Q[ee]instanceof M)){var K=M.name||p,F=z(Q[ee]);return new g("Invalid "+Z+" `"+G+"` of type "+("`"+F+"` supplied to `"+X+"`, expected ")+("instance of `"+K+"`."))}return null}return h(B)}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 B(Q,ee,X,Z,G){for(var K=Q[ee],F=0;F<M.length;F++)if(m(K,M[F]))return null;var $=JSON.stringify(M,function(ie,H){var ye=L(H);return ye==="symbol"?String(H):H});return new g("Invalid "+Z+" `"+G+"` of value `"+String(K)+"` "+("supplied to `"+X+"`, expected one of "+$+"."))}return h(B)}function R(M){function B(Q,ee,X,Z,G){if(typeof M!="function")return new g("Property `"+G+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var K=Q[ee],F=_(K);if(F!=="object")return new g("Invalid "+Z+" `"+G+"` of type "+("`"+F+"` supplied to `"+X+"`, expected an object."));for(var $ in K)if(r(K,$)){var Y=M(K,$,X,Z,G+"."+$,n);if(Y instanceof Error)return Y}return null}return h(B)}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 B=0;B<M.length;B++){var Q=M[B];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+N(Q)+" at index "+B+"."),a}function ee(X,Z,G,K,F){for(var $=[],Y=0;Y<M.length;Y++){var ie=M[Y],H=ie(X,Z,G,K,F,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&$.push(H.data.expectedType)}var ye=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new g("Invalid "+K+" `"+F+"` supplied to "+("`"+G+"`"+ye+"."))}return h(ee)}function A(){function M(B,Q,ee,X,Z){return P(B[Q])?null:new g("Invalid "+X+" `"+Z+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return h(M)}function O(M,B,Q,ee,X){return new g((M||"React class")+": "+B+" type `"+Q+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function j(M){function B(Q,ee,X,Z,G){var K=Q[ee],F=_(K);if(F!=="object")return new g("Invalid "+Z+" `"+G+"` of type `"+F+"` "+("supplied to `"+X+"`, expected `object`."));for(var $ in M){var Y=M[$];if(typeof Y!="function")return O(X,Z,G,$,L(Y));var ie=Y(K,$,X,Z,G+"."+$,n);if(ie)return ie}return null}return h(B)}function V(M){function B(Q,ee,X,Z,G){var K=Q[ee],F=_(K);if(F!=="object")return new g("Invalid "+Z+" `"+G+"` of type `"+F+"` "+("supplied to `"+X+"`, expected `object`."));var $=t({},Q[ee],M);for(var Y in $){var ie=M[Y];if(r(M,Y)&&typeof ie!="function")return O(X,Z,G,Y,L(ie));if(!ie)return new g("Invalid "+Z+" `"+G+"` key `"+Y+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(Q[ee],null," ")+`
|
|
191
|
+
Valid keys: `+JSON.stringify(Object.keys(M),null," "));var H=ie(K,Y,X,Z,G+"."+Y,n);if(H)return H}return null}return h(B)}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 B=d(M);if(B){var Q=B.call(M),ee;if(B!==M.entries){for(;!(ee=Q.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=Q.next()).done;){var X=ee.value;if(X&&!P(X[1]))return!1}}else return!1;return!0;default:return!1}}function D(M,B){return M==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function _(M){var B=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":D(B,M)?"symbol":B}function L(M){if(typeof M>"u"||M===null)return""+M;var B=_(M);if(B==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return B}function N(M){var B=L(M);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}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,qv;function t2(){if(qv)return yu;qv=1;var e=Rp();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 Uv;function n2(){if(Uv)return Xa.exports;if(Uv=1,process.env.NODE_ENV!=="production"){var e=f1(),t=!0;Xa.exports=e2()(e.isElement,t)}else Xa.exports=t2()();return Xa.exports}var r2=n2();const rt=Oy(r2);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 o2=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=i2(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Yv(r,"path",i),Yv(r,"relativePath",i),r}function i2(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=o2.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Yv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const a2=[".DS_Store","Thumbs.db"];function s2(e){return lo(this,void 0,void 0,function*(){return Ns(e)&&l2(e.dataTransfer)?f2(e.dataTransfer,e.type):c2(e)?u2(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?d2(e):[]})}function l2(e){return Ns(e)}function c2(e){return Ns(e)&&Ns(e.target)}function Ns(e){return typeof e=="object"&&e!==null}function u2(e){return Sd(e.target.files).map(t=>Zo(t))}function d2(e){return lo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Zo(n))})}function f2(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(p2));return Gv(h1(r))}return Gv(Sd(e.files).map(n=>Zo(n)))})}function Gv(e){return e.filter(t=>a2.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 p2(e){if(typeof e.webkitGetAsEntry!="function")return Kv(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?m1(t):Kv(e,t)}function h1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?h1(n):[n]],[])}function Kv(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 h2(e){return lo(this,void 0,void 0,function*(){return e.isDirectory?m1(e):m2(e)})}function m1(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(h2));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function m2(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 Ja={},Zv;function g2(){return Zv||(Zv=1,Ja.__esModule=!0,Ja.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}),Ja}var v2=g2();const xu=Oy(v2);function Xv(e){return b2(e)||x2(e)||v1(e)||y2()}function y2(){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 x2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function b2(e){if(Array.isArray(e))return Td(e)}function Qv(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 Jv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qv(Object(n),!0).forEach(function(r){g1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fa(e,t){return T2(e)||S2(e,t)||v1(e,t)||w2()}function w2(){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 v1(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 S2(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 T2(e){if(Array.isArray(e))return e}var E2=typeof xu=="function"?xu:xu.default,C2="file-invalid-type",R2="file-too-large",k2="file-too-small",P2="too-many-files",A2=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:C2,message:"File type must be ".concat(r)}},ey=function(t){return{code:R2,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ty=function(t){return{code:k2,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},I2={code:P2,message:"Too many files"};function y1(e,t){var n=e.type==="application/x-moz-file"||E2(e,t);return[n,n?null:A2(t)]}function x1(e,t,n){if(Nr(e.size))if(Nr(t)&&Nr(n)){if(e.size>n)return[!1,ey(n)];if(e.size<t)return[!1,ty(t)]}else{if(Nr(t)&&e.size<t)return[!1,ty(t)];if(Nr(n)&&e.size>n)return[!1,ey(n)]}return[!0,null]}function Nr(e){return e!=null}function _2(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=y1(l,n),u=fa(c,1),d=u[0],p=x1(l,r,o),f=fa(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function Fs(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function es(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 ny(e){e.preventDefault()}function O2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function M2(e){return e.indexOf("Edge/")!==-1}function D2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return O2(e)||M2(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!Fs(r)&&s&&s.apply(void 0,[r].concat(i)),Fs(r)})}}function j2(){return"showOpenFilePicker"in window}function N2(e){if(Nr(e)){var t=Object.entries(e).filter(function(n){var r=fa(n,2),o=r[0],i=r[1],a=!0;return b1(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(w1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=fa(r,2),i=o[0],a=o[1];return Jv(Jv({},n),{},g1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function F2(e){if(Nr(e))return Object.entries(e).reduce(function(t,n){var r=fa(n,2),o=r[0],i=r[1];return[].concat(Xv(t),[o],Xv(i))},[]).filter(function(t){return b1(t)||w1(t)}).join(",")}function L2(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function V2(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function b1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function w1(e){return/^.*\.[\w]+$/.test(e)}var z2=["children"],$2=["open"],B2=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],H2=["refKey","onChange","onClick"];function W2(e){return Y2(e)||U2(e)||S1(e)||q2()}function q2(){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 U2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y2(e){if(Array.isArray(e))return Ed(e)}function bu(e,t){return Z2(e)||K2(e,t)||S1(e,t)||G2()}function G2(){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 S1(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 K2(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 Z2(e){if(Array.isArray(e))return e}function ry(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 pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(n),!0).forEach(function(r){Cd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ry(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 Ls(e,t){if(e==null)return{};var n=X2(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 X2(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=Ls(e,z2),o=E1(r),i=o.open,a=Ls(o,$2);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(pt(pt({},a),{},{open:i})))});kp.displayName="Dropzone";var T1={disabled:!1,getFilesFromEvent:s2,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=T1;kp.propTypes={children:rt.func,accept:rt.objectOf(rt.arrayOf(rt.string)),multiple:rt.bool,preventDropOnDocument:rt.bool,noClick:rt.bool,noKeyboard:rt.bool,noDrag:rt.bool,noDragEventsBubbling:rt.bool,minSize:rt.number,maxSize:rt.number,maxFiles:rt.number,disabled:rt.bool,getFilesFromEvent:rt.func,onFileDialogCancel:rt.func,onFileDialogOpen:rt.func,useFsAccessApi:rt.bool,autoFocus:rt.bool,onDragEnter:rt.func,onDragLeave:rt.func,onDragOver:rt.func,onDrop:rt.func,onDropAccepted:rt.func,onDropRejected:rt.func,onError:rt.func,validator:rt.func};var Rd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function E1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=pt(pt({},T1),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 F2(n)},[n]),O=E.useMemo(function(){return N2(n)},[n]),j=E.useMemo(function(){return typeof h=="function"?h:oy},[h]),V=E.useMemo(function(){return typeof g=="function"?g:oy},[g]),P=E.useRef(null),D=E.useRef(null),_=E.useReducer(Q2,Rd),L=bu(_,2),N=L[0],z=L[1],M=N.isFocused,B=N.isFileDialogActive,Q=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&j2()),ee=function(){!Q.current&&B&&setTimeout(function(){if(D.current){var te=D.current.files;te.length||(z({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[D,B,V,Q]);var X=E.useRef([]),Z=function(te){P.current&&P.current.contains(te.target)||(te.preventDefault(),X.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",ny,!1),document.addEventListener("drop",Z,!1)),function(){b&&(document.removeEventListener("dragover",ny),document.removeEventListener("drop",Z))}},[P,b]),E.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var G=E.useCallback(function(q){R?R(q):console.error(q)},[R]),K=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),X.current=[].concat(W2(X.current),[q.target]),es(q)&&Promise.resolve(o(q)).then(function(te){if(!(Fs(q)&&!C)){var he=te.length,_e=he>0&&_2({files:te,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Be=he>0&&!_e;z({isDragAccept:_e,isDragReject:Be,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(te){return G(te)})},[o,c,G,C,A,a,i,s,l,I]),F=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=es(q);if(te&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return te&&d&&d(q),!1},[d,C]),$=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=X.current.filter(function(_e){return P.current&&P.current.contains(_e)}),he=te.indexOf(q.target);he!==-1&&te.splice(he,1),X.current=te,!(te.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),es(q)&&u&&u(q))},[P,u,C]),Y=E.useCallback(function(q,te){var he=[],_e=[];q.forEach(function(Be){var Ye=y1(Be,A),Ot=bu(Ye,2),fn=Ot[0],Tn=Ot[1],Xn=x1(Be,a,i),Qn=bu(Xn,2),Jn=Qn[0],W=Qn[1],U=I?I(Be):null;if(fn&&Jn&&!U)he.push(Be);else{var ze=[Tn,W];U&&(ze=ze.concat(U)),_e.push({file:Be,errors:ze.filter(function(Je){return Je})})}}),(!s&&he.length>1||s&&l>=1&&he.length>l)&&(he.forEach(function(Be){_e.push({file:Be,errors:[I2]})}),he.splice(0)),z({acceptedFiles:he,fileRejections:_e,isDragReject:_e.length>0,type:"setFiles"}),p&&p(he,_e,te),_e.length>0&&m&&m(_e,te),he.length>0&&f&&f(he,te)},[z,s,A,a,i,l,p,f,m,I]),ie=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),X.current=[],es(q)&&Promise.resolve(o(q)).then(function(te){Fs(q)&&!C||Y(te,q)}).catch(function(te){return G(te)}),z({type:"reset"})},[o,Y,G,C]),H=E.useCallback(function(){if(Q.current){z({type:"openDialog"}),j();var q={multiple:s,types:O};window.showOpenFilePicker(q).then(function(te){return o(te)}).then(function(te){Y(te,null),z({type:"closeDialog"})}).catch(function(te){L2(te)?(V(te),z({type:"closeDialog"})):V2(te)?(Q.current=!1,D.current?(D.current.value=null,D.current.click()):G(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."))):G(te)});return}D.current&&(z({type:"openDialog"}),j(),D.current.value=null,D.current.click())},[z,j,V,v,Y,G,O,s]),ye=E.useCallback(function(q){!P.current||!P.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),H())},[P,H]),Ee=E.useCallback(function(){z({type:"focus"})},[]),ke=E.useCallback(function(){z({type:"blur"})},[]),Ve=E.useCallback(function(){T||(D2()?setTimeout(H,0):H())},[T,H]),se=function(te){return r?null:te},xe=function(te){return w?null:se(te)},le=function(te){return S?null:se(te)},be=function(te){C&&te.stopPropagation()},oe=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,he=te===void 0?"ref":te,_e=q.role,Be=q.onKeyDown,Ye=q.onFocus,Ot=q.onBlur,fn=q.onClick,Tn=q.onDragEnter,Xn=q.onDragOver,Qn=q.onDragLeave,Jn=q.onDrop,W=Ls(q,B2);return pt(pt(Cd({onKeyDown:xe(En(Be,ye)),onFocus:xe(En(Ye,Ee)),onBlur:xe(En(Ot,ke)),onClick:se(En(fn,Ve)),onDragEnter:le(En(Tn,K)),onDragOver:le(En(Xn,F)),onDragLeave:le(En(Qn,$)),onDrop:le(En(Jn,ie)),role:typeof _e=="string"&&_e!==""?_e:"presentation"},he,P),!r&&!w?{tabIndex:0}:{}),W)}},[P,ye,Ee,ke,Ve,K,F,$,ie,w,S,r]),ue=E.useCallback(function(q){q.stopPropagation()},[]),J=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,he=te===void 0?"ref":te,_e=q.onChange,Be=q.onClick,Ye=Ls(q,H2),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:se(En(_e,ie)),onClick:se(En(Be,ue)),tabIndex:-1},he,D);return pt(pt({},Ot),Ye)}},[D,n,s,ie,r]);return pt(pt({},N),{},{isFocused:M&&!r,getRootProps:oe,getInputProps:J,rootRef:P,inputRef:D,open:se(H)})}function Q2(e,t){switch(t.type){case"focus":return pt(pt({},e),{},{isFocused:!0});case"blur":return pt(pt({},e),{},{isFocused:!1});case"openDialog":return pt(pt({},Rd),{},{isFileDialogActive:!0});case"closeDialog":return pt(pt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return pt(pt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return pt(pt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return pt({},Rd);default:return e}}function oy(){}const J2={isImage:e=>e.type.includes("image")},eL=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(J2.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Nv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Nv(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(Ub,{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"})})]})},tL=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(eL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),nL=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(tL,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),rL=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(zA,{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"})]})]}),oL=({idle:e=rL,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}=E1({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(nL,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},iL=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 $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 iy=40,aL=e=>x.jsx(E.Fragment,{children:e.children}),sL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},lL={caseSensitive:!1,sort:!1},ay=[],cL=E.forwardRef(function(t,n){return x.jsx(ft.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})})}),uL=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),dL={List:cL,Item:uL},fL=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})},pL=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 $r(r.map(J=>[J.value,J])),[r]),b=E.useRef(null),T=E.useRef(null),w=h.value??h.defaultValue??ay,S=_t(),[C,R]=E.useState(0),[I,A]=E.useState(!1),[O,j]=E.useState(""),[V,P]=E.useState(()=>{const J=new $r;return w.forEach(q=>{const te=y.get(q);return te?J.set(q,te):void 0}),J}),D=E.useMemo(()=>Array.from(V.keys()),[V]),[_,L]=E.useState(()=>{const J=new Set(w);return r.reduce((q,te)=>J.has(te.value)?[...q,te.label??te.value]:q,[])??w}),[N,z]=E.useState(null),M=E.useRef(ay),B=m&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...r]:r,Q=new Vr(B,["value","label"],lL).search(O),ee=ip(I,"block-only"),X=Q.filter(J=>J.hidden!==!0),Z=X.length===0,{x:G,y:K,strategy:F,refs:$,context:Y}=oo({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:A,whileElementsMounted:Ta,middleware:[Ea(4),mw({padding:10,elementContext:"reference",apply(J){const q=J.elements.floating.querySelector("ul"),te=(q==null?void 0:q.getBoundingClientRect().height)||0,he=Gi($.reference.current,window.innerHeight),_e=Math.min(te<iy?he:te,he,J.availableHeight),Be=X.length===0?iy:Math.min(_e,he,te),Ye=`${b.current.getBoundingClientRect().width}px`;Object.assign(J.elements.floating.style,{width:Ye,maxWidth:Ye,height:Be})}})]}),ie=_w(Y,sL),{getReferenceProps:H,getFloatingProps:ye,getItemProps:Ee}=io([ao(Y,{role:"listbox"}),ro(Y),op(Y,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:N,selectedIndex:N,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:J=>z(q=>J??q)})]);E.useEffect(()=>{if(!I)return R(0);const J=$.reference;if(J.current===null)return;const q=Gi(J.current,window.innerHeight);setTimeout(()=>R(Math.min(q,X.length*40)),100)},[O,I,$.reference]),E.useEffect(()=>{h.value&&P(new $r(h.value.map(J=>[J,y.get(J)])))},[h.value,y]),E.useEffect(()=>{const J=$.reference.current;if(J)return va(J)},[]);const ke=(J,q)=>{const te=V.clone(Be=>Be.has(J.value)?Be.remove(J.value):Be.set(J.value,J));P(te);const he=$.reference.current;if(!he)return;const _e=te.map(Be=>Be.value);he==null||he.setAttribute("data-value",JSON.stringify(_e)),g&&g(_e),L(Be=>Be.concat(J.label??"")),j(""),z(q)},Ve=J=>{const q=J.target.value;return j(q),!I&&q===""?A(!0):(J.target.name=h.name||"",q?A(!0):void 0)},se=()=>{var J;A(!0),j(""),(J=$.reference.current)==null||J.focus()},xe=()=>{A(!0),j("")},le=()=>{var J;(J=$.reference.current)==null||J.setAttribute("data-value","[]"),j(""),A(!1),P(new $r),g==null||g([])},be=h.id||h.name,oe=V.map((J,q)=>x.jsx(Ud,{size:"small",icon:x.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:te=>{te.preventDefault(),te.stopPropagation(),ke(J,q),A(!1)},children:x.jsx(dl,{size:14})}),children:J.label??J.value},`MultiSelect-${J.value}-x`)),ue={height:Z?"0":V.size===0?C-49:C-86};return x.jsxs(Ia,{...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:se,children:[x.jsx(kf,{size:20}),x.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),V?x.jsx("button",{type:"button",onClick:le,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("li",{...H({...h,onFocus:xe,id:`${be}-shadow`,name:`${be}-shadow`,ref:$.setReference}),tabIndex:0,role:"button","data-name":be,"data-target":be,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),value:I?O:_||V,className:Ne("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(fL,{label:c,children:oe})}),x.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:v,required:f,defaultValue:h.value||D||void 0}),x.jsx(no,{preserveTabOrder:!0,children:I?x.jsx(mi,{modal:!0,guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...ye({ref:$.setFloating,style:{...ie.styles,top:K??0,position:F,left:G}}),"data-floating":"true",className:"isolate z-floating m-0 max-h-80 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:Ve,title:h.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:J=>{var q,te;if(J.key==="ArrowDown"){let he=N+1;return he>X.length-1&&(he=0),(q=T.current)==null||q.scrollIntoView({index:he}),z(he)}if(J.key==="ArrowUp"){let he=N-1;return he<0&&(he=X.length-1),(te=T.current)==null||te.scrollIntoView({index:he}),z(he)}if(J.key==="Escape")return J.currentTarget.blur(),A(!1);if(J.key==="Enter"){if(N!==null&&X[N])return J.preventDefault(),ke(X[N],N);if(X.length===1)return J.preventDefault(),ke(X[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"}),Z?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,Z?null:x.jsx(ft.div,{initial:!1,"data-floating":"true",ref:ee,animate:{height:Z?"auto":C},style:ue,className:"max-h-80 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return R(0);const q=$.floating.current.querySelectorAll("li").item(0),te=(q?q.getBoundingClientRect().height:40)*X.length;return ga.flushSync(()=>R(te+2))},children:x.jsx(Sp,{ref:T,hidden:Z,data:X,components:dL,style:ue,className:"max-h-80 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(J,q)=>{const te=q.Render??aL,he=V.has(q.value)||V.has(q.label??""),_e=N===J,Be=q.label??q.value;return x.jsxs("button",{"data-value":q.value,...Ee({ref:Ye=>void(M.current[J]=Ye),role:"option",type:"button","aria-checked":he,"aria-current":he,"aria-selected":he,"aria-busy":q.disabled,onClick:()=>ke(q,J)}),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 ${he||_e?"bg-floating-hover text-floating-foreground":""}`,children:[x.jsx(Cp,{onChange:Lf,checked:he,"aria-checked":he,onClick:Ye=>{Ye.stopPropagation(),ke(q,J)}}),x.jsx(te,{...h,label:q.label,value:q.value,children:Be})]})}})}),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:oe})]})}):null})]})}),hL=({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:Ne("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=va(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(Ia,{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(kf,{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:ii(h,y),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Ne("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 C1(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ro(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 sy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function R1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=sy(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():sy(e[o],null)}}}}function Zr(...e){return k.useCallback(R1(...e),e)}function k1(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,mL(o,...t)]}function mL(...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 P1(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 gL({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=vL({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=P1(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 vL({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=P1(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var yL=k.createContext(void 0);function xL(e){const t=k.useContext(yL);return e||t||"ltr"}function bL(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 wL=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function SL(e){const[t,n]=k.useState(void 0);return wL(()=>{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 kd(e){const t=TL(e),n=k.forwardRef((r,o)=>{const{children:i,...a}=r,s=k.Children.toArray(i),l=s.find(CL);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 TL(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const a=kL(o),s=RL(i,o.props);return o.type!==k.Fragment&&(s.ref=r?R1(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 EL=Symbol("radix.slottable");function CL(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===EL}function RL(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 kL(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 PL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Al=PL.reduce((e,t)=>{const n=kd(`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 AL(e){const t=e+"CollectionProvider",[n,r]=k1(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=kd(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=kd(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 A1=["PageUp","PageDown"],I1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},bi="Slider",[Pd,IL,_L]=AL(bi),[O1,e$]=k1(bi,[_L]),[OL,Il]=O1(bi),M1=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"?ML:DL,[T=[],w]=gL({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 j=VL(T,O);A(O,j)}function R(O){A(O,v.current)}function I(){const O=S.current[v.current];T[v.current]!==O&&p(T)}function A(O,j,{commit:V}={commit:!1}){const P=HL(i),D=WL(Math.round((O-r)/i)*i+r,P),_=C1(D,[r,o]);w((L=[])=>{const N=FL(L,_,j);if(BL(N,l*i)){v.current=N.indexOf(_);const z=String(N)!==String(L);return z&&V&&p(N),z?N:L}else return L})}return x.jsx(OL,{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:Ro(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:j})=>{if(!s){const D=A1.includes(O.key)||O.shiftKey&&I1.includes(O.key)?10:1,_=v.current,L=T[_],N=i*D*j;A(L+N,_,{commit:!0})}}})})})})});M1.displayName=bi;var[D1,j1]=O1(bi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ML=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=xL(o),h=g==="ltr",v=h&&!i||!h&&i;function y(b){const T=m.current||d.getBoundingClientRect(),w=[0,T.width],C=Pp(w,v?[n,r]:[r,n]);return m.current=T,C(b-T.left)}return x.jsx(D1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:x.jsx(N1,{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=_1[v?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),DL=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=Pp(v,f?[r,n]:[n,r]);return p.current=h,b(g-h.top)}return x.jsx(D1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:x.jsx(N1,{"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=_1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),N1=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Il(bi,n);return x.jsx(Al.span,{...c,ref:t,onKeyDown:Ro(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):A1.concat(I1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Ro(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:Ro(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Ro(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),F1="SliderTrack",L1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Il(F1,n);return x.jsx(Al.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});L1.displayName=F1;var Ad="SliderRange",V1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Il(Ad,n),i=j1(Ad,n),a=k.useRef(null),s=Zr(t,a),l=o.values.length,c=o.values.map(p=>$1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return x.jsx(Al.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});V1.displayName=Ad;var Id="SliderThumb",z1=k.forwardRef((e,t)=>{const n=IL(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(jL,{...e,ref:i,index:a})}),jL=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=Il(Id,n),s=j1(Id,n),[l,c]=k.useState(null),u=Zr(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=SL(l),f=a.values[r],m=f===void 0?0:$1(f,a.min,a.max),g=LL(r,a.values.length),h=p==null?void 0:p[s.size],v=h?zL(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(Al.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:Ro(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&x.jsx(NL,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});z1.displayName=Id;var NL=e=>{const{value:t,...n}=e,r=k.useRef(null),o=bL(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 FL(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function $1(e,t,n){const i=100/(n-t)*(e-t);return C1(i,[0,100])}function LL(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function VL(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 zL(e,t,n){const r=e/2,i=Pp([0,50],[0,r]);return(r-i(t)*n)*n}function $L(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function BL(e,t){if(t>0){const n=$L(e);return Math.min(...n)>=t}return!0}function Pp(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 HL(e){return(String(e).split(".")[1]||"").length}function WL(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var qL=M1,UL=L1,YL=V1,GL=z1;const KL=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"));et.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(et.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),x.jsx(ap,{title:"",ref:r,as:GL,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})},ZL=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(ui()),s=r||o||[];return x.jsxs(qL,{...i,defaultValue:r,value:o,className:Ne("relative flex h-5 w-full touch-none select-none items-center",n),children:[x.jsx(UL,{className:"relative h-2 grow rounded-full bg-background",children:x.jsx(YL,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>x.jsx(KL,{tooltip:t??!1},`${a.current}-${c}`))]})},XL=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:Ne("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})]})}),QL=e=>{const[t,n]=GP();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:JP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},JL=d1("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)}),eV=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},tV={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"})})},nV=e=>{const t=E.useRef(null),n=eV(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(_a,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(Sp,{height:n,useWindowScroll:!0,data:e.source,components:tV,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(Cp,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Oo,{children:x.jsx(Pf,{})})}),x.jsx("div",{})]})};var rV=Object.defineProperty,ly=Object.getOwnPropertySymbols,oV=Object.prototype.hasOwnProperty,iV=Object.prototype.propertyIsEnumerable,cy=(e,t,n)=>t in e?rV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aV=(e,t)=>{for(var n in t||(t={}))oV.call(t,n)&&cy(e,n,t[n]);if(ly)for(var n of ly(t))iV.call(t,n)&&cy(e,n,t[n]);return e},Ap=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},sV=(e,t,n,r)=>_l(Ap,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]))},lV=(e,t)=>(Xo(e)||Array.isArray(e))&&t?e[t]:e,cV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Vs=e=>/[0-9.]+/.test(e),uy=e=>["string","number"].includes(typeof e),dy=e=>e==null||(e==null?void 0:e.length)===0||e==="",fy={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:dy,notEmpty:e=>!dy(e),in:(e,t)=>Ap(t,n=>ur(e,n)),notIn:(e,t)=>B1(t,n=>!ur(e,n))},uV=e=>{if(e in fy)return fy[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},_l=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=uV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},dV=(e,t,n,r)=>_l(Ao,e,t,n,r),B1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},fV=(e,t,n,r)=>_l(B1,e,t,n,r),H1=e=>{if(e===null)return null;const t=aV({},e);return Object.keys(t).forEach(n=>t[n]=Xo(e[n])?H1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},py=(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},pV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},hV=e=>Ao(e,(t,n,r)=>Xo(t)?n===r.findIndex(o=>ur(o,t)):n===r.indexOf(t)),mV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},W1=(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())},gV=(e,t)=>W1(e,n=>n[t]),hy=(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},vV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},yV=(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 Vs(e)&&Vs(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)&&Vs(e)&&Vs(t)){const o=[],[i,a]=vV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return yV(e,t,r)},xV=(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 uy(e)&&uy(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},my=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},bV=(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)},wV=(e,t,n,r)=>_l(bV,e,t,n,r),gy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(cV(t))},q1=(e=>(e.Asc="asc",e.Desc="desc",e))(q1||{}),SV=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),TV=(e,t)=>e.sort(SV(t)),EV=(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})},CV=class _d{constructor(t=[]){this.array=t}static Range(...t){return xV(...t)}static New(t){return new _d(t)}Where(t,n,r){return this.array=dV(this.array,t,n,r),this}Some(t,n,r){return sV(this.array,t,n,r)}All(t,n,r){return fV(this.array,t,n,r)}Reverse(){return this.array=my(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=wV(this.array,t,n,r),this}Distinct(){return this.array=hV(this.array),this}First(t){return t===void 0?this.array[0]:mV(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+lV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return gV(this.array,t)}GroupWith(t){return W1(this.array,t)}Except(t){return Ao(this.array,n=>!py(t,n))}Intersect(t){return Ao(this.array,n=>py(t,n))}OrderBy(t,n){let r;return r=t?gy(this.array,t):this.array.toSorted(),this.array=n==="desc"?my(r):r,this}Includes(t){return Ap(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(hy(this.array,n=>[t,n]))}Zip(t,n){return hy(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(H1(this.array))}ToObject(t){return pV(this.array,t)}Sort(t){return Array.isArray(t)?TV(this.array,t):gy(this.array,t)}Unique(t){return EV(this.array,t)}},U1=CV;const Y1=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"});var Tu={},vy;function RV(){return vy||(vy=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 Ui=RV();const Ip=e=>e.headerLabel??e.thead??e.id,_p=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 Op=e=>e.type==="number"?e.valueAsNumber:e.value,kV=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},PV={},AV=(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})},IV=(e,t,n=PV)=>{const r=qr()?null:Ui.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:AV(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return qr()||Ui.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},_V=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:ui(),operation:l,label:Ip(e),name:o,type:i,value:"",...r}},Mp=()=>{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}},OV=e=>{const t=_t(),n=Mp(),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=Op(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(gi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(PA,{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(_a,{"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]})})]})})})},MV=({filter:e,onDelete:t,set:n})=>{const r=_t(),o=Mp(),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=Op(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(_a,{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})})]})},DV=({item:e,onPointerDown:t})=>{const n=Lo(0);return x.jsxs(Bb,{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(CA,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},jV=e=>{var l;const t=_t(),n=_p(e.cols),r=XP(),[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 U1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(ZS(m).map((v,y)=>{const b=m[v];return{...g,groupId:ui(),groupKey:d,index:y,rows:b,groupName:v}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(gi,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(LA,{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(sE,{children:x.jsx($b,{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(DV,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},NV=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),FV=(e,t)=>e.toSorted(NV(t)),G1=(e,t,n)=>({label:t,id:ui(),type:n,value:e.id}),LV=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,G1(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(gi,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Wb,{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]})})]})})})},VV=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=G1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Ip(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(fA,{size:14}):null,n==="desc"?x.jsx(uA,{size:14}):null,n==="undefined"?x.jsx(Wb,{size:14}):null]})},zV=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(OV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(LV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(jV,{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=Op(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function $V(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 BV=e=>{const t=E.useId(),n=_t(),r=E.useMemo(()=>$V(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]})})]})},HV=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return E.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),x.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:x.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},WV=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=Ff(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},d?x.jsx(HV,{children:x.jsx(p,{col:i,row:t,rowIndex:e})}):null,x.jsx("span",{className:"relative",children:o?Y1:c?x.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):x.jsx(E.Fragment,{children:et.nil(l)?"":l})}))})})},qV={top:0,left:0,right:0,bottom:-1},UV=e=>{var g;const t=Ep(),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=Mp(),l=o?_A:MA,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===q1.Asc?"ascending":"descending":"none",m=Ip(e.header);return x.jsxs(Bb,{...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(gi,{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(MV,{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(VV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:x.jsx(ft.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:qV,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`}})]})},YV=e=>{const[t,n]=_V(e.setCols);return x.jsx($b,{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(UV,{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}`))})})},K1=E.createContext({}),GV=()=>E.useContext(K1),KV=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})})),ZV=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??""}`})),XV=E.forwardRef(({context:e,...t},n)=>{const r=GV(),o={...t==null?void 0:t.style,top:et.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 table-row ${(n==null?void 0:n.className)??""}`})),JV=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),ez={TableHead:XV,Table:ZV,TableBody:KV,TableRow:QV,TableFoot:JV},tz=[0,0,0,0,0,0,0,0,0,0],nz=e=>x.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?Y1:x.jsx(R0,{})}),rz=()=>x.jsx(E.Fragment,{}),oz=()=>x.jsx(E.Fragment,{}),iz=[],yy=({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 tz;if(c)return u.rows;const b=new U1(u.rows);return t.length>0&&t.forEach(T=>T.value===""||Number.isNaN(T.value)?void 0:b.Where(T.name,T.operation.symbol,T.value)),r.length===0?b.Select():FV(b.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,T=new IntersectionObserver(w=>{var R;return w[w.length-1].isIntersecting&&g.current?((R=m.current)==null||R.call(m),void f(!0)):f(!1)});return T.observe(b),()=>T.disconnect()},[g,m]);const v=h.length===0,y={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(wF,{useWindowScroll:!0,followOutput:"smooth",components:ez,totalCount:h.length,data:v?iz:h,itemContent:v?rz:WV,fixedFooterContent:p?oz:null,context:y,fixedHeaderContent:()=>x.jsx(YV,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?x.jsx(nz,{loading:u.loading}):null,x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(BV,{...l}):null]})},az=(e,t)=>typeof t=="function"?t(e):t,ts=(e,t,n)=>e===t||n==null?void 0:n(t),sz=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Ep(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>_p(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]:az(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),ts((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),ts((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),ts((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),ts((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return x.jsx(K1.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?x.jsx(zV,{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(yy,{...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(yy,{...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}`))})]})})},lz=["INPUT","SELECT"],Z1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{lz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Eu,xy;function Dp(){if(xy)return Eu;xy=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,by;function X1(){if(by)return Cu;by=1;var e=Dp(),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 j=I.charCodeAt(O);if(j===45||j===46||j===95||j===126||j>=48&&j<=57||j>=65&&j<=90||j>=97&&j<=122||w===e.RFC1738&&(j===40||j===41)){A[A.length]=I.charAt(O);continue}if(j<128){A[A.length]=r[j];continue}if(j<2048){A[A.length]=r[192|j>>6]+r[128|j&63];continue}if(j<55296||j>=57344){A[A.length]=r[224|j>>12]+r[128|j>>6&63]+r[128|j&63];continue}O+=1,j=65536+((j&1023)<<10|I.charCodeAt(O)&1023),A[A.length]=r[240|j>>18]+r[128|j>>12&63]+r[128|j>>6&63]+r[128|j&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 Ru,wy;function cz(){if(wy)return Ru;wy=1;var e=qS(),t=X1(),n=Dp(),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,j,V,P,D,_,L){for(var N=h,z=L,M=0,B=!1;(z=z.get(p))!==void 0&&!B;){var Q=z.get(h);if(M+=1,typeof Q<"u"){if(Q===M)throw new RangeError("Cyclic object value");B=!0}typeof z.get(p)>"u"&&(M=0)}if(typeof I=="function"?N=I(v,N):N instanceof Date?N=j(N):y==="comma"&&i(N)&&(N=t.maybeMap(N,function(ke){return ke instanceof Date?j(ke):ke})),N===null){if(w)return R&&!D?R(v,u.encoder,_,"key",V):v;N=""}if(d(N)||t.isBuffer(N)){if(R){var ee=D?v:R(v,u.encoder,_,"key",V);return[P(ee)+"="+P(R(N,u.encoder,_,"value",V))]}return[P(v)+"="+P(String(N))]}var X=[];if(typeof N>"u")return X;var Z;if(y==="comma"&&i(N))D&&R&&(N=t.maybeMap(N,R)),Z=[{value:N.length>0?N.join(",")||null:void 0}];else if(i(I))Z=I;else{var G=Object.keys(N);Z=A?G.sort(A):G}var K=C?String(v).replace(/\./g,"%2E"):String(v),F=b&&i(N)&&N.length===1?K+"[]":K;if(T&&i(N)&&N.length===0)return F+"[]";for(var $=0;$<Z.length;++$){var Y=Z[$],ie=typeof Y=="object"&&Y&&typeof Y.value<"u"?Y.value:N[Y];if(!(S&&ie===null)){var H=O&&C?String(Y).replace(/\./g,"%2E"):String(Y),ye=i(N)?typeof y=="function"?y(F,H):F:F+(O?"."+H:"["+H+"]");L.set(h,M);var Ee=e();Ee.set(p,L),s(X,g(ie,ye,y,b,T,w,S,C,y==="comma"&&D&&i(N)?null:R,I,A,O,j,V,P,D,_,Ee))}}return X},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 Ru=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 j=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&"),j.length>0?V+j:""},Ru}var ku,Sy;function uz(){if(Sy)return ku;Sy=1;var e=X1(),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(j){return m.decoder(j,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 ku=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)},ku}var Pu,Ty;function dz(){if(Ty)return Pu;Ty=1;var e=cz(),t=uz(),n=Dp();return Pu={formats:n,parse:t,stringify:e},Pu}var fz=dz(),We;(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})(We||(We={}));var Ey;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Ey||(Ey={}));const fe=We.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=We.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,We.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 pa=(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,We.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${We.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${We.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${We.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}"`:We.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,We.assertNever(e)}return{message:n}};let pz=pa;function Md(){return pz}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 ce(e,t){const n=Md(),r=Dd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===pa?void 0:pa].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 Re;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 Re;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 Re=Object.freeze({status:"aborted"}),_i=e=>({status:"dirty",value:e}),Gt=e=>({status:"valid",value:e}),Cy=e=>e.status==="aborted",Ry=e=>e.status==="dirty",Qo=e=>e.status==="valid",zs=e=>typeof Promise<"u"&&e instanceof Promise;function $s(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 Q1(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 ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var Oi,Mi;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 ky=(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 Ie(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 Fe{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(zs(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 ky(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(zs(o)?o:Promise.resolve(o));return ky(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 ma.create(this,this._def)}or(t){return Ws.create([this,t],this._def)}and(t){return qs.create(this,t,this._def)}transform(t){return new Kn({...Ie(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Zs({...Ie(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new nS({typeName:Te.ZodBranded,type:this,...Ie(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Xs({...Ie(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 Ol.create(this,t)}readonly(){return Qs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const hz=/^c[^\s-]{8,}$/i,mz=/^[0-9a-z]+$/,gz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vz=/^[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,yz=/^[a-z0-9_-]{21}$/i,xz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,bz=/^[-+]?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)?)??$/,wz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Sz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Au;const Tz=/^(?:(?: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])$/,Ez=/^(?:(?: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])$/,Cz=/^(([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]))$/,Rz=/^(([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])$/,kz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Pz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,J1="((\\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])))",Az=new RegExp(`^${J1}$`);function eS(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 Iz(e){return new RegExp(`^${eS(e)}$`)}function _z(e){let t=`${J1}T${eS(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 Oz(e,t){return!!((t==="v4"||!t)&&Tz.test(e)||(t==="v6"||!t)&&Cz.test(e))}function Mz(e,t){if(!xz.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 Dz(e,t){return!!((t==="v4"||!t)&&Ez.test(e)||(t==="v6"||!t)&&Rz.test(e))}class Bn extends Fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),Re}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),ce(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),ce(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?ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ce(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")wz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Au||(Au=new RegExp(Sz,"u")),Au.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")vz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")yz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")hz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")mz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")gz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(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),ce(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),ce(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),ce(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),ce(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),ce(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?_z(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Az.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Iz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?bz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Oz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Mz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Dz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?kz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Pz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):We.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,...ve.errToObj(r)})}_addCheck(t){return new Bn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.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,...ve.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,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.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,...Ie(e)})};function jz(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 Fe{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 ce(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),Re}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?We.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ce(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),ce(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),ce(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?jz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ce(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),ce(r,{code:re.not_finite,message:i.message}),o.dirty()):We.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Xr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.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"&&We.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,...Ie(e)});class Jo extends Fe{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),ce(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),ce(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),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):We.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),Re}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.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:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.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,...Ie(e)})};class jd extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),Re}return Gt(t.data)}}jd.create=e=>new jd({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class ha extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),Re}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_date}),Re}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),ce(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),ce(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):We.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ha({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.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}}ha.create=e=>new ha({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Ie(e)});class Nd extends Fe{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),Re}return Gt(t.data)}}Nd.create=e=>new Nd({typeName:Te.ZodSymbol,...Ie(e)});class Bs extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),Re}return Gt(t.data)}}Bs.create=e=>new Bs({typeName:Te.ZodUndefined,...Ie(e)});class Hs extends Fe{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),Re}return Gt(t.data)}}Hs.create=e=>new Hs({typeName:Te.ZodNull,...Ie(e)});class Fd extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Gt(t.data)}}Fd.create=e=>new Fd({typeName:Te.ZodAny,...Ie(e)});class _o extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Gt(t.data)}}_o.create=e=>new _o({typeName:Te.ZodUnknown,...Ie(e)});class gr extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),Re}}gr.create=e=>new gr({typeName:Te.ZodNever,...Ie(e)});class Ld extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),Re}return Gt(t.data)}}Ld.create=e=>new Ld({typeName:Te.ZodVoid,...Ie(e)});class Dn extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ce(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),Re;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ce(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&&(ce(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&&(ce(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:ve.toString(n)}})}max(t,n){return new Dn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Dn({...this._def,exactLength:{value:t,message:ve.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,...Ie(t)});function yo(e){if(e instanceof yt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hn.create(yo(r))}return new yt({...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 yt extends Fe{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=We.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ce(c,{code:re.invalid_type,expected:fe.object,received:c.parsedType}),Re}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&&(ce(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 ve.errToObj,new yt({...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=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new yt({...this._def,unknownKeys:"strip"})}passthrough(){return new yt({...this._def,unknownKeys:"passthrough"})}extend(t){return new yt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new yt({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 yt({...this._def,catchall:t})}pick(t){const n={};return We.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}omit(t){const n={};return We.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}deepPartial(){return yo(this)}partial(t){const n={};return We.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new yt({...this._def,shape:()=>n})}required(t){const n={};return We.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 yt({...this._def,shape:()=>n})}keyof(){return tS(We.objectKeys(this.shape))}}yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ie(t)});yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:Te.ZodObject,...Ie(t)});yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ie(t)});class Ws extends Fe{_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 ce(n,{code:re.invalid_union,unionErrors:a}),Re}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 ce(n,{code:re.invalid_union,unionErrors:s}),Re}}get options(){return this._def.options}}Ws.create=(e,t)=>new Ws({options:e,typeName:Te.ZodUnion,...Ie(t)});const $n=e=>e instanceof Ys?$n(e.schema):e instanceof Kn?$n(e.innerType()):e instanceof Gs?[e.value]:e instanceof Qr?e.options:e instanceof Ks?We.objectValues(e.enum):e instanceof Zs?$n(e._def.innerType):e instanceof Bs?[void 0]:e instanceof Hs?[null]:e instanceof Hn?[void 0,...$n(e.unwrap())]:e instanceof Jr?[null,...$n(e.unwrap())]:e instanceof nS||e instanceof Qs?$n(e.unwrap()):e instanceof Xs?$n(e._def.innerType):[];class jp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ce(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),Re;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}):(ce(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Re)}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 jp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ie(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=We.objectKeys(t),i=We.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 qs extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(Cy(i)||Cy(a))return Re;const s=Vd(i.value,a.value);return s.valid?((Ry(i)||Ry(a))&&n.dirty(),{status:n.value,value:s.data}):(ce(r,{code:re.invalid_intersection_types}),Re)};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}))}}qs.create=(e,t,n)=>new qs({left:e,right:t,typeName:Te.ZodIntersection,...Ie(n)});class Gn extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ce(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),Re;if(r.data.length<this._def.items.length)return ce(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Re;!this._def.rest&&r.data.length>this._def.items.length&&(ce(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,...Ie(t)})};class Us extends Fe{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 ce(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),Re;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 Fe?new Us({keyType:t,valueType:n,typeName:Te.ZodRecord,...Ie(r)}):new Us({keyType:Bn.create(),valueType:t,typeName:Te.ZodRecord,...Ie(n)})}}class zd extends Fe{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 ce(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),Re;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 Re;(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 Re;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}zd.create=(e,t,n)=>new zd({valueType:t,keyType:e,typeName:Te.ZodMap,...Ie(n)});class ei extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ce(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),Re;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ce(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&&(ce(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 Re;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:ve.toString(n)}})}max(t,n){return new ei({...this._def,maxSize:{value:t,message:ve.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,...Ie(t)});class Yi extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ce(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),Re;function r(s,l){return Dd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),pa].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(),pa].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 ma){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 Yi({...this._def,args:Gn.create(t).rest(_o.create())})}returns(t){return new Yi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Yi({args:t||Gn.create([]).rest(_o.create()),returns:n||_o.create(),typeName:Te.ZodFunction,...Ie(r)})}}class Ys extends Fe{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})}}Ys.create=(e,t)=>new Ys({getter:e,typeName:Te.ZodLazy,...Ie(t)});class Gs extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ce(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Re}return{status:"valid",value:t.data}}get value(){return this._def.value}}Gs.create=(e,t)=>new Gs({value:e,typeName:Te.ZodLiteral,...Ie(t)});function tS(e,t){return new Qr({values:e,typeName:Te.ZodEnum,...Ie(t)})}class Qr extends Fe{constructor(){super(...arguments),Oi.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{expected:We.joinValues(r),received:n.parsedType,code:re.invalid_type}),Re}if($s(this,Oi)||Q1(this,Oi,new Set(this._def.values)),!$s(this,Oi).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{received:n.data,code:re.invalid_enum_value,options:r}),Re}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})}}Oi=new WeakMap;Qr.create=tS;class Ks extends Fe{constructor(){super(...arguments),Mi.set(this,void 0)}_parse(t){const n=We.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=We.objectValues(n);return ce(r,{expected:We.joinValues(o),received:r.parsedType,code:re.invalid_type}),Re}if($s(this,Mi)||Q1(this,Mi,new Set(We.getValidEnumValues(this._def.values))),!$s(this,Mi).has(t.data)){const o=We.objectValues(n);return ce(r,{received:r.data,code:re.invalid_enum_value,options:o}),Re}return Gt(t.data)}get enum(){return this._def.values}}Mi=new WeakMap;Ks.create=(e,t)=>new Ks({values:e,typeName:Te.ZodNativeEnum,...Ie(t)});class ma extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ce(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),Re;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})))}}ma.create=(e,t)=>new ma({type:e,typeName:Te.ZodPromise,...Ie(t)});class Kn extends Fe{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=>{ce(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 Re;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Re:l.status==="dirty"||n.value==="dirty"?_i(l.value):l});{if(n.value==="aborted")return Re;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Re:s.status==="dirty"||n.value==="dirty"?_i(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"?Re:(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"?Re:(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);We.assertNever(o)}}Kn.create=(e,t,n)=>new Kn({schema:e,typeName:Te.ZodEffects,effect:t,...Ie(n)});Kn.createWithPreprocess=(e,t,n)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Ie(n)});class Hn extends Fe{_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,...Ie(t)});class Jr extends Fe{_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,...Ie(t)});class Zs extends Fe{_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}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ie(t)});class Xs extends Fe{_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 zs(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}}Xs.create=(e,t)=>new Xs({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ie(t)});class $d extends Fe{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),Re}return{status:"valid",value:t.data}}}$d.create=e=>new $d({typeName:Te.ZodNaN,...Ie(e)});class nS extends Fe{_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 Ol extends Fe{_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"?Re:i.status==="dirty"?(n.dirty(),_i(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"?Re: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 Ol({in:t,out:n,typeName:Te.ZodPipeline})}}class Qs extends Fe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Qo(o)&&(o.value=Object.freeze(o.value)),o);return zs(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Qs.create=(e,t)=>new Qs({innerType:e,typeName:Te.ZodReadonly,...Ie(t)});yt.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;$d.create;Jo.create;jd.create;ha.create;Nd.create;Bs.create;Hs.create;Fd.create;_o.create;gr.create;Ld.create;Dn.create;yt.create;yt.strictCreate;Ws.create;jp.create;qs.create;Gn.create;Us.create;zd.create;ei.create;Yi.create;Ys.create;Gs.create;Qr.create;Ks.create;ma.create;Kn.create;Hn.create;Jr.create;Kn.createWithPreprocess;Ol.create;const Nz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Fz=(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]}}},rS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),hn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):rS(t),o=structuredClone(e);return Fz(o,r,n),o},Lz=(e,t)=>e.localeCompare(t),Ri={},oS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return iS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=oS(e._def.innerType);return t==="ZodArray"?n??[]:n}},iS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,oS(n)])),aS=(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]=aS(i,o):n[r]=o||i)}return n},Vz={sort:Lz,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},sS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return fz.parse(n.toString(),Vz)},Dr=(e,t)=>rS(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)},zz={state:{},loading:!1,useOnChange:!1},Py=e=>e.dataset.target||e.name,$z=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Ui.LocalStorage.get(t);return Nz(n)?n:{}},clear:()=>void Ui.LocalStorage.delete(t),set:n=>Ui.LocalStorage.set(t,n)}},Bz=(e,t,n=zz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>et.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??iS(e)??{}),l=E.useCallback(y=>{var I;const b=y.target,T=y.currentTarget;if(b.dataset.optional==="true")return;const S=Py(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(j=>hn(j??{},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 j=I.dataset.name||I.name||"";return hn(C,j,O)},{}),S=et.empty(w)?null:w;o(S),console.error(S),y==null||y({form:T,errors:S||{}})},[]),u=(y,b=Ri)=>{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:et.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=Ri)=>{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:Rr(r,y,void 0),value:Rr(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=Ri)=>{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:Rr(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=Ri)=>{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:Rr(r,y,void 0),required:b.required??!T.isOptional(),value:Rr(a,y,void 0)||(b==null?void 0:b.value)||"",type:et.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=Ri)=>{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:Rr(r,y,void 0),required:b.required??!T.isOptional(),type:w?"number":(b==null?void 0:b.type)??"text",value:Rr(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 _;const j=Py(O.target);if(!j)return!1;const V=O.target,P=Iu(O.target)||(O.relatedTarget?sr(O.relatedTarget):""),D=T.schema.safeParse(P);if(V.setAttribute("value",P),D.success)return w.setCustomValidity(""),o(L=>{if(et.null(L))return null;const N=hn(L,j,void 0);return et.empty(L)||et.nil(L)||et.empty(N)?null:N}),!1;if(w.required){const L=((_=D.error.issues[0])==null?void 0:_.message)||"";w.setCustomValidity(L),o(N=>{if(et.null(N))return null;const z=hn(N,j,L||void 0);return et.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=sS(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(O=>{if(O.tagName==="SELECT"){const j=O;w=hn(w,j.name,j.value)}if(O.tagName==="INPUT"){const j=O,V=Iu(j)||(j?sr(j):"");w=hn(w,j.dataset.target||j.name,V)}});const C=aS(w,a),R=e.safeParse(C),I=()=>{var O;Z1(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(j=>String(j))}))})},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}},Hz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Wz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},lS={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},cS={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"},uS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},qz={name:"dark",zIndex:uS,rounded:lS,spacing:cS,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%)"}}}},Uz={rounded:lS,spacing:cS,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:uS,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%)"}}}},Yz=qz,Gz=Uz,Kz=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...gl,...e.tweaks},parser:e.parser||hl.hsla,map:{...ml,...e.map}}),[e]);return x.jsx(ci.Provider,{value:t,children:e.children})},Zz=()=>{const e=E.useContext(ci);return e?e.parser:hl.hsla};exports.Alert=qA;exports.Autocomplete=HF;exports.Button=Oo;exports.Calendar=C0;exports.Card=Vf;exports.Checkbox=Cp;exports.ColType=Io;exports.Collapse=Gb;exports.ComponentsProvider=Kz;exports.Context=ci;exports.DatePicker=qF;exports.Dropdown=gi;exports.Empty=R0;exports.Expand=zj;exports.FileUpload=oL;exports.Form=iL;exports.Input=_a;exports.InputFeedback=u1;exports.InputField=Ia;exports.Menu=Hj;exports.MenuItem=Bj;exports.Modal=eN;exports.MultiSelect=pL;exports.Notifications=zM;exports.Polymorph=cn;exports.Radiobox=hL;exports.RenderOnView=qT;exports.Select=Kr;exports.Slider=ZL;exports.Stats=$M;exports.Switch=XL;exports.Tab=WM;exports.Table=sz;exports.Tabs=BM;exports.Tag=Ud;exports.TaskList=QL;exports.Textarea=JL;exports.Timeline=qM;exports.TimelineItem=xl;exports.Toolbar=tN;exports.Tooltip=ap;exports.TransferList=nV;exports.createColumns=kV;exports.createCssProperties=MO;exports.createDesignTokens=b0;exports.createFormStorage=$z;exports.createOptionCols=_p;exports.createStyles=IO;exports.createTheme=OO;exports.createTokenStyles=DO;exports.css=Ne;exports.defaultDarkTheme=Yz;exports.defaultLightTheme=Gz;exports.defaultTranslations=ml;exports.defaultTweaks=gl;exports.dispatchInput=Zy;exports.formReset=Z1;exports.formToJson=sS;exports.getJsonForm=Hz;exports.getRemainingSize=Gi;exports.getSchemaShape=Dr;exports.hasVerticalScroll=Xy;exports.initializeInputDataset=va;exports.isMobile=S0;exports.isReactComponent=VT;exports.isReactFC=zT;exports.isSsr=qr;exports.mergeRefs=ii;exports.negate=NO;exports.noop=Lf;exports.parsers=hl;exports.path=Ff;exports.reduceTokens=jr;exports.safeRegex=rd;exports.splitInto=w0;exports.useColorParser=Zz;exports.useForm=Bz;exports.useLocale=Nf;exports.useNotification=LM;exports.usePrevious=Wz;exports.useReactive=K0;exports.useTablePreferences=IV;exports.useTranslations=_t;exports.uuid=ui;
|
|
197
197
|
//# sourceMappingURL=index.js.map
|