@g4rcez/components 2.2.6 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/form/autocomplete.jsx +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/dom.d.ts.map +1 -1
- package/dist/lib/dom.js +5 -2
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(se,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(se=typeof globalThis<"u"?globalThis:se||self,S(se.components={},se.React,se["react/jsx-runtime"],se.ReactDOM))})(this,(function(se,S,g,Ri){"use strict";function em(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 P=em(S),cr=em(Ri);function tm(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=tm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nm(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=tm(e))&&(r&&(r+=" "),r+=t);return r}const rm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,om=nm,_o=(e,t)=>n=>{var r;if(t?.variants==null)return om(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=rm(u)||rm(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(h=>{let[y,m]=h;return Array.isArray(m)?m.includes({...i,...a}[y]):{...i,...a}[y]===m})?[...c,d,f]:c},[]);return om(e,s,l,n?.class,n?.className)};var im=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uk(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Ac,am;function Mo(){return am||(am=1,Ac=TypeError),Ac}const dk=uk(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Pc,lm;function ra(){if(lm)return Pc;lm=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=o&&i&&typeof i.get=="function"?i.get:null,a=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,E=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,k=Array.prototype.join,A=Array.prototype.slice,O=Math.floor,N=typeof BigInt=="function"?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_=typeof Symbol=="function"&&typeof Symbol.iterator=="object",F=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,D=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function C(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||I.call(/e/,K))return K;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var Ue=W<0?-O(-W):O(W);if(Ue!==W){var Ye=String(Ue),$e=b.call(K,Ye.length+1);return x.call(Ye,Oe,"$&_")+"."+x.call(x.call($e,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(K,Oe,"$&_")}var V=dk,L=V.custom,B=ce(L)?L:null,U={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Pc=function W(K,Oe,Ue,Ye){var $e=Oe||{};if(re($e,"quoteStyle")&&!re(U,$e.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(re($e,"maxStringLength")&&(typeof $e.maxStringLength=="number"?$e.maxStringLength<0&&$e.maxStringLength!==1/0:$e.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=re($e,"customInspect")?$e.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(re($e,"indent")&&$e.indent!==null&&$e.indent!==" "&&!(parseInt($e.indent,10)===$e.indent&&$e.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(re($e,"numericSeparator")&&typeof $e.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var gt=$e.numericSeparator;if(typeof K>"u")return"undefined";if(K===null)return"null";if(typeof K=="boolean")return K?"true":"false";if(typeof K=="string")return me(K,$e);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var it=String(K);return gt?C(K,it):it}if(typeof K=="bigint"){var xn=String(K)+"n";return gt?C(K,xn):xn}var Qr=typeof $e.depth>"u"?5:$e.depth;if(typeof Ue>"u"&&(Ue=0),Ue>=Qr&&Qr>0&&typeof K=="object")return te(K)?"[Array]":"[Object]";var Jr=Nt($e,Ue);if(typeof Ye>"u")Ye=[];else if(le(Ye,K)>=0)return"[Circular]";function In(ji,Ic,lW){if(Ic&&(Ye=A.call(Ye),Ye.push(Ic)),lW){var ck={depth:$e.depth};return re($e,"quoteStyle")&&(ck.quoteStyle=$e.quoteStyle),W(ji,ck,Ue+1,Ye)}return W(ji,$e,Ue+1,Ye)}if(typeof K=="function"&&!Y(K)){var $i=oe(K),zi=Re(K,In);return"[Function"+($i?": "+$i:" (anonymous)")+"]"+(zi.length>0?" { "+k.call(zi,", ")+" }":"")}if(ce(K)){var ok=_?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(K);return typeof K=="object"&&!_?ke(ok):ok}if(X(K)){for(var na="<"+E.call(String(K.nodeName)),Gh=K.attributes||[],Cc=0;Cc<Gh.length;Cc++)na+=" "+Gh[Cc].name+"="+H(ee(Gh[Cc].value),"double",$e);return na+=">",K.childNodes&&K.childNodes.length&&(na+="..."),na+="</"+E.call(String(K.nodeName))+">",na}if(te(K)){if(K.length===0)return"[]";var Yh=Re(K,In);return Jr&&!ct(Yh)?"["+Qt(Yh,Jr)+"]":"[ "+k.call(Yh,", ")+" ]"}if(Z(K)){var Kh=Re(K,In);return!("cause"in Error.prototype)&&"cause"in K&&!z.call(K,"cause")?"{ ["+String(K)+"] "+k.call(w.call("[cause]: "+In(K.cause),Kh),", ")+" }":Kh.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+k.call(Kh,", ")+" }"}if(typeof K=="object"&&ot){if(B&&typeof K[B]=="function"&&V)return V(K,{depth:Qr-Ue});if(ot!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(be(K)){var ik=[];return r&&r.call(K,function(ji,Ic){ik.push(In(Ic,K,!0)+" => "+In(ji,K))}),Ne("Map",n.call(K),ik,Jr)}if(J(K)){var sk=[];return a&&a.call(K,function(ji){sk.push(In(ji,K))}),Ne("Set",s.call(K),sk,Jr)}if(de(K))return De("WeakMap");if(j(K))return De("WeakSet");if(ne(K))return De("WeakRef");if(R(K))return ke(In(Number(K)));if(Q(K))return ke(In(N.call(K)));if(ae(K))return ke(h.call(K));if(pe(K))return ke(In(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof im<"u"&&K===im)return"{ [object globalThis] }";if(!q(K)&&!Y(K)){var Zh=Re(K,In),ak=D?D(K)===Object.prototype:K instanceof Object||K.constructor===Object,Xh=K instanceof Object?"":"null prototype",lk=!ak&&F&&Object(K)===K&&F in K?b.call(he(K),8,-1):Xh?"Object":"",aW=ak||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",Qh=aW+(lk||Xh?"["+k.call(w.call([],lk||[],Xh||[]),": ")+"] ":"");return Zh.length===0?Qh+"{}":Jr?Qh+"{"+Qt(Zh,Jr)+"}":Qh+"{ "+k.call(Zh,", ")+" }"}return String(K)};function H(W,K,Oe){var Ue=Oe.quoteStyle||K,Ye=U[Ue];return Ye+W+Ye}function ee(W){return x.call(String(W),/"/g,""")}function ie(W){return!F||!(typeof W=="object"&&(F in W||typeof W[F]<"u"))}function te(W){return he(W)==="[object Array]"&&ie(W)}function q(W){return he(W)==="[object Date]"&&ie(W)}function Y(W){return he(W)==="[object RegExp]"&&ie(W)}function Z(W){return he(W)==="[object Error]"&&ie(W)}function pe(W){return he(W)==="[object String]"&&ie(W)}function R(W){return he(W)==="[object Number]"&&ie(W)}function ae(W){return he(W)==="[object Boolean]"&&ie(W)}function ce(W){if(_)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function Q(W){if(!W||typeof W!="object"||!N)return!1;try{return N.call(W),!0}catch{}return!1}var ue=Object.prototype.hasOwnProperty||function(W){return W in this};function re(W,K){return ue.call(W,K)}function he(W){return y.call(W)}function oe(W){if(W.name)return W.name;var K=v.call(m.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function le(W,K){if(W.indexOf)return W.indexOf(K);for(var Oe=0,Ue=W.length;Oe<Ue;Oe++)if(W[Oe]===K)return Oe;return-1}function be(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{s.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function de(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 ne(W){if(!p||!W||typeof W!="object")return!1;try{return p.call(W),!0}catch{}return!1}function J(W){if(!s||!W||typeof W!="object")return!1;try{s.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function j(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 X(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function me(W,K){if(W.length>K.maxStringLength){var Oe=W.length-K.maxStringLength,Ue="... "+Oe+" more character"+(Oe>1?"s":"");return me(b.call(W,0,K.maxStringLength),K)+Ue}var Ye=G[K.quoteStyle||"single"];Ye.lastIndex=0;var $e=x.call(x.call(W,Ye,"\\$1"),/[\x00-\x1f]/g,ve);return H($e,"single",K)}function ve(W){var K=W.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Oe?"\\"+Oe:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function ke(W){return"Object("+W+")"}function De(W){return W+" { ? }"}function Ne(W,K,Oe,Ue){var Ye=Ue?Qt(Oe,Ue):k.call(Oe,", ");return W+" ("+K+") {"+Ye+"}"}function ct(W){for(var K=0;K<W.length;K++)if(le(W[K],`
|
|
2
2
|
`)>=0)return!1;return!0}function Nt(W,K){var Oe;if(W.indent===" ")Oe=" ";else if(typeof W.indent=="number"&&W.indent>0)Oe=k.call(Array(W.indent+1)," ");else return null;return{base:Oe,prev:k.call(Array(K+1),Oe)}}function Qt(W,K){if(W.length===0)return"";var Oe=`
|
|
3
3
|
`+K.prev+K.base;return Oe+k.call(W,","+Oe)+`
|
|
4
|
-
`+K.prev}function Re(W,K){var Oe=te(W),Ue=[];if(Oe){Ue.length=W.length;for(var Ye=0;Ye<W.length;Ye++)Ue[Ye]=re(W,Ye)?K(W[Ye],W):""}var $e=typeof M=="function"?M(W):[],ot;if(_){ot={};for(var gt=0;gt<$e.length;gt++)ot["$"+$e[gt]]=$e[gt]}for(var it in W)re(W,it)&&(Oe&&String(Number(it))===it&&it<W.length||_&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ue.push(K(it,W)+": "+K(W[it],W)):Ue.push(it+": "+K(W[it],W))));if(typeof M=="function")for(var xn=0;xn<$e.length;xn++)z.call(W,$e[xn])&&Ue.push("["+K($e[xn])+"]: "+K(W[$e[xn]],W));return Ue}return Pc}var Oc,cm;function fk(){if(cm)return Oc;cm=1;var e=ra(),t=Mo(),n=function(a,l,c){for(var u=a,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=a.next,a.next=d),d},r=function(a,l){if(a){var c=n(a,l);return c&&c.value}},o=function(a,l,c){var u=n(a,l);u?u.value=c:a.next={key:l,next:a.next,value:c}},i=function(a,l){return a?!!n(a,l):!1},s=function(a,l){if(a)return n(a,l,!0)};return Oc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=s(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Oc}var _c,um;function dm(){return um||(um=1,_c=Object),_c}var Mc,fm;function pk(){return fm||(fm=1,Mc=Error),Mc}var Dc,pm;function hk(){return pm||(pm=1,Dc=EvalError),Dc}var Nc,hm;function mk(){return hm||(hm=1,Nc=RangeError),Nc}var Fc,mm;function gk(){return mm||(mm=1,Fc=ReferenceError),Fc}var Lc,gm;function yk(){return gm||(gm=1,Lc=SyntaxError),Lc}var Vc,ym;function vk(){return ym||(ym=1,Vc=URIError),Vc}var $c,vm;function bk(){return vm||(vm=1,$c=Math.abs),$c}var zc,bm;function xk(){return bm||(bm=1,zc=Math.floor),zc}var jc,xm;function wk(){return xm||(xm=1,jc=Math.max),jc}var Rc,wm;function Sk(){return wm||(wm=1,Rc=Math.min),Rc}var Bc,Sm;function Tk(){return Sm||(Sm=1,Bc=Math.pow),Bc}var Hc,Tm;function Ek(){return Tm||(Tm=1,Hc=Math.round),Hc}var Wc,Em;function kk(){return Em||(Em=1,Wc=Number.isNaN||function(t){return t!==t}),Wc}var qc,km;function Ck(){if(km)return qc;km=1;var e=kk();return qc=function(n){return e(n)||n===0?n:n<0?-1:1},qc}var Uc,Cm;function Ik(){return Cm||(Cm=1,Uc=Object.getOwnPropertyDescriptor),Uc}var Gc,Im;function Am(){if(Im)return Gc;Im=1;var e=Ik();if(e)try{e([],"length")}catch{e=null}return Gc=e,Gc}var Yc,Pm;function Ak(){if(Pm)return Yc;Pm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Yc=e,Yc}var Kc,Om;function Pk(){return Om||(Om=1,Kc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),Kc}var Zc,_m;function Ok(){if(_m)return Zc;_m=1;var e=typeof Symbol<"u"&&Symbol,t=Pk();return Zc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Zc}var Xc,Mm;function Dm(){return Mm||(Mm=1,Xc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Xc}var Qc,Nm;function Fm(){if(Nm)return Qc;Nm=1;var e=dm();return Qc=e.getPrototypeOf||null,Qc}var Jc,Lm;function _k(){if(Lm)return Jc;Lm=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},s=function(a,l){for(var c="",u=0;u<a.length;u+=1)c+=a[u],u+1<a.length&&(c+=l);return c};return Jc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),h=[],y=0;y<p;y++)h[y]="$"+y;if(d=Function("binder","return function ("+s(h,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},Jc}var eu,Vm;function oa(){if(Vm)return eu;Vm=1;var e=_k();return eu=Function.prototype.bind||e,eu}var tu,$m;function nu(){return $m||($m=1,tu=Function.prototype.call),tu}var ru,zm;function jm(){return zm||(zm=1,ru=Function.prototype.apply),ru}var ou,Rm;function Mk(){return Rm||(Rm=1,ou=typeof Reflect<"u"&&Reflect&&Reflect.apply),ou}var iu,Bm;function Dk(){if(Bm)return iu;Bm=1;var e=oa(),t=jm(),n=nu(),r=Mk();return iu=r||e.call(n,t),iu}var su,Hm;function Wm(){if(Hm)return su;Hm=1;var e=oa(),t=Mo(),n=nu(),r=Dk();return su=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},su}var au,qm;function Nk(){if(qm)return au;qm=1;var e=Wm(),t=Am(),n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return au=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,au}var lu,Um;function Fk(){if(Um)return lu;Um=1;var e=Dm(),t=Fm(),n=Nk();return lu=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,lu}var cu,Gm;function Lk(){if(Gm)return cu;Gm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=oa();return cu=n.call(e,t),cu}var uu,Ym;function du(){if(Ym)return uu;Ym=1;var e,t=dm(),n=pk(),r=hk(),o=mk(),i=gk(),s=yk(),a=Mo(),l=vk(),c=bk(),u=xk(),d=wk(),f=Sk(),p=Tk(),h=Ek(),y=Ck(),m=Function,v=function(Y){try{return m('"use strict"; return ('+Y+").constructor;")()}catch{}},b=Am(),x=Ak(),T=function(){throw new a},E=b?(function(){try{return arguments.callee,T}catch{try{return b(arguments,"callee").get}catch{return T}}})():T,I=Ok()(),w=Fk(),k=Fm(),A=Dm(),O=jm(),N=nu(),M={},$=typeof Uint8Array>"u"||!w?e:w(Uint8Array),_={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":M,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":E,"%TypedArray%":$,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":N,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":h,"%Math.sign%":y,"%Reflect.getPrototypeOf%":A};if(w)try{null.error}catch(Y){var F=w(w(Y));_["%Error.prototype%"]=F}var z=function Y(Z){var pe;if(Z==="%AsyncFunction%")pe=v("async function () {}");else if(Z==="%GeneratorFunction%")pe=v("function* () {}");else if(Z==="%AsyncGeneratorFunction%")pe=v("async function* () {}");else if(Z==="%AsyncGenerator%"){var R=Y("%AsyncGeneratorFunction%");R&&(pe=R.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ae=Y("%AsyncGenerator%");ae&&w&&(pe=w(ae.prototype))}return _[Z]=pe,pe},D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=oa(),V=Lk(),L=C.call(N,Array.prototype.concat),B=C.call(O,Array.prototype.splice),U=C.call(N,String.prototype.replace),G=C.call(N,String.prototype.slice),H=C.call(N,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ie=/\\(\\)?/g,te=function(Z){var pe=G(Z,0,1),R=G(Z,-1);if(pe==="%"&&R!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(R==="%"&&pe!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ae=[];return U(Z,ee,function(ce,Q,ue,re){ae[ae.length]=ue?U(re,ie,"$1"):Q||ce}),ae},q=function(Z,pe){var R=Z,ae;if(V(D,R)&&(ae=D[R],R="%"+ae[0]+"%"),V(_,R)){var ce=_[R];if(ce===M&&(ce=z(R)),typeof ce>"u"&&!pe)throw new a("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:ae,name:R,value:ce}}throw new s("intrinsic "+Z+" does not exist!")};return uu=function(Z,pe){if(typeof Z!="string"||Z.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,Z)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var R=te(Z),ae=R.length>0?R[0]:"",ce=q("%"+ae+"%",pe),Q=ce.name,ue=ce.value,re=!1,he=ce.alias;he&&(ae=he[0],B(R,L([0,1],he)));for(var oe=1,le=!0;oe<R.length;oe+=1){var be=R[oe],de=G(be,0,1),ne=G(be,-1);if((de==='"'||de==="'"||de==="`"||ne==='"'||ne==="'"||ne==="`")&&de!==ne)throw new s("property names with quotes must have matching quotes");if((be==="constructor"||!le)&&(re=!0),ae+="."+be,Q="%"+ae+"%",V(_,Q))ue=_[Q];else if(ue!=null){if(!(be in ue)){if(!pe)throw new a("base intrinsic for "+Z+" exists, but the property is not available.");return}if(b&&oe+1>=R.length){var J=b(ue,be);le=!!J,le&&"get"in J&&!("originalValue"in J.get)?ue=J.get:ue=ue[be]}else le=V(ue,be),ue=ue[be];le&&!re&&(_[Q]=ue)}}return ue},uu}var fu,Km;function Zm(){if(Km)return fu;Km=1;var e=du(),t=Wm(),n=t([e("%String.prototype.indexOf%")]);return fu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},fu}var pu,Xm;function Qm(){if(Xm)return pu;Xm=1;var e=du(),t=Zm(),n=ra(),r=Mo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),a=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return pu=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var h=l(d,p);return c(d)===0&&(d=void 0),h}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?a(d,p):!1},set:function(p,h){d||(d=new o),s(d,p,h)}};return f},pu}var hu,Jm;function Vk(){if(Jm)return hu;Jm=1;var e=du(),t=Zm(),n=ra(),r=Qm(),o=Mo(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return hu=i?function(){var d,f,p={assert:function(h){if(!p.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&f)return f.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?s(d,h):f&&f.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!f&&f.has(h)},set:function(h,y){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),a(d,h,y)):r&&(f||(f=r()),f.set(h,y))}};return p}:r,hu}var mu,eg;function tg(){if(eg)return mu;eg=1;var e=Mo(),t=ra(),n=fk(),r=Qm(),o=Vk(),i=o||r||n;return mu=function(){var a,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,u){a||(a=i()),a.set(c,u)}};return l},mu}var ng=e=>Array.isArray(e),gu=e=>e===void 0,yu=e=>e===null,$k=Function.bind.call(Function.call,Object.prototype.toString),zk=e=>!!e&&$k(e)==="[object Error]"||e instanceof Error,rg=(e,t)=>e instanceof t,jk=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Rk=e=>Object.prototype.toString.call(e)==="[object Date]"&&rg(e,Date),Be={array:ng,date:Rk,empty:e=>yu(e)||gu(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:rg,isError:zk,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>yu(e)||gu(e),null:yu,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!ng(e)&&typeof e=="object",primitive:jk,string:e=>typeof e=="string",undefined:gu},Bk=e=>Object.keys(e),Rn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,s)=>i&&i[s],e);return o===void 0?n:o},Hk=e=>e.replace(/[^0-9]/g,"");const Wk=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},qk=(e,t)=>({classGroupId:e,validator:t}),og=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ia="-",ig=[],Uk="arbitrary..",Gk=e=>{const t=Kk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Yk(s);const a=s.split(ia),l=a[0]===""&&a.length>1?1:0;return sg(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?Wk(c,l):l:c||ig}return n[s]||ig}}},sg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=sg(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(ia):e.slice(t).join(ia),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},Yk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Uk+r:void 0})(),Kk=e=>{const{theme:t,classGroups:n}=e;return Zk(n,t)},Zk=(e,t)=>{const n=og();for(const r in e){const o=e[r];vu(o,n,r,t)}return n},vu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Xk(s,t,n,r)}},Xk=(e,t,n,r)=>{if(typeof e=="string"){Qk(e,t,n);return}if(typeof e=="function"){Jk(e,t,n,r);return}eC(e,t,n,r)},Qk=(e,t,n)=>{const r=e===""?t:ag(t,e);r.classGroupId=n},Jk=(e,t,n,r)=>{if(tC(e)){vu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qk(n,e))},eC=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];vu(l,ag(t,a),n,r)}},ag=(e,t)=>{let n=e;const r=t.split(ia),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=og(),n.nextPart.set(s,a)),n=a}return n},tC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,nC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},bu="!",lg=":",rC=[],cg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),oC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let y=0;y<u;y++){const m=o[y];if(s===0&&a===0){if(m===lg){i.push(o.slice(l,y)),l=y+1;continue}if(m==="/"){c=y;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(bu)?(f=d.slice(0,-1),p=!0):d.startsWith(bu)&&(f=d.slice(1),p=!0);const h=c&&c>l?c-l:void 0;return cg(i,p,f,h)};if(t){const o=t+lg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):cg(rC,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},iC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},sC=e=>({cache:nC(e.cacheSize),parseClassName:oC(e),sortModifiers:iC(e),...Gk(e)}),aC=/\s+/,lC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(aC);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!y,v=r(m?h.substring(0,y):h);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+bu:b,T=x+v;if(s.indexOf(T)>-1)continue;s.push(T);const E=o(v,m);for(let I=0;I<E.length;++I){const w=E[I];s.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},cC=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=ug(n))&&(o&&(o+=" "),o+=r);return o},ug=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ug(e[r]))&&(n&&(n+=" "),n+=t);return n},uC=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=sC(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=lC(l,n);return o(l,u),u};return i=s,(...l)=>i(cC(...l))},dC=[],$t=e=>{const t=n=>n[e]||dC;return t.isThemeGetter=!0,t},dg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fC=/^\d+\/\d+$/,pC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hC=/\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$/,mC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Do=e=>fC.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),xu=e=>e.endsWith("%")&&qe(e.slice(0,-1)),ur=e=>pC.test(e),vC=()=>!0,bC=e=>hC.test(e)&&!mC.test(e),pg=()=>!1,xC=e=>gC.test(e),wC=e=>yC.test(e),SC=e=>!Se(e)&&!Te(e),TC=e=>No(e,vg,pg),Se=e=>dg.test(e),eo=e=>No(e,bg,bC),wu=e=>No(e,AC,qe),hg=e=>No(e,gg,pg),EC=e=>No(e,yg,wC),sa=e=>No(e,xg,xC),Te=e=>fg.test(e),Bi=e=>Fo(e,bg),kC=e=>Fo(e,PC),mg=e=>Fo(e,gg),CC=e=>Fo(e,vg),IC=e=>Fo(e,yg),aa=e=>Fo(e,xg,!0),No=(e,t,n)=>{const r=dg.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fo=(e,t,n=!1)=>{const r=fg.exec(e);return r?r[1]?t(r[1]):n:!1},gg=e=>e==="position"||e==="percentage",yg=e=>e==="image"||e==="url",vg=e=>e==="length"||e==="size"||e==="bg-size",bg=e=>e==="length",AC=e=>e==="number",PC=e=>e==="family-name",xg=e=>e==="shadow",OC=uC(()=>{const e=$t("color"),t=$t("font"),n=$t("text"),r=$t("font-weight"),o=$t("tracking"),i=$t("leading"),s=$t("breakpoint"),a=$t("container"),l=$t("spacing"),c=$t("radius"),u=$t("shadow"),d=$t("inset-shadow"),f=$t("text-shadow"),p=$t("drop-shadow"),h=$t("blur"),y=$t("perspective"),m=$t("aspect"),v=$t("ease"),b=$t("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Te,Se],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[Te,Se,l],A=()=>[Do,"full","auto",...k()],O=()=>[Tr,"none","subgrid",Te,Se],N=()=>["auto",{span:["full",Tr,Te,Se]},Tr,Te,Se],M=()=>[Tr,"auto",Te,Se],$=()=>["auto","min","max","fr",Te,Se],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...k()],D=()=>[Do,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,Te,Se],V=()=>[...T(),mg,hg,{position:[Te,Se]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",CC,TC,{size:[Te,Se]}],U=()=>[xu,Bi,eo],G=()=>["","none","full",c,Te,Se],H=()=>["",qe,Bi,eo],ee=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[qe,xu,mg,hg],q=()=>["","none",h,Te,Se],Y=()=>["none",qe,Te,Se],Z=()=>["none",qe,Te,Se],pe=()=>[qe,Te,Se],R=()=>[Do,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ur],breakpoint:[ur],color:[vC],container:[ur],"drop-shadow":[ur],ease:["in","out","in-out"],font:[SC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ur],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ur],shadow:[ur],spacing:["px",qe],text:[ur],"text-shadow":[ur],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Do,Se,Te,m]}],container:["container"],columns:[{columns:[qe,Se,Te,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Tr,"auto",Te,Se]}],basis:[{basis:[Do,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Do,"auto","initial","none",Se]}],grow:[{grow:["",qe,Te,Se]}],shrink:[{shrink:["",qe,Te,Se]}],order:[{order:[Tr,"first","last","none",Te,Se]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Bi,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Te,wu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xu,Se]}],"font-family":[{font:[kC,Se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Te,Se]}],"line-clamp":[{"line-clamp":[qe,"none",Te,wu]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Te,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Te,eo]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[qe,"auto",Te,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tr,Te,Se],radial:["",Te,Se],conic:[Tr,Te,Se]},IC,EC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Te,Se]}],"outline-w":[{outline:["",qe,Bi,eo]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,aa,sa]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,aa,sa]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[qe,eo]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,aa,sa]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[qe,Te,Se]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Te,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Se]}],filter:[{filter:["","none",Te,Se]}],blur:[{blur:q()}],brightness:[{brightness:[qe,Te,Se]}],contrast:[{contrast:[qe,Te,Se]}],"drop-shadow":[{"drop-shadow":["","none",p,aa,sa]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",qe,Te,Se]}],"hue-rotate":[{"hue-rotate":[qe,Te,Se]}],invert:[{invert:["",qe,Te,Se]}],saturate:[{saturate:[qe,Te,Se]}],sepia:[{sepia:["",qe,Te,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Se]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Te,Se]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Te,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Te,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Te,Se]}],"backdrop-invert":[{"backdrop-invert":["",qe,Te,Se]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Te,Se]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Te,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Te,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Te,Se]}],ease:[{ease:["linear","initial",v,Te,Se]}],delay:[{delay:[qe,Te,Se]}],animate:[{animate:["none",b,Te,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Te,Se]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[Te,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,Se]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,Se]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[qe,Bi,eo,wu]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),dr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},_C=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Su=e=>Be.function(e),Pe=(...e)=>OC(nm(e)),wg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Hi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Sg=e=>e.scrollHeight>e.clientHeight,Wi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},MC=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},Tg=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,s=o.bottom<=r.bottom,a=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&s&&a&&l},cn=S.forwardRef(function(t,n){const r=t.as||"span";return g.jsx(r,{ref:n,...t,as:void 0})}),DC={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},NC=_o("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),FC=_o("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:DC,defaultVariants:{theme:"primary",size:"default"}}),la=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return g.jsxs(cn,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Pe(FC({size:s,theme:o?"loading":i}),t),children:[n?g.jsx("span",{"aria-hidden":"true",className:NC({theme:n})}):null,r,a.children]})}),LC=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return g.jsx("form",{...e,onSubmit:t})};var _t=function(){return _t=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},_t.apply(this,arguments)};function Tu(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 Eu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var qi=function(e){return e.replace(new RegExp(" ","g")," ")},Eg=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)},VC=function(e){return e.replace(/^0+([0-9]+)/,"$1")},kg=function(e,t,n){var r=e.length-2,o=VC(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Cg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ca=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},$C=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ku=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},zC=function(e){return e==="money"||e==="currency"},jC=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return _t(_t({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ua=function(e,t){var n=Eg(Cg(e),t.fraction.length),r="".concat(t.currency).concat(kg(n,t.group,t.decimal));return qi(r)},RC=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Tu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var h=jC(r,i,a);return h.currency=qi("".concat(h.currency.trim()," ")),h.literal=qi(h.literal.trim()),h},[r,i]),f=function(h){var y=ua(h.target.value,d),m=ca(y);h.target.value=y,h.target.setAttribute("data-number",m.toString()),l?.(h),m!==0&&(u.current.selectionEnd=y.length)};S.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var y=ua(h,d),m=ca(y);u.current.value=y,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l?.(_t(_t({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=y.length)}}},[d]);var p=c.defaultValue?ua(c.defaultValue,d):void 0;return S.createElement("input",_t({},c,{value:typeof c.value=="string"?ua(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),BC=1,HC=function(e){return e==="percentage"||e==="percent"||e==="percentual"},WC=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return _t(_t({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},da=function(e,t){var n=Eg(Cg(e),t.fraction.length),r="".concat(kg(n,t.group,t.decimal)," ").concat(t.percentSign);return qi(r)},qC=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Tu(e,["locale","mask","onChange","onKeyUp"]),a=S.useRef(null),l=Eu(S.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return a.current}),S.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(da(b,d))},[s.value]);var d=S.useMemo(function(){var v=WC(r);return v.percentSign=qi("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-BC,p=function(v){var b,x=a.current;x&&(x.setSelectionRange(f,f),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},h=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,T=b.selectionEnd,E=x!==T,I=f<x;!E&&I&&p()}i?.(v)},y=function(v){var b=da(v.target.value,d),x=ca(b);u(b),v.target.value=b,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var b=da(v,d),x=ca(b);u(b),a.current.value=b,a.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(_t(_t({},T),{target:a.current,currentTarget:a.current}))}}},[]),S.useEffect(function(){return p()},[c]);var m=s.defaultValue?da(s.defaultValue,d):void 0;return S.createElement("input",_t({},s,{defaultValue:m,inputMode:"decimal",onChange:y,onFocus:p,onKeyUp:h,ref:a,type:"text"}))}),Ui={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},UC=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=fa[i];s===void 0?r.push(i.replace(Ui.dots,"\\.").replace(Ui.openParenthesis,"\\(").replace(Ui.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ui.leadingBars,"\\")},Gi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Cu(o,n);var i=UC(o);return n?"^".concat(i,"$"):i},GC=function(e){return e.replace(Ui.escape,"\\$&")},Cu=function(e,t){var n=e.map(function(r){return typeof r=="string"?GC(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},fa={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]/}},YC=/\d/,Ig="(dd) 9dddd-dddd",Ag="(dd) dddd-dddd",Pg="ddd.ddd.ddd-dd",Og="dd.ddd.ddd/dddd-dd",pa=function(e){return e.replace(/\D/g,"")},KC=["2",/[0-3]/,":",/[0-5]/,/\d/],ZC=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Pg,isoDate:"dddd-dd-dd",cnpj:Og,telephone:Ag,cellphone:Ig,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return pa(e).length<=11?Pg:Og},int:function(e){return e===void 0&&(e=""),YC.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=pa(e);return t.length<11?Ag:Ig},time:function(e){var t=pa(e),n=t[0];return n==="2"?KC:ZC}},rn=function(e,t,n){var r;return n===void 0&&(n={}),_t({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Gi(e,"",!0),infinity:n.infinity},n)},Kt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:pa}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function _g(e,t,n,r){var o,i;r===void 0&&(r=fa);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(a+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Mg=function(e){return e},XC=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Gi(e,n,t));return r.test(n)};function QC(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var JC=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=Tu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=S.useRef(null);S.useImperativeHandle(t,function(){return h.current});var y=ku(a),m=ku(d),v=ku(u),b=S.useRef(XC(u,i,p.value||p.defaultValue)),x=f??"input",T=Eu(S.useState(""),2),E=T[0],I=T[1],w=QC(E),k=S.useCallback(function(F,z){var D,C,V=(D=F??z)!==null&&D!==void 0?D:"";if(u===void 0)return V;var L=(C=V?.toString())!==null&&C!==void 0?C:"";return _g(L,typeof u=="function"?u(L):u,s??Mg,c??fa)},[s,u,c]),A=Eu(S.useState(function(){return k(p.value,p.defaultValue)}),2),O=A[0],N=A[1],M=k(p.defaultValue,p.defaultValue),$=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var F=u(O);return Array.isArray(F)?Cu(F,i):Gi(u,O,i)}return typeof u=="string"?Gi(u,O,i):Cu(u,i)},[l,O,i,u]);S.useEffect(function(){if(p.value!==void 0){var F=k(p.value,p.defaultValue);N(F),h.current!==null&&(h.current.value=F)}},[p.value,u,s,p.defaultValue]);var _=function(F){var z,D,C,V,L,B=F.currentTarget,U=F.target.value;if(v.current===void 0)return N(U),(z=m.current)===null||z===void 0||z.call(m,U),(D=y.current)===null||D===void 0||D.call(y,F),d?.(U);var G=new RegExp(Gi(v.current,U,i)),H=(C=B.selectionEnd)!==null&&C!==void 0?C:0,ee=function(Z,pe,R){if(Z.type!=="number")return Z.setSelectionRange(pe,R)};if(r&&b.current&&U.length>=O.length)return B.value=O,ee(B,H-1,H-1);var ie=!1;U.length<w.length&&(b.current=!1,ie=!0),G.test(U)&&(b.current=!0);var te=H,q=U[te-1],Y=_g(U,typeof v.current=="function"?v.current(U):v.current,s??Mg,c??fa);for(B.value=Y,N(Y);te<Y.length&&Y.charAt(te-1)!==q;)te+=1;ie?ee(B,H,H):ee(B,te,te),F.target.value=Y,I(Y),(V=m.current)===null||V===void 0||V.call(m,Y),(L=y.current)===null||L===void 0||L.call(y,F)};return S.createElement(x,_t({},p,{ref:h,pattern:$,onChange:_,defaultValue:Dg(p.defaultValue)?M:void 0,value:Dg(p.value)?k(p.value,p.value):p.value}))}),Dg=function(e){return typeof e=="string"},Ng=S.forwardRef(function(e,t){return zC(e.mask)?S.createElement(RC,_t({},e,{mask:void 0,ref:t})):HC(e.mask)?S.createElement(qC,_t({},e,{mask:void 0,ref:t})):S.createElement(JC,_t({},e,{ref:t}))}),on=function(e){return function(t){return S.createElement(Ng,_t({},e,t))}};on(Kt.cellTelephone),on(Kt.cellphone),on(Kt.cep),on(Kt.cnpj),on(Kt.color),on(Kt.cpf),on(Kt.cpfCnpj),on(Kt.creditCard),on(Kt.date),on(Kt.int),on(Kt.isoDate),on(Kt.telephone),on(Kt.time),on(Kt.uuid);var Fg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&$C(Kt,t.mask)?Kt[t.mask]:{mask:t.mask}},[t.mask]),o=_t(_t({},t),r);return S.createElement(Ng,_t({},o,{ref:n}))});const Lg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const eI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const tI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Vg=e=>{const t=tI(e);return t.charAt(0).toUpperCase()+t.slice(1)};var nI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const rI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const oI=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>S.createElement("svg",{ref:l,...nI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Lg("lucide",o),...!i&&!rI(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const et=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(oI,{ref:i,iconNode:t,className:Lg(`lucide-${eI(Vg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Vg(e),n};const iI=et("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const sI=et("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const $g=et("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const aI=et("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const lI=et("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Iu=et("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const cI=et("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Au=et("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Pu=et("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const uI=et("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const dI=et("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const fI=et("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const zg=et("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const jg=et("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const Rg=et("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const pI=et("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const hI=et("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const Ou=et("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const mI=et("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Er=et("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const gI=et("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const yI=et("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const vI=et("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const _u=et("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const bI=et("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const xI=et("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Mu=et("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const ha=et("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Du=et("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const wI=et("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const Lo=et("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ma={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>)`},kr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(kr(s,t,n,a))},[]),Bg=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:Bg(s,t,n,a)}},{}),Hg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ga=(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)},SI={default:e=>ga(e,{result:Hg.default}),dark:e=>ga(e,{result:Hg.dark})},Vo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},TI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Nu=(e,t)=>{const n=kr(e.colors,Vo(t?.colors)),r=kr(e.spacing,Vo(t?.spacing)),o=kr(e.rounded,Vo(t?.rounded)),i=kr(e.shadow,Vo(t?.rounded)),s=kr(e.zIndex,Vo(t?.zIndex??TI)),a=e.custom?kr(e.custom,Vo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},EI=(e,t)=>ga(Nu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),kI=(e,t)=>Nu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),CI=(e,t)=>ga(Nu(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ya={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>g.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},va={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},to=S.createContext({parser:ma.hsla,tweaks:va,floatingRef:void 0,map:ya,locale:void 0}),At=()=>{const e=S.useContext(to);return e?e.map:ya},Fu=()=>{const e=S.useContext(to);return e?e.tweaks:va};function ba(){return typeof window<"u"}function Cr(e){return xa(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(xa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xa(e){return ba()?e instanceof Node||e instanceof Wt(e).Node:!1}function tt(e){return ba()?e instanceof Element||e instanceof Wt(e).Element:!1}function Pt(e){return ba()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function Yi(e){return!ba()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}const II=new Set(["inline","contents"]);function Ki(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=un(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!II.has(o)}const AI=new Set(["table","td","th"]);function PI(e){return AI.has(Cr(e))}const OI=[":popover-open",":modal"];function wa(e){return OI.some(t=>{try{return e.matches(t)}catch{return!1}})}const _I=["transform","translate","scale","rotate","perspective"],MI=["transform","translate","scale","rotate","perspective","filter"],DI=["paint","layout","strict","content"];function Lu(e){const t=Sa(),n=tt(e)?un(e):e;return _I.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)||MI.some(r=>(n.willChange||"").includes(r))||DI.some(r=>(n.contain||"").includes(r))}function NI(e){let t=pr(e);for(;Pt(t)&&!fr(t);){if(Lu(t))return t;if(wa(t))return null;t=pr(t)}return null}function Sa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const FI=new Set(["html","body","#document"]);function fr(e){return FI.has(Cr(e))}function un(e){return Wt(e).getComputedStyle(e)}function Ta(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pr(e){if(Cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yi(e)&&e.host||Bn(e);return Yi(t)?t.host:t}function Wg(e){const t=pr(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&Ki(t)?t:Wg(t)}function Ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){const a=Vu(s);return t.concat(s,s.visualViewport||[],Ki(o)?o:[],a&&n?Ir(a):[])}return t.concat(o,Ir(o,[],n))}function Vu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const LI=["top","right","bottom","left"],qg=["start","end"],Ug=LI.reduce((e,t)=>e.concat(t,t+"-"+qg[0],t+"-"+qg[1]),[]),Ar=Math.min,dn=Math.max,Ea=Math.round,$o=Math.floor,Hn=e=>({x:e,y:e}),VI={left:"right",right:"left",bottom:"top",top:"bottom"},$I={start:"end",end:"start"};function $u(e,t,n){return dn(e,Ar(t,n))}function no(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function An(e){return e.split("-")[1]}function Gg(e){return e==="x"?"y":"x"}function zu(e){return e==="y"?"height":"width"}const zI=new Set(["top","bottom"]);function hr(e){return zI.has(Wn(e))?"y":"x"}function ju(e){return Gg(hr(e))}function Yg(e,t,n){n===void 0&&(n=!1);const r=An(e),o=ju(e),i=zu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ca(s)),[s,Ca(s)]}function jI(e){const t=Ca(e);return[ka(e),t,ka(t)]}function ka(e){return e.replace(/start|end/g,t=>$I[t])}const Kg=["left","right"],Zg=["right","left"],RI=["top","bottom"],BI=["bottom","top"];function HI(e,t,n){switch(e){case"top":case"bottom":return n?t?Zg:Kg:t?Kg:Zg;case"left":case"right":return t?RI:BI;default:return[]}}function WI(e,t,n,r){const o=An(e);let i=HI(Wn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ka)))),i}function Ca(e){return e.replace(/left|right|bottom|top/g,t=>VI[t])}function qI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xg(e){return typeof e!="number"?qI(e):{top:e,right:e,bottom:e,left:e}}function Ia(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var UI=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Aa=UI.join(","),Qg=typeof Element>"u",zo=Qg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Pa=!Qg&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Oa=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Oa(t.parentNode));return s},GI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Jg=function(t,n,r){if(Oa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Aa));return n&&zo.call(t,Aa)&&o.unshift(t),o=o.filter(r),o},_a=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Oa(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=_a(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=zo.call(s,Aa);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!Oa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=_a(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},ey=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ty=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||GI(t))&&!ey(t)?0:t.tabIndex},YI=function(t,n){var r=ty(t);return r<0&&n&&!ey(t)?0:r},KI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ny=function(t){return t.tagName==="INPUT"},ZI=function(t){return ny(t)&&t.type==="hidden"},XI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},JI=function(t){if(!t.name)return!0;var n=t.form||Pa(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=QI(o,t.form);return!i||i===t},eA=function(t){return ny(t)&&t.type==="radio"},tA=function(t){return eA(t)&&!JI(t)},nA=function(t){var n,r=t&&Pa(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Pa(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},ry=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},rA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=zo.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(zo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Pa(t);if(c&&!c.shadowRoot&&o(c)===!0)return ry(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(nA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ry(t);return!1},oA=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 zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ru=function(t,n){return!(n.disabled||ZI(n)||rA(n,t)||XI(n)||oA(n))},Bu=function(t,n){return!(tA(n)||ty(n)<0||!Ru(t,n))},iA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},oy=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=YI(a,s),c=s?oy(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(KI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},jo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_a([t],n.includeContainer,{filter:Bu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:iA}):r=Jg(t,n.includeContainer,Bu.bind(null,n)),oy(r)},sA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_a([t],n.includeContainer,{filter:Ru.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Jg(t,n.includeContainer,Ru.bind(null,n)),r},iy=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return zo.call(t,Aa)===!1?!1:Bu(n,t)};function Hu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function sy(){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 ay(){return/apple/i.test(navigator.vendor)}function Wu(){const e=/android/i;return e.test(Hu())||e.test(sy())}function aA(){return Hu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function ly(){return sy().includes("jsdom/")}const cy="data-floating-ui-focusable",lA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",qu="ArrowLeft",Uu="ArrowRight",cA="ArrowUp",uA="ArrowDown";function qn(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 Bt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Gu(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 dA(e){return e.matches("html,body")}function qt(e){return e?.ownerDocument||document}function Yu(e){return Pt(e)&&e.matches(lA)}function Ku(e){return e?e.getAttribute("role")==="combobox"&&Yu(e):!1}function fA(e){if(!e||ly())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ma(e){return e?e.hasAttribute(cy)?e:e.querySelector("["+cy+"]")||e:null}function ro(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ro(e,o.id,n)])}function pA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),ro(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function uy(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Ut(e){e.preventDefault(),e.stopPropagation()}function hA(e){return"nativeEvent"in e}function dy(e){return e.mozInputSource===0&&e.isTrusted?!0:Wu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fy(e){return ly()?!1:!Wu()&&e.width===0&&e.height===0||Wu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ro(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var mA=typeof document<"u",gA=function(){},nt=mA?S.useLayoutEffect:gA;const yA={...P};function Ht(e){const t=P.useRef(e);return nt(()=>{t.current=e}),t}const vA=yA.useInsertionEffect||(e=>e());function kt(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return vA(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Da(e,t,n){return Math.floor(e/t)!==n}function Zi(e,t){return t<0||t>=e.current.length}function Zu(e,t){return Zt(e,{disabledIndices:t})}function py(e,t){return Zt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Zt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,s=n;do s+=r?-i:i;while(s>=0&&s<=e.current.length-1&&Na(e,s,o));return s}function bA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===cA){if(d&&Ut(n),u===-1)f=c;else if(f=Zt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||f<0)){const p=u%s,h=c%s,y=c-(h-p);h===p?f=c:f=h>p?y:y-s}Zi(e,f)&&(f=u)}if(n.key===uA&&(d&&Ut(n),u===-1?f=l:(f=Zt(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(f=Zt(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),Zi(e,f)&&(f=u)),r==="both"){const p=$o(u/s);n.key===(i?qu:Uu)&&(d&&Ut(n),u%s!==s-1?(f=Zt(e,{startingIndex:u,disabledIndices:a}),o&&Da(f,s,p)&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a})),Da(f,s,p)&&(f=u)),n.key===(i?Uu:qu)&&(d&&Ut(n),u%s!==0?(f=Zt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Da(f,s,p)&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Da(f,s,p)&&(f=u));const h=$o(c/s)===p;Zi(e,f)&&(o&&h?f=n.key===(i?Uu:qu)?c:Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function xA(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function wA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function SA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Na(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Xi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hy(e,t){const n=jo(e,Xi()),r=n.length;if(r===0)return;const o=qn(qt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function my(e){return hy(qt(e).body,1)||e}function gy(e){return hy(qt(e).body,-1)||e}function Qi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Bt(n,r)}function TA(e){jo(e,Xi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function yy(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function vy(e,t,n){let{reference:r,floating:o}=e;const i=hr(t),s=ju(t),a=zu(s),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(An(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}async function EA(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=no(t,e),h=Xg(p),m=a[f?d==="floating"?"reference":"floating":d],v=Ia(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-E.top+h.top)/T.y,bottom:(E.bottom-v.bottom+h.bottom)/T.y,left:(v.left-E.left+h.left)/T.x,right:(E.right-v.right+h.right)/T.x}}const kA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=vy(c,r,l),f=r,p={},h=0;for(let m=0;m<a.length;m++){var y;const{name:v,fn:b}=a[m],{x,y:T,data:E,reset:I}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:{...s,detectOverflow:(y=s.detectOverflow)!=null?y:EA},elements:{reference:e,floating:t}});u=x??u,d=T??d,p={...p,[v]:{...p[v],...E}},I&&h<=50&&(h++,typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:d}=vy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}},CA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=no(e,t)||{};if(c==null)return{};const d=Xg(u),f={x:n,y:r},p=ju(o),h=zu(p),y=await s.getDimensions(c),m=p==="y",v=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",T=i.reference[h]+i.reference[p]-f[p]-i.floating[h],E=f[p]-i.reference[p],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(I)))&&(w=a.floating[x]||i.floating[h]);const k=T/2-E/2,A=w/2-y[h]/2-1,O=Ar(d[v],A),N=Ar(d[b],A),M=O,$=w-y[h]-N,_=w/2-y[h]/2+k,F=$u(M,_,$),z=!l.arrow&&An(o)!=null&&_!==F&&i.reference[h]/2-(_<M?O:N)-y[h]/2<0,D=z?_<M?_-M:_-$:0;return{[p]:f[p]+D,data:{[p]:F,centerOffset:_-F-D,...z&&{alignmentOffset:D}},reset:z}}});function IA(e,t,n){return(e?[...n.filter(o=>An(o)===e),...n.filter(o=>An(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?An(o)===e||(t?ka(o)!==o:!1):!0)}const AA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Ug,autoAlignment:p=!0,...h}=no(e,t),y=d!==void 0||f===Ug?IA(d||null,p,f):f,m=await l.detectOverflow(t,h),v=((n=s.autoPlacement)==null?void 0:n.index)||0,b=y[v];if(b==null)return{};const x=Yg(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:y[0]}};const T=[m[Wn(b)],m[x[0]],m[x[1]]],E=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:T}],I=y[v+1];if(I)return{data:{index:v+1,overflows:E},reset:{placement:I}};const w=E.map(O=>{const N=An(O.placement);return[O.placement,N&&u?O.overflows.slice(0,2).reduce((M,$)=>M+$,0):O.overflows[0],O.overflows]}).sort((O,N)=>O[1]-N[1]),A=((o=w.filter(O=>O[2].slice(0,An(O[0])?2:3).every(N=>N<=0))[0])==null?void 0:o[0])||w[0][0];return A!==a?{data:{index:v+1,overflows:E},reset:{placement:A}}:{}}}},PA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0,...m}=no(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Wn(o),b=hr(a),x=Wn(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!y?[Ca(a)]:jI(a)),I=h!=="none";!f&&I&&E.push(...WI(a,y,h,T));const w=[a,...E],k=await l.detectOverflow(t,m),A=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(k[v]),d){const _=Yg(o,s,T);A.push(k[_[0]],k[_[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(_=>_<=0)){var N,M;const _=(((N=i.flip)==null?void 0:N.index)||0)+1,F=w[_];if(F&&(!(d==="alignment"?b!==hr(F):!1)||O.every(C=>hr(C.placement)===b?C.overflows[0]>0:!0)))return{data:{index:_,overflows:O},reset:{placement:F}};let z=(M=O.filter(D=>D.overflows[0]<=0).sort((D,C)=>D.overflows[1]-C.overflows[1])[0])==null?void 0:M.placement;if(!z)switch(p){case"bestFit":{var $;const D=($=O.filter(C=>{if(I){const V=hr(C.placement);return V===b||V==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(V=>V>0).reduce((V,L)=>V+L,0)]).sort((C,V)=>C[1]-V[1])[0])==null?void 0:$[0];D&&(z=D);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},OA=new Set(["left","top"]);async function _A(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Wn(n),a=An(n),l=hr(n)==="y",c=OA.has(s)?-1:1,u=i&&l?-1:1,d=no(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const MA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await _A(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},DA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...c}=no(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=hr(Wn(o)),p=Gg(f);let h=u[p],y=u[f];if(s){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+d[v],T=h-d[b];h=$u(x,h,T)}if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=y+d[v],T=y-d[b];y=$u(x,y,T)}const m=l.fn({...t,[p]:h,[f]:y});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:s,[f]:a}}}}}},NA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=no(e,t),u=await s.detectOverflow(t,c),d=Wn(o),f=An(o),p=hr(o)==="y",{width:h,height:y}=i.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,m=f==="end"?"top":"bottom");const b=y-u.top-u.bottom,x=h-u.left-u.right,T=Ar(y-u[m],b),E=Ar(h-u[v],x),I=!t.middlewareData.shift;let w=T,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const O=dn(u.left,0),N=dn(u.right,0),M=dn(u.top,0),$=dn(u.bottom,0);p?k=h-2*(O!==0||N!==0?O+N:dn(u.left,u.right)):w=y-2*(M!==0||$!==0?M+$:dn(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:w});const A=await s.getDimensions(a.floating);return h!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function by(e){const t=un(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ea(n)!==i||Ea(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Xu(e){return tt(e)?e:e.contextElement}function Bo(e){const t=Xu(e);if(!Pt(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=by(t);let s=(i?Ea(n.width):n.width)/r,a=(i?Ea(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const FA=Hn(0);function xy(e){const t=Wt(e);return!Sa()||!t.visualViewport?FA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function oo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Xu(e);let s=Hn(1);t&&(r?tt(r)&&(s=Bo(r)):s=Bo(e));const a=LA(i,n,r)?xy(i):Hn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Wt(i),p=r&&tt(r)?Wt(r):r;let h=f,y=Vu(h);for(;y&&r&&p!==h;){const m=Bo(y),v=y.getBoundingClientRect(),b=un(y),x=v.left+(y.clientLeft+parseFloat(b.paddingLeft))*m.x,T=v.top+(y.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=T,h=Wt(y),y=Vu(h)}}return Ia({width:u,height:d,x:l,y:c})}function Fa(e,t){const n=Ta(e).scrollLeft;return t?t.left+n:oo(Bn(e)).left+n}function wy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function VA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Bn(r),a=t?wa(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Pt(r);if((d||!d&&!i)&&((Cr(r)!=="body"||Ki(s))&&(l=Ta(r)),Pt(r))){const p=oo(r);c=Bo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=s&&!d&&!i?wy(s,l):Hn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function $A(e){return Array.from(e.getClientRects())}function zA(e){const t=Bn(e),n=Ta(e),r=e.ownerDocument.body,o=dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Fa(e);const a=-n.scrollTop;return un(r).direction==="rtl"&&(s+=dn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sy=25;function jA(e,t){const n=Wt(e),r=Bn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Sa();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Fa(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=Sy&&(i-=h)}else c<=Sy&&(i+=c);return{width:i,height:s,x:a,y:l}}const RA=new Set(["absolute","fixed"]);function BA(e,t){const n=oo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pt(e)?Bo(e):Hn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Ty(e,t,n){let r;if(t==="viewport")r=jA(e,n);else if(t==="document")r=zA(Bn(e));else if(tt(t))r=BA(t,n);else{const o=xy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ia(r)}function Ey(e,t){const n=pr(e);return n===t||!tt(n)||fr(n)?!1:un(n).position==="fixed"||Ey(n,t)}function HA(e,t){const n=t.get(e);if(n)return n;let r=Ir(e,[],!1).filter(a=>tt(a)&&Cr(a)!=="body"),o=null;const i=un(e).position==="fixed";let s=i?pr(e):e;for(;tt(s)&&!fr(s);){const a=un(s),l=Lu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&RA.has(o.position)||Ki(s)&&!l&&Ey(e,s))?r=r.filter(u=>u!==s):o=a,s=pr(s)}return t.set(e,r),r}function WA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?wa(t)?[]:HA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Ty(t,u,o);return c.top=dn(d.top,c.top),c.right=Ar(d.right,c.right),c.bottom=Ar(d.bottom,c.bottom),c.left=dn(d.left,c.left),c},Ty(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qA(e){const{width:t,height:n}=by(e);return{width:t,height:n}}function UA(e,t,n){const r=Pt(t),o=Bn(t),i=n==="fixed",s=oo(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Fa(o)}if(r||!r&&!i)if((Cr(t)!=="body"||Ki(o))&&(a=Ta(t)),r){const p=oo(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?wy(o,a):Hn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function Qu(e){return un(e).position==="static"}function ky(e,t){if(!Pt(e)||un(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function Cy(e,t){const n=Wt(e);if(wa(e))return n;if(!Pt(e)){let o=pr(e);for(;o&&!fr(o);){if(tt(o)&&!Qu(o))return o;o=pr(o)}return n}let r=ky(e,t);for(;r&&PI(r)&&Qu(r);)r=ky(r,t);return r&&fr(r)&&Qu(r)&&!Lu(r)?n:r||NI(e)||n}const GA=async function(e){const t=this.getOffsetParent||Cy,n=this.getDimensions,r=await n(e.floating);return{reference:UA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function YA(e){return un(e).direction==="rtl"}const KA={convertOffsetParentRelativeRectToViewportRelativeRect:VA,getDocumentElement:Bn,getClippingRect:WA,getOffsetParent:Cy,getElementRects:GA,getClientRects:$A,getDimensions:qA,getScale:Bo,isElement:tt,isRTL:YA};function Iy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ZA(e,t){let n=null,r;const o=Bn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const h=$o(d),y=$o(o.clientWidth-(u+f)),m=$o(o.clientHeight-(d+p)),v=$o(u),x={rootMargin:-h+"px "+-y+"px "+-m+"px "+-v+"px",threshold:dn(0,Ar(1,l))||1};let T=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!T)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!Iy(c,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),i}function io(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Xu(e),u=o||i?[...c?Ir(c):[],...Ir(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?ZA(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let h,y=l?oo(e):null;l&&m();function m(){const v=oo(e);y&&!Iy(y,v)&&n(),y=v,h=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const XA=MA,QA=AA,JA=DA,eP=PA,tP=NA,Ay=CA,nP=(e,t,n)=>{const r=new Map,o={platform:KA,...n},i={...o.platform,_c:r};return kA(e,t,{...o,platform:i})};var rP=typeof document<"u",oP=function(){},La=rP?S.useLayoutEffect:oP;function Va(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(!Va(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)&&!Va(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Py(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oy(e,t){const n=Py(e);return Math.round(t*n)/n}function Ju(e){const t=P.useRef(e);return La(()=>{t.current=e}),t}function iP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Va(f,r)||p(r);const[h,y]=P.useState(null),[m,v]=P.useState(null),b=P.useCallback(C=>{C!==I.current&&(I.current=C,y(C))},[]),x=P.useCallback(C=>{C!==w.current&&(w.current=C,v(C))},[]),T=i||h,E=s||m,I=P.useRef(null),w=P.useRef(null),k=P.useRef(u),A=l!=null,O=Ju(l),N=Ju(o),M=Ju(c),$=P.useCallback(()=>{if(!I.current||!w.current)return;const C={placement:t,strategy:n,middleware:f};N.current&&(C.platform=N.current),nP(I.current,w.current,C).then(V=>{const L={...V,isPositioned:M.current!==!1};_.current&&!Va(k.current,L)&&(k.current=L,cr.flushSync(()=>{d(L)}))})},[f,t,n,N,M]);La(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const _=P.useRef(!1);La(()=>(_.current=!0,()=>{_.current=!1}),[]),La(()=>{if(T&&(I.current=T),E&&(w.current=E),T&&E){if(O.current)return O.current(T,E,$);$()}},[T,E,$,O,A]);const F=P.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=P.useMemo(()=>({reference:T,floating:E}),[T,E]),D=P.useMemo(()=>{const C={position:n,left:0,top:0};if(!z.floating)return C;const V=Oy(z.floating,u.x),L=Oy(z.floating,u.y);return a?{...C,transform:"translate("+V+"px, "+L+"px)",...Py(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:L}},[n,a,z.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:F,elements:z,floatingStyles:D}),[u,$,F,z,D])}const sP=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?Ay({element:r.current,padding:o}).fn(n):{}:r?Ay({element:r,padding:o}).fn(n):{}}}},Ho=(e,t)=>({...XA(e),options:[e,t]}),$a=(e,t)=>({...JA(e),options:[e,t]}),za=(e,t)=>({...eP(e),options:[e,t]}),_y=(e,t)=>({...tP(e),options:[e,t]}),My=(e,t)=>({...QA(e),options:[e,t]}),ed=(e,t)=>({...sP(e),options:[e,t]});function aP(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Dy=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function lP(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Set),s=P.useCallback(c=>{i(u=>new Set(u).add(c))},[]),a=P.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=P.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(aP).forEach((d,f)=>{c.set(d,f)}),c},[o]);return g.jsx(Dy.Provider,{value:P.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function Ny(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=P.useContext(Dy),[a,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const p=t!==void 0;s.current[a]=p?t:(f=d?.textContent)!=null?f:null}},[a,i,s,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:a??-1}),[a,u])}const cP="data-floating-ui-focusable",Fy="active",Ly="selected",Ji="ArrowLeft",es="ArrowRight",Vy="ArrowUp",ja="ArrowDown",uP={...P};let $y=!1,dP=0;const zy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dP++;function fP(){const[e,t]=P.useState(()=>$y?zy():void 0);return nt(()=>{e==null&&t(zy())},[]),P.useEffect(()=>{$y=!0},[]),e}const ts=uP.useId||fP;let ns;process.env.NODE_ENV!=="production"&&(ns=new Set);function Ra(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.warn(o)}}function pP(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.error(o)}}const td=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...y}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Ra("The `ref` prop is required for `FloatingArrow`."));const v=ts(),[b,x]=P.useState(!1);if(nt(()=>{if(!o)return;un(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,E]=r.split("-"),I=T==="top"||T==="bottom";let w=d;(I&&s!=null&&s.x||!I&&s!=null&&s.y)&&(w=null);const k=u*2,A=k/2,O=a/2*(c/-8+1),N=l/2*c/4,M=!!p,$=w&&E==="end"?"bottom":"top";let _=w&&E==="end"?"right":"left";w&&b&&(_=E==="end"?"left":"right");const F=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",D=p||"M0,0"+(" H"+a)+(" L"+(a-O)+","+(l-N))+(" Q"+a/2+","+l+" "+O+","+(l-N))+" Z",C={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[T];return g.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:M?a:a+k,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[_]:F,[$]:z,[T]:I||M?"100%":"calc(100% - "+k/2+"px)",transform:[C,h].filter(V=>!!V).join(" "),...y},children:[k>0&&g.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:D}),g.jsx("path",{stroke:k&&!p?m.fill:"none",d:D}),g.jsx("clipPath",{id:v,children:g.jsx("rect",{x:-A,y:A*(M?-1:1),width:a+k,height:a})})]})});function jy(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Ry=P.createContext(null),By=P.createContext(null),Pr=()=>{var e;return((e=P.useContext(Ry))==null?void 0:e.id)||null},Or=()=>P.useContext(By);function hP(e){const t=ts(),n=Or(),o=Pr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function mP(e){const{children:t,id:n}=e,r=Pr();return g.jsx(Ry.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function gP(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(s=>{n.current=[...n.current,s]},[]),o=P.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),[i]=P.useState(()=>jy());return g.jsx(By.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function so(e){return"data-floating-ui-"+e}function Gt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Hy=so("safe-polygon");function nd(e,t,n){if(n&&!Ro(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function rd(e){return typeof e=="function"?e():e}function Wy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Or(),h=Pr(),y=Ht(c),m=Ht(l),v=Ht(n),b=Ht(d),x=P.useRef(),T=P.useRef(-1),E=P.useRef(),I=P.useRef(-1),w=P.useRef(!0),k=P.useRef(!1),A=P.useRef(()=>{}),O=P.useRef(!1),N=kt(()=>{var D;const C=(D=o.current.openEvent)==null?void 0:D.type;return C?.includes("mouse")&&C!=="mousedown"});P.useEffect(()=>{if(!a)return;function D(C){let{open:V}=C;V||(Gt(T),Gt(I),w.current=!0,O.current=!1)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[a,i]),P.useEffect(()=>{if(!a||!y.current||!n)return;function D(V){N()&&r(!1,V,"hover")}const C=qt(s.floating).documentElement;return C.addEventListener("mouseleave",D),()=>{C.removeEventListener("mouseleave",D)}},[s.floating,n,r,a,y,N]);const M=P.useCallback(function(D,C,V){C===void 0&&(C=!0),V===void 0&&(V="hover");const L=nd(m.current,"close",x.current);L&&!E.current?(Gt(T),T.current=window.setTimeout(()=>r(!1,D,V),L)):C&&(Gt(T),r(!1,D,V))},[m,r]),$=kt(()=>{A.current(),E.current=void 0}),_=kt(()=>{if(k.current){const D=qt(s.floating).body;D.style.pointerEvents="",D.removeAttribute(Hy),k.current=!1}}),F=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);P.useEffect(()=>{if(!a)return;function D(U){if(Gt(T),w.current=!1,u&&!Ro(x.current)||rd(b.current)>0&&!nd(m.current,"open"))return;const G=nd(m.current,"open",x.current);G?T.current=window.setTimeout(()=>{v.current||r(!0,U,"hover")},G):n||r(!0,U,"hover")}function C(U){if(F()){_();return}A.current();const G=qt(s.floating);if(Gt(I),O.current=!1,y.current&&o.current.floatingContext){n||Gt(T),E.current=y.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){_(),$(),F()||M(U,!0,"safe-polygon")}});const ee=E.current;G.addEventListener("mousemove",ee),A.current=()=>{G.removeEventListener("mousemove",ee)};return}(x.current!=="touch"||!Bt(s.floating,U.relatedTarget))&&M(U)}function V(U){F()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){_(),$(),F()||M(U)}})(U))}function L(){Gt(T)}function B(U){F()||M(U,!1)}if(tt(s.domReference)){const U=s.domReference,G=s.floating;return n&&U.addEventListener("mouseleave",V),f&&U.addEventListener("mousemove",D,{once:!0}),U.addEventListener("mouseenter",D),U.addEventListener("mouseleave",C),G&&(G.addEventListener("mouseleave",V),G.addEventListener("mouseenter",L),G.addEventListener("mouseleave",B)),()=>{n&&U.removeEventListener("mouseleave",V),f&&U.removeEventListener("mousemove",D),U.removeEventListener("mouseenter",D),U.removeEventListener("mouseleave",C),G&&(G.removeEventListener("mouseleave",V),G.removeEventListener("mouseenter",L),G.removeEventListener("mouseleave",B))}}},[s,a,e,u,f,M,$,_,r,n,v,p,m,y,o,F,b]),nt(()=>{var D;if(a&&n&&(D=y.current)!=null&&(D=D.__options)!=null&&D.blockPointerEvents&&N()){k.current=!0;const V=s.floating;if(tt(s.domReference)&&V){var C;const L=qt(s.floating).body;L.setAttribute(Hy,"");const B=s.domReference,U=p==null||(C=p.nodesRef.current.find(G=>G.id===h))==null||(C=C.context)==null?void 0:C.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",B.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{L.style.pointerEvents="",B.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,h,s,p,y,N]),nt(()=>{n||(x.current=void 0,O.current=!1,$(),_())},[n,$,_]),P.useEffect(()=>()=>{$(),Gt(T),Gt(I),_()},[a,s.domReference,$,_]);const z=P.useMemo(()=>{function D(C){x.current=C.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(C){const{nativeEvent:V}=C;function L(){!w.current&&!v.current&&r(!0,V,"hover")}u&&!Ro(x.current)||n||rd(b.current)===0||O.current&&C.movementX**2+C.movementY**2<2||(Gt(I),x.current==="touch"?L():(O.current=!0,I.current=window.setTimeout(L,rd(b.current))))}}},[u,r,n,v,b]);return P.useMemo(()=>a?{reference:z}:{},[a,z])}let qy=0;function ao(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qy);const i=()=>e?.focus({preventScroll:n});o?i():qy=requestAnimationFrame(i)}function od(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function vP(e){return e?.ownerDocument||document}const Wo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Uy(e){return e==="inert"?Wo.inert:e==="aria-hidden"?Wo["aria-hidden"]:Wo.none}let Ba=new WeakSet,Ha={},id=0;const bP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Gy=e=>e&&(e.host||Gy(e.parentNode)),xP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Gy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function wP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=xP(t,e),a=new Set,l=new Set(s),c=[];Ha[o]||(Ha[o]=new WeakMap);const u=Ha[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(Cr(h)!=="script")if(a.has(h))f(h);else{const y=i?h.getAttribute(i):null,m=y!==null&&y!=="false",v=Uy(i),b=(v.get(h)||0)+1,x=(u.get(h)||0)+1;v.set(h,b),u.set(h,x),c.push(h),b===1&&m&&Ba.add(h),x===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,i==="inert"?"":"true")}})}return id++,()=>{c.forEach(p=>{const h=Uy(i),m=(h.get(p)||0)-1,v=(u.get(p)||0)-1;h.set(p,m),u.set(p,v),m||(!Ba.has(p)&&i&&p.removeAttribute(i),Ba.delete(p)),v||p.removeAttribute(o)}),id--,id||(Wo.inert=new WeakMap,Wo["aria-hidden"]=new WeakMap,Wo.none=new WeakMap,Ba=new WeakSet,Ha={})}}function Yy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vP(e[0]).body;return wP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const sd={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},Wa=P.forwardRef(function(t,n){const[r,o]=P.useState();nt(()=>{ay()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[so("focus-guard")]:"",style:sd};return g.jsx("span",{...t,...i})}),SP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ky=P.createContext(null),Zy=so("portal");function TP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ts(),o=Xy(),[i,s]=P.useState(null),a=P.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),nt(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Zy,""),l.appendChild(c),a.current=c,s(c)},[t,r]),nt(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!xa(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(Zy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function mr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=TP({id:n,root:r}),[s,a]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=s?.modal,p=s?.open,h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||f)return;function y(m){i&&Qi(m)&&(m.type==="focusin"?yy:TA)(i)}return i.addEventListener("focusin",y,!0),i.addEventListener("focusout",y,!0),()=>{i.removeEventListener("focusin",y,!0),i.removeEventListener("focusout",y,!0)}},[i,o,f]),P.useEffect(()=>{i&&(p||yy(i))},[p,i]),g.jsxs(Ky.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[h&&i&&g.jsx(Wa,{"data-type":"outside",ref:l,onFocus:y=>{if(Qi(y,i)){var m;(m=u.current)==null||m.focus()}else{const v=s?s.domReference:null,b=gy(v);b?.focus()}}}),h&&i&&g.jsx("span",{"aria-owns":i.id,style:SP}),i&&cr.createPortal(t,i),h&&i&&g.jsx(Wa,{"data-type":"outside",ref:c,onFocus:y=>{if(Qi(y,i)){var m;(m=d.current)==null||m.focus()}else{const v=s?s.domReference:null,b=my(v);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const Xy=()=>P.useContext(Ky);function Qy(e){return P.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const EP=20;let _r=[];function ad(){_r=_r.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function kP(e){ad(),e&&Cr(e)!=="body"&&(_r.push(new WeakRef(e)),_r.length>EP&&(_r=_r.slice(-20)))}function Jy(){ad();const e=_r[_r.length-1];return e?.deref()}function CP(e){const t=Xi();return iy(e,t)?e:jo(e,t)[0]||e}function ev(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Xi(),i=sA(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return iy(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const IP=P.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:sd})});function lo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:h,onOpenChange:y,events:m,dataRef:v,elements:{domReference:b,floating:x}}=t,T=kt(()=>{var R;return(R=v.current.floatingContext)==null?void 0:R.nodeId}),E=kt(p),I=typeof s=="number"&&s<0,w=Ku(b)&&I,k=bP(),A=k?i:!0,O=!A||k&&f,N=Ht(o),M=Ht(s),$=Ht(a),_=Or(),F=Xy(),z=P.useRef(null),D=P.useRef(null),C=P.useRef(!1),V=P.useRef(!1),L=P.useRef(-1),B=P.useRef(-1),U=F!=null,G=Ma(x),H=kt(function(R){return R===void 0&&(R=G),R?jo(R,Xi()):[]}),ee=kt(R=>{const ae=H(R);return N.current.map(ce=>b&&ce==="reference"?b:G&&ce==="floating"?G:ae).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function R(ce){if(ce.key==="Tab"){Bt(G,qn(qt(G)))&&H().length===0&&!w&&Ut(ce);const Q=ee(),ue=Un(ce);N.current[0]==="reference"&&ue===b&&(Ut(ce),ce.shiftKey?ao(Q[Q.length-1]):ao(Q[1])),N.current[1]==="floating"&&ue===G&&ce.shiftKey&&(Ut(ce),ao(Q[0]))}}const ae=qt(G);return ae.addEventListener("keydown",R),()=>{ae.removeEventListener("keydown",R)}},[r,b,G,c,N,w,H,ee]),P.useEffect(()=>{if(r||!x)return;function R(ae){const ce=Un(ae),ue=H().indexOf(ce);ue!==-1&&(L.current=ue)}return x.addEventListener("focusin",R),()=>{x.removeEventListener("focusin",R)}},[r,x,H]),P.useEffect(()=>{if(r||!d)return;function R(){V.current=!0,setTimeout(()=>{V.current=!1})}function ae(ue){const re=ue.relatedTarget,he=ue.currentTarget,oe=Un(ue);queueMicrotask(()=>{const le=T(),be=!(Bt(b,re)||Bt(x,re)||Bt(re,x)||Bt(F?.portalNode,re)||re!=null&&re.hasAttribute(so("focus-guard"))||_&&(ro(_.nodesRef.current,le).find(de=>{var ne,J;return Bt((ne=de.context)==null?void 0:ne.elements.floating,re)||Bt((J=de.context)==null?void 0:J.elements.domReference,re)})||uy(_.nodesRef.current,le).find(de=>{var ne,J,j;return[(ne=de.context)==null?void 0:ne.elements.floating,Ma((J=de.context)==null?void 0:J.elements.floating)].includes(re)||((j=de.context)==null?void 0:j.elements.domReference)===re})));if(he===b&&G&&ev(G,N),l&&he!==b&&!(oe!=null&&oe.isConnected)&&qn(qt(G))===qt(G).body){Pt(G)&&G.focus();const de=L.current,ne=H(),J=ne[de]||ne[ne.length-1]||G;Pt(J)&&J.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(w||!c)&&re&&be&&!V.current&&re!==Jy()&&(C.current=!0,y(!1,ue,"focus-out"))})}const ce=!!(!_&&F);function Q(){Gt(B),v.current.insideReactTree=!0,B.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&Pt(b))return b.addEventListener("focusout",ae),b.addEventListener("pointerdown",R),x.addEventListener("focusout",ae),ce&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",ae),b.removeEventListener("pointerdown",R),x.removeEventListener("focusout",ae),ce&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,_,F,y,d,l,H,w,T,N,v]);const ie=P.useRef(null),te=P.useRef(null),q=Qy([ie,F?.beforeInsideRef]),Y=Qy([te,F?.afterInsideRef]);P.useEffect(()=>{var R,ae;if(r||!x)return;const ce=Array.from((F==null||(R=F.portalNode)==null?void 0:R.querySelectorAll("["+so("portal")+"]"))||[]),ue=(ae=(_?uy(_.nodesRef.current,T()):[]).find(oe=>{var le;return Ku(((le=oe.context)==null?void 0:le.elements.domReference)||null)}))==null||(ae=ae.context)==null?void 0:ae.elements.domReference,re=[x,ue,...ce,...E(),z.current,D.current,ie.current,te.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,N.current.includes("reference")||w?b:null].filter(oe=>oe!=null),he=c||w?Yy(re,!O,O):Yy(re);return()=>{he()}},[r,b,x,c,N,F,w,A,O,_,T,E]),nt(()=>{if(r||!Pt(G))return;const R=qt(G),ae=qn(R);queueMicrotask(()=>{const ce=ee(G),Q=M.current,ue=(typeof Q=="number"?ce[Q]:Q.current)||G,re=Bt(G,ae);!I&&!re&&h&&ao(ue,{preventScroll:ue===G})})},[r,h,G,I,ee,M]),nt(()=>{if(r||!G)return;const R=qt(G),ae=qn(R);kP(ae);function ce(re){let{reason:he,event:oe,nested:le}=re;if(["hover","safe-polygon"].includes(he)&&oe.type==="mouseleave"&&(C.current=!0),he==="outside-press")if(le)C.current=!1;else if(dy(oe)||fy(oe))C.current=!1;else{let be=!1;document.createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?C.current=!1:C.current=!0}}m.on("openchange",ce);const Q=R.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,sd),U&&b&&b.insertAdjacentElement("afterend",Q);function ue(){if(typeof $.current=="boolean"){const re=b||Jy();return re&&re.isConnected?re:Q}return $.current.current||Q}return()=>{m.off("openchange",ce);const re=qn(R),he=Bt(x,re)||_&&ro(_.nodesRef.current,T(),!1).some(le=>{var be;return Bt((be=le.context)==null?void 0:be.elements.floating,re)}),oe=ue();queueMicrotask(()=>{const le=CP(oe);$.current&&!C.current&&Pt(le)&&(!(le!==re&&re!==R.body)||he)&&le.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,$,v,m,_,U,b,T]),P.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(ad)}),[r]),nt(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:h,onOpenChange:y,domReference:b}),()=>{F.setFocusManagerState(null)}},[r,F,c,h,y,d,b]),nt(()=>{r||G&&ev(G,N)},[r,G,N]);function Z(R){return r||!u||!c?null:g.jsx(IP,{ref:R==="start"?z:D,onClick:ae=>y(!1,ae.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const pe=!r&&A&&(c?!w:!0)&&(U||c);return g.jsxs(g.Fragment,{children:[pe&&g.jsx(Wa,{"data-type":"inside",ref:q,onFocus:R=>{if(c){const ce=ee();ao(o[0]==="reference"?ce[0]:ce[ce.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(C.current=!1,Qi(R,F.portalNode)){const ce=my(b);ce?.focus()}else{var ae;(ae=F.beforeOutsideRef.current)==null||ae.focus()}}}),!w&&Z("start"),n,Z("end"),pe&&g.jsx(Wa,{"data-type":"inside",ref:Y,onFocus:R=>{if(c)ao(ee()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(C.current=!0),Qi(R,F.portalNode)){const ce=gy(b);ce?.focus()}else{var ae;(ae=F.afterOutsideRef.current)==null||ae.focus()}}})]})}let qa=0;const tv="--floating-ui-scrollbar-width";function AP(){const e=Hu(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(tv,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(tv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let nv=()=>{};const ld=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return qa++,qa===1&&(nv=AP()),()=>{qa--,qa===0&&nv()}},[r]),g.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function rv(e){return Pt(e.target)&&e.target.tagName==="BUTTON"}function PP(e){return Pt(e.target)&&e.target.tagName==="A"}function ov(e){return Yu(e)}function qo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=P.useRef(),p=P.useRef(!1),h=P.useMemo(()=>({onPointerDown(y){f.current=y.pointerType},onMouseDown(y){const m=f.current;y.button===0&&a!=="click"&&(Ro(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,y.nativeEvent,"click"):(y.preventDefault(),r(!0,y.nativeEvent,"click"))))},onClick(y){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Ro(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,y.nativeEvent,"click"):r(!0,y.nativeEvent,"click"))},onKeyDown(y){f.current=void 0,!(y.defaultPrevented||!u||rv(y))&&(y.key===" "&&!ov(i)&&(y.preventDefault(),p.current=!0),!PP(y)&&y.key==="Enter"&&r(!(n&&l),y.nativeEvent,"click"))},onKeyUp(y){y.defaultPrevented||!u||rv(y)||ov(i)||y.key===" "&&p.current&&(p.current=!1,r(!(n&&l),y.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return P.useMemo(()=>s?{reference:h}:{},[s,h])}function OP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,d=s.height,f=s.x,p=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=a&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function iv(e){return e!=null&&e.clientX!=null}function _P(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=P.useRef(!1),f=P.useRef(null),[p,h]=P.useState(),[y,m]=P.useState([]),v=kt((I,w)=>{d.current||r.current.openEvent&&!iv(r.current.openEvent)||s.setPositionReference(OP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),b=kt(I=>{c!=null||u!=null||(n?f.current||m([]):v(I.clientX,I.clientY))}),x=Ro(p)?o:n,T=P.useCallback(()=>{if(!x||!a||c!=null||u!=null)return;const I=Wt(o);function w(k){const A=Un(k);Bt(o,A)?(I.removeEventListener("mousemove",w),f.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||iv(r.current.openEvent)){I.addEventListener("mousemove",w);const k=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=k,k}s.setPositionReference(i)},[x,a,c,u,o,r,s,i,v]);P.useEffect(()=>T(),[T,y]),P.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),P.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),nt(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const E=P.useMemo(()=>{function I(w){let{pointerType:k}=w;h(k)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return P.useMemo(()=>a?{reference:E}:{},[a,E])}const MP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},DP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},sv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Mr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,y=Or(),m=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,b=P.useRef(!1),{escapeKey:x,outsidePress:T}=sv(p),{escapeKey:E,outsidePress:I}=sv(h),w=P.useRef(!1),k=kt(_=>{var F;if(!n||!s||!a||_.key!=="Escape"||w.current)return;const z=(F=i.current.floatingContext)==null?void 0:F.nodeId,D=y?ro(y.nodesRef.current,z):[];if(!x&&(_.stopPropagation(),D.length>0)){let C=!0;if(D.forEach(V=>{var L;if((L=V.context)!=null&&L.open&&!V.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,hA(_)?_.nativeEvent:_,"escape-key")}),A=kt(_=>{var F;const z=()=>{var D;k(_),(D=Un(_))==null||D.removeEventListener("keydown",z)};(F=Un(_))==null||F.addEventListener("keydown",z)}),O=kt(_=>{var F;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const D=b.current;if(b.current=!1,c==="click"&&D||z||typeof v=="function"&&!v(_))return;const C=Un(_),V="["+so("inert")+"]",L=qt(o.floating).querySelectorAll(V);let B=tt(C)?C:null;for(;B&&!fr(B);){const ee=pr(B);if(fr(ee)||!tt(ee))break;B=ee}if(L.length&&tt(C)&&!dA(C)&&!Bt(C,o.floating)&&Array.from(L).every(ee=>!Bt(B,ee)))return;if(Pt(C)&&$){const ee=fr(C),ie=un(C),te=/auto|scroll/,q=ee||te.test(ie.overflowX),Y=ee||te.test(ie.overflowY),Z=q&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,pe=Y&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,R=ie.direction==="rtl",ae=pe&&(R?_.offsetX<=C.offsetWidth-C.clientWidth:_.offsetX>C.clientWidth),ce=Z&&_.offsetY>C.clientHeight;if(ae||ce)return}const U=(F=i.current.floatingContext)==null?void 0:F.nodeId,G=y&&ro(y.nodesRef.current,U).some(ee=>{var ie;return Gu(_,(ie=ee.context)==null?void 0:ie.elements.floating)});if(Gu(_,o.floating)||Gu(_,o.domReference)||G)return;const H=y?ro(y.nodesRef.current,U):[];if(H.length>0){let ee=!0;if(H.forEach(ie=>{var te;if((te=ie.context)!=null&&te.open&&!ie.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,_,"outside-press")}),N=kt(_=>{var F;const z=()=>{var D;O(_),(D=Un(_))==null||D.removeEventListener(c,z)};(F=Un(_))==null||F.addEventListener(c,z)});P.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let _=-1;function F(L){r(!1,L,"ancestor-scroll")}function z(){window.clearTimeout(_),w.current=!0}function D(){_=window.setTimeout(()=>{w.current=!1},Sa()?5:0)}const C=qt(o.floating);a&&(C.addEventListener("keydown",E?A:k,E),C.addEventListener("compositionstart",z),C.addEventListener("compositionend",D)),v&&C.addEventListener(c,I?N:O,I);let V=[];return f&&(tt(o.domReference)&&(V=Ir(o.domReference)),tt(o.floating)&&(V=V.concat(Ir(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(V=V.concat(Ir(o.reference.contextElement)))),V=V.filter(L=>{var B;return L!==((B=C.defaultView)==null?void 0:B.visualViewport)}),V.forEach(L=>{L.addEventListener("scroll",F,{passive:!0})}),()=>{a&&(C.removeEventListener("keydown",E?A:k,E),C.removeEventListener("compositionstart",z),C.removeEventListener("compositionend",D)),v&&C.removeEventListener(c,I?N:O,I),V.forEach(L=>{L.removeEventListener("scroll",F)}),window.clearTimeout(_)}},[i,o,a,v,c,n,r,f,s,x,T,k,E,A,O,I,N]),P.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const M=P.useMemo(()=>({onKeyDown:k,...u&&{[MP[d]]:_=>{r(!1,_.nativeEvent,"reference-press")},...d!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}}}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[DP[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return P.useMemo(()=>s?{reference:M,floating:$}:{},[s,M,$])}function NP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ts(),i=P.useRef({}),[s]=P.useState(()=>jy()),a=Pr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!tt(p)&&pP("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]=P.useState(r.reference),u=kt((p,h,y)=>{i.current.openEvent=p?h:void 0,s.emit("openchange",{open:p,event:h,reason:y,nested:a}),n?.(p,h,y)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=NP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=P.useState(null),[a,l]=P.useState(null),u=o?.domReference||i,d=P.useRef(null),f=Or();nt(()=>{u&&(d.current=u)},[u]);const p=iP({...e,elements:{...o,...a&&{reference:a}}}),h=P.useCallback(x=>{const T=tt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),p.refs.setReference(T)},[p.refs]),y=P.useCallback(x=>{(tt(x)||x===null)&&(d.current=x,s(x)),(tt(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!tt(x))&&p.refs.setReference(x)},[p.refs]),m=P.useMemo(()=>({...p.refs,setReference:y,setPositionReference:h,domReference:d}),[p.refs,y,h]),v=P.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=P.useMemo(()=>({...p,...r,refs:m,elements:v,nodeId:t}),[p,m,v,t,r]);return nt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(T=>T.id===t);x&&(x.context=b)}),P.useMemo(()=>({...p,context:b,refs:m,elements:v}),[p,m,v,b])}function cd(){return aA()&&ay()}function FP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=P.useRef(!1),u=P.useRef(-1),d=P.useRef(!0);P.useEffect(()=>{if(!a)return;const p=Wt(s.domReference);function h(){!n&&Pt(s.domReference)&&s.domReference===qn(qt(s.domReference))&&(c.current=!0)}function y(){d.current=!0}function m(){d.current=!1}return p.addEventListener("blur",h),cd()&&(p.addEventListener("keydown",y,!0),p.addEventListener("pointerdown",m,!0)),()=>{p.removeEventListener("blur",h),cd()&&(p.removeEventListener("keydown",y,!0),p.removeEventListener("pointerdown",m,!0))}},[s.domReference,n,a]),P.useEffect(()=>{if(!a)return;function p(h){let{reason:y}=h;(y==="reference-press"||y==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,a]),P.useEffect(()=>()=>{Gt(u)},[]);const f=P.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const h=Un(p.nativeEvent);if(l&&tt(h)){if(cd()&&!p.relatedTarget){if(!d.current&&!Yu(h))return}else if(!fA(h))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const h=p.relatedTarget,y=p.nativeEvent,m=tt(h)&&h.hasAttribute(so("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=qn(s.domReference?s.domReference.ownerDocument:document);!h&&b===s.domReference||Bt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Bt(s.domReference,b)||m||r(!1,y,"focus")})}}),[i,s.domReference,r,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function ud(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Fy]:s,[Ly]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[cP]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Fy,Ly].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,p=arguments.length,h=new Array(p),y=0;y<p;y++)h[y]=arguments[y];return(f=r.get(c))==null?void 0:f.map(m=>m(...h)).find(m=>m!==void 0)}}}else s[c]=u}),s),{})}}function Yn(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=P.useCallback(a=>ud(a,e,"reference"),t),i=P.useCallback(a=>ud(a,e,"floating"),n),s=P.useCallback(a=>ud(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const LP="Escape";function Ua(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ga(e,t){return Ua(t,e===Vy||e===ja,e===Ji||e===es)}function dd(e,t,n){return Ua(t,e===ja,n?e===Ji:e===es)||e==="Enter"||e===" "||e===""}function av(e,t,n){return Ua(t,n?e===Ji:e===es,e===ja)}function lv(e,t,n,r){const o=n?e===es:e===Ji,i=e===Vy;return t==="both"||t==="horizontal"&&r&&r>1?e===LP:Ua(t,o,i)}function Ya(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:k,itemSizes:A,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Ra("`useListNavigation` looping must be enabled to allow escaping."),y||Ra("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Ra("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const N=Ma(o.floating),M=Ht(N),$=Pr(),_=Or();nt(()=>{e.dataRef.current.orientation=T},[e,T]);const F=kt(()=>{l(C.current===-1?null:C.current)}),z=Ku(o.domReference),D=P.useRef(m),C=P.useRef(u??-1),V=P.useRef(null),L=P.useRef(!0),B=P.useRef(F),U=P.useRef(!!o.floating),G=P.useRef(n),H=P.useRef(!1),ee=P.useRef(!1),ie=Ht(x),te=Ht(n),q=Ht(w),Y=Ht(u),[Z,pe]=P.useState(),[R,ae]=P.useState(),ce=kt(()=>{function de(X){if(y){var me;(me=X.id)!=null&&me.endsWith("-fui-option")&&(X.id=i+"-"+Math.random().toString(16).slice(2,10)),pe(X.id),_?.events.emit("virtualfocus",X),k&&(k.current=X)}else ao(X,{sync:H.current,preventScroll:!0})}const ne=s.current[C.current],J=ee.current;ne&&de(ne),(H.current?X=>X():requestAnimationFrame)(()=>{const X=s.current[C.current]||ne;if(!X)return;ne||de(X);const me=q.current;me&&ue&&(J||!L.current)&&(X.scrollIntoView==null||X.scrollIntoView(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});nt(()=>{c&&(n&&o.floating?D.current&&u!=null&&(ee.current=!0,C.current=u,F()):U.current&&(C.current=-1,B.current()))},[c,n,o.floating,u,F]),nt(()=>{if(c&&n&&o.floating)if(a==null){if(H.current=!1,Y.current!=null)return;if(U.current&&(C.current=-1,ce()),(!G.current||!U.current)&&D.current&&(V.current!=null||D.current===!0&&V.current==null)){let de=0;const ne=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(ne),de++):(C.current=V.current==null||dd(V.current,T,h)||p?Zu(s,ie.current):py(s,ie.current),V.current=null,F())};ne()}}else Zi(s,a)||(C.current=a,ce(),ee.current=!1)},[c,n,o.floating,a,Y,p,s,T,h,F,ce,ie]),nt(()=>{var de;if(!c||o.floating||!_||y||!U.current)return;const ne=_.nodesRef.current,J=(de=ne.find(me=>me.id===$))==null||(de=de.context)==null?void 0:de.elements.floating,j=qn(qt(o.floating)),X=ne.some(me=>me.context&&Bt(me.context.elements.floating,j));J&&!X&&L.current&&J.focus({preventScroll:!0})},[c,o.floating,_,$,y]),nt(()=>{if(!c||!_||!y||$)return;function de(ne){ae(ne.id),k&&(k.current=ne)}return _.events.on("virtualfocus",de),()=>{_.events.off("virtualfocus",de)}},[c,_,y,$,k]),nt(()=>{B.current=F,G.current=n,U.current=!!o.floating}),nt(()=>{n||(V.current=null,D.current=m)},[n,m]);const Q=a!=null,ue=P.useMemo(()=>{function de(J){if(!te.current)return;const j=s.current.indexOf(J);j!==-1&&C.current!==j&&(C.current=j,F())}return{onFocus(J){let{currentTarget:j}=J;H.current=!0,de(j)},onClick:J=>{let{currentTarget:j}=J;return j.focus({preventScroll:!0})},onMouseMove(J){let{currentTarget:j}=J;H.current=!0,ee.current=!1,v&&de(j)},onPointerLeave(J){let{pointerType:j}=J;if(!(!L.current||j==="touch")&&(H.current=!0,!!v&&(C.current=-1,F(),!y))){var X;(X=M.current)==null||X.focus({preventScroll:!0})}}}},[te,M,v,s,F,y]),re=P.useCallback(()=>{var de;return E??(_==null||(de=_.nodesRef.current.find(ne=>ne.id===$))==null||(de=de.context)==null||(de=de.dataRef)==null?void 0:de.current.orientation)},[$,_,E]),he=kt(de=>{if(L.current=!1,H.current=!0,de.which===229||!te.current&&de.currentTarget===M.current)return;if(p&&lv(de.key,T,h,I)){Ga(de.key,re())||Ut(de),r(!1,de.nativeEvent,"list-navigation"),Pt(o.domReference)&&(y?_?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const ne=C.current,J=Zu(s,x),j=py(s,x);if(z||(de.key==="Home"&&(Ut(de),C.current=J,F()),de.key==="End"&&(Ut(de),C.current=j,F())),I>1){const X=A||Array.from({length:s.current.length},()=>({width:1,height:1})),me=xA(X,I,O),ve=me.findIndex(Ne=>Ne!=null&&!Na(s,Ne,x)),ke=me.reduce((Ne,ct,Nt)=>ct!=null&&!Na(s,ct,x)?Nt:Ne,-1),De=me[bA({current:me.map(Ne=>Ne!=null?s.current[Ne]:null)},{event:de,orientation:T,loop:f,rtl:h,cols:I,disabledIndices:SA([...(typeof x!="function"?x:null)||s.current.map((Ne,ct)=>Na(s,ct,x)?ct:void 0),void 0],me),minIndex:ve,maxIndex:ke,prevIndex:wA(C.current>j?J:C.current,X,me,I,de.key===ja?"bl":de.key===(h?Ji:es)?"tr":"tl"),stopEvent:!0})];if(De!=null&&(C.current=De,F()),T==="both")return}if(Ga(de.key,T)){if(Ut(de),n&&!y&&qn(de.currentTarget.ownerDocument)===de.currentTarget){C.current=dd(de.key,T,h)?J:j,F();return}dd(de.key,T,h)?f?C.current=ne>=j?d&&ne!==s.current.length?-1:J:Zt(s,{startingIndex:ne,disabledIndices:x}):C.current=Math.min(j,Zt(s,{startingIndex:ne,disabledIndices:x})):f?C.current=ne<=J?d&&ne!==-1?s.current.length:j:Zt(s,{startingIndex:ne,decrement:!0,disabledIndices:x}):C.current=Math.max(J,Zt(s,{startingIndex:ne,decrement:!0,disabledIndices:x})),Zi(s,C.current)&&(C.current=-1),F()}}),oe=P.useMemo(()=>y&&n&&Q&&{"aria-activedescendant":R||Z},[y,n,Q,R,Z]),le=P.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:oe,onKeyDown:he,onPointerMove(){L.current=!0}}),[oe,he,T,z]),be=P.useMemo(()=>{function de(J){m==="auto"&&dy(J.nativeEvent)&&(D.current=!0)}function ne(J){D.current=m,m==="auto"&&fy(J.nativeEvent)&&(D.current=!0)}return{...oe,onKeyDown(J){L.current=!1;const j=J.key.startsWith("Arrow"),X=["Home","End"].includes(J.key),me=j||X,ve=av(J.key,T,h),ke=lv(J.key,T,h,I),De=av(J.key,re(),h),Ne=Ga(J.key,T),ct=(p?De:Ne)||J.key==="Enter"||J.key.trim()==="";if(y&&n){const W=_?.nodesRef.current.find(Oe=>Oe.parentId==null),K=_&&W?pA(_.nodesRef.current,W.id):null;if(me&&K&&k){const Oe=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ve||ke){var Nt,Qt;const Ue=((Nt=K.context)==null?void 0:Nt.elements.domReference)===J.currentTarget,Ye=ke&&!Ue?(Qt=K.context)==null?void 0:Qt.elements.domReference:ve?s.current.find($e=>$e?.id===Z):null;Ye&&(Ut(J),Ye.dispatchEvent(Oe),ae(void 0))}if((Ne||X)&&K.context&&K.context.open&&K.parentId&&J.currentTarget!==K.context.elements.domReference){var Re;Ut(J),(Re=K.context.elements.domReference)==null||Re.dispatchEvent(Oe);return}}return he(J)}if(!(!n&&!b&&j)){if(ct){const W=Ga(J.key,re());V.current=p&&W?null:J.key}if(p){De&&(Ut(J),n?(C.current=Zu(s,ie.current),F()):r(!0,J.nativeEvent,"list-navigation"));return}Ne&&(u!=null&&(C.current=u),Ut(J),!n&&b?r(!0,J.nativeEvent,"list-navigation"):he(J),n&&F())}},onFocus(){n&&!y&&(C.current=-1,F())},onPointerDown:ne,onPointerEnter:ne,onMouseDown:de,onClick:de}},[Z,oe,I,he,ie,m,s,p,F,r,n,b,T,re,h,u,_,y,k]);return P.useMemo(()=>c?{reference:be,floating:le,item:ue}:{},[c,be,le,ue])}const VP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=ts(),u=((n=i.domReference)==null?void 0:n.id)||c,d=P.useMemo(()=>{var b;return((b=Ma(i.floating))==null?void 0:b.id)||s},[i.floating,s]),f=(r=VP.get(l))!=null?r:l,h=Pr()!=null,y=P.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&h&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,h,o,u,l]),m=P.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),v=P.useCallback(b=>{let{active:x,selected:T}=b;const E={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return P.useMemo(()=>a?{reference:y,floating:m,item:v}:{},[a,y,m,v])}const cv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Uo(e,t){return typeof e=="function"?e(t):e}function $P(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function zP(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=P.useState("unmounted"),c=$P(n,s);return!c&&a==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{cr.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function uv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=P.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[p,h]=P.useState(()=>({...Uo(i,c),...Uo(n,c)})),{isMounted:y,status:m}=zP(e,{duration:s}),v=Ht(n),b=Ht(r),x=Ht(o),T=Ht(i);return nt(()=>{const E=Uo(v.current,c),I=Uo(x.current,c),w=Uo(T.current,c),k=Uo(b.current,c)||Object.keys(E).reduce((A,O)=>(A[O]="",A),{});if(m==="initial"&&h(A=>({transitionProperty:A.transitionProperty,...w,...E})),m==="open"&&h({transitionProperty:Object.keys(k).map(cv).join(","),transitionDuration:d+"ms",...w,...k}),m==="close"){const A=I||E;h({transitionProperty:Object.keys(A).map(cv).join(","),transitionDuration:f+"ms",...w,...A})}},[f,x,v,b,T,d,m,c]),{isMounted:y,styles:p}}function jP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,h=P.useRef(-1),y=P.useRef(""),m=P.useRef((n=p??s)!=null?n:-1),v=P.useRef(null),b=kt(a),x=kt(l),T=Ht(u),E=Ht(f);nt(()=>{r&&(Gt(h),v.current=null,y.current="")},[r]),nt(()=>{if(r&&y.current===""){var O;m.current=(O=p??s)!=null?O:-1}},[r,p,s]);const I=kt(O=>{O?o.current.typing||(o.current.typing=O,x(O)):o.current.typing&&(o.current.typing=O,x(O))}),w=kt(O=>{function N(z,D,C){const V=T.current?T.current(D,C):D.find(L=>L?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return V?z.indexOf(V):-1}const M=i.current;if(y.current.length>0&&y.current[0]!==" "&&(N(M,M,y.current)===-1?I(!1):O.key===" "&&Ut(O)),M==null||E.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Ut(O),I(!0)),M.every(z=>{var D,C;return z?((D=z[0])==null?void 0:D.toLocaleLowerCase())!==((C=z[1])==null?void 0:C.toLocaleLowerCase()):!0})&&y.current===O.key&&(y.current="",m.current=v.current),y.current+=O.key,Gt(h),h.current=window.setTimeout(()=>{y.current="",m.current=v.current,I(!1)},d);const _=m.current,F=N(M,[...M.slice((_||0)+1),...M.slice(0,(_||0)+1)],y.current);F!==-1?(b(F),v.current=F):O.key!==" "&&(y.current="",I(!1))}),k=P.useMemo(()=>({onKeyDown:w}),[w]),A=P.useMemo(()=>({onKeyDown:w,onKeyUp(O){O.key===" "&&I(!1)}}),[w,I]);return P.useMemo(()=>c?{reference:k,floating:A}:{},[c,k,A])}function dv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...dv(e,o.id,n)])}function fv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function RP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function pv(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,s=null,a=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),h=p-l;if(s===null||a===null||h===0)return s=d,a=f,l=p,null;const y=d-s,m=f-a,b=Math.sqrt(y*y+m*m)/h;return s=d,a=f,l=p,b}const u=d=>{let{x:f,y:p,placement:h,elements:y,onClose:m,nodeId:v,tree:b}=d;return function(T){function E(){Gt(o),m()}if(Gt(o),!y.domReference||!y.floating||h==null||f==null||p==null)return;const{clientX:I,clientY:w}=T,k=[I,w],A=yP(T),O=T.type==="mouseleave",N=od(y.floating,A),M=od(y.domReference,A),$=y.domReference.getBoundingClientRect(),_=y.floating.getBoundingClientRect(),F=h.split("-")[0],z=f>_.right-_.width/2,D=p>_.bottom-_.height/2,C=RP(k,$),V=_.width>$.width,L=_.height>$.height,B=(V?$:_).left,U=(V?$:_).right,G=(L?$:_).top,H=(L?$:_).bottom;if(N&&(i=!0,!O))return;if(M&&(i=!1),M&&!O){i=!0;return}if(O&&tt(T.relatedTarget)&&od(y.floating,T.relatedTarget)||b&&dv(b.nodesRef.current,v).length)return;if(F==="top"&&p>=$.bottom-1||F==="bottom"&&p<=$.top+1||F==="left"&&f>=$.right-1||F==="right"&&f<=$.left+1)return E();let ee=[];switch(F){case"top":ee=[[B,$.top+1],[B,_.bottom-1],[U,_.bottom-1],[U,$.top+1]];break;case"bottom":ee=[[B,_.top+1],[B,$.bottom-1],[U,$.bottom-1],[U,_.top+1]];break;case"left":ee=[[_.right-1,H],[_.right-1,G],[$.left+1,G],[$.left+1,H]];break;case"right":ee=[[$.right-1,H],[$.right-1,G],[_.left+1,G],[_.left+1,H]];break}function ie(te){let[q,Y]=te;switch(F){case"top":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y+t+1],pe=[V?q-t/2:z?q+t*4:q-t*4,Y+t+1],R=[[_.left,z||V?_.bottom-t:_.top],[_.right,z?V?_.bottom-t:_.top:_.bottom-t]];return[Z,pe,...R]}case"bottom":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y-t],pe=[V?q-t/2:z?q+t*4:q-t*4,Y-t],R=[[_.left,z||V?_.top+t:_.bottom],[_.right,z?V?_.top+t:_.bottom:_.top+t]];return[Z,pe,...R]}case"left":{const Z=[q+t+1,L?Y+t/2:D?Y+t*4:Y-t*4],pe=[q+t+1,L?Y-t/2:D?Y+t*4:Y-t*4];return[...[[D||L?_.right-t:_.left,_.top],[D?L?_.right-t:_.left:_.right-t,_.bottom]],Z,pe]}case"right":{const Z=[q-t,L?Y+t/2:D?Y+t*4:Y-t*4],pe=[q-t,L?Y-t/2:D?Y+t*4:Y-t*4],R=[[D||L?_.left+t:_.right,_.top],[D?L?_.left+t:_.right:_.left+t,_.bottom]];return[Z,pe,...R]}}}if(!fv([I,w],ee)){if(i&&!C)return E();if(!O&&r){const te=c(T.clientX,T.clientY);if(te!==null&&te<.1)return E()}fv([I,w],ie([f,p]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const hv=200,BP=500,Go=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},mv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),gv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},fd=(e,t)=>{const n=mv(t,gv.basic,e)||mv(t,gv.extend,e);return n===void 0||n===e?void 0:n},Dr=()=>typeof window>"u",pd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),yv=(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},HP=e=>!e,Yo=()=>{},vv=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},hd=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:s=!0,hover:a=!0,enabled:l=!0,popover:c=!0,onChange:u=Yo,followCursor:d=!1,...f},p){const[h,y]=S.useState(n??!1),m=S.useRef(null),v=t||"span",b=_=>{y(_),u?.(_)},{refs:x,floatingStyles:T,context:E}=Gn({placement:i,open:h,whileElementsMounted:io,onOpenChange:n?void 0:b,middleware:[$a(),Ho(5),My(),ed({padding:5,element:m}),za({fallbackAxisSideDirection:"start"})]}),I=Mr(E,{enabled:l}),w=gr(E,{role:"tooltip",enabled:l}),k=FP(E,{enabled:l?s:!1}),A=qo(E,{enabled:l?c:!1}),O=_P(E,{enabled:!!l&&!!d}),N=Wy(E,{move:!0,delay:{open:hv},enabled:l?a:!1,handleClose:c?pv():null}),{getReferenceProps:M,getFloatingProps:$}=Yn([w,I,O,s?k:void 0,a?N:void 0,c?A:void 0]);return S.useEffect(()=>y(n===void 0?!1:n),[n]),g.jsxs(S.Fragment,{children:[g.jsx(v,{...M(f),ref:dr(x.setReference,p),children:r}),h&&g.jsx(mr,{children:g.jsxs(cn,{...$(),ref:x.setFloating,style:T,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[g.jsx(td,{ref:m,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),bv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>g.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:g.jsxs("span",{className:"flex gap-1 items-center transition-colors group-disabled:text-disabled group-error:text-danger group-hover:text-primary group-focus-within:text-primary",children:[s,e||o?g.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?g.jsx(hd,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:g.jsx("span",{className:"cursor-help",children:g.jsx(Er,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:g.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full break-words max-w-48 whitespace-break-spaces",children:o})}):null,e?g.jsxs("span",{className:"flex items-center h-3 min-w-6",children:[g.jsx(Pu,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),g.jsx(uI,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),rs=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:h,componentName:y,placeholder:m,hideLeft:v=!1,required:b,disabled:x,reportStatus:T,hiddenLabel:E},I)=>{const w=Fu(),k=T!==void 0?T:w.input.iconFeedback,A=d??p,O=At(),N=e??O.inputOptionalLabel;return g.jsxs("fieldset",{ref:I,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":y,"data-interactive":!!i,className:Pe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[g.jsxs("label",{form:u,htmlFor:A,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full text-sm transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:g.jsx(bv,{info:a,hideLeft:v,reportStatus:k,title:h,placeholder:m,children:N||n?g.jsxs(S.Fragment,{children:[b?null:g.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:N}),n?g.jsx(S.Fragment,{children:n}):null]}):null}),g.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?g.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,s?g.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",children:s}):null]})]}),g.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}),g.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})]})}),xv=(e,t,n,r)=>S.forwardRef(({info:i,left:s,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:h="text",labelClassName:y,feedback:m=null,hideLeft:v=!1,loading:b,hiddenLabel:x,...T},E)=>{const I=e,w=T.id??T.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const A=k.current,O=Hi(k.current),N=r?.(A),M=$=>{const _=$;if(_.key==="Enter"&&A.enterKeyHint==="next"){const F=A.getAttribute("data-next");if(F){const z=document.getElementById(F);if(z)return z.focus(),void _.preventDefault()}}};return A.addEventListener("keydown",M),()=>{N?.(),O(),A.removeEventListener("keydown",M)}},[]),g.jsx(rs,{...n,info:i,left:s,error:l,right:c,form:T.form,loading:b,name:T.name,feedback:m,hideLeft:v,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:x,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:p,labelClassName:y,placeholder:T.placeholder,container:Pe(u,n.container),children:g.jsx(I,{...n,...T,id:w,name:w,type:h,"data-next":a,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:dr(E,k),className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",T.className)})})}),Ko=xv(Fg,"input",{type:"text"}),WP=_o("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-1 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-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),yr=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return g.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:Pe(WP({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),co=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:p,left:h,error:y,...m},v)=>{const b=At(),x=S.useRef(null),T=m.id??m.name;S.useImperativeHandle(v,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const I=new AbortController,w=x.current,k=Hi(x.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:I.signal}),()=>{k(),I.abort()}},[]);const E=()=>x.current?.focus();return g.jsx(rs,{info:n,left:h,error:y,form:m.form,loading:c,name:m.name,feedback:o,hideLeft:f,required:e,title:m.title,container:d,componentName:"select",rightLabel:a,hiddenLabel:l,interactive:s,id:m.name||m.id,optionalText:u,labelClassName:i,placeholder:m.placeholder,right:g.jsxs("label",{htmlFor:T,children:[p,g.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:g.jsxs("select",{...m,id:T,name:T,required:e,ref:dr(v,x),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:Pe("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",m.className),children:[g.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(I=>S.createElement("option",{...I,value:I.value,children:I.label??I.value,key:`${T}-select-option-${I.value}`}))]})})});function sn(e){return e?.ownerDocument||document}function qP({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=P.useRef(e!==void 0),[i,s]=P.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){P.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
4
|
+
`+K.prev}function Re(W,K){var Oe=te(W),Ue=[];if(Oe){Ue.length=W.length;for(var Ye=0;Ye<W.length;Ye++)Ue[Ye]=re(W,Ye)?K(W[Ye],W):""}var $e=typeof M=="function"?M(W):[],ot;if(_){ot={};for(var gt=0;gt<$e.length;gt++)ot["$"+$e[gt]]=$e[gt]}for(var it in W)re(W,it)&&(Oe&&String(Number(it))===it&&it<W.length||_&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ue.push(K(it,W)+": "+K(W[it],W)):Ue.push(it+": "+K(W[it],W))));if(typeof M=="function")for(var xn=0;xn<$e.length;xn++)z.call(W,$e[xn])&&Ue.push("["+K($e[xn])+"]: "+K(W[$e[xn]],W));return Ue}return Pc}var Oc,cm;function fk(){if(cm)return Oc;cm=1;var e=ra(),t=Mo(),n=function(a,l,c){for(var u=a,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=a.next,a.next=d),d},r=function(a,l){if(a){var c=n(a,l);return c&&c.value}},o=function(a,l,c){var u=n(a,l);u?u.value=c:a.next={key:l,next:a.next,value:c}},i=function(a,l){return a?!!n(a,l):!1},s=function(a,l){if(a)return n(a,l,!0)};return Oc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=s(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Oc}var _c,um;function dm(){return um||(um=1,_c=Object),_c}var Mc,fm;function pk(){return fm||(fm=1,Mc=Error),Mc}var Dc,pm;function hk(){return pm||(pm=1,Dc=EvalError),Dc}var Nc,hm;function mk(){return hm||(hm=1,Nc=RangeError),Nc}var Fc,mm;function gk(){return mm||(mm=1,Fc=ReferenceError),Fc}var Lc,gm;function yk(){return gm||(gm=1,Lc=SyntaxError),Lc}var Vc,ym;function vk(){return ym||(ym=1,Vc=URIError),Vc}var $c,vm;function bk(){return vm||(vm=1,$c=Math.abs),$c}var zc,bm;function xk(){return bm||(bm=1,zc=Math.floor),zc}var jc,xm;function wk(){return xm||(xm=1,jc=Math.max),jc}var Rc,wm;function Sk(){return wm||(wm=1,Rc=Math.min),Rc}var Bc,Sm;function Tk(){return Sm||(Sm=1,Bc=Math.pow),Bc}var Hc,Tm;function Ek(){return Tm||(Tm=1,Hc=Math.round),Hc}var Wc,Em;function kk(){return Em||(Em=1,Wc=Number.isNaN||function(t){return t!==t}),Wc}var qc,km;function Ck(){if(km)return qc;km=1;var e=kk();return qc=function(n){return e(n)||n===0?n:n<0?-1:1},qc}var Uc,Cm;function Ik(){return Cm||(Cm=1,Uc=Object.getOwnPropertyDescriptor),Uc}var Gc,Im;function Am(){if(Im)return Gc;Im=1;var e=Ik();if(e)try{e([],"length")}catch{e=null}return Gc=e,Gc}var Yc,Pm;function Ak(){if(Pm)return Yc;Pm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Yc=e,Yc}var Kc,Om;function Pk(){return Om||(Om=1,Kc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),Kc}var Zc,_m;function Ok(){if(_m)return Zc;_m=1;var e=typeof Symbol<"u"&&Symbol,t=Pk();return Zc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Zc}var Xc,Mm;function Dm(){return Mm||(Mm=1,Xc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Xc}var Qc,Nm;function Fm(){if(Nm)return Qc;Nm=1;var e=dm();return Qc=e.getPrototypeOf||null,Qc}var Jc,Lm;function _k(){if(Lm)return Jc;Lm=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},s=function(a,l){for(var c="",u=0;u<a.length;u+=1)c+=a[u],u+1<a.length&&(c+=l);return c};return Jc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),h=[],y=0;y<p;y++)h[y]="$"+y;if(d=Function("binder","return function ("+s(h,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},Jc}var eu,Vm;function oa(){if(Vm)return eu;Vm=1;var e=_k();return eu=Function.prototype.bind||e,eu}var tu,$m;function nu(){return $m||($m=1,tu=Function.prototype.call),tu}var ru,zm;function jm(){return zm||(zm=1,ru=Function.prototype.apply),ru}var ou,Rm;function Mk(){return Rm||(Rm=1,ou=typeof Reflect<"u"&&Reflect&&Reflect.apply),ou}var iu,Bm;function Dk(){if(Bm)return iu;Bm=1;var e=oa(),t=jm(),n=nu(),r=Mk();return iu=r||e.call(n,t),iu}var su,Hm;function Wm(){if(Hm)return su;Hm=1;var e=oa(),t=Mo(),n=nu(),r=Dk();return su=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},su}var au,qm;function Nk(){if(qm)return au;qm=1;var e=Wm(),t=Am(),n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return au=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,au}var lu,Um;function Fk(){if(Um)return lu;Um=1;var e=Dm(),t=Fm(),n=Nk();return lu=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,lu}var cu,Gm;function Lk(){if(Gm)return cu;Gm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=oa();return cu=n.call(e,t),cu}var uu,Ym;function du(){if(Ym)return uu;Ym=1;var e,t=dm(),n=pk(),r=hk(),o=mk(),i=gk(),s=yk(),a=Mo(),l=vk(),c=bk(),u=xk(),d=wk(),f=Sk(),p=Tk(),h=Ek(),y=Ck(),m=Function,v=function(Y){try{return m('"use strict"; return ('+Y+").constructor;")()}catch{}},b=Am(),x=Ak(),T=function(){throw new a},E=b?(function(){try{return arguments.callee,T}catch{try{return b(arguments,"callee").get}catch{return T}}})():T,I=Ok()(),w=Fk(),k=Fm(),A=Dm(),O=jm(),N=nu(),M={},$=typeof Uint8Array>"u"||!w?e:w(Uint8Array),_={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":M,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":E,"%TypedArray%":$,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":N,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":h,"%Math.sign%":y,"%Reflect.getPrototypeOf%":A};if(w)try{null.error}catch(Y){var F=w(w(Y));_["%Error.prototype%"]=F}var z=function Y(Z){var pe;if(Z==="%AsyncFunction%")pe=v("async function () {}");else if(Z==="%GeneratorFunction%")pe=v("function* () {}");else if(Z==="%AsyncGeneratorFunction%")pe=v("async function* () {}");else if(Z==="%AsyncGenerator%"){var R=Y("%AsyncGeneratorFunction%");R&&(pe=R.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ae=Y("%AsyncGenerator%");ae&&w&&(pe=w(ae.prototype))}return _[Z]=pe,pe},D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=oa(),V=Lk(),L=C.call(N,Array.prototype.concat),B=C.call(O,Array.prototype.splice),U=C.call(N,String.prototype.replace),G=C.call(N,String.prototype.slice),H=C.call(N,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ie=/\\(\\)?/g,te=function(Z){var pe=G(Z,0,1),R=G(Z,-1);if(pe==="%"&&R!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(R==="%"&&pe!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ae=[];return U(Z,ee,function(ce,Q,ue,re){ae[ae.length]=ue?U(re,ie,"$1"):Q||ce}),ae},q=function(Z,pe){var R=Z,ae;if(V(D,R)&&(ae=D[R],R="%"+ae[0]+"%"),V(_,R)){var ce=_[R];if(ce===M&&(ce=z(R)),typeof ce>"u"&&!pe)throw new a("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:ae,name:R,value:ce}}throw new s("intrinsic "+Z+" does not exist!")};return uu=function(Z,pe){if(typeof Z!="string"||Z.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,Z)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var R=te(Z),ae=R.length>0?R[0]:"",ce=q("%"+ae+"%",pe),Q=ce.name,ue=ce.value,re=!1,he=ce.alias;he&&(ae=he[0],B(R,L([0,1],he)));for(var oe=1,le=!0;oe<R.length;oe+=1){var be=R[oe],de=G(be,0,1),ne=G(be,-1);if((de==='"'||de==="'"||de==="`"||ne==='"'||ne==="'"||ne==="`")&&de!==ne)throw new s("property names with quotes must have matching quotes");if((be==="constructor"||!le)&&(re=!0),ae+="."+be,Q="%"+ae+"%",V(_,Q))ue=_[Q];else if(ue!=null){if(!(be in ue)){if(!pe)throw new a("base intrinsic for "+Z+" exists, but the property is not available.");return}if(b&&oe+1>=R.length){var J=b(ue,be);le=!!J,le&&"get"in J&&!("originalValue"in J.get)?ue=J.get:ue=ue[be]}else le=V(ue,be),ue=ue[be];le&&!re&&(_[Q]=ue)}}return ue},uu}var fu,Km;function Zm(){if(Km)return fu;Km=1;var e=du(),t=Wm(),n=t([e("%String.prototype.indexOf%")]);return fu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},fu}var pu,Xm;function Qm(){if(Xm)return pu;Xm=1;var e=du(),t=Zm(),n=ra(),r=Mo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),a=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return pu=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var h=l(d,p);return c(d)===0&&(d=void 0),h}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?a(d,p):!1},set:function(p,h){d||(d=new o),s(d,p,h)}};return f},pu}var hu,Jm;function Vk(){if(Jm)return hu;Jm=1;var e=du(),t=Zm(),n=ra(),r=Qm(),o=Mo(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return hu=i?function(){var d,f,p={assert:function(h){if(!p.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&f)return f.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?s(d,h):f&&f.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!f&&f.has(h)},set:function(h,y){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),a(d,h,y)):r&&(f||(f=r()),f.set(h,y))}};return p}:r,hu}var mu,eg;function tg(){if(eg)return mu;eg=1;var e=Mo(),t=ra(),n=fk(),r=Qm(),o=Vk(),i=o||r||n;return mu=function(){var a,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,u){a||(a=i()),a.set(c,u)}};return l},mu}var ng=e=>Array.isArray(e),gu=e=>e===void 0,yu=e=>e===null,$k=Function.bind.call(Function.call,Object.prototype.toString),zk=e=>!!e&&$k(e)==="[object Error]"||e instanceof Error,rg=(e,t)=>e instanceof t,jk=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Rk=e=>Object.prototype.toString.call(e)==="[object Date]"&&rg(e,Date),Be={array:ng,date:Rk,empty:e=>yu(e)||gu(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:rg,isError:zk,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>yu(e)||gu(e),null:yu,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!ng(e)&&typeof e=="object",primitive:jk,string:e=>typeof e=="string",undefined:gu},Bk=e=>Object.keys(e),Rn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,s)=>i&&i[s],e);return o===void 0?n:o},Hk=e=>e.replace(/[^0-9]/g,"");const Wk=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},qk=(e,t)=>({classGroupId:e,validator:t}),og=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ia="-",ig=[],Uk="arbitrary..",Gk=e=>{const t=Kk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Yk(s);const a=s.split(ia),l=a[0]===""&&a.length>1?1:0;return sg(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?Wk(c,l):l:c||ig}return n[s]||ig}}},sg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=sg(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(ia):e.slice(t).join(ia),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},Yk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Uk+r:void 0})(),Kk=e=>{const{theme:t,classGroups:n}=e;return Zk(n,t)},Zk=(e,t)=>{const n=og();for(const r in e){const o=e[r];vu(o,n,r,t)}return n},vu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Xk(s,t,n,r)}},Xk=(e,t,n,r)=>{if(typeof e=="string"){Qk(e,t,n);return}if(typeof e=="function"){Jk(e,t,n,r);return}eC(e,t,n,r)},Qk=(e,t,n)=>{const r=e===""?t:ag(t,e);r.classGroupId=n},Jk=(e,t,n,r)=>{if(tC(e)){vu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qk(n,e))},eC=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];vu(l,ag(t,a),n,r)}},ag=(e,t)=>{let n=e;const r=t.split(ia),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=og(),n.nextPart.set(s,a)),n=a}return n},tC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,nC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},bu="!",lg=":",rC=[],cg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),oC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let y=0;y<u;y++){const m=o[y];if(s===0&&a===0){if(m===lg){i.push(o.slice(l,y)),l=y+1;continue}if(m==="/"){c=y;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(bu)?(f=d.slice(0,-1),p=!0):d.startsWith(bu)&&(f=d.slice(1),p=!0);const h=c&&c>l?c-l:void 0;return cg(i,p,f,h)};if(t){const o=t+lg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):cg(rC,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},iC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},sC=e=>({cache:nC(e.cacheSize),parseClassName:oC(e),sortModifiers:iC(e),...Gk(e)}),aC=/\s+/,lC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(aC);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!y,v=r(m?h.substring(0,y):h);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+bu:b,T=x+v;if(s.indexOf(T)>-1)continue;s.push(T);const E=o(v,m);for(let I=0;I<E.length;++I){const w=E[I];s.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},cC=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=ug(n))&&(o&&(o+=" "),o+=r);return o},ug=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ug(e[r]))&&(n&&(n+=" "),n+=t);return n},uC=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=sC(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=lC(l,n);return o(l,u),u};return i=s,(...l)=>i(cC(...l))},dC=[],$t=e=>{const t=n=>n[e]||dC;return t.isThemeGetter=!0,t},dg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fC=/^\d+\/\d+$/,pC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hC=/\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$/,mC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Do=e=>fC.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),xu=e=>e.endsWith("%")&&qe(e.slice(0,-1)),ur=e=>pC.test(e),vC=()=>!0,bC=e=>hC.test(e)&&!mC.test(e),pg=()=>!1,xC=e=>gC.test(e),wC=e=>yC.test(e),SC=e=>!Se(e)&&!Te(e),TC=e=>No(e,vg,pg),Se=e=>dg.test(e),eo=e=>No(e,bg,bC),wu=e=>No(e,AC,qe),hg=e=>No(e,gg,pg),EC=e=>No(e,yg,wC),sa=e=>No(e,xg,xC),Te=e=>fg.test(e),Bi=e=>Fo(e,bg),kC=e=>Fo(e,PC),mg=e=>Fo(e,gg),CC=e=>Fo(e,vg),IC=e=>Fo(e,yg),aa=e=>Fo(e,xg,!0),No=(e,t,n)=>{const r=dg.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fo=(e,t,n=!1)=>{const r=fg.exec(e);return r?r[1]?t(r[1]):n:!1},gg=e=>e==="position"||e==="percentage",yg=e=>e==="image"||e==="url",vg=e=>e==="length"||e==="size"||e==="bg-size",bg=e=>e==="length",AC=e=>e==="number",PC=e=>e==="family-name",xg=e=>e==="shadow",OC=uC(()=>{const e=$t("color"),t=$t("font"),n=$t("text"),r=$t("font-weight"),o=$t("tracking"),i=$t("leading"),s=$t("breakpoint"),a=$t("container"),l=$t("spacing"),c=$t("radius"),u=$t("shadow"),d=$t("inset-shadow"),f=$t("text-shadow"),p=$t("drop-shadow"),h=$t("blur"),y=$t("perspective"),m=$t("aspect"),v=$t("ease"),b=$t("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Te,Se],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[Te,Se,l],A=()=>[Do,"full","auto",...k()],O=()=>[Tr,"none","subgrid",Te,Se],N=()=>["auto",{span:["full",Tr,Te,Se]},Tr,Te,Se],M=()=>[Tr,"auto",Te,Se],$=()=>["auto","min","max","fr",Te,Se],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...k()],D=()=>[Do,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,Te,Se],V=()=>[...T(),mg,hg,{position:[Te,Se]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",CC,TC,{size:[Te,Se]}],U=()=>[xu,Bi,eo],G=()=>["","none","full",c,Te,Se],H=()=>["",qe,Bi,eo],ee=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[qe,xu,mg,hg],q=()=>["","none",h,Te,Se],Y=()=>["none",qe,Te,Se],Z=()=>["none",qe,Te,Se],pe=()=>[qe,Te,Se],R=()=>[Do,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ur],breakpoint:[ur],color:[vC],container:[ur],"drop-shadow":[ur],ease:["in","out","in-out"],font:[SC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ur],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ur],shadow:[ur],spacing:["px",qe],text:[ur],"text-shadow":[ur],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Do,Se,Te,m]}],container:["container"],columns:[{columns:[qe,Se,Te,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Tr,"auto",Te,Se]}],basis:[{basis:[Do,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Do,"auto","initial","none",Se]}],grow:[{grow:["",qe,Te,Se]}],shrink:[{shrink:["",qe,Te,Se]}],order:[{order:[Tr,"first","last","none",Te,Se]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Bi,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Te,wu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xu,Se]}],"font-family":[{font:[kC,Se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Te,Se]}],"line-clamp":[{"line-clamp":[qe,"none",Te,wu]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Te,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Te,eo]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[qe,"auto",Te,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tr,Te,Se],radial:["",Te,Se],conic:[Tr,Te,Se]},IC,EC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Te,Se]}],"outline-w":[{outline:["",qe,Bi,eo]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,aa,sa]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,aa,sa]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[qe,eo]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,aa,sa]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[qe,Te,Se]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Te,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Se]}],filter:[{filter:["","none",Te,Se]}],blur:[{blur:q()}],brightness:[{brightness:[qe,Te,Se]}],contrast:[{contrast:[qe,Te,Se]}],"drop-shadow":[{"drop-shadow":["","none",p,aa,sa]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",qe,Te,Se]}],"hue-rotate":[{"hue-rotate":[qe,Te,Se]}],invert:[{invert:["",qe,Te,Se]}],saturate:[{saturate:[qe,Te,Se]}],sepia:[{sepia:["",qe,Te,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Se]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Te,Se]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Te,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Te,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Te,Se]}],"backdrop-invert":[{"backdrop-invert":["",qe,Te,Se]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Te,Se]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Te,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Te,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Te,Se]}],ease:[{ease:["linear","initial",v,Te,Se]}],delay:[{delay:[qe,Te,Se]}],animate:[{animate:["none",b,Te,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Te,Se]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[Te,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,Se]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,Se]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[qe,Bi,eo,wu]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),dr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},_C=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Su=e=>Be.function(e),Pe=(...e)=>OC(nm(e)),wg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Hi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Sg=e=>e.scrollHeight>e.clientHeight,Wi=(e,t)=>{if(e&&e.getBoundingClientRect){const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)}return 320},MC=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},Tg=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,s=o.bottom<=r.bottom,a=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&s&&a&&l},cn=S.forwardRef(function(t,n){const r=t.as||"span";return g.jsx(r,{ref:n,...t,as:void 0})}),DC={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},NC=_o("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),FC=_o("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:DC,defaultVariants:{theme:"primary",size:"default"}}),la=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return g.jsxs(cn,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Pe(FC({size:s,theme:o?"loading":i}),t),children:[n?g.jsx("span",{"aria-hidden":"true",className:NC({theme:n})}):null,r,a.children]})}),LC=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return g.jsx("form",{...e,onSubmit:t})};var _t=function(){return _t=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},_t.apply(this,arguments)};function Tu(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 Eu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var qi=function(e){return e.replace(new RegExp(" ","g")," ")},Eg=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)},VC=function(e){return e.replace(/^0+([0-9]+)/,"$1")},kg=function(e,t,n){var r=e.length-2,o=VC(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Cg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ca=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},$C=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ku=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},zC=function(e){return e==="money"||e==="currency"},jC=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return _t(_t({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ua=function(e,t){var n=Eg(Cg(e),t.fraction.length),r="".concat(t.currency).concat(kg(n,t.group,t.decimal));return qi(r)},RC=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Tu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var h=jC(r,i,a);return h.currency=qi("".concat(h.currency.trim()," ")),h.literal=qi(h.literal.trim()),h},[r,i]),f=function(h){var y=ua(h.target.value,d),m=ca(y);h.target.value=y,h.target.setAttribute("data-number",m.toString()),l?.(h),m!==0&&(u.current.selectionEnd=y.length)};S.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var y=ua(h,d),m=ca(y);u.current.value=y,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l?.(_t(_t({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=y.length)}}},[d]);var p=c.defaultValue?ua(c.defaultValue,d):void 0;return S.createElement("input",_t({},c,{value:typeof c.value=="string"?ua(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),BC=1,HC=function(e){return e==="percentage"||e==="percent"||e==="percentual"},WC=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return _t(_t({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},da=function(e,t){var n=Eg(Cg(e),t.fraction.length),r="".concat(kg(n,t.group,t.decimal)," ").concat(t.percentSign);return qi(r)},qC=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Tu(e,["locale","mask","onChange","onKeyUp"]),a=S.useRef(null),l=Eu(S.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return a.current}),S.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(da(b,d))},[s.value]);var d=S.useMemo(function(){var v=WC(r);return v.percentSign=qi("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-BC,p=function(v){var b,x=a.current;x&&(x.setSelectionRange(f,f),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},h=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,T=b.selectionEnd,E=x!==T,I=f<x;!E&&I&&p()}i?.(v)},y=function(v){var b=da(v.target.value,d),x=ca(b);u(b),v.target.value=b,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var b=da(v,d),x=ca(b);u(b),a.current.value=b,a.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(_t(_t({},T),{target:a.current,currentTarget:a.current}))}}},[]),S.useEffect(function(){return p()},[c]);var m=s.defaultValue?da(s.defaultValue,d):void 0;return S.createElement("input",_t({},s,{defaultValue:m,inputMode:"decimal",onChange:y,onFocus:p,onKeyUp:h,ref:a,type:"text"}))}),Ui={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},UC=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=fa[i];s===void 0?r.push(i.replace(Ui.dots,"\\.").replace(Ui.openParenthesis,"\\(").replace(Ui.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ui.leadingBars,"\\")},Gi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Cu(o,n);var i=UC(o);return n?"^".concat(i,"$"):i},GC=function(e){return e.replace(Ui.escape,"\\$&")},Cu=function(e,t){var n=e.map(function(r){return typeof r=="string"?GC(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},fa={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]/}},YC=/\d/,Ig="(dd) 9dddd-dddd",Ag="(dd) dddd-dddd",Pg="ddd.ddd.ddd-dd",Og="dd.ddd.ddd/dddd-dd",pa=function(e){return e.replace(/\D/g,"")},KC=["2",/[0-3]/,":",/[0-5]/,/\d/],ZC=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Pg,isoDate:"dddd-dd-dd",cnpj:Og,telephone:Ag,cellphone:Ig,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return pa(e).length<=11?Pg:Og},int:function(e){return e===void 0&&(e=""),YC.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=pa(e);return t.length<11?Ag:Ig},time:function(e){var t=pa(e),n=t[0];return n==="2"?KC:ZC}},rn=function(e,t,n){var r;return n===void 0&&(n={}),_t({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Gi(e,"",!0),infinity:n.infinity},n)},Kt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:pa}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function _g(e,t,n,r){var o,i;r===void 0&&(r=fa);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(a+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Mg=function(e){return e},XC=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Gi(e,n,t));return r.test(n)};function QC(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var JC=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=Tu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=S.useRef(null);S.useImperativeHandle(t,function(){return h.current});var y=ku(a),m=ku(d),v=ku(u),b=S.useRef(XC(u,i,p.value||p.defaultValue)),x=f??"input",T=Eu(S.useState(""),2),E=T[0],I=T[1],w=QC(E),k=S.useCallback(function(F,z){var D,C,V=(D=F??z)!==null&&D!==void 0?D:"";if(u===void 0)return V;var L=(C=V?.toString())!==null&&C!==void 0?C:"";return _g(L,typeof u=="function"?u(L):u,s??Mg,c??fa)},[s,u,c]),A=Eu(S.useState(function(){return k(p.value,p.defaultValue)}),2),O=A[0],N=A[1],M=k(p.defaultValue,p.defaultValue),$=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var F=u(O);return Array.isArray(F)?Cu(F,i):Gi(u,O,i)}return typeof u=="string"?Gi(u,O,i):Cu(u,i)},[l,O,i,u]);S.useEffect(function(){if(p.value!==void 0){var F=k(p.value,p.defaultValue);N(F),h.current!==null&&(h.current.value=F)}},[p.value,u,s,p.defaultValue]);var _=function(F){var z,D,C,V,L,B=F.currentTarget,U=F.target.value;if(v.current===void 0)return N(U),(z=m.current)===null||z===void 0||z.call(m,U),(D=y.current)===null||D===void 0||D.call(y,F),d?.(U);var G=new RegExp(Gi(v.current,U,i)),H=(C=B.selectionEnd)!==null&&C!==void 0?C:0,ee=function(Z,pe,R){if(Z.type!=="number")return Z.setSelectionRange(pe,R)};if(r&&b.current&&U.length>=O.length)return B.value=O,ee(B,H-1,H-1);var ie=!1;U.length<w.length&&(b.current=!1,ie=!0),G.test(U)&&(b.current=!0);var te=H,q=U[te-1],Y=_g(U,typeof v.current=="function"?v.current(U):v.current,s??Mg,c??fa);for(B.value=Y,N(Y);te<Y.length&&Y.charAt(te-1)!==q;)te+=1;ie?ee(B,H,H):ee(B,te,te),F.target.value=Y,I(Y),(V=m.current)===null||V===void 0||V.call(m,Y),(L=y.current)===null||L===void 0||L.call(y,F)};return S.createElement(x,_t({},p,{ref:h,pattern:$,onChange:_,defaultValue:Dg(p.defaultValue)?M:void 0,value:Dg(p.value)?k(p.value,p.value):p.value}))}),Dg=function(e){return typeof e=="string"},Ng=S.forwardRef(function(e,t){return zC(e.mask)?S.createElement(RC,_t({},e,{mask:void 0,ref:t})):HC(e.mask)?S.createElement(qC,_t({},e,{mask:void 0,ref:t})):S.createElement(JC,_t({},e,{ref:t}))}),on=function(e){return function(t){return S.createElement(Ng,_t({},e,t))}};on(Kt.cellTelephone),on(Kt.cellphone),on(Kt.cep),on(Kt.cnpj),on(Kt.color),on(Kt.cpf),on(Kt.cpfCnpj),on(Kt.creditCard),on(Kt.date),on(Kt.int),on(Kt.isoDate),on(Kt.telephone),on(Kt.time),on(Kt.uuid);var Fg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&$C(Kt,t.mask)?Kt[t.mask]:{mask:t.mask}},[t.mask]),o=_t(_t({},t),r);return S.createElement(Ng,_t({},o,{ref:n}))});const Lg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const eI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const tI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Vg=e=>{const t=tI(e);return t.charAt(0).toUpperCase()+t.slice(1)};var nI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const rI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const oI=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>S.createElement("svg",{ref:l,...nI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Lg("lucide",o),...!i&&!rI(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const et=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(oI,{ref:i,iconNode:t,className:Lg(`lucide-${eI(Vg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Vg(e),n};const iI=et("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const sI=et("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const $g=et("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const aI=et("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const lI=et("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Iu=et("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const cI=et("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Au=et("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Pu=et("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const uI=et("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const dI=et("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const fI=et("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const zg=et("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const jg=et("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const Rg=et("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const pI=et("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const hI=et("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const Ou=et("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const mI=et("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Er=et("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const gI=et("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const yI=et("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const vI=et("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const _u=et("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const bI=et("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const xI=et("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Mu=et("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const ha=et("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Du=et("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const wI=et("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const Lo=et("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ma={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>)`},kr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(kr(s,t,n,a))},[]),Bg=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:Bg(s,t,n,a)}},{}),Hg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ga=(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)},SI={default:e=>ga(e,{result:Hg.default}),dark:e=>ga(e,{result:Hg.dark})},Vo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},TI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Nu=(e,t)=>{const n=kr(e.colors,Vo(t?.colors)),r=kr(e.spacing,Vo(t?.spacing)),o=kr(e.rounded,Vo(t?.rounded)),i=kr(e.shadow,Vo(t?.rounded)),s=kr(e.zIndex,Vo(t?.zIndex??TI)),a=e.custom?kr(e.custom,Vo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},EI=(e,t)=>ga(Nu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),kI=(e,t)=>Nu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),CI=(e,t)=>ga(Nu(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ya={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>g.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},va={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},to=S.createContext({parser:ma.hsla,tweaks:va,floatingRef:void 0,map:ya,locale:void 0}),At=()=>{const e=S.useContext(to);return e?e.map:ya},Fu=()=>{const e=S.useContext(to);return e?e.tweaks:va};function ba(){return typeof window<"u"}function Cr(e){return xa(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(xa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xa(e){return ba()?e instanceof Node||e instanceof Wt(e).Node:!1}function tt(e){return ba()?e instanceof Element||e instanceof Wt(e).Element:!1}function Pt(e){return ba()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function Yi(e){return!ba()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}const II=new Set(["inline","contents"]);function Ki(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=un(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!II.has(o)}const AI=new Set(["table","td","th"]);function PI(e){return AI.has(Cr(e))}const OI=[":popover-open",":modal"];function wa(e){return OI.some(t=>{try{return e.matches(t)}catch{return!1}})}const _I=["transform","translate","scale","rotate","perspective"],MI=["transform","translate","scale","rotate","perspective","filter"],DI=["paint","layout","strict","content"];function Lu(e){const t=Sa(),n=tt(e)?un(e):e;return _I.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)||MI.some(r=>(n.willChange||"").includes(r))||DI.some(r=>(n.contain||"").includes(r))}function NI(e){let t=pr(e);for(;Pt(t)&&!fr(t);){if(Lu(t))return t;if(wa(t))return null;t=pr(t)}return null}function Sa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const FI=new Set(["html","body","#document"]);function fr(e){return FI.has(Cr(e))}function un(e){return Wt(e).getComputedStyle(e)}function Ta(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pr(e){if(Cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yi(e)&&e.host||Bn(e);return Yi(t)?t.host:t}function Wg(e){const t=pr(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&Ki(t)?t:Wg(t)}function Ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){const a=Vu(s);return t.concat(s,s.visualViewport||[],Ki(o)?o:[],a&&n?Ir(a):[])}return t.concat(o,Ir(o,[],n))}function Vu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const LI=["top","right","bottom","left"],qg=["start","end"],Ug=LI.reduce((e,t)=>e.concat(t,t+"-"+qg[0],t+"-"+qg[1]),[]),Ar=Math.min,dn=Math.max,Ea=Math.round,$o=Math.floor,Hn=e=>({x:e,y:e}),VI={left:"right",right:"left",bottom:"top",top:"bottom"},$I={start:"end",end:"start"};function $u(e,t,n){return dn(e,Ar(t,n))}function no(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function An(e){return e.split("-")[1]}function Gg(e){return e==="x"?"y":"x"}function zu(e){return e==="y"?"height":"width"}const zI=new Set(["top","bottom"]);function hr(e){return zI.has(Wn(e))?"y":"x"}function ju(e){return Gg(hr(e))}function Yg(e,t,n){n===void 0&&(n=!1);const r=An(e),o=ju(e),i=zu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ca(s)),[s,Ca(s)]}function jI(e){const t=Ca(e);return[ka(e),t,ka(t)]}function ka(e){return e.replace(/start|end/g,t=>$I[t])}const Kg=["left","right"],Zg=["right","left"],RI=["top","bottom"],BI=["bottom","top"];function HI(e,t,n){switch(e){case"top":case"bottom":return n?t?Zg:Kg:t?Kg:Zg;case"left":case"right":return t?RI:BI;default:return[]}}function WI(e,t,n,r){const o=An(e);let i=HI(Wn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ka)))),i}function Ca(e){return e.replace(/left|right|bottom|top/g,t=>VI[t])}function qI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xg(e){return typeof e!="number"?qI(e):{top:e,right:e,bottom:e,left:e}}function Ia(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var UI=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Aa=UI.join(","),Qg=typeof Element>"u",zo=Qg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Pa=!Qg&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Oa=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Oa(t.parentNode));return s},GI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Jg=function(t,n,r){if(Oa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Aa));return n&&zo.call(t,Aa)&&o.unshift(t),o=o.filter(r),o},_a=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Oa(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=_a(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=zo.call(s,Aa);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!Oa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=_a(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},ey=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ty=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||GI(t))&&!ey(t)?0:t.tabIndex},YI=function(t,n){var r=ty(t);return r<0&&n&&!ey(t)?0:r},KI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ny=function(t){return t.tagName==="INPUT"},ZI=function(t){return ny(t)&&t.type==="hidden"},XI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},JI=function(t){if(!t.name)return!0;var n=t.form||Pa(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=QI(o,t.form);return!i||i===t},eA=function(t){return ny(t)&&t.type==="radio"},tA=function(t){return eA(t)&&!JI(t)},nA=function(t){var n,r=t&&Pa(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Pa(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},ry=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},rA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=zo.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(zo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Pa(t);if(c&&!c.shadowRoot&&o(c)===!0)return ry(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(nA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ry(t);return!1},oA=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 zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ru=function(t,n){return!(n.disabled||ZI(n)||rA(n,t)||XI(n)||oA(n))},Bu=function(t,n){return!(tA(n)||ty(n)<0||!Ru(t,n))},iA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},oy=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=YI(a,s),c=s?oy(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(KI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},jo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_a([t],n.includeContainer,{filter:Bu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:iA}):r=Jg(t,n.includeContainer,Bu.bind(null,n)),oy(r)},sA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_a([t],n.includeContainer,{filter:Ru.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Jg(t,n.includeContainer,Ru.bind(null,n)),r},iy=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return zo.call(t,Aa)===!1?!1:Bu(n,t)};function Hu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function sy(){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 ay(){return/apple/i.test(navigator.vendor)}function Wu(){const e=/android/i;return e.test(Hu())||e.test(sy())}function aA(){return Hu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function ly(){return sy().includes("jsdom/")}const cy="data-floating-ui-focusable",lA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",qu="ArrowLeft",Uu="ArrowRight",cA="ArrowUp",uA="ArrowDown";function qn(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 Bt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Gu(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 dA(e){return e.matches("html,body")}function qt(e){return e?.ownerDocument||document}function Yu(e){return Pt(e)&&e.matches(lA)}function Ku(e){return e?e.getAttribute("role")==="combobox"&&Yu(e):!1}function fA(e){if(!e||ly())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ma(e){return e?e.hasAttribute(cy)?e:e.querySelector("["+cy+"]")||e:null}function ro(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ro(e,o.id,n)])}function pA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),ro(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function uy(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Ut(e){e.preventDefault(),e.stopPropagation()}function hA(e){return"nativeEvent"in e}function dy(e){return e.mozInputSource===0&&e.isTrusted?!0:Wu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fy(e){return ly()?!1:!Wu()&&e.width===0&&e.height===0||Wu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ro(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var mA=typeof document<"u",gA=function(){},nt=mA?S.useLayoutEffect:gA;const yA={...P};function Ht(e){const t=P.useRef(e);return nt(()=>{t.current=e}),t}const vA=yA.useInsertionEffect||(e=>e());function kt(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return vA(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Da(e,t,n){return Math.floor(e/t)!==n}function Zi(e,t){return t<0||t>=e.current.length}function Zu(e,t){return Zt(e,{disabledIndices:t})}function py(e,t){return Zt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Zt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,s=n;do s+=r?-i:i;while(s>=0&&s<=e.current.length-1&&Na(e,s,o));return s}function bA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===cA){if(d&&Ut(n),u===-1)f=c;else if(f=Zt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||f<0)){const p=u%s,h=c%s,y=c-(h-p);h===p?f=c:f=h>p?y:y-s}Zi(e,f)&&(f=u)}if(n.key===uA&&(d&&Ut(n),u===-1?f=l:(f=Zt(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(f=Zt(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),Zi(e,f)&&(f=u)),r==="both"){const p=$o(u/s);n.key===(i?qu:Uu)&&(d&&Ut(n),u%s!==s-1?(f=Zt(e,{startingIndex:u,disabledIndices:a}),o&&Da(f,s,p)&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a})),Da(f,s,p)&&(f=u)),n.key===(i?Uu:qu)&&(d&&Ut(n),u%s!==0?(f=Zt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Da(f,s,p)&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Da(f,s,p)&&(f=u));const h=$o(c/s)===p;Zi(e,f)&&(o&&h?f=n.key===(i?Uu:qu)?c:Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function xA(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function wA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function SA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Na(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Xi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hy(e,t){const n=jo(e,Xi()),r=n.length;if(r===0)return;const o=qn(qt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function my(e){return hy(qt(e).body,1)||e}function gy(e){return hy(qt(e).body,-1)||e}function Qi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Bt(n,r)}function TA(e){jo(e,Xi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function yy(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function vy(e,t,n){let{reference:r,floating:o}=e;const i=hr(t),s=ju(t),a=zu(s),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(An(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}async function EA(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=no(t,e),h=Xg(p),m=a[f?d==="floating"?"reference":"floating":d],v=Ia(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-E.top+h.top)/T.y,bottom:(E.bottom-v.bottom+h.bottom)/T.y,left:(v.left-E.left+h.left)/T.x,right:(E.right-v.right+h.right)/T.x}}const kA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=vy(c,r,l),f=r,p={},h=0;for(let m=0;m<a.length;m++){var y;const{name:v,fn:b}=a[m],{x,y:T,data:E,reset:I}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:{...s,detectOverflow:(y=s.detectOverflow)!=null?y:EA},elements:{reference:e,floating:t}});u=x??u,d=T??d,p={...p,[v]:{...p[v],...E}},I&&h<=50&&(h++,typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:d}=vy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}},CA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=no(e,t)||{};if(c==null)return{};const d=Xg(u),f={x:n,y:r},p=ju(o),h=zu(p),y=await s.getDimensions(c),m=p==="y",v=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",T=i.reference[h]+i.reference[p]-f[p]-i.floating[h],E=f[p]-i.reference[p],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(I)))&&(w=a.floating[x]||i.floating[h]);const k=T/2-E/2,A=w/2-y[h]/2-1,O=Ar(d[v],A),N=Ar(d[b],A),M=O,$=w-y[h]-N,_=w/2-y[h]/2+k,F=$u(M,_,$),z=!l.arrow&&An(o)!=null&&_!==F&&i.reference[h]/2-(_<M?O:N)-y[h]/2<0,D=z?_<M?_-M:_-$:0;return{[p]:f[p]+D,data:{[p]:F,centerOffset:_-F-D,...z&&{alignmentOffset:D}},reset:z}}});function IA(e,t,n){return(e?[...n.filter(o=>An(o)===e),...n.filter(o=>An(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?An(o)===e||(t?ka(o)!==o:!1):!0)}const AA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Ug,autoAlignment:p=!0,...h}=no(e,t),y=d!==void 0||f===Ug?IA(d||null,p,f):f,m=await l.detectOverflow(t,h),v=((n=s.autoPlacement)==null?void 0:n.index)||0,b=y[v];if(b==null)return{};const x=Yg(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:y[0]}};const T=[m[Wn(b)],m[x[0]],m[x[1]]],E=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:T}],I=y[v+1];if(I)return{data:{index:v+1,overflows:E},reset:{placement:I}};const w=E.map(O=>{const N=An(O.placement);return[O.placement,N&&u?O.overflows.slice(0,2).reduce((M,$)=>M+$,0):O.overflows[0],O.overflows]}).sort((O,N)=>O[1]-N[1]),A=((o=w.filter(O=>O[2].slice(0,An(O[0])?2:3).every(N=>N<=0))[0])==null?void 0:o[0])||w[0][0];return A!==a?{data:{index:v+1,overflows:E},reset:{placement:A}}:{}}}},PA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0,...m}=no(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Wn(o),b=hr(a),x=Wn(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!y?[Ca(a)]:jI(a)),I=h!=="none";!f&&I&&E.push(...WI(a,y,h,T));const w=[a,...E],k=await l.detectOverflow(t,m),A=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(k[v]),d){const _=Yg(o,s,T);A.push(k[_[0]],k[_[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(_=>_<=0)){var N,M;const _=(((N=i.flip)==null?void 0:N.index)||0)+1,F=w[_];if(F&&(!(d==="alignment"?b!==hr(F):!1)||O.every(C=>hr(C.placement)===b?C.overflows[0]>0:!0)))return{data:{index:_,overflows:O},reset:{placement:F}};let z=(M=O.filter(D=>D.overflows[0]<=0).sort((D,C)=>D.overflows[1]-C.overflows[1])[0])==null?void 0:M.placement;if(!z)switch(p){case"bestFit":{var $;const D=($=O.filter(C=>{if(I){const V=hr(C.placement);return V===b||V==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(V=>V>0).reduce((V,L)=>V+L,0)]).sort((C,V)=>C[1]-V[1])[0])==null?void 0:$[0];D&&(z=D);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},OA=new Set(["left","top"]);async function _A(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Wn(n),a=An(n),l=hr(n)==="y",c=OA.has(s)?-1:1,u=i&&l?-1:1,d=no(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const MA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await _A(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},DA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...c}=no(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=hr(Wn(o)),p=Gg(f);let h=u[p],y=u[f];if(s){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+d[v],T=h-d[b];h=$u(x,h,T)}if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=y+d[v],T=y-d[b];y=$u(x,y,T)}const m=l.fn({...t,[p]:h,[f]:y});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:s,[f]:a}}}}}},NA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=no(e,t),u=await s.detectOverflow(t,c),d=Wn(o),f=An(o),p=hr(o)==="y",{width:h,height:y}=i.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,m=f==="end"?"top":"bottom");const b=y-u.top-u.bottom,x=h-u.left-u.right,T=Ar(y-u[m],b),E=Ar(h-u[v],x),I=!t.middlewareData.shift;let w=T,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const O=dn(u.left,0),N=dn(u.right,0),M=dn(u.top,0),$=dn(u.bottom,0);p?k=h-2*(O!==0||N!==0?O+N:dn(u.left,u.right)):w=y-2*(M!==0||$!==0?M+$:dn(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:w});const A=await s.getDimensions(a.floating);return h!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function by(e){const t=un(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ea(n)!==i||Ea(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Xu(e){return tt(e)?e:e.contextElement}function Bo(e){const t=Xu(e);if(!Pt(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=by(t);let s=(i?Ea(n.width):n.width)/r,a=(i?Ea(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const FA=Hn(0);function xy(e){const t=Wt(e);return!Sa()||!t.visualViewport?FA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function oo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Xu(e);let s=Hn(1);t&&(r?tt(r)&&(s=Bo(r)):s=Bo(e));const a=LA(i,n,r)?xy(i):Hn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Wt(i),p=r&&tt(r)?Wt(r):r;let h=f,y=Vu(h);for(;y&&r&&p!==h;){const m=Bo(y),v=y.getBoundingClientRect(),b=un(y),x=v.left+(y.clientLeft+parseFloat(b.paddingLeft))*m.x,T=v.top+(y.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=T,h=Wt(y),y=Vu(h)}}return Ia({width:u,height:d,x:l,y:c})}function Fa(e,t){const n=Ta(e).scrollLeft;return t?t.left+n:oo(Bn(e)).left+n}function wy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function VA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Bn(r),a=t?wa(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Pt(r);if((d||!d&&!i)&&((Cr(r)!=="body"||Ki(s))&&(l=Ta(r)),Pt(r))){const p=oo(r);c=Bo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=s&&!d&&!i?wy(s,l):Hn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function $A(e){return Array.from(e.getClientRects())}function zA(e){const t=Bn(e),n=Ta(e),r=e.ownerDocument.body,o=dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Fa(e);const a=-n.scrollTop;return un(r).direction==="rtl"&&(s+=dn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sy=25;function jA(e,t){const n=Wt(e),r=Bn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Sa();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Fa(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=Sy&&(i-=h)}else c<=Sy&&(i+=c);return{width:i,height:s,x:a,y:l}}const RA=new Set(["absolute","fixed"]);function BA(e,t){const n=oo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pt(e)?Bo(e):Hn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Ty(e,t,n){let r;if(t==="viewport")r=jA(e,n);else if(t==="document")r=zA(Bn(e));else if(tt(t))r=BA(t,n);else{const o=xy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ia(r)}function Ey(e,t){const n=pr(e);return n===t||!tt(n)||fr(n)?!1:un(n).position==="fixed"||Ey(n,t)}function HA(e,t){const n=t.get(e);if(n)return n;let r=Ir(e,[],!1).filter(a=>tt(a)&&Cr(a)!=="body"),o=null;const i=un(e).position==="fixed";let s=i?pr(e):e;for(;tt(s)&&!fr(s);){const a=un(s),l=Lu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&RA.has(o.position)||Ki(s)&&!l&&Ey(e,s))?r=r.filter(u=>u!==s):o=a,s=pr(s)}return t.set(e,r),r}function WA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?wa(t)?[]:HA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Ty(t,u,o);return c.top=dn(d.top,c.top),c.right=Ar(d.right,c.right),c.bottom=Ar(d.bottom,c.bottom),c.left=dn(d.left,c.left),c},Ty(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qA(e){const{width:t,height:n}=by(e);return{width:t,height:n}}function UA(e,t,n){const r=Pt(t),o=Bn(t),i=n==="fixed",s=oo(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Fa(o)}if(r||!r&&!i)if((Cr(t)!=="body"||Ki(o))&&(a=Ta(t)),r){const p=oo(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?wy(o,a):Hn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function Qu(e){return un(e).position==="static"}function ky(e,t){if(!Pt(e)||un(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function Cy(e,t){const n=Wt(e);if(wa(e))return n;if(!Pt(e)){let o=pr(e);for(;o&&!fr(o);){if(tt(o)&&!Qu(o))return o;o=pr(o)}return n}let r=ky(e,t);for(;r&&PI(r)&&Qu(r);)r=ky(r,t);return r&&fr(r)&&Qu(r)&&!Lu(r)?n:r||NI(e)||n}const GA=async function(e){const t=this.getOffsetParent||Cy,n=this.getDimensions,r=await n(e.floating);return{reference:UA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function YA(e){return un(e).direction==="rtl"}const KA={convertOffsetParentRelativeRectToViewportRelativeRect:VA,getDocumentElement:Bn,getClippingRect:WA,getOffsetParent:Cy,getElementRects:GA,getClientRects:$A,getDimensions:qA,getScale:Bo,isElement:tt,isRTL:YA};function Iy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ZA(e,t){let n=null,r;const o=Bn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const h=$o(d),y=$o(o.clientWidth-(u+f)),m=$o(o.clientHeight-(d+p)),v=$o(u),x={rootMargin:-h+"px "+-y+"px "+-m+"px "+-v+"px",threshold:dn(0,Ar(1,l))||1};let T=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!T)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!Iy(c,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),i}function io(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Xu(e),u=o||i?[...c?Ir(c):[],...Ir(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?ZA(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let h,y=l?oo(e):null;l&&m();function m(){const v=oo(e);y&&!Iy(y,v)&&n(),y=v,h=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const XA=MA,QA=AA,JA=DA,eP=PA,tP=NA,Ay=CA,nP=(e,t,n)=>{const r=new Map,o={platform:KA,...n},i={...o.platform,_c:r};return kA(e,t,{...o,platform:i})};var rP=typeof document<"u",oP=function(){},La=rP?S.useLayoutEffect:oP;function Va(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(!Va(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)&&!Va(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Py(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oy(e,t){const n=Py(e);return Math.round(t*n)/n}function Ju(e){const t=P.useRef(e);return La(()=>{t.current=e}),t}function iP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Va(f,r)||p(r);const[h,y]=P.useState(null),[m,v]=P.useState(null),b=P.useCallback(C=>{C!==I.current&&(I.current=C,y(C))},[]),x=P.useCallback(C=>{C!==w.current&&(w.current=C,v(C))},[]),T=i||h,E=s||m,I=P.useRef(null),w=P.useRef(null),k=P.useRef(u),A=l!=null,O=Ju(l),N=Ju(o),M=Ju(c),$=P.useCallback(()=>{if(!I.current||!w.current)return;const C={placement:t,strategy:n,middleware:f};N.current&&(C.platform=N.current),nP(I.current,w.current,C).then(V=>{const L={...V,isPositioned:M.current!==!1};_.current&&!Va(k.current,L)&&(k.current=L,cr.flushSync(()=>{d(L)}))})},[f,t,n,N,M]);La(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const _=P.useRef(!1);La(()=>(_.current=!0,()=>{_.current=!1}),[]),La(()=>{if(T&&(I.current=T),E&&(w.current=E),T&&E){if(O.current)return O.current(T,E,$);$()}},[T,E,$,O,A]);const F=P.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=P.useMemo(()=>({reference:T,floating:E}),[T,E]),D=P.useMemo(()=>{const C={position:n,left:0,top:0};if(!z.floating)return C;const V=Oy(z.floating,u.x),L=Oy(z.floating,u.y);return a?{...C,transform:"translate("+V+"px, "+L+"px)",...Py(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:L}},[n,a,z.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:F,elements:z,floatingStyles:D}),[u,$,F,z,D])}const sP=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?Ay({element:r.current,padding:o}).fn(n):{}:r?Ay({element:r,padding:o}).fn(n):{}}}},Ho=(e,t)=>({...XA(e),options:[e,t]}),$a=(e,t)=>({...JA(e),options:[e,t]}),za=(e,t)=>({...eP(e),options:[e,t]}),_y=(e,t)=>({...tP(e),options:[e,t]}),My=(e,t)=>({...QA(e),options:[e,t]}),ed=(e,t)=>({...sP(e),options:[e,t]});function aP(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Dy=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function lP(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Set),s=P.useCallback(c=>{i(u=>new Set(u).add(c))},[]),a=P.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=P.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(aP).forEach((d,f)=>{c.set(d,f)}),c},[o]);return g.jsx(Dy.Provider,{value:P.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function Ny(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=P.useContext(Dy),[a,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const p=t!==void 0;s.current[a]=p?t:(f=d?.textContent)!=null?f:null}},[a,i,s,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:a??-1}),[a,u])}const cP="data-floating-ui-focusable",Fy="active",Ly="selected",Ji="ArrowLeft",es="ArrowRight",Vy="ArrowUp",ja="ArrowDown",uP={...P};let $y=!1,dP=0;const zy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dP++;function fP(){const[e,t]=P.useState(()=>$y?zy():void 0);return nt(()=>{e==null&&t(zy())},[]),P.useEffect(()=>{$y=!0},[]),e}const ts=uP.useId||fP;let ns;process.env.NODE_ENV!=="production"&&(ns=new Set);function Ra(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.warn(o)}}function pP(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.error(o)}}const td=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...y}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Ra("The `ref` prop is required for `FloatingArrow`."));const v=ts(),[b,x]=P.useState(!1);if(nt(()=>{if(!o)return;un(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,E]=r.split("-"),I=T==="top"||T==="bottom";let w=d;(I&&s!=null&&s.x||!I&&s!=null&&s.y)&&(w=null);const k=u*2,A=k/2,O=a/2*(c/-8+1),N=l/2*c/4,M=!!p,$=w&&E==="end"?"bottom":"top";let _=w&&E==="end"?"right":"left";w&&b&&(_=E==="end"?"left":"right");const F=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",D=p||"M0,0"+(" H"+a)+(" L"+(a-O)+","+(l-N))+(" Q"+a/2+","+l+" "+O+","+(l-N))+" Z",C={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[T];return g.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:M?a:a+k,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[_]:F,[$]:z,[T]:I||M?"100%":"calc(100% - "+k/2+"px)",transform:[C,h].filter(V=>!!V).join(" "),...y},children:[k>0&&g.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:D}),g.jsx("path",{stroke:k&&!p?m.fill:"none",d:D}),g.jsx("clipPath",{id:v,children:g.jsx("rect",{x:-A,y:A*(M?-1:1),width:a+k,height:a})})]})});function jy(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Ry=P.createContext(null),By=P.createContext(null),Pr=()=>{var e;return((e=P.useContext(Ry))==null?void 0:e.id)||null},Or=()=>P.useContext(By);function hP(e){const t=ts(),n=Or(),o=Pr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function mP(e){const{children:t,id:n}=e,r=Pr();return g.jsx(Ry.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function gP(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(s=>{n.current=[...n.current,s]},[]),o=P.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),[i]=P.useState(()=>jy());return g.jsx(By.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function so(e){return"data-floating-ui-"+e}function Gt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Hy=so("safe-polygon");function nd(e,t,n){if(n&&!Ro(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function rd(e){return typeof e=="function"?e():e}function Wy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Or(),h=Pr(),y=Ht(c),m=Ht(l),v=Ht(n),b=Ht(d),x=P.useRef(),T=P.useRef(-1),E=P.useRef(),I=P.useRef(-1),w=P.useRef(!0),k=P.useRef(!1),A=P.useRef(()=>{}),O=P.useRef(!1),N=kt(()=>{var D;const C=(D=o.current.openEvent)==null?void 0:D.type;return C?.includes("mouse")&&C!=="mousedown"});P.useEffect(()=>{if(!a)return;function D(C){let{open:V}=C;V||(Gt(T),Gt(I),w.current=!0,O.current=!1)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[a,i]),P.useEffect(()=>{if(!a||!y.current||!n)return;function D(V){N()&&r(!1,V,"hover")}const C=qt(s.floating).documentElement;return C.addEventListener("mouseleave",D),()=>{C.removeEventListener("mouseleave",D)}},[s.floating,n,r,a,y,N]);const M=P.useCallback(function(D,C,V){C===void 0&&(C=!0),V===void 0&&(V="hover");const L=nd(m.current,"close",x.current);L&&!E.current?(Gt(T),T.current=window.setTimeout(()=>r(!1,D,V),L)):C&&(Gt(T),r(!1,D,V))},[m,r]),$=kt(()=>{A.current(),E.current=void 0}),_=kt(()=>{if(k.current){const D=qt(s.floating).body;D.style.pointerEvents="",D.removeAttribute(Hy),k.current=!1}}),F=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);P.useEffect(()=>{if(!a)return;function D(U){if(Gt(T),w.current=!1,u&&!Ro(x.current)||rd(b.current)>0&&!nd(m.current,"open"))return;const G=nd(m.current,"open",x.current);G?T.current=window.setTimeout(()=>{v.current||r(!0,U,"hover")},G):n||r(!0,U,"hover")}function C(U){if(F()){_();return}A.current();const G=qt(s.floating);if(Gt(I),O.current=!1,y.current&&o.current.floatingContext){n||Gt(T),E.current=y.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){_(),$(),F()||M(U,!0,"safe-polygon")}});const ee=E.current;G.addEventListener("mousemove",ee),A.current=()=>{G.removeEventListener("mousemove",ee)};return}(x.current!=="touch"||!Bt(s.floating,U.relatedTarget))&&M(U)}function V(U){F()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){_(),$(),F()||M(U)}})(U))}function L(){Gt(T)}function B(U){F()||M(U,!1)}if(tt(s.domReference)){const U=s.domReference,G=s.floating;return n&&U.addEventListener("mouseleave",V),f&&U.addEventListener("mousemove",D,{once:!0}),U.addEventListener("mouseenter",D),U.addEventListener("mouseleave",C),G&&(G.addEventListener("mouseleave",V),G.addEventListener("mouseenter",L),G.addEventListener("mouseleave",B)),()=>{n&&U.removeEventListener("mouseleave",V),f&&U.removeEventListener("mousemove",D),U.removeEventListener("mouseenter",D),U.removeEventListener("mouseleave",C),G&&(G.removeEventListener("mouseleave",V),G.removeEventListener("mouseenter",L),G.removeEventListener("mouseleave",B))}}},[s,a,e,u,f,M,$,_,r,n,v,p,m,y,o,F,b]),nt(()=>{var D;if(a&&n&&(D=y.current)!=null&&(D=D.__options)!=null&&D.blockPointerEvents&&N()){k.current=!0;const V=s.floating;if(tt(s.domReference)&&V){var C;const L=qt(s.floating).body;L.setAttribute(Hy,"");const B=s.domReference,U=p==null||(C=p.nodesRef.current.find(G=>G.id===h))==null||(C=C.context)==null?void 0:C.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",B.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{L.style.pointerEvents="",B.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,h,s,p,y,N]),nt(()=>{n||(x.current=void 0,O.current=!1,$(),_())},[n,$,_]),P.useEffect(()=>()=>{$(),Gt(T),Gt(I),_()},[a,s.domReference,$,_]);const z=P.useMemo(()=>{function D(C){x.current=C.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(C){const{nativeEvent:V}=C;function L(){!w.current&&!v.current&&r(!0,V,"hover")}u&&!Ro(x.current)||n||rd(b.current)===0||O.current&&C.movementX**2+C.movementY**2<2||(Gt(I),x.current==="touch"?L():(O.current=!0,I.current=window.setTimeout(L,rd(b.current))))}}},[u,r,n,v,b]);return P.useMemo(()=>a?{reference:z}:{},[a,z])}let qy=0;function ao(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qy);const i=()=>e?.focus({preventScroll:n});o?i():qy=requestAnimationFrame(i)}function od(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function vP(e){return e?.ownerDocument||document}const Wo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Uy(e){return e==="inert"?Wo.inert:e==="aria-hidden"?Wo["aria-hidden"]:Wo.none}let Ba=new WeakSet,Ha={},id=0;const bP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Gy=e=>e&&(e.host||Gy(e.parentNode)),xP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Gy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function wP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=xP(t,e),a=new Set,l=new Set(s),c=[];Ha[o]||(Ha[o]=new WeakMap);const u=Ha[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(Cr(h)!=="script")if(a.has(h))f(h);else{const y=i?h.getAttribute(i):null,m=y!==null&&y!=="false",v=Uy(i),b=(v.get(h)||0)+1,x=(u.get(h)||0)+1;v.set(h,b),u.set(h,x),c.push(h),b===1&&m&&Ba.add(h),x===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,i==="inert"?"":"true")}})}return id++,()=>{c.forEach(p=>{const h=Uy(i),m=(h.get(p)||0)-1,v=(u.get(p)||0)-1;h.set(p,m),u.set(p,v),m||(!Ba.has(p)&&i&&p.removeAttribute(i),Ba.delete(p)),v||p.removeAttribute(o)}),id--,id||(Wo.inert=new WeakMap,Wo["aria-hidden"]=new WeakMap,Wo.none=new WeakMap,Ba=new WeakSet,Ha={})}}function Yy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vP(e[0]).body;return wP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const sd={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},Wa=P.forwardRef(function(t,n){const[r,o]=P.useState();nt(()=>{ay()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[so("focus-guard")]:"",style:sd};return g.jsx("span",{...t,...i})}),SP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ky=P.createContext(null),Zy=so("portal");function TP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ts(),o=Xy(),[i,s]=P.useState(null),a=P.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),nt(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Zy,""),l.appendChild(c),a.current=c,s(c)},[t,r]),nt(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!xa(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(Zy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function mr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=TP({id:n,root:r}),[s,a]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=s?.modal,p=s?.open,h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||f)return;function y(m){i&&Qi(m)&&(m.type==="focusin"?yy:TA)(i)}return i.addEventListener("focusin",y,!0),i.addEventListener("focusout",y,!0),()=>{i.removeEventListener("focusin",y,!0),i.removeEventListener("focusout",y,!0)}},[i,o,f]),P.useEffect(()=>{i&&(p||yy(i))},[p,i]),g.jsxs(Ky.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[h&&i&&g.jsx(Wa,{"data-type":"outside",ref:l,onFocus:y=>{if(Qi(y,i)){var m;(m=u.current)==null||m.focus()}else{const v=s?s.domReference:null,b=gy(v);b?.focus()}}}),h&&i&&g.jsx("span",{"aria-owns":i.id,style:SP}),i&&cr.createPortal(t,i),h&&i&&g.jsx(Wa,{"data-type":"outside",ref:c,onFocus:y=>{if(Qi(y,i)){var m;(m=d.current)==null||m.focus()}else{const v=s?s.domReference:null,b=my(v);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const Xy=()=>P.useContext(Ky);function Qy(e){return P.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const EP=20;let _r=[];function ad(){_r=_r.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function kP(e){ad(),e&&Cr(e)!=="body"&&(_r.push(new WeakRef(e)),_r.length>EP&&(_r=_r.slice(-20)))}function Jy(){ad();const e=_r[_r.length-1];return e?.deref()}function CP(e){const t=Xi();return iy(e,t)?e:jo(e,t)[0]||e}function ev(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Xi(),i=sA(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return iy(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const IP=P.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:sd})});function lo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:h,onOpenChange:y,events:m,dataRef:v,elements:{domReference:b,floating:x}}=t,T=kt(()=>{var R;return(R=v.current.floatingContext)==null?void 0:R.nodeId}),E=kt(p),I=typeof s=="number"&&s<0,w=Ku(b)&&I,k=bP(),A=k?i:!0,O=!A||k&&f,N=Ht(o),M=Ht(s),$=Ht(a),_=Or(),F=Xy(),z=P.useRef(null),D=P.useRef(null),C=P.useRef(!1),V=P.useRef(!1),L=P.useRef(-1),B=P.useRef(-1),U=F!=null,G=Ma(x),H=kt(function(R){return R===void 0&&(R=G),R?jo(R,Xi()):[]}),ee=kt(R=>{const ae=H(R);return N.current.map(ce=>b&&ce==="reference"?b:G&&ce==="floating"?G:ae).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function R(ce){if(ce.key==="Tab"){Bt(G,qn(qt(G)))&&H().length===0&&!w&&Ut(ce);const Q=ee(),ue=Un(ce);N.current[0]==="reference"&&ue===b&&(Ut(ce),ce.shiftKey?ao(Q[Q.length-1]):ao(Q[1])),N.current[1]==="floating"&&ue===G&&ce.shiftKey&&(Ut(ce),ao(Q[0]))}}const ae=qt(G);return ae.addEventListener("keydown",R),()=>{ae.removeEventListener("keydown",R)}},[r,b,G,c,N,w,H,ee]),P.useEffect(()=>{if(r||!x)return;function R(ae){const ce=Un(ae),ue=H().indexOf(ce);ue!==-1&&(L.current=ue)}return x.addEventListener("focusin",R),()=>{x.removeEventListener("focusin",R)}},[r,x,H]),P.useEffect(()=>{if(r||!d)return;function R(){V.current=!0,setTimeout(()=>{V.current=!1})}function ae(ue){const re=ue.relatedTarget,he=ue.currentTarget,oe=Un(ue);queueMicrotask(()=>{const le=T(),be=!(Bt(b,re)||Bt(x,re)||Bt(re,x)||Bt(F?.portalNode,re)||re!=null&&re.hasAttribute(so("focus-guard"))||_&&(ro(_.nodesRef.current,le).find(de=>{var ne,J;return Bt((ne=de.context)==null?void 0:ne.elements.floating,re)||Bt((J=de.context)==null?void 0:J.elements.domReference,re)})||uy(_.nodesRef.current,le).find(de=>{var ne,J,j;return[(ne=de.context)==null?void 0:ne.elements.floating,Ma((J=de.context)==null?void 0:J.elements.floating)].includes(re)||((j=de.context)==null?void 0:j.elements.domReference)===re})));if(he===b&&G&&ev(G,N),l&&he!==b&&!(oe!=null&&oe.isConnected)&&qn(qt(G))===qt(G).body){Pt(G)&&G.focus();const de=L.current,ne=H(),J=ne[de]||ne[ne.length-1]||G;Pt(J)&&J.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(w||!c)&&re&&be&&!V.current&&re!==Jy()&&(C.current=!0,y(!1,ue,"focus-out"))})}const ce=!!(!_&&F);function Q(){Gt(B),v.current.insideReactTree=!0,B.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&Pt(b))return b.addEventListener("focusout",ae),b.addEventListener("pointerdown",R),x.addEventListener("focusout",ae),ce&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",ae),b.removeEventListener("pointerdown",R),x.removeEventListener("focusout",ae),ce&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,_,F,y,d,l,H,w,T,N,v]);const ie=P.useRef(null),te=P.useRef(null),q=Qy([ie,F?.beforeInsideRef]),Y=Qy([te,F?.afterInsideRef]);P.useEffect(()=>{var R,ae;if(r||!x)return;const ce=Array.from((F==null||(R=F.portalNode)==null?void 0:R.querySelectorAll("["+so("portal")+"]"))||[]),ue=(ae=(_?uy(_.nodesRef.current,T()):[]).find(oe=>{var le;return Ku(((le=oe.context)==null?void 0:le.elements.domReference)||null)}))==null||(ae=ae.context)==null?void 0:ae.elements.domReference,re=[x,ue,...ce,...E(),z.current,D.current,ie.current,te.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,N.current.includes("reference")||w?b:null].filter(oe=>oe!=null),he=c||w?Yy(re,!O,O):Yy(re);return()=>{he()}},[r,b,x,c,N,F,w,A,O,_,T,E]),nt(()=>{if(r||!Pt(G))return;const R=qt(G),ae=qn(R);queueMicrotask(()=>{const ce=ee(G),Q=M.current,ue=(typeof Q=="number"?ce[Q]:Q.current)||G,re=Bt(G,ae);!I&&!re&&h&&ao(ue,{preventScroll:ue===G})})},[r,h,G,I,ee,M]),nt(()=>{if(r||!G)return;const R=qt(G),ae=qn(R);kP(ae);function ce(re){let{reason:he,event:oe,nested:le}=re;if(["hover","safe-polygon"].includes(he)&&oe.type==="mouseleave"&&(C.current=!0),he==="outside-press")if(le)C.current=!1;else if(dy(oe)||fy(oe))C.current=!1;else{let be=!1;document.createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?C.current=!1:C.current=!0}}m.on("openchange",ce);const Q=R.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,sd),U&&b&&b.insertAdjacentElement("afterend",Q);function ue(){if(typeof $.current=="boolean"){const re=b||Jy();return re&&re.isConnected?re:Q}return $.current.current||Q}return()=>{m.off("openchange",ce);const re=qn(R),he=Bt(x,re)||_&&ro(_.nodesRef.current,T(),!1).some(le=>{var be;return Bt((be=le.context)==null?void 0:be.elements.floating,re)}),oe=ue();queueMicrotask(()=>{const le=CP(oe);$.current&&!C.current&&Pt(le)&&(!(le!==re&&re!==R.body)||he)&&le.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,$,v,m,_,U,b,T]),P.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(ad)}),[r]),nt(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:h,onOpenChange:y,domReference:b}),()=>{F.setFocusManagerState(null)}},[r,F,c,h,y,d,b]),nt(()=>{r||G&&ev(G,N)},[r,G,N]);function Z(R){return r||!u||!c?null:g.jsx(IP,{ref:R==="start"?z:D,onClick:ae=>y(!1,ae.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const pe=!r&&A&&(c?!w:!0)&&(U||c);return g.jsxs(g.Fragment,{children:[pe&&g.jsx(Wa,{"data-type":"inside",ref:q,onFocus:R=>{if(c){const ce=ee();ao(o[0]==="reference"?ce[0]:ce[ce.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(C.current=!1,Qi(R,F.portalNode)){const ce=my(b);ce?.focus()}else{var ae;(ae=F.beforeOutsideRef.current)==null||ae.focus()}}}),!w&&Z("start"),n,Z("end"),pe&&g.jsx(Wa,{"data-type":"inside",ref:Y,onFocus:R=>{if(c)ao(ee()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(C.current=!0),Qi(R,F.portalNode)){const ce=gy(b);ce?.focus()}else{var ae;(ae=F.afterOutsideRef.current)==null||ae.focus()}}})]})}let qa=0;const tv="--floating-ui-scrollbar-width";function AP(){const e=Hu(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(tv,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(tv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let nv=()=>{};const ld=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return qa++,qa===1&&(nv=AP()),()=>{qa--,qa===0&&nv()}},[r]),g.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function rv(e){return Pt(e.target)&&e.target.tagName==="BUTTON"}function PP(e){return Pt(e.target)&&e.target.tagName==="A"}function ov(e){return Yu(e)}function qo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=P.useRef(),p=P.useRef(!1),h=P.useMemo(()=>({onPointerDown(y){f.current=y.pointerType},onMouseDown(y){const m=f.current;y.button===0&&a!=="click"&&(Ro(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,y.nativeEvent,"click"):(y.preventDefault(),r(!0,y.nativeEvent,"click"))))},onClick(y){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Ro(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,y.nativeEvent,"click"):r(!0,y.nativeEvent,"click"))},onKeyDown(y){f.current=void 0,!(y.defaultPrevented||!u||rv(y))&&(y.key===" "&&!ov(i)&&(y.preventDefault(),p.current=!0),!PP(y)&&y.key==="Enter"&&r(!(n&&l),y.nativeEvent,"click"))},onKeyUp(y){y.defaultPrevented||!u||rv(y)||ov(i)||y.key===" "&&p.current&&(p.current=!1,r(!(n&&l),y.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return P.useMemo(()=>s?{reference:h}:{},[s,h])}function OP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,d=s.height,f=s.x,p=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=a&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function iv(e){return e!=null&&e.clientX!=null}function _P(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=P.useRef(!1),f=P.useRef(null),[p,h]=P.useState(),[y,m]=P.useState([]),v=kt((I,w)=>{d.current||r.current.openEvent&&!iv(r.current.openEvent)||s.setPositionReference(OP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),b=kt(I=>{c!=null||u!=null||(n?f.current||m([]):v(I.clientX,I.clientY))}),x=Ro(p)?o:n,T=P.useCallback(()=>{if(!x||!a||c!=null||u!=null)return;const I=Wt(o);function w(k){const A=Un(k);Bt(o,A)?(I.removeEventListener("mousemove",w),f.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||iv(r.current.openEvent)){I.addEventListener("mousemove",w);const k=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=k,k}s.setPositionReference(i)},[x,a,c,u,o,r,s,i,v]);P.useEffect(()=>T(),[T,y]),P.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),P.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),nt(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const E=P.useMemo(()=>{function I(w){let{pointerType:k}=w;h(k)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return P.useMemo(()=>a?{reference:E}:{},[a,E])}const MP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},DP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},sv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Mr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,y=Or(),m=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,b=P.useRef(!1),{escapeKey:x,outsidePress:T}=sv(p),{escapeKey:E,outsidePress:I}=sv(h),w=P.useRef(!1),k=kt(_=>{var F;if(!n||!s||!a||_.key!=="Escape"||w.current)return;const z=(F=i.current.floatingContext)==null?void 0:F.nodeId,D=y?ro(y.nodesRef.current,z):[];if(!x&&(_.stopPropagation(),D.length>0)){let C=!0;if(D.forEach(V=>{var L;if((L=V.context)!=null&&L.open&&!V.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,hA(_)?_.nativeEvent:_,"escape-key")}),A=kt(_=>{var F;const z=()=>{var D;k(_),(D=Un(_))==null||D.removeEventListener("keydown",z)};(F=Un(_))==null||F.addEventListener("keydown",z)}),O=kt(_=>{var F;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const D=b.current;if(b.current=!1,c==="click"&&D||z||typeof v=="function"&&!v(_))return;const C=Un(_),V="["+so("inert")+"]",L=qt(o.floating).querySelectorAll(V);let B=tt(C)?C:null;for(;B&&!fr(B);){const ee=pr(B);if(fr(ee)||!tt(ee))break;B=ee}if(L.length&&tt(C)&&!dA(C)&&!Bt(C,o.floating)&&Array.from(L).every(ee=>!Bt(B,ee)))return;if(Pt(C)&&$){const ee=fr(C),ie=un(C),te=/auto|scroll/,q=ee||te.test(ie.overflowX),Y=ee||te.test(ie.overflowY),Z=q&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,pe=Y&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,R=ie.direction==="rtl",ae=pe&&(R?_.offsetX<=C.offsetWidth-C.clientWidth:_.offsetX>C.clientWidth),ce=Z&&_.offsetY>C.clientHeight;if(ae||ce)return}const U=(F=i.current.floatingContext)==null?void 0:F.nodeId,G=y&&ro(y.nodesRef.current,U).some(ee=>{var ie;return Gu(_,(ie=ee.context)==null?void 0:ie.elements.floating)});if(Gu(_,o.floating)||Gu(_,o.domReference)||G)return;const H=y?ro(y.nodesRef.current,U):[];if(H.length>0){let ee=!0;if(H.forEach(ie=>{var te;if((te=ie.context)!=null&&te.open&&!ie.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,_,"outside-press")}),N=kt(_=>{var F;const z=()=>{var D;O(_),(D=Un(_))==null||D.removeEventListener(c,z)};(F=Un(_))==null||F.addEventListener(c,z)});P.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let _=-1;function F(L){r(!1,L,"ancestor-scroll")}function z(){window.clearTimeout(_),w.current=!0}function D(){_=window.setTimeout(()=>{w.current=!1},Sa()?5:0)}const C=qt(o.floating);a&&(C.addEventListener("keydown",E?A:k,E),C.addEventListener("compositionstart",z),C.addEventListener("compositionend",D)),v&&C.addEventListener(c,I?N:O,I);let V=[];return f&&(tt(o.domReference)&&(V=Ir(o.domReference)),tt(o.floating)&&(V=V.concat(Ir(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(V=V.concat(Ir(o.reference.contextElement)))),V=V.filter(L=>{var B;return L!==((B=C.defaultView)==null?void 0:B.visualViewport)}),V.forEach(L=>{L.addEventListener("scroll",F,{passive:!0})}),()=>{a&&(C.removeEventListener("keydown",E?A:k,E),C.removeEventListener("compositionstart",z),C.removeEventListener("compositionend",D)),v&&C.removeEventListener(c,I?N:O,I),V.forEach(L=>{L.removeEventListener("scroll",F)}),window.clearTimeout(_)}},[i,o,a,v,c,n,r,f,s,x,T,k,E,A,O,I,N]),P.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const M=P.useMemo(()=>({onKeyDown:k,...u&&{[MP[d]]:_=>{r(!1,_.nativeEvent,"reference-press")},...d!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}}}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[DP[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return P.useMemo(()=>s?{reference:M,floating:$}:{},[s,M,$])}function NP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ts(),i=P.useRef({}),[s]=P.useState(()=>jy()),a=Pr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!tt(p)&&pP("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]=P.useState(r.reference),u=kt((p,h,y)=>{i.current.openEvent=p?h:void 0,s.emit("openchange",{open:p,event:h,reason:y,nested:a}),n?.(p,h,y)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=NP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=P.useState(null),[a,l]=P.useState(null),u=o?.domReference||i,d=P.useRef(null),f=Or();nt(()=>{u&&(d.current=u)},[u]);const p=iP({...e,elements:{...o,...a&&{reference:a}}}),h=P.useCallback(x=>{const T=tt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),p.refs.setReference(T)},[p.refs]),y=P.useCallback(x=>{(tt(x)||x===null)&&(d.current=x,s(x)),(tt(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!tt(x))&&p.refs.setReference(x)},[p.refs]),m=P.useMemo(()=>({...p.refs,setReference:y,setPositionReference:h,domReference:d}),[p.refs,y,h]),v=P.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=P.useMemo(()=>({...p,...r,refs:m,elements:v,nodeId:t}),[p,m,v,t,r]);return nt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(T=>T.id===t);x&&(x.context=b)}),P.useMemo(()=>({...p,context:b,refs:m,elements:v}),[p,m,v,b])}function cd(){return aA()&&ay()}function FP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=P.useRef(!1),u=P.useRef(-1),d=P.useRef(!0);P.useEffect(()=>{if(!a)return;const p=Wt(s.domReference);function h(){!n&&Pt(s.domReference)&&s.domReference===qn(qt(s.domReference))&&(c.current=!0)}function y(){d.current=!0}function m(){d.current=!1}return p.addEventListener("blur",h),cd()&&(p.addEventListener("keydown",y,!0),p.addEventListener("pointerdown",m,!0)),()=>{p.removeEventListener("blur",h),cd()&&(p.removeEventListener("keydown",y,!0),p.removeEventListener("pointerdown",m,!0))}},[s.domReference,n,a]),P.useEffect(()=>{if(!a)return;function p(h){let{reason:y}=h;(y==="reference-press"||y==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,a]),P.useEffect(()=>()=>{Gt(u)},[]);const f=P.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const h=Un(p.nativeEvent);if(l&&tt(h)){if(cd()&&!p.relatedTarget){if(!d.current&&!Yu(h))return}else if(!fA(h))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const h=p.relatedTarget,y=p.nativeEvent,m=tt(h)&&h.hasAttribute(so("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=qn(s.domReference?s.domReference.ownerDocument:document);!h&&b===s.domReference||Bt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Bt(s.domReference,b)||m||r(!1,y,"focus")})}}),[i,s.domReference,r,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function ud(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Fy]:s,[Ly]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[cP]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Fy,Ly].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,p=arguments.length,h=new Array(p),y=0;y<p;y++)h[y]=arguments[y];return(f=r.get(c))==null?void 0:f.map(m=>m(...h)).find(m=>m!==void 0)}}}else s[c]=u}),s),{})}}function Yn(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=P.useCallback(a=>ud(a,e,"reference"),t),i=P.useCallback(a=>ud(a,e,"floating"),n),s=P.useCallback(a=>ud(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const LP="Escape";function Ua(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ga(e,t){return Ua(t,e===Vy||e===ja,e===Ji||e===es)}function dd(e,t,n){return Ua(t,e===ja,n?e===Ji:e===es)||e==="Enter"||e===" "||e===""}function av(e,t,n){return Ua(t,n?e===Ji:e===es,e===ja)}function lv(e,t,n,r){const o=n?e===es:e===Ji,i=e===Vy;return t==="both"||t==="horizontal"&&r&&r>1?e===LP:Ua(t,o,i)}function Ya(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:k,itemSizes:A,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Ra("`useListNavigation` looping must be enabled to allow escaping."),y||Ra("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Ra("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const N=Ma(o.floating),M=Ht(N),$=Pr(),_=Or();nt(()=>{e.dataRef.current.orientation=T},[e,T]);const F=kt(()=>{l(C.current===-1?null:C.current)}),z=Ku(o.domReference),D=P.useRef(m),C=P.useRef(u??-1),V=P.useRef(null),L=P.useRef(!0),B=P.useRef(F),U=P.useRef(!!o.floating),G=P.useRef(n),H=P.useRef(!1),ee=P.useRef(!1),ie=Ht(x),te=Ht(n),q=Ht(w),Y=Ht(u),[Z,pe]=P.useState(),[R,ae]=P.useState(),ce=kt(()=>{function de(X){if(y){var me;(me=X.id)!=null&&me.endsWith("-fui-option")&&(X.id=i+"-"+Math.random().toString(16).slice(2,10)),pe(X.id),_?.events.emit("virtualfocus",X),k&&(k.current=X)}else ao(X,{sync:H.current,preventScroll:!0})}const ne=s.current[C.current],J=ee.current;ne&&de(ne),(H.current?X=>X():requestAnimationFrame)(()=>{const X=s.current[C.current]||ne;if(!X)return;ne||de(X);const me=q.current;me&&ue&&(J||!L.current)&&(X.scrollIntoView==null||X.scrollIntoView(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});nt(()=>{c&&(n&&o.floating?D.current&&u!=null&&(ee.current=!0,C.current=u,F()):U.current&&(C.current=-1,B.current()))},[c,n,o.floating,u,F]),nt(()=>{if(c&&n&&o.floating)if(a==null){if(H.current=!1,Y.current!=null)return;if(U.current&&(C.current=-1,ce()),(!G.current||!U.current)&&D.current&&(V.current!=null||D.current===!0&&V.current==null)){let de=0;const ne=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(ne),de++):(C.current=V.current==null||dd(V.current,T,h)||p?Zu(s,ie.current):py(s,ie.current),V.current=null,F())};ne()}}else Zi(s,a)||(C.current=a,ce(),ee.current=!1)},[c,n,o.floating,a,Y,p,s,T,h,F,ce,ie]),nt(()=>{var de;if(!c||o.floating||!_||y||!U.current)return;const ne=_.nodesRef.current,J=(de=ne.find(me=>me.id===$))==null||(de=de.context)==null?void 0:de.elements.floating,j=qn(qt(o.floating)),X=ne.some(me=>me.context&&Bt(me.context.elements.floating,j));J&&!X&&L.current&&J.focus({preventScroll:!0})},[c,o.floating,_,$,y]),nt(()=>{if(!c||!_||!y||$)return;function de(ne){ae(ne.id),k&&(k.current=ne)}return _.events.on("virtualfocus",de),()=>{_.events.off("virtualfocus",de)}},[c,_,y,$,k]),nt(()=>{B.current=F,G.current=n,U.current=!!o.floating}),nt(()=>{n||(V.current=null,D.current=m)},[n,m]);const Q=a!=null,ue=P.useMemo(()=>{function de(J){if(!te.current)return;const j=s.current.indexOf(J);j!==-1&&C.current!==j&&(C.current=j,F())}return{onFocus(J){let{currentTarget:j}=J;H.current=!0,de(j)},onClick:J=>{let{currentTarget:j}=J;return j.focus({preventScroll:!0})},onMouseMove(J){let{currentTarget:j}=J;H.current=!0,ee.current=!1,v&&de(j)},onPointerLeave(J){let{pointerType:j}=J;if(!(!L.current||j==="touch")&&(H.current=!0,!!v&&(C.current=-1,F(),!y))){var X;(X=M.current)==null||X.focus({preventScroll:!0})}}}},[te,M,v,s,F,y]),re=P.useCallback(()=>{var de;return E??(_==null||(de=_.nodesRef.current.find(ne=>ne.id===$))==null||(de=de.context)==null||(de=de.dataRef)==null?void 0:de.current.orientation)},[$,_,E]),he=kt(de=>{if(L.current=!1,H.current=!0,de.which===229||!te.current&&de.currentTarget===M.current)return;if(p&&lv(de.key,T,h,I)){Ga(de.key,re())||Ut(de),r(!1,de.nativeEvent,"list-navigation"),Pt(o.domReference)&&(y?_?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const ne=C.current,J=Zu(s,x),j=py(s,x);if(z||(de.key==="Home"&&(Ut(de),C.current=J,F()),de.key==="End"&&(Ut(de),C.current=j,F())),I>1){const X=A||Array.from({length:s.current.length},()=>({width:1,height:1})),me=xA(X,I,O),ve=me.findIndex(Ne=>Ne!=null&&!Na(s,Ne,x)),ke=me.reduce((Ne,ct,Nt)=>ct!=null&&!Na(s,ct,x)?Nt:Ne,-1),De=me[bA({current:me.map(Ne=>Ne!=null?s.current[Ne]:null)},{event:de,orientation:T,loop:f,rtl:h,cols:I,disabledIndices:SA([...(typeof x!="function"?x:null)||s.current.map((Ne,ct)=>Na(s,ct,x)?ct:void 0),void 0],me),minIndex:ve,maxIndex:ke,prevIndex:wA(C.current>j?J:C.current,X,me,I,de.key===ja?"bl":de.key===(h?Ji:es)?"tr":"tl"),stopEvent:!0})];if(De!=null&&(C.current=De,F()),T==="both")return}if(Ga(de.key,T)){if(Ut(de),n&&!y&&qn(de.currentTarget.ownerDocument)===de.currentTarget){C.current=dd(de.key,T,h)?J:j,F();return}dd(de.key,T,h)?f?C.current=ne>=j?d&&ne!==s.current.length?-1:J:Zt(s,{startingIndex:ne,disabledIndices:x}):C.current=Math.min(j,Zt(s,{startingIndex:ne,disabledIndices:x})):f?C.current=ne<=J?d&&ne!==-1?s.current.length:j:Zt(s,{startingIndex:ne,decrement:!0,disabledIndices:x}):C.current=Math.max(J,Zt(s,{startingIndex:ne,decrement:!0,disabledIndices:x})),Zi(s,C.current)&&(C.current=-1),F()}}),oe=P.useMemo(()=>y&&n&&Q&&{"aria-activedescendant":R||Z},[y,n,Q,R,Z]),le=P.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:oe,onKeyDown:he,onPointerMove(){L.current=!0}}),[oe,he,T,z]),be=P.useMemo(()=>{function de(J){m==="auto"&&dy(J.nativeEvent)&&(D.current=!0)}function ne(J){D.current=m,m==="auto"&&fy(J.nativeEvent)&&(D.current=!0)}return{...oe,onKeyDown(J){L.current=!1;const j=J.key.startsWith("Arrow"),X=["Home","End"].includes(J.key),me=j||X,ve=av(J.key,T,h),ke=lv(J.key,T,h,I),De=av(J.key,re(),h),Ne=Ga(J.key,T),ct=(p?De:Ne)||J.key==="Enter"||J.key.trim()==="";if(y&&n){const W=_?.nodesRef.current.find(Oe=>Oe.parentId==null),K=_&&W?pA(_.nodesRef.current,W.id):null;if(me&&K&&k){const Oe=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ve||ke){var Nt,Qt;const Ue=((Nt=K.context)==null?void 0:Nt.elements.domReference)===J.currentTarget,Ye=ke&&!Ue?(Qt=K.context)==null?void 0:Qt.elements.domReference:ve?s.current.find($e=>$e?.id===Z):null;Ye&&(Ut(J),Ye.dispatchEvent(Oe),ae(void 0))}if((Ne||X)&&K.context&&K.context.open&&K.parentId&&J.currentTarget!==K.context.elements.domReference){var Re;Ut(J),(Re=K.context.elements.domReference)==null||Re.dispatchEvent(Oe);return}}return he(J)}if(!(!n&&!b&&j)){if(ct){const W=Ga(J.key,re());V.current=p&&W?null:J.key}if(p){De&&(Ut(J),n?(C.current=Zu(s,ie.current),F()):r(!0,J.nativeEvent,"list-navigation"));return}Ne&&(u!=null&&(C.current=u),Ut(J),!n&&b?r(!0,J.nativeEvent,"list-navigation"):he(J),n&&F())}},onFocus(){n&&!y&&(C.current=-1,F())},onPointerDown:ne,onPointerEnter:ne,onMouseDown:de,onClick:de}},[Z,oe,I,he,ie,m,s,p,F,r,n,b,T,re,h,u,_,y,k]);return P.useMemo(()=>c?{reference:be,floating:le,item:ue}:{},[c,be,le,ue])}const VP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=ts(),u=((n=i.domReference)==null?void 0:n.id)||c,d=P.useMemo(()=>{var b;return((b=Ma(i.floating))==null?void 0:b.id)||s},[i.floating,s]),f=(r=VP.get(l))!=null?r:l,h=Pr()!=null,y=P.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&h&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,h,o,u,l]),m=P.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),v=P.useCallback(b=>{let{active:x,selected:T}=b;const E={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return P.useMemo(()=>a?{reference:y,floating:m,item:v}:{},[a,y,m,v])}const cv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Uo(e,t){return typeof e=="function"?e(t):e}function $P(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function zP(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=P.useState("unmounted"),c=$P(n,s);return!c&&a==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{cr.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function uv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=P.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[p,h]=P.useState(()=>({...Uo(i,c),...Uo(n,c)})),{isMounted:y,status:m}=zP(e,{duration:s}),v=Ht(n),b=Ht(r),x=Ht(o),T=Ht(i);return nt(()=>{const E=Uo(v.current,c),I=Uo(x.current,c),w=Uo(T.current,c),k=Uo(b.current,c)||Object.keys(E).reduce((A,O)=>(A[O]="",A),{});if(m==="initial"&&h(A=>({transitionProperty:A.transitionProperty,...w,...E})),m==="open"&&h({transitionProperty:Object.keys(k).map(cv).join(","),transitionDuration:d+"ms",...w,...k}),m==="close"){const A=I||E;h({transitionProperty:Object.keys(A).map(cv).join(","),transitionDuration:f+"ms",...w,...A})}},[f,x,v,b,T,d,m,c]),{isMounted:y,styles:p}}function jP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,h=P.useRef(-1),y=P.useRef(""),m=P.useRef((n=p??s)!=null?n:-1),v=P.useRef(null),b=kt(a),x=kt(l),T=Ht(u),E=Ht(f);nt(()=>{r&&(Gt(h),v.current=null,y.current="")},[r]),nt(()=>{if(r&&y.current===""){var O;m.current=(O=p??s)!=null?O:-1}},[r,p,s]);const I=kt(O=>{O?o.current.typing||(o.current.typing=O,x(O)):o.current.typing&&(o.current.typing=O,x(O))}),w=kt(O=>{function N(z,D,C){const V=T.current?T.current(D,C):D.find(L=>L?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return V?z.indexOf(V):-1}const M=i.current;if(y.current.length>0&&y.current[0]!==" "&&(N(M,M,y.current)===-1?I(!1):O.key===" "&&Ut(O)),M==null||E.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Ut(O),I(!0)),M.every(z=>{var D,C;return z?((D=z[0])==null?void 0:D.toLocaleLowerCase())!==((C=z[1])==null?void 0:C.toLocaleLowerCase()):!0})&&y.current===O.key&&(y.current="",m.current=v.current),y.current+=O.key,Gt(h),h.current=window.setTimeout(()=>{y.current="",m.current=v.current,I(!1)},d);const _=m.current,F=N(M,[...M.slice((_||0)+1),...M.slice(0,(_||0)+1)],y.current);F!==-1?(b(F),v.current=F):O.key!==" "&&(y.current="",I(!1))}),k=P.useMemo(()=>({onKeyDown:w}),[w]),A=P.useMemo(()=>({onKeyDown:w,onKeyUp(O){O.key===" "&&I(!1)}}),[w,I]);return P.useMemo(()=>c?{reference:k,floating:A}:{},[c,k,A])}function dv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...dv(e,o.id,n)])}function fv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function RP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function pv(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,s=null,a=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),h=p-l;if(s===null||a===null||h===0)return s=d,a=f,l=p,null;const y=d-s,m=f-a,b=Math.sqrt(y*y+m*m)/h;return s=d,a=f,l=p,b}const u=d=>{let{x:f,y:p,placement:h,elements:y,onClose:m,nodeId:v,tree:b}=d;return function(T){function E(){Gt(o),m()}if(Gt(o),!y.domReference||!y.floating||h==null||f==null||p==null)return;const{clientX:I,clientY:w}=T,k=[I,w],A=yP(T),O=T.type==="mouseleave",N=od(y.floating,A),M=od(y.domReference,A),$=y.domReference.getBoundingClientRect(),_=y.floating.getBoundingClientRect(),F=h.split("-")[0],z=f>_.right-_.width/2,D=p>_.bottom-_.height/2,C=RP(k,$),V=_.width>$.width,L=_.height>$.height,B=(V?$:_).left,U=(V?$:_).right,G=(L?$:_).top,H=(L?$:_).bottom;if(N&&(i=!0,!O))return;if(M&&(i=!1),M&&!O){i=!0;return}if(O&&tt(T.relatedTarget)&&od(y.floating,T.relatedTarget)||b&&dv(b.nodesRef.current,v).length)return;if(F==="top"&&p>=$.bottom-1||F==="bottom"&&p<=$.top+1||F==="left"&&f>=$.right-1||F==="right"&&f<=$.left+1)return E();let ee=[];switch(F){case"top":ee=[[B,$.top+1],[B,_.bottom-1],[U,_.bottom-1],[U,$.top+1]];break;case"bottom":ee=[[B,_.top+1],[B,$.bottom-1],[U,$.bottom-1],[U,_.top+1]];break;case"left":ee=[[_.right-1,H],[_.right-1,G],[$.left+1,G],[$.left+1,H]];break;case"right":ee=[[$.right-1,H],[$.right-1,G],[_.left+1,G],[_.left+1,H]];break}function ie(te){let[q,Y]=te;switch(F){case"top":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y+t+1],pe=[V?q-t/2:z?q+t*4:q-t*4,Y+t+1],R=[[_.left,z||V?_.bottom-t:_.top],[_.right,z?V?_.bottom-t:_.top:_.bottom-t]];return[Z,pe,...R]}case"bottom":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y-t],pe=[V?q-t/2:z?q+t*4:q-t*4,Y-t],R=[[_.left,z||V?_.top+t:_.bottom],[_.right,z?V?_.top+t:_.bottom:_.top+t]];return[Z,pe,...R]}case"left":{const Z=[q+t+1,L?Y+t/2:D?Y+t*4:Y-t*4],pe=[q+t+1,L?Y-t/2:D?Y+t*4:Y-t*4];return[...[[D||L?_.right-t:_.left,_.top],[D?L?_.right-t:_.left:_.right-t,_.bottom]],Z,pe]}case"right":{const Z=[q-t,L?Y+t/2:D?Y+t*4:Y-t*4],pe=[q-t,L?Y-t/2:D?Y+t*4:Y-t*4],R=[[D||L?_.left+t:_.right,_.top],[D?L?_.left+t:_.right:_.left+t,_.bottom]];return[Z,pe,...R]}}}if(!fv([I,w],ee)){if(i&&!C)return E();if(!O&&r){const te=c(T.clientX,T.clientY);if(te!==null&&te<.1)return E()}fv([I,w],ie([f,p]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const hv=200,BP=500,Go=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},mv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),gv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},fd=(e,t)=>{const n=mv(t,gv.basic,e)||mv(t,gv.extend,e);return n===void 0||n===e?void 0:n},Dr=()=>typeof window>"u",pd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),yv=(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},HP=e=>!e,Yo=()=>{},vv=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},hd=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:s=!0,hover:a=!0,enabled:l=!0,popover:c=!0,onChange:u=Yo,followCursor:d=!1,...f},p){const[h,y]=S.useState(n??!1),m=S.useRef(null),v=t||"span",b=_=>{y(_),u?.(_)},{refs:x,floatingStyles:T,context:E}=Gn({placement:i,open:h,whileElementsMounted:io,onOpenChange:n?void 0:b,middleware:[$a(),Ho(5),My(),ed({padding:5,element:m}),za({fallbackAxisSideDirection:"start"})]}),I=Mr(E,{enabled:l}),w=gr(E,{role:"tooltip",enabled:l}),k=FP(E,{enabled:l?s:!1}),A=qo(E,{enabled:l?c:!1}),O=_P(E,{enabled:!!l&&!!d}),N=Wy(E,{move:!0,delay:{open:hv},enabled:l?a:!1,handleClose:c?pv():null}),{getReferenceProps:M,getFloatingProps:$}=Yn([w,I,O,s?k:void 0,a?N:void 0,c?A:void 0]);return S.useEffect(()=>y(n===void 0?!1:n),[n]),g.jsxs(S.Fragment,{children:[g.jsx(v,{...M(f),ref:dr(x.setReference,p),children:r}),h&&g.jsx(mr,{children:g.jsxs(cn,{...$(),ref:x.setFloating,style:T,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[g.jsx(td,{ref:m,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),bv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>g.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:g.jsxs("span",{className:"flex gap-1 items-center transition-colors group-disabled:text-disabled group-error:text-danger group-hover:text-primary group-focus-within:text-primary",children:[s,e||o?g.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?g.jsx(hd,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:g.jsx("span",{className:"cursor-help",children:g.jsx(Er,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:g.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full break-words max-w-48 whitespace-break-spaces",children:o})}):null,e?g.jsxs("span",{className:"flex items-center h-3 min-w-6",children:[g.jsx(Pu,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),g.jsx(uI,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),rs=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:h,componentName:y,placeholder:m,hideLeft:v=!1,required:b,disabled:x,reportStatus:T,hiddenLabel:E},I)=>{const w=Fu(),k=T!==void 0?T:w.input.iconFeedback,A=d??p,O=At(),N=e??O.inputOptionalLabel;return g.jsxs("fieldset",{ref:I,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":y,"data-interactive":!!i,className:Pe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[g.jsxs("label",{form:u,htmlFor:A,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full text-sm transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:g.jsx(bv,{info:a,hideLeft:v,reportStatus:k,title:h,placeholder:m,children:N||n?g.jsxs(S.Fragment,{children:[b?null:g.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:N}),n?g.jsx(S.Fragment,{children:n}):null]}):null}),g.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?g.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,s?g.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",children:s}):null]})]}),g.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}),g.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})]})}),xv=(e,t,n,r)=>S.forwardRef(({info:i,left:s,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:h="text",labelClassName:y,feedback:m=null,hideLeft:v=!1,loading:b,hiddenLabel:x,...T},E)=>{const I=e,w=T.id??T.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const A=k.current,O=Hi(k.current),N=r?.(A),M=$=>{const _=$;if(_.key==="Enter"&&A.enterKeyHint==="next"){const F=A.getAttribute("data-next");if(F){const z=document.getElementById(F);if(z)return z.focus(),void _.preventDefault()}}};return A.addEventListener("keydown",M),()=>{N?.(),O(),A.removeEventListener("keydown",M)}},[]),g.jsx(rs,{...n,info:i,left:s,error:l,right:c,form:T.form,loading:b,name:T.name,feedback:m,hideLeft:v,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:x,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:p,labelClassName:y,placeholder:T.placeholder,container:Pe(u,n.container),children:g.jsx(I,{...n,...T,id:w,name:w,type:h,"data-next":a,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:dr(E,k),className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",T.className)})})}),Ko=xv(Fg,"input",{type:"text"}),WP=_o("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-1 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-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),yr=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return g.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:Pe(WP({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),co=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:p,left:h,error:y,...m},v)=>{const b=At(),x=S.useRef(null),T=m.id??m.name;S.useImperativeHandle(v,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const I=new AbortController,w=x.current,k=Hi(x.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:I.signal}),()=>{k(),I.abort()}},[]);const E=()=>x.current?.focus();return g.jsx(rs,{info:n,left:h,error:y,form:m.form,loading:c,name:m.name,feedback:o,hideLeft:f,required:e,title:m.title,container:d,componentName:"select",rightLabel:a,hiddenLabel:l,interactive:s,id:m.name||m.id,optionalText:u,labelClassName:i,placeholder:m.placeholder,right:g.jsxs("label",{htmlFor:T,children:[p,g.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:g.jsxs("select",{...m,id:T,name:T,required:e,ref:dr(v,x),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:Pe("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",m.className),children:[g.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(I=>S.createElement("option",{...I,value:I.value,children:I.label??I.value,key:`${T}-select-option-${I.value}`}))]})})});function sn(e){return e?.ownerDocument||document}function qP({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=P.useRef(e!==void 0),[i,s]=P.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){P.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
5
5
|
`))},[r,n,e]);const{current:c}=P.useRef(t);P.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
6
6
|
`))},[JSON.stringify(t)])}const l=P.useCallback(c=>{o||s(c)},[]);return[a,l]}const wv={};function Kn(e,t){const n=P.useRef(wv);return n.current===wv&&(n.current=e(t)),n}const md=P[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],UP=md&&md!==P.useLayoutEffect?md:e=>e();function ut(e){const t=Kn(GP).current;return t.next=e,UP(t.effect),t.trampoline}function GP(){const e={next:void 0,callback:YP,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function YP(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const pt=typeof document<"u"?P.useLayoutEffect:()=>{};function gd(e){const t=Kn(KP,e).current;return t.next=e,pt(t.effect),t}function KP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let yd;process.env.NODE_ENV!=="production"&&(yd=new Set);function ZP(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");yd.has(t)||(yd.add(t),console.warn(`Base UI: ${t}`))}}function fn(){}const Pn=Object.freeze({}),XP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},QP="none",Sv="track-press",JP="input-change",eO="focus-out",tO="keyboard",nO="drag";function Zo(e,t,n,r){let o=!1,i=!1;const s=r??Pn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function Tv(e,t,n){const r=Pn;return{reason:e,event:t??new Event("base-ui"),...r}}function rO(e,t){const n=P.useRef(e),r=ut(t);pt(()=>{n.current!==e&&r(n.current)},[e,r]),pt(()=>{n.current=e},[e])}const vd={...P};let Ev=0;function oO(e,t="mui"){const[n,r]=P.useState(e),o=e||n;return P.useEffect(()=>{n==null&&(Ev+=1,r(`${t}-${Ev}`))},[n,t]),o}const kv=vd.useId;function Ka(e,t){if(kv!==void 0){const n=kv();return e??(t?`${t}-${n}`:n)}return oO(e,t)}function Za(e){return Ka(e,"base-ui")}function On(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function bd(e,t,n,r){const o=Kn(Cv).current;return sO(o,e,t,n,r)&&Iv(o,[e,t,n,r]),o.callback}function iO(e){const t=Kn(Cv).current;return aO(t,e)&&Iv(t,e),t.callback}function Cv(){return{callback:null,cleanup:null,refs:[]}}function sO(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function aO(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Iv(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const lO=parseInt(P.version,10);function xd(e){return lO>=e}function Av(e){if(!P.isValidElement(e))return null;const t=e,n=t.props;return(xd(19)?n?.ref:t.ref)??null}function wd(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function cO(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function uO(e,t){return typeof e=="function"?e(t):e}function dO(e,t){return typeof e=="function"?e(t):e}const os={};function Sd(e,t,n,r,o){let i={...Td(e,os)};return t&&(i=Xa(i,t)),n&&(i=Xa(i,n)),r&&(i=Xa(i,r)),i}function fO(e){if(e.length===0)return os;if(e.length===1)return Td(e[0],os);let t={...Td(e[0],os)};for(let n=1;n<e.length;n+=1)t=Xa(t,e[n]);return t}function Xa(e,t){return Pv(t)?t(e):pO(e,t)}function pO(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=wd(e.style,r);break}case"className":{e[n]=Ov(e.className,r);break}default:hO(n,r)?e[n]=mO(e[n],r):e[n]=r}}return e}function hO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Pv(e){return typeof e=="function"}function Td(e,t){return Pv(e)?e(t):e??os}function mO(e,t){return t?e?n=>{if(gO(n)){const o=n;Ed(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Ed(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ov(e,t){return t?e?t+" "+e:t:e}function gO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function an(e,t,n={}){const r=t.render,o=yO(t,n);if(n.enabled===!1)return null;const i=n.state??Pn;return bO(e,r,o,i)}function yO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Pn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?uO(n,i):void 0,d=c?dO(r,i):void 0,f=c?cO(i,l):Pn,p=c?wd(f,Array.isArray(a)?fO(a):a)??Pn:Pn;return typeof document<"u"&&(c?Array.isArray(s)?p.ref=iO([p.ref,Av(o),...s]):p.ref=bd(p.ref,Av(o),s):bd(null,null)),c?(u!==void 0&&(p.className=Ov(p.className,u)),d!==void 0&&(p.style=wd(p.style,d)),p):Pn}const vO=Symbol.for("react.lazy");function bO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Sd(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===vO&&(i=P.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!P.isValidElement(i))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
7
7
|
`));return P.cloneElement(i,o)}if(e&&typeof e=="string")return xO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":On(8))}function xO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):P.createElement(e,t)}function _n(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function _v(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const is=typeof navigator<"u",kd=kO(),wO=IO(),SO=CO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),kd.platform==="MacIntel"&&kd.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(kd.platform);const TO=is&&/apple/i.test(navigator.vendor);is&&wO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const EO=SO.includes("jsdom/");function kO(){if(!is)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function CO(){if(!is)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function IO(){if(!is)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function uo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Nr(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Cd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Id(e){if(!e||EO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}const Mv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Dv(e,t){const n=jo(e,Mv()),r=n.length;if(r===0)return;const o=uo(sn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function AO(e){return Dv(sn(e).body,1)||e}function PO(e){return Dv(sn(e).body,-1)||e}function Ad(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Nr(n,r)}function OO(e){jo(e,Mv()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Nv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Pd=P.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(Pd.displayName="CompositeListContext");function _O(){return P.useContext(Pd)}function MO(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=ut(o),s=P.useRef(0),a=Kn(NO).current,l=Kn(DO).current,[c,u]=P.useState(0),d=P.useRef(c),f=ut((v,b)=>{l.set(v,b??null),d.current+=1,u(d.current)}),p=ut(v=>{l.delete(v),d.current+=1,u(d.current)}),h=P.useMemo(()=>{const v=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(FO).forEach((x,T)=>{const E=l.get(x)??{};v.set(x,{...E,index:T})}),v},[l,c]);pt(()=>{if(typeof MutationObserver!="function"||h.size===0)return;const v=new MutationObserver(b=>{const x=new Set,T=E=>x.has(E)?x.delete(E):x.add(E);b.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),x.size===0&&(d.current+=1,u(d.current))});return h.forEach((b,x)=>{x.parentElement&&v.observe(x.parentElement,{childList:!0})}),()=>{v.disconnect()}},[h]),pt(()=>{d.current===c&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),s.current=h.size),i(h)},[i,h,n,r,c]),pt(()=>()=>{n.current=[]},[n]),pt(()=>()=>{r&&(r.current=[])},[r]);const y=ut(v=>(a.add(v),()=>{a.delete(v)}));pt(()=>{a.forEach(v=>v(h))},[a,h]);const m=P.useMemo(()=>({register:f,unregister:p,subscribeMapChange:y,elementsRef:n,labelsRef:r,nextIndexRef:s}),[f,p,y,n,r,s]);return g.jsx(Pd.Provider,{value:m,children:t})}function DO(){return new Map}function NO(){return new Set}function FO(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 LO(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Fv=P.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:fn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Fv.displayName="FormContext");function Lv(){return P.useContext(Fv)}let Vv=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const VO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},$O={valid(e){return e===null?null:e?{[Vv.valid]:""}:{[Vv.invalid]:""}}},$v=P.createContext({invalid:void 0,name:void 0,validityData:{state:VO,errors:[],error:"",value:"",initialValue:null},setValidityData:fn,disabled:void 0,touched:!1,setTouched:fn,dirty:!1,setDirty:fn,filled:!1,setFilled:fn,focused:!1,setFocused:fn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Pn)=>e,getInputValidationProps:(e=Pn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&($v.displayName="FieldRootContext");function Od(e=!0){const t=P.useContext($v);if(t.setValidityData===fn&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":On(28));return t}function zO(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=Lv(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=Od(),f=ut(e.getValue);pt(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(h=>({...h,initialValue:p}))},[t,d,n,u.initialValue,f]),pt(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:LO(u,l),validate(p=!0){let h=n;h===void 0&&(h=f()),c.current=!0,p?cr.flushSync(()=>s(h)):s(h)}})},[s,i,t,a,f,r,l,c,o,u,n]),pt(()=>{const p=a.current.fields;return()=>{r&&p.delete(r)}},[a,r])}const zv=P.createContext({controlId:void 0,registerControlId:fn,labelId:void 0,setLabelId:fn,messageIds:[],setMessageIds:fn,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(zv.displayName="LabelableContext");function jv(){return P.useContext(zv)}function Rv(e,t){return e-t}function jO(e,t,n){const r=e.slice();return r[t]=n,r.sort(Rv)}function Bv(e,t,n,r,o,i){let s=e;return s=_n(s,n,r),o&&(s=jO(i,t,_n(s,i[t-1]||-1/0,i[t+1]||1/0))),s}function Hv(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,s,a)=>(s===a.length-1||o.push(Math.abs(i-a[s+1])),o),[]);return Math.min(...r)>=t*n}const ss={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...$O},_d=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(_d.displayName="SliderRootContext");function Qa(){const e=P.useContext(_d);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":On(62));return e}function RO(e){return"key"in e?tO:JP}function BO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?_v(e,t):!1}const Wv=P.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:s=!1,id:a,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:h=0,name:y,onValueChange:m,onValueCommitted:v,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:I,...w}=t,k=Za(a),A=ut(m),O=ut(v),{clearErrors:N}=Lv(),{state:M,disabled:$,name:_,setTouched:F,setDirty:z,validityData:D,shouldValidateOnChange:C,validation:V}=Od(),{labelId:L}=jv(),B=r??L,U=$||s,G=_??y,[H,ee]=qP({controlled:I,default:i??p,name:"Slider"}),ie=P.useRef(null),te=P.useRef(null),q=P.useRef([]),Y=P.useRef(null),Z=P.useRef(null),pe=P.useRef(-1),R=P.useRef(null),ae=P.useRef(null),ce=P.useRef("none"),Q=gd(l),[ue,re]=P.useState(-1),[he,oe]=P.useState(-1),[le,be]=P.useState(!1),[de,ne]=P.useState(()=>new Map),[J,j]=P.useState([void 0,void 0]),X=ut(Re=>{re(Re),Re!==-1&&oe(Re)});zO({id:k,commit:V.commit,value:H,controlRef:te,name:G,getValue:()=>H}),rO(H,()=>{N(G),C()?V.commit(H):V.commit(H,!0);const Re=D.initialValue;let W;Array.isArray(H)&&Array.isArray(Re)?W=!_v(H,Re):W=H!==Re,z(W)});const me=ut(Re=>{Re&&(te.current=Re)}),ve=Array.isArray(H),ke=P.useMemo(()=>ve?H.slice().sort(Rv):[_n(H,p,f)],[f,p,ve,H]),De=ut((Re,W)=>{if(Number.isNaN(Re)||BO(Re,H))return;const K=W??Zo(QP,void 0,void 0,{activeThumbIndex:-1});ce.current=K.reason;const Oe=K.event,Ue=Oe.constructor??Event,Ye=new Ue(Oe.type,Oe);Object.defineProperty(Ye,"target",{writable:!0,value:{value:Re,name:G}}),K.event=Ye,ae.current=Re,A(Re,K),!K.isCanceled&&ee(Re)}),Ne=ut((Re,W,K)=>{const Oe=Bv(Re,W,p,f,ve,ke);if(Hv(Oe,x,h)){const Ue=RO(K);De(Oe,Zo(Ue,K.nativeEvent,void 0,{activeThumbIndex:W})),F(!0);const Ye=ae.current??Oe;O(Ye,Tv(Ue,K.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&ZP("Slider `max` must be greater than `min`."),pt(()=>{const Re=uo(sn(ie.current));U&&Re&&ie.current?.contains(Re)&&Re.blur()},[U]),U&&ue!==-1&&X(-1);const ct=P.useMemo(()=>({...M,activeThumbIndex:ue,disabled:U,dragging:le,orientation:b,max:f,min:p,minStepsBetweenValues:h,step:x,values:ke}),[M,ue,U,le,f,p,h,b,x,ke]),Nt=P.useMemo(()=>({active:ue,controlRef:te,disabled:U,dragging:le,validation:V,formatOptionsRef:Q,handleInputChange:Ne,indicatorPosition:J,inset:E!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:he,lastChangedValueRef:ae,lastChangeReasonRef:ce,locale:u,max:f,min:p,minStepsBetweenValues:h,name:G,onValueCommitted:O,orientation:b,pressedInputRef:Y,pressedThumbCenterOffsetRef:Z,pressedThumbIndexRef:pe,pressedValuesRef:R,registerFieldControlRef:me,renderBeforeHydration:E==="edge",setActive:X,setDragging:be,setIndicatorPosition:j,setValue:De,state:ct,step:x,thumbCollisionBehavior:T,thumbMap:de,thumbRefs:q,values:ke}),[ue,te,B,U,le,V,Q,Ne,J,c,he,ae,ce,u,f,p,h,G,O,b,Y,Z,pe,R,me,X,be,j,De,ct,x,T,E,de,q,ke]),Qt=an("div",t,{state:ct,ref:[n,ie],props:[{"aria-labelledby":B,id:k,role:"group"},V.getValidationProps,w],stateAttributesMapping:ss});return g.jsx(_d.Provider,{value:Nt,children:g.jsx(MO,{elementsRef:q,onMapChange:ne,children:Qt})})});process.env.NODE_ENV!=="production"&&(Wv.displayName="SliderRoot");const qv=new Map;function HO(e,t){const n=JSON.stringify({locale:e,options:t}),r=qv.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return qv.set(n,o),o}function Xo(e,t,n){return e==null?"":HO(t,n).format(e)}function WO(e,t,n){return e==null?"":n?Xo(e,t,n):Xo(e/100,t,{style:"percent"})}const qO=[];function as(e){P.useEffect(e,qO)}const Ja=null;let Uv=globalThis.requestAnimationFrame;class UO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&Uv!==requestAnimationFrame&&(Uv=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const el=new UO;class Md{static create(){return new Md}static request(t){return el.request(t)}static cancel(t){return el.cancel(t)}currentId=Ja;request(t){this.cancel(),this.currentId=el.request(()=>{this.currentId=Ja,t()})}cancel=()=>{this.currentId!==Ja&&(el.cancel(this.currentId),this.currentId=Ja)};disposeEffect=()=>this.cancel}function Gv(){const e=Kn(Md.create).current;return as(e.disposeEffect),e}const Yv=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Yv.displayName="DirectionContext");function Kv(){return P.useContext(Yv)?.direction??"ltr"}function Zv(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function GO(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Xv(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(GO(t)))}function Qv({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:s,initialValues:a}){if(e.length===0)return[];const l=e.slice(),c=i*s,u=l.length-1,d=a??e,f=r+t*c,p=o-(u-t)*c;l[t]=_n(n,f,p);for(let h=t+1;h<=u;h+=1){const y=l[h-1]+c,m=o-(u-h)*c,v=d[h]??l[h];let b=Math.max(l[h],y);v<b&&(b=Math.max(v,y)),l[h]=_n(b,y,m)}for(let h=t-1;h>=0;h-=1){const y=l[h+1]-c,m=r+h*c,v=d[h]??l[h];let b=Math.min(l[h],y);v>b&&(b=Math.min(v,y)),l[h]=_n(b,m,y)}for(let h=0;h<=u;h+=1)l[h]=Number(l[h].toFixed(12));return l}function YO({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const h=u[o],y=1e-7,m=u.slice(),v=m[o-1],b=m[o+1],x=v!=null?v+p:s,T=b!=null?b-p:a,E=_n(i,x,T),I=Number(E.toFixed(12));m[o]=I;const w=i>h,k=i<h,A=w&&b!=null&&i>=b-y,O=k&&v!=null&&i<=v+y;if(!A&&!O)return{value:m,thumbIndex:o,didSwap:!1};const N=A?o+1:o-1,M=m.map((z,D)=>{if(D===o)return I;const C=d[D];return C??u[D]});let $=i;A?$=Math.max(i,m[N]):$=Math.min(i,m[N]);const _=Qv({values:m,index:N,nextValue:$,min:s,max:a,step:l,minStepsBetweenValues:c,initialValues:M}),F=A?N-1:N+1;if(F>=0&&F<_.length){const z=_[F-1],D=_[F+1];let C=z!=null?z+p:s;C=Math.max(C,s+F*p);let V=D!=null?D-p:a;V=Math.min(V,a-(_.length-1-F)*p);const L=_n(I,C,V);_[F]=Number(L.toFixed(12))}return{value:_,thumbIndex:N,didSwap:!0}}case"push":return{value:Qv({values:u,index:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const h=u.slice(),y=h[o-1],m=h[o+1],v=y!=null?y+p:s,b=m!=null?m-p:a,x=_n(i,v,b);return h[o]=Number(x.toFixed(12)),{value:h,thumbIndex:o,didSwap:!1}}}}const KO=2;function ZO(e,t){if(!e)return{start:0,end:0};function n(i){const s=i!=null?parseFloat(i):0;return Number.isNaN(s)?0:s}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function tl(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const Jv=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:s,dragging:a,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:h,onValueCommitted:y,orientation:m,pressedInputRef:v,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:T,registerFieldControlRef:E,renderBeforeHydration:I,setActive:w,setDragging:k,setValue:A,state:O,step:N,thumbCollisionBehavior:M,thumbRefs:$,values:_}=Qa(),F=Kv(),z=_.length>1,D=m==="vertical",C=P.useRef(null),V=P.useRef(null),L=ut(Q=>{Q&&V.current==null&&V.current==null&&(V.current=getComputedStyle(Q))}),B=P.useRef(null),U=P.useRef(0),G=P.useRef(0),H=gd(_),ee=ut(Q=>{x.current!==Q&&(x.current=Q);const ue=$.current[Q];if(!ue){b.current=null,v.current=null;return}v.current=ue.querySelector('input[type="range"]')}),ie=ut(Q=>{const ue=C.current;if(!ue)return null;const{width:re,height:he,bottom:oe,left:le,right:be}=ue.getBoundingClientRect(),de=ZO(V.current,D),ne=G.current,J=(D?he:re)-de.start-de.end-ne*2,j=b.current??0,X=Q.x-j,me=Q.y-j,ve=D?oe-me-de.end:(F==="rtl"?be-X:X-le)-de.start,ke=_n((ve-ne)/J,0,1);let De=(f-p)*ke+p;if(De=Xv(De,N,p),De=_n(De,p,f),!z)return{value:De,thumbIndex:0,didSwap:!1};const Ne=x.current;if(Ne<0)return null;const ct=YO({behavior:M,values:_,currentValues:H.current??_,initialValues:T.current,pressedIndex:Ne,nextValue:De,min:p,max:f,step:N,minStepsBetweenValues:h});return M==="swap"&&ct.didSwap?ee(ct.thumbIndex):x.current=ct.thumbIndex,ct}),te=ut(Q=>{T.current=z?_.slice():null,H.current=_;const ue=x.current;let re=ue;if(ue>-1&&ue<_.length){if(_[ue]===f){let he=ue;for(;he>0&&_[he-1]===f;)he-=1;re=he}}else{const he=D?"y":"x";let oe;re=-1;for(let le=0;le<$.current.length;le+=1){const be=$.current[le];if(tt(be)){const de=Zv(be),ne=Math.abs(Q[he]-de[he]);(oe===void 0||ne<=oe)&&(re=le,oe=ne)}}}if(re>-1&&re!==ue&&ee(re),c){const he=$.current[re];if(tt(he)){const oe=he.getBoundingClientRect(),le=D?"height":"width";G.current=oe[le]/2}}}),q=ut(Q=>{$.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),Y=ut(Q=>{const ue=tl(Q,B);if(ue==null)return;if(U.current+=1,Q.type==="pointermove"&&Q.buttons===0){Z(Q);return}const re=ie(ue);re!=null&&Hv(re.value,N,h)&&(!a&&U.current>KO&&k(!0),A(re.value,Zo(nO,Q,void 0,{activeThumbIndex:re.thumbIndex})),H.current=Array.isArray(re.value)?re.value:[re.value],re.didSwap&&q(re.thumbIndex))});function Z(Q){w(-1),k(!1),v.current=null,b.current=null;const ue=tl(Q,B),re=ue!=null?ie(ue):null;if(re!=null){const he=d.current;l.commit(u.current??re.value),y(u.current??re.value,Tv(he,Q))}"pointerType"in Q&&C.current?.hasPointerCapture(Q.pointerId)&&C.current?.releasePointerCapture(Q.pointerId),x.current=-1,B.current=null,T.current=null,R()}const pe=ut(Q=>{if(s)return;const ue=Q.changedTouches[0];ue!=null&&(B.current=ue.identifier);const re=tl(Q,B);if(re!=null){te(re);const oe=ie(re);if(oe==null)return;q(oe.thumbIndex),A(oe.value,Zo(Sv,Q,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex)}U.current=0;const he=sn(C.current);he.addEventListener("touchmove",Y,{passive:!0}),he.addEventListener("touchend",Z,{passive:!0})}),R=ut(()=>{const Q=sn(C.current);Q.removeEventListener("pointermove",Y),Q.removeEventListener("pointerup",Z),Q.removeEventListener("touchmove",Y),Q.removeEventListener("touchend",Z),T.current=null}),ae=Gv();return P.useEffect(()=>{const Q=C.current;return Q?(Q.addEventListener("touchstart",pe,{passive:!0}),()=>{Q.removeEventListener("touchstart",pe),ae.cancel(),R()}):()=>R()},[R,pe,C,ae]),P.useEffect(()=>{s&&R()},[s,R]),an("div",t,{state:O,ref:[n,E,C,L],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const ue=C.current;if(!ue||s||Q.defaultPrevented||!tt(Q.target)||Q.button!==0)return;const re=tl(Q,B);if(re!=null){te(re);const oe=ie(re);if(oe==null)return;Nr($.current[oe.thumbIndex],uo(sn(ue)))?Q.preventDefault():ae.request(()=>{q(oe.thumbIndex)}),k(!0),b.current!=null||(A(oe.value,Zo(Sv,Q.nativeEvent,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex))}Q.nativeEvent.pointerId&&ue.setPointerCapture(Q.nativeEvent.pointerId),U.current=0;const he=sn(C.current);he.addEventListener("pointermove",Y,{passive:!0}),he.addEventListener("pointerup",Z,{once:!0})},tabIndex:-1},i],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(Jv.displayName="SliderControl");const eb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:s}=Qa();return an("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(eb.displayName="SliderTrack");const nl={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function rl(e,t,n){return(e-t)*100/(n-t)}const ol="ArrowUp",il="ArrowDown",sl="ArrowLeft",al="ArrowRight",ll="Home",cl="End",XO=new Set([sl,al]),QO=new Set([ol,il]),JO=new Set([...XO,...QO]);[...JO];const e_=new Set([ol,il,sl,al,ll,cl]);let t_=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function n_(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=_O(),f=P.useRef(-1),[p,h]=P.useState(i??(o===t_.GuessFromOrder?()=>{if(f.current===-1){const v=d.current;d.current+=1,f.current=v}return f.current}:-1)),y=P.useRef(null),m=P.useCallback(v=>{if(y.current=v,p!==-1&&v!==null&&(c.current[p]=v,u)){const b=t!==void 0;u.current[p]=b?t:r?.current?.textContent??v.textContent}},[p,c,u,t,r]);return pt(()=>{if(i!=null)return;const v=y.current;if(v)return s(v,n),()=>{a(v)}},[i,s,a,n]),pt(()=>{if(i==null)return l(v=>{const b=y.current?v.get(y.current)?.index:null;b!=null&&h(b)})},[i,l,h]),P.useMemo(()=>({ref:m,index:p}),[p,m])}const tb=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(tb.displayName="CSPContext");const r_={disableStyleElements:!1};function o_(){return P.useContext(tb)??r_}function i_(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=jv(),s=Za(t),a=n?o:void 0,l=Kn(()=>Symbol("labelable-control")),c=P.useRef(!1),u=P.useRef(t!=null),d=ut(()=>{!c.current||i===fn||(c.current=!1,i(l.current,void 0))});return pt(()=>{if(i===fn)return;let f;if(n){const p=r?.current;tt(p)&&p.closest("label")!=null?f=t??null:f=a??s}else if(t!=null)u.current=!0,f=t;else if(u.current)f=s;else{d();return}if(f===void 0){d();return}c.current=!0,i(l.current,f)},[t,r,a,i,n,s,l,d]),P.useEffect(()=>d,[d]),o??s}let s_=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const a_='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',nb="PageUp",rb="PageDown",l_=new Set([ol,il,sl,al,ll,cl,nb,rb]);function c_(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${Xo(e[t],r,n)} start range`:`${Xo(e[t],r,n)} end range`:n?Xo(e[t],r,n):void 0}function Qo(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const ob=P.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":s,"aria-label":a,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:h,onBlur:y,onFocus:m,onKeyDown:v,tabIndex:b,...x}=t,{nonce:T}=o_(),E=Za(f),{active:I,lastUsedThumbIndex:w,controlRef:k,disabled:A,validation:O,formatOptionsRef:N,handleInputChange:M,inset:$,labelId:_,largeStep:F,locale:z,max:D,min:C,minStepsBetweenValues:V,name:L,orientation:B,pressedInputRef:U,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:H,renderBeforeHydration:ee,setActive:ie,setIndicatorPosition:te,state:q,step:Y,values:Z}=Qa(),pe=Kv(),R=c||A,ae=Z.length>1,ce=B==="vertical",Q=pe==="rtl",{setTouched:ue,setFocused:re,validationMode:he}=Od(),oe=P.useRef(null),le=P.useRef(null),be=Za(),de=i_(),ne=ae?be:de,J=P.useMemo(()=>({inputId:ne}),[ne]),{ref:j,index:X}=n_({metadata:J}),me=ae?p??X:0,ve=me===Z.length-1,ke=Z[me],De=rl(ke,C,D),[Ne,ct]=P.useState(!1),[Nt,Qt]=P.useState();as(()=>ct(!0));const Re=w>=0&&w<Z.length?w:-1,W=ut(()=>{const ot=k.current,gt=oe.current;if(!ot||!gt)return;const it=gt.getBoundingClientRect(),xn=ot.getBoundingClientRect(),Qr=ce?"height":"width",Jr=xn[Qr]-it[Qr],$i=(it[Qr]/2+Jr*De/100)/xn[Qr]*100;Qt($i),me===0?te(zi=>[$i,zi[1]]):ve&&te(zi=>[zi[0],$i])});pt(()=>{$&&queueMicrotask(W)},[W,$]),pt(()=>{$&&W()},[W,$,De]);const K=P.useCallback(()=>{const ot=ce?"bottom":"insetInlineStart",gt=ce?"left":"top";let it;return ae?I===me?it=2:Re===me&&(it=1):I===me&&(it=1),$?{"--position":`${Nt}%`,visibility:ee&&!Ne||Nt===void 0?"hidden":void 0,position:"absolute",[ot]:"var(--position)",[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:Number.isFinite(De)?{position:"absolute",[ot]:`${De}%`,[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:nl},[I,me,$,Ne,Nt,ae,ee,Q,Re,De,ce]);let Oe;B==="vertical"&&(Oe=Q?"vertical-rl":"vertical-lr");const Ue=Sd({"aria-label":typeof u=="function"?u(me):a,"aria-labelledby":l??_,"aria-describedby":s,"aria-orientation":B,"aria-valuenow":ke,"aria-valuetext":typeof d=="function"?d(Xo(ke,z,N.current??void 0),ke,me):c_(Z,me,N.current??void 0,z),disabled:R,id:ne,max:D,min:C,name:L,onChange(ot){M(ot.target.valueAsNumber,me,ot)},onFocus(){ie(me),re(!0)},onBlur(){oe.current&&(ie(-1),ue(!0),re(!1),he==="onBlur"&&O.commit(Bv(ke,me,C,D,ae,Z)))},onKeyDown(ot){if(!l_.has(ot.key))return;e_.has(ot.key)&&ot.stopPropagation();let gt=null;const it=Xv(ke,Y,C);switch(ot.key){case ol:gt=Qo(it,ot.shiftKey?F:Y,1,C,D);break;case al:gt=Qo(it,ot.shiftKey?F:Y,Q?-1:1,C,D);break;case il:gt=Qo(it,ot.shiftKey?F:Y,-1,C,D);break;case sl:gt=Qo(it,ot.shiftKey?F:Y,Q?1:-1,C,D);break;case nb:gt=Qo(it,F,1,C,D);break;case rb:gt=Qo(it,F,-1,C,D);break;case cl:gt=D,ae&&(gt=Number.isFinite(Z[me+1])?Z[me+1]-Y*V:D);break;case ll:gt=C,ae&&(gt=Number.isFinite(Z[me-1])?Z[me-1]+Y*V:C);break}gt!==null&&(M(gt,me,ot),ot.preventDefault())},step:Y,style:{...nl,width:"100%",height:"100%",writingMode:Oe},tabIndex:b??void 0,type:"range",value:ke??""},O.getInputValidationProps),Ye=bd(le,O.inputRef,h);return an("div",t,{state:q,ref:[n,j,oe],props:[{[s_.index]:me,children:g.jsxs(P.Fragment,{children:[o,g.jsx("input",{ref:Ye,...Ue}),$&&!Ne&&ee&&ve&&g.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:a_},suppressHydrationWarning:!0})]}),id:E,onBlur:y,onFocus:m,onPointerDown(ot){if(H.current=me,oe.current!=null){const gt=B==="horizontal"?"x":"y",it=Zv(oe.current),xn=(B==="horizontal"?ot.clientX:ot.clientY)-it[gt];G.current=xn}le.current!=null&&U.current!==le.current&&(U.current=le.current)},style:K(),suppressHydrationWarning:ee||void 0,tabIndex:-1},x],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(ob.displayName="SliderThumb");function u_(e,t,n,r,o,i){const s=n===void 0||t&&r===void 0?"hidden":void 0,a=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":s,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[a]="var(--start-position)",u[l]="var(--relative-size)",u):(u[a]=0,u[l]="var(--start-position)",u)}function d_(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",a={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return a[o]=0,a[i]=`${n}%`,a;const l=r-n;return a[o]=`${n}%`,a[i]=`${l}%`,a}const ib=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:s,inset:a,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=Qa(),[h,y]=P.useState(!1);as(()=>y(!0));const m=u==="vertical",v=p.length>1,b=a?u_(m,v,s[0],s[1],d,h):d_(m,v,rl(p[0],c,l),rl(p[p.length-1],c,l));return an("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(ib.displayName="SliderIndicator");const ul=e=>{const t=S.useContext(to);if(e)return e;if(t)return t.locale||e},f_=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Be.number(i)&&n(i);const s=new MutationObserver(a=>{const l=a[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Be.number(c)?c:null)});return s.observe(o,{attributeFilter:["aria-valuenow"]}),()=>s.disconnect()},[]),g.jsx(hd,{title:"",ref:r,as:ob,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline active:cursor-grabbing",children:t})},p_=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,s=S.useRef(Go()),a=r||o||[],l=ul();return g.jsx(Wv,{...i,value:o,locale:l,defaultValue:r,children:g.jsxs(Jv,{className:Pe("relative flex h-5 w-full touch-none select-none items-center",n),children:[g.jsx(eb,{className:"relative h-2 rounded-full grow bg-background",children:g.jsx(ib,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(a)?a.map((c,u)=>g.jsx(f_,{tooltip:t??!1},`${s.current}-${u}`)):null]})})},Fr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},h_=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const s=S.useId(),[a,l]=S.useState(o.checked??!1),c=a,u=S.useRef(null),d=Fr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const p=y=>{d.current&&d.current(y)},h=u.current;return h.addEventListener("change",p),()=>h?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return g.jsxs("fieldset",{className:Pe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[g.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[g.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||s,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:p=>l(p.target.checked)}),g.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${s}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:g.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"})}),g.jsx("label",{htmlFor:o.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:g.jsx("span",{className:"font-medium text-foreground",children:e})})]}),g.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),ls=S.createContext({});function Zn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const sb=typeof window<"u",dl=sb?S.useLayoutEffect:S.useEffect,fl=S.createContext(null);function Dd(e,t){e.indexOf(t)===-1&&e.push(t)}function Jo(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function m_([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Xn=(e,t,n)=>n>t?t:n<e?e:n;function Nd(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ei=()=>{},pn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(ei=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Nd(t,n))},pn=(e,t,n)=>{if(!e)throw new Error(Nd(t,n))});const vr={},ab=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function lb(e){return typeof e=="object"&&e!==null}const cb=e=>/^0[^.\s]+$/u.test(e);function ub(e){let t;return()=>(t===void 0&&(t=e()),t)}const wn=e=>e,g_=(e,t)=>n=>t(e(n)),cs=(...e)=>e.reduce(g_),ti=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fd{constructor(){this.subscriptions=[]}add(t){return Dd(this.subscriptions,t),()=>Jo(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const hn=e=>e*1e3,Sn=e=>e/1e3;function db(e,t){return t?e*(1e3/t):0}const fb=new Set;function pl(e,t,n){e||fb.has(t)||(console.warn(Nd(t,n)),fb.add(t))}const y_=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},pb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,v_=1e-7,b_=12;function x_(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=pb(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>v_&&++a<b_);return s}function us(e,t,n,r){if(e===t&&n===r)return wn;const o=i=>x_(i,0,1,e,n);return i=>i===0||i===1?i:pb(o(i),t,r)}const hb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,mb=e=>t=>1-e(1-t),gb=us(.33,1.53,.69,.99),Ld=mb(gb),yb=hb(Ld),vb=e=>(e*=2)<1?.5*Ld(e):.5*(2-Math.pow(2,-10*(e-1))),Vd=e=>1-Math.sin(Math.acos(e)),bb=mb(Vd),xb=hb(Vd),w_=us(.42,0,1,1),S_=us(0,0,.58,1),wb=us(.42,0,.58,1),Sb=e=>Array.isArray(e)&&typeof e[0]!="number";function Tb(e,t){return Sb(e)?e[y_(0,e.length,t)]:e}const Eb=e=>Array.isArray(e)&&typeof e[0]=="number",kb={linear:wn,easeIn:w_,easeInOut:wb,easeOut:S_,circIn:Vd,circInOut:xb,circOut:bb,backIn:Ld,backInOut:yb,backOut:gb,anticipate:vb},T_=e=>typeof e=="string",$d=e=>{if(Eb(e)){pn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return us(t,n,r,o)}else if(T_(e))return pn(kb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),kb[e];return e},hl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function E_(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const h=f&&o?n:r;return d&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const k_=40;function Cb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=hl.reduce((x,T)=>(x[T]=E_(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=s,y=()=>{const x=vr.useManualTiming?o.timestamp:performance.now();n=!1,vr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,k_),1)),o.timestamp=x,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))},m=()=>{n=!0,r=!0,o.isProcessing||e(y)};return{schedule:hl.reduce((x,T)=>{const E=s[T];return x[T]=(I,w=!1,k=!1)=>(n||m(),E.schedule(I,w,k)),x},{}),cancel:x=>{for(let T=0;T<hl.length;T++)s[hl[T]].cancel(x)},state:o,steps:s}}const{schedule:ht,cancel:br,state:Yt,steps:zd}=Cb(typeof requestAnimationFrame<"u"?requestAnimationFrame:wn,!0);let ml;function C_(){ml=void 0}const Jt={now:()=>(ml===void 0&&Jt.set(Yt.isProcessing||vr.useManualTiming?Yt.timestamp:performance.now()),ml),set:e=>{ml=e,queueMicrotask(C_)}},Ib=e=>t=>typeof t=="string"&&t.startsWith(e),Ab=Ib("--"),I_=Ib("var(--"),jd=e=>I_(e)?A_.test(e.split("/*")[0].trim()):!1,A_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ni={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ds={...ni,transform:e=>Xn(0,1,e)},gl={...ni,default:1},fs=e=>Math.round(e*1e5)/1e5,Rd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function P_(e){return e==null}const O_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Bd=(e,t)=>n=>!!(typeof n=="string"&&O_.test(n)&&n.startsWith(e)||t&&!P_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ob=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(Rd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},__=e=>Xn(0,255,e),Hd={...ni,transform:e=>Math.round(__(e))},fo={test:Bd("rgb","red"),parse:Ob("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Hd.transform(e)+", "+Hd.transform(t)+", "+Hd.transform(n)+", "+fs(ds.transform(r))+")"};function M_(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 Wd={test:Bd("#"),parse:M_,transform:fo.transform},ps=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lr=ps("deg"),Qn=ps("%"),Ee=ps("px"),D_=ps("vh"),N_=ps("vw"),_b={...Qn,parse:e=>Qn.parse(e)/100,transform:e=>Qn.transform(e*100)},ri={test:Bd("hsl","hue"),parse:Ob("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qn.transform(fs(t))+", "+Qn.transform(fs(n))+", "+fs(ds.transform(r))+")"},Ft={test:e=>fo.test(e)||Wd.test(e)||ri.test(e),parse:e=>fo.test(e)?fo.parse(e):ri.test(e)?ri.parse(e):Wd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fo.transform(e):ri.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},F_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function L_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Rd)?.length||0)+(e.match(F_)?.length||0)>0}const Mb="number",Db="color",V_="var",$_="var(",Nb="${}",z_=/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 hs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(z_,l=>(Ft.test(l)?(r.color.push(i),o.push(Db),n.push(Ft.parse(l))):l.startsWith($_)?(r.var.push(i),o.push(V_),n.push(l)):(r.number.push(i),o.push(Mb),n.push(parseFloat(l))),++i,Nb)).split(Nb);return{values:n,split:a,indexes:r,types:o}}function Fb(e){return hs(e).values}function Lb(e){const{split:t,types:n}=hs(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Mb?i+=fs(o[s]):a===Db?i+=Ft.transform(o[s]):i+=o[s]}return i}}const j_=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function R_(e){const t=Fb(e);return Lb(e)(t.map(j_))}const Mn={test:L_,parse:Fb,createTransformer:Lb,getAnimatableNone:R_};function qd(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 B_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=qd(l,a,e+1/3),i=qd(l,a,e),s=qd(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function yl(e,t){return n=>n>0?t:e}const vt=(e,t,n)=>e+(t-e)*n,Ud=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},H_=[Wd,fo,ri],W_=e=>H_.find(t=>t.test(e));function Vb(e){const t=W_(e);if(ei(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===ri&&(n=B_(n)),n}const $b=(e,t)=>{const n=Vb(e),r=Vb(t);if(!n||!r)return yl(e,t);const o={...n};return i=>(o.red=Ud(n.red,r.red,i),o.green=Ud(n.green,r.green,i),o.blue=Ud(n.blue,r.blue,i),o.alpha=vt(n.alpha,r.alpha,i),fo.transform(o))},Gd=new Set(["none","hidden"]);function q_(e,t){return Gd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function U_(e,t){return n=>vt(e,t,n)}function Yd(e){return typeof e=="number"?U_:typeof e=="string"?jd(e)?yl:Ft.test(e)?$b:K_:Array.isArray(e)?zb:typeof e=="object"?Ft.test(e)?$b:G_:yl}function zb(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Yd(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function G_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Yd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function Y_(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],s=e.indexes[i][r[i]],a=e.values[s]??0;n[o]=a,r[i]++}return n}const K_=(e,t)=>{const n=Mn.createTransformer(t),r=hs(e),o=hs(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?Gd.has(e)&&!o.values.length||Gd.has(t)&&!r.values.length?q_(e,t):cs(zb(Y_(r,o),o.values),n):(ei(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),yl(e,t))};function jb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?vt(e,t,n):Yd(e)(e,t)}const Z_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ht.update(t,n),stop:()=>br(t),now:()=>Yt.isProcessing?Yt.timestamp:Jt.now()}},Rb=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},vl=2e4;function Kd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<vl;)t+=n,r=e.next(t);return t>=vl?1/0:t}function Bb(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Kd(r),vl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Sn(o)}}const X_=5;function Hb(e,t,n){const r=Math.max(t-X_,0);return db(n-e(r),t-r)}const Ct={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},Zd=.001;function Q_({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let o,i;ei(e<=hn(Ct.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Xn(Ct.minDamping,Ct.maxDamping,s),e=Xn(Ct.minDuration,Ct.maxDuration,Sn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,p=Xd(c,s),h=Math.exp(-d);return Zd-f/p*h},i=c=>{const d=c*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,h=Math.exp(-d),y=Xd(Math.pow(c,2),s);return(-o(c)+Zd>0?-1:1)*((f-p)*h)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Zd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=eM(o,i,a);if(e=hn(e),isNaN(l))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const J_=12;function eM(e,t,n){let r=n;for(let o=1;o<J_;o++)r=r-e(r)/t(r);return r}function Xd(e,t){return e*Math.sqrt(1-t*t)}const tM=["duration","bounce"],nM=["stiffness","damping","mass"];function Wb(e,t){return t.some(n=>e[n]!==void 0)}function rM(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!Wb(e,nM)&&Wb(e,tM))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Xn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ct.mass,stiffness:o,damping:i}}else{const n=Q_({...e,velocity:0});t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function ms(e=Ct.visualDuration,t=Ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=rM({...n,velocity:-Sn(n.velocity||0)}),h=f||0,y=c/(2*Math.sqrt(l*u)),m=s-i,v=Sn(Math.sqrt(l/u)),b=Math.abs(m)<5;r||(r=b?Ct.restSpeed.granular:Ct.restSpeed.default),o||(o=b?Ct.restDelta.granular:Ct.restDelta.default);let x;if(y<1){const E=Xd(v,y);x=I=>{const w=Math.exp(-y*v*I);return s-w*((h+y*v*m)/E*Math.sin(E*I)+m*Math.cos(E*I))}}else if(y===1)x=E=>s-Math.exp(-v*E)*(m+(h+v*m)*E);else{const E=v*Math.sqrt(y*y-1);x=I=>{const w=Math.exp(-y*v*I),k=Math.min(E*I,300);return s-w*((h+y*v*m)*Math.sinh(k)+E*m*Math.cosh(k))/E}}const T={calculatedDuration:p&&d||null,next:E=>{const I=x(E);if(p)a.done=E>=d;else{let w=E===0?h:0;y<1&&(w=E===0?hn(h):Hb(x,E,I));const k=Math.abs(w)<=r,A=Math.abs(s-I)<=o;a.done=k&&A}return a.value=a.done?s:I,a},toString:()=>{const E=Math.min(Kd(T),vl),I=Rb(w=>T.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}ms.applyToOptions=e=>{const t=Bb(e,100,ms);return e.ease=t.ease,e.duration=hn(t.duration),e.type="keyframes",e};function Qd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=k=>a!==void 0&&k<a||l!==void 0&&k>l,h=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let y=n*t;const m=d+y,v=s===void 0?m:s(m);v!==m&&(y=v-d);const b=k=>-y*Math.exp(-k/r),x=k=>v+b(k),T=k=>{const A=b(k),O=x(k);f.done=Math.abs(A)<=c,f.value=f.done?v:O};let E,I;const w=k=>{p(f.value)&&(E=k,I=ms({keyframes:[f.value,h(f.value)],velocity:Hb(x,k,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:k=>{let A=!1;return!I&&E===void 0&&(A=!0,T(k),w(k)),E!==void 0&&k>=E?I.next(k-E):(!A&&T(k),f)}}}function oM(e,t,n){const r=[],o=n||vr.mix||jb,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||wn:t;a=cs(l,a)}r.push(a)}return r}function qb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(pn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=oM(t,r,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ti(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Xn(e[0],e[i-1],u)):c}function Ub(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ti(0,t,r);e.push(vt(n,1,o))}}function Gb(e){const t=[0];return Ub(t,e.length-1),t}function iM(e,t){return e.map(n=>n*t)}function sM(e,t){return e.map(()=>t||wb).splice(0,e.length-1)}function oi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Sb(r)?r.map($d):$d(r),i={done:!1,value:t[0]},s=iM(n&&n.length===t.length?n:Gb(t),e),a=qb(s,t,{ease:Array.isArray(o)?o:sM(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const aM=e=>e!==null;function Jd(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(aM),a=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const lM={decay:Qd,inertia:Qd,tween:oi,keyframes:oi,spring:ms};function Yb(e){typeof e.type=="string"&&(e.type=lM[e.type])}class ef{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const cM=e=>e/100;class tf extends ef{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Jt.now()&&this.tick(Jt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Yb(t);const{type:n=oi,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||oi;process.env.NODE_ENV!=="production"&&l!==oi&&pn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==oi&&typeof a[0]!="number"&&(this.mixKeyframes=cs(cM,jb(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=Kd(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:y,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,T=r;if(d){const k=Math.min(this.currentTime,o)/a;let A=Math.floor(k),O=k%1;!O&&k>=1&&(O=1),O===1&&A--,A=Math.min(A,d+1),A%2&&(f==="reverse"?(O=1-O,p&&(O-=p/a)):f==="mirror"&&(T=s)),x=Xn(0,1,O)*a}const E=b?{done:!1,value:u[0]}:T.next(x);i&&(E.value=i(E.value));let{done:I}=E;!b&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&h!==Qd&&(E.value=Jd(u,this.options,m,this.speed)),y&&y(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Sn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sn(t)}get time(){return Sn(this.currentTime)}set time(t){t=hn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Sn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Z_,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Jt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function uM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const po=e=>e*180/Math.PI,nf=e=>{const t=po(Math.atan2(e[1],e[0]));return rf(t)},dM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:nf,rotateZ:nf,skewX:e=>po(Math.atan(e[1])),skewY:e=>po(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},rf=e=>(e=e%360,e<0&&(e+=360),e),Kb=nf,Zb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zb,scaleY:Xb,scale:e=>(Zb(e)+Xb(e))/2,rotateX:e=>rf(po(Math.atan2(e[6],e[5]))),rotateY:e=>rf(po(Math.atan2(-e[2],e[0]))),rotateZ:Kb,rotate:Kb,skewX:e=>po(Math.atan(e[4])),skewY:e=>po(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function of(e){return e.includes("scale")?1:0}function sf(e,t){if(!e||e==="none")return of(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=fM,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dM,o=a}if(!o)return of(t);const i=r[t],s=o[1].split(",").map(hM);return typeof i=="function"?i(s):s[i]}const pM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sf(n,t)};function hM(e){return parseFloat(e.trim())}const ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],si=new Set(ii),Qb=e=>e===ni||e===Ee,mM=new Set(["x","y","z"]),gM=ii.filter(e=>!mM.has(e));function yM(e){const t=[];return gM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Vr={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})=>sf(t,"x"),y:(e,{transform:t})=>sf(t,"y")};Vr.translateX=Vr.x,Vr.translateY=Vr.y;const ho=new Set;let af=!1,lf=!1,cf=!1;function Jb(){if(lf){const e=Array.from(ho).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=yM(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{r.getValue(i)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}lf=!1,af=!1,ho.forEach(e=>e.complete(cf)),ho.clear()}function ex(){ho.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(lf=!0)})}function vM(){cf=!0,ex(),Jb(),cf=!1}class uf{constructor(t,n,r,o,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(ho.add(this),af||(af=!0,ht.read(ex),ht.resolveKeyframes(Jb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}uM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ho.delete(this)}cancel(){this.state==="scheduled"&&(ho.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const bM=e=>e.startsWith("--");function xM(e,t,n){bM(t)?e.style.setProperty(t,n):e.style[t]=n}const wM={};function tx(e,t){const n=ub(e);return()=>wM[t]??n()}const SM=tx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),nx=tx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,rx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gs([0,.65,.55,1]),circOut:gs([.55,0,1,.45]),backIn:gs([.31,.01,.66,-.59]),backOut:gs([.33,1.53,.69,.99])};function ox(e,t){if(e)return typeof e=="function"?nx()?Rb(e,t):"ease-out":Eb(e)?gs(e):Array.isArray(e)?e.map(n=>ox(n,t)||rx.easeOut):rx[e]}function TM(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ox(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function df(e){return typeof e=="function"&&"applyToOptions"in e}function EM({type:e,...t}){return df(e)&&nx()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ix extends ef{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,pn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=EM(t);this.animation=TM(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Jd(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):xM(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Sn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sn(t)}get time(){return Sn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&SM()?(this.animation.timeline=t,wn):n(this)}}const sx={anticipate:vb,backInOut:yb,circInOut:xb};function kM(e){return e in sx}function CM(e){typeof e.ease=="string"&&kM(e.ease)&&(e.ease=sx[e.ease])}const ff=10;class IM extends ix{constructor(t){CM(t),Yb(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new tf({...s,autoplay:!1}),l=Math.max(ff,Jt.now()-this.startTime),c=Xn(0,ff,l-ff);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const ax=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Mn.test(e)||e==="0")&&!e.startsWith("url("));function AM(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 PM(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=ax(o,t),a=ax(i,t);return ei(s===a,`You are trying to animate ${t} from "${o}" to "${i}". "${s?i:o}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:AM(e)||(n==="spring"||df(n))&&r}function pf(e){e.duration=0,e.type="keyframes"}const OM=new Set(["opacity","clipPath","filter","transform"]),_M=ub(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function MM(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return _M()&&n&&OM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&s!=="inertia"}const DM=40;class NM extends ef{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Jt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||uf;this.keyframeResolver=new p(a,(h,y,m)=>this.onKeyframesResolved(h,y,f,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Jt.now(),PM(t,i,s,a)||((vr.instantAnimations||!l)&&u?.(Jd(t,r,n)),t[0]=t[t.length-1],pf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>DM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&MM(f),h=f.motionValue?.owner?.current,y=p?new IM({...f,element:h}):new tf(f);y.finished.then(()=>{this.notifyFinished()}).catch(wn),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),vM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class FM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return lx(this.animations,"duration")}get iterationDuration(){return lx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function lx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class LM extends FM{then(t,n){return this.finished.finally(t).then(()=>{})}}function cx(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}const VM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $M(e){const t=VM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const zM=4;function ux(e,t,n=1){pn(n<=zM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=$M(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return ab(s)?parseFloat(s):s}return jd(o)?ux(o,t,n+1):o}const jM={type:"spring",stiffness:500,damping:25,restSpeed:10},RM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),BM={type:"keyframes",duration:.8},HM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WM=(e,{keyframes:t})=>t.length>2?BM:si.has(e)?e.startsWith("scale")?RM(t[1]):jM:HM,qM=e=>e!==null;function UM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(qM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function hf(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function mf(e,t){const n=e?.[t]??e?.default??e;return n!==e?hf(n,e):n}function GM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const gf=(e,t,n,r={},o,i)=>s=>{const a=mf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-hn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};GM(a)||Object.assign(u,WM(e,u)),u.duration&&(u.duration=hn(u.duration)),u.repeatDelay&&(u.repeatDelay=hn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(pf(u),u.delay===0&&(d=!0)),(vr.instantAnimations||vr.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,pf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=UM(u.keyframes,a);if(f!==void 0){ht.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new tf(u):new NM(u)};function dx(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function yf(e,t,n,r){if(typeof t=="function"){const[o,i]=dx(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]=dx(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ai(e,t,n){const r=e.getProps();return yf(r,t,n!==void 0?n:r.custom,e)}const fx=new Set(["width","height","top","left","right","bottom",...ii]),px=30,YM=e=>!isNaN(parseFloat(e)),ys={current:void 0};class KM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=YM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fd);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ys.current&&ys.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>px)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,px);return db(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $r(e,t){return new KM(e,t)}const vf=e=>Array.isArray(e);function ZM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$r(n))}function XM(e){return vf(e)?e[e.length-1]||0:e}function QM(e,t){const n=ai(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=XM(i[s]);ZM(e,s,a)}}const zt=e=>!!(e&&e.getVelocity);function JM(e){return!!(zt(e)&&e.add)}function bf(e,t){const n=e.getValue("willChange");if(JM(n))return n.add(t);if(!n&&vr.WillChange){const r=new vr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function xf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const hx="data-"+xf("framerAppearId");function mx(e){return e.props[hx]}function eD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function wf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i,transitionEnd:s,...a}=t;const l=e.getDefaultTransition();i=i?hf(i,l):l;const c=i?.reduceMotion;r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in a){const p=e.getValue(f,e.latestValues[f]??null),h=a[f];if(h===void 0||d&&eD(d,f))continue;const y={delay:n,...mf(i||{},f)},m=p.get();if(m!==void 0&&!p.isAnimating&&!Array.isArray(h)&&h===m&&!y.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const T=mx(e);if(T){const E=window.MotionHandoffAnimation(T,f,ht);E!==null&&(y.startTime=E,v=!0)}}bf(e,f);const b=c??e.shouldReduceMotion;p.start(gf(f,p,h,b&&fx.has(f)?{type:!1}:y,e,v));const x=p.animation;x&&u.push(x)}if(s){const f=()=>ht.update(()=>{s&&QM(e,s)});u.length?Promise.all(u).then(f):f()}return u}function Sf(e,t,n={}){const r=ai(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(wf(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return tD(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function tD(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Sf(l,t,{...s,delay:n+(typeof r=="function"?0:r)+cx(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function nD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Sf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Sf(e,t,n);else{const o=typeof t=="function"?ai(e,t,n.custom):t;r=Promise.all(wf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const rD={test:e=>e==="auto",parse:e=>e},gx=e=>t=>t.test(e),yx=[ni,Ee,Qn,Lr,N_,D_,rD],vx=e=>yx.find(gx(e));function oD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||cb(e):!0}const iD=new Set(["brightness","contrast","saturate","opacity"]);function sD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Rd)||[];if(!r)return e;const o=n.replace(r,"");let i=iD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const aD=/\b([a-z-]*)\(.*?\)/gu,Tf={...Mn,getAnimatableNone:e=>{const t=e.match(aD);return t?t.map(sD).join(" "):e}},Ef={...Mn,getAnimatableNone:e=>{const t=Mn.parse(e);return Mn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},bx={...ni,transform:Math.round},kf={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,inset:Ee,insetBlock:Ee,insetBlockStart:Ee,insetBlockEnd:Ee,insetInline:Ee,insetInlineStart:Ee,insetInlineEnd:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,paddingBlock:Ee,paddingBlockStart:Ee,paddingBlockEnd:Ee,paddingInline:Ee,paddingInlineStart:Ee,paddingInlineEnd:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,marginBlock:Ee,marginBlockStart:Ee,marginBlockEnd:Ee,marginInline:Ee,marginInlineStart:Ee,marginInlineEnd:Ee,fontSize:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:Lr,rotateX:Lr,rotateY:Lr,rotateZ:Lr,scale:gl,scaleX:gl,scaleY:gl,scaleZ:gl,skew:Lr,skewX:Lr,skewY:Lr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:ds,originX:_b,originY:_b,originZ:Ee},zIndex:bx,fillOpacity:ds,strokeOpacity:ds,numOctaves:bx},lD={...kf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:Tf,WebkitFilter:Tf,mask:Ef,WebkitMask:Ef},xx=e=>lD[e],cD=new Set([Tf,Ef]);function wx(e,t){let n=xx(e);return cD.has(n)||(n=Mn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uD=new Set(["auto","none","0"]);function dD(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!uD.has(i)&&hs(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=wx(n,o)}class fD extends uf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),jd(d))){const f=ux(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!fx.has(r)||t.length!==2)return;const[o,i]=t,s=vx(o),a=vx(i),l=Pb(o),c=Pb(i);if(l!==c&&Vr[r]){this.needsMeasurement=!0;return}if(s!==a)if(Qb(s)&&Qb(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Vr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||oD(t[o]))&&r.push(o);r.length&&dD(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=Vr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=Vr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const pD=new Set(["opacity","clipPath","filter","transform"]);function Cf(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const Sx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function If(e){return lb(e)&&"offsetHeight"in e}const{schedule:Af}=Cb(queueMicrotask,!1),Dn={x:!1,y:!1};function Tx(){return Dn.x||Dn.y}function hD(e){return e==="x"||e==="y"?Dn[e]?null:(Dn[e]=!0,()=>{Dn[e]=!1}):Dn.x||Dn.y?null:(Dn.x=Dn.y=!0,()=>{Dn.x=Dn.y=!1})}function Ex(e,t){const n=Cf(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function mD(e){return!(e.pointerType==="touch"||Tx())}function gD(e,t,n={}){const[r,o,i]=Ex(e,n);return r.forEach(s=>{let a=!1,l=!1,c;const u=()=>{s.removeEventListener("pointerleave",h)},d=m=>{c&&(c(m),c=void 0),u()},f=m=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(m))},p=()=>{a=!0,window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",f,o)},h=m=>{if(m.pointerType!=="touch"){if(a){l=!0;return}d(m)}},y=m=>{if(!mD(m))return;l=!1;const v=t(s,m);typeof v=="function"&&(c=v,s.addEventListener("pointerleave",h,o))};s.addEventListener("pointerenter",y,o),s.addEventListener("pointerdown",p,o)}),i}const kx=(e,t)=>t?e===t?!0:kx(e,t.parentElement):!1,Pf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vD(e){return yD.has(e.tagName)||e.isContentEditable===!0}const bD=new Set(["INPUT","SELECT","TEXTAREA"]);function xD(e){return bD.has(e.tagName)||e.isContentEditable===!0}const bl=new WeakSet;function Cx(e){return t=>{t.key==="Enter"&&e(t)}}function Of(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const wD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Cx(()=>{if(bl.has(n))return;Of(n,"down");const o=Cx(()=>{Of(n,"up")}),i=()=>Of(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 Ix(e){return Pf(e)&&!Tx()}const Ax=new WeakSet;function SD(e,t,n={}){const[r,o,i]=Ex(e,n),s=a=>{const l=a.currentTarget;if(!Ix(a)||Ax.has(a))return;bl.add(l),n.stopPropagation&&Ax.add(a);const c=t(l,a),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),bl.has(l)&&bl.delete(l),Ix(p)&&typeof c=="function"&&c(p,{success:h})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||kx(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),If(a)&&(a.addEventListener("focus",c=>wD(c,o)),!vD(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function xl(e){return lb(e)&&"ownerSVGElement"in e}const wl=new WeakMap;let Sl;const Px=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:xl(r)&&"getBBox"in r?r.getBBox()[t]:r[n],TD=Px("inline","width","offsetWidth"),ED=Px("block","height","offsetHeight");function kD({target:e,borderBoxSize:t}){wl.get(e)?.forEach(n=>{n(e,{get width(){return TD(e,t)},get height(){return ED(e,t)}})})}function CD(e){e.forEach(kD)}function ID(){typeof ResizeObserver>"u"||(Sl=new ResizeObserver(CD))}function AD(e,t){Sl||ID();const n=Cf(e);return n.forEach(r=>{let o=wl.get(r);o||(o=new Set,wl.set(r,o)),o.add(t),Sl?.observe(r)}),()=>{n.forEach(r=>{const o=wl.get(r);o?.delete(t),o?.size||Sl?.unobserve(r)})}}const Tl=new Set;let li;function PD(){li=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Tl.forEach(t=>t(e))},window.addEventListener("resize",li)}function OD(e){return Tl.add(e),li||PD(),()=>{Tl.delete(e),!Tl.size&&typeof li=="function"&&(window.removeEventListener("resize",li),li=void 0)}}function Ox(e,t){return typeof e=="function"?OD(e):AD(e,t)}function _x(e){return xl(e)&&e.tagName==="svg"}function _D(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function MD(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:_D(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=$d(r)(l/c)*c}return t+l}}function DD(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=qb(o,i,s);return t?a(r):a}const ND=[...yx,Ft,Mn],FD=e=>ND.find(gx(e)),Mx=()=>({translate:0,scale:1,origin:0,originPoint:0}),ci=()=>({x:Mx(),y:Mx()}),Dx=()=>({min:0,max:0}),Lt=()=>({x:Dx(),y:Dx()}),vs=new WeakMap;function El(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bs(e){return typeof e=="string"||Array.isArray(e)}const _f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mf=["initial",..._f];function kl(e){return El(e.animate)||Mf.some(t=>bs(e[t]))}function Nx(e){return!!(kl(e)||e.variants)}function LD(e,t,n){for(const r in t){const o=t[r],i=n[r];if(zt(o))e.addValue(r,o);else if(zt(i))e.addValue(r,$r(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,$r(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Cl={current:null},Df={current:!1},VD=typeof window<"u";function Fx(){if(Df.current=!0,!!VD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Cl.current=e.matches;e.addEventListener("change",t),t()}else Cl.current=!1}const Lx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Il={};function Vx(e){Il=e}function $D(){return Il}class $x{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=uf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Jt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ht.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=kl(n),this.isVariantNode=Nx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const h=f[p];c[p]!==void 0&&zt(h)&&h.set(c[p])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,vs.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Df.current||Fx(),this.shouldReduceMotion=Cl.current),process.env.NODE_ENV!=="production"&&pl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),br(this.notifyUpdate),br(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&pD.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new ix({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:hn(u)}),f=s(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=si.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Il){const n=Il[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):Lt()}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<Lx.length;r++){const o=Lx[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=LD(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=$r(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(ab(r)||cb(r))?r=parseFloat(r):!FD(r)&&Mn.test(n)&&(r=wx(t,n)),this.setBaseTarget(t,zt(r)?r.get():r)),zt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=yf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!zt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Af.render(this.render)}}class zx extends $x{constructor(){super(...arguments),this.KeyframeResolver=fD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class zr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function jx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function jD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Nf(e){return e===void 0||e===1}function Ff({scale:e,scaleX:t,scaleY:n}){return!Nf(e)||!Nf(t)||!Nf(n)}function mo(e){return Ff(e)||Rx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Rx(e){return Bx(e.x)||Bx(e.y)}function Bx(e){return e&&e!=="0%"}function Al(e,t,n){const r=e-n,o=t*r;return n+o}function Hx(e,t,n,r,o){return o!==void 0&&(e=Al(e,o,r)),Al(e,n,r)+t}function Lf(e,t=0,n=1,r,o){e.min=Hx(e.min,t,n,r,o),e.max=Hx(e.max,t,n,r,o)}function Wx(e,{x:t,y:n}){Lf(e.x,t.translate,t.scale,t.originPoint),Lf(e.y,n.translate,n.scale,n.originPoint)}const qx=.999999999999,Ux=1.0000000000001;function RD(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&di(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Wx(e,s)),r&&mo(i.latestValues)&&di(e,i.latestValues))}t.x<Ux&&t.x>qx&&(t.x=1),t.y<Ux&&t.y>qx&&(t.y=1)}function ui(e,t){e.min=e.min+t,e.max=e.max+t}function Gx(e,t,n,r,o=.5){const i=vt(e.min,e.max,o);Lf(e,t,n,i,r)}function di(e,t){Gx(e.x,t.x,t.scaleX,t.scale,t.originX),Gx(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yx(e,t){return jx(jD(e.getBoundingClientRect(),t))}function BD(e,t,n){const r=Yx(e,n),{scroll:o}=t;return o&&(ui(r.x,o.offset.x),ui(r.y,o.offset.y)),r}const HD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WD=ii.length;function qD(e,t,n){let r="",o=!0;for(let i=0;i<WD;i++){const s=ii[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(s.startsWith("scale")?1:0);else{const c=parseFloat(a);l=s.startsWith("scale")?c===1:c===0}if(!l||n){const c=Sx(a,kf[s]);if(!l){o=!1;const u=HD[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Vf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(si.has(l)){s=!0;continue}else if(Ab(l)){o[l]=c;continue}else{const u=Sx(c,kf[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=qD(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function Kx(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function Zx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=Zx(e,t.target.x),r=Zx(e,t.target.y);return`${n}% ${r}%`}},UD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Mn.parse(e);if(o.length>5)return r;const i=Mn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=vt(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},$f={borderRadius:{...xs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xs,borderTopRightRadius:xs,borderBottomLeftRadius:xs,borderBottomRightRadius:xs,boxShadow:UD};function Xx(e,{layout:t,layoutId:n}){return si.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$f[e]||e==="opacity")}function zf(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const s in r)(zt(r[s])||o&&zt(o[s])||Xx(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}function GD(e){return window.getComputedStyle(e)}class Qx extends zx{constructor(){super(...arguments),this.type="html",this.renderInstance=Kx}readValueFromInstance(t,n){if(si.has(n))return this.projection?.isProjecting?of(n):pM(t,n);{const r=GD(t),o=(Ab(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yx(t,n)}build(t,n,r){Vf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zf(t,n,r)}}function YD(e,t){return e in t}class KD extends $x{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(YD(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 Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const ZD={offset:"stroke-dashoffset",array:"stroke-dasharray"},XD={offset:"strokeDashoffset",array:"strokeDasharray"};function QD(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ZD:XD;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const JD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Jx(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Vf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of JD)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&QD(d,o,i,s,!1)}const e0=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"]),t0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function eN(e,t,n,r){Kx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(e0.has(o)?o:xf(o),t.attrs[o])}function n0(e,t,n){const r=zf(e,t,n);for(const o in e)if(zt(e[o])||zt(t[o])){const i=ii.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class r0 extends zx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(si.has(n)){const r=xx(n);return r&&r.default||0}return n=e0.has(n)?n:xf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return n0(t,n,r)}build(t,n,r){Jx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){eN(t,n,r,o)}mount(t){this.isSVGTag=t0(t.tagName),super.mount(t)}}const tN=Mf.length;function o0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?o0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<tN;n++){const r=Mf[n],o=e.props[r];(bs(o)||o===!1)&&(t[r]=o)}return t}function i0(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 nN=[..._f].reverse(),rN=_f.length;function oN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>nD(e,n,r)))}function iN(e){let t=oN(e),n=s0(),r=!0;const o=l=>(c,u)=>{const d=ai(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...h}=d;c={...c,...h,...p}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=o0(e.parent)||{},d=[],f=new Set;let p={},h=1/0;for(let m=0;m<rN;m++){const v=nN[m],b=n[v],x=c[v]!==void 0?c[v]:u[v],T=bs(x),E=v===l?b.isActive:null;E===!1&&(h=m);let I=x===u[v]&&x!==c[v]&&T;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),b.protectedKeys={...p},!b.isActive&&E===null||!x&&!b.prevProp||El(x)||typeof x=="boolean")continue;if(v==="exit"&&b.isActive&&E!==!0){b.prevResolvedValues&&(p={...p,...b.prevResolvedValues});continue}const w=sN(b.prevProp,x);let k=w||v===l&&b.isActive&&!I&&T||m>h&&T,A=!1;const O=Array.isArray(x)?x:[x];let N=O.reduce(o(v),{});E===!1&&(N={});const{prevResolvedValues:M={}}=b,$={...M,...N},_=D=>{k=!0,f.has(D)&&(A=!0,f.delete(D)),b.needsAnimating[D]=!0;const C=e.getValue(D);C&&(C.liveStyle=!1)};for(const D in $){const C=N[D],V=M[D];if(p.hasOwnProperty(D))continue;let L=!1;vf(C)&&vf(V)?L=!i0(C,V):L=C!==V,L?C!=null?_(D):f.add(D):C!==void 0&&f.has(D)?_(D):b.protectedKeys[D]=!0}b.prevProp=x,b.prevResolvedValues=N,b.isActive&&(p={...p,...N}),r&&e.blockInitialAnimation&&(k=!1);const F=I&&w;k&&(!F||A)&&d.push(...O.map(D=>{const C={type:v};if(typeof D=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,L=ai(V,D);if(V.enteringChildren&&L){const{delayChildren:B}=L.transition||{};C.delay=cx(V.enteringChildren,e,B)}}return{animation:D,options:C}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const v=ai(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),m[v]=b??null}),d.push({animation:m})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=s0()}}}function sN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!i0(t,e):!1}function go(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function s0(){return{animate:go(!0),whileInView:go(),whileHover:go(),whileTap:go(),whileDrag:go(),whileFocus:go(),exit:go()}}function a0(e,t){e.min=t.min,e.max=t.max}function Nn(e,t){a0(e.x,t.x),a0(e.y,t.y)}function l0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const c0=1e-4,aN=1-c0,lN=1+c0,u0=.01,cN=0-u0,uN=0+u0;function en(e){return e.max-e.min}function dN(e,t,n){return Math.abs(e-t)<=n}function d0(e,t,n,r=.5){e.origin=r,e.originPoint=vt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=vt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=aN&&e.scale<=lN||isNaN(e.scale))&&(e.scale=1),(e.translate>=cN&&e.translate<=uN||isNaN(e.translate))&&(e.translate=0)}function ws(e,t,n,r){d0(e.x,t.x,n.x,r?r.originX:void 0),d0(e.y,t.y,n.y,r?r.originY:void 0)}function f0(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function fN(e,t,n){f0(e.x,t.x,n.x),f0(e.y,t.y,n.y)}function p0(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function Pl(e,t,n){p0(e.x,t.x,n.x),p0(e.y,t.y,n.y)}function h0(e,t,n,r,o){return e-=t,e=Al(e,1/n,r),o!==void 0&&(e=Al(e,1/o,r)),e}function pN(e,t=0,n=1,r=.5,o,i=e,s=e){if(Qn.test(t)&&(t=parseFloat(t),t=vt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=vt(i.min,i.max,r);e===i&&(a-=t),e.min=h0(e.min,t,n,a,o),e.max=h0(e.max,t,n,a,o)}function m0(e,t,[n,r,o],i,s){pN(e,t[n],t[r],t[o],t.scale,i,s)}const hN=["x","scaleX","originX"],mN=["y","scaleY","originY"];function g0(e,t,n,r){m0(e.x,t,hN,n?n.x:void 0,r?r.x:void 0),m0(e.y,t,mN,n?n.y:void 0,r?r.y:void 0)}function y0(e){return e.translate===0&&e.scale===1}function v0(e){return y0(e.x)&&y0(e.y)}function b0(e,t){return e.min===t.min&&e.max===t.max}function gN(e,t){return b0(e.x,t.x)&&b0(e.y,t.y)}function x0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function w0(e,t){return x0(e.x,t.x)&&x0(e.y,t.y)}function S0(e){return en(e.x)/en(e.y)}function T0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Jn(e){return[e("x"),e("y")]}function yN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const E0=["TopLeft","TopRight","BottomLeft","BottomRight"],vN=E0.length,k0=e=>typeof e=="string"?parseFloat(e):e,C0=e=>typeof e=="number"||Ee.test(e);function bN(e,t,n,r,o,i){o?(e.opacity=vt(0,n.opacity??1,xN(r)),e.opacityExit=vt(t.opacity??1,0,wN(r))):i&&(e.opacity=vt(t.opacity??1,n.opacity??1,r));for(let s=0;s<vN;s++){const a=`border${E0[s]}Radius`;let l=I0(t,a),c=I0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||C0(l)===C0(c)?(e[a]=Math.max(vt(k0(l),k0(c),r),0),(Qn.test(c)||Qn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=vt(t.rotate||0,n.rotate||0,r))}function I0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xN=A0(0,.5,bb),wN=A0(.5,.95,wn);function A0(e,t,n){return r=>r<e?0:r>t?1:n(ti(e,t,r))}function P0(e,t,n){const r=zt(e)?e:$r(e);return r.start(gf("",r,t,n)),r.animation}function Ss(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const SN=(e,t)=>e.depth-t.depth;class TN{constructor(){this.children=[],this.isDirty=!1}add(t){Dd(this.children,t),this.isDirty=!0}remove(t){Jo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(SN),this.isDirty=!1,this.children.forEach(t)}}function EN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(br(r),e(i-t))};return ht.setup(r,!0),()=>br(r)}function Ol(e){return zt(e)?e.get():e}class kN{constructor(){this.members=[]}add(t){Dd(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;o&&o.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&Jo(this.members,r)}t.scheduleRender()}remove(t){if(Jo(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],s=i.instance;if(i.isPresent!==!1&&(!s||s.isConnected!==!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();const o=r.options.layoutDependency,i=t.options.layoutDependency;if(!(o!==void 0&&i!==void 0&&o===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(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:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const _l={hasAnimatedSinceResize:!0,hasEverUpdated:!1},jf=["","X","Y","Z"],CN=1e3;let IN=0;function Rf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function O0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=mx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&O0(r)}function _0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=IN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ON),this.nodes.forEach(NN),this.nodes.forEach(FN),this.nodes.forEach(_N)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new TN)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Fd),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=xl(s)&&!_x(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;ht.read(()=>{d=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=EN(f,250),_l.hasAnimatedSinceResize&&(_l.hasAnimatedSinceResize=!1,this.nodes.forEach(N0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||c.getDefaultTransition()||jN,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=c.getProps(),v=!this.targetLayout||!w0(this.targetLayout,p),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...mf(h,"layout"),onPlay:y,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||N0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),br(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(LN),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&O0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(M0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(D0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(DN),this.nodes.forEach(AN),this.nodes.forEach(PN)):this.nodes.forEach(D0),this.clearAllSnapshots();const a=Jt.now();Yt.delta=Xn(0,1e3/60,a-Yt.timestamp),Yt.timestamp=a,Yt.isProcessing=!0,zd.update.process(Yt),zd.preRender.process(Yt),zd.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Af.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(MN),this.sharedNodes.forEach(VN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!v0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||mo(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),RN(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Lt();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(BN))){const{scroll:c}=this.root;c&&(ui(a.x,c.offset.x),ui(a.y,c.offset.y))}return a}removeElementScroll(s){const a=Lt();if(Nn(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Nn(a,s),ui(a.x,u.offset.x),ui(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=Lt();Nn(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&di(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),mo(u.latestValues)&&di(l,u.latestValues)}return mo(this.latestValues)&&di(l,this.latestValues),l}removeTransform(s){const a=Lt();Nn(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!mo(c.latestValues))continue;Ff(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Nn(u,d),g0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return mo(this.latestValues)&&g0(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Yt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nn(this.target,this.layout.layoutBox),Wx(this.target,this.targetDelta)):Nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ff(this.parent.latestValues)||Rx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),Pl(this.relativeTargetOrigin,a,l),Nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Yt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Nn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;RD(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Lt());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(l0(this.prevProjectionDelta.x,this.projectionDelta.x),l0(this.prevProjectionDelta.y,this.projectionDelta.y)),ws(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!T0(this.projectionDelta.x,this.prevProjectionDelta.x)||!T0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ci(),this.projectionDelta=ci(),this.projectionDeltaWithTransform=ci()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ci();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Lt(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,y=p!==h,m=this.getStack(),v=!m||m.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(zN));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const E=T/1e3;F0(d.x,s.x,E),F0(d.y,s.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$N(this.relativeTarget,this.relativeTargetOrigin,f,E),x&&gN(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Lt()),Nn(x,this.relativeTarget)),y&&(this.animationValues=u,bN(u,c,this.latestValues,E,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{_l.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$r(0)),this.motionValue.jump(0,!1),this.currentAnimation=P0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(CN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&j0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=en(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Nn(a,l),di(a,u),ws(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new kN),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Rf("z",s,c,this.animationValues);for(let u=0;u<jf.length;u++)Rf(`rotate${jf[u]}`,s,c,this.animationValues),Rf(`skew${jf[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Ol(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Ol(a?.pointerEvents)||""),this.hasProjected&&!mo(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=yN(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const h in $f){if(u[h]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:v}=$f[h],b=d==="none"?u[h]:y(u[h],c);if(m){const x=m.length;for(let T=0;T<x;T++)s[m[T]]=b}else v?this.options.visualElement.renderState.vars[h]=b:s[h]=b}this.options.layoutId&&(s.pointerEvents=c===this?Ol(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(M0),this.root.sharedNodes.clear()}}}function AN(e){e.updateLayout()}function PN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?Jn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):j0(o,t.layoutBox,n)&&Jn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const s=ci();ws(s,n,t.layoutBox);const a=ci();i?ws(a,e.applyTransform(r,!0),t.measuredBox):ws(a,n,t.layoutBox);const l=!v0(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Lt();Pl(p,t.layoutBox,d.layoutBox);const h=Lt();Pl(h,n,f.layoutBox),w0(p,h)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function ON(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 _N(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function MN(e){e.clearSnapshot()}function M0(e){e.clearMeasurements()}function D0(e){e.isLayoutDirty=!1}function DN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function N0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NN(e){e.resolveTargetDelta()}function FN(e){e.calcProjection()}function LN(e){e.resetSkewAndRotation()}function VN(e){e.removeLeadSnapshot()}function F0(e,t,n){e.translate=vt(t.translate,0,n),e.scale=vt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function L0(e,t,n,r){e.min=vt(t.min,n.min,r),e.max=vt(t.max,n.max,r)}function $N(e,t,n,r){L0(e.x,t.x,n.x,r),L0(e.y,t.y,n.y,r)}function zN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const jN={duration:.45,ease:[.4,0,.1,1]},V0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$0=V0("applewebkit/")&&!V0("chrome/")?Math.round:wn;function z0(e){e.min=$0(e.min),e.max=$0(e.max)}function RN(e){z0(e.x),z0(e.y)}function j0(e,t,n){return e==="position"||e==="preserve-aspect"&&!dN(S0(t),S0(n),.2)}function BN(e){return e!==e.root&&e.scroll?.wasRoot}const HN=_0({attachResizeListener:(e,t)=>Ss(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),WN=e=>!e.isLayoutDirty&&e.willUpdate(!1);function R0(){const e=new Set,t=new WeakMap,n=()=>e.forEach(WN);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 Bf={current:void 0},B0=_0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bf.current){const e=new HN({});e.mount(window),e.setOptions({layoutScroll:!0}),Bf.current=e}return Bf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),yo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function H0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qN(...e){return t=>{let n=!1;const r=e.map(o=>{const i=H0(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():H0(e[o],null)}}}}function UN(...e){return P.useCallback(qN(...e),e)}class GN extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,o=If(r)&&r.offsetWidth||0,i=If(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function YN({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:i}){const s=S.useId(),a=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=S.useContext(yo),u=e.props?.ref??e?.ref,d=UN(a,u);return S.useInsertionEffect(()=>{const{width:f,height:p,top:h,left:y,right:m,bottom:v}=l.current;if(t||i===!1||!a.current||!f||!p)return;const b=n==="left"?`left: ${y}`:`right: ${m}`,x=r==="bottom"?`bottom: ${v}`:`top: ${h}`;a.current.dataset.motionPopId=s;const T=document.createElement("style");c&&(T.nonce=c);const E=o??document.head;return E.appendChild(T),T.sheet&&T.sheet.insertRule(`
|
|
@@ -18,7 +18,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var R=pe(te,Z,H,ee,ie+".
|
|
|
18
18
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UB(e){if(Array.isArray(e))return xh(e)}function CT(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 IT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CT(Object(n),!0).forEach(function(r){AT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ys(e,t){return KB(e)||YB(e,t)||PT(e,t)||GB()}function GB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
19
19
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PT(e,t){if(e){if(typeof e=="string")return xh(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 xh(e,t)}}function xh(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 YB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function KB(e){if(Array.isArray(e))return e}var ZB=typeof bh=="function"?bh:bh.default,XB="file-invalid-type",QB="file-too-large",JB="file-too-small",e4="too-many-files",t4=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:XB,message:"File type must be ".concat(r)}},OT=function(t){return{code:QB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},_T=function(t){return{code:JB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},n4={code:e4,message:"Too many files"};function r4(e){return e.type===""&&typeof e.getAsFile=="function"}function MT(e,t){var n=e.type==="application/x-moz-file"||ZB(e,t)||r4(e);return[n,n?null:t4(t)]}function DT(e,t,n){if(Io(e.size))if(Io(t)&&Io(n)){if(e.size>n)return[!1,OT(n)];if(e.size<t)return[!1,_T(t)]}else{if(Io(t)&&e.size<t)return[!1,_T(t)];if(Io(n)&&e.size>n)return[!1,OT(n)]}return[!0,null]}function Io(e){return e!=null}function o4(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=MT(l,n),u=Ys(c,1),d=u[0],f=DT(l,r,o),p=Ys(f,1),h=p[0],y=a?a(l):null;return d&&h&&!y})}function fc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ks(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 NT(e){e.preventDefault()}function i4(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function s4(e){return e.indexOf("Edge/")!==-1}function a4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return i4(e)||s4(e)}function ar(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!fc(r)&&a&&a.apply(void 0,[r].concat(i)),fc(r)})}}function l4(){return"showOpenFilePicker"in window}function c4(e){if(Io(e)){var t=Object.entries(e).filter(function(n){var r=Ys(n,2),o=r[0],i=r[1],s=!0;return FT(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(LT))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Ys(r,2),i=o[0],s=o[1];return IT(IT({},n),{},AT({},i,s))},{});return[{description:"Files",accept:t}]}return e}function u4(e){if(Io(e))return Object.entries(e).reduce(function(t,n){var r=Ys(n,2),o=r[0],i=r[1];return[].concat(kT(t),[o],kT(i))},[]).filter(function(t){return FT(t)||LT(t)}).join(",")}function d4(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function f4(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function FT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function LT(e){return/^.*\.[\w]+$/.test(e)}var p4=["children"],h4=["open"],m4=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],g4=["refKey","onChange","onClick"];function VT(e){return b4(e)||v4(e)||$T(e)||y4()}function y4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
20
20
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function b4(e){if(Array.isArray(e))return Sh(e)}function wh(e,t){return S4(e)||w4(e,t)||$T(e,t)||x4()}function x4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
21
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $T(e,t){if(e){if(typeof e=="string")return Sh(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 Sh(e,t)}}function Sh(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 w4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function S4(e){if(Array.isArray(e))return e}function zT(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 St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zT(Object(n),!0).forEach(function(r){Th(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Th(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pc(e,t){if(e==null)return{};var n=T4(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 T4(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 Eh=S.forwardRef(function(e,t){var n=e.children,r=pc(e,p4),o=RT(r),i=o.open,s=pc(o,h4);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(St(St({},s),{},{open:i})))});Eh.displayName="Dropzone";var jT={disabled:!1,getFilesFromEvent:DB,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};Eh.defaultProps=jT,Eh.propTypes={children:yt.func,accept:yt.objectOf(yt.arrayOf(yt.string)),multiple:yt.bool,preventDropOnDocument:yt.bool,noClick:yt.bool,noKeyboard:yt.bool,noDrag:yt.bool,noDragEventsBubbling:yt.bool,minSize:yt.number,maxSize:yt.number,maxFiles:yt.number,disabled:yt.bool,getFilesFromEvent:yt.func,onFileDialogCancel:yt.func,onFileDialogOpen:yt.func,useFsAccessApi:yt.bool,autoFocus:yt.bool,onDragEnter:yt.func,onDragLeave:yt.func,onDragOver:yt.func,onDrop:yt.func,onDropAccepted:yt.func,onDropRejected:yt.func,onError:yt.func,validator:yt.func};var kh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function RT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=St(St({},jT),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,y=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,k=t.onError,A=t.validator,O=S.useMemo(function(){return u4(n)},[n]),N=S.useMemo(function(){return c4(n)},[n]),M=S.useMemo(function(){return typeof m=="function"?m:BT},[m]),$=S.useMemo(function(){return typeof y=="function"?y:BT},[y]),_=S.useRef(null),F=S.useRef(null),z=S.useReducer(E4,kh),D=wh(z,2),C=D[0],V=D[1],L=C.isFocused,B=C.isFileDialogActive,U=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&l4()),G=function(){!U.current&&B&&setTimeout(function(){if(F.current){var X=F.current.files;X.length||(V({type:"closeDialog"}),$())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[F,B,$,U]);var H=S.useRef([]),ee=S.useRef([]),ie=function(X){_.current&&_.current.contains(X.target)||(X.preventDefault(),H.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",NT,!1),document.addEventListener("drop",ie,!1)),function(){x&&(document.removeEventListener("dragover",NT),document.removeEventListener("drop",ie))}},[_,x]),S.useEffect(function(){var j=function(De){ee.current=[].concat(VT(ee.current),[De.target]),Ks(De)&&V({isDragGlobal:!0,type:"setDragGlobal"})},X=function(De){ee.current=ee.current.filter(function(Ne){return Ne!==De.target&&Ne!==null}),!(ee.current.length>0)&&V({isDragGlobal:!1,type:"setDragGlobal"})},me=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})},ve=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",j,!1),document.addEventListener("dragleave",X,!1),document.addEventListener("dragend",me,!1),document.addEventListener("drop",ve,!1),function(){document.removeEventListener("dragenter",j),document.removeEventListener("dragleave",X),document.removeEventListener("dragend",me),document.removeEventListener("drop",ve)}},[_]),S.useEffect(function(){return!r&&b&&_.current&&_.current.focus(),function(){}},[_,b,r]);var te=S.useCallback(function(j){k?k(j):console.error(j)},[k]),q=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[].concat(VT(H.current),[j.target]),Ks(j)&&Promise.resolve(o(j)).then(function(X){if(!(fc(j)&&!w)){var me=X.length,ve=me>0&&o4({files:X,accept:O,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:A}),ke=me>0&&!ve;V({isDragAccept:ve,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(X){return te(X)})},[o,c,te,w,O,s,i,a,l,A]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=Ks(j);if(X&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return X&&d&&d(j),!1},[d,w]),Z=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=H.current.filter(function(ve){return _.current&&_.current.contains(ve)}),me=X.indexOf(j.target);me!==-1&&X.splice(me,1),H.current=X,!(X.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ks(j)&&u&&u(j))},[_,u,w]),pe=S.useCallback(function(j,X){var me=[],ve=[];j.forEach(function(ke){var De=MT(ke,O),Ne=wh(De,2),ct=Ne[0],Nt=Ne[1],Qt=DT(ke,s,i),Re=wh(Qt,2),W=Re[0],K=Re[1],Oe=A?A(ke):null;if(ct&&W&&!Oe)me.push(ke);else{var Ue=[Nt,K];Oe&&(Ue=Ue.concat(Oe)),ve.push({file:ke,errors:Ue.filter(function(Ye){return Ye})})}}),(!a&&me.length>1||a&&l>=1&&me.length>l)&&(me.forEach(function(ke){ve.push({file:ke,errors:[n4]})}),me.splice(0)),V({acceptedFiles:me,fileRejections:ve,type:"setFiles"}),f&&f(me,ve,X),ve.length>0&&h&&h(ve,X),me.length>0&&p&&p(me,X)},[V,a,O,s,i,l,f,p,h,A]),R=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[],Ks(j)&&Promise.resolve(o(j)).then(function(X){fc(j)&&!w||pe(X,j)}).catch(function(X){return te(X)}),V({type:"reset"})},[o,pe,te,w]),ae=S.useCallback(function(){if(U.current){V({type:"openDialog"}),M();var j={multiple:a,types:N};window.showOpenFilePicker(j).then(function(X){return o(X)}).then(function(X){pe(X,null),V({type:"closeDialog"})}).catch(function(X){d4(X)?($(X),V({type:"closeDialog"})):f4(X)?(U.current=!1,F.current?(F.current.value=null,F.current.click()):te(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."))):te(X)});return}F.current&&(V({type:"openDialog"}),M(),F.current.value=null,F.current.click())},[V,M,$,v,pe,te,N,a]),ce=S.useCallback(function(j){!_.current||!_.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),ae())},[_,ae]),Q=S.useCallback(function(){V({type:"focus"})},[]),ue=S.useCallback(function(){V({type:"blur"})},[]),re=S.useCallback(function(){T||(a4()?setTimeout(ae,0):ae())},[T,ae]),he=function(X){return r?null:X},oe=function(X){return E?null:he(X)},le=function(X){return I?null:he(X)},be=function(X){w&&X.stopPropagation()},de=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.role,ke=j.onKeyDown,De=j.onFocus,Ne=j.onBlur,ct=j.onClick,Nt=j.onDragEnter,Qt=j.onDragOver,Re=j.onDragLeave,W=j.onDrop,K=pc(j,m4);return St(St(Th({onKeyDown:oe(ar(ke,ce)),onFocus:oe(ar(De,Q)),onBlur:oe(ar(Ne,ue)),onClick:he(ar(ct,re)),onDragEnter:le(ar(Nt,q)),onDragOver:le(ar(Qt,Y)),onDragLeave:le(ar(Re,Z)),onDrop:le(ar(W,R)),role:typeof ve=="string"&&ve!==""?ve:"presentation"},me,_),!r&&!E?{tabIndex:0}:{}),K)}},[_,ce,Q,ue,re,q,Y,Z,R,E,I,r]),ne=S.useCallback(function(j){j.stopPropagation()},[]),J=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.onChange,ke=j.onClick,De=pc(j,g4),Ne=Th({accept:O,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:he(ar(ve,R)),onClick:he(ar(ke,ne)),tabIndex:-1},me,F);return St(St({},Ne),De)}},[F,n,a,R,r]);return St(St({},C),{},{isFocused:L&&!r,getRootProps:de,getInputProps:J,rootRef:_,inputRef:F,open:he(ae)})}function E4(e,t){switch(t.type){case"focus":return St(St({},e),{},{isFocused:!0});case"blur":return St(St({},e),{},{isFocused:!1});case"openDialog":return St(St({},kh),{},{isFileDialogActive:!0});case"closeDialog":return St(St({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return St(St({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return St(St({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return St(St({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return St({},kh);default:return e}}function BT(){}const HT=S.createContext([null,()=>{}]),k4=()=>S.useContext(HT),C4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,I4={csv:Mu,xls:Mu,mov:jg,mp4:jg,xlsx:Mu,pdf:zg,txt:zg,json:fI,mp3:aI},A4=e=>{const[,t]=k4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:C4(l),size:wB(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},s=I4[e.file.name.split(".").at(-1)]??Rg,a=n.type==="img"?g.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):g.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return g.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[g.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:a}),g.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[g.jsx("span",{children:e.file.name}),g.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?g.jsx("div",{className:"flex-1 min-w-full",children:g.jsx(e.File,{file:e.file})}):null]}),g.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:g.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:g.jsx(Lo,{size:16})})})]})},P4=e=>g.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>g.jsx(A4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),WT=e=>{const t=At(),n=e.dragging?pI:hI;return g.jsxs("div",{className:"flex flex-col justify-center items-center",children:[g.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:g.jsx(n,{className:"text-primary",size:80})}),g.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[g.jsx("p",{children:t.uploadIdle}),g.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},O4=e=>e.isDragActive?g.jsx(WT,{files:e.files,dragging:!0}):e.files.length>0?g.jsx(P4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):g.jsx(S.Fragment,{children:e.idle}),_4=g.jsx(WT,{dragging:!1}),M4=e=>{const t=e.item.file,n=e.item.type;return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),g.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?g.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?g.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?g.jsx("figure",{children:g.jsx("audio",{controls:!0,src:e.item.url})}):null]})},D4=({idle:e=_4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=At(),s=S.useState(null),[a,l]=S.useState([]),c=o.files??a,u=()=>s[1](null),d=y=>{r?.(y),l(m=>m.concat(y))},{getRootProps:f,getInputProps:p,isDragActive:h}=RT({onDrop:d});return g.jsxs(HT.Provider,{value:s,children:[g.jsx(Ws,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?g.jsx(M4,{item:s[0]}):null}),g.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[g.jsx("input",{...p(o),name:o.name,id:o.name}),g.jsx(O4,{File:n,onDeleteFile:t,isDragActive:h,idle:e,files:c})]})]})},qT=()=>window.matchMedia("@media (pointer: coarse)"),N4=()=>{const e=S.useRef(Dr()?null:qT()),[t,n]=S.useState(Dr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?qT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},UT=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=N4(),o=S.useRef(Dr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||vv())return;document.documentElement.style.padding=Sg(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,s=document.documentElement,a=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(Hk(c.style.height)):null,f=Be.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return s.addEventListener("wheel",a,{signal:i.signal,passive:!1}),s.addEventListener("scroll",a,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},F4=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((s,a)=>s===n?a:!1).filter(s=>s!==!1);if(r.length===0)return null;const o=[];if(r.forEach(s=>{let a=s+1;const l=[s];for(let c=1;c<t.length;c++){const u=t[c];if(a=e.indexOf(u,a),a===-1)return;l.push(a),a++}o.push(l)}),o.length===0)return null;const i=o.sort((s,a)=>{if(s.length===1)return s[0]-a[0];const l=s[s.length-1]-s[0],c=a[a.length-1]-a[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},GT=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},YT={basic:/[,[\]]+?/,extend:/[,[\].]+?/},KT=(e,t)=>{const n=GT(t,YT.basic,e);return n!==void 0&&n!==e?n:GT(t,YT.extend,e)},ZT=e=>e.replace(/[^0-9]/g,""),hc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),XT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?ZT(e).includes(ZT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?F4(e,t)!==null:!1,L4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>XT(e,o,n,r)):XT(e,t,n,r),Ch=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Be.array(i.value)?i.value.map(hc):hc(`${i.value}`)}));return e.forEach(i=>{const s=KT(i,t);o.forEach(a=>{const l=KT(i,a.key);if(!l)return;const c=hc(`${a.value}`.toLocaleLowerCase()).trim(),u=hc(`${l}`.toLocaleLowerCase()).trim();if(L4(u,c,a.score,a.match))return void r.set(s,i);Be.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},V4=e=>g.jsx(S.Fragment,{children:e.children}),$4={duration:200,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},z4=[],j4=S.forwardRef(function(t,n){return g.jsx(He.ul,{...t,ref:n,className:"overscroll-contain w-full max-h-96 rounded-lg",children:g.jsx(mn,{children:t.children})})}),R4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(He.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),B4={List:j4,Item:R4},Pi=40,H4=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:s,interactive:a,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:h=!1,...y},m)=>{const v=S.useRef(null),b=S.useRef(null),x=S.useRef(null),T=y.value??y.defaultValue??"",E=At(),[I,w]=S.useState(()=>Math.min(320,Pi*o.length)),[k,A]=S.useState(!1),[O,N]=S.useState(""),[M,$]=S.useState(T),[_,F]=S.useState(()=>o.find(j=>j.value===T)?.label??T),[z,D]=S.useState(null),C=S.useRef(z4),V=UT(k,"block-only"),L=h&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...o]:o,B=()=>Ri.flushSync(()=>A(!0)),U=O?Ch(L,"value",[{key:"value",value:O},{key:"label",value:O}]):L,G=()=>{A(!1),w(0)},H=U.filter(j=>j.hidden!==!0),ee=h?void 0:`^(${o.map(j=>`${pd(j.value)}${j.label?"|"+pd(j.label):""}`).join("|")})$`,{x:ie,y:te,strategy:q,refs:Y,context:Z,placement:pe}=Gn({open:k,transform:!0,onOpenChange:A,placement:"bottom-start",whileElementsMounted:io,middleware:[Ho(4),My({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),_y({padding:10,elementContext:"reference",apply(j){const me=j.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ve=Wi(Y.reference.current,window.innerHeight),ke=Math.min(me<Pi?ve:me,ve,j.availableHeight),De=H.length===0?Pi:Math.min(ke,ve,me),Ne=`${b.current.getBoundingClientRect().width}px`;Object.assign(j.elements.floating.style,{width:Ne,maxWidth:Ne,height:De})}})]}),R=uv(Z,$4),{getReferenceProps:ae,getFloatingProps:ce,getItemProps:Q}=Yn([gr(Z,{role:"listbox"}),Mr(Z),Ya(Z,{cols:0,listRef:C,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(y.value){const j=o.find(X=>X.value===y.value);j&&(F(j.label??j.value),$(y.value))}},[y.value,o.length]),S.useEffect(()=>{if(!k)return w(0);const j=Y.reference;if(j.current===null)return;const X=Wi(j.current,window.innerHeight);setTimeout(()=>w(Math.min(X,H.length*Pi)),100)},[O,k,Y.reference,H.length]),S.useEffect(()=>{const j=Y.reference.current;if(j)return Hi(j)},[]);const ue=(j,X)=>{$(j.value);const me=Y.reference.current;if(!me)return;me?.setAttribute("data-value",j.value),me.value=j.value;const ve=new Event("change",{bubbles:!1,cancelable:!0});me.dispatchEvent(ve),y.onChange&&y.onChange(ve),F(j.label??""),G(),N(""),D(X)},re=j=>{const X=j.target.value;return N(X),!k&&X===""?A(!0):(j.target.name=y.name||"",X?A(!0):y.onChange?.(j))},he=()=>{B(),N(""),Y.reference.current?.focus()},oe=()=>{D(j=>j===null?0:j),B(),N("")},le=()=>{Y.reference.current?.setAttribute("data-value",""),N(""),$(""),F(""),wg(Y.reference.current),G()},be=y.id||y.name,de=`${be}-shadow`,ne=H.length===0,J=pe==="top"||pe==="top-start";return g.jsxs(rs,{...y,left:e,error:t,ref:b,form:y.form,loading:r,name:y.name,feedback:k&&J?y.title:d,hideLeft:f,required:p,title:y.title,container:i,rightLabel:s,interactive:a,id:de,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:y.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:he,children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),M?g.jsx("button",{type:"button",onClick:le,className:"p-2 transition-colors md:p-1 link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.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:[g.jsx("input",{"data-shadow":"true",...ae({...y,onFocus:oe,pattern:ee,onChange:re,id:de,name:de,ref:Y.setReference,onClick:j=>j.currentTarget.focus(),onKeyDown(j){if(j.key==="Escape")return j.currentTarget.blur(),G();if(k){if(j.key==="ArrowDown"){let X=Be.number(z)?z+1:0;return X>H.length-1&&(X=0),x.current?.scrollIntoView({index:X}),D(X)}if(j.key==="ArrowUp"){let X=Be.number(z)?z-1:H.length-1;return X<0&&(X=H.length-1),x.current?.scrollIntoView({index:X}),D(X)}if(j.key==="Enter"){if(z!==null&&H[z])return j.preventDefault(),ue(H[z],z);if(H.length===1)return j.preventDefault(),ue(H[0],0)}}}}),"data-value":M,"data-error":!!t,"data-name":be,"data-target":be,required:p,value:k?O:o.length===0?"":_||M,"aria-autocomplete":"list",autoComplete:"off",className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",y.className)}),g.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:m,required:p,defaultValue:y.value||M||void 0}),g.jsx(mr,{preserveTabOrder:!0,children:k?g.jsx(lo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs(He.div,{...ce({ref:dr(V,Y.setFloating),style:{...R.styles,left:ie,top:te??0,position:q,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:ne?"auto":I},className:Pe("overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",J?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!k)return w(0);const X=Y.floating.current.querySelectorAll("li").item(0),me=(X?X.getBoundingClientRect().height:Pi)*H.length;return Ri.flushSync(()=>w(me+2))},children:[ne?g.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||E.autocompleteEmpty})}):null,g.jsx(Lp,{overscan:40,ref:x,hidden:ne,data:H,style:{height:I},defaultItemHeight:Pi,components:B4,scrollerRef:j=>{v.current=j},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(j,X)=>{const me=X.Render??V4,ve=M===X.value||M===X.label,ke=z===j,De=X.label??X.value;return g.jsx("button",{"data-value":X.value,...Q({ref:Ne=>{C.current[j]=Ne},role:"option",type:"button","aria-checked":ve,"aria-current":ve,"aria-selected":ve,"aria-busy":X.disabled,onClick:()=>ue(X,j),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ve?"bg-primary-hover text-primary-foreground":""} ${ke?"bg-floating-hover text-floating-foreground":""}`}),children:g.jsx(me,{...y,label:X.label,value:X.value,children:De})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const QT=40,W4=e=>g.jsx(S.Fragment,{children:e.children}),q4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},JT=[],U4=S.forwardRef(function(t,n){return g.jsx(He.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:g.jsx(mn,{children:t.children})})}),G4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(He.li,{...r,ref:o,className:"last:rounded-t-lg"})}),Y4={List:U4,Item:G4},K4=e=>{const t=At(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const s=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>s.width)return i(!0)},[r]),g.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?g.jsxs(la,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},Z4=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:s,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:h=!1,onChangeOptions:y,...m},v)=>{const b=S.useMemo(()=>new zn(r.map(ne=>[ne.value,ne])),[r]),x=S.useRef(null),T=S.useRef(null),E=m.value??m.defaultValue??JT,I=At(),[w,k]=S.useState(0),[A,O]=S.useState(!1),[N,M]=S.useState(""),[$,_]=S.useState(()=>{const ne=new zn;return E.forEach(J=>{const j=b.get(J);return j?ne.set(J,j):void 0}),ne}),F=S.useMemo(()=>Array.from($.keys()),[$]),[z,D]=S.useState(()=>{const ne=new Set(E);return r.reduce((J,j)=>ne.has(j.value)?[...J,j.label??j.value]:J,[])??E}),[C,V]=S.useState(null),L=S.useRef(JT),B=h&&N!==""?[{value:N,label:N,"data-dynamic":"true"},...r]:r,U=N.length===0?B:Ch(B,"value",[{key:"value",value:N},{key:"label",value:N}]),G=UT(A,"block-only"),H=U.filter(ne=>ne.hidden!==!0),ee=H.length===0,{x:ie,y:te,strategy:q,refs:Y,context:Z}=Gn({open:A,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:O,whileElementsMounted:io,middleware:[Ho(4),_y({padding:10,elementContext:"reference",apply(ne){const j=ne.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,X=Wi(Y.reference.current,window.innerHeight),me=Math.min(j<QT?X:j,X,ne.availableHeight),ve=H.length===0?QT:Math.min(me,X,j),ke=`${x.current.getBoundingClientRect().width}px`;Object.assign(ne.elements.floating.style,{width:ke,maxWidth:ke,height:ve})}})]}),pe=uv(Z,q4),{getReferenceProps:R,getFloatingProps:ae,getItemProps:ce}=Yn([gr(Z,{role:"listbox"}),Mr(Z),Ya(Z,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:C,selectedIndex:C,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ne=>V(J=>ne??J)})]);S.useEffect(()=>{if(!A)return k(0);const ne=Y.reference;if(ne.current===null)return;const J=Wi(ne.current,window.innerHeight);setTimeout(()=>k(Math.min(J,H.length*40)),100)},[N,A,Y.reference]),S.useEffect(()=>{m.value&&_(new zn(m.value.map(ne=>[ne,b.get(ne)])))},[m.value,b]),S.useEffect(()=>{const ne=Y.reference.current;if(ne)return Hi(ne)},[]);const Q=(ne,J)=>{const j=$.clone(ve=>ve.has(ne.value)?ve.remove(ne.value):ve.set(ne.value,ne));_(j);const X=Y.reference.current;if(!X)return;const me=j.map(ve=>ve.value);X?.setAttribute("data-value",JSON.stringify(me)),y&&y(me),D(ve=>ve.concat(ne.label??"")),M(""),V(J)},ue=ne=>{const J=ne.target.value;return M(J),!A&&J===""?O(!0):(ne.target.name=m.name||"",J?O(!0):void 0)},re=()=>{O(!0),M(""),Y.reference.current?.focus()},he=()=>{O(!0),M("")},oe=()=>{Y.reference.current?.setAttribute("data-value","[]"),M(""),O(!1),_(new zn),y?.([])},le=m.id||m.name,be=$.map((ne,J)=>g.jsx(la,{size:"small",icon:g.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:j=>{j.preventDefault(),j.stopPropagation(),Q(ne,J)},children:g.jsx(Lo,{size:14})}),children:ne.label??ne.value},`MultiSelect-${ne.value}-x`)),de={height:ee?"0":$.size===0?w-49:w-86};return g.jsxs(rs,{...m,left:e,error:t,ref:x,form:m.form,name:m.name,feedback:d,hideLeft:f,required:p,title:m.title,container:o,rightLabel:i,interactive:s,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:re,children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),$?g.jsx("button",{type:"button",onClick:oe,className:"transition-colors link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.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:[g.jsxs("ul",{...R({...m,onFocus:he,id:`${le}-shadow`,name:`${le}-shadow`,ref:Y.setReference}),tabIndex:0,role:"button","data-name":le,"data-target":le,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":F.join(","),className:Pe("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[F.length>0?null:g.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),g.jsx(K4,{label:c,children:be})]}),g.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:v,required:p,defaultValue:m.value||F||void 0}),g.jsx(mr,{preserveTabOrder:!0,children:A?g.jsx(ld,{lockScroll:!0,children:g.jsx(lo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs("div",{...ae({ref:Y.setFloating,style:{...pe.styles,top:te??0,position:q,left:ie,height:w-(F.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[g.jsx("input",{autoFocus:!0,value:N,onChange:ue,title:m.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:ne=>{if(ne.key==="ArrowDown"){let J=C+1;return J>H.length-1&&(J=0),T.current?.scrollIntoView({index:J}),V(J)}if(ne.key==="ArrowUp"){let J=C-1;return J<0&&(J=H.length-1),T.current?.scrollIntoView({index:J}),V(J)}if(ne.key==="Escape")return ne.currentTarget.blur(),O(!1);if(ne.key==="Enter"){if(C!==null&&H[C])return ne.preventDefault(),Q(H[C],C);if(H.length===1)return ne.preventDefault(),Q(H[0],0)}}}),ee?g.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:a||I.autocompleteEmpty})}):null,ee?null:g.jsx(He.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:ee?"auto":w},style:de,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!A)return k(0);const J=Y.floating.current.querySelectorAll("li").item(0),j=(J?J.getBoundingClientRect().height:40)*H.length;return Ri.flushSync(()=>k(j+2))},children:g.jsx(Lp,{ref:T,hidden:ee,data:H,components:Y4,style:de,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(ne,J)=>{const j=J.Render??W4,X=$.has(J.value)||$.has(J.label??""),me=C===ne,ve=J.label??J.value;return g.jsxs("button",{"data-value":J.value,...ce({ref:ke=>{L.current[ne]=ke},role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":J.disabled,onClick:()=>Q(J,ne)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||me?"bg-floating-hover text-floating-foreground":""}`,children:[g.jsx(Xp,{onChange:Yo,checked:X,"aria-checked":X,onClick:ke=>{ke.stopPropagation(),Q(J,ne)}}),g.jsx(j,{...m,label:J.label,value:J.value,children:ve})]})}})}),g.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:$.size===0?g.jsx(la,{theme:"muted",size:"small",children:I.autocompleteEmpty}):be})]})})}):null})]})}),X4=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},Q4={Item:S.forwardRef(function(t,n){return g.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return g.jsx("ul",{...t,ref:n,className:"space-y-3"})})},J4=e=>{const t=S.useRef(null),n=X4(t);return g.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[g.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:[g.jsx("header",{className:"border-b border-card-border pb-2"}),g.jsxs("div",{className:"px-8 space-y-2",children:[g.jsx(Ko,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),g.jsx(Lp,{height:n,useWindowScroll:!0,data:e.source,components:Q4,itemContent:(r,o)=>g.jsx(S.Fragment,{children:g.jsx(Xp,{children:g.jsx(e.Item,{data:o})})})})]})]}),g.jsx("div",{children:g.jsx(yr,{children:g.jsx(Au,{})})}),g.jsx("div",{})]})};function e3(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 t3=({children:e,...t})=>{const n=Fr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:e3(r.current));return S.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return a.observe(s),()=>a.disconnect()},[]),g.jsx("div",{...t,ref:r,children:o?e:null})},mc=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(mc.displayName="ToastContext");function Ih(){const e=P.useContext(mc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":On(73));return e}var n3=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $T(e,t){if(e){if(typeof e=="string")return Sh(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 Sh(e,t)}}function Sh(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 w4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function S4(e){if(Array.isArray(e))return e}function zT(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 St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zT(Object(n),!0).forEach(function(r){Th(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Th(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pc(e,t){if(e==null)return{};var n=T4(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 T4(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 Eh=S.forwardRef(function(e,t){var n=e.children,r=pc(e,p4),o=RT(r),i=o.open,s=pc(o,h4);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(St(St({},s),{},{open:i})))});Eh.displayName="Dropzone";var jT={disabled:!1,getFilesFromEvent:DB,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};Eh.defaultProps=jT,Eh.propTypes={children:yt.func,accept:yt.objectOf(yt.arrayOf(yt.string)),multiple:yt.bool,preventDropOnDocument:yt.bool,noClick:yt.bool,noKeyboard:yt.bool,noDrag:yt.bool,noDragEventsBubbling:yt.bool,minSize:yt.number,maxSize:yt.number,maxFiles:yt.number,disabled:yt.bool,getFilesFromEvent:yt.func,onFileDialogCancel:yt.func,onFileDialogOpen:yt.func,useFsAccessApi:yt.bool,autoFocus:yt.bool,onDragEnter:yt.func,onDragLeave:yt.func,onDragOver:yt.func,onDrop:yt.func,onDropAccepted:yt.func,onDropRejected:yt.func,onError:yt.func,validator:yt.func};var kh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function RT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=St(St({},jT),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,y=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,k=t.onError,A=t.validator,O=S.useMemo(function(){return u4(n)},[n]),N=S.useMemo(function(){return c4(n)},[n]),M=S.useMemo(function(){return typeof m=="function"?m:BT},[m]),$=S.useMemo(function(){return typeof y=="function"?y:BT},[y]),_=S.useRef(null),F=S.useRef(null),z=S.useReducer(E4,kh),D=wh(z,2),C=D[0],V=D[1],L=C.isFocused,B=C.isFileDialogActive,U=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&l4()),G=function(){!U.current&&B&&setTimeout(function(){if(F.current){var X=F.current.files;X.length||(V({type:"closeDialog"}),$())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[F,B,$,U]);var H=S.useRef([]),ee=S.useRef([]),ie=function(X){_.current&&_.current.contains(X.target)||(X.preventDefault(),H.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",NT,!1),document.addEventListener("drop",ie,!1)),function(){x&&(document.removeEventListener("dragover",NT),document.removeEventListener("drop",ie))}},[_,x]),S.useEffect(function(){var j=function(De){ee.current=[].concat(VT(ee.current),[De.target]),Ks(De)&&V({isDragGlobal:!0,type:"setDragGlobal"})},X=function(De){ee.current=ee.current.filter(function(Ne){return Ne!==De.target&&Ne!==null}),!(ee.current.length>0)&&V({isDragGlobal:!1,type:"setDragGlobal"})},me=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})},ve=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",j,!1),document.addEventListener("dragleave",X,!1),document.addEventListener("dragend",me,!1),document.addEventListener("drop",ve,!1),function(){document.removeEventListener("dragenter",j),document.removeEventListener("dragleave",X),document.removeEventListener("dragend",me),document.removeEventListener("drop",ve)}},[_]),S.useEffect(function(){return!r&&b&&_.current&&_.current.focus(),function(){}},[_,b,r]);var te=S.useCallback(function(j){k?k(j):console.error(j)},[k]),q=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[].concat(VT(H.current),[j.target]),Ks(j)&&Promise.resolve(o(j)).then(function(X){if(!(fc(j)&&!w)){var me=X.length,ve=me>0&&o4({files:X,accept:O,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:A}),ke=me>0&&!ve;V({isDragAccept:ve,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(X){return te(X)})},[o,c,te,w,O,s,i,a,l,A]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=Ks(j);if(X&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return X&&d&&d(j),!1},[d,w]),Z=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=H.current.filter(function(ve){return _.current&&_.current.contains(ve)}),me=X.indexOf(j.target);me!==-1&&X.splice(me,1),H.current=X,!(X.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ks(j)&&u&&u(j))},[_,u,w]),pe=S.useCallback(function(j,X){var me=[],ve=[];j.forEach(function(ke){var De=MT(ke,O),Ne=wh(De,2),ct=Ne[0],Nt=Ne[1],Qt=DT(ke,s,i),Re=wh(Qt,2),W=Re[0],K=Re[1],Oe=A?A(ke):null;if(ct&&W&&!Oe)me.push(ke);else{var Ue=[Nt,K];Oe&&(Ue=Ue.concat(Oe)),ve.push({file:ke,errors:Ue.filter(function(Ye){return Ye})})}}),(!a&&me.length>1||a&&l>=1&&me.length>l)&&(me.forEach(function(ke){ve.push({file:ke,errors:[n4]})}),me.splice(0)),V({acceptedFiles:me,fileRejections:ve,type:"setFiles"}),f&&f(me,ve,X),ve.length>0&&h&&h(ve,X),me.length>0&&p&&p(me,X)},[V,a,O,s,i,l,f,p,h,A]),R=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[],Ks(j)&&Promise.resolve(o(j)).then(function(X){fc(j)&&!w||pe(X,j)}).catch(function(X){return te(X)}),V({type:"reset"})},[o,pe,te,w]),ae=S.useCallback(function(){if(U.current){V({type:"openDialog"}),M();var j={multiple:a,types:N};window.showOpenFilePicker(j).then(function(X){return o(X)}).then(function(X){pe(X,null),V({type:"closeDialog"})}).catch(function(X){d4(X)?($(X),V({type:"closeDialog"})):f4(X)?(U.current=!1,F.current?(F.current.value=null,F.current.click()):te(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."))):te(X)});return}F.current&&(V({type:"openDialog"}),M(),F.current.value=null,F.current.click())},[V,M,$,v,pe,te,N,a]),ce=S.useCallback(function(j){!_.current||!_.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),ae())},[_,ae]),Q=S.useCallback(function(){V({type:"focus"})},[]),ue=S.useCallback(function(){V({type:"blur"})},[]),re=S.useCallback(function(){T||(a4()?setTimeout(ae,0):ae())},[T,ae]),he=function(X){return r?null:X},oe=function(X){return E?null:he(X)},le=function(X){return I?null:he(X)},be=function(X){w&&X.stopPropagation()},de=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.role,ke=j.onKeyDown,De=j.onFocus,Ne=j.onBlur,ct=j.onClick,Nt=j.onDragEnter,Qt=j.onDragOver,Re=j.onDragLeave,W=j.onDrop,K=pc(j,m4);return St(St(Th({onKeyDown:oe(ar(ke,ce)),onFocus:oe(ar(De,Q)),onBlur:oe(ar(Ne,ue)),onClick:he(ar(ct,re)),onDragEnter:le(ar(Nt,q)),onDragOver:le(ar(Qt,Y)),onDragLeave:le(ar(Re,Z)),onDrop:le(ar(W,R)),role:typeof ve=="string"&&ve!==""?ve:"presentation"},me,_),!r&&!E?{tabIndex:0}:{}),K)}},[_,ce,Q,ue,re,q,Y,Z,R,E,I,r]),ne=S.useCallback(function(j){j.stopPropagation()},[]),J=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.onChange,ke=j.onClick,De=pc(j,g4),Ne=Th({accept:O,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:he(ar(ve,R)),onClick:he(ar(ke,ne)),tabIndex:-1},me,F);return St(St({},Ne),De)}},[F,n,a,R,r]);return St(St({},C),{},{isFocused:L&&!r,getRootProps:de,getInputProps:J,rootRef:_,inputRef:F,open:he(ae)})}function E4(e,t){switch(t.type){case"focus":return St(St({},e),{},{isFocused:!0});case"blur":return St(St({},e),{},{isFocused:!1});case"openDialog":return St(St({},kh),{},{isFileDialogActive:!0});case"closeDialog":return St(St({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return St(St({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return St(St({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return St(St({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return St({},kh);default:return e}}function BT(){}const HT=S.createContext([null,()=>{}]),k4=()=>S.useContext(HT),C4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,I4={csv:Mu,xls:Mu,mov:jg,mp4:jg,xlsx:Mu,pdf:zg,txt:zg,json:fI,mp3:aI},A4=e=>{const[,t]=k4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:C4(l),size:wB(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},s=I4[e.file.name.split(".").at(-1)]??Rg,a=n.type==="img"?g.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):g.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return g.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[g.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:a}),g.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[g.jsx("span",{children:e.file.name}),g.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?g.jsx("div",{className:"flex-1 min-w-full",children:g.jsx(e.File,{file:e.file})}):null]}),g.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:g.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:g.jsx(Lo,{size:16})})})]})},P4=e=>g.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>g.jsx(A4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),WT=e=>{const t=At(),n=e.dragging?pI:hI;return g.jsxs("div",{className:"flex flex-col justify-center items-center",children:[g.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:g.jsx(n,{className:"text-primary",size:80})}),g.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[g.jsx("p",{children:t.uploadIdle}),g.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},O4=e=>e.isDragActive?g.jsx(WT,{files:e.files,dragging:!0}):e.files.length>0?g.jsx(P4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):g.jsx(S.Fragment,{children:e.idle}),_4=g.jsx(WT,{dragging:!1}),M4=e=>{const t=e.item.file,n=e.item.type;return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),g.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?g.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?g.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?g.jsx("figure",{children:g.jsx("audio",{controls:!0,src:e.item.url})}):null]})},D4=({idle:e=_4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=At(),s=S.useState(null),[a,l]=S.useState([]),c=o.files??a,u=()=>s[1](null),d=y=>{r?.(y),l(m=>m.concat(y))},{getRootProps:f,getInputProps:p,isDragActive:h}=RT({onDrop:d});return g.jsxs(HT.Provider,{value:s,children:[g.jsx(Ws,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?g.jsx(M4,{item:s[0]}):null}),g.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[g.jsx("input",{...p(o),name:o.name,id:o.name}),g.jsx(O4,{File:n,onDeleteFile:t,isDragActive:h,idle:e,files:c})]})]})},qT=()=>window.matchMedia("@media (pointer: coarse)"),N4=()=>{const e=S.useRef(Dr()?null:qT()),[t,n]=S.useState(Dr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?qT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},UT=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=N4(),o=S.useRef(Dr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||vv())return;document.documentElement.style.padding=Sg(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,s=document.documentElement,a=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(Hk(c.style.height)):null,f=Be.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return s.addEventListener("wheel",a,{signal:i.signal,passive:!1}),s.addEventListener("scroll",a,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},F4=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((s,a)=>s===n?a:!1).filter(s=>s!==!1);if(r.length===0)return null;const o=[];if(r.forEach(s=>{let a=s+1;const l=[s];for(let c=1;c<t.length;c++){const u=t[c];if(a=e.indexOf(u,a),a===-1)return;l.push(a),a++}o.push(l)}),o.length===0)return null;const i=o.sort((s,a)=>{if(s.length===1)return s[0]-a[0];const l=s[s.length-1]-s[0],c=a[a.length-1]-a[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},GT=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},YT={basic:/[,[\]]+?/,extend:/[,[\].]+?/},KT=(e,t)=>{const n=GT(t,YT.basic,e);return n!==void 0&&n!==e?n:GT(t,YT.extend,e)},ZT=e=>e.replace(/[^0-9]/g,""),hc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),XT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?ZT(e).includes(ZT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?F4(e,t)!==null:!1,L4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>XT(e,o,n,r)):XT(e,t,n,r),Ch=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Be.array(i.value)?i.value.map(hc):hc(`${i.value}`)}));return e.forEach(i=>{const s=KT(i,t);o.forEach(a=>{const l=KT(i,a.key);if(!l)return;const c=hc(`${a.value}`.toLocaleLowerCase()).trim(),u=hc(`${l}`.toLocaleLowerCase()).trim();if(L4(u,c,a.score,a.match))return void r.set(s,i);Be.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},V4=e=>g.jsx(S.Fragment,{children:e.children}),$4={duration:200,open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0},initial:{transform:"scaleY(0)",opacity:.2}},z4=[],j4=S.forwardRef(function(t,n){return g.jsx(He.ul,{...t,ref:n,className:"overscroll-contain w-full max-h-96 rounded-lg",children:g.jsx(mn,{children:t.children})})}),R4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(He.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),B4={List:j4,Item:R4},Pi=40,H4=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:s,interactive:a,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:h=!1,...y},m)=>{const v=S.useRef(null),b=S.useRef(null),x=S.useRef(null),T=y.value??y.defaultValue??"",E=At(),[I,w]=S.useState(()=>Math.min(320,Pi*o.length)),[k,A]=S.useState(!1),[O,N]=S.useState(""),[M,$]=S.useState(T),[_,F]=S.useState(()=>o.find(j=>j.value===T)?.label??T),[z,D]=S.useState(null),C=S.useRef(z4),V=UT(k,"block-only"),L=h&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...o]:o,B=()=>Ri.flushSync(()=>A(!0)),U=O?Ch(L,"value",[{key:"value",value:O},{key:"label",value:O}]):L,G=()=>{A(!1),w(0)},H=U.filter(j=>j.hidden!==!0),ee=h?void 0:`^(${o.map(j=>`${pd(j.value)}${j.label?"|"+pd(j.label):""}`).join("|")})$`,{x:ie,y:te,strategy:q,refs:Y,context:Z,placement:pe}=Gn({open:k,transform:!0,onOpenChange:A,placement:"bottom-start",whileElementsMounted:io,middleware:[Ho(4),My({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),_y({padding:10,elementContext:"reference",apply(j){const me=j.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ve=Wi(Y.reference.current,window.innerHeight),ke=Math.min(me<Pi?ve:me,ve,j.availableHeight),De=H.length===0?Pi:Math.min(ke,ve,me),Ne=`${b.current.getBoundingClientRect().width}px`;Object.assign(j.elements.floating.style,{width:Ne,maxWidth:Ne,height:De})}})]}),R=uv(Z,$4),{getReferenceProps:ae,getFloatingProps:ce,getItemProps:Q}=Yn([gr(Z,{role:"listbox"}),Mr(Z),Ya(Z,{cols:0,listRef:C,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(y.value){const j=o.find(X=>X.value===y.value);j&&(F(j.label??j.value),$(y.value))}},[y.value,o.length]),S.useEffect(()=>{if(!k)return w(0);const j=Y.reference;if(j.current===null)return;const X=Wi(j.current,window.innerHeight);setTimeout(()=>w(Math.min(X,H.length*Pi)),100)},[O,k,Y.reference,H.length]),S.useEffect(()=>{const j=Y.reference.current;if(j)return Hi(j)},[]);const ue=(j,X)=>{$(j.value);const me=Y.reference.current;if(!me)return;me?.setAttribute("data-value",j.value),me.value=j.value;const ve=new Event("change",{bubbles:!1,cancelable:!0});me.dispatchEvent(ve),y.onChange&&y.onChange(ve),F(j.label??""),G(),N(""),D(X)},re=j=>{const X=j.target.value;return N(X),!k&&X===""?A(!0):(j.target.name=y.name||"",X?A(!0):y.onChange?.(j))},he=()=>{B(),N(""),Y.reference.current?.focus()},oe=()=>{D(j=>j===null?0:j),B(),N("")},le=()=>{Y.reference.current?.setAttribute("data-value",""),N(""),$(""),F(""),wg(Y.reference.current),G()},be=y.id||y.name,de=`${be}-shadow`,ne=H.length===0,J=pe==="top"||pe==="top-start";return g.jsxs(rs,{...y,left:e,error:t,ref:b,form:y.form,loading:r,name:y.name,feedback:k&&J?y.title:d,hideLeft:f,required:p,title:y.title,container:i,rightLabel:s,interactive:a,id:de,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:y.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:he,children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),M?g.jsx("button",{type:"button",onClick:le,className:"p-2 transition-colors md:p-1 link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.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:[g.jsx("input",{"data-shadow":"true",...ae({...y,onFocus:oe,pattern:ee,onChange:re,id:de,name:de,ref:Y.setReference,onClick:j=>j.currentTarget.focus(),onKeyDown(j){if(j.key==="Escape")return j.currentTarget.blur(),G();if(k){if(j.key==="ArrowDown"){let X=Be.number(z)?z+1:0;return X>H.length-1&&(X=0),x.current?.scrollIntoView({index:X}),D(X)}if(j.key==="ArrowUp"){let X=Be.number(z)?z-1:H.length-1;return X<0&&(X=H.length-1),x.current?.scrollIntoView({index:X}),D(X)}if(j.key==="Enter"){if(z!==null&&H[z])return j.preventDefault(),ue(H[z],z);if(H.length===1)return j.preventDefault(),ue(H[0],0)}}}}),"data-value":M,"data-error":!!t,"data-name":be,"data-target":be,required:p,value:k?O:o.length===0?"":_||M,"aria-autocomplete":"list",autoComplete:"off",className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",y.className)}),g.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:m,required:p,defaultValue:y.value||M||void 0}),g.jsx(mr,{preserveTabOrder:!0,children:k?g.jsx(lo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs(He.div,{...ce({ref:dr(V,Y.setFloating),style:{...R.styles,left:ie,top:te??0,position:q,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:ne?"auto":I},className:Pe("overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",J?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!k)return w(0);const X=Y.floating.current.querySelectorAll("li").item(0),me=(X?X.getBoundingClientRect().height:Pi)*H.length;return Ri.flushSync(()=>w(me+2))},children:[ne?g.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||E.autocompleteEmpty})}):null,g.jsx(Lp,{overscan:40,ref:x,hidden:ne,data:H,style:{height:I},defaultItemHeight:Pi,components:B4,scrollerRef:j=>{v.current=j},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(j,X)=>{const me=X.Render??V4,ve=M===X.value||M===X.label,ke=z===j,De=X.label??X.value;return g.jsx("button",{"data-value":X.value,...Q({ref:Ne=>{C.current[j]=Ne},role:"option",type:"button","aria-checked":ve,"aria-current":ve,"aria-selected":ve,"aria-busy":X.disabled,onClick:()=>ue(X,j),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ve?"bg-primary-hover text-primary-foreground":""} ${ke?"bg-floating-hover text-floating-foreground":""}`}),children:g.jsx(me,{...y,label:X.label,value:X.value,children:De})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const QT=40,W4=e=>g.jsx(S.Fragment,{children:e.children}),q4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},JT=[],U4=S.forwardRef(function(t,n){return g.jsx(He.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:g.jsx(mn,{children:t.children})})}),G4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(He.li,{...r,ref:o,className:"last:rounded-t-lg"})}),Y4={List:U4,Item:G4},K4=e=>{const t=At(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const s=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>s.width)return i(!0)},[r]),g.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?g.jsxs(la,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},Z4=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:s,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:h=!1,onChangeOptions:y,...m},v)=>{const b=S.useMemo(()=>new zn(r.map(ne=>[ne.value,ne])),[r]),x=S.useRef(null),T=S.useRef(null),E=m.value??m.defaultValue??JT,I=At(),[w,k]=S.useState(0),[A,O]=S.useState(!1),[N,M]=S.useState(""),[$,_]=S.useState(()=>{const ne=new zn;return E.forEach(J=>{const j=b.get(J);return j?ne.set(J,j):void 0}),ne}),F=S.useMemo(()=>Array.from($.keys()),[$]),[z,D]=S.useState(()=>{const ne=new Set(E);return r.reduce((J,j)=>ne.has(j.value)?[...J,j.label??j.value]:J,[])??E}),[C,V]=S.useState(null),L=S.useRef(JT),B=h&&N!==""?[{value:N,label:N,"data-dynamic":"true"},...r]:r,U=N.length===0?B:Ch(B,"value",[{key:"value",value:N},{key:"label",value:N}]),G=UT(A,"block-only"),H=U.filter(ne=>ne.hidden!==!0),ee=H.length===0,{x:ie,y:te,strategy:q,refs:Y,context:Z}=Gn({open:A,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:O,whileElementsMounted:io,middleware:[Ho(4),_y({padding:10,elementContext:"reference",apply(ne){const j=ne.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,X=Wi(Y.reference.current,window.innerHeight),me=Math.min(j<QT?X:j,X,ne.availableHeight),ve=H.length===0?QT:Math.min(me,X,j),ke=`${x.current.getBoundingClientRect().width}px`;Object.assign(ne.elements.floating.style,{width:ke,maxWidth:ke,height:ve})}})]}),pe=uv(Z,q4),{getReferenceProps:R,getFloatingProps:ae,getItemProps:ce}=Yn([gr(Z,{role:"listbox"}),Mr(Z),Ya(Z,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:C,selectedIndex:C,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ne=>V(J=>ne??J)})]);S.useEffect(()=>{if(!A)return k(0);const ne=Y.reference;if(ne.current===null)return;const J=Wi(ne.current,window.innerHeight);setTimeout(()=>k(Math.min(J,H.length*40)),100)},[N,A,Y.reference]),S.useEffect(()=>{m.value&&_(new zn(m.value.map(ne=>[ne,b.get(ne)])))},[m.value,b]),S.useEffect(()=>{const ne=Y.reference.current;if(ne)return Hi(ne)},[]);const Q=(ne,J)=>{const j=$.clone(ve=>ve.has(ne.value)?ve.remove(ne.value):ve.set(ne.value,ne));_(j);const X=Y.reference.current;if(!X)return;const me=j.map(ve=>ve.value);X?.setAttribute("data-value",JSON.stringify(me)),y&&y(me),D(ve=>ve.concat(ne.label??"")),M(""),V(J)},ue=ne=>{const J=ne.target.value;return M(J),!A&&J===""?O(!0):(ne.target.name=m.name||"",J?O(!0):void 0)},re=()=>{O(!0),M(""),Y.reference.current?.focus()},he=()=>{O(!0),M("")},oe=()=>{Y.reference.current?.setAttribute("data-value","[]"),M(""),O(!1),_(new zn),y?.([])},le=m.id||m.name,be=$.map((ne,J)=>g.jsx(la,{size:"small",icon:g.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:j=>{j.preventDefault(),j.stopPropagation(),Q(ne,J)},children:g.jsx(Lo,{size:14})}),children:ne.label??ne.value},`MultiSelect-${ne.value}-x`)),de={height:ee?"0":$.size===0?w-49:w-86};return g.jsxs(rs,{...m,left:e,error:t,ref:x,form:m.form,name:m.name,feedback:d,hideLeft:f,required:p,title:m.title,container:o,rightLabel:i,interactive:s,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:re,children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),$?g.jsx("button",{type:"button",onClick:oe,className:"transition-colors link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.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:[g.jsxs("ul",{...R({...m,onFocus:he,id:`${le}-shadow`,name:`${le}-shadow`,ref:Y.setReference}),tabIndex:0,role:"button","data-name":le,"data-target":le,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":F.join(","),className:Pe("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[F.length>0?null:g.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),g.jsx(K4,{label:c,children:be})]}),g.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:v,required:p,defaultValue:m.value||F||void 0}),g.jsx(mr,{preserveTabOrder:!0,children:A?g.jsx(ld,{lockScroll:!0,children:g.jsx(lo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs("div",{...ae({ref:Y.setFloating,style:{...pe.styles,top:te??0,position:q,left:ie,height:w-(F.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[g.jsx("input",{autoFocus:!0,value:N,onChange:ue,title:m.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:ne=>{if(ne.key==="ArrowDown"){let J=C+1;return J>H.length-1&&(J=0),T.current?.scrollIntoView({index:J}),V(J)}if(ne.key==="ArrowUp"){let J=C-1;return J<0&&(J=H.length-1),T.current?.scrollIntoView({index:J}),V(J)}if(ne.key==="Escape")return ne.currentTarget.blur(),O(!1);if(ne.key==="Enter"){if(C!==null&&H[C])return ne.preventDefault(),Q(H[C],C);if(H.length===1)return ne.preventDefault(),Q(H[0],0)}}}),ee?g.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:a||I.autocompleteEmpty})}):null,ee?null:g.jsx(He.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:ee?"auto":w},style:de,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!A)return k(0);const J=Y.floating.current.querySelectorAll("li").item(0),j=(J?J.getBoundingClientRect().height:40)*H.length;return Ri.flushSync(()=>k(j+2))},children:g.jsx(Lp,{ref:T,hidden:ee,data:H,components:Y4,style:de,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(ne,J)=>{const j=J.Render??W4,X=$.has(J.value)||$.has(J.label??""),me=C===ne,ve=J.label??J.value;return g.jsxs("button",{"data-value":J.value,...ce({ref:ke=>{L.current[ne]=ke},role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":J.disabled,onClick:()=>Q(J,ne)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||me?"bg-floating-hover text-floating-foreground":""}`,children:[g.jsx(Xp,{onChange:Yo,checked:X,"aria-checked":X,onClick:ke=>{ke.stopPropagation(),Q(J,ne)}}),g.jsx(j,{...m,label:J.label,value:J.value,children:ve})]})}})}),g.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:$.size===0?g.jsx(la,{theme:"muted",size:"small",children:I.autocompleteEmpty}):be})]})})}):null})]})}),X4=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},Q4={Item:S.forwardRef(function(t,n){return g.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return g.jsx("ul",{...t,ref:n,className:"space-y-3"})})},J4=e=>{const t=S.useRef(null),n=X4(t);return g.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[g.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:[g.jsx("header",{className:"border-b border-card-border pb-2"}),g.jsxs("div",{className:"px-8 space-y-2",children:[g.jsx(Ko,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),g.jsx(Lp,{height:n,useWindowScroll:!0,data:e.source,components:Q4,itemContent:(r,o)=>g.jsx(S.Fragment,{children:g.jsx(Xp,{children:g.jsx(e.Item,{data:o})})})})]})]}),g.jsx("div",{children:g.jsx(yr,{children:g.jsx(Au,{})})}),g.jsx("div",{})]})};function e3(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 t3=({children:e,...t})=>{const n=Fr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:e3(r.current));return S.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return a.observe(s),()=>a.disconnect()},[]),g.jsx("div",{...t,ref:r,children:o?e:null})},mc=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(mc.displayName="ToastContext");function Ih(){const e=P.useContext(mc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":On(73));return e}var n3=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
22
22
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
23
23
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
24
24
|
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},r3=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(!(a.apply(null,i)===a.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|