@g4rcez/components 0.0.62 → 0.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(X,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],w):(X=typeof globalThis<"u"?globalThis:X||self,w(X.components={},X.React,X["react/jsx-runtime"],X.ReactDOM))})(this,function(X,w,x,va){"use strict";var g2=Object.defineProperty;var y2=(X,w,x)=>w in X?g2(X,w,{enumerable:!0,configurable:!0,writable:!0,value:x}):X[w]=x;var ne=(X,w,x)=>y2(X,typeof w!="symbol"?w+"":w,x);function xf(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 C=xf(w),No=xf(va);function Tf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Tf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function O0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Tf(e))&&(r&&(r+=" "),r+=t);return r}const Sf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ef=O0,Sr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ef(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const h=Sf(u)||Sf(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...d}=u;return Object.entries(d).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...s,...a}[m]):{...s,...a}[m]===g})?[...c,f,h]:c},[]);return Ef(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Cf(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=Cf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function D0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Cf(e))&&(r&&(r+=" "),r+=t);return r}var Pf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function M0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function k0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var F0=Error,N0=EvalError,L0=RangeError,_0=ReferenceError,If=SyntaxError,Lo=TypeError,V0=URIError,$0=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(n 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 i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},Af=typeof Symbol<"u"&&Symbol,B0=$0,R0=function(){return typeof Af!="function"||typeof Symbol!="function"||typeof Af("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:B0()},ba={__proto__:null,foo:{}},j0=Object,W0=function(){return{__proto__:ba}.foo===ba.foo&&!(ba instanceof j0)},H0="Function.prototype.bind called on incompatible ",z0=Object.prototype.toString,U0=Math.max,G0="[object Function]",Of=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},Y0=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},K0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},q0=function(t){var n=this;if(typeof n!="function"||z0.apply(n)!==G0)throw new TypeError(H0+n);for(var r=Y0(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Of(r,arguments));return Object(u)===u?u:this}return n.apply(t,Of(r,arguments))},i=U0(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+K0(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},X0=q0,wa=Function.prototype.bind||X0,Q0=Function.prototype.call,Z0=Object.prototype.hasOwnProperty,J0=wa,ew=J0.call(Q0,Z0),pe,tw=F0,nw=N0,rw=L0,ow=_0,Er=If,Cr=Lo,sw=V0,Df=Function,xa=function(e){try{return Df('"use strict"; return ('+e+").constructor;")()}catch{}},Zn=Object.getOwnPropertyDescriptor;if(Zn)try{Zn({},"")}catch{Zn=null}var Ta=function(){throw new Cr},iw=Zn?function(){try{return arguments.callee,Ta}catch{try{return Zn(arguments,"callee").get}catch{return Ta}}}():Ta,Pr=R0(),aw=W0(),ut=Object.getPrototypeOf||(aw?function(e){return e.__proto__}:null),Ir={},lw=typeof Uint8Array>"u"||!ut?pe:ut(Uint8Array),Jn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pe:ArrayBuffer,"%ArrayIteratorPrototype%":Pr&&ut?ut([][Symbol.iterator]()):pe,"%AsyncFromSyncIteratorPrototype%":pe,"%AsyncFunction%":Ir,"%AsyncGenerator%":Ir,"%AsyncGeneratorFunction%":Ir,"%AsyncIteratorPrototype%":Ir,"%Atomics%":typeof Atomics>"u"?pe:Atomics,"%BigInt%":typeof BigInt>"u"?pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":tw,"%eval%":eval,"%EvalError%":nw,"%Float32Array%":typeof Float32Array>"u"?pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pe:FinalizationRegistry,"%Function%":Df,"%GeneratorFunction%":Ir,"%Int8Array%":typeof Int8Array>"u"?pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Pr&&ut?ut(ut([][Symbol.iterator]())):pe,"%JSON%":typeof JSON=="object"?JSON:pe,"%Map%":typeof Map>"u"?pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Pr||!ut?pe:ut(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pe:Promise,"%Proxy%":typeof Proxy>"u"?pe:Proxy,"%RangeError%":rw,"%ReferenceError%":ow,"%Reflect%":typeof Reflect>"u"?pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Pr||!ut?pe:ut(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Pr&&ut?ut(""[Symbol.iterator]()):pe,"%Symbol%":Pr?Symbol:pe,"%SyntaxError%":Er,"%ThrowTypeError%":iw,"%TypedArray%":lw,"%TypeError%":Cr,"%Uint8Array%":typeof Uint8Array>"u"?pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pe:Uint32Array,"%URIError%":sw,"%WeakMap%":typeof WeakMap>"u"?pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pe:WeakSet};if(ut)try{null.error}catch(e){var cw=ut(ut(e));Jn["%Error.prototype%"]=cw}var uw=function e(t){var n;if(t==="%AsyncFunction%")n=xa("async function () {}");else if(t==="%GeneratorFunction%")n=xa("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=xa("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ut&&(n=ut(o.prototype))}return Jn[t]=n,n},Mf={__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"]},_o=wa,Ls=ew,fw=_o.call(Function.call,Array.prototype.concat),dw=_o.call(Function.apply,Array.prototype.splice),kf=_o.call(Function.call,String.prototype.replace),_s=_o.call(Function.call,String.prototype.slice),hw=_o.call(Function.call,RegExp.prototype.exec),pw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mw=/\\(\\)?/g,gw=function(t){var n=_s(t,0,1),r=_s(t,-1);if(n==="%"&&r!=="%")throw new Er("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Er("invalid intrinsic syntax, expected opening `%`");var o=[];return kf(t,pw,function(s,i,a,l){o[o.length]=a?kf(l,mw,"$1"):i||s}),o},yw=function(t,n){var r=t,o;if(Ls(Mf,r)&&(o=Mf[r],r="%"+o[0]+"%"),Ls(Jn,r)){var s=Jn[r];if(s===Ir&&(s=uw(r)),typeof s>"u"&&!n)throw new Cr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Er("intrinsic "+t+" does not exist!")},Ar=function(t,n){if(typeof t!="string"||t.length===0)throw new Cr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Cr('"allowMissing" argument must be a boolean');if(hw(/^%?[^%]*%?$/,t)===null)throw new Er("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=gw(t),o=r.length>0?r[0]:"",s=yw("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],dw(r,fw([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var h=r[u],d=_s(h,0,1),p=_s(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new Er("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),o+="."+h,i="%"+o+"%",Ls(Jn,i))a=Jn[i];else if(a!=null){if(!(h in a)){if(!n)throw new Cr("base intrinsic for "+t+" exists, but the property is not available.");return}if(Zn&&u+1>=r.length){var m=Zn(a,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else f=Ls(a,h),a=a[h];f&&!l&&(Jn[i]=a)}}return a},Ff={exports:{}},Sa,Nf;function Ea(){if(Nf)return Sa;Nf=1;var e=Ar,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Sa=t,Sa}var vw=Ar,Vs=vw("%Object.getOwnPropertyDescriptor%",!0);if(Vs)try{Vs([],"length")}catch{Vs=null}var Lf=Vs,_f=Ea(),bw=If,Or=Lo,Vf=Lf,ww=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Or("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Or("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Or("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Or("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Or("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Or("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Vf&&Vf(t,n);if(_f)_f(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new bw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ca=Ea(),$f=function(){return!!Ca};$f.hasArrayLengthDefineBug=function(){if(!Ca)return null;try{return Ca([],"length",{value:1}).length!==1}catch{return!0}};var xw=$f,Tw=Ar,Bf=ww,Sw=xw(),Rf=Lf,jf=Lo,Ew=Tw("%Math.floor%"),Cw=function(t,n){if(typeof t!="function")throw new jf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Ew(n)!==n)throw new jf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&Rf){var i=Rf(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(Sw?Bf(t,"length",n,!0,!0):Bf(t,"length",n)),t};(function(e){var t=wa,n=Ar,r=Cw,o=Lo,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Ea(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var d=a(t,i,arguments);return r(d,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(Ff);var Pw=Ff.exports,Wf=Ar,Hf=Pw,Iw=Hf(Wf("String.prototype.indexOf")),Aw=function(t,n){var r=Wf(t,!!n);return typeof r=="function"&&Iw(t,".prototype.")>-1?Hf(r):r};const Ow=k0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Pa=typeof Map=="function"&&Map.prototype,Ia=Object.getOwnPropertyDescriptor&&Pa?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$s=Pa&&Ia&&typeof Ia.get=="function"?Ia.get:null,zf=Pa&&Map.prototype.forEach,Aa=typeof Set=="function"&&Set.prototype,Oa=Object.getOwnPropertyDescriptor&&Aa?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Bs=Aa&&Oa&&typeof Oa.get=="function"?Oa.get:null,Uf=Aa&&Set.prototype.forEach,Dw=typeof WeakMap=="function"&&WeakMap.prototype,Vo=Dw?WeakMap.prototype.has:null,Mw=typeof WeakSet=="function"&&WeakSet.prototype,$o=Mw?WeakSet.prototype.has:null,kw=typeof WeakRef=="function"&&WeakRef.prototype,Gf=kw?WeakRef.prototype.deref:null,Fw=Boolean.prototype.valueOf,Nw=Object.prototype.toString,Lw=Function.prototype.toString,_w=String.prototype.match,Da=String.prototype.slice,Cn=String.prototype.replace,Vw=String.prototype.toUpperCase,Yf=String.prototype.toLowerCase,Kf=RegExp.prototype.test,qf=Array.prototype.concat,Xt=Array.prototype.join,$w=Array.prototype.slice,Xf=Math.floor,Ma=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ka=Object.getOwnPropertySymbols,Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Dr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Dr||!0)?Symbol.toStringTag:null,Qf=Object.prototype.propertyIsEnumerable,Zf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Jf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Kf.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Xf(-e):Xf(e);if(r!==e){var o=String(r),s=Da.call(t,o.length+1);return Cn.call(o,n,"$&_")+"."+Cn.call(Cn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Cn.call(t,n,"$&_")}var Na=Ow,ed=Na.custom,td=od(ed)?ed:null,Bw=function e(t,n,r,o){var s=n||{};if(Pn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Pn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Pn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Pn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Pn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return id(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Jf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Jf(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return La(t)?"[Array]":"[Object]";var f=rx(s,r);if(typeof o>"u")o=[];else if(sd(o,t)>=0)return"[Circular]";function h(L,P,D){if(P&&(o=$w.call(o),o.push(P)),D){var N={depth:s.depth};return Pn(s,"quoteStyle")&&(N.quoteStyle=s.quoteStyle),e(L,N,r+1,o)}return e(L,s,r+1,o)}if(typeof t=="function"&&!rd(t)){var d=Kw(t),p=Rs(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+Xt.call(p,", ")+" }":"")}if(od(t)){var m=Dr?Cn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Fa.call(t);return typeof t=="object"&&!Dr?Bo(m):m}if(ex(t)){for(var g="<"+Yf.call(String(t.nodeName)),y=t.attributes||[],b=0;b<y.length;b++)g+=" "+y[b].name+"="+nd(Rw(y[b].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Yf.call(String(t.nodeName))+">",g}if(La(t)){if(t.length===0)return"[]";var v=Rs(t,h);return f&&!nx(v)?"["+Va(v,f)+"]":"[ "+Xt.call(v,", ")+" ]"}if(Ww(t)){var S=Rs(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Qf.call(t,"cause")?"{ ["+String(t)+"] "+Xt.call(qf.call("[cause]: "+h(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Xt.call(S,", ")+" }"}if(typeof t=="object"&&i){if(td&&typeof t[td]=="function"&&Na)return Na(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(qw(t)){var T=[];return zf&&zf.call(t,function(L,P){T.push(h(P,t,!0)+" => "+h(L,t))}),ad("Map",$s.call(t),T,f)}if(Zw(t)){var E=[];return Uf&&Uf.call(t,function(L){E.push(h(L,t))}),ad("Set",Bs.call(t),E,f)}if(Xw(t))return _a("WeakMap");if(Jw(t))return _a("WeakSet");if(Qw(t))return _a("WeakRef");if(zw(t))return Bo(h(Number(t)));if(Gw(t))return Bo(h(Ma.call(t)));if(Uw(t))return Bo(Fw.call(t));if(Hw(t))return Bo(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Pf<"u"&&t===Pf)return"{ [object globalThis] }";if(!jw(t)&&!rd(t)){var I=Rs(t,h),A=Zf?Zf(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",O=!A&&bt&&Object(t)===t&&bt in t?Da.call(In(t),8,-1):k?"Object":"",_=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=_+(O||k?"["+Xt.call(qf.call([],O||[],k||[]),": ")+"] ":"");return I.length===0?F+"{}":f?F+"{"+Va(I,f)+"}":F+"{ "+Xt.call(I,", ")+" }"}return String(t)};function nd(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Rw(e){return Cn.call(String(e),/"/g,"&quot;")}function La(e){return In(e)==="[object Array]"&&(!bt||!(typeof e=="object"&&bt in e))}function jw(e){return In(e)==="[object Date]"&&(!bt||!(typeof e=="object"&&bt in e))}function rd(e){return In(e)==="[object RegExp]"&&(!bt||!(typeof e=="object"&&bt in e))}function Ww(e){return In(e)==="[object Error]"&&(!bt||!(typeof e=="object"&&bt in e))}function Hw(e){return In(e)==="[object String]"&&(!bt||!(typeof e=="object"&&bt in e))}function zw(e){return In(e)==="[object Number]"&&(!bt||!(typeof e=="object"&&bt in e))}function Uw(e){return In(e)==="[object Boolean]"&&(!bt||!(typeof e=="object"&&bt in e))}function od(e){if(Dr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Fa)return!1;try{return Fa.call(e),!0}catch{}return!1}function Gw(e){if(!e||typeof e!="object"||!Ma)return!1;try{return Ma.call(e),!0}catch{}return!1}var Yw=Object.prototype.hasOwnProperty||function(e){return e in this};function Pn(e,t){return Yw.call(e,t)}function In(e){return Nw.call(e)}function Kw(e){if(e.name)return e.name;var t=_w.call(Lw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function sd(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function qw(e){if(!$s||!e||typeof e!="object")return!1;try{$s.call(e);try{Bs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Xw(e){if(!Vo||!e||typeof e!="object")return!1;try{Vo.call(e,Vo);try{$o.call(e,$o)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Qw(e){if(!Gf||!e||typeof e!="object")return!1;try{return Gf.call(e),!0}catch{}return!1}function Zw(e){if(!Bs||!e||typeof e!="object")return!1;try{Bs.call(e);try{$s.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Jw(e){if(!$o||!e||typeof e!="object")return!1;try{$o.call(e,$o);try{Vo.call(e,Vo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ex(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function id(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return id(Da.call(e,0,t.maxStringLength),t)+r}var o=Cn.call(Cn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,tx);return nd(o,"single",t)}function tx(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Vw.call(t.toString(16))}function Bo(e){return"Object("+e+")"}function _a(e){return e+" { ? }"}function ad(e,t,n,r){var o=r?Va(n,r):Xt.call(n,", ");return e+" ("+t+") {"+o+"}"}function nx(e){for(var t=0;t<e.length;t++)if(sd(e[t],`
2
- `)>=0)return!1;return!0}function rx(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Xt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Xt.call(Array(t+1),n)}}function Va(e,t){if(e.length===0)return"";var n=`
3
- `+t.prev+t.base;return n+Xt.call(e,","+n)+`
4
- `+t.prev}function Rs(e,t){var n=La(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Pn(e,o)?t(e[o],e):""}var s=typeof ka=="function"?ka(e):[],i;if(Dr){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Pn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Dr&&i["$"+l]instanceof Symbol||(Kf.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof ka=="function")for(var c=0;c<s.length;c++)Qf.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var ld=Ar,Mr=Aw,ox=Bw,sx=Lo,js=ld("%WeakMap%",!0),Ws=ld("%Map%",!0),ix=Mr("WeakMap.prototype.get",!0),ax=Mr("WeakMap.prototype.set",!0),lx=Mr("WeakMap.prototype.has",!0),cx=Mr("Map.prototype.get",!0),ux=Mr("Map.prototype.set",!0),fx=Mr("Map.prototype.has",!0),$a=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},dx=function(e,t){var n=$a(e,t);return n&&n.value},hx=function(e,t,n){var r=$a(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},px=function(e,t){return!!$a(e,t)},mx=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new sx("Side channel does not contain "+ox(s))},get:function(s){if(js&&s&&(typeof s=="object"||typeof s=="function")){if(t)return ix(t,s)}else if(Ws){if(n)return cx(n,s)}else if(r)return dx(r,s)},has:function(s){if(js&&s&&(typeof s=="object"||typeof s=="function")){if(t)return lx(t,s)}else if(Ws){if(n)return fx(n,s)}else if(r)return px(r,s);return!1},set:function(s,i){js&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new js),ax(t,s,i)):Ws?(n||(n=new Ws),ux(n,s,i)):(r||(r={key:{},next:null}),hx(r,s,i))}};return o},cd=e=>Array.isArray(e),Ba=e=>e===void 0,Ra=e=>e===null,gx=Function.bind.call(Function.call,Object.prototype.toString),yx=e=>!!e&&gx(e)==="[object Error]"||e instanceof Error,ud=(e,t)=>e instanceof t,vx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},bx=e=>Object.prototype.toString.call(e)==="[object Date]"&&ud(e,Date),yn={array:cd,date:bx,empty:e=>Ra(e)||Ba(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:ud,isError:yx,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Ra(e)||Ba(e),null:Ra,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!cd(e)&&typeof e=="object",primitive:vx,string:e=>typeof e=="string",undefined:Ba},ja=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=ja(s?[]:{},o,n)}else e[r]=ja(e[r],o,n)}else e[r]=n;return e},wx=e=>Object.keys(e),xx=e=>e.replace("[",".").replace("]","").split("."),Wa=(e,t,n)=>{const r=Array.isArray(t)?t:xx(t),o=structuredClone(e);return ja(o,r,n),o};const Ha="-";function Tx(e){const t=Ex(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Ha);return a[0]===""&&a.length!==1&&a.shift(),fd(a,t)||Sx(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function fd(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?fd(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Ha);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const dd=/^\[(.+)\]$/;function Sx(e){if(dd.test(e)){const t=dd.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Ex(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Px(Object.entries(e.classGroups),n).forEach(([s,i])=>{za(i,r,s,t)}),r}function za(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:hd(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Cx(o)){za(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{za(i,hd(t,s),n,r)})})}function hd(e,t){let n=e;return t.split(Ha).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Cx(e){return e.isThemeGetter}function Px(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function Ix(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const pd="!";function Ax(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,f;for(let g=0;g<a.length;g++){let y=a[g];if(c===0){if(y===o&&(r||a.slice(g,g+s)===t)){l.push(a.slice(u,g)),u=g+s;continue}if(y==="/"){f=g;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),d=h.startsWith(pd),p=d?h.substring(1):h,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function Ox(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Dx(e){return{cache:Ix(e.cacheSize),parseClassName:Ax(e),...Tx(e)}}const Mx=/\s+/;function kx(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(Mx).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let f=!!u,h=r(f?c.substring(0,u):c);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:i};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:i};f=!1}const d=Ox(a).join(":");return{isTailwindClass:!0,modifierId:l?d+pd:d,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(f=>s.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function Fx(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=md(t))&&(r&&(r+=" "),r+=n);return r}function md(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=md(e[r]))&&(n&&(n+=" "),n+=t);return n}function Nx(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=Dx(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=kx(l,n);return o(l,u),u}return function(){return s(Fx.apply(null,arguments))}}function Ve(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const gd=/^\[(?:([a-z-]+):)?(.+)\]$/i,Lx=/^\d+\/\d+$/,_x=new Set(["px","full","screen"]),Vx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$x=/\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$/,Bx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Rx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function vn(e){return er(e)||_x.has(e)||Lx.test(e)}function An(e){return kr(e,"length",qx)}function er(e){return!!e&&!Number.isNaN(Number(e))}function Hs(e){return kr(e,"number",er)}function Ro(e){return!!e&&Number.isInteger(Number(e))}function Wx(e){return e.endsWith("%")&&er(e.slice(0,-1))}function fe(e){return gd.test(e)}function On(e){return Vx.test(e)}const Hx=new Set(["length","size","percentage"]);function zx(e){return kr(e,Hx,yd)}function Ux(e){return kr(e,"position",yd)}const Gx=new Set(["image","url"]);function Yx(e){return kr(e,Gx,Qx)}function Kx(e){return kr(e,"",Xx)}function jo(){return!0}function kr(e,t,n){const r=gd.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function qx(e){return $x.test(e)&&!Bx.test(e)}function yd(){return!1}function Xx(e){return Rx.test(e)}function Qx(e){return jx.test(e)}function Zx(){const e=Ve("colors"),t=Ve("spacing"),n=Ve("blur"),r=Ve("brightness"),o=Ve("borderColor"),s=Ve("borderRadius"),i=Ve("borderSpacing"),a=Ve("borderWidth"),l=Ve("contrast"),c=Ve("grayscale"),u=Ve("hueRotate"),f=Ve("invert"),h=Ve("gap"),d=Ve("gradientColorStops"),p=Ve("gradientColorStopPositions"),m=Ve("inset"),g=Ve("margin"),y=Ve("opacity"),b=Ve("padding"),v=Ve("saturate"),S=Ve("scale"),T=Ve("sepia"),E=Ve("skew"),I=Ve("space"),A=Ve("translate"),k=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",fe,t],F=()=>[fe,t],L=()=>["",vn,An],P=()=>["auto",er,fe],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",fe],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[er,Hs],q=()=>[er,fe];return{cacheSize:500,separator:":",theme:{colors:[jo],spacing:[vn,An],blur:["none","",On,fe],brightness:R(),borderColor:[e],borderRadius:["none","","full",On,fe],borderSpacing:F(),borderWidth:L(),contrast:R(),grayscale:U(),hueRotate:q(),invert:U(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[Wx,An],inset:_(),margin:_(),opacity:R(),padding:F(),saturate:R(),scale:R(),sepia:U(),skew:q(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[On]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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"],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:[...D(),fe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ro,fe]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",Ro,fe]}],"grid-cols":[{"grid-cols":[jo]}],"col-start-end":[{col:["auto",{span:["full",Ro,fe]},fe]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[jo]}],"row-start-end":[{row:["auto",{span:[Ro,fe]},fe]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,t]}],"min-w":[{"min-w":[fe,t,"min","max","fit"]}],"max-w":[{"max-w":[fe,t,"none","full","min","max","fit","prose",{screen:[On]},On]}],h:[{h:[fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",On,An]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hs]}],"font-family":[{font:[jo]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",fe]}],"line-clamp":[{"line-clamp":["none",er,Hs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vn,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vn,An]}],"underline-offset":[{"underline-offset":["auto",vn,fe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Ux]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zx]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yx]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:N()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[vn,fe]}],"outline-w":[{outline:[vn,An]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[vn,An]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",On,Kx]}],"shadow-color":[{shadow:[jo]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",On,fe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[v]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",fe]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Ro,fe]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[vn,An,Hs]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-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"],"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"]}}}const Jx=Nx(Zx),Ua=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},e1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),t1=e=>yn.function(e),Oe=(...e)=>Jx(D0(e)),vd=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},zs=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Fr=w.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return x.jsx(s,{ref:o,...r,children:n})}),n1=Sr("relative overflow-hidden inline-flex duration-500 enabled:hover: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 ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Nr=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(Fr,{...l,ref:c,type:s,"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:Oe(n1({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),bd=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function r1(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 o1=({children:e,...t})=>{const n=bd(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:r1(r.current));return w.useLayoutEffect(()=>{const i=r.current;if(i===null)return;const a=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),s(f=>c.isIntersecting?!0:f)});return a.observe(i),()=>a.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},s1=Sr("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),i1=Sr("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),a1=w.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return x.jsxs(Fr,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:Oe(i1({size:i,theme:s}),t),children:[n?x.jsx("span",{className:s1({theme:n})}):null,r,a.children]})}),Lr=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Us=w.createContext({}),Gs=w.createContext(null),Ga=typeof document<"u",Ys=Ga?w.useLayoutEffect:w.useEffect,wd=w.createContext({strict:!1}),Ks=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),xd="data-"+Ks("framerAppearId"),l1={skipAnimations:!1,useManualTiming:!1};function c1(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,f=!1)=>{const d=f&&r?t:n;return u&&s.add(c),d.has(c)||d.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const qs=["read","resolveKeyframes","update","preRender","render","postRender"],u1=40;function Td(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=qs.reduce((y,b)=>(y[b]=c1(s),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:h}=i,d=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,u1),1),o.timestamp=y,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(d))},p=()=>{n=!0,r=!0,o.isProcessing||e(d)};return{schedule:qs.reduce((y,b)=>{const v=i[b];return y[b]=(S,T=!1,E=!1)=>(n||p(),v.schedule(S,T,E)),y},{}),cancel:y=>{for(let b=0;b<qs.length;b++)i[qs[b]].cancel(y)},state:o,steps:i}}const{schedule:Ya,cancel:x2}=Td(queueMicrotask,!1);function _r(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Sd=w.createContext({});let Ed=!1;function f1(e,t,n,r,o){const{visualElement:s}=w.useContext(Us),i=w.useContext(wd),a=w.useContext(Gs),l=w.useContext(Lr).reducedMotion,c=w.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=w.useContext(Sd);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&h1(c.current,n,o,f),w.useInsertionEffect(()=>{u&&u.update(n,a)});const h=w.useRef(!!(n[xd]&&!window.HandoffComplete));return Ys(()=>{u&&(u.updateFeatures(),Ya.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,Ed||(Ed=!0,queueMicrotask(d1))))}),u}function d1(){window.HandoffComplete=!0}function h1(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Cd(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&_r(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Cd(e){if(e)return e.options.allowProjection!==!1?e.projection:Cd(e.parent)}function p1(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):_r(n)&&(n.current=r))},[t])}function Wo(e){return typeof e=="string"||Array.isArray(e)}function Ho(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Ka=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qa=["initial",...Ka];function Xs(e){return Ho(e.animate)||qa.some(t=>Wo(e[t]))}function Pd(e){return!!(Xs(e)||e.variants)}function m1(e,t){if(Xs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wo(n)?n:void 0,animate:Wo(r)?r:void 0}}return e.inherit!==!1?t:{}}function g1(e){const{initial:t,animate:n}=m1(e,w.useContext(Us));return w.useMemo(()=>({initial:t,animate:n}),[Id(t),Id(n)])}function Id(e){return Array.isArray(e)?e.join(" "):e}const Ad={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Vr={};for(const e in Ad)Vr[e]={isEnabled:t=>Ad[e].some(n=>!!t[n])};function y1(e){for(const t in e)Vr[t]={...Vr[t],...e[t]}}const zo=w.createContext({}),v1=Symbol.for("motionComponentSymbol"),pt=e=>e;let $r=pt,Ft=pt;process.env.NODE_ENV!=="production"&&($r=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ft=(e,t)=>{if(!e)throw new Error(t)});function b1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&y1(e);function s(a,l){let c;const u={...w.useContext(Lr),...a,layoutId:w1(a)},{isStatic:f}=u,h=g1(a),d=r(a,f);if(!f&&Ga){x1(u,e);const p=T1(u);c=p.MeasureLayout,h.visualElement=f1(o,d,u,t,p.ProjectionNode)}return x.jsxs(Us.Provider,{value:h,children:[c&&h.visualElement?x.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,p1(d,h.visualElement,l),d,f,h.visualElement)]})}const i=w.forwardRef(s);return i[v1]=o,i}function w1({layoutId:e}){const t=w.useContext(zo).id;return t&&e!==void 0?t+"-"+e:e}function x1(e,t){const n=w.useContext(wd).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?$r(!1,r):Ft(!1,r)}}function T1(e){const{drag:t,layout:n}=Vr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function S1(e){function t(r,o={}){return b1(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const E1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Xa(e){return typeof e!="string"||e.includes("-")?!1:!!(E1.indexOf(e)>-1||/[A-Z]/u.test(e))}const Qs={};function C1(e){Object.assign(Qs,e)}const Uo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Dn=new Set(Uo);function Od(e,{layout:t,layoutId:n}){return Dn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qs[e]||e==="opacity")}const it=e=>!!(e&&e.getVelocity),P1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},I1=Uo.length;function A1(e,t,n){let r="";for(let o=0;o<I1;o++){const s=Uo[o];if(e[s]!==void 0){const i=P1[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Dd=e=>t=>typeof t=="string"&&t.startsWith(e),Md=Dd("--"),O1=Dd("var(--"),Qa=e=>O1(e)?D1.test(e.split("/*")[0].trim()):!1,D1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,M1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Mn=(e,t,n)=>n>t?t:n<e?e:n,Br={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Go={...Br,transform:e=>Mn(0,1,e)},Zs={...Br,default:1},Yo=e=>Math.round(e*1e5)/1e5,Za=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,k1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,F1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ko(e){return typeof e=="string"}function N1(e){return e==null}const qo=e=>({test:t=>Ko(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kn=qo("deg"),Qt=qo("%"),le=qo("px"),L1=qo("vh"),_1=qo("vw"),kd={...Qt,parse:e=>Qt.parse(e)/100,transform:e=>Qt.transform(e*100)},Fd={...Br,transform:Math.round},Nd={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,size:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,rotate:kn,rotateX:kn,rotateY:kn,rotateZ:kn,scale:Zs,scaleX:Zs,scaleY:Zs,scaleZ:Zs,skew:kn,skewX:kn,skewY:kn,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:Go,originX:kd,originY:kd,originZ:le,zIndex:Fd,backgroundPositionX:le,backgroundPositionY:le,fillOpacity:Go,strokeOpacity:Go,numOctaves:Fd};function Ja(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const f=t[u];if(Md(u)){o[u]=f;continue}const h=Nd[u],d=M1(f,h);if(Dn.has(u)){if(a=!0,s[u]=d,!c)continue;f!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=d):r[u]=d}if(t.transform||(a||n?r.transform=A1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:h=0}=i;r.transformOrigin=`${u} ${f} ${h}`}}const el=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ld(e,t,n){for(const r in t)!it(t[r])&&!Od(r,n)&&(e[r]=t[r])}function V1({transformTemplate:e},t){return w.useMemo(()=>{const n=el();return Ja(n,t,e),Object.assign({},n.vars,n.style)},[t])}function $1(e,t){const n=e.style||{},r={};return Ld(r,n,e),Object.assign(r,V1(e,t)),r}function B1(e,t){const n={},r=$1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const R1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Js(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||R1.has(e)}let _d=e=>!Js(e);function Vd(e){e&&(_d=t=>t.startsWith("on")?!Js(t):e(t))}try{Vd(require("@emotion/is-prop-valid").default)}catch{}function j1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(_d(o)||n===!0&&Js(o)||!t&&!Js(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function $d(e,t,n){return typeof e=="string"?e:le.transform(t+n*e)}function W1(e,t,n){const r=$d(t,e.x,e.width),o=$d(n,e.y,e.height);return`${r} ${o}`}const H1={offset:"stroke-dashoffset",array:"stroke-dasharray"},z1={offset:"strokeDashoffset",array:"strokeDasharray"};function U1(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?H1:z1;e[s.offset]=le.transform(-r);const i=le.transform(t),a=le.transform(n);e[s.array]=`${i} ${a}`}function tl(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(Ja(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:d,dimensions:p}=e;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(o!==void 0||s!==void 0||d.transform)&&(d.transformOrigin=W1(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&U1(h,i,a,l,!1)}const Bd=()=>({...el(),attrs:{}}),nl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function G1(e,t,n,r){const o=w.useMemo(()=>{const s=Bd();return tl(s,t,nl(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Ld(s,e.style,e),o.style={...s,...o.style}}return o}function Y1(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Xa(n)?G1:B1)(r,s,i,n),c=j1(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:f}=r,h=w.useMemo(()=>it(f)?f.get():f,[f]);return w.createElement(n,{...u,children:h})}}function Rd(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const jd=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Wd(e,t,n,r){Rd(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(jd.has(o)?o:Ks(o),t.attrs[o])}function rl(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(it(o[i])||t.style&&it(t.style[i])||Od(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function Hd(e,t,n){const r=rl(e,t,n);for(const o in e)if(it(e[o])||it(t[o])){const s=Uo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function zd(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ol(e,t,n,r){if(typeof t=="function"){const[o,s]=zd(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=zd(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Zt(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const sl=e=>Array.isArray(e),K1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),q1=e=>sl(e)?e[e.length-1]||0:e;function ei(e){const t=it(e)?e.get():e;return K1(t)?t.toValue():t}const Ud=new Set(["opacity","clipPath","filter","transform"]);function Gd(e){if(Dn.has(e))return"transform";if(Ud.has(e))return Ks(e)}function ti(e,t){e.indexOf(t)===-1&&e.push(t)}function Xo(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function X1([...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,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function Q1({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:J1(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Yd=e=>(t,n)=>{const r=w.useContext(Us),o=w.useContext(Gs),s=()=>Q1(e,t,r,o,n);return n?s():Zt(s)};function Z1(e,t){const n=Gd(t);n&&ti(e,n)}function Kd(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=ol(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function J1(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const g in c)i[g]=ei(c[g]);let{initial:u,animate:f}=e;const h=Xs(e),d=Pd(e);t&&d&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!Ho(m)&&Kd(e,m,(g,y)=>{for(const b in g){let v=g[b];if(Array.isArray(v)){const S=p?v.length-1:0;v=v[S]}v!==null&&(i[b]=v)}for(const b in y)i[b]=y[b]}),l&&(f&&u!==!1&&!Ho(f)&&Kd(e,f,g=>{for(const y in g)Z1(a,y)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Te,cancel:Jt,state:mt,steps:il}=Td(typeof requestAnimationFrame<"u"?requestAnimationFrame:pt,!0),eT={useVisualState:Yd({scrapeMotionValuesFromProps:Hd,createRenderState:Bd,onMount:(e,t,{renderState:n,latestValues:r})=>{Te.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Te.render(()=>{tl(n,r,nl(t.tagName),e.transformTemplate),Wd(t,n)})}})},tT={useVisualState:Yd({applyWillChange:!0,scrapeMotionValuesFromProps:rl,createRenderState:el})};function nT(e,{forwardMotionProps:t=!1},n,r){return{...Xa(e)?eT:tT,preloadedFeatures:n,useRender:Y1(t),createVisualElement:r,Component:e}}function bn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const qd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ni(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const rT=e=>t=>qd(t)&&e(t,ni(t));function wn(e,t,n,r){return bn(e,t,rT(n),r)}const oT=(e,t)=>n=>t(e(n)),xn=(...e)=>e.reduce(oT);function Xd(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Qd=Xd("dragHorizontal"),Zd=Xd("dragVertical");function Jd(e){let t=!1;if(e==="y")t=Zd();else if(e==="x")t=Qd();else{const n=Qd(),r=Zd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function eh(){const e=Jd(!0);return e?(e(),!1):!0}class Fn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function th(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||eh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Te.postRender(()=>l(s,i))};return wn(e.current,n,o,{passive:!e.getProps()[r]})}class sT extends Fn{mount(){this.unmount=xn(th(this.node,!0),th(this.node,!1))}unmount(){}}class iT extends Fn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xn(bn(this.node.current,"focus",()=>this.onFocus()),bn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const nh=(e,t)=>t?e===t?!0:nh(e,t.parentElement):!1;function al(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ni(n))}class aT extends Fn{constructor(){super(...arguments),this.removeStartListeners=pt,this.removeEndListeners=pt,this.removeAccessibleListeners=pt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=wn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),h=!f&&!nh(this.node.current,a.target)?u:c;h&&Te.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=wn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=xn(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||al("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Te.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=bn(this.node.current,"keyup",i),al("down",(a,l)=>{this.startPress(a,l)})},n=bn(this.node.current,"keydown",t),r=()=>{this.isPressing&&al("cancel",(s,i)=>this.cancelPress(s,i))},o=bn(this.node.current,"blur",r);this.removeAccessibleListeners=xn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Te.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!eh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Te.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=wn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=bn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ll=new WeakMap,cl=new WeakMap,lT=e=>{const t=ll.get(e.target);t&&t(e)},cT=e=>{e.forEach(lT)};function uT({root:e,...t}){const n=e||document;cl.has(n)||cl.set(n,{});const r=cl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(cT,{root:e,...t})),r[o]}function fT(e,t,n){const r=uT(t);return ll.set(e,n),r.observe(e),()=>{ll.delete(e),r.unobserve(e)}}const dT={some:0,all:1};class hT extends Fn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:dT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return fT(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(pT(t,n))&&this.startObserver()}unmount(){}}function pT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const mT={inView:{Feature:hT},tap:{Feature:aT},focus:{Feature:iT},hover:{Feature:sT}};function rh(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}function ri(e,t,n){const r=e.getProps();return ol(r,t,n!==void 0?n:r.custom,e)}const en=e=>e*1e3,tn=e=>e/1e3,gT={type:"spring",stiffness:500,damping:25,restSpeed:10},yT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vT={type:"keyframes",duration:.8},bT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wT=(e,{keyframes:t})=>t.length>2?vT:Dn.has(e)?e.startsWith("scale")?yT(t[1]):gT:bT;function xT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function ul(e,t){return e[t]||e.default||e}const TT=e=>e!==null;function oi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(TT),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let si;function ST(){si=void 0}const Nn={now:()=>(si===void 0&&Nn.set(mt.isProcessing||l1.useManualTiming?mt.timestamp:performance.now()),si),set:e=>{si=e,queueMicrotask(ST)}},oh=e=>/^0[^.\s]+$/u.test(e);function ET(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||oh(e):!0}const sh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),CT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function PT(e){const t=CT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const IT=4;function ih(e,t,n=1){Ft(n<=IT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=PT(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return sh(i)?parseFloat(i):i}return Qa(o)?ih(o,t,n+1):o}const AT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ah=e=>e===Br||e===le,lh=(e,t)=>parseFloat(e.split(", ")[t]),ch=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return lh(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?lh(s[1],e):0}},OT=new Set(["x","y","z"]),DT=Uo.filter(e=>!OT.has(e));function MT(e){const t=[];return DT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Rr={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:ch(4,13),y:ch(5,14)};Rr.translateX=Rr.x,Rr.translateY=Rr.y;const uh=e=>t=>t.test(e),fh=[Br,le,Qt,kn,_1,L1,{test:e=>e==="auto",parse:e=>e}],dh=e=>fh.find(uh(e)),tr=new Set;let fl=!1,dl=!1;function hh(){if(dl){const e=Array.from(tr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=MT(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(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}dl=!1,fl=!1,tr.forEach(e=>e.complete()),tr.clear()}function ph(){tr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(dl=!0)})}function kT(){ph(),hh()}class hl{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(tr.add(this),fl||(fl=!0,Te.read(ph),Te.resolveKeyframes(hh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),tr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,tr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const pl=(e,t)=>n=>!!(Ko(n)&&F1.test(n)&&n.startsWith(e)||t&&!N1(n)&&Object.prototype.hasOwnProperty.call(n,t)),mh=(e,t,n)=>r=>{if(!Ko(r))return r;const[o,s,i,a]=r.match(Za);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},FT=e=>Mn(0,255,e),ml={...Br,transform:e=>Math.round(FT(e))},nr={test:pl("rgb","red"),parse:mh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ml.transform(e)+", "+ml.transform(t)+", "+ml.transform(n)+", "+Yo(Go.transform(r))+")"};function NT(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 gl={test:pl("#"),parse:NT,transform:nr.transform},jr={test:pl("hsl","hue"),parse:mh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qt.transform(Yo(t))+", "+Qt.transform(Yo(n))+", "+Yo(Go.transform(r))+")"},wt={test:e=>nr.test(e)||gl.test(e)||jr.test(e),parse:e=>nr.test(e)?nr.parse(e):jr.test(e)?jr.parse(e):gl.parse(e),transform:e=>Ko(e)?e:e.hasOwnProperty("red")?nr.transform(e):jr.transform(e)};function LT(e){var t,n;return isNaN(e)&&Ko(e)&&(((t=e.match(Za))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(k1))===null||n===void 0?void 0:n.length)||0)>0}const gh="number",yh="color",_T="var",VT="var(",vh="${}",$T=/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 Qo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace($T,l=>(wt.test(l)?(r.color.push(s),o.push(yh),n.push(wt.parse(l))):l.startsWith(VT)?(r.var.push(s),o.push(_T),n.push(l)):(r.number.push(s),o.push(gh),n.push(parseFloat(l))),++s,vh)).split(vh);return{values:n,split:a,indexes:r,types:o}}function bh(e){return Qo(e).values}function wh(e){const{split:t,types:n}=Qo(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===gh?s+=Yo(o[i]):a===yh?s+=wt.transform(o[i]):s+=o[i]}return s}}const BT=e=>typeof e=="number"?0:e;function RT(e){const t=bh(e);return wh(e)(t.map(BT))}const Ln={test:LT,parse:bh,createTransformer:wh,getAnimatableNone:RT},jT=new Set(["brightness","contrast","saturate","opacity"]);function WT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Za)||[];if(!r)return e;const o=n.replace(r,"");let s=jT.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const HT=/\b([a-z-]*)\(.*?\)/gu,yl={...Ln,getAnimatableNone:e=>{const t=e.match(HT);return t?t.map(WT).join(" "):e}},zT={...Nd,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:yl,WebkitFilter:yl},vl=e=>zT[e];function xh(e,t){let n=vl(e);return n!==yl&&(n=Ln),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const UT=new Set(["auto","none","0"]);function GT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!UT.has(s)&&Qo(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=xh(n,o)}class Th extends hl{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Qa(c))){const u=ih(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!AT.has(r)||t.length!==2)return;const[o,s]=t,i=dh(o),a=dh(s);if(i!==a)if(ah(i)&&ah(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)ET(t[o])&&r.push(o);r.length&&GT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Rr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Rr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Sh(e){let t;return()=>(t===void 0&&(t=e()),t)}const Eh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ln.test(e)||e==="0")&&!e.startsWith("url("));function YT(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 KT(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Eh(o,t),a=Eh(s,t);return $r(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:YT(e)||n==="spring"&&r}class Ch{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&kT(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!KT(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(oi(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Ph(e,t){return t?e*(1e3/t):0}const qT=5;function Ih(e,t,n){const r=Math.max(t-qT,0);return Ph(n-e(r),t-r)}const bl=.001,XT=.01,Ah=10,QT=.05,ZT=1;function JT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;$r(e<=en(Ah),"Spring duration must be 10 seconds or less");let i=1-t;i=Mn(QT,ZT,i),e=Mn(XT,Ah,tn(e)),i<1?(o=c=>{const u=c*i,f=u*e,h=u-n,d=wl(c,i),p=Math.exp(-f);return bl-h/d*p},s=c=>{const f=c*i*e,h=f*n+n,d=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=wl(Math.pow(c,2),i);return(-o(c)+bl>0?-1:1)*((h-d)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-bl+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=tS(o,s,a);if(e=en(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const eS=12;function tS(e,t,n){let r=n;for(let o=1;o<eS;o++)r=r-e(r)/t(r);return r}function wl(e,t){return e*Math.sqrt(1-t*t)}const nS=["duration","bounce"],rS=["stiffness","damping","mass"];function Oh(e,t){return t.some(n=>e[n]!==void 0)}function oS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Oh(e,rS)&&Oh(e,nS)){const n=JT(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function xl({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:h}=oS({...r,velocity:-tn(r.velocity||0)}),d=f||0,p=l/(2*Math.sqrt(a*c)),m=s-o,g=tn(Math.sqrt(a/c)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let b;if(p<1){const v=wl(g,p);b=S=>{const T=Math.exp(-p*g*S);return s-T*((d+p*g*m)/v*Math.sin(v*S)+m*Math.cos(v*S))}}else if(p===1)b=v=>s-Math.exp(-g*v)*(m+(d+g*m)*v);else{const v=g*Math.sqrt(p*p-1);b=S=>{const T=Math.exp(-p*g*S),E=Math.min(v*S,300);return s-T*((d+p*g*m)*Math.sinh(E)+v*m*Math.cosh(E))/v}}return{calculatedDuration:h&&u||null,next:v=>{const S=b(v);if(h)i.done=v>=u;else{let T=d;v!==0&&(p<1?T=Ih(b,v,S):T=0);const E=Math.abs(T)<=n,I=Math.abs(s-S)<=t;i.done=E&&I}return i.value=i.done?s:S,i}}}function Dh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*t;const g=f+m,y=i===void 0?g:i(g);y!==g&&(m=y-f);const b=A=>-m*Math.exp(-A/r),v=A=>y+b(A),S=A=>{const k=b(A),O=v(A);h.done=Math.abs(k)<=c,h.value=h.done?y:O};let T,E;const I=A=>{d(h.value)&&(T=A,E=xl({keyframes:[h.value,p(h.value)],velocity:Ih(v,A,h.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return I(0),{calculatedDuration:null,next:A=>{let k=!1;return!E&&T===void 0&&(k=!0,S(A),I(A)),T!==void 0&&A>=T?E.next(A-T):(!k&&S(A),h)}}}const Mh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,sS=1e-7,iS=12;function aS(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Mh(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>sS&&++a<iS);return i}function Zo(e,t,n,r){if(e===t&&n===r)return pt;const o=s=>aS(s,0,1,e,n);return s=>s===0||s===1?s:Mh(o(s),t,r)}const lS=Zo(.42,0,1,1),cS=Zo(0,0,.58,1),kh=Zo(.42,0,.58,1),Fh=e=>Array.isArray(e)&&typeof e[0]!="number",Nh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Lh=e=>t=>1-e(1-t),Tl=e=>1-Math.sin(Math.acos(e)),_h=Lh(Tl),uS=Nh(Tl),Vh=Zo(.33,1.53,.69,.99),Sl=Lh(Vh),fS=Nh(Sl),$h={linear:pt,easeIn:lS,easeInOut:kh,easeOut:cS,circIn:Tl,circInOut:uS,circOut:_h,backIn:Sl,backInOut:fS,backOut:Vh,anticipate:e=>(e*=2)<1?.5*Sl(e):.5*(2-Math.pow(2,-10*(e-1)))},El=e=>{if(Array.isArray(e)){Ft(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Zo(t,n,r,o)}else if(typeof e=="string")return Ft($h[e]!==void 0,`Invalid easing type '${e}'`),$h[e];return e},Wr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$e=(e,t,n)=>e+(t-e)*n;function Cl(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 dS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Cl(l,a,e+1/3),s=Cl(l,a,e),i=Cl(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function ii(e,t){return n=>n>0?t:e}const Pl=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},hS=[gl,nr,jr],pS=e=>hS.find(t=>t.test(e));function Bh(e){const t=pS(e);if($r(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===jr&&(n=dS(n)),n}const Rh=(e,t)=>{const n=Bh(e),r=Bh(t);if(!n||!r)return ii(e,t);const o={...n};return s=>(o.red=Pl(n.red,r.red,s),o.green=Pl(n.green,r.green,s),o.blue=Pl(n.blue,r.blue,s),o.alpha=$e(n.alpha,r.alpha,s),nr.transform(o))},Il=new Set(["none","hidden"]);function mS(e,t){return Il.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gS(e,t){return n=>$e(e,t,n)}function Al(e){return typeof e=="number"?gS:typeof e=="string"?Qa(e)?ii:wt.test(e)?Rh:bS:Array.isArray(e)?jh:typeof e=="object"?wt.test(e)?Rh:yS:ii}function jh(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Al(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function yS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Al(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function vS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const bS=(e,t)=>{const n=Ln.createTransformer(t),r=Qo(e),o=Qo(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?Il.has(e)&&!o.values.length||Il.has(t)&&!r.values.length?mS(e,t):xn(jh(vS(r,o),o.values),n):($r(!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.`),ii(e,t))};function Wh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?$e(e,t,n):Al(e)(e,t)}function wS(e,t,n){const r=[],o=n||Wh,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||pt:t;a=xn(l,a)}r.push(a)}return r}function Hh(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Ft(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=wS(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=Wr(e[u],e[u+1],c);return i[u](f)};return n?c=>l(Mn(e[0],e[s-1],c)):l}function zh(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wr(0,t,r);e.push($e(n,1,o))}}function Uh(e){const t=[0];return zh(t,e.length-1),t}function xS(e,t){return e.map(n=>n*t)}function TS(e,t){return e.map(()=>t||kh).splice(0,e.length-1)}function ai({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Fh(r)?r.map(El):El(r),s={done:!1,value:t[0]},i=xS(n&&n.length===t.length?n:Uh(t),e),a=Hh(i,t,{ease:Array.isArray(o)?o:TS(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Ol=2e4;function Gh(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ol;)t+=n,r=e.next(t);return t>=Ol?1/0:t}const SS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Te.update(t,!0),stop:()=>Jt(t),now:()=>mt.isProcessing?mt.timestamp:Nn.now()}},ES={decay:Dh,inertia:Dh,tween:ai,keyframes:ai,spring:xl},CS=e=>e/100;class Dl extends Ch{constructor({KeyframeResolver:t=hl,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=ES[n]||ai;let l,c;a!==ai&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ft(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=xn(CS,Wh(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Gh(u));const{calculatedDuration:f}=u,h=f+o,d=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:d}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let v=this.currentTime,S=s;if(d){const A=Math.min(this.currentTime,u)/f;let k=Math.floor(A),O=A%1;!O&&A>=1&&(O=1),O===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/f)):p==="mirror"&&(S=i)),v=Mn(0,1,O)*f}const T=b?{done:!1,value:l[0]}:S.next(v);a&&(T.value=a(T.value));let{done:E}=T;!b&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return I&&o!==void 0&&(T.value=oi(l,this.options,o)),g&&g(T.value),I&&this.finish(),T}get duration(){const{resolved:t}=this;return t?tn(t.calculatedDuration):0}get time(){return tn(this.currentTime)}set time(t){t=en(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=tn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=SS,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Yh=e=>Array.isArray(e)&&typeof e[0]=="number";function Kh(e){return!!(!e||typeof e=="string"&&e in Ml||Yh(e)||Array.isArray(e)&&e.every(Kh))}const Jo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ml={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jo([0,.65,.55,1]),circOut:Jo([.55,0,1,.45]),backIn:Jo([.31,.01,.66,-.59]),backOut:Jo([.33,1.53,.69,.99])};function PS(e){return qh(e)||Ml.easeOut}function qh(e){if(e)return Yh(e)?Jo(e):Array.isArray(e)?e.map(PS):Ml[e]}function IS(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=qh(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const AS=Sh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),li=10,OS=2e4;function DS(e){return e.type==="spring"||!Kh(e.ease)}function MS(e,t){const n=new Dl({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<OS;)r=n.sample(s),o.push(r.value),s+=li;return{times:void 0,keyframes:o,duration:s-li,ease:"linear"}}class Xh extends Ch{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new Th(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(DS(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,...p}=this.options,m=MS(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=IS(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Nn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(oi(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return tn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return tn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=en(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return pt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return pt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...h}=this.options,d=new Dl({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=en(this.time);c.setWithVelocity(d.sample(p-li).value,d.sample(p).value,li)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;return AS()&&r&&Ud.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function kS(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Te.update(r,!0),()=>Jt(r)}const FS=Sh(()=>window.ScrollTimeline!==void 0);class kl{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}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=>{if(FS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),kS(o=>{r.time=r.duration*o},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 duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Fl=(e,t,n,r={},o,s,i)=>a=>{const l=ul(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-en(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};xT(l)||(f={...f,...wT(e,f)}),f.duration&&(f.duration=en(f.duration)),f.repeatDelay&&(f.repeatDelay=en(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let h=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(h=!0)),h&&!s&&t.get()!==void 0){const d=oi(f.keyframes,l);if(d!==void 0)return Te.update(()=>{f.onUpdate(d),f.onComplete()}),new kl([])}return!s&&Xh.supports(f)?new Xh(f):new Dl(f)};class Nl{constructor(){this.subscriptions=[]}add(t){return ti(this.subscriptions,t),()=>Xo(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 s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Qh=new Set;function Ll(e,t,n){e||Qh.has(t)||(console.warn(t),Qh.add(t))}const Zh=30,NS=e=>!isNaN(parseFloat(e)),es={current:void 0};class Jh{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Nn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Nn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=NS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ll(!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 Nl);const r=this.events[t].add(n);return t==="change"?()=>{r(),Te.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return es.current&&es.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Nn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Zh);return Ph(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hr(e,t){return new Jh(e,t)}function LS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hr(n))}function _S(e,t){const n=ri(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=q1(s[i]);LS(e,i,a)}}function ep(e){return e.getProps()[xd]}class VS extends Jh{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Gd(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(Xo(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function $S(e){return!!(it(e)&&e.add)}function _l(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new VS("auto"),e.addValue("willChange",r)),$S(r))return r.add(t)}function BS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Vl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),d=l[f];if(d===void 0||u&&BS(u,f))continue;const p={delay:n,elapsed:0,...ul(i||{},f)};let m=!1;if(window.HandoffAppearAnimations){const y=ep(e);if(y){const b=window.HandoffAppearAnimations(y,f,h,Te);b!==null&&(p.elapsed=b,m=!0)}}h.start(Fl(f,h,d,e.shouldReduceMotion&&Dn.has(f)?{type:!1}:p,e,m,_l(e,f)));const g=h.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Te.update(()=>{a&&_S(e,a)})}),c}function $l(e,t,n={}){var r;const o=ri(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Vl(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=s;return RS(e,t,u+c,f,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function RS(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(jS).forEach((c,u)=>{c.notify("AnimationStart",t),i.push($l(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function jS(e,t){return e.sortNodePosition(t)}function WS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>$l(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=$l(e,t,n);else{const o=typeof t=="function"?ri(e,t,n.custom):t;r=Promise.all(Vl(e,o,n))}return r.then(()=>{Te.postRender(()=>{e.notify("AnimationComplete",t)})})}const HS=[...Ka].reverse(),zS=Ka.length;function US(e){return t=>Promise.all(t.map(({animation:n,options:r})=>WS(e,n,r)))}function GS(e){let t=US(e),n=tp(),r=!0;const o=l=>(c,u)=>{var f;const h=ri(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},f=[],h=new Set;let d={},p=1/0;for(let g=0;g<zS;g++){const y=HS[g],b=n[y],v=c[y]!==void 0?c[y]:u[y],S=Wo(v),T=y===l?b.isActive:null;T===!1&&(p=g);let E=v===u[y]&&v!==c[y]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...d},!b.isActive&&T===null||!v&&!b.prevProp||Ho(v)||typeof v=="boolean")continue;let A=YS(b.prevProp,v)||y===l&&b.isActive&&!E&&S||g>p&&S,k=!1;const O=Array.isArray(v)?v:[v];let _=O.reduce(o(y),{});T===!1&&(_={});const{prevResolvedValues:F={}}=b,L={...F,..._},P=D=>{A=!0,h.has(D)&&(k=!0,h.delete(D)),b.needsAnimating[D]=!0;const N=e.getValue(D);N&&(N.liveStyle=!1)};for(const D in L){const N=_[D],$=F[D];if(d.hasOwnProperty(D))continue;let W=!1;sl(N)&&sl($)?W=!rh(N,$):W=N!==$,W?N!=null?P(D):h.add(D):N!==void 0&&h.has(D)?P(D):b.protectedKeys[D]=!0}b.prevProp=v,b.prevResolvedValues=_,b.isActive&&(d={...d,..._}),r&&e.blockInitialAnimation&&(A=!1),A&&(!E||k)&&f.push(...O.map(D=>({animation:D,options:{type:y}})))}if(h.size){const g={};h.forEach(y=>{const b=e.getBaseTarget(y),v=e.getValue(y);v&&(v.liveStyle=!0),g[y]=b??null}),f.push({animation:g})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var d;return(d=h.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const f=i(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=tp(),r=!0}}}function YS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rh(t,e):!1}function rr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function tp(){return{animate:rr(!0),whileInView:rr(),whileHover:rr(),whileTap:rr(),whileDrag:rr(),whileFocus:rr(),exit:rr()}}class KS extends Fn{constructor(t){super(t),t.animationState||(t.animationState=GS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ho(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let qS=0;class XS extends Fn{constructor(){super(...arguments),this.id=qS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const QS={animation:{Feature:KS},exit:{Feature:XS}},np=(e,t)=>Math.abs(e-t);function ZS(e,t){const n=np(e.x,t.x),r=np(e.y,t.y);return Math.sqrt(n**2+r**2)}class rp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Rl(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=ZS(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:m}=mt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:y}=this.handlers;h||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Bl(h,this.transformPagePoint),Te.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Rl(f.type==="pointercancel"?this.lastMoveEventInfo:Bl(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,g),p&&p(f,g)},!qd(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=ni(t),a=Bl(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Rl(a,this.history)),this.removeListeners=xn(wn(this.contextWindow,"pointermove",this.handlePointerMove),wn(this.contextWindow,"pointerup",this.handlePointerUp),wn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jt(this.updatePoint)}}function Bl(e,t){return t?{point:t(e.point)}:e}function op(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rl({point:e},t){return{point:e,delta:op(e,sp(t)),offset:op(e,JS(t)),velocity:eE(t,.1)}}function JS(e){return e[0]}function sp(e){return e[e.length-1]}function eE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=sp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>en(t)));)n--;if(!r)return{x:0,y:0};const s=tn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const ip=1e-4,tE=1-ip,nE=1+ip,ap=.01,rE=0-ap,oE=0+ap;function Nt(e){return e.max-e.min}function sE(e,t,n){return Math.abs(e-t)<=n}function lp(e,t,n,r=.5){e.origin=r,e.originPoint=$e(t.min,t.max,e.origin),e.scale=Nt(n)/Nt(t),e.translate=$e(n.min,n.max,e.origin)-e.originPoint,(e.scale>=tE&&e.scale<=nE||isNaN(e.scale))&&(e.scale=1),(e.translate>=rE&&e.translate<=oE||isNaN(e.translate))&&(e.translate=0)}function ts(e,t,n,r){lp(e.x,t.x,n.x,r?r.originX:void 0),lp(e.y,t.y,n.y,r?r.originY:void 0)}function cp(e,t,n){e.min=n.min+t.min,e.max=e.min+Nt(t)}function iE(e,t,n){cp(e.x,t.x,n.x),cp(e.y,t.y,n.y)}function up(e,t,n){e.min=t.min-n.min,e.max=e.min+Nt(t)}function ns(e,t,n){up(e.x,t.x,n.x),up(e.y,t.y,n.y)}function aE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?$e(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?$e(n,e,r.max):Math.min(e,n)),e}function fp(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lE(e,{top:t,left:n,bottom:r,right:o}){return{x:fp(e.x,n,o),y:fp(e.y,t,r)}}function dp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function cE(e,t){return{x:dp(e.x,t.x),y:dp(e.y,t.y)}}function uE(e,t){let n=.5;const r=Nt(e),o=Nt(t);return o>r?n=Wr(t.min,t.max-r,e.min):r>o&&(n=Wr(e.min,e.max-o,t.min)),Mn(0,1,n)}function fE(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const jl=.35;function dE(e=jl){return e===!1?e=0:e===!0&&(e=jl),{x:hp(e,"left","right"),y:hp(e,"top","bottom")}}function hp(e,t,n){return{min:pp(e,t),max:pp(e,n)}}function pp(e,t){return typeof e=="number"?e:e[t]||0}const mp=()=>({translate:0,scale:1,origin:0,originPoint:0}),zr=()=>({x:mp(),y:mp()}),gp=()=>({min:0,max:0}),Ze=()=>({x:gp(),y:gp()});function jt(e){return[e("x"),e("y")]}function yp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pE(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 Wl(e){return e===void 0||e===1}function Hl({scale:e,scaleX:t,scaleY:n}){return!Wl(e)||!Wl(t)||!Wl(n)}function or(e){return Hl(e)||vp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vp(e){return bp(e.x)||bp(e.y)}function bp(e){return e&&e!=="0%"}function ci(e,t,n){const r=e-n,o=t*r;return n+o}function wp(e,t,n,r,o){return o!==void 0&&(e=ci(e,o,r)),ci(e,n,r)+t}function zl(e,t=0,n=1,r,o){e.min=wp(e.min,t,n,r,o),e.max=wp(e.max,t,n,r,o)}function xp(e,{x:t,y:n}){zl(e.x,t.translate,t.scale,t.originPoint),zl(e.y,n.translate,n.scale,n.originPoint)}const Tp=.999999999999,Sp=1.0000000000001;function mE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ur(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,xp(e,i)),r&&or(s.latestValues)&&Ur(e,s.latestValues))}t.x<Sp&&t.x>Tp&&(t.x=1),t.y<Sp&&t.y>Tp&&(t.y=1)}function _n(e,t){e.min=e.min+t,e.max=e.max+t}function Ep(e,t,n,r,o=.5){const s=$e(e.min,e.max,o);zl(e,t,n,s,r)}function Ur(e,t){Ep(e.x,t.x,t.scaleX,t.scale,t.originX),Ep(e.y,t.y,t.scaleY,t.scale,t.originY)}function Cp(e,t){return yp(pE(e.getBoundingClientRect(),t))}function gE(e,t,n){const r=Cp(e,n),{scroll:o}=t;return o&&(_n(r.x,o.offset.x),_n(r.y,o.offset.y)),r}const Pp=({current:e})=>e?e.ownerDocument.defaultView:null,yE=new WeakMap;class vE{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ni(u,"page").point)},s=(u,f)=>{var h;const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Jd(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),jt(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Qt.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[y];S&&(b=Nt(S)*(parseFloat(b)/100))}}this.originPoint[y]=b}),m&&Te.postRender(()=>m(u,f)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=_l(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:g}=f;if(d&&this.currentDirection===null){this.currentDirection=bE(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>jt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new rp(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Pp(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Te.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ui(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=aE(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&_r(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=lE(o.layoutBox,n):this.constraints=!1,this.elastic=dE(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&jt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=fE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!_r(t))return!1;const r=t.current;Ft(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=gE(r,o.root,this.visualElement.getTransformPagePoint());let i=cE(o.layout.layoutBox,s);if(n){const a=n(hE(i));this.hasMutatedConstraints=!!a,a&&(i=yp(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=jt(u=>{if(!ui(u,n,this.currentDirection))return;let f=l&&l[u]||{};i&&(f={min:0,max:0});const h=o?200:1e6,d=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Fl(t,r,0,n,this.visualElement,!1,_l(this.visualElement,t)))}stopAnimation(){jt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){jt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){jt(n=>{const{drag:r}=this.getProps();if(!ui(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-$e(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!_r(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};jt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=uE({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),jt(i=>{if(!ui(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set($e(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;yE.set(this.visualElement,this);const t=this.visualElement.current,n=wn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();_r(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Te.read(r);const i=bn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(jt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=jl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function ui(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function bE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wE extends Fn{constructor(t){super(t),this.removeGroupControls=pt,this.removeListeners=pt,this.controls=new vE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ip=e=>(t,n)=>{e&&Te.postRender(()=>e(t,n))};class xE extends Fn{constructor(){super(...arguments),this.removePointerDownListener=pt}onPointerDown(t){this.session=new rp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Pp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ip(t),onStart:Ip(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Te.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=wn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function TE(){const e=w.useContext(Gs);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const fi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ap(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const rs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(le.test(e))e=parseFloat(e);else return e;const n=Ap(e,t.target.x),r=Ap(e,t.target.y);return`${n}% ${r}%`}},SE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ln.parse(e);if(o.length>5)return r;const s=Ln.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=$e(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class EE extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;C1(CE),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),fi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Te.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ya.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Op(e){const[t,n]=TE(),r=w.useContext(zo);return x.jsx(EE,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(Sd),isPresent:t,safeToRemove:n})}const CE={borderRadius:{...rs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rs,borderTopRightRadius:rs,borderBottomLeftRadius:rs,borderBottomRightRadius:rs,boxShadow:SE},Dp=["TopLeft","TopRight","BottomLeft","BottomRight"],PE=Dp.length,Mp=e=>typeof e=="string"?parseFloat(e):e,kp=e=>typeof e=="number"||le.test(e);function IE(e,t,n,r,o,s){o?(e.opacity=$e(0,n.opacity!==void 0?n.opacity:1,AE(r)),e.opacityExit=$e(t.opacity!==void 0?t.opacity:1,0,OE(r))):s&&(e.opacity=$e(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<PE;i++){const a=`border${Dp[i]}Radius`;let l=Fp(t,a),c=Fp(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||kp(l)===kp(c)?(e[a]=Math.max($e(Mp(l),Mp(c),r),0),(Qt.test(c)||Qt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=$e(t.rotate||0,n.rotate||0,r))}function Fp(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const AE=Np(0,.5,_h),OE=Np(.5,.95,pt);function Np(e,t,n){return r=>r<e?0:r>t?1:n(Wr(e,t,r))}function Lp(e,t){e.min=t.min,e.max=t.max}function Wt(e,t){Lp(e.x,t.x),Lp(e.y,t.y)}function _p(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Vp(e,t,n,r,o){return e-=t,e=ci(e,1/n,r),o!==void 0&&(e=ci(e,1/o,r)),e}function DE(e,t=0,n=1,r=.5,o,s=e,i=e){if(Qt.test(t)&&(t=parseFloat(t),t=$e(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=$e(s.min,s.max,r);e===s&&(a-=t),e.min=Vp(e.min,t,n,a,o),e.max=Vp(e.max,t,n,a,o)}function $p(e,t,[n,r,o],s,i){DE(e,t[n],t[r],t[o],t.scale,s,i)}const ME=["x","scaleX","originX"],kE=["y","scaleY","originY"];function Bp(e,t,n,r){$p(e.x,t,ME,n?n.x:void 0,r?r.x:void 0),$p(e.y,t,kE,n?n.y:void 0,r?r.y:void 0)}function Rp(e){return e.translate===0&&e.scale===1}function jp(e){return Rp(e.x)&&Rp(e.y)}function FE(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Wp(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Hp(e){return Nt(e.x)/Nt(e.y)}function zp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NE{constructor(){this.members=[]}add(t){ti(this.members,t),t.scheduleRender()}remove(t){if(Xo(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 s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function LE(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),d&&(r+=`skewX(${d}deg) `),p&&(r+=`skewY(${p}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 _E=(e,t)=>e.depth-t.depth;class VE{constructor(){this.children=[],this.isDirty=!1}add(t){ti(this.children,t),this.isDirty=!0}remove(t){Xo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_E),this.isDirty=!1,this.children.forEach(t)}}function $E(e,t){const n=Nn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Jt(r),e(s-t))};return Te.read(r,!0),()=>Jt(r)}function Up(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Ul(e,t,n){const r=it(e)?e:Hr(e);return r.start(Fl("",r,t,n)),r.animation}const sr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Gl=["","X","Y","Z"],BE={visibility:"hidden"},Gp=1e3;let RE=0;function Yl(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Yp(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?ep(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Yp(e.parent):!1:!1}function Kp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=RE++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(sr.totalNodes=sr.resolvedTargetDeltas=sr.recalculatedProjection=0),this.nodes.forEach(HE),this.nodes.forEach(KE),this.nodes.forEach(qE),this.nodes.forEach(zE),window.MotionDebug&&window.MotionDebug.record(sr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,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 VE)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Nl),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Up(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=$E(h,250),fi.hasAnimatedSinceResize&&(fi.hasAnimatedSinceResize=!1,this.nodes.forEach(Xp))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||eC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!Wp(this.targetLayout,p)||d,v=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const S={...ul(m,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||Xp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Jt(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(XE),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Yp(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(qp);return}this.isUpdating||this.nodes.forEach(GE),this.isUpdating=!1,this.nodes.forEach(YE),this.nodes.forEach(jE),this.nodes.forEach(WE),this.clearAllSnapshots();const a=Nn.now();mt.delta=Mn(0,1e3/60,a-mt.timestamp),mt.timestamp=a,mt.isProcessing=!0,il.update.process(mt),il.preRender.process(mt),il.render.process(mt),mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ya.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(UE),this.sharedNodes.forEach(QE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ze(),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,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!jp(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||or(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),tC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return Ze();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(_n(a.x,l.offset.x),_n(a.y,l.offset.y)),a}removeElementScroll(i){const a=Ze();Wt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Wt(a,i);const{scroll:h}=this.root;h&&(_n(a.x,-h.offset.x),_n(a.y,-h.offset.y))}_n(a.x,u.offset.x),_n(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=Ze();Wt(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ur(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),or(u.latestValues)&&Ur(l,u.latestValues)}return or(this.latestValues)&&Ur(l,this.latestValues),l}removeTransform(i){const a=Ze();Wt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!or(c.latestValues))continue;Hl(c.latestValues)&&c.updateSnapshot();const u=Ze(),f=c.measurePageBox();Wt(u,f),Bp(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return or(this.latestValues)&&Bp(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=mt.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),ns(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),Wt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ze(),this.targetWithTransforms=Ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),iE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Wt(this.target,this.layout.layoutBox),xp(this.target,this.targetDelta)):Wt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),ns(this.relativeTargetOrigin,this.target,d.target),Wt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&sr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Hl(this.parent.latestValues)||vp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===mt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Wt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;mE(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ze());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_p(this.prevProjectionDelta.x,this.projectionDelta.x),_p(this.prevProjectionDelta.y,this.projectionDelta.y)),ts(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!zp(this.projectionDelta.x,this.prevProjectionDelta.x)||!zp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&sr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zr(),this.projectionDelta=zr(),this.projectionDeltaWithTransform=zr()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=zr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Ze(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,g=this.getStack(),y=!g||g.members.length<=1,b=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(JE));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const T=S/1e3;Qp(f.x,i.x,T),Qp(f.y,i.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ns(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ZE(this.relativeTarget,this.relativeTargetOrigin,h,T),v&&FE(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Ze()),Wt(v,this.relativeTarget)),m&&(this.animationValues=u,IE(u,c,this.latestValues,T,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Jt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Te.update(()=>{fi.hasAnimatedSinceResize=!0,this.currentAnimation=Ul(0,Gp,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Gp),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&nm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ze();const f=Nt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const h=Nt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}Wt(a,l),Ur(a,u),ts(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new NE),this.sharedNodes.get(i).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 i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Yl("z",i,c,this.animationValues);for(let u=0;u<Gl.length;u++)Yl(`rotate${Gl[u]}`,i,c,this.animationValues),Yl(`skew${Gl[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return BE;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ei(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ei(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!or(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=LE(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in Qs){if(h[m]===void 0)continue;const{correct:g,applyTo:y}=Qs[m],b=c.transform==="none"?h[m]:g(h[m],f);if(y){const v=y.length;for(let S=0;S<v;S++)c[y[S]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?ei(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(qp),this.root.sharedNodes.clear()}}}function jE(e){e.updateLayout()}function WE(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?jt(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=Nt(h);h.min=r[f].min,h.max=h.min+d}):nm(s,n.layoutBox,r)&&jt(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=Nt(r[f]);h.max=h.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});const a=zr();ts(a,r,n.layoutBox);const l=zr();i?ts(l,e.applyTransform(o,!0),n.measuredBox):ts(l,r,n.layoutBox);const c=!jp(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=Ze();ns(p,n.layoutBox,h.layoutBox);const m=Ze();ns(m,r,d.layoutBox),Wp(p,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function HE(e){window.MotionDebug&&sr.totalNodes++,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 zE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function UE(e){e.clearSnapshot()}function qp(e){e.clearMeasurements()}function GE(e){e.isLayoutDirty=!1}function YE(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Xp(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function KE(e){e.resolveTargetDelta()}function qE(e){e.calcProjection()}function XE(e){e.resetSkewAndRotation()}function QE(e){e.removeLeadSnapshot()}function Qp(e,t,n){e.translate=$e(t.translate,0,n),e.scale=$e(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zp(e,t,n,r){e.min=$e(t.min,n.min,r),e.max=$e(t.max,n.max,r)}function ZE(e,t,n,r){Zp(e.x,t.x,n.x,r),Zp(e.y,t.y,n.y,r)}function JE(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const eC={duration:.45,ease:[.4,0,.1,1]},Jp=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),em=Jp("applewebkit/")&&!Jp("chrome/")?Math.round:pt;function tm(e){e.min=em(e.min),e.max=em(e.max)}function tC(e){tm(e.x),tm(e.y)}function nm(e,t,n){return e==="position"||e==="preserve-aspect"&&!sE(Hp(t),Hp(n),.2)}const nC=Kp({attachResizeListener:(e,t)=>bn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Kl={current:void 0},rm=Kp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Kl.current){const e=new nC({});e.mount(window),e.setOptions({layoutScroll:!0}),Kl.current=e}return Kl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),rC={pan:{Feature:xE},drag:{Feature:wE,ProjectionNode:rm,MeasureLayout:Op}},ql={current:null},om={current:!1};function oC(){if(om.current=!0,!!Ga)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ql.current=e.matches;e.addListener(t),t()}else ql.current=!1}function sC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(it(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Ll(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(it(s))e.addValue(r,Hr(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Hr(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const os=new WeakMap,iC=[...fh,wt,Ln],aC=e=>iC.find(uh(e)),sm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],lC=qa.length;class cC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,d,p,m)=>new this.KeyframeResolver(h,d,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=hl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Te.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Xs(n),this.isVariantNode=Pd(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const d=f[h];l[h]!==void 0&&it(d)&&d.set(l[h],!1)}}mount(t){this.current=t,os.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)),om.current||oC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ql.current,process.env.NODE_ENV!=="production"&&Ll(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){os.delete(this.current),this.projection&&this.projection.unmount(),Jt(this.notifyUpdate),Jt(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Dn.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),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 Vr){const n=Vr[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 s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}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<sm.length;r++){const o=sm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=sC(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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<lC;r++){const o=qa[r],s=this.props[o];(Wo(s)||s===!1)&&(n[o]=s)}return n}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=Hr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(sh(o)||oh(o))?o=parseFloat(o):!aC(o)&&Ln.test(n)&&(o=xh(t,n)),this.setBaseTarget(t,it(o)?o.get():o)),it(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=ol(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!it(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Nl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class im extends cC{constructor(){super(...arguments),this.KeyframeResolver=Th}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function uC(e){return window.getComputedStyle(e)}class am extends im{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Rd}readValueFromInstance(t,n){if(Dn.has(n)){const r=vl(n);return r&&r.default||0}else{const r=uC(t),o=(Md(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Cp(t,n)}build(t,n,r){Ja(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return rl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;it(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class lm extends im{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Dn.has(n)){const r=vl(n);return r&&r.default||0}return n=jd.has(n)?n:Ks(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Hd(t,n,r)}build(t,n,r){tl(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Wd(t,n,r,o)}mount(t){this.isSVGTag=nl(t.tagName),super.mount(t)}}const fC=(e,t)=>Xa(e)?new lm(t):new am(t,{allowProjection:e!==w.Fragment}),dC={...QS,...mT,...rC,...{layout:{ProjectionNode:rm,MeasureLayout:Op}}},ft=S1((e,t)=>nT(e,t,dC,fC));function cm(){const e=w.useRef(!1);return Ys(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function um(){const e=cm(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Te.postRender(r),[r]),t]}class hC extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function pC({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=w.useContext(Lr);return w.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
1
+ (function(X,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],w):(X=typeof globalThis<"u"?globalThis:X||self,w(X.components={},X.React,X["react/jsx-runtime"],X.ReactDOM))})(this,function(X,w,x,xa){"use strict";var v2=Object.defineProperty;var b2=(X,w,x)=>w in X?v2(X,w,{enumerable:!0,configurable:!0,writable:!0,value:x}):X[w]=x;var ne=(X,w,x)=>b2(X,typeof w!="symbol"?w+"":w,x);function Tf(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 C=Tf(w),Lo=Tf(xa);function Sf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Sf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function M0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Sf(e))&&(r&&(r+=" "),r+=t);return r}const Ef=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Cf=M0,Er=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Cf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const h=Ef(u)||Ef(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...d}=u;return Object.entries(d).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...s,...a}[m]):{...s,...a}[m]===g})?[...c,f,h]:c},[]);return Cf(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Pf(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=Pf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function k0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Pf(e))&&(r&&(r+=" "),r+=t);return r}var If=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function F0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function N0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var L0=Error,_0=EvalError,V0=RangeError,$0=ReferenceError,Af=SyntaxError,_o=TypeError,B0=URIError,R0=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(n 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 i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},Of=typeof Symbol<"u"&&Symbol,j0=R0,H0=function(){return typeof Of!="function"||typeof Symbol!="function"||typeof Of("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:j0()},Ta={__proto__:null,foo:{}},W0=Object,z0=function(){return{__proto__:Ta}.foo===Ta.foo&&!(Ta instanceof W0)},U0="Function.prototype.bind called on incompatible ",G0=Object.prototype.toString,Y0=Math.max,K0="[object Function]",Df=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},q0=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},X0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Q0=function(t){var n=this;if(typeof n!="function"||G0.apply(n)!==K0)throw new TypeError(U0+n);for(var r=q0(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Df(r,arguments));return Object(u)===u?u:this}return n.apply(t,Df(r,arguments))},i=Y0(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+X0(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},Z0=Q0,Sa=Function.prototype.bind||Z0,J0=Function.prototype.call,ew=Object.prototype.hasOwnProperty,tw=Sa,nw=tw.call(J0,ew),pe,rw=L0,ow=_0,sw=V0,iw=$0,Cr=Af,Pr=_o,aw=B0,Mf=Function,Ea=function(e){try{return Mf('"use strict"; return ('+e+").constructor;")()}catch{}},Jn=Object.getOwnPropertyDescriptor;if(Jn)try{Jn({},"")}catch{Jn=null}var Ca=function(){throw new Pr},lw=Jn?function(){try{return arguments.callee,Ca}catch{try{return Jn(arguments,"callee").get}catch{return Ca}}}():Ca,Ir=H0(),cw=z0(),ut=Object.getPrototypeOf||(cw?function(e){return e.__proto__}:null),Ar={},uw=typeof Uint8Array>"u"||!ut?pe:ut(Uint8Array),er={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pe:ArrayBuffer,"%ArrayIteratorPrototype%":Ir&&ut?ut([][Symbol.iterator]()):pe,"%AsyncFromSyncIteratorPrototype%":pe,"%AsyncFunction%":Ar,"%AsyncGenerator%":Ar,"%AsyncGeneratorFunction%":Ar,"%AsyncIteratorPrototype%":Ar,"%Atomics%":typeof Atomics>"u"?pe:Atomics,"%BigInt%":typeof BigInt>"u"?pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":rw,"%eval%":eval,"%EvalError%":ow,"%Float32Array%":typeof Float32Array>"u"?pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pe:FinalizationRegistry,"%Function%":Mf,"%GeneratorFunction%":Ar,"%Int8Array%":typeof Int8Array>"u"?pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ir&&ut?ut(ut([][Symbol.iterator]())):pe,"%JSON%":typeof JSON=="object"?JSON:pe,"%Map%":typeof Map>"u"?pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ir||!ut?pe:ut(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pe:Promise,"%Proxy%":typeof Proxy>"u"?pe:Proxy,"%RangeError%":sw,"%ReferenceError%":iw,"%Reflect%":typeof Reflect>"u"?pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ir||!ut?pe:ut(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ir&&ut?ut(""[Symbol.iterator]()):pe,"%Symbol%":Ir?Symbol:pe,"%SyntaxError%":Cr,"%ThrowTypeError%":lw,"%TypedArray%":uw,"%TypeError%":Pr,"%Uint8Array%":typeof Uint8Array>"u"?pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pe:Uint32Array,"%URIError%":aw,"%WeakMap%":typeof WeakMap>"u"?pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pe:WeakSet};if(ut)try{null.error}catch(e){var fw=ut(ut(e));er["%Error.prototype%"]=fw}var dw=function e(t){var n;if(t==="%AsyncFunction%")n=Ea("async function () {}");else if(t==="%GeneratorFunction%")n=Ea("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ea("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ut&&(n=ut(o.prototype))}return er[t]=n,n},kf={__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"]},Vo=Sa,_s=nw,hw=Vo.call(Function.call,Array.prototype.concat),pw=Vo.call(Function.apply,Array.prototype.splice),Ff=Vo.call(Function.call,String.prototype.replace),Vs=Vo.call(Function.call,String.prototype.slice),mw=Vo.call(Function.call,RegExp.prototype.exec),gw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,yw=/\\(\\)?/g,vw=function(t){var n=Vs(t,0,1),r=Vs(t,-1);if(n==="%"&&r!=="%")throw new Cr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Cr("invalid intrinsic syntax, expected opening `%`");var o=[];return Ff(t,gw,function(s,i,a,l){o[o.length]=a?Ff(l,yw,"$1"):i||s}),o},bw=function(t,n){var r=t,o;if(_s(kf,r)&&(o=kf[r],r="%"+o[0]+"%"),_s(er,r)){var s=er[r];if(s===Ar&&(s=dw(r)),typeof s>"u"&&!n)throw new Pr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Cr("intrinsic "+t+" does not exist!")},Or=function(t,n){if(typeof t!="string"||t.length===0)throw new Pr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Pr('"allowMissing" argument must be a boolean');if(mw(/^%?[^%]*%?$/,t)===null)throw new Cr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=vw(t),o=r.length>0?r[0]:"",s=bw("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],pw(r,hw([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var h=r[u],d=Vs(h,0,1),p=Vs(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new Cr("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),o+="."+h,i="%"+o+"%",_s(er,i))a=er[i];else if(a!=null){if(!(h in a)){if(!n)throw new Pr("base intrinsic for "+t+" exists, but the property is not available.");return}if(Jn&&u+1>=r.length){var m=Jn(a,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else f=_s(a,h),a=a[h];f&&!l&&(er[i]=a)}}return a},Nf={exports:{}},Pa,Lf;function Ia(){if(Lf)return Pa;Lf=1;var e=Or,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Pa=t,Pa}var ww=Or,$s=ww("%Object.getOwnPropertyDescriptor%",!0);if($s)try{$s([],"length")}catch{$s=null}var _f=$s,Vf=Ia(),xw=Af,Dr=_o,$f=_f,Tw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Dr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Dr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Dr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Dr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Dr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Dr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!$f&&$f(t,n);if(Vf)Vf(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new xw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Aa=Ia(),Bf=function(){return!!Aa};Bf.hasArrayLengthDefineBug=function(){if(!Aa)return null;try{return Aa([],"length",{value:1}).length!==1}catch{return!0}};var Sw=Bf,Ew=Or,Rf=Tw,Cw=Sw(),jf=_f,Hf=_o,Pw=Ew("%Math.floor%"),Iw=function(t,n){if(typeof t!="function")throw new Hf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Pw(n)!==n)throw new Hf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&jf){var i=jf(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(Cw?Rf(t,"length",n,!0,!0):Rf(t,"length",n)),t};(function(e){var t=Sa,n=Or,r=Iw,o=_o,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Ia(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var d=a(t,i,arguments);return r(d,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(Nf);var Aw=Nf.exports,Wf=Or,zf=Aw,Ow=zf(Wf("String.prototype.indexOf")),Dw=function(t,n){var r=Wf(t,!!n);return typeof r=="function"&&Ow(t,".prototype.")>-1?zf(r):r};const Mw=N0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Oa=typeof Map=="function"&&Map.prototype,Da=Object.getOwnPropertyDescriptor&&Oa?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Bs=Oa&&Da&&typeof Da.get=="function"?Da.get:null,Uf=Oa&&Map.prototype.forEach,Ma=typeof Set=="function"&&Set.prototype,ka=Object.getOwnPropertyDescriptor&&Ma?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Rs=Ma&&ka&&typeof ka.get=="function"?ka.get:null,Gf=Ma&&Set.prototype.forEach,kw=typeof WeakMap=="function"&&WeakMap.prototype,$o=kw?WeakMap.prototype.has:null,Fw=typeof WeakSet=="function"&&WeakSet.prototype,Bo=Fw?WeakSet.prototype.has:null,Nw=typeof WeakRef=="function"&&WeakRef.prototype,Yf=Nw?WeakRef.prototype.deref:null,Lw=Boolean.prototype.valueOf,_w=Object.prototype.toString,Vw=Function.prototype.toString,$w=String.prototype.match,Fa=String.prototype.slice,Pn=String.prototype.replace,Bw=String.prototype.toUpperCase,Kf=String.prototype.toLowerCase,qf=RegExp.prototype.test,Xf=Array.prototype.concat,Qt=Array.prototype.join,Rw=Array.prototype.slice,Qf=Math.floor,Na=typeof BigInt=="function"?BigInt.prototype.valueOf:null,La=Object.getOwnPropertySymbols,_a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Mr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Mr||!0)?Symbol.toStringTag:null,Zf=Object.prototype.propertyIsEnumerable,Jf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ed(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||qf.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Qf(-e):Qf(e);if(r!==e){var o=String(r),s=Fa.call(t,o.length+1);return Pn.call(o,n,"$&_")+"."+Pn.call(Pn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Pn.call(t,n,"$&_")}var Va=Mw,td=Va.custom,nd=sd(td)?td:null,jw=function e(t,n,r,o){var s=n||{};if(In(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(In(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=In(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(In(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(In(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return ad(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?ed(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?ed(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return $a(t)?"[Array]":"[Object]";var f=sx(s,r);if(typeof o>"u")o=[];else if(id(o,t)>=0)return"[Circular]";function h(L,P,D){if(P&&(o=Rw.call(o),o.push(P)),D){var N={depth:s.depth};return In(s,"quoteStyle")&&(N.quoteStyle=s.quoteStyle),e(L,N,r+1,o)}return e(L,s,r+1,o)}if(typeof t=="function"&&!od(t)){var d=Xw(t),p=js(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+Qt.call(p,", ")+" }":"")}if(sd(t)){var m=Mr?Pn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):_a.call(t);return typeof t=="object"&&!Mr?Ro(m):m}if(nx(t)){for(var g="<"+Kf.call(String(t.nodeName)),y=t.attributes||[],b=0;b<y.length;b++)g+=" "+y[b].name+"="+rd(Hw(y[b].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Kf.call(String(t.nodeName))+">",g}if($a(t)){if(t.length===0)return"[]";var v=js(t,h);return f&&!ox(v)?"["+Ra(v,f)+"]":"[ "+Qt.call(v,", ")+" ]"}if(zw(t)){var S=js(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Zf.call(t,"cause")?"{ ["+String(t)+"] "+Qt.call(Xf.call("[cause]: "+h(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Qt.call(S,", ")+" }"}if(typeof t=="object"&&i){if(nd&&typeof t[nd]=="function"&&Va)return Va(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Qw(t)){var T=[];return Uf&&Uf.call(t,function(L,P){T.push(h(P,t,!0)+" => "+h(L,t))}),ld("Map",Bs.call(t),T,f)}if(ex(t)){var E=[];return Gf&&Gf.call(t,function(L){E.push(h(L,t))}),ld("Set",Rs.call(t),E,f)}if(Zw(t))return Ba("WeakMap");if(tx(t))return Ba("WeakSet");if(Jw(t))return Ba("WeakRef");if(Gw(t))return Ro(h(Number(t)));if(Kw(t))return Ro(h(Na.call(t)));if(Yw(t))return Ro(Lw.call(t));if(Uw(t))return Ro(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof If<"u"&&t===If)return"{ [object globalThis] }";if(!Ww(t)&&!od(t)){var I=js(t,h),A=Jf?Jf(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",O=!A&&bt&&Object(t)===t&&bt in t?Fa.call(An(t),8,-1):k?"Object":"",_=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=_+(O||k?"["+Qt.call(Xf.call([],O||[],k||[]),": ")+"] ":"");return I.length===0?F+"{}":f?F+"{"+Ra(I,f)+"}":F+"{ "+Qt.call(I,", ")+" }"}return String(t)};function rd(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Hw(e){return Pn.call(String(e),/"/g,"&quot;")}function $a(e){return An(e)==="[object Array]"&&(!bt||!(typeof e=="object"&&bt in e))}function Ww(e){return An(e)==="[object Date]"&&(!bt||!(typeof e=="object"&&bt in e))}function od(e){return An(e)==="[object RegExp]"&&(!bt||!(typeof e=="object"&&bt in e))}function zw(e){return An(e)==="[object Error]"&&(!bt||!(typeof e=="object"&&bt in e))}function Uw(e){return An(e)==="[object String]"&&(!bt||!(typeof e=="object"&&bt in e))}function Gw(e){return An(e)==="[object Number]"&&(!bt||!(typeof e=="object"&&bt in e))}function Yw(e){return An(e)==="[object Boolean]"&&(!bt||!(typeof e=="object"&&bt in e))}function sd(e){if(Mr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!_a)return!1;try{return _a.call(e),!0}catch{}return!1}function Kw(e){if(!e||typeof e!="object"||!Na)return!1;try{return Na.call(e),!0}catch{}return!1}var qw=Object.prototype.hasOwnProperty||function(e){return e in this};function In(e,t){return qw.call(e,t)}function An(e){return _w.call(e)}function Xw(e){if(e.name)return e.name;var t=$w.call(Vw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function id(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Qw(e){if(!Bs||!e||typeof e!="object")return!1;try{Bs.call(e);try{Rs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Zw(e){if(!$o||!e||typeof e!="object")return!1;try{$o.call(e,$o);try{Bo.call(e,Bo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Jw(e){if(!Yf||!e||typeof e!="object")return!1;try{return Yf.call(e),!0}catch{}return!1}function ex(e){if(!Rs||!e||typeof e!="object")return!1;try{Rs.call(e);try{Bs.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function tx(e){if(!Bo||!e||typeof e!="object")return!1;try{Bo.call(e,Bo);try{$o.call(e,$o)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function nx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function ad(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return ad(Fa.call(e,0,t.maxStringLength),t)+r}var o=Pn.call(Pn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,rx);return rd(o,"single",t)}function rx(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Bw.call(t.toString(16))}function Ro(e){return"Object("+e+")"}function Ba(e){return e+" { ? }"}function ld(e,t,n,r){var o=r?Ra(n,r):Qt.call(n,", ");return e+" ("+t+") {"+o+"}"}function ox(e){for(var t=0;t<e.length;t++)if(id(e[t],`
2
+ `)>=0)return!1;return!0}function sx(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Qt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Qt.call(Array(t+1),n)}}function Ra(e,t){if(e.length===0)return"";var n=`
3
+ `+t.prev+t.base;return n+Qt.call(e,","+n)+`
4
+ `+t.prev}function js(e,t){var n=$a(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=In(e,o)?t(e[o],e):""}var s=typeof La=="function"?La(e):[],i;if(Mr){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)In(e,l)&&(n&&String(Number(l))===l&&l<e.length||Mr&&i["$"+l]instanceof Symbol||(qf.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof La=="function")for(var c=0;c<s.length;c++)Zf.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var cd=Or,kr=Dw,ix=jw,ax=_o,Hs=cd("%WeakMap%",!0),Ws=cd("%Map%",!0),lx=kr("WeakMap.prototype.get",!0),cx=kr("WeakMap.prototype.set",!0),ux=kr("WeakMap.prototype.has",!0),fx=kr("Map.prototype.get",!0),dx=kr("Map.prototype.set",!0),hx=kr("Map.prototype.has",!0),ja=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},px=function(e,t){var n=ja(e,t);return n&&n.value},mx=function(e,t,n){var r=ja(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},gx=function(e,t){return!!ja(e,t)},yx=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new ax("Side channel does not contain "+ix(s))},get:function(s){if(Hs&&s&&(typeof s=="object"||typeof s=="function")){if(t)return lx(t,s)}else if(Ws){if(n)return fx(n,s)}else if(r)return px(r,s)},has:function(s){if(Hs&&s&&(typeof s=="object"||typeof s=="function")){if(t)return ux(t,s)}else if(Ws){if(n)return hx(n,s)}else if(r)return gx(r,s);return!1},set:function(s,i){Hs&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Hs),cx(t,s,i)):Ws?(n||(n=new Ws),dx(n,s,i)):(r||(r={key:{},next:null}),mx(r,s,i))}};return o},ud=e=>Array.isArray(e),Ha=e=>e===void 0,Wa=e=>e===null,vx=Function.bind.call(Function.call,Object.prototype.toString),bx=e=>!!e&&vx(e)==="[object Error]"||e instanceof Error,fd=(e,t)=>e instanceof t,wx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},xx=e=>Object.prototype.toString.call(e)==="[object Date]"&&fd(e,Date),vn={array:ud,date:xx,empty:e=>Wa(e)||Ha(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:fd,isError:bx,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Wa(e)||Ha(e),null:Wa,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!ud(e)&&typeof e=="object",primitive:wx,string:e=>typeof e=="string",undefined:Ha},za=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=za(s?[]:{},o,n)}else e[r]=za(e[r],o,n)}else e[r]=n;return e},Tx=e=>Object.keys(e),Sx=e=>e.replace("[",".").replace("]","").split("."),Ua=(e,t,n)=>{const r=Array.isArray(t)?t:Sx(t),o=structuredClone(e);return za(o,r,n),o};const Ga="-";function Ex(e){const t=Px(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Ga);return a[0]===""&&a.length!==1&&a.shift(),dd(a,t)||Cx(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function dd(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?dd(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Ga);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const hd=/^\[(.+)\]$/;function Cx(e){if(hd.test(e)){const t=hd.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Px(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ax(Object.entries(e.classGroups),n).forEach(([s,i])=>{Ya(i,r,s,t)}),r}function Ya(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:pd(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Ix(o)){Ya(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Ya(i,pd(t,s),n,r)})})}function pd(e,t){let n=e;return t.split(Ga).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Ix(e){return e.isThemeGetter}function Ax(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function Ox(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const md="!";function Dx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,f;for(let g=0;g<a.length;g++){let y=a[g];if(c===0){if(y===o&&(r||a.slice(g,g+s)===t)){l.push(a.slice(u,g)),u=g+s;continue}if(y==="/"){f=g;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),d=h.startsWith(md),p=d?h.substring(1):h,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function Mx(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function kx(e){return{cache:Ox(e.cacheSize),parseClassName:Dx(e),...Ex(e)}}const Fx=/\s+/;function Nx(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(Fx).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let f=!!u,h=r(f?c.substring(0,u):c);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:i};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:i};f=!1}const d=Mx(a).join(":");return{isTailwindClass:!0,modifierId:l?d+md:d,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(f=>s.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function Lx(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gd(t))&&(r&&(r+=" "),r+=n);return r}function gd(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=gd(e[r]))&&(n&&(n+=" "),n+=t);return n}function _x(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=kx(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=Nx(l,n);return o(l,u),u}return function(){return s(Lx.apply(null,arguments))}}function Ve(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const yd=/^\[(?:([a-z-]+):)?(.+)\]$/i,Vx=/^\d+\/\d+$/,$x=new Set(["px","full","screen"]),Bx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rx=/\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$/,jx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Hx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function bn(e){return tr(e)||$x.has(e)||Vx.test(e)}function On(e){return Fr(e,"length",Qx)}function tr(e){return!!e&&!Number.isNaN(Number(e))}function zs(e){return Fr(e,"number",tr)}function jo(e){return!!e&&Number.isInteger(Number(e))}function zx(e){return e.endsWith("%")&&tr(e.slice(0,-1))}function fe(e){return yd.test(e)}function Dn(e){return Bx.test(e)}const Ux=new Set(["length","size","percentage"]);function Gx(e){return Fr(e,Ux,vd)}function Yx(e){return Fr(e,"position",vd)}const Kx=new Set(["image","url"]);function qx(e){return Fr(e,Kx,Jx)}function Xx(e){return Fr(e,"",Zx)}function Ho(){return!0}function Fr(e,t,n){const r=yd.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Qx(e){return Rx.test(e)&&!jx.test(e)}function vd(){return!1}function Zx(e){return Hx.test(e)}function Jx(e){return Wx.test(e)}function e1(){const e=Ve("colors"),t=Ve("spacing"),n=Ve("blur"),r=Ve("brightness"),o=Ve("borderColor"),s=Ve("borderRadius"),i=Ve("borderSpacing"),a=Ve("borderWidth"),l=Ve("contrast"),c=Ve("grayscale"),u=Ve("hueRotate"),f=Ve("invert"),h=Ve("gap"),d=Ve("gradientColorStops"),p=Ve("gradientColorStopPositions"),m=Ve("inset"),g=Ve("margin"),y=Ve("opacity"),b=Ve("padding"),v=Ve("saturate"),S=Ve("scale"),T=Ve("sepia"),E=Ve("skew"),I=Ve("space"),A=Ve("translate"),k=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",fe,t],F=()=>[fe,t],L=()=>["",bn,On],P=()=>["auto",tr,fe],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",fe],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[tr,zs],q=()=>[tr,fe];return{cacheSize:500,separator:":",theme:{colors:[Ho],spacing:[bn,On],blur:["none","",Dn,fe],brightness:R(),borderColor:[e],borderRadius:["none","","full",Dn,fe],borderSpacing:F(),borderWidth:L(),contrast:R(),grayscale:U(),hueRotate:q(),invert:U(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[zx,On],inset:_(),margin:_(),opacity:R(),padding:F(),saturate:R(),scale:R(),sepia:U(),skew:q(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[Dn]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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"],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:[...D(),fe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",jo,fe]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",jo,fe]}],"grid-cols":[{"grid-cols":[Ho]}],"col-start-end":[{col:["auto",{span:["full",jo,fe]},fe]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Ho]}],"row-start-end":[{row:["auto",{span:[jo,fe]},fe]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,t]}],"min-w":[{"min-w":[fe,t,"min","max","fit"]}],"max-w":[{"max-w":[fe,t,"none","full","min","max","fit","prose",{screen:[Dn]},Dn]}],h:[{h:[fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Dn,On]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zs]}],"font-family":[{font:[Ho]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",fe]}],"line-clamp":[{"line-clamp":["none",tr,zs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bn,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bn,On]}],"underline-offset":[{"underline-offset":["auto",bn,fe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Yx]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gx]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qx]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:N()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[bn,fe]}],"outline-w":[{outline:[bn,On]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[bn,On]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Dn,Xx]}],"shadow-color":[{shadow:[Ho]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Dn,fe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[v]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",fe]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[jo,fe]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bn,On,zs]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-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"],"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"]}}}const t1=_x(e1),Ka=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},n1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),r1=e=>vn.function(e),Oe=(...e)=>t1(k0(e)),bd=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Us=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Nr=w.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return x.jsx(s,{ref:o,...r,children:n})}),o1=Er("relative overflow-hidden inline-flex duration-500 enabled:hover: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 ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Lr=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(Nr,{...l,ref:c,type:s,"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:Oe(o1({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),wd=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function s1(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 i1=({children:e,...t})=>{const n=wd(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:s1(r.current));return w.useLayoutEffect(()=>{const i=r.current;if(i===null)return;const a=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),s(f=>c.isIntersecting?!0:f)});return a.observe(i),()=>a.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},a1=Er("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),l1=Er("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),c1=w.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return x.jsxs(Nr,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:Oe(l1({size:i,theme:s}),t),children:[n?x.jsx("span",{className:a1({theme:n})}):null,r,a.children]})}),_r=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Gs=w.createContext({}),Ys=w.createContext(null),qa=typeof document<"u",Ks=qa?w.useLayoutEffect:w.useEffect,xd=w.createContext({strict:!1}),qs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Td="data-"+qs("framerAppearId"),u1={skipAnimations:!1,useManualTiming:!1};function f1(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,f=!1)=>{const d=f&&r?t:n;return u&&s.add(c),d.has(c)||d.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const Xs=["read","resolveKeyframes","update","preRender","render","postRender"],d1=40;function Sd(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Xs.reduce((y,b)=>(y[b]=f1(s),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:h}=i,d=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,d1),1),o.timestamp=y,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(d))},p=()=>{n=!0,r=!0,o.isProcessing||e(d)};return{schedule:Xs.reduce((y,b)=>{const v=i[b];return y[b]=(S,T=!1,E=!1)=>(n||p(),v.schedule(S,T,E)),y},{}),cancel:y=>{for(let b=0;b<Xs.length;b++)i[Xs[b]].cancel(y)},state:o,steps:i}}const{schedule:Xa,cancel:S2}=Sd(queueMicrotask,!1);function Vr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Ed=w.createContext({});let Cd=!1;function h1(e,t,n,r,o){const{visualElement:s}=w.useContext(Gs),i=w.useContext(xd),a=w.useContext(Ys),l=w.useContext(_r).reducedMotion,c=w.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=w.useContext(Ed);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&m1(c.current,n,o,f),w.useInsertionEffect(()=>{u&&u.update(n,a)});const h=w.useRef(!!(n[Td]&&!window.HandoffComplete));return Ks(()=>{u&&(u.updateFeatures(),Xa.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,Cd||(Cd=!0,queueMicrotask(p1))))}),u}function p1(){window.HandoffComplete=!0}function m1(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Pd(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&Vr(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Pd(e){if(e)return e.options.allowProjection!==!1?e.projection:Pd(e.parent)}function g1(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Vr(n)&&(n.current=r))},[t])}function Wo(e){return typeof e=="string"||Array.isArray(e)}function zo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Qa=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Za=["initial",...Qa];function Qs(e){return zo(e.animate)||Za.some(t=>Wo(e[t]))}function Id(e){return!!(Qs(e)||e.variants)}function y1(e,t){if(Qs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wo(n)?n:void 0,animate:Wo(r)?r:void 0}}return e.inherit!==!1?t:{}}function v1(e){const{initial:t,animate:n}=y1(e,w.useContext(Gs));return w.useMemo(()=>({initial:t,animate:n}),[Ad(t),Ad(n)])}function Ad(e){return Array.isArray(e)?e.join(" "):e}const Od={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},$r={};for(const e in Od)$r[e]={isEnabled:t=>Od[e].some(n=>!!t[n])};function b1(e){for(const t in e)$r[t]={...$r[t],...e[t]}}const Uo=w.createContext({}),w1=Symbol.for("motionComponentSymbol"),pt=e=>e;let Br=pt,Ft=pt;process.env.NODE_ENV!=="production"&&(Br=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ft=(e,t)=>{if(!e)throw new Error(t)});function x1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&b1(e);function s(a,l){let c;const u={...w.useContext(_r),...a,layoutId:T1(a)},{isStatic:f}=u,h=v1(a),d=r(a,f);if(!f&&qa){S1(u,e);const p=E1(u);c=p.MeasureLayout,h.visualElement=h1(o,d,u,t,p.ProjectionNode)}return x.jsxs(Gs.Provider,{value:h,children:[c&&h.visualElement?x.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,g1(d,h.visualElement,l),d,f,h.visualElement)]})}const i=w.forwardRef(s);return i[w1]=o,i}function T1({layoutId:e}){const t=w.useContext(Uo).id;return t&&e!==void 0?t+"-"+e:e}function S1(e,t){const n=w.useContext(xd).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Br(!1,r):Ft(!1,r)}}function E1(e){const{drag:t,layout:n}=$r;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function C1(e){function t(r,o={}){return x1(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const P1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ja(e){return typeof e!="string"||e.includes("-")?!1:!!(P1.indexOf(e)>-1||/[A-Z]/u.test(e))}const Zs={};function I1(e){Object.assign(Zs,e)}const Go=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Mn=new Set(Go);function Dd(e,{layout:t,layoutId:n}){return Mn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zs[e]||e==="opacity")}const it=e=>!!(e&&e.getVelocity),A1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},O1=Go.length;function D1(e,t,n){let r="";for(let o=0;o<O1;o++){const s=Go[o];if(e[s]!==void 0){const i=A1[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Md=e=>t=>typeof t=="string"&&t.startsWith(e),kd=Md("--"),M1=Md("var(--"),el=e=>M1(e)?k1.test(e.split("/*")[0].trim()):!1,k1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,F1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,kn=(e,t,n)=>n>t?t:n<e?e:n,Rr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yo={...Rr,transform:e=>kn(0,1,e)},Js={...Rr,default:1},Ko=e=>Math.round(e*1e5)/1e5,tl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,N1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,L1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function qo(e){return typeof e=="string"}function _1(e){return e==null}const Xo=e=>({test:t=>qo(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Fn=Xo("deg"),Zt=Xo("%"),le=Xo("px"),V1=Xo("vh"),$1=Xo("vw"),Fd={...Zt,parse:e=>Zt.parse(e)/100,transform:e=>Zt.transform(e*100)},Nd={...Rr,transform:Math.round},Ld={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,size:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,rotate:Fn,rotateX:Fn,rotateY:Fn,rotateZ:Fn,scale:Js,scaleX:Js,scaleY:Js,scaleZ:Js,skew:Fn,skewX:Fn,skewY:Fn,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:Yo,originX:Fd,originY:Fd,originZ:le,zIndex:Nd,backgroundPositionX:le,backgroundPositionY:le,fillOpacity:Yo,strokeOpacity:Yo,numOctaves:Nd};function nl(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const f=t[u];if(kd(u)){o[u]=f;continue}const h=Ld[u],d=F1(f,h);if(Mn.has(u)){if(a=!0,s[u]=d,!c)continue;f!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=d):r[u]=d}if(t.transform||(a||n?r.transform=D1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:h=0}=i;r.transformOrigin=`${u} ${f} ${h}`}}const rl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _d(e,t,n){for(const r in t)!it(t[r])&&!Dd(r,n)&&(e[r]=t[r])}function B1({transformTemplate:e},t){return w.useMemo(()=>{const n=rl();return nl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function R1(e,t){const n=e.style||{},r={};return _d(r,n,e),Object.assign(r,B1(e,t)),r}function j1(e,t){const n={},r=R1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const H1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ei(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||H1.has(e)}let Vd=e=>!ei(e);function $d(e){e&&(Vd=t=>t.startsWith("on")?!ei(t):e(t))}try{$d(require("@emotion/is-prop-valid").default)}catch{}function W1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Vd(o)||n===!0&&ei(o)||!t&&!ei(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Bd(e,t,n){return typeof e=="string"?e:le.transform(t+n*e)}function z1(e,t,n){const r=Bd(t,e.x,e.width),o=Bd(n,e.y,e.height);return`${r} ${o}`}const U1={offset:"stroke-dashoffset",array:"stroke-dasharray"},G1={offset:"strokeDashoffset",array:"strokeDasharray"};function Y1(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?U1:G1;e[s.offset]=le.transform(-r);const i=le.transform(t),a=le.transform(n);e[s.array]=`${i} ${a}`}function ol(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(nl(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:d,dimensions:p}=e;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(o!==void 0||s!==void 0||d.transform)&&(d.transformOrigin=z1(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&Y1(h,i,a,l,!1)}const Rd=()=>({...rl(),attrs:{}}),sl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function K1(e,t,n,r){const o=w.useMemo(()=>{const s=Rd();return ol(s,t,sl(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};_d(s,e.style,e),o.style={...s,...o.style}}return o}function q1(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Ja(n)?K1:j1)(r,s,i,n),c=W1(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:f}=r,h=w.useMemo(()=>it(f)?f.get():f,[f]);return w.createElement(n,{...u,children:h})}}function jd(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Hd=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Wd(e,t,n,r){jd(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Hd.has(o)?o:qs(o),t.attrs[o])}function il(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(it(o[i])||t.style&&it(t.style[i])||Dd(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function zd(e,t,n){const r=il(e,t,n);for(const o in e)if(it(e[o])||it(t[o])){const s=Go.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function Ud(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function al(e,t,n,r){if(typeof t=="function"){const[o,s]=Ud(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Ud(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Jt(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const ll=e=>Array.isArray(e),X1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Q1=e=>ll(e)?e[e.length-1]||0:e;function ti(e){const t=it(e)?e.get():e;return X1(t)?t.toValue():t}const Gd=new Set(["opacity","clipPath","filter","transform"]);function Yd(e){if(Mn.has(e))return"transform";if(Gd.has(e))return qs(e)}function ni(e,t){e.indexOf(t)===-1&&e.push(t)}function Qo(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function Z1([...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,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function J1({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:tT(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Kd=e=>(t,n)=>{const r=w.useContext(Gs),o=w.useContext(Ys),s=()=>J1(e,t,r,o,n);return n?s():Jt(s)};function eT(e,t){const n=Yd(t);n&&ni(e,n)}function qd(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=al(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function tT(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const g in c)i[g]=ti(c[g]);let{initial:u,animate:f}=e;const h=Qs(e),d=Id(e);t&&d&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!zo(m)&&qd(e,m,(g,y)=>{for(const b in g){let v=g[b];if(Array.isArray(v)){const S=p?v.length-1:0;v=v[S]}v!==null&&(i[b]=v)}for(const b in y)i[b]=y[b]}),l&&(f&&u!==!1&&!zo(f)&&qd(e,f,g=>{for(const y in g)eT(a,y)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Te,cancel:en,state:mt,steps:cl}=Sd(typeof requestAnimationFrame<"u"?requestAnimationFrame:pt,!0),nT={useVisualState:Kd({scrapeMotionValuesFromProps:zd,createRenderState:Rd,onMount:(e,t,{renderState:n,latestValues:r})=>{Te.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Te.render(()=>{ol(n,r,sl(t.tagName),e.transformTemplate),Wd(t,n)})}})},rT={useVisualState:Kd({applyWillChange:!0,scrapeMotionValuesFromProps:il,createRenderState:rl})};function oT(e,{forwardMotionProps:t=!1},n,r){return{...Ja(e)?nT:rT,preloadedFeatures:n,useRender:q1(t),createVisualElement:r,Component:e}}function wn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Xd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ri(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const sT=e=>t=>Xd(t)&&e(t,ri(t));function xn(e,t,n,r){return wn(e,t,sT(n),r)}const iT=(e,t)=>n=>t(e(n)),Tn=(...e)=>e.reduce(iT);function Qd(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Zd=Qd("dragHorizontal"),Jd=Qd("dragVertical");function eh(e){let t=!1;if(e==="y")t=Jd();else if(e==="x")t=Zd();else{const n=Zd(),r=Jd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function th(){const e=eh(!0);return e?(e(),!1):!0}class Nn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function nh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||th())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Te.postRender(()=>l(s,i))};return xn(e.current,n,o,{passive:!e.getProps()[r]})}class aT extends Nn{mount(){this.unmount=Tn(nh(this.node,!0),nh(this.node,!1))}unmount(){}}class lT extends Nn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Tn(wn(this.node.current,"focus",()=>this.onFocus()),wn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const rh=(e,t)=>t?e===t?!0:rh(e,t.parentElement):!1;function ul(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ri(n))}class cT extends Nn{constructor(){super(...arguments),this.removeStartListeners=pt,this.removeEndListeners=pt,this.removeAccessibleListeners=pt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=xn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),h=!f&&!rh(this.node.current,a.target)?u:c;h&&Te.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=xn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Tn(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||ul("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Te.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=wn(this.node.current,"keyup",i),ul("down",(a,l)=>{this.startPress(a,l)})},n=wn(this.node.current,"keydown",t),r=()=>{this.isPressing&&ul("cancel",(s,i)=>this.cancelPress(s,i))},o=wn(this.node.current,"blur",r);this.removeAccessibleListeners=Tn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Te.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!th()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Te.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=xn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=wn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Tn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const fl=new WeakMap,dl=new WeakMap,uT=e=>{const t=fl.get(e.target);t&&t(e)},fT=e=>{e.forEach(uT)};function dT({root:e,...t}){const n=e||document;dl.has(n)||dl.set(n,{});const r=dl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(fT,{root:e,...t})),r[o]}function hT(e,t,n){const r=dT(t);return fl.set(e,n),r.observe(e),()=>{fl.delete(e),r.unobserve(e)}}const pT={some:0,all:1};class mT extends Nn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:pT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return hT(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(gT(t,n))&&this.startObserver()}unmount(){}}function gT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const yT={inView:{Feature:mT},tap:{Feature:cT},focus:{Feature:lT},hover:{Feature:aT}};function oh(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}function oi(e,t,n){const r=e.getProps();return al(r,t,n!==void 0?n:r.custom,e)}const tn=e=>e*1e3,nn=e=>e/1e3,vT={type:"spring",stiffness:500,damping:25,restSpeed:10},bT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wT={type:"keyframes",duration:.8},xT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TT=(e,{keyframes:t})=>t.length>2?wT:Mn.has(e)?e.startsWith("scale")?bT(t[1]):vT:xT;function ST({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function hl(e,t){return e[t]||e.default||e}const ET=e=>e!==null;function si(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ET),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let ii;function CT(){ii=void 0}const Ln={now:()=>(ii===void 0&&Ln.set(mt.isProcessing||u1.useManualTiming?mt.timestamp:performance.now()),ii),set:e=>{ii=e,queueMicrotask(CT)}},sh=e=>/^0[^.\s]+$/u.test(e);function PT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||sh(e):!0}const ih=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),IT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function AT(e){const t=IT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const OT=4;function ah(e,t,n=1){Ft(n<=OT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=AT(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return ih(i)?parseFloat(i):i}return el(o)?ah(o,t,n+1):o}const DT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),lh=e=>e===Rr||e===le,ch=(e,t)=>parseFloat(e.split(", ")[t]),uh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ch(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?ch(s[1],e):0}},MT=new Set(["x","y","z"]),kT=Go.filter(e=>!MT.has(e));function FT(e){const t=[];return kT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const jr={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:uh(4,13),y:uh(5,14)};jr.translateX=jr.x,jr.translateY=jr.y;const fh=e=>t=>t.test(e),dh=[Rr,le,Zt,Fn,$1,V1,{test:e=>e==="auto",parse:e=>e}],hh=e=>dh.find(fh(e)),nr=new Set;let pl=!1,ml=!1;function ph(){if(ml){const e=Array.from(nr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=FT(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(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ml=!1,pl=!1,nr.forEach(e=>e.complete()),nr.clear()}function mh(){nr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ml=!0)})}function NT(){mh(),ph()}class gl{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(nr.add(this),pl||(pl=!0,Te.read(mh),Te.resolveKeyframes(ph))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),nr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,nr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const yl=(e,t)=>n=>!!(qo(n)&&L1.test(n)&&n.startsWith(e)||t&&!_1(n)&&Object.prototype.hasOwnProperty.call(n,t)),gh=(e,t,n)=>r=>{if(!qo(r))return r;const[o,s,i,a]=r.match(tl);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},LT=e=>kn(0,255,e),vl={...Rr,transform:e=>Math.round(LT(e))},rr={test:yl("rgb","red"),parse:gh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vl.transform(e)+", "+vl.transform(t)+", "+vl.transform(n)+", "+Ko(Yo.transform(r))+")"};function _T(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 bl={test:yl("#"),parse:_T,transform:rr.transform},Hr={test:yl("hsl","hue"),parse:gh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zt.transform(Ko(t))+", "+Zt.transform(Ko(n))+", "+Ko(Yo.transform(r))+")"},wt={test:e=>rr.test(e)||bl.test(e)||Hr.test(e),parse:e=>rr.test(e)?rr.parse(e):Hr.test(e)?Hr.parse(e):bl.parse(e),transform:e=>qo(e)?e:e.hasOwnProperty("red")?rr.transform(e):Hr.transform(e)};function VT(e){var t,n;return isNaN(e)&&qo(e)&&(((t=e.match(tl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(N1))===null||n===void 0?void 0:n.length)||0)>0}const yh="number",vh="color",$T="var",BT="var(",bh="${}",RT=/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 Zo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(RT,l=>(wt.test(l)?(r.color.push(s),o.push(vh),n.push(wt.parse(l))):l.startsWith(BT)?(r.var.push(s),o.push($T),n.push(l)):(r.number.push(s),o.push(yh),n.push(parseFloat(l))),++s,bh)).split(bh);return{values:n,split:a,indexes:r,types:o}}function wh(e){return Zo(e).values}function xh(e){const{split:t,types:n}=Zo(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===yh?s+=Ko(o[i]):a===vh?s+=wt.transform(o[i]):s+=o[i]}return s}}const jT=e=>typeof e=="number"?0:e;function HT(e){const t=wh(e);return xh(e)(t.map(jT))}const _n={test:VT,parse:wh,createTransformer:xh,getAnimatableNone:HT},WT=new Set(["brightness","contrast","saturate","opacity"]);function zT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(tl)||[];if(!r)return e;const o=n.replace(r,"");let s=WT.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const UT=/\b([a-z-]*)\(.*?\)/gu,wl={..._n,getAnimatableNone:e=>{const t=e.match(UT);return t?t.map(zT).join(" "):e}},GT={...Ld,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:wl,WebkitFilter:wl},xl=e=>GT[e];function Th(e,t){let n=xl(e);return n!==wl&&(n=_n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const YT=new Set(["auto","none","0"]);function KT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!YT.has(s)&&Zo(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Th(n,o)}class Sh extends gl{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),el(c))){const u=ah(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!DT.has(r)||t.length!==2)return;const[o,s]=t,i=hh(o),a=hh(s);if(i!==a)if(lh(i)&&lh(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)PT(t[o])&&r.push(o);r.length&&KT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=jr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Eh(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ch=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_n.test(e)||e==="0")&&!e.startsWith("url("));function qT(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 XT(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Ch(o,t),a=Ch(s,t);return Br(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:qT(e)||n==="spring"&&r}class Ph{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&NT(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!XT(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(si(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Ih(e,t){return t?e*(1e3/t):0}const QT=5;function Ah(e,t,n){const r=Math.max(t-QT,0);return Ih(n-e(r),t-r)}const Tl=.001,ZT=.01,Oh=10,JT=.05,eS=1;function tS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Br(e<=tn(Oh),"Spring duration must be 10 seconds or less");let i=1-t;i=kn(JT,eS,i),e=kn(ZT,Oh,nn(e)),i<1?(o=c=>{const u=c*i,f=u*e,h=u-n,d=Sl(c,i),p=Math.exp(-f);return Tl-h/d*p},s=c=>{const f=c*i*e,h=f*n+n,d=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=Sl(Math.pow(c,2),i);return(-o(c)+Tl>0?-1:1)*((h-d)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Tl+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=rS(o,s,a);if(e=tn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const nS=12;function rS(e,t,n){let r=n;for(let o=1;o<nS;o++)r=r-e(r)/t(r);return r}function Sl(e,t){return e*Math.sqrt(1-t*t)}const oS=["duration","bounce"],sS=["stiffness","damping","mass"];function Dh(e,t){return t.some(n=>e[n]!==void 0)}function iS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Dh(e,sS)&&Dh(e,oS)){const n=tS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function El({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:h}=iS({...r,velocity:-nn(r.velocity||0)}),d=f||0,p=l/(2*Math.sqrt(a*c)),m=s-o,g=nn(Math.sqrt(a/c)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let b;if(p<1){const v=Sl(g,p);b=S=>{const T=Math.exp(-p*g*S);return s-T*((d+p*g*m)/v*Math.sin(v*S)+m*Math.cos(v*S))}}else if(p===1)b=v=>s-Math.exp(-g*v)*(m+(d+g*m)*v);else{const v=g*Math.sqrt(p*p-1);b=S=>{const T=Math.exp(-p*g*S),E=Math.min(v*S,300);return s-T*((d+p*g*m)*Math.sinh(E)+v*m*Math.cosh(E))/v}}return{calculatedDuration:h&&u||null,next:v=>{const S=b(v);if(h)i.done=v>=u;else{let T=d;v!==0&&(p<1?T=Ah(b,v,S):T=0);const E=Math.abs(T)<=n,I=Math.abs(s-S)<=t;i.done=E&&I}return i.value=i.done?s:S,i}}}function Mh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*t;const g=f+m,y=i===void 0?g:i(g);y!==g&&(m=y-f);const b=A=>-m*Math.exp(-A/r),v=A=>y+b(A),S=A=>{const k=b(A),O=v(A);h.done=Math.abs(k)<=c,h.value=h.done?y:O};let T,E;const I=A=>{d(h.value)&&(T=A,E=El({keyframes:[h.value,p(h.value)],velocity:Ah(v,A,h.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return I(0),{calculatedDuration:null,next:A=>{let k=!1;return!E&&T===void 0&&(k=!0,S(A),I(A)),T!==void 0&&A>=T?E.next(A-T):(!k&&S(A),h)}}}const kh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,aS=1e-7,lS=12;function cS(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=kh(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>aS&&++a<lS);return i}function Jo(e,t,n,r){if(e===t&&n===r)return pt;const o=s=>cS(s,0,1,e,n);return s=>s===0||s===1?s:kh(o(s),t,r)}const uS=Jo(.42,0,1,1),fS=Jo(0,0,.58,1),Fh=Jo(.42,0,.58,1),Nh=e=>Array.isArray(e)&&typeof e[0]!="number",Lh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,_h=e=>t=>1-e(1-t),Cl=e=>1-Math.sin(Math.acos(e)),Vh=_h(Cl),dS=Lh(Cl),$h=Jo(.33,1.53,.69,.99),Pl=_h($h),hS=Lh(Pl),Bh={linear:pt,easeIn:uS,easeInOut:Fh,easeOut:fS,circIn:Cl,circInOut:dS,circOut:Vh,backIn:Pl,backInOut:hS,backOut:$h,anticipate:e=>(e*=2)<1?.5*Pl(e):.5*(2-Math.pow(2,-10*(e-1)))},Il=e=>{if(Array.isArray(e)){Ft(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Jo(t,n,r,o)}else if(typeof e=="string")return Ft(Bh[e]!==void 0,`Invalid easing type '${e}'`),Bh[e];return e},Wr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$e=(e,t,n)=>e+(t-e)*n;function Al(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 pS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Al(l,a,e+1/3),s=Al(l,a,e),i=Al(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function ai(e,t){return n=>n>0?t:e}const Ol=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},mS=[bl,rr,Hr],gS=e=>mS.find(t=>t.test(e));function Rh(e){const t=gS(e);if(Br(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Hr&&(n=pS(n)),n}const jh=(e,t)=>{const n=Rh(e),r=Rh(t);if(!n||!r)return ai(e,t);const o={...n};return s=>(o.red=Ol(n.red,r.red,s),o.green=Ol(n.green,r.green,s),o.blue=Ol(n.blue,r.blue,s),o.alpha=$e(n.alpha,r.alpha,s),rr.transform(o))},Dl=new Set(["none","hidden"]);function yS(e,t){return Dl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function vS(e,t){return n=>$e(e,t,n)}function Ml(e){return typeof e=="number"?vS:typeof e=="string"?el(e)?ai:wt.test(e)?jh:xS:Array.isArray(e)?Hh:typeof e=="object"?wt.test(e)?jh:bS:ai}function Hh(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Ml(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function bS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Ml(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function wS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const xS=(e,t)=>{const n=_n.createTransformer(t),r=Zo(e),o=Zo(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?Dl.has(e)&&!o.values.length||Dl.has(t)&&!r.values.length?yS(e,t):Tn(Hh(wS(r,o),o.values),n):(Br(!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.`),ai(e,t))};function Wh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?$e(e,t,n):Ml(e)(e,t)}function TS(e,t,n){const r=[],o=n||Wh,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||pt:t;a=Tn(l,a)}r.push(a)}return r}function zh(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Ft(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=TS(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=Wr(e[u],e[u+1],c);return i[u](f)};return n?c=>l(kn(e[0],e[s-1],c)):l}function Uh(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wr(0,t,r);e.push($e(n,1,o))}}function Gh(e){const t=[0];return Uh(t,e.length-1),t}function SS(e,t){return e.map(n=>n*t)}function ES(e,t){return e.map(()=>t||Fh).splice(0,e.length-1)}function li({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Nh(r)?r.map(Il):Il(r),s={done:!1,value:t[0]},i=SS(n&&n.length===t.length?n:Gh(t),e),a=zh(i,t,{ease:Array.isArray(o)?o:ES(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const kl=2e4;function Yh(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<kl;)t+=n,r=e.next(t);return t>=kl?1/0:t}const CS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Te.update(t,!0),stop:()=>en(t),now:()=>mt.isProcessing?mt.timestamp:Ln.now()}},PS={decay:Mh,inertia:Mh,tween:li,keyframes:li,spring:El},IS=e=>e/100;class Fl extends Ph{constructor({KeyframeResolver:t=gl,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=PS[n]||li;let l,c;a!==li&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ft(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Tn(IS,Wh(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Yh(u));const{calculatedDuration:f}=u,h=f+o,d=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:d}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let v=this.currentTime,S=s;if(d){const A=Math.min(this.currentTime,u)/f;let k=Math.floor(A),O=A%1;!O&&A>=1&&(O=1),O===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/f)):p==="mirror"&&(S=i)),v=kn(0,1,O)*f}const T=b?{done:!1,value:l[0]}:S.next(v);a&&(T.value=a(T.value));let{done:E}=T;!b&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return I&&o!==void 0&&(T.value=si(l,this.options,o)),g&&g(T.value),I&&this.finish(),T}get duration(){const{resolved:t}=this;return t?nn(t.calculatedDuration):0}get time(){return nn(this.currentTime)}set time(t){t=tn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=nn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=CS,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Kh=e=>Array.isArray(e)&&typeof e[0]=="number";function qh(e){return!!(!e||typeof e=="string"&&e in Nl||Kh(e)||Array.isArray(e)&&e.every(qh))}const es=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Nl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:es([0,.65,.55,1]),circOut:es([.55,0,1,.45]),backIn:es([.31,.01,.66,-.59]),backOut:es([.33,1.53,.69,.99])};function AS(e){return Xh(e)||Nl.easeOut}function Xh(e){if(e)return Kh(e)?es(e):Array.isArray(e)?e.map(AS):Nl[e]}function OS(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Xh(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const DS=Eh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ci=10,MS=2e4;function kS(e){return e.type==="spring"||!qh(e.ease)}function FS(e,t){const n=new Fl({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<MS;)r=n.sample(s),o.push(r.value),s+=ci;return{times:void 0,keyframes:o,duration:s-ci,ease:"linear"}}class Qh extends Ph{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new Sh(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(kS(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,...p}=this.options,m=FS(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=OS(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Ln.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(si(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return nn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return nn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=tn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return pt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return pt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...h}=this.options,d=new Fl({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=tn(this.time);c.setWithVelocity(d.sample(p-ci).value,d.sample(p).value,ci)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;return DS()&&r&&Gd.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function NS(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Te.update(r,!0),()=>en(r)}const LS=Eh(()=>window.ScrollTimeline!==void 0);class Ll{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}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=>{if(LS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),NS(o=>{r.time=r.duration*o},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 duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const _l=(e,t,n,r={},o,s,i)=>a=>{const l=hl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-tn(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};ST(l)||(f={...f,...TT(e,f)}),f.duration&&(f.duration=tn(f.duration)),f.repeatDelay&&(f.repeatDelay=tn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let h=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(h=!0)),h&&!s&&t.get()!==void 0){const d=si(f.keyframes,l);if(d!==void 0)return Te.update(()=>{f.onUpdate(d),f.onComplete()}),new Ll([])}return!s&&Qh.supports(f)?new Qh(f):new Fl(f)};class Vl{constructor(){this.subscriptions=[]}add(t){return ni(this.subscriptions,t),()=>Qo(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 s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Zh=new Set;function $l(e,t,n){e||Zh.has(t)||(console.warn(t),Zh.add(t))}const Jh=30,_S=e=>!isNaN(parseFloat(e)),ts={current:void 0};class ep{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Ln.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ln.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=_S(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&$l(!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 Vl);const r=this.events[t].add(n);return t==="change"?()=>{r(),Te.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ts.current&&ts.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ln.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Jh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Jh);return Ih(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zr(e,t){return new ep(e,t)}function VS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zr(n))}function $S(e,t){const n=oi(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=Q1(s[i]);VS(e,i,a)}}function tp(e){return e.getProps()[Td]}class BS extends ep{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Yd(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(Qo(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function RS(e){return!!(it(e)&&e.add)}function Bl(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new BS("auto"),e.addValue("willChange",r)),RS(r))return r.add(t)}function jS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Rl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),d=l[f];if(d===void 0||u&&jS(u,f))continue;const p={delay:n,elapsed:0,...hl(i||{},f)};let m=!1;if(window.HandoffAppearAnimations){const y=tp(e);if(y){const b=window.HandoffAppearAnimations(y,f,h,Te);b!==null&&(p.elapsed=b,m=!0)}}h.start(_l(f,h,d,e.shouldReduceMotion&&Mn.has(f)?{type:!1}:p,e,m,Bl(e,f)));const g=h.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Te.update(()=>{a&&$S(e,a)})}),c}function jl(e,t,n={}){var r;const o=oi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Rl(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=s;return HS(e,t,u+c,f,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function HS(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(WS).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(jl(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function WS(e,t){return e.sortNodePosition(t)}function zS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>jl(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=jl(e,t,n);else{const o=typeof t=="function"?oi(e,t,n.custom):t;r=Promise.all(Rl(e,o,n))}return r.then(()=>{Te.postRender(()=>{e.notify("AnimationComplete",t)})})}const US=[...Qa].reverse(),GS=Qa.length;function YS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>zS(e,n,r)))}function KS(e){let t=YS(e),n=np(),r=!0;const o=l=>(c,u)=>{var f;const h=oi(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},f=[],h=new Set;let d={},p=1/0;for(let g=0;g<GS;g++){const y=US[g],b=n[y],v=c[y]!==void 0?c[y]:u[y],S=Wo(v),T=y===l?b.isActive:null;T===!1&&(p=g);let E=v===u[y]&&v!==c[y]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...d},!b.isActive&&T===null||!v&&!b.prevProp||zo(v)||typeof v=="boolean")continue;let A=qS(b.prevProp,v)||y===l&&b.isActive&&!E&&S||g>p&&S,k=!1;const O=Array.isArray(v)?v:[v];let _=O.reduce(o(y),{});T===!1&&(_={});const{prevResolvedValues:F={}}=b,L={...F,..._},P=D=>{A=!0,h.has(D)&&(k=!0,h.delete(D)),b.needsAnimating[D]=!0;const N=e.getValue(D);N&&(N.liveStyle=!1)};for(const D in L){const N=_[D],$=F[D];if(d.hasOwnProperty(D))continue;let H=!1;ll(N)&&ll($)?H=!oh(N,$):H=N!==$,H?N!=null?P(D):h.add(D):N!==void 0&&h.has(D)?P(D):b.protectedKeys[D]=!0}b.prevProp=v,b.prevResolvedValues=_,b.isActive&&(d={...d,..._}),r&&e.blockInitialAnimation&&(A=!1),A&&(!E||k)&&f.push(...O.map(D=>({animation:D,options:{type:y}})))}if(h.size){const g={};h.forEach(y=>{const b=e.getBaseTarget(y),v=e.getValue(y);v&&(v.liveStyle=!0),g[y]=b??null}),f.push({animation:g})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var d;return(d=h.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const f=i(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=np(),r=!0}}}function qS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oh(t,e):!1}function or(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function np(){return{animate:or(!0),whileInView:or(),whileHover:or(),whileTap:or(),whileDrag:or(),whileFocus:or(),exit:or()}}class XS extends Nn{constructor(t){super(t),t.animationState||(t.animationState=KS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let QS=0;class ZS extends Nn{constructor(){super(...arguments),this.id=QS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const JS={animation:{Feature:XS},exit:{Feature:ZS}},rp=(e,t)=>Math.abs(e-t);function eE(e,t){const n=rp(e.x,t.x),r=rp(e.y,t.y);return Math.sqrt(n**2+r**2)}class op{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Wl(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=eE(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:m}=mt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:y}=this.handlers;h||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Hl(h,this.transformPagePoint),Te.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Wl(f.type==="pointercancel"?this.lastMoveEventInfo:Hl(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,g),p&&p(f,g)},!Xd(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=ri(t),a=Hl(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Wl(a,this.history)),this.removeListeners=Tn(xn(this.contextWindow,"pointermove",this.handlePointerMove),xn(this.contextWindow,"pointerup",this.handlePointerUp),xn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),en(this.updatePoint)}}function Hl(e,t){return t?{point:t(e.point)}:e}function sp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wl({point:e},t){return{point:e,delta:sp(e,ip(t)),offset:sp(e,tE(t)),velocity:nE(t,.1)}}function tE(e){return e[0]}function ip(e){return e[e.length-1]}function nE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ip(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>tn(t)));)n--;if(!r)return{x:0,y:0};const s=nn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const ap=1e-4,rE=1-ap,oE=1+ap,lp=.01,sE=0-lp,iE=0+lp;function Nt(e){return e.max-e.min}function aE(e,t,n){return Math.abs(e-t)<=n}function cp(e,t,n,r=.5){e.origin=r,e.originPoint=$e(t.min,t.max,e.origin),e.scale=Nt(n)/Nt(t),e.translate=$e(n.min,n.max,e.origin)-e.originPoint,(e.scale>=rE&&e.scale<=oE||isNaN(e.scale))&&(e.scale=1),(e.translate>=sE&&e.translate<=iE||isNaN(e.translate))&&(e.translate=0)}function ns(e,t,n,r){cp(e.x,t.x,n.x,r?r.originX:void 0),cp(e.y,t.y,n.y,r?r.originY:void 0)}function up(e,t,n){e.min=n.min+t.min,e.max=e.min+Nt(t)}function lE(e,t,n){up(e.x,t.x,n.x),up(e.y,t.y,n.y)}function fp(e,t,n){e.min=t.min-n.min,e.max=e.min+Nt(t)}function rs(e,t,n){fp(e.x,t.x,n.x),fp(e.y,t.y,n.y)}function cE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?$e(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?$e(n,e,r.max):Math.min(e,n)),e}function dp(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function uE(e,{top:t,left:n,bottom:r,right:o}){return{x:dp(e.x,n,o),y:dp(e.y,t,r)}}function hp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function fE(e,t){return{x:hp(e.x,t.x),y:hp(e.y,t.y)}}function dE(e,t){let n=.5;const r=Nt(e),o=Nt(t);return o>r?n=Wr(t.min,t.max-r,e.min):r>o&&(n=Wr(e.min,e.max-o,t.min)),kn(0,1,n)}function hE(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const zl=.35;function pE(e=zl){return e===!1?e=0:e===!0&&(e=zl),{x:pp(e,"left","right"),y:pp(e,"top","bottom")}}function pp(e,t,n){return{min:mp(e,t),max:mp(e,n)}}function mp(e,t){return typeof e=="number"?e:e[t]||0}const gp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ur=()=>({x:gp(),y:gp()}),yp=()=>({min:0,max:0}),Ze=()=>({x:yp(),y:yp()});function jt(e){return[e("x"),e("y")]}function vp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gE(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 Ul(e){return e===void 0||e===1}function Gl({scale:e,scaleX:t,scaleY:n}){return!Ul(e)||!Ul(t)||!Ul(n)}function sr(e){return Gl(e)||bp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bp(e){return wp(e.x)||wp(e.y)}function wp(e){return e&&e!=="0%"}function ui(e,t,n){const r=e-n,o=t*r;return n+o}function xp(e,t,n,r,o){return o!==void 0&&(e=ui(e,o,r)),ui(e,n,r)+t}function Yl(e,t=0,n=1,r,o){e.min=xp(e.min,t,n,r,o),e.max=xp(e.max,t,n,r,o)}function Tp(e,{x:t,y:n}){Yl(e.x,t.translate,t.scale,t.originPoint),Yl(e.y,n.translate,n.scale,n.originPoint)}const Sp=.999999999999,Ep=1.0000000000001;function yE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Tp(e,i)),r&&sr(s.latestValues)&&Gr(e,s.latestValues))}t.x<Ep&&t.x>Sp&&(t.x=1),t.y<Ep&&t.y>Sp&&(t.y=1)}function Vn(e,t){e.min=e.min+t,e.max=e.max+t}function Cp(e,t,n,r,o=.5){const s=$e(e.min,e.max,o);Yl(e,t,n,s,r)}function Gr(e,t){Cp(e.x,t.x,t.scaleX,t.scale,t.originX),Cp(e.y,t.y,t.scaleY,t.scale,t.originY)}function Pp(e,t){return vp(gE(e.getBoundingClientRect(),t))}function vE(e,t,n){const r=Pp(e,n),{scroll:o}=t;return o&&(Vn(r.x,o.offset.x),Vn(r.y,o.offset.y)),r}const Ip=({current:e})=>e?e.ownerDocument.defaultView:null,bE=new WeakMap;class wE{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ri(u,"page").point)},s=(u,f)=>{var h;const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=eh(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),jt(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Zt.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[y];S&&(b=Nt(S)*(parseFloat(b)/100))}}this.originPoint[y]=b}),m&&Te.postRender(()=>m(u,f)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=Bl(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:g}=f;if(d&&this.currentDirection===null){this.currentDirection=xE(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>jt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new op(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Ip(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Te.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!fi(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=cE(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Vr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=uE(o.layoutBox,n):this.constraints=!1,this.elastic=pE(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&jt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=hE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Vr(t))return!1;const r=t.current;Ft(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=vE(r,o.root,this.visualElement.getTransformPagePoint());let i=fE(o.layout.layoutBox,s);if(n){const a=n(mE(i));this.hasMutatedConstraints=!!a,a&&(i=vp(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=jt(u=>{if(!fi(u,n,this.currentDirection))return;let f=l&&l[u]||{};i&&(f={min:0,max:0});const h=o?200:1e6,d=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(_l(t,r,0,n,this.visualElement,!1,Bl(this.visualElement,t)))}stopAnimation(){jt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){jt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){jt(n=>{const{drag:r}=this.getProps();if(!fi(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-$e(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Vr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};jt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=dE({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),jt(i=>{if(!fi(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set($e(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;bE.set(this.visualElement,this);const t=this.visualElement.current,n=xn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Vr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Te.read(r);const i=wn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(jt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=zl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function fi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class TE extends Nn{constructor(t){super(t),this.removeGroupControls=pt,this.removeListeners=pt,this.controls=new wE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ap=e=>(t,n)=>{e&&Te.postRender(()=>e(t,n))};class SE extends Nn{constructor(){super(...arguments),this.removePointerDownListener=pt}onPointerDown(t){this.session=new op(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ip(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ap(t),onStart:Ap(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Te.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=xn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function EE(){const e=w.useContext(Ys);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const di={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Op(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const os={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(le.test(e))e=parseFloat(e);else return e;const n=Op(e,t.target.x),r=Op(e,t.target.y);return`${n}% ${r}%`}},CE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_n.parse(e);if(o.length>5)return r;const s=_n.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=$e(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class PE extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;I1(IE),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),di.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Te.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Xa.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Dp(e){const[t,n]=EE(),r=w.useContext(Uo);return x.jsx(PE,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(Ed),isPresent:t,safeToRemove:n})}const IE={borderRadius:{...os,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:os,borderTopRightRadius:os,borderBottomLeftRadius:os,borderBottomRightRadius:os,boxShadow:CE},Mp=["TopLeft","TopRight","BottomLeft","BottomRight"],AE=Mp.length,kp=e=>typeof e=="string"?parseFloat(e):e,Fp=e=>typeof e=="number"||le.test(e);function OE(e,t,n,r,o,s){o?(e.opacity=$e(0,n.opacity!==void 0?n.opacity:1,DE(r)),e.opacityExit=$e(t.opacity!==void 0?t.opacity:1,0,ME(r))):s&&(e.opacity=$e(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<AE;i++){const a=`border${Mp[i]}Radius`;let l=Np(t,a),c=Np(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Fp(l)===Fp(c)?(e[a]=Math.max($e(kp(l),kp(c),r),0),(Zt.test(c)||Zt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=$e(t.rotate||0,n.rotate||0,r))}function Np(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DE=Lp(0,.5,Vh),ME=Lp(.5,.95,pt);function Lp(e,t,n){return r=>r<e?0:r>t?1:n(Wr(e,t,r))}function _p(e,t){e.min=t.min,e.max=t.max}function Ht(e,t){_p(e.x,t.x),_p(e.y,t.y)}function Vp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function $p(e,t,n,r,o){return e-=t,e=ui(e,1/n,r),o!==void 0&&(e=ui(e,1/o,r)),e}function kE(e,t=0,n=1,r=.5,o,s=e,i=e){if(Zt.test(t)&&(t=parseFloat(t),t=$e(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=$e(s.min,s.max,r);e===s&&(a-=t),e.min=$p(e.min,t,n,a,o),e.max=$p(e.max,t,n,a,o)}function Bp(e,t,[n,r,o],s,i){kE(e,t[n],t[r],t[o],t.scale,s,i)}const FE=["x","scaleX","originX"],NE=["y","scaleY","originY"];function Rp(e,t,n,r){Bp(e.x,t,FE,n?n.x:void 0,r?r.x:void 0),Bp(e.y,t,NE,n?n.y:void 0,r?r.y:void 0)}function jp(e){return e.translate===0&&e.scale===1}function Hp(e){return jp(e.x)&&jp(e.y)}function LE(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Wp(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function zp(e){return Nt(e.x)/Nt(e.y)}function Up(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class _E{constructor(){this.members=[]}add(t){ni(this.members,t),t.scheduleRender()}remove(t){if(Qo(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 s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function VE(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),d&&(r+=`skewX(${d}deg) `),p&&(r+=`skewY(${p}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 $E=(e,t)=>e.depth-t.depth;class BE{constructor(){this.children=[],this.isDirty=!1}add(t){ni(this.children,t),this.isDirty=!0}remove(t){Qo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($E),this.isDirty=!1,this.children.forEach(t)}}function RE(e,t){const n=Ln.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(en(r),e(s-t))};return Te.read(r,!0),()=>en(r)}function Gp(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Kl(e,t,n){const r=it(e)?e:zr(e);return r.start(_l("",r,t,n)),r.animation}const ir={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ql=["","X","Y","Z"],jE={visibility:"hidden"},Yp=1e3;let HE=0;function Xl(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Kp(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?tp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Kp(e.parent):!1:!1}function qp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=HE++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(ir.totalNodes=ir.resolvedTargetDeltas=ir.recalculatedProjection=0),this.nodes.forEach(UE),this.nodes.forEach(XE),this.nodes.forEach(QE),this.nodes.forEach(GE),window.MotionDebug&&window.MotionDebug.record(ir)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,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 BE)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Vl),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Gp(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=RE(h,250),di.hasAnimatedSinceResize&&(di.hasAnimatedSinceResize=!1,this.nodes.forEach(Qp))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||nC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!Wp(this.targetLayout,p)||d,v=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const S={...hl(m,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||Qp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,en(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(ZE),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Kp(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Xp);return}this.isUpdating||this.nodes.forEach(KE),this.isUpdating=!1,this.nodes.forEach(qE),this.nodes.forEach(WE),this.nodes.forEach(zE),this.clearAllSnapshots();const a=Ln.now();mt.delta=kn(0,1e3/60,a-mt.timestamp),mt.timestamp=a,mt.isProcessing=!0,cl.update.process(mt),cl.preRender.process(mt),cl.render.process(mt),mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xa.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(YE),this.sharedNodes.forEach(JE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ze(),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,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Hp(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||sr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),rC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return Ze();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(Vn(a.x,l.offset.x),Vn(a.y,l.offset.y)),a}removeElementScroll(i){const a=Ze();Ht(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Ht(a,i);const{scroll:h}=this.root;h&&(Vn(a.x,-h.offset.x),Vn(a.y,-h.offset.y))}Vn(a.x,u.offset.x),Vn(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=Ze();Ht(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Gr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),sr(u.latestValues)&&Gr(l,u.latestValues)}return sr(this.latestValues)&&Gr(l,this.latestValues),l}removeTransform(i){const a=Ze();Ht(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!sr(c.latestValues))continue;Gl(c.latestValues)&&c.updateSnapshot();const u=Ze(),f=c.measurePageBox();Ht(u,f),Rp(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return sr(this.latestValues)&&Rp(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=mt.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),rs(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),Ht(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ze(),this.targetWithTransforms=Ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ht(this.target,this.layout.layoutBox),Tp(this.target,this.targetDelta)):Ht(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),rs(this.relativeTargetOrigin,this.target,d.target),Ht(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&ir.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Gl(this.parent.latestValues)||bp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===mt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Ht(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;yE(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ze());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Vp(this.prevProjectionDelta.x,this.projectionDelta.x),Vp(this.prevProjectionDelta.y,this.projectionDelta.y)),ns(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Up(this.projectionDelta.x,this.prevProjectionDelta.x)||!Up(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&ir.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ur(),this.projectionDelta=Ur(),this.projectionDeltaWithTransform=Ur()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Ur();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Ze(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,g=this.getStack(),y=!g||g.members.length<=1,b=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(tC));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const T=S/1e3;Zp(f.x,i.x,T),Zp(f.y,i.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rs(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),eC(this.relativeTarget,this.relativeTargetOrigin,h,T),v&&LE(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Ze()),Ht(v,this.relativeTarget)),m&&(this.animationValues=u,OE(u,c,this.latestValues,T,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(en(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Te.update(()=>{di.hasAnimatedSinceResize=!0,this.currentAnimation=Kl(0,Yp,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yp),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&rm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ze();const f=Nt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const h=Nt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}Ht(a,l),Gr(a,u),ns(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new _E),this.sharedNodes.get(i).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 i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Xl("z",i,c,this.animationValues);for(let u=0;u<ql.length;u++)Xl(`rotate${ql[u]}`,i,c,this.animationValues),Xl(`skew${ql[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jE;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ti(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ti(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!sr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=VE(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in Zs){if(h[m]===void 0)continue;const{correct:g,applyTo:y}=Zs[m],b=c.transform==="none"?h[m]:g(h[m],f);if(y){const v=y.length;for(let S=0;S<v;S++)c[y[S]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?ti(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Xp),this.root.sharedNodes.clear()}}}function WE(e){e.updateLayout()}function zE(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?jt(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=Nt(h);h.min=r[f].min,h.max=h.min+d}):rm(s,n.layoutBox,r)&&jt(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=Nt(r[f]);h.max=h.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});const a=Ur();ns(a,r,n.layoutBox);const l=Ur();i?ns(l,e.applyTransform(o,!0),n.measuredBox):ns(l,r,n.layoutBox);const c=!Hp(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=Ze();rs(p,n.layoutBox,h.layoutBox);const m=Ze();rs(m,r,d.layoutBox),Wp(p,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function UE(e){window.MotionDebug&&ir.totalNodes++,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 GE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function YE(e){e.clearSnapshot()}function Xp(e){e.clearMeasurements()}function KE(e){e.isLayoutDirty=!1}function qE(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Qp(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function XE(e){e.resolveTargetDelta()}function QE(e){e.calcProjection()}function ZE(e){e.resetSkewAndRotation()}function JE(e){e.removeLeadSnapshot()}function Zp(e,t,n){e.translate=$e(t.translate,0,n),e.scale=$e(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Jp(e,t,n,r){e.min=$e(t.min,n.min,r),e.max=$e(t.max,n.max,r)}function eC(e,t,n,r){Jp(e.x,t.x,n.x,r),Jp(e.y,t.y,n.y,r)}function tC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const nC={duration:.45,ease:[.4,0,.1,1]},em=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),tm=em("applewebkit/")&&!em("chrome/")?Math.round:pt;function nm(e){e.min=tm(e.min),e.max=tm(e.max)}function rC(e){nm(e.x),nm(e.y)}function rm(e,t,n){return e==="position"||e==="preserve-aspect"&&!aE(zp(t),zp(n),.2)}const oC=qp({attachResizeListener:(e,t)=>wn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ql={current:void 0},om=qp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ql.current){const e=new oC({});e.mount(window),e.setOptions({layoutScroll:!0}),Ql.current=e}return Ql.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),sC={pan:{Feature:SE},drag:{Feature:TE,ProjectionNode:om,MeasureLayout:Dp}},Zl={current:null},sm={current:!1};function iC(){if(sm.current=!0,!!qa)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zl.current=e.matches;e.addListener(t),t()}else Zl.current=!1}function aC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(it(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&$l(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(it(s))e.addValue(r,zr(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,zr(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ss=new WeakMap,lC=[...dh,wt,_n],cC=e=>lC.find(fh(e)),im=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],uC=Za.length;class fC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,d,p,m)=>new this.KeyframeResolver(h,d,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Te.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Qs(n),this.isVariantNode=Id(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const d=f[h];l[h]!==void 0&&it(d)&&d.set(l[h],!1)}}mount(t){this.current=t,ss.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)),sm.current||iC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zl.current,process.env.NODE_ENV!=="production"&&$l(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ss.delete(this.current),this.projection&&this.projection.unmount(),en(this.notifyUpdate),en(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Mn.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),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 $r){const n=$r[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 s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}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<im.length;r++){const o=im[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=aC(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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<uC;r++){const o=Za[r],s=this.props[o];(Wo(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ih(o)||sh(o))?o=parseFloat(o):!cC(o)&&_n.test(n)&&(o=Th(t,n)),this.setBaseTarget(t,it(o)?o.get():o)),it(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=al(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!it(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Vl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class am extends fC{constructor(){super(...arguments),this.KeyframeResolver=Sh}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function dC(e){return window.getComputedStyle(e)}class lm extends am{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=jd}readValueFromInstance(t,n){if(Mn.has(n)){const r=xl(n);return r&&r.default||0}else{const r=dC(t),o=(kd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Pp(t,n)}build(t,n,r){nl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return il(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;it(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class cm extends am{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Mn.has(n)){const r=xl(n);return r&&r.default||0}return n=Hd.has(n)?n:qs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return zd(t,n,r)}build(t,n,r){ol(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Wd(t,n,r,o)}mount(t){this.isSVGTag=sl(t.tagName),super.mount(t)}}const hC=(e,t)=>Ja(e)?new cm(t):new lm(t,{allowProjection:e!==w.Fragment}),pC={...JS,...yT,...sC,...{layout:{ProjectionNode:om,MeasureLayout:Dp}}},ft=C1((e,t)=>oT(e,t,pC,hC));function um(){const e=w.useRef(!1);return Ks(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fm(){const e=um(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Te.postRender(r),[r]),t]}class mC extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function gC({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=w.useContext(_r);return w.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
5
5
  [data-motion-pop-id="${n}"] {
6
6
  position: absolute !important;
7
7
  width: ${i}px !important;
@@ -9,137 +9,137 @@
9
9
  top: ${l}px !important;
10
10
  left: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(u)}},[t]),x.jsx(hC,{isPresent:t,childRef:r,sizeRef:o,children:C.cloneElement(e,{ref:r})})}const Xl=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=Zt(mC),l=w.useId(),c=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return w.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),C.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(pC,{isPresent:n,children:e})),x.jsx(Gs.Provider,{value:c,children:e})};function mC(){return new Map}function fm(e){return w.useEffect(()=>()=>e(),[])}const ir=e=>e.key||"";function gC(e,t){e.forEach(n=>{const r=ir(n);t.set(r,n)})}function yC(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const Gr=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{Ft(!o,"Replace exitBeforeEnter with mode='wait'");const a=w.useContext(zo).forceRender||um()[0],l=cm(),c=yC(e);let u=c;const f=w.useRef(new Map).current,h=w.useRef(u),d=w.useRef(new Map).current,p=w.useRef(!0);if(Ys(()=>{p.current=!1,gC(c,d),h.current=u}),fm(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(b=>x.jsx(Xl,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:b},ir(b)))});u=[...u];const m=h.current.map(ir),g=c.map(ir),y=m.length;for(let b=0;b<y;b++){const v=m[b];g.indexOf(v)===-1&&!f.has(v)&&f.set(v,void 0)}return i==="wait"&&f.size&&(u=[]),f.forEach((b,v)=>{if(g.indexOf(v)!==-1)return;const S=d.get(v);if(!S)return;const T=m.indexOf(v);let E=b;if(!E){const I=()=>{f.delete(v);const A=Array.from(d.keys()).filter(k=>!g.includes(k));if(A.forEach(k=>d.delete(k)),h.current=c.filter(k=>{const O=ir(k);return O===v||A.includes(O)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(Xl,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:s,mode:i,children:S},ir(S)),f.set(v,E)}u.splice(T,0,E)}),u=u.map(b=>{const v=b.key;return f.has(v)?b:x.jsx(Xl,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:b},ir(b))}),process.env.NODE_ENV!=="production"&&i==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:f.size?u:u.map(b=>w.cloneElement(b))})};function vC({children:e,isValidProp:t,...n}){t&&Vd(t),n={...w.useContext(Lr),...n},n.isStatic=Zt(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Lr.Provider,{value:r,children:e})}const bC=w.createContext(null),wC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function dm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(wC);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 hm=e=>e===!0,xC=e=>hm(e===!0)||e==="id",TC=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(zo),o=w.useContext(bC),[s,i]=um(),a=w.useRef(null),l=r.id||o;a.current===null&&(xC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:hm(n)&&r.group||dm()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(zo.Provider,{value:c,children:e})},pm=w.createContext(null);function SC(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=$e(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?X1(e,o,o+s):e}function EC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=Zt(()=>ft(t)),l=[],c=w.useRef(!1);Ft(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,h)=>{const d=l.findIndex(p=>f===p.value);d!==-1?l[d].layout=h[n]:l.push({value:f,layout:h[n]}),l.sort(IC)},updateOrder:(f,h,d)=>{if(c.current)return;const p=SC(l,f,h,d);l!==p&&(c.current=!0,r(p.map(PC).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(pm.Provider,{value:u,children:e})})}const CC=w.forwardRef(EC);function PC(e){return e.value}function IC(e,t){return e.layout.min-t.layout.min}function ar(e){const t=Zt(()=>Hr(e)),{isStatic:n}=w.useContext(Lr);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}const AC=e=>e&&typeof e=="object"&&e.mix,OC=e=>AC(e)?e.mix:void 0;function DC(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Hh(o,s,{mixer:OC(s[0]),...i});return t?a(r):a}function mm(e,t){const n=ar(t()),r=()=>n.set(t());return r(),Ys(()=>{const o=()=>Te.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Jt(r)}}),n}function MC(e){es.current=[],e();const t=mm(es.current,e);return es.current=void 0,t}function kC(e,t,n,r){if(typeof e=="function")return MC(e);const o=typeof t=="function"?t:DC(t,n,r);return Array.isArray(e)?gm(e,o):gm([e],([s])=>o(s))}function gm(e,t){const n=Zt(()=>[]);return mm(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ym(e,t=0){return it(e)?e:ar(t)}function FC({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=Zt(()=>ft(r)),c=w.useContext(pm),u={x:ym(t.x),y:ym(t.y)},f=kC([u.x,u.y],([m,g])=>m||g?1:"unset");Ft(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:d,updateOrder:p}=c;return x.jsx(l,{drag:h,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:f},layout:s,onDrag:(m,g)=>{const{velocity:y}=g;y[h]&&p(n,u[h].get(),y[h]),o&&o(m,g)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:e})}const NC=w.forwardRef(FC),di={Group:CC,Item:NC};function vm(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Ft(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function LC(e){return typeof e=="object"&&!Array.isArray(e)}function _C(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Up(e)?new lm(t):new am(t);n.mount(e),os.set(e,n)}function VC(e,t=100){const n=xl({keyframes:[0,t],...e}),r=Math.min(Gh(n),Ol);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:tn(r)}}function bm(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}const $C=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function BC(e,t){return Fh(e)?e[$C(0,e.length,t)]:e}function RC(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Xo(e,o),r--)}}function jC(e,t,n,r,o,s){RC(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:$e(o,s,r[i]),easing:BC(n,i)})}function WC(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const HC="easeInOut";function zC(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,s=new Map,i=new Map,a={},l=new Map;let c=0,u=0,f=0;for(let h=0;h<e.length;h++){const d=e[h];if(typeof d=="string"){l.set(d,u);continue}else if(!Array.isArray(d)){l.set(d.name,bm(u,d.at,c,l));continue}let[p,m,g={}]=d;g.at!==void 0&&(u=bm(u,g.at,c,l));let y=0;const b=(v,S,T,E=0,I=0)=>{const A=UC(v),{delay:k=0,times:O=Uh(A),type:_="keyframes",...F}=S;let{ease:L=t.ease||"easeOut",duration:P}=S;const D=typeof k=="function"?k(E,I):k,N=A.length;if(N<=2&&_==="spring"){let M=100;if(N===2&&KC(A)){const ee=A[1]-A[0];M=Math.abs(ee)}const R={...F};P!==void 0&&(R.duration=en(P));const q=VC(R,M);L=q.ease,P=q.duration}P??(P=o);const $=u+D,W=$+P;O.length===1&&O[0]===0&&(O[1]=1);const U=O.length-A.length;U>0&&zh(O,U),A.length===1&&A.unshift(null),jC(T,A,L,O,$,W),y=Math.max(D+P,y),f=Math.max(W,f)};if(it(p)){const v=wm(p,i);b(m,g,xm("default",v))}else{const v=vm(p,r,a),S=v.length;for(let T=0;T<S;T++){m=m,g=g;const E=v[T],I=wm(E,i);for(const A in m)b(m[A],GC(g,A),xm(A,I),T,S)}}c=u,u+=y}return i.forEach((h,d)=>{for(const p in h){const m=h[p];m.sort(WC);const g=[],y=[],b=[];for(let S=0;S<m.length;S++){const{at:T,value:E,easing:I}=m[S];g.push(E),y.push(Wr(0,f,T)),b.push(I||"easeOut")}y[0]!==0&&(y.unshift(0),g.unshift(g[0]),b.unshift(HC)),y[y.length-1]!==1&&(y.push(1),g.push(null)),s.has(d)||s.set(d,{keyframes:{},transition:{}});const v=s.get(d);v.keyframes[p]=g,v.transition[p]={...t,duration:f,ease:b,times:y,...n}}}),s}function wm(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function xm(e,t){return t[e]||(t[e]=[]),t[e]}function UC(e){return Array.isArray(e)?e:[e]}function GC(e,t){return e[t]?{...e,...e[t]}:{...e}}const YC=e=>typeof e=="number",KC=e=>e.every(YC);function Tm(e,t,n,r){const o=vm(e,r),s=o.length;Ft(!!s,"No valid element provided.");const i=[];for(let a=0;a<s;a++){const l=o[a];os.has(l)||_C(l);const c=os.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,s)),i.push(...Vl(c,{...t,transition:u},{}))}return new kl(i)}const qC=e=>Array.isArray(e)&&Array.isArray(e[0]);function XC(e,t,n){const r=[];return zC(e,t,n).forEach(({keyframes:s,transition:i},a)=>{let l;it(a)?l=Ul(a,s.default,i.default):l=Tm(a,s,i),r.push(l)}),new kl(r)}const QC=e=>{function t(n,r,o){let s;return qC(n)?s=XC(n,r,e):LC(r)?s=Tm(n,r,o,e):s=Ul(n,r,o),e&&e.animations.push(s),s}return t};function ZC(){const e=Zt(()=>({current:null,animations:[]})),t=Zt(()=>QC(e));return fm(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class JC{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const eP=()=>new JC;function tP(){return Zt(eP)}function nP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function rP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:nP(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=El(r)(l/c)*c}return t+l}}/**
12
+ `),()=>{document.head.removeChild(u)}},[t]),x.jsx(mC,{isPresent:t,childRef:r,sizeRef:o,children:C.cloneElement(e,{ref:r})})}const Jl=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=Jt(yC),l=w.useId(),c=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return w.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),C.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(gC,{isPresent:n,children:e})),x.jsx(Ys.Provider,{value:c,children:e})};function yC(){return new Map}function dm(e){return w.useEffect(()=>()=>e(),[])}const ar=e=>e.key||"";function vC(e,t){e.forEach(n=>{const r=ar(n);t.set(r,n)})}function bC(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const Yr=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{Ft(!o,"Replace exitBeforeEnter with mode='wait'");const a=w.useContext(Uo).forceRender||fm()[0],l=um(),c=bC(e);let u=c;const f=w.useRef(new Map).current,h=w.useRef(u),d=w.useRef(new Map).current,p=w.useRef(!0);if(Ks(()=>{p.current=!1,vC(c,d),h.current=u}),dm(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(b=>x.jsx(Jl,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:b},ar(b)))});u=[...u];const m=h.current.map(ar),g=c.map(ar),y=m.length;for(let b=0;b<y;b++){const v=m[b];g.indexOf(v)===-1&&!f.has(v)&&f.set(v,void 0)}return i==="wait"&&f.size&&(u=[]),f.forEach((b,v)=>{if(g.indexOf(v)!==-1)return;const S=d.get(v);if(!S)return;const T=m.indexOf(v);let E=b;if(!E){const I=()=>{f.delete(v);const A=Array.from(d.keys()).filter(k=>!g.includes(k));if(A.forEach(k=>d.delete(k)),h.current=c.filter(k=>{const O=ar(k);return O===v||A.includes(O)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(Jl,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:s,mode:i,children:S},ar(S)),f.set(v,E)}u.splice(T,0,E)}),u=u.map(b=>{const v=b.key;return f.has(v)?b:x.jsx(Jl,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:b},ar(b))}),process.env.NODE_ENV!=="production"&&i==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:f.size?u:u.map(b=>w.cloneElement(b))})};function wC({children:e,isValidProp:t,...n}){t&&$d(t),n={...w.useContext(_r),...n},n.isStatic=Jt(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(_r.Provider,{value:r,children:e})}const xC=w.createContext(null),TC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function hm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(TC);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 pm=e=>e===!0,SC=e=>pm(e===!0)||e==="id",EC=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(Uo),o=w.useContext(xC),[s,i]=fm(),a=w.useRef(null),l=r.id||o;a.current===null&&(SC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:pm(n)&&r.group||hm()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(Uo.Provider,{value:c,children:e})},mm=w.createContext(null);function CC(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=$e(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?Z1(e,o,o+s):e}function PC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=Jt(()=>ft(t)),l=[],c=w.useRef(!1);Ft(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,h)=>{const d=l.findIndex(p=>f===p.value);d!==-1?l[d].layout=h[n]:l.push({value:f,layout:h[n]}),l.sort(OC)},updateOrder:(f,h,d)=>{if(c.current)return;const p=CC(l,f,h,d);l!==p&&(c.current=!0,r(p.map(AC).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(mm.Provider,{value:u,children:e})})}const IC=w.forwardRef(PC);function AC(e){return e.value}function OC(e,t){return e.layout.min-t.layout.min}function lr(e){const t=Jt(()=>zr(e)),{isStatic:n}=w.useContext(_r);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}const DC=e=>e&&typeof e=="object"&&e.mix,MC=e=>DC(e)?e.mix:void 0;function kC(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=zh(o,s,{mixer:MC(s[0]),...i});return t?a(r):a}function gm(e,t){const n=lr(t()),r=()=>n.set(t());return r(),Ks(()=>{const o=()=>Te.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),en(r)}}),n}function FC(e){ts.current=[],e();const t=gm(ts.current,e);return ts.current=void 0,t}function NC(e,t,n,r){if(typeof e=="function")return FC(e);const o=typeof t=="function"?t:kC(t,n,r);return Array.isArray(e)?ym(e,o):ym([e],([s])=>o(s))}function ym(e,t){const n=Jt(()=>[]);return gm(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function vm(e,t=0){return it(e)?e:lr(t)}function LC({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=Jt(()=>ft(r)),c=w.useContext(mm),u={x:vm(t.x),y:vm(t.y)},f=NC([u.x,u.y],([m,g])=>m||g?1:"unset");Ft(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:d,updateOrder:p}=c;return x.jsx(l,{drag:h,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:f},layout:s,onDrag:(m,g)=>{const{velocity:y}=g;y[h]&&p(n,u[h].get(),y[h]),o&&o(m,g)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:e})}const _C=w.forwardRef(LC),hi={Group:IC,Item:_C};function bm(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Ft(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function VC(e){return typeof e=="object"&&!Array.isArray(e)}function $C(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Gp(e)?new cm(t):new lm(t);n.mount(e),ss.set(e,n)}function BC(e,t=100){const n=El({keyframes:[0,t],...e}),r=Math.min(Yh(n),kl);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:nn(r)}}function wm(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}const RC=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function jC(e,t){return Nh(e)?e[RC(0,e.length,t)]:e}function HC(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Qo(e,o),r--)}}function WC(e,t,n,r,o,s){HC(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:$e(o,s,r[i]),easing:jC(n,i)})}function zC(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const UC="easeInOut";function GC(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,s=new Map,i=new Map,a={},l=new Map;let c=0,u=0,f=0;for(let h=0;h<e.length;h++){const d=e[h];if(typeof d=="string"){l.set(d,u);continue}else if(!Array.isArray(d)){l.set(d.name,wm(u,d.at,c,l));continue}let[p,m,g={}]=d;g.at!==void 0&&(u=wm(u,g.at,c,l));let y=0;const b=(v,S,T,E=0,I=0)=>{const A=YC(v),{delay:k=0,times:O=Gh(A),type:_="keyframes",...F}=S;let{ease:L=t.ease||"easeOut",duration:P}=S;const D=typeof k=="function"?k(E,I):k,N=A.length;if(N<=2&&_==="spring"){let M=100;if(N===2&&XC(A)){const ee=A[1]-A[0];M=Math.abs(ee)}const R={...F};P!==void 0&&(R.duration=tn(P));const q=BC(R,M);L=q.ease,P=q.duration}P??(P=o);const $=u+D,H=$+P;O.length===1&&O[0]===0&&(O[1]=1);const U=O.length-A.length;U>0&&Uh(O,U),A.length===1&&A.unshift(null),WC(T,A,L,O,$,H),y=Math.max(D+P,y),f=Math.max(H,f)};if(it(p)){const v=xm(p,i);b(m,g,Tm("default",v))}else{const v=bm(p,r,a),S=v.length;for(let T=0;T<S;T++){m=m,g=g;const E=v[T],I=xm(E,i);for(const A in m)b(m[A],KC(g,A),Tm(A,I),T,S)}}c=u,u+=y}return i.forEach((h,d)=>{for(const p in h){const m=h[p];m.sort(zC);const g=[],y=[],b=[];for(let S=0;S<m.length;S++){const{at:T,value:E,easing:I}=m[S];g.push(E),y.push(Wr(0,f,T)),b.push(I||"easeOut")}y[0]!==0&&(y.unshift(0),g.unshift(g[0]),b.unshift(UC)),y[y.length-1]!==1&&(y.push(1),g.push(null)),s.has(d)||s.set(d,{keyframes:{},transition:{}});const v=s.get(d);v.keyframes[p]=g,v.transition[p]={...t,duration:f,ease:b,times:y,...n}}}),s}function xm(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Tm(e,t){return t[e]||(t[e]=[]),t[e]}function YC(e){return Array.isArray(e)?e:[e]}function KC(e,t){return e[t]?{...e,...e[t]}:{...e}}const qC=e=>typeof e=="number",XC=e=>e.every(qC);function Sm(e,t,n,r){const o=bm(e,r),s=o.length;Ft(!!s,"No valid element provided.");const i=[];for(let a=0;a<s;a++){const l=o[a];ss.has(l)||$C(l);const c=ss.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,s)),i.push(...Rl(c,{...t,transition:u},{}))}return new Ll(i)}const QC=e=>Array.isArray(e)&&Array.isArray(e[0]);function ZC(e,t,n){const r=[];return GC(e,t,n).forEach(({keyframes:s,transition:i},a)=>{let l;it(a)?l=Kl(a,s.default,i.default):l=Sm(a,s,i),r.push(l)}),new Ll(r)}const JC=e=>{function t(n,r,o){let s;return QC(n)?s=ZC(n,r,e):VC(r)?s=Sm(n,r,o,e):s=Kl(n,r,o),e&&e.animations.push(s),s}return t};function eP(){const e=Jt(()=>({current:null,animations:[]})),t=Jt(()=>JC(e));return dm(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class tP{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const nP=()=>new tP;function rP(){return Jt(nP)}function oP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function sP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:oP(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=Il(r)(l/c)*c}return t+l}}/**
13
13
  * @license lucide-react v0.414.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
- */const oP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Sm=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
17
+ */const iP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Em=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
18
18
  * @license lucide-react v0.414.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
- */var sP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
22
+ */var aP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
23
23
  * @license lucide-react v0.414.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const iP=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>w.createElement("svg",{ref:l,...sP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Sm("lucide",o),...a},[...i.map(([c,u])=>w.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
27
+ */const lP=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>w.createElement("svg",{ref:l,...aP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Em("lucide",o),...a},[...i.map(([c,u])=>w.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
28
28
  * @license lucide-react v0.414.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const Ge=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(iP,{ref:s,iconNode:t,className:Sm(`lucide-${oP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
32
+ */const Ge=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(lP,{ref:s,iconNode:t,className:Em(`lucide-${iP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
33
33
  * @license lucide-react v0.414.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const aP=Ge("ArrowDown01",[["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"}]]);/**
37
+ */const cP=Ge("ArrowDown01",[["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"}]]);/**
38
38
  * @license lucide-react v0.414.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const lP=Ge("ArrowUp01",[["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"}]]);/**
42
+ */const uP=Ge("ArrowUp01",[["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"}]]);/**
43
43
  * @license lucide-react v0.414.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const Em=Ge("ArrowUpDown",[["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"}]]);/**
47
+ */const Cm=Ge("ArrowUpDown",[["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"}]]);/**
48
48
  * @license lucide-react v0.414.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const cP=Ge("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"}]]);/**
52
+ */const fP=Ge("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"}]]);/**
53
53
  * @license lucide-react v0.414.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const uP=Ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
57
+ */const dP=Ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
58
58
  * @license lucide-react v0.414.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const Cm=Ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
62
+ */const Pm=Ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
63
63
  * @license lucide-react v0.414.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const fP=Ge("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
67
+ */const hP=Ge("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
68
68
  * @license lucide-react v0.414.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const Ql=Ge("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
+ */const ec=Ge("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
73
73
  * @license lucide-react v0.414.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const Pm=Ge("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
77
+ */const Im=Ge("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
78
78
  * @license lucide-react v0.414.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const dP=Ge("CircleX",[["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"}]]);/**
82
+ */const pP=Ge("CircleX",[["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"}]]);/**
83
83
  * @license lucide-react v0.414.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const Im=Ge("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
87
+ */const Am=Ge("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
88
88
  * @license lucide-react v0.414.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const hP=Ge("GripVertical",[["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"}]]);/**
92
+ */const mP=Ge("GripVertical",[["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"}]]);/**
93
93
  * @license lucide-react v0.414.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const Am=Ge("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
97
+ */const Om=Ge("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
98
98
  * @license lucide-react v0.414.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const pP=Ge("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
102
+ */const gP=Ge("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
103
103
  * @license lucide-react v0.414.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const Zl=Ge("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
107
+ */const tc=Ge("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
108
108
  * @license lucide-react v0.414.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const mP=Ge("SearchCheck",[["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"}]]);/**
112
+ */const yP=Ge("SearchCheck",[["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"}]]);/**
113
113
  * @license lucide-react v0.414.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const gP=Ge("SearchX",[["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"}]]);/**
117
+ */const vP=Ge("SearchX",[["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"}]]);/**
118
118
  * @license lucide-react v0.414.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const Yr=Ge("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
122
+ */const Kr=Ge("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
123
123
  * @license lucide-react v0.414.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const yP=Ge("TriangleAlert",[["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"}]]);/**
127
+ */const bP=Ge("TriangleAlert",[["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"}]]);/**
128
128
  * @license lucide-react v0.414.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const vP=Ge("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"}]]);/**
132
+ */const wP=Ge("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"}]]);/**
133
133
  * @license lucide-react v0.414.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const bP=Ge("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
137
+ */const xP=Ge("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
138
138
  * @license lucide-react v0.414.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const Jl=Ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Om={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},wP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Dm=e=>x.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Om,exit:Om.false,transition:wP,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),xP=Sr("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),TP=w.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:Oe("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Dm,{"data-open":!!s,open:!!s,children:x.jsxs(Fr,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:Oe(xP({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Pm,{size:20}):null,!r&&n==="info"?x.jsx(Am,{size:20}):null,!r&&n==="danger"?x.jsx(yP,{size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?x.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(Jl,{size:20})}):null]})})})});function Se(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Be(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Kr(e,t){const n=Se(e);return isNaN(t)?Be(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function hi(e,t){const n=Se(e);if(isNaN(t))return Be(e,NaN);if(!t)return n;const r=n.getDate(),o=Be(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Mm=6048e5,SP=864e5,EP=6e4,CP=36e5,PP=1e3;let IP={};function lr(){return IP}function nn(e,t){var a,l,c,u;const n=lr(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Se(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function qr(e){return nn(e,{weekStartsOn:1})}function km(e){const t=Se(e),n=t.getFullYear(),r=Be(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=qr(r),s=Be(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=qr(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Xr(e){const t=Se(e);return t.setHours(0,0,0,0),t}function pi(e){const t=Se(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function AP(e,t){const n=Xr(e),r=Xr(t),o=+n-pi(n),s=+r-pi(r);return Math.round((o-s)/SP)}function OP(e){const t=km(e),n=Be(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),qr(n)}function Fm(e,t){const n=t*7;return Kr(e,n)}function Nm(e,t){return hi(e,t*12)}function DP(e){return Be(e,Date.now())}function MP(e,t){const n=Xr(e),r=Xr(t);return+n==+r}function kP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Lm(e){if(!kP(e)&&typeof e!="number")return!1;const t=Se(e);return!isNaN(Number(t))}function _m(e,t){const n=Se(e.start),r=Se(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(Se(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Vm(e){const t=Se(e);return t.setDate(1),t.setHours(0,0,0,0),t}function FP(e){const t=Se(e),n=Be(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function NP(e,t){var a,l;const n=lr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Se(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const LP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_P=(e,t,n)=>{let r;const o=LP[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ec(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const VP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$P={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},RP={date:ec({formats:VP,defaultWidth:"full"}),time:ec({formats:$P,defaultWidth:"full"}),dateTime:ec({formats:BP,defaultWidth:"full"})},jP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},WP=(e,t,n,r)=>jP[e];function ss(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const HP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},UP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},GP={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},YP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},KP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},qP={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ss({values:HP,defaultWidth:"wide"}),quarter:ss({values:zP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ss({values:UP,defaultWidth:"wide"}),day:ss({values:GP,defaultWidth:"wide"}),dayPeriod:ss({values:YP,defaultWidth:"wide",formattingValues:KP,defaultFormattingWidth:"wide"})};function is(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?QP(a,f=>f.test(i)):XP(a,f=>f.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function XP(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function QP(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ZP(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const JP=/^(\d+)(th|st|nd|rd)?/i,eI=/\d+/i,tI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nI={any:[/^b/i,/^(a|c)/i]},rI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},oI={any:[/1/i,/2/i,/3/i,/4/i]},sI={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},iI={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},aI={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cI={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uI={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fI={ordinalNumber:ZP({matchPattern:JP,parsePattern:eI,valueCallback:e=>parseInt(e,10)}),era:is({matchPatterns:tI,defaultMatchWidth:"wide",parsePatterns:nI,defaultParseWidth:"any"}),quarter:is({matchPatterns:rI,defaultMatchWidth:"wide",parsePatterns:oI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:is({matchPatterns:sI,defaultMatchWidth:"wide",parsePatterns:iI,defaultParseWidth:"any"}),day:is({matchPatterns:aI,defaultMatchWidth:"wide",parsePatterns:lI,defaultParseWidth:"any"}),dayPeriod:is({matchPatterns:cI,defaultMatchWidth:"any",parsePatterns:uI,defaultParseWidth:"any"})},$m={code:"en-US",formatDistance:_P,formatLong:RP,formatRelative:WP,localize:qP,match:fI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dI(e){const t=Se(e);return AP(t,FP(t))+1}function Bm(e){const t=Se(e),n=+qr(t)-+OP(t);return Math.round(n/Mm)+1}function tc(e,t){var u,f,h,d;const n=Se(e),r=n.getFullYear(),o=lr(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((d=(h=o.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,i=Be(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=nn(i,t),l=Be(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=nn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function hI(e,t){var a,l,c,u;const n=lr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=tc(e,t),s=Be(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),nn(s,t)}function Rm(e,t){const n=Se(e),r=+nn(n,t)-+hI(n,t);return Math.round(r/Mm)+1}function De(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Vn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return De(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):De(n+1,2)},d(e,t){return De(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return De(e.getHours()%12||12,t.length)},H(e,t){return De(e.getHours(),t.length)},m(e,t){return De(e.getMinutes(),t.length)},s(e,t){return De(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return De(o,t.length)}},Qr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},jm={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Vn.y(e,t)},Y:function(e,t,n,r){const o=tc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return De(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):De(s,t.length)},R:function(e,t){const n=km(e);return De(n,t.length)},u:function(e,t){const n=e.getFullYear();return De(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return De(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return De(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Vn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return De(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Rm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):De(o,t.length)},I:function(e,t,n){const r=Bm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):De(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Vn.d(e,t)},D:function(e,t,n){const r=dI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):De(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return De(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return De(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return De(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Qr.noon:r===0?o=Qr.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Qr.evening:r>=12?o=Qr.afternoon:r>=4?o=Qr.morning:o=Qr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Vn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Vn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):De(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):De(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Vn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Vn.s(e,t)},S:function(e,t){return Vn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Hm(r);case"XXXX":case"XX":return cr(r);case"XXXXX":case"XXX":default:return cr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Hm(r);case"xxxx":case"xx":return cr(r);case"xxxxx":case"xxx":default:return cr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Wm(r,":");case"OOOO":default:return"GMT"+cr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Wm(r,":");case"zzzz":default:return"GMT"+cr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return De(r,t.length)},T:function(e,t,n){const r=e.getTime();return De(r,t.length)}};function Wm(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+De(s,2)}function Hm(e,t){return e%60===0?(e>0?"-":"+")+De(Math.abs(e)/60,2):cr(e,t)}function cr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=De(Math.trunc(r/60),2),s=De(r%60,2);return n+o+t+s}const zm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Um=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},nc={p:Um,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return zm(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",zm(r,t)).replace("{{time}}",Um(o,t))}},pI=/^D+$/,mI=/^Y+$/,gI=["D","DD","YY","YYYY"];function Gm(e){return pI.test(e)}function Ym(e){return mI.test(e)}function rc(e,t,n){const r=yI(e,t,n);if(console.warn(r),gI.includes(e))throw new RangeError(r)}function yI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wI=/^'([^]*?)'?$/,xI=/''/g,TI=/[a-zA-Z]/;function SI(e,t,n){var u,f,h,d;const r=lr(),o=r.locale??$m,s=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=r.weekStartsOn??((d=(h=r.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,a=Se(e);if(!Lm(a))throw new RangeError("Invalid time value");let l=t.match(bI).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=nc[m];return g(p,o.formatLong)}return p}).join("").match(vI).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:EI(p)};if(jm[m])return{isToken:!0,value:p};if(m.match(TI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Ym(m)||Gm(m))&&rc(m,t,String(e));const g=jm[m[0]];return g(a,m,o.localize,c)}).join("")}function EI(e){const t=e.match(wI);return t?t[1].replace(xI,"'"):e}function CI(){return Object.assign({},lr())}function PI(e){let n=Se(e).getDay();return n===0&&(n=7),n}function II(e,t){const n=Se(e),r=Se(t);return n.getTime()>r.getTime()}function AI(e,t){const n=Se(e),r=Se(t);return+n<+r}function OI(e,t){const n=t instanceof Date?Be(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const DI=10;class Km{constructor(){ne(this,"subPriority",0)}validate(t,n){return!0}}class MI extends Km{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class kI extends Km{constructor(){super(...arguments);ne(this,"priority",DI);ne(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Be(n,OI(n,Date))}}class Ee{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new MI(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class FI extends Ee{constructor(){super(...arguments);ne(this,"priority",140);ne(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const Je={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},rn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function et(e,t){return e&&{value:t(e.value),rest:e.rest}}function He(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function on(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*CP+s*EP+i*PP),rest:t.slice(n[0].length)}}function qm(e){return He(Je.anyDigitsSigned,e)}function Ye(e,t){switch(e){case 1:return He(Je.singleDigit,t);case 2:return He(Je.twoDigits,t);case 3:return He(Je.threeDigits,t);case 4:return He(Je.fourDigits,t);default:return He(new RegExp("^\\d{1,"+e+"}"),t)}}function mi(e,t){switch(e){case 1:return He(Je.singleDigitSigned,t);case 2:return He(Je.twoDigitsSigned,t);case 3:return He(Je.threeDigitsSigned,t);case 4:return He(Je.fourDigitsSigned,t);default:return He(new RegExp("^-?\\d{1,"+e+"}"),t)}}function oc(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Xm(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function Qm(e){return e%400===0||e%4===0&&e%100!==0}class NI extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return et(Ye(4,n),s);case"yo":return et(o.ordinalNumber(n,{unit:"year"}),s);default:return et(Ye(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=Xm(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class LI extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return et(Ye(4,n),s);case"Yo":return et(o.ordinalNumber(n,{unit:"year"}),s);default:return et(Ye(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=tc(n,s);if(o.isTwoDigitYear){const l=Xm(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),nn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),nn(n,s)}}class _I extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return mi(r==="R"?4:r.length,n)}set(n,r,o){const s=Be(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),qr(s)}}class VI extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return mi(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class $I extends Ee{constructor(){super(...arguments);ne(this,"priority",120);ne(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return Ye(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class BI extends Ee{constructor(){super(...arguments);ne(this,"priority",120);ne(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return Ye(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class RI extends Ee{constructor(){super(...arguments);ne(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ne(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return et(He(Je.month,n),s);case"MM":return et(Ye(2,n),s);case"Mo":return et(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class jI extends Ee{constructor(){super(...arguments);ne(this,"priority",110);ne(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return et(He(Je.month,n),s);case"LL":return et(Ye(2,n),s);case"Lo":return et(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function WI(e,t,n){const r=Se(e),o=Rm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class HI extends Ee{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return He(Je.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return nn(WI(n,o,s),s)}}function zI(e,t){const n=Se(e),r=Bm(n)-t;return n.setDate(n.getDate()-r*7),n}class UI extends Ee{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return He(Je.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return qr(zI(n,o))}}const GI=[31,28,31,30,31,30,31,31,30,31,30,31],YI=[31,29,31,30,31,30,31,31,30,31,30,31];class KI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subPriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return He(Je.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return Ye(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=Qm(o),i=n.getMonth();return s?r>=1&&r<=YI[i]:r>=1&&r<=GI[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class qI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subpriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return He(Je.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return Ye(r.length,n)}}validate(n,r){const o=n.getFullYear();return Qm(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function sc(e,t,n){var f,h,d,p;const r=lr(),o=(n==null?void 0:n.weekStartsOn)??((h=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(d=r.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,s=Se(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return Kr(s,u)}class XI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=sc(n,o,s),n.setHours(0,0,0,0),n}}class QI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return et(Ye(r.length,n),i);case"eo":return et(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=sc(n,o,s),n.setHours(0,0,0,0),n}}class ZI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return et(Ye(r.length,n),i);case"co":return et(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=sc(n,o,s),n.setHours(0,0,0,0),n}}function JI(e,t){const n=Se(e),r=PI(n),o=t-r;return Kr(n,o)}class eA extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return Ye(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return et(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return et(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return et(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return et(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=JI(n,o),n.setHours(0,0,0,0),n}}class tA extends Ee{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(oc(o),0,0,0),n}}class nA extends Ee{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(oc(o),0,0,0),n}}class rA extends Ee{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(oc(o),0,0,0),n}}class oA extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return He(Je.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class sA extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return He(Je.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class iA extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return He(Je.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class aA extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return He(Je.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class lA extends Ee{constructor(){super(...arguments);ne(this,"priority",60);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return He(Je.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class cA extends Ee{constructor(){super(...arguments);ne(this,"priority",50);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return He(Je.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class uA extends Ee{constructor(){super(...arguments);ne(this,"priority",30);ne(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return et(Ye(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class fA extends Ee{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return on(rn.basicOptionalMinutes,n);case"XX":return on(rn.basic,n);case"XXXX":return on(rn.basicOptionalSeconds,n);case"XXXXX":return on(rn.extendedOptionalSeconds,n);case"XXX":default:return on(rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Be(n,n.getTime()-pi(n)-o)}}class dA extends Ee{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return on(rn.basicOptionalMinutes,n);case"xx":return on(rn.basic,n);case"xxxx":return on(rn.basicOptionalSeconds,n);case"xxxxx":return on(rn.extendedOptionalSeconds,n);case"xxx":default:return on(rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Be(n,n.getTime()-pi(n)-o)}}class hA extends Ee{constructor(){super(...arguments);ne(this,"priority",40);ne(this,"incompatibleTokens","*")}parse(n){return qm(n)}set(n,r,o){return[Be(n,o*1e3),{timestampIsSet:!0}]}}class pA extends Ee{constructor(){super(...arguments);ne(this,"priority",20);ne(this,"incompatibleTokens","*")}parse(n){return qm(n)}set(n,r,o){return[Be(n,o),{timestampIsSet:!0}]}}const mA={G:new FI,y:new NI,Y:new LI,R:new _I,u:new VI,Q:new $I,q:new BI,M:new RI,L:new jI,w:new HI,I:new UI,d:new KI,D:new qI,E:new XI,e:new QI,c:new ZI,i:new eA,a:new tA,b:new nA,B:new rA,h:new oA,H:new sA,K:new iA,k:new aA,m:new lA,s:new cA,S:new uA,X:new fA,x:new dA,t:new hA,T:new pA},gA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vA=/^'([^]*?)'?$/,bA=/''/g,wA=/\S/,xA=/[a-zA-Z]/;function TA(e,t,n,r){var m,g,y,b;const o=CI(),s=o.locale??$m,i=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((b=(y=o.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?Se(n):Be(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new kI],u=t.match(yA).map(v=>{const S=v[0];if(S in nc){const T=nc[S];return T(v,s.formatLong)}return v}).join("").match(gA),f=[];for(let v of u){Ym(v)&&rc(v,t,e),Gm(v)&&rc(v,t,e);const S=v[0],T=mA[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const A=f.find(k=>E.includes(k.token)||k.token===S);if(A)throw new RangeError(`The format string mustn't contain \`${A.fullToken}\` and \`${v}\` at the same time`)}else if(T.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${v}\` and any other token at the same time`);f.push({token:S,fullToken:v});const I=T.run(e,v,s.match,l);if(!I)return Be(n,NaN);c.push(I.setter),e=I.rest}else{if(S.match(xA))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(v==="''"?v="'":S==="'"&&(v=SA(v)),e.indexOf(v)===0)e=e.slice(v.length);else return Be(n,NaN)}}if(e.length>0&&wA.test(e))return Be(n,NaN);const h=c.map(v=>v.priority).sort((v,S)=>S-v).filter((v,S,T)=>T.indexOf(v)===S).map(v=>c.filter(S=>S.priority===v).sort((S,T)=>T.subPriority-S.subPriority)).map(v=>v[0]);let d=Se(n);if(isNaN(d.getTime()))return Be(n,NaN);const p={};for(const v of h){if(!v.validate(d,l))return Be(n,NaN);const S=v.set(d,p,l);Array.isArray(S)?(d=S[0],Object.assign(p,S[1])):d=S}return Be(n,d)}function SA(e){return e.match(vA)[1].replace(bA,"'")}function EA(e,t){const n=Se(e),r=Se(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function CA(e){return MP(e,DP(e))}function PA(e,t){return Kr(e,-t)}function Zm(e,t){return hi(e,-t)}function IA(e,t){return Fm(e,-t)}function AA(e,t){return Nm(e,-t)}var tt=function(){return tt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},tt.apply(this,arguments)};function ic(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ac(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var as=function(e){return e.replace(new RegExp(" ","g")," ")},Jm=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)},OA=function(e){return e.replace(/^0+([0-9]+)/,"$1")},eg=function(e,t,n){var r=e.length-2,o=OA(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},tg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},gi=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},DA=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},lc=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},MA=function(e){return e==="money"||e==="currency"},kA=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return tt(tt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},yi=function(e,t){var n=Jm(tg(e),t.fraction.length),r="".concat(t.currency).concat(eg(n,t.group,t.decimal));return as(r)},FA=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=ic(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var f=w.useMemo(function(){var p=kA(r,s,a);return p.currency=as("".concat(p.currency.trim()," ")),p.literal=as(p.literal.trim()),p},[r,s]),h=function(p){var m=yi(p.target.value,f),g=gi(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)};w.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=yi(p,f),g=gi(m);u.current.value=m,u.current.setAttribute("data-number",g.toString());var y=new InputEvent("change",{});l==null||l(tt(tt({},y),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=m.length)}}},[f]);var d=c.defaultValue?yi(c.defaultValue,f):void 0;return w.createElement("input",tt({},c,{value:typeof c.value=="string"?yi(c.value,f):c.value,defaultValue:d,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),NA=1,LA=function(e){return e==="percentage"||e==="percent"||e==="percentual"},_A=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return tt(tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},vi=function(e,t){var n=Jm(tg(e),t.fraction.length),r="".concat(eg(n,t.group,t.decimal)," ").concat(t.percentSign);return as(r)},VA=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=ic(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=ac(w.useState(function(){var y,b;return(b=(y=i.value)===null||y===void 0?void 0:y.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var y,b=Number.parseFloat("".concat((y=i.value)!==null&&y!==void 0?y:"0")).toFixed(f.fraction.length);u(vi(b,f))},[i.value]);var f=w.useMemo(function(){var y=_A(r);return y.percentSign=as("".concat(y.percentSign)),y},[r]),h=c.length-f.percentSign.length-NA,d=function(y){var b,v=a.current;v&&(v.setSelectionRange(h,h),y&&((b=i.onFocus)===null||b===void 0||b.call(i,y)))},p=function(y){var b=y.currentTarget;if(b.selectionStart!==null){var v=b.selectionStart,S=b.selectionEnd,T=v!==S,E=h<v;!T&&E&&d()}s==null||s(y)},m=function(y){var b=vi(y.target.value,f),v=gi(b);u(b),y.target.value=b,y.target.setAttribute("data-number",v.toString()),o==null||o(y)};w.useEffect(function(){if(a.current!==null){var y=a.current.value;if(y!==""){var b=vi(y,f),v=gi(b);u(b),a.current.value=b,a.current.setAttribute("data-number",v.toString());var S=new InputEvent("change",{});o==null||o(tt(tt({},S),{target:a.current,currentTarget:a.current}))}}},[]),w.useEffect(function(){return d()},[c]);var g=i.defaultValue?vi(i.defaultValue,f):void 0;return w.createElement("input",tt({},i,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:d,onKeyUp:p,ref:a,type:"text"}))}),ls={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},$A=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=bi[s];i===void 0?r.push(s.replace(ls.dots,"\\.").replace(ls.openParenthesis,"\\(").replace(ls.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ls.leadingBars,"\\")},cs=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return cc(o,n);var s=$A(o);return n?"^".concat(s,"$"):s},BA=function(e){return e.replace(ls.escape,"\\$&")},cc=function(e,t){var n=e.map(function(r){return typeof r=="string"?BA(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},bi={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]/}},RA=/\d/,ng="(dd) 9dddd-dddd",rg="(dd) dddd-dddd",og="ddd.ddd.ddd-dd",sg="dd.ddd.ddd/dddd-dd",wi=function(e){return e.replace(/\D/g,"")},jA=["2",/[0-3]/,":",/[0-5]/,/\d/],WA=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Dt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:og,isoDate:"dddd-dd-dd",cnpj:sg,telephone:rg,cellphone:ng,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return wi(e).length<=11?og:sg},int:function(e){return e===void 0&&(e=""),RA.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=wi(e);return t.length<11?rg:ng},time:function(e){var t=wi(e),n=t[0];return n==="2"?jA:WA}},Mt=function(e,t,n){var r;return n===void 0&&(n={}),tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:cs(e,"",!0),infinity:n.infinity},n)},xt={cellTelephone:Mt(Dt.cellTelephone,"tel"),cellphone:Mt(Dt.cellphone,"tel"),cep:Mt(Dt.cep,"decimal"),cnpj:Mt(Dt.cnpj,"decimal"),color:Mt(Dt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Mt(Dt.cpf,"decimal"),cpfCnpj:Mt(Dt.cpfCnpj,"decimal",{transform:wi}),creditCard:Mt(Dt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Mt(Dt.date,"decimal"),int:Mt(Dt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Mt(Dt.isoDate,"decimal"),telephone:Mt(Dt.telephone,"tel"),time:Mt(Dt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Mt(Dt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ig(e,t,n,r){var o,s;r===void 0&&(r=bi);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],f=u instanceof RegExp?u:r[u],h=i[c];if(f===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var d=f instanceof RegExp?{regex:f}:f;d.regex.test(h)&&(a+=(s=(o=d.parse)===null||o===void 0?void 0:o.call(d,h))!==null&&s!==void 0?s:h),c+=1,l+=1}return a}var ag=function(e){return e},HA=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(cs(e,n,t));return r.test(n)};function zA(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var UA=w.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,f=e.onChangeText,h=e.as,d=ic(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=lc(a),g=lc(f),y=lc(u),b=w.useRef(HA(u,s,d.value||d.defaultValue)),v=h??"input",S=ac(w.useState(""),2),T=S[0],E=S[1],I=zA(T),A=w.useCallback(function(D,N){var $,W,U=($=D??N)!==null&&$!==void 0?$:"";if(u===void 0)return U;var M=(W=U==null?void 0:U.toString())!==null&&W!==void 0?W:"";return ig(M,typeof u=="function"?u(M):u,i??ag,c??bi)},[i,u,c]),k=ac(w.useState(function(){return A(d.value,d.defaultValue)}),2),O=k[0],_=k[1],F=A(d.defaultValue,d.defaultValue),L=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(O);return Array.isArray(D)?cc(D,s):cs(u,O,s)}return typeof u=="string"?cs(u,O,s):cc(u,s)},[l,O,s,u]);w.useEffect(function(){if(d.value!==void 0){var D=A(d.value,d.defaultValue);_(D),p.current!==null&&(p.current.value=D)}},[d.value,u,i,d.defaultValue]);var P=function(D){var N,$,W,U,M,R=D.currentTarget,q=D.target.value;if(y.current===void 0)return _(q),(N=g.current)===null||N===void 0||N.call(g,q),($=m.current)===null||$===void 0||$.call(m,D),f==null?void 0:f(q);var ee=new RegExp(cs(y.current,q,s)),Q=(W=R.selectionEnd)!==null&&W!==void 0?W:0,G=function(Y,te,H){if(Y.type!=="number")return Y.setSelectionRange(te,H)};if(r&&b.current&&q.length>=O.length)return R.value=O,G(R,Q-1,Q-1);var V=!1;q.length<I.length&&(b.current=!1,V=!0),ee.test(q)&&(b.current=!0);var j=Q,z=q[j-1],B=ig(q,typeof y.current=="function"?y.current(q):y.current,i??ag,c??bi);for(R.value=B,_(B);j<B.length&&B.charAt(j-1)!==z;)j+=1;V?G(R,Q,Q):G(R,j,j),D.target.value=B,E(B),(U=g.current)===null||U===void 0||U.call(g,B),(M=m.current)===null||M===void 0||M.call(m,D)};return w.createElement(v,tt({},d,{ref:p,pattern:L,onChange:P,defaultValue:lg(d.defaultValue)?F:void 0,value:lg(d.value)?A(d.value,d.value):d.value}))}),lg=function(e){return typeof e=="string"},cg=w.forwardRef(function(e,t){return MA(e.mask)?w.createElement(FA,tt({},e,{mask:void 0,ref:t})):LA(e.mask)?w.createElement(VA,tt({},e,{mask:void 0,ref:t})):w.createElement(UA,tt({},e,{ref:t}))}),kt=function(e){return function(t){return w.createElement(cg,tt({},e,t))}};kt(xt.cellTelephone),kt(xt.cellphone),kt(xt.cep),kt(xt.cnpj),kt(xt.color),kt(xt.cpf),kt(xt.cpfCnpj),kt(xt.creditCard),kt(xt.date),kt(xt.int),kt(xt.isoDate),kt(xt.telephone),kt(xt.time),kt(xt.uuid);var ug=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&DA(xt,t.mask)?xt[t.mask]:{mask:t.mask}},[t.mask]),o=tt(tt({},t),r);return w.createElement(cg,tt({},o,{ref:n}))}),uc={},fc={exports:{}},dc={};/**
142
+ */const nc=Ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Dm={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},TP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Mm=e=>x.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Dm,exit:Dm.false,transition:TP,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),SP=Er("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),EP=w.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:Oe("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Mm,{"data-open":!!s,open:!!s,children:x.jsxs(Nr,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:Oe(SP({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Im,{size:20}):null,!r&&n==="info"?x.jsx(Om,{size:20}):null,!r&&n==="danger"?x.jsx(bP,{size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?x.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(nc,{size:20})}):null]})})})});function Se(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Be(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function qr(e,t){const n=Se(e);return isNaN(t)?Be(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function pi(e,t){const n=Se(e);if(isNaN(t))return Be(e,NaN);if(!t)return n;const r=n.getDate(),o=Be(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const km=6048e5,CP=864e5,PP=6e4,IP=36e5,AP=1e3;let OP={};function cr(){return OP}function rn(e,t){var a,l,c,u;const n=cr(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Se(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Xr(e){return rn(e,{weekStartsOn:1})}function Fm(e){const t=Se(e),n=t.getFullYear(),r=Be(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Xr(r),s=Be(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Xr(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Qr(e){const t=Se(e);return t.setHours(0,0,0,0),t}function mi(e){const t=Se(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function DP(e,t){const n=Qr(e),r=Qr(t),o=+n-mi(n),s=+r-mi(r);return Math.round((o-s)/CP)}function MP(e){const t=Fm(e),n=Be(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Xr(n)}function Nm(e,t){const n=t*7;return qr(e,n)}function Lm(e,t){return pi(e,t*12)}function kP(e){return Be(e,Date.now())}function FP(e,t){const n=Qr(e),r=Qr(t);return+n==+r}function NP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _m(e){if(!NP(e)&&typeof e!="number")return!1;const t=Se(e);return!isNaN(Number(t))}function Vm(e,t){const n=Se(e.start),r=Se(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(Se(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function $m(e){const t=Se(e);return t.setDate(1),t.setHours(0,0,0,0),t}function LP(e){const t=Se(e),n=Be(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function _P(e,t){var a,l;const n=cr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Se(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const VP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$P=(e,t,n)=>{let r;const o=VP[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function rc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const BP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},RP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},HP={date:rc({formats:BP,defaultWidth:"full"}),time:rc({formats:RP,defaultWidth:"full"}),dateTime:rc({formats:jP,defaultWidth:"full"})},WP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zP=(e,t,n,r)=>WP[e];function is(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const UP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},GP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},YP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},KP={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},qP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},XP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},QP={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:is({values:UP,defaultWidth:"wide"}),quarter:is({values:GP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:is({values:YP,defaultWidth:"wide"}),day:is({values:KP,defaultWidth:"wide"}),dayPeriod:is({values:qP,defaultWidth:"wide",formattingValues:XP,defaultFormattingWidth:"wide"})};function as(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?JP(a,f=>f.test(i)):ZP(a,f=>f.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function ZP(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function JP(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function eI(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const tI=/^(\d+)(th|st|nd|rd)?/i,nI=/\d+/i,rI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},oI={any:[/^b/i,/^(a|c)/i]},sI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},iI={any:[/1/i,/2/i,/3/i,/4/i]},aI={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},lI={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},cI={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},uI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},fI={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},dI={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},hI={ordinalNumber:eI({matchPattern:tI,parsePattern:nI,valueCallback:e=>parseInt(e,10)}),era:as({matchPatterns:rI,defaultMatchWidth:"wide",parsePatterns:oI,defaultParseWidth:"any"}),quarter:as({matchPatterns:sI,defaultMatchWidth:"wide",parsePatterns:iI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:as({matchPatterns:aI,defaultMatchWidth:"wide",parsePatterns:lI,defaultParseWidth:"any"}),day:as({matchPatterns:cI,defaultMatchWidth:"wide",parsePatterns:uI,defaultParseWidth:"any"}),dayPeriod:as({matchPatterns:fI,defaultMatchWidth:"any",parsePatterns:dI,defaultParseWidth:"any"})},Bm={code:"en-US",formatDistance:$P,formatLong:HP,formatRelative:zP,localize:QP,match:hI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pI(e){const t=Se(e);return DP(t,LP(t))+1}function Rm(e){const t=Se(e),n=+Xr(t)-+MP(t);return Math.round(n/km)+1}function oc(e,t){var u,f,h,d;const n=Se(e),r=n.getFullYear(),o=cr(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((d=(h=o.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,i=Be(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=rn(i,t),l=Be(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=rn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function mI(e,t){var a,l,c,u;const n=cr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=oc(e,t),s=Be(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),rn(s,t)}function jm(e,t){const n=Se(e),r=+rn(n,t)-+mI(n,t);return Math.round(r/km)+1}function De(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const $n={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return De(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):De(n+1,2)},d(e,t){return De(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return De(e.getHours()%12||12,t.length)},H(e,t){return De(e.getHours(),t.length)},m(e,t){return De(e.getMinutes(),t.length)},s(e,t){return De(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return De(o,t.length)}},Zr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Hm={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return $n.y(e,t)},Y:function(e,t,n,r){const o=oc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return De(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):De(s,t.length)},R:function(e,t){const n=Fm(e);return De(n,t.length)},u:function(e,t){const n=e.getFullYear();return De(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return De(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return De(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $n.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return De(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=jm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):De(o,t.length)},I:function(e,t,n){const r=Rm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):De(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):$n.d(e,t)},D:function(e,t,n){const r=pI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):De(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return De(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return De(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return De(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Zr.noon:r===0?o=Zr.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Zr.evening:r>=12?o=Zr.afternoon:r>=4?o=Zr.morning:o=Zr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $n.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):$n.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):De(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):De(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$n.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$n.s(e,t)},S:function(e,t){return $n.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return zm(r);case"XXXX":case"XX":return ur(r);case"XXXXX":case"XXX":default:return ur(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return zm(r);case"xxxx":case"xx":return ur(r);case"xxxxx":case"xxx":default:return ur(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Wm(r,":");case"OOOO":default:return"GMT"+ur(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Wm(r,":");case"zzzz":default:return"GMT"+ur(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return De(r,t.length)},T:function(e,t,n){const r=e.getTime();return De(r,t.length)}};function Wm(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+De(s,2)}function zm(e,t){return e%60===0?(e>0?"-":"+")+De(Math.abs(e)/60,2):ur(e,t)}function ur(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=De(Math.trunc(r/60),2),s=De(r%60,2);return n+o+t+s}const Um=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Gm=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},sc={p:Gm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Um(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Um(r,t)).replace("{{time}}",Gm(o,t))}},gI=/^D+$/,yI=/^Y+$/,vI=["D","DD","YY","YYYY"];function Ym(e){return gI.test(e)}function Km(e){return yI.test(e)}function ic(e,t,n){const r=bI(e,t,n);if(console.warn(r),vI.includes(e))throw new RangeError(r)}function bI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const wI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TI=/^'([^]*?)'?$/,SI=/''/g,EI=/[a-zA-Z]/;function CI(e,t,n){var u,f,h,d;const r=cr(),o=r.locale??Bm,s=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=r.weekStartsOn??((d=(h=r.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,a=Se(e);if(!_m(a))throw new RangeError("Invalid time value");let l=t.match(xI).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=sc[m];return g(p,o.formatLong)}return p}).join("").match(wI).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:PI(p)};if(Hm[m])return{isToken:!0,value:p};if(m.match(EI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Km(m)||Ym(m))&&ic(m,t,String(e));const g=Hm[m[0]];return g(a,m,o.localize,c)}).join("")}function PI(e){const t=e.match(TI);return t?t[1].replace(SI,"'"):e}function II(){return Object.assign({},cr())}function AI(e){let n=Se(e).getDay();return n===0&&(n=7),n}function OI(e,t){const n=Se(e),r=Se(t);return n.getTime()>r.getTime()}function DI(e,t){const n=Se(e),r=Se(t);return+n<+r}function MI(e,t){const n=t instanceof Date?Be(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const kI=10;class qm{constructor(){ne(this,"subPriority",0)}validate(t,n){return!0}}class FI extends qm{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class NI extends qm{constructor(){super(...arguments);ne(this,"priority",kI);ne(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Be(n,MI(n,Date))}}class Ee{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new FI(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class LI extends Ee{constructor(){super(...arguments);ne(this,"priority",140);ne(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const Je={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},on={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function et(e,t){return e&&{value:t(e.value),rest:e.rest}}function We(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function sn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*IP+s*PP+i*AP),rest:t.slice(n[0].length)}}function Xm(e){return We(Je.anyDigitsSigned,e)}function Ye(e,t){switch(e){case 1:return We(Je.singleDigit,t);case 2:return We(Je.twoDigits,t);case 3:return We(Je.threeDigits,t);case 4:return We(Je.fourDigits,t);default:return We(new RegExp("^\\d{1,"+e+"}"),t)}}function gi(e,t){switch(e){case 1:return We(Je.singleDigitSigned,t);case 2:return We(Je.twoDigitsSigned,t);case 3:return We(Je.threeDigitsSigned,t);case 4:return We(Je.fourDigitsSigned,t);default:return We(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ac(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Qm(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function Zm(e){return e%400===0||e%4===0&&e%100!==0}class _I extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return et(Ye(4,n),s);case"yo":return et(o.ordinalNumber(n,{unit:"year"}),s);default:return et(Ye(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=Qm(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class VI extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return et(Ye(4,n),s);case"Yo":return et(o.ordinalNumber(n,{unit:"year"}),s);default:return et(Ye(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=oc(n,s);if(o.isTwoDigitYear){const l=Qm(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),rn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),rn(n,s)}}class $I extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return gi(r==="R"?4:r.length,n)}set(n,r,o){const s=Be(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Xr(s)}}class BI extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return gi(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class RI extends Ee{constructor(){super(...arguments);ne(this,"priority",120);ne(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return Ye(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class jI extends Ee{constructor(){super(...arguments);ne(this,"priority",120);ne(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return Ye(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class HI extends Ee{constructor(){super(...arguments);ne(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ne(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return et(We(Je.month,n),s);case"MM":return et(Ye(2,n),s);case"Mo":return et(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class WI extends Ee{constructor(){super(...arguments);ne(this,"priority",110);ne(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return et(We(Je.month,n),s);case"LL":return et(Ye(2,n),s);case"Lo":return et(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function zI(e,t,n){const r=Se(e),o=jm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class UI extends Ee{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return We(Je.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return rn(zI(n,o,s),s)}}function GI(e,t){const n=Se(e),r=Rm(n)-t;return n.setDate(n.getDate()-r*7),n}class YI extends Ee{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return We(Je.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Xr(GI(n,o))}}const KI=[31,28,31,30,31,30,31,31,30,31,30,31],qI=[31,29,31,30,31,30,31,31,30,31,30,31];class XI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subPriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return We(Je.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return Ye(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=Zm(o),i=n.getMonth();return s?r>=1&&r<=qI[i]:r>=1&&r<=KI[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class QI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subpriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return We(Je.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return Ye(r.length,n)}}validate(n,r){const o=n.getFullYear();return Zm(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function lc(e,t,n){var f,h,d,p;const r=cr(),o=(n==null?void 0:n.weekStartsOn)??((h=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(d=r.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,s=Se(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return qr(s,u)}class ZI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=lc(n,o,s),n.setHours(0,0,0,0),n}}class JI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return et(Ye(r.length,n),i);case"eo":return et(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=lc(n,o,s),n.setHours(0,0,0,0),n}}class eA extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return et(Ye(r.length,n),i);case"co":return et(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=lc(n,o,s),n.setHours(0,0,0,0),n}}function tA(e,t){const n=Se(e),r=AI(n),o=t-r;return qr(n,o)}class nA extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return Ye(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return et(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return et(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return et(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return et(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=tA(n,o),n.setHours(0,0,0,0),n}}class rA extends Ee{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(ac(o),0,0,0),n}}class oA extends Ee{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(ac(o),0,0,0),n}}class sA extends Ee{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(ac(o),0,0,0),n}}class iA extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return We(Je.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class aA extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return We(Je.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class lA extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return We(Je.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class cA extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return We(Je.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class uA extends Ee{constructor(){super(...arguments);ne(this,"priority",60);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return We(Je.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class fA extends Ee{constructor(){super(...arguments);ne(this,"priority",50);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return We(Je.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class dA extends Ee{constructor(){super(...arguments);ne(this,"priority",30);ne(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return et(Ye(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class hA extends Ee{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return sn(on.basicOptionalMinutes,n);case"XX":return sn(on.basic,n);case"XXXX":return sn(on.basicOptionalSeconds,n);case"XXXXX":return sn(on.extendedOptionalSeconds,n);case"XXX":default:return sn(on.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Be(n,n.getTime()-mi(n)-o)}}class pA extends Ee{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return sn(on.basicOptionalMinutes,n);case"xx":return sn(on.basic,n);case"xxxx":return sn(on.basicOptionalSeconds,n);case"xxxxx":return sn(on.extendedOptionalSeconds,n);case"xxx":default:return sn(on.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Be(n,n.getTime()-mi(n)-o)}}class mA extends Ee{constructor(){super(...arguments);ne(this,"priority",40);ne(this,"incompatibleTokens","*")}parse(n){return Xm(n)}set(n,r,o){return[Be(n,o*1e3),{timestampIsSet:!0}]}}class gA extends Ee{constructor(){super(...arguments);ne(this,"priority",20);ne(this,"incompatibleTokens","*")}parse(n){return Xm(n)}set(n,r,o){return[Be(n,o),{timestampIsSet:!0}]}}const yA={G:new LI,y:new _I,Y:new VI,R:new $I,u:new BI,Q:new RI,q:new jI,M:new HI,L:new WI,w:new UI,I:new YI,d:new XI,D:new QI,E:new ZI,e:new JI,c:new eA,i:new nA,a:new rA,b:new oA,B:new sA,h:new iA,H:new aA,K:new lA,k:new cA,m:new uA,s:new fA,S:new dA,X:new hA,x:new pA,t:new mA,T:new gA},vA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wA=/^'([^]*?)'?$/,xA=/''/g,TA=/\S/,SA=/[a-zA-Z]/;function EA(e,t,n,r){var m,g,y,b;const o=II(),s=o.locale??Bm,i=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((b=(y=o.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?Se(n):Be(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new NI],u=t.match(bA).map(v=>{const S=v[0];if(S in sc){const T=sc[S];return T(v,s.formatLong)}return v}).join("").match(vA),f=[];for(let v of u){Km(v)&&ic(v,t,e),Ym(v)&&ic(v,t,e);const S=v[0],T=yA[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const A=f.find(k=>E.includes(k.token)||k.token===S);if(A)throw new RangeError(`The format string mustn't contain \`${A.fullToken}\` and \`${v}\` at the same time`)}else if(T.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${v}\` and any other token at the same time`);f.push({token:S,fullToken:v});const I=T.run(e,v,s.match,l);if(!I)return Be(n,NaN);c.push(I.setter),e=I.rest}else{if(S.match(SA))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(v==="''"?v="'":S==="'"&&(v=CA(v)),e.indexOf(v)===0)e=e.slice(v.length);else return Be(n,NaN)}}if(e.length>0&&TA.test(e))return Be(n,NaN);const h=c.map(v=>v.priority).sort((v,S)=>S-v).filter((v,S,T)=>T.indexOf(v)===S).map(v=>c.filter(S=>S.priority===v).sort((S,T)=>T.subPriority-S.subPriority)).map(v=>v[0]);let d=Se(n);if(isNaN(d.getTime()))return Be(n,NaN);const p={};for(const v of h){if(!v.validate(d,l))return Be(n,NaN);const S=v.set(d,p,l);Array.isArray(S)?(d=S[0],Object.assign(p,S[1])):d=S}return Be(n,d)}function CA(e){return e.match(wA)[1].replace(xA,"'")}function PA(e,t){const n=Se(e),r=Se(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function IA(e){return FP(e,kP(e))}function AA(e,t){return qr(e,-t)}function Jm(e,t){return pi(e,-t)}function OA(e,t){return Nm(e,-t)}function DA(e,t){return Lm(e,-t)}var tt=function(){return tt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},tt.apply(this,arguments)};function cc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function uc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var ls=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)},MA=function(e){return e.replace(/^0+([0-9]+)/,"$1")},tg=function(e,t,n){var r=e.length-2,o=MA(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},ng=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},yi=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},kA=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},fc=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},FA=function(e){return e==="money"||e==="currency"},NA=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return tt(tt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},vi=function(e,t){var n=eg(ng(e),t.fraction.length),r="".concat(t.currency).concat(tg(n,t.group,t.decimal));return ls(r)},LA=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=cc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var f=w.useMemo(function(){var p=NA(r,s,a);return p.currency=ls("".concat(p.currency.trim()," ")),p.literal=ls(p.literal.trim()),p},[r,s]),h=function(p){var m=vi(p.target.value,f),g=yi(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)};w.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=vi(p,f),g=yi(m);u.current.value=m,u.current.setAttribute("data-number",g.toString());var y=new InputEvent("change",{});l==null||l(tt(tt({},y),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=m.length)}}},[f]);var d=c.defaultValue?vi(c.defaultValue,f):void 0;return w.createElement("input",tt({},c,{value:typeof c.value=="string"?vi(c.value,f):c.value,defaultValue:d,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),_A=1,VA=function(e){return e==="percentage"||e==="percent"||e==="percentual"},$A=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return tt(tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},bi=function(e,t){var n=eg(ng(e),t.fraction.length),r="".concat(tg(n,t.group,t.decimal)," ").concat(t.percentSign);return ls(r)},BA=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=cc(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=uc(w.useState(function(){var y,b;return(b=(y=i.value)===null||y===void 0?void 0:y.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var y,b=Number.parseFloat("".concat((y=i.value)!==null&&y!==void 0?y:"0")).toFixed(f.fraction.length);u(bi(b,f))},[i.value]);var f=w.useMemo(function(){var y=$A(r);return y.percentSign=ls("".concat(y.percentSign)),y},[r]),h=c.length-f.percentSign.length-_A,d=function(y){var b,v=a.current;v&&(v.setSelectionRange(h,h),y&&((b=i.onFocus)===null||b===void 0||b.call(i,y)))},p=function(y){var b=y.currentTarget;if(b.selectionStart!==null){var v=b.selectionStart,S=b.selectionEnd,T=v!==S,E=h<v;!T&&E&&d()}s==null||s(y)},m=function(y){var b=bi(y.target.value,f),v=yi(b);u(b),y.target.value=b,y.target.setAttribute("data-number",v.toString()),o==null||o(y)};w.useEffect(function(){if(a.current!==null){var y=a.current.value;if(y!==""){var b=bi(y,f),v=yi(b);u(b),a.current.value=b,a.current.setAttribute("data-number",v.toString());var S=new InputEvent("change",{});o==null||o(tt(tt({},S),{target:a.current,currentTarget:a.current}))}}},[]),w.useEffect(function(){return d()},[c]);var g=i.defaultValue?bi(i.defaultValue,f):void 0;return w.createElement("input",tt({},i,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:d,onKeyUp:p,ref:a,type:"text"}))}),cs={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},RA=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=wi[s];i===void 0?r.push(s.replace(cs.dots,"\\.").replace(cs.openParenthesis,"\\(").replace(cs.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(cs.leadingBars,"\\")},us=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return dc(o,n);var s=RA(o);return n?"^".concat(s,"$"):s},jA=function(e){return e.replace(cs.escape,"\\$&")},dc=function(e,t){var n=e.map(function(r){return typeof r=="string"?jA(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},wi={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]/}},HA=/\d/,rg="(dd) 9dddd-dddd",og="(dd) dddd-dddd",sg="ddd.ddd.ddd-dd",ig="dd.ddd.ddd/dddd-dd",xi=function(e){return e.replace(/\D/g,"")},WA=["2",/[0-3]/,":",/[0-5]/,/\d/],zA=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Dt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:sg,isoDate:"dddd-dd-dd",cnpj:ig,telephone:og,cellphone:rg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return xi(e).length<=11?sg:ig},int:function(e){return e===void 0&&(e=""),HA.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=xi(e);return t.length<11?og:rg},time:function(e){var t=xi(e),n=t[0];return n==="2"?WA:zA}},Mt=function(e,t,n){var r;return n===void 0&&(n={}),tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:us(e,"",!0),infinity:n.infinity},n)},xt={cellTelephone:Mt(Dt.cellTelephone,"tel"),cellphone:Mt(Dt.cellphone,"tel"),cep:Mt(Dt.cep,"decimal"),cnpj:Mt(Dt.cnpj,"decimal"),color:Mt(Dt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Mt(Dt.cpf,"decimal"),cpfCnpj:Mt(Dt.cpfCnpj,"decimal",{transform:xi}),creditCard:Mt(Dt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Mt(Dt.date,"decimal"),int:Mt(Dt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Mt(Dt.isoDate,"decimal"),telephone:Mt(Dt.telephone,"tel"),time:Mt(Dt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Mt(Dt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ag(e,t,n,r){var o,s;r===void 0&&(r=wi);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],f=u instanceof RegExp?u:r[u],h=i[c];if(f===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var d=f instanceof RegExp?{regex:f}:f;d.regex.test(h)&&(a+=(s=(o=d.parse)===null||o===void 0?void 0:o.call(d,h))!==null&&s!==void 0?s:h),c+=1,l+=1}return a}var lg=function(e){return e},UA=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(us(e,n,t));return r.test(n)};function GA(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var YA=w.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,f=e.onChangeText,h=e.as,d=cc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=fc(a),g=fc(f),y=fc(u),b=w.useRef(UA(u,s,d.value||d.defaultValue)),v=h??"input",S=uc(w.useState(""),2),T=S[0],E=S[1],I=GA(T),A=w.useCallback(function(D,N){var $,H,U=($=D??N)!==null&&$!==void 0?$:"";if(u===void 0)return U;var M=(H=U==null?void 0:U.toString())!==null&&H!==void 0?H:"";return ag(M,typeof u=="function"?u(M):u,i??lg,c??wi)},[i,u,c]),k=uc(w.useState(function(){return A(d.value,d.defaultValue)}),2),O=k[0],_=k[1],F=A(d.defaultValue,d.defaultValue),L=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(O);return Array.isArray(D)?dc(D,s):us(u,O,s)}return typeof u=="string"?us(u,O,s):dc(u,s)},[l,O,s,u]);w.useEffect(function(){if(d.value!==void 0){var D=A(d.value,d.defaultValue);_(D),p.current!==null&&(p.current.value=D)}},[d.value,u,i,d.defaultValue]);var P=function(D){var N,$,H,U,M,R=D.currentTarget,q=D.target.value;if(y.current===void 0)return _(q),(N=g.current)===null||N===void 0||N.call(g,q),($=m.current)===null||$===void 0||$.call(m,D),f==null?void 0:f(q);var ee=new RegExp(us(y.current,q,s)),Q=(H=R.selectionEnd)!==null&&H!==void 0?H:0,G=function(Y,te,W){if(Y.type!=="number")return Y.setSelectionRange(te,W)};if(r&&b.current&&q.length>=O.length)return R.value=O,G(R,Q-1,Q-1);var V=!1;q.length<I.length&&(b.current=!1,V=!0),ee.test(q)&&(b.current=!0);var j=Q,z=q[j-1],B=ag(q,typeof y.current=="function"?y.current(q):y.current,i??lg,c??wi);for(R.value=B,_(B);j<B.length&&B.charAt(j-1)!==z;)j+=1;V?G(R,Q,Q):G(R,j,j),D.target.value=B,E(B),(U=g.current)===null||U===void 0||U.call(g,B),(M=m.current)===null||M===void 0||M.call(m,D)};return w.createElement(v,tt({},d,{ref:p,pattern:L,onChange:P,defaultValue:cg(d.defaultValue)?F:void 0,value:cg(d.value)?A(d.value,d.value):d.value}))}),cg=function(e){return typeof e=="string"},ug=w.forwardRef(function(e,t){return FA(e.mask)?w.createElement(LA,tt({},e,{mask:void 0,ref:t})):VA(e.mask)?w.createElement(BA,tt({},e,{mask:void 0,ref:t})):w.createElement(YA,tt({},e,{ref:t}))}),kt=function(e){return function(t){return w.createElement(ug,tt({},e,t))}};kt(xt.cellTelephone),kt(xt.cellphone),kt(xt.cep),kt(xt.cnpj),kt(xt.color),kt(xt.cpf),kt(xt.cpfCnpj),kt(xt.creditCard),kt(xt.date),kt(xt.int),kt(xt.isoDate),kt(xt.telephone),kt(xt.time),kt(xt.uuid);var fg=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&kA(xt,t.mask)?xt[t.mask]:{mask:t.mask}},[t.mask]),o=tt(tt({},t),r);return w.createElement(ug,tt({},o,{ref:n}))}),hc={},pc={exports:{}},mc={};/**
143
143
  * @license React
144
144
  * use-sync-external-store-shim.production.min.js
145
145
  *
@@ -147,7 +147,7 @@
147
147
  *
148
148
  * This source code is licensed under the MIT license found in the
149
149
  * LICENSE file in the root directory of this source tree.
150
- */var fg;function GA(){if(fg)return dc;fg=1;var e=w;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var d=h(),p=r({inst:{value:d,getSnapshot:h}}),m=p[0].inst,g=p[1];return s(function(){m.value=d,m.getSnapshot=h,l(m)&&g({inst:m})},[f,d,h]),o(function(){return l(m)&&g({inst:m}),f(function(){l(m)&&g({inst:m})})},[f]),i(d),d}function l(f){var h=f.getSnapshot;f=f.value;try{var d=h();return!n(f,d)}catch{return!0}}function c(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return dc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,dc}var dg={};/**
150
+ */var dg;function KA(){if(dg)return mc;dg=1;var e=w;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var d=h(),p=r({inst:{value:d,getSnapshot:h}}),m=p[0].inst,g=p[1];return s(function(){m.value=d,m.getSnapshot=h,l(m)&&g({inst:m})},[f,d,h]),o(function(){return l(m)&&g({inst:m}),f(function(){l(m)&&g({inst:m})})},[f]),i(d),d}function l(f){var h=f.getSnapshot;f=f.value;try{var d=h();return!n(f,d)}catch{return!0}}function c(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return mc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,mc}var hg={};/**
151
151
  * @license React
152
152
  * use-sync-external-store-shim.development.js
153
153
  *
@@ -155,7 +155,7 @@
155
155
  *
156
156
  * This source code is licensed under the MIT license found in the
157
157
  * LICENSE file in the root directory of this source tree.
158
- */var hg;function YA(){return hg||(hg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(v){{for(var S=arguments.length,T=new Array(S>1?S-1:0),E=1;E<S;E++)T[E-1]=arguments[E];r("error",v,T)}}function r(v,S,T){{var E=t.ReactDebugCurrentFrame,I=E.getStackAddendum();I!==""&&(S+="%s",T=T.concat([I]));var A=T.map(function(k){return String(k)});A.unshift("Warning: "+S),Function.prototype.apply.call(console[v],console,A)}}function o(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function h(v,S,T){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=S();if(!f){var I=S();s(E,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var A=i({inst:{value:E,getSnapshot:S}}),k=A[0].inst,O=A[1];return l(function(){k.value=E,k.getSnapshot=S,d(k)&&O({inst:k})},[v,E,S]),a(function(){d(k)&&O({inst:k});var _=function(){d(k)&&O({inst:k})};return v(_)},[v]),c(E),E}function d(v){var S=v.getSnapshot,T=v.value;try{var E=S();return!s(T,E)}catch{return!0}}function p(v,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,y=g?p:h,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;dg.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),dg}var pg;function mg(){return pg||(pg=1,process.env.NODE_ENV==="production"?fc.exports=GA():fc.exports=YA()),fc.exports}/**
158
+ */var pg;function qA(){return pg||(pg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(v){{for(var S=arguments.length,T=new Array(S>1?S-1:0),E=1;E<S;E++)T[E-1]=arguments[E];r("error",v,T)}}function r(v,S,T){{var E=t.ReactDebugCurrentFrame,I=E.getStackAddendum();I!==""&&(S+="%s",T=T.concat([I]));var A=T.map(function(k){return String(k)});A.unshift("Warning: "+S),Function.prototype.apply.call(console[v],console,A)}}function o(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function h(v,S,T){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=S();if(!f){var I=S();s(E,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var A=i({inst:{value:E,getSnapshot:S}}),k=A[0].inst,O=A[1];return l(function(){k.value=E,k.getSnapshot=S,d(k)&&O({inst:k})},[v,E,S]),a(function(){d(k)&&O({inst:k});var _=function(){d(k)&&O({inst:k})};return v(_)},[v]),c(E),E}function d(v){var S=v.getSnapshot,T=v.value;try{var E=S();return!s(T,E)}catch{return!0}}function p(v,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,y=g?p:h,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;hg.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),hg}var mg;function gg(){return mg||(mg=1,process.env.NODE_ENV==="production"?pc.exports=KA():pc.exports=qA()),pc.exports}/**
159
159
  * @license React
160
160
  * use-sync-external-store-shim/with-selector.production.min.js
161
161
  *
@@ -163,7 +163,7 @@
163
163
  *
164
164
  * This source code is licensed under the MIT license found in the
165
165
  * LICENSE file in the root directory of this source tree.
166
- */var gg;function KA(){if(gg)return uc;gg=1;var e=w,t=mg();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return uc.useSyncExternalStoreWithSelector=function(c,u,f,h,d){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(E){if(!b){if(b=!0,v=E,E=h(E),d!==void 0&&m.hasValue){var I=m.value;if(d(I,E))return S=I}return S=E}if(I=S,r(v,E))return I;var A=h(E);return d!==void 0&&d(I,A)?I:(v=E,S=A)}var b=!1,v,S,T=f===void 0?null:f;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,f,h,d]);var g=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},uc}var yg={};/**
166
+ */var yg;function XA(){if(yg)return hc;yg=1;var e=w,t=gg();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return hc.useSyncExternalStoreWithSelector=function(c,u,f,h,d){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(E){if(!b){if(b=!0,v=E,E=h(E),d!==void 0&&m.hasValue){var I=m.value;if(d(I,E))return S=I}return S=E}if(I=S,r(v,E))return I;var A=h(E);return d!==void 0&&d(I,A)?I:(v=E,S=A)}var b=!1,v,S,T=f===void 0?null:f;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,f,h,d]);var g=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},hc}var vg={};/**
167
167
  * @license React
168
168
  * use-sync-external-store-shim/with-selector.development.js
169
169
  *
@@ -171,32 +171,32 @@
171
171
  *
172
172
  * This source code is licensed under the MIT license found in the
173
173
  * LICENSE file in the root directory of this source tree.
174
- */var vg;function qA(){return vg||(vg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=mg();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,f,h,d,p){var m=s(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var y=a(function(){var T=!1,E,I,A=function(F){if(!T){T=!0,E=F;var L=d(F);if(p!==void 0&&g.hasValue){var P=g.value;if(p(P,L))return I=P,P}return I=L,L}var D=E,N=I;if(r(D,F))return N;var $=d(F);return p!==void 0&&p(N,$)?N:(E=F,I=$,$)},k=h===void 0?null:h,O=function(){return A(f())},_=k===null?void 0:function(){return A(k())};return[O,_]},[f,h,d,p]),b=y[0],v=y[1],S=o(u,b,v);return i(function(){g.hasValue=!0,g.value=S},[S]),l(S),S}yg.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),yg}process.env.NODE_ENV==="production"?KA():qA();const Zr=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},XA=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},QA=e=>Object.entries(e),bg=e=>e instanceof Promise,wg=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),ZA=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,f)=>n(h=>wg(u,h,s,f));return bg(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},JA=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>wg(c,u,s,o.current));return bg(a)?a.then(c=>l(c)):l(a)},hc=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=Zr(r),i=Zr((n==null?void 0:n.props)??{}),a=Zr(t),l=Zr((n==null?void 0:n.postMiddleware)??[]),c=Zr((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),f=XA(r),h=Zr(f),d=w.useRef(null);w.useEffect(()=>{if(d.current===null)return;const m=d.current;l.current.forEach(g=>{g(r,f,m)})},[r,l,f]);const[p]=w.useState(()=>{const m=()=>i.current,g=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>h.current});return QA(g).reduce((y,[b,v])=>({...y,[b]:n!=null&&n.debug?ZA(b,v,o,m,d,c.current):JA(b,v,o,m,d,c.current)}),{})});return[r,p,i.current]},eO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function tO(e,t){return w.useRef(eO(e,t)).current}const pc={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Jr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(Jr(i,t,n,a))},[]),xg=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:xg(i,t,n,a)}},{}),Tg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},mc=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},nO={default:e=>mc(e,{result:Tg.default}),dark:e=>mc(e,{result:Tg.dark})},rO=(e,t)=>{const n=(a,l,c)=>({key:`--${c}`,value:`${a}`}),r=Jr(e.colors,n),o=Jr(e.spacing,n),s=Jr(e.rounded,n),i=e.custom?Jr(e.custom,n):[];return mc(r.concat(o,s,i),{result:a=>`html${t?`.${t}`:""} {${a}}`,value:(a,l)=>l.replace("hsla(","").replace(")","")})},Sg={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},Eg={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},oO={name:"dark",rounded:Sg,spacing:Eg,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{header:"hsla(0, 0%, 12%)",background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"}}}},sO={name:"light",rounded:Sg,spacing:Eg,shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},iO=oO,aO=sO,gc={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(w.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today"},yc=w.createContext({colorTokenParser:pc.hsla,translations:gc,locale:void 0}),lO=e=>{const t=w.useMemo(()=>({locale:e.locale,translations:{...gc,...e.map},colorTokenParser:e.parser||pc.hsla}),[e]);return x.jsx(yc.Provider,{value:t,children:e.children})},cO=()=>{const e=w.useContext(yc);if(e)return e.locale},Tt=()=>{const e=w.useContext(yc);return e?e.translations:gc},us=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),Cg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Pg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},vc=(e,t)=>{const n=Cg(t,Pg.basic,e)||Cg(t,Pg.extend,e);return n===void 0||n===e?void 0:n},xi=()=>typeof window>"u",bc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ig=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},uO={type:"spring",bounce:.3,duration:.6},Ag=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Og={middle:{x:"0%",opacity:1},enter:Ag(1),exit:Ag(-1)},Dg={exit:{visibility:"hidden"}},fO=e=>{const t=nn(Vm(e));return _m({start:t,end:Kr(t,41)})},Mg=(e,t)=>e.toLocaleDateString(t,{month:"long"}),dO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=Vm(new Date(1970,o,1).setMonth(o)),i=Mg(s,n);return x.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),wc={ArrowLeft:(e,t)=>t==="days"?PA(e,1):Zm(e,1),ArrowRight:(e,t)=>t==="days"?Kr(e,1):hi(e,1),ArrowUp:(e,t)=>t==="days"?IA(e,1):AA(e,1),ArrowDown:(e,t)=>t==="days"?Fm(e,1):Nm(e,1)},kg=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},ur=e=>e.getFullYear().toString().padStart(4,"0"),hO=(e,t,n)=>e===void 0||n===void 0?!1:II(t,e)&&AI(t,n),pO=e=>{var n;const t=Tt();return x.jsx(ft.tbody,{layout:!0,variants:Og,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var s;return x.jsx("tr",{className:(s=e.styles)==null?void 0:s.week,children:r.map(i=>{var d,p,m,g,y,b,v,S,T,E,I,A,k,O;const a=i.toISOString(),l=e.rangeMode?a===((p=(d=e.range)==null?void 0:d.to)==null?void 0:p.toISOString())||a===((g=(m=e.range)==null?void 0:m.from)==null?void 0:g.toISOString()):a===((y=e.date)==null?void 0:y.toISOString()),c=CA(i)&&e.markToday,u=((b=e.disabledDate)==null?void 0:b.call(e,i))||!1,f=!EA(i,e.stateDate)||u,h=e.rangeMode?hO((v=e.range)==null?void 0:v.from,i,(S=e.range)==null?void 0:S.to):!1;return x.jsxs("td",{align:"center",className:Oe("relative",(T=e.styles)==null?void 0:T.dayFrame),children:[x.jsxs("button",{type:"button","data-date":a,disabled:u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${f?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,h&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((I=e.stateRange.from)==null?void 0:I.toISOString())===a?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((A=e.labelRange)==null?void 0:A.from)??t.calendarFromDate})}):null,l&&((k=e.stateRange.to)==null?void 0:k.toISOString())===a?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((O=e.labelRange)==null?void 0:O.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},Fg=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:s=!0,onChangeMonth:i,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:f=!0,...h})=>{const d=w.useRef(us()),p=Tt(),m=w.useRef(null),{date:g,range:y}=h,b=g||new Date,v=w.useRef(null),[S,T]=hc({date:b,isAnimating:!1,year:ur(b),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:dO(d.current,b,o),selectMode:l?"from":void 0,week:_m({start:nn(b),end:NP(b)})},_=>({onChangeYear:F=>({year:F}),setToday:()=>({date:Xr(new Date)}),onExitComplete:()=>(kg(v.current||null,m,_.state().date,200),v.current=null,{isAnimating:!1}),date:F=>{const L=F(_.state().date);return{date:L,year:ur(L)}},nextMonth:F=>{v.current=F.currentTarget;const L=_.state();if(L.isAnimating)return L;const P=hi(L.date,1);return{date:P,isAnimating:!0,direction:1,year:ur(P)}},previousMonth:F=>{v.current=F.currentTarget;const L=_.state();if(L.isAnimating)return L;const P=Zm(L.date,1);return{date:P,isAnimating:!0,direction:-1,year:ur(P)}},onSelectDate:F=>{const L=_.state(),P=F.currentTarget.dataset.range==="true",D=F.currentTarget.dataset.date||"",N=new Date(D);return{date:N,year:ur(N),selectMode:L.selectMode===void 0?void 0:L.selectMode==="from"?"to":"from",range:P?{from:L.selectMode==="from"?N:L.range.from,to:L.selectMode==="to"?N:L.range.to}:L.range}},onChangeMonth:F=>{const L=F.target.value,D=Array.from(F.target.options).find($=>$.value===L),N=_.state();if(D){const $=D.dataset.index||"",W=new Date(_.state().date);return W.setMonth(+$),{...N,date:W,year:ur(W)}}return N},onKeyDown:F=>{const L=F.key,P=_.state();if(L in wc){(L==="ArrowUp"||L==="ArrowDown")&&F.preventDefault();const D=_.state().date,N=yn.keyof(wc,L)?wc[L](D,F.shiftKey?"month":"days"):null;if(N!==null)return kg(F.target,m,N),{...P,date:N,year:ur(N)}}return _.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(_,F,L)=>{var D,N;return(L.method==="onChangeMonth"||L.method==="previousMonth"||L.method==="nextMonth")&&((N=(D=L.props).onChangeMonth)==null||N.call(D,_.date)),_},(_,F,L)=>{var D,N;return L.method==="onChangeYear"&&((N=(D=L.props).onChangeYear)==null||N.call(D,_.date)),_},(_,F,L)=>{const P=L.method==="onSelectDate"||L.method==="setToday"||L.method==="onKeyDown";return l&&P&&t?(c==null||c(_.range),_):(P&&t&&(c==null||c(_.date)),_)}]}),E=Ig(fO(S.date),7),I=S.date.toISOString(),A=Mg(S.date,o);w.useEffect(()=>{t||c==null||c(S.date)},[I]);const k=tO(_=>{T.date(F=>{const L=new Date(F);return L.setFullYear(+_),L})},1200),O=_=>{const F=_.currentTarget.value;T.onChangeYear(F),a==null||a(new Date(F)),k(F)};return x.jsx(vC,{transition:uO,children:x.jsxs("div",{"data-component":"calendar",ref:m,className:Oe("relative overflow-hidden",u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(Gr,{initial:!1,mode:"popLayout",custom:S.direction,onExitComplete:T.onExitComplete,children:x.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(ft.button,{layout:!0,"data-focustrap":"prev",variants:Dg,onClick:T.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(fP,{className:"h-4 w-4"})}),x.jsx(ft.span,{layout:!0,variants:Og,custom:S.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${A.length}ch`},value:A,onChange:T.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:S.months}),x.jsx(ug,{mask:"int",value:S.year,maxLength:4,placeholder:"YYYY",onChange:O,style:{width:`${S.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(ft.button,{layout:!0,"data-focustrap":"next",variants:Dg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:T.nextMonth,children:x.jsx(Ql,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:S.week.map(_=>x.jsx("th",{className:Oe("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:_.toLocaleDateString(o,{weekday:"short"})},_.toString()))})}),x.jsx(pO,{stateRange:S.range,stateDate:S.date,disabledDate:r,markRange:f,zip:E,range:y,styles:u,dispatch:T,date:g||null,markToday:s,rangeMode:l,labelRange:n,RenderOnDay:e,direction:S.direction,onKeyDown:T.onKeyDown})]})]},A)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:T.setToday,children:p.calendarToday})})]})})},Ng=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>x.jsxs(Fr,{...a,as:r,"data-componen":"card",className:Oe("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{className:Oe("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,x.jsx("div",{className:Oe("min-w-full px-8",i),children:e})]}),Lg=e=>{const t=e.Icon??Im,n=Tt();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function mO(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _g(...e){return t=>e.forEach(n=>mO(n,t))}function fr(...e){return C.useCallback(_g(...e),e)}function Vg(e,t=[]){let n=[];function r(s,i){const a=C.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:h,children:d,...p}=f,m=(h==null?void 0:h[e][l])||a,g=C.useMemo(()=>p,Object.values(p));return x.jsx(m.Provider,{value:g,children:d})}function u(f,h){const d=(h==null?void 0:h[e][l])||a,p=C.useContext(d);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>C.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return C.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,gO(o,...t)]}function gO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var eo=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),s=o.find(vO);if(s){const i=s.props.children,a=o.map(l=>l===s?C.Children.count(i)>1?C.Children.only(null):C.isValidElement(i)?i.props.children:null:l);return x.jsx(xc,{...r,ref:t,children:C.isValidElement(i)?C.cloneElement(i,void 0,a):null})}return x.jsx(xc,{...r,ref:t,children:n})});eo.displayName="Slot";var xc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=wO(n);return C.cloneElement(n,{...bO(r,n.props),ref:t?_g(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});xc.displayName="SlotClone";var yO=({children:e})=>x.jsx(x.Fragment,{children:e});function vO(e){return C.isValidElement(e)&&e.type===yO}function bO(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function wO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function xO(e){const t=e+"CollectionProvider",[n,r]=Vg(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=d=>{const{scope:p,children:m}=d,g=w.useRef(null),y=w.useRef(new Map).current;return x.jsx(o,{scope:p,itemMap:y,collectionRef:g,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=w.forwardRef((d,p)=>{const{scope:m,children:g}=d,y=s(a,m),b=fr(p,y.collectionRef);return x.jsx(eo,{ref:b,children:g})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",f=w.forwardRef((d,p)=>{const{scope:m,children:g,...y}=d,b=w.useRef(null),v=fr(p,b),S=s(c,m);return w.useEffect(()=>(S.itemMap.set(b,{ref:b,...y}),()=>void S.itemMap.delete(b))),x.jsx(eo,{[u]:"",ref:v,children:g})});f.displayName=c;function h(d){const p=s(e+"CollectionConsumer",d);return w.useCallback(()=>{const g=p.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,T)=>y.indexOf(S.ref.current)-y.indexOf(T.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},h,r]}var TO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],sn=TO.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?eo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $g(e,t){e&&No.flushSync(()=>e.dispatchEvent(t))}function Tn(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function SO(e,t=globalThis==null?void 0:globalThis.document){const n=Tn(e);C.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var EO="DismissableLayer",Tc="dismissableLayer.update",CO="dismissableLayer.pointerDownOutside",PO="dismissableLayer.focusOutside",Bg,Rg=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jg=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=C.useContext(Rg),[u,f]=C.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),p=fr(t,I=>f(I)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,T=AO(I=>{const A=I.target,k=[...c.branches].some(O=>O.contains(A));!S||k||(o==null||o(I),i==null||i(I),I.defaultPrevented||a==null||a())},h),E=OO(I=>{const A=I.target;[...c.branches].some(O=>O.contains(A))||(s==null||s(I),i==null||i(I),I.defaultPrevented||a==null||a())},h);return SO(I=>{b===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&a&&(I.preventDefault(),a()))},h),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Bg=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Hg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Bg)}},[u,h,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Hg())},[u,c]),C.useEffect(()=>{const I=()=>d({});return document.addEventListener(Tc,I),()=>document.removeEventListener(Tc,I)},[]),x.jsx(sn.div,{...l,ref:p,style:{pointerEvents:v?S?"auto":"none":void 0,...e.style},onFocusCapture:Lt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Lt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Lt(e.onPointerDownCapture,T.onPointerDownCapture)})});jg.displayName=EO;var IO="DismissableLayerBranch",Wg=C.forwardRef((e,t)=>{const n=C.useContext(Rg),r=C.useRef(null),o=fr(t,r);return C.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(sn.div,{...e,ref:o})});Wg.displayName=IO;function AO(e,t=globalThis==null?void 0:globalThis.document){const n=Tn(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){zg(CO,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function OO(e,t=globalThis==null?void 0:globalThis.document){const n=Tn(e),r=C.useRef(!1);return C.useEffect(()=>{const o=s=>{s.target&&!r.current&&zg(PO,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Hg(){const e=new CustomEvent(Tc);document.dispatchEvent(e)}function zg(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?$g(o,s):o.dispatchEvent(s)}var DO=jg,MO=Wg,Ti=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},kO="Portal",Ug=C.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=C.useState(!1);Ti(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?va.createPortal(x.jsx(sn.div,{...r,ref:t}),i):null});Ug.displayName=kO;function FO(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var Gg=e=>{const{present:t,children:n}=e,r=NO(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),s=fr(r.ref,LO(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:s}):null};Gg.displayName="Presence";function NO(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),s=C.useRef("none"),i=e?"mounted":"unmounted",[a,l]=FO(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Si(r.current);s.current=a==="mounted"?c:"none"},[a]),Ti(()=>{const c=r.current,u=o.current;if(u!==e){const h=s.current,d=Si(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ti(()=>{if(t){const c=f=>{const d=Si(r.current).includes(f.animationName);f.target===t&&d&&No.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(s.current=Si(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Si(e){return(e==null?void 0:e.animationName)||"none"}function LO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _O({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=VO({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=Tn(n),l=C.useCallback(c=>{if(s){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else o(c)},[s,e,o,a]);return[i,l]}function VO({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),s=Tn(t);return C.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var $O="VisuallyHidden",Sc=C.forwardRef((e,t)=>x.jsx(sn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Sc.displayName=$O;var Ec="ToastProvider",[Cc,BO,RO]=xO("Toast"),[Yg,I2]=Vg("Toast",[RO]),[jO,Ei]=Yg(Ec),Kg=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=C.useState(null),[c,u]=C.useState(0),f=C.useRef(!1),h=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ec}\`. Expected non-empty \`string\`.`),x.jsx(Cc.Provider,{scope:t,children:x.jsx(jO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:C.useCallback(()=>u(d=>d+1),[]),onToastRemove:C.useCallback(()=>u(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};Kg.displayName=Ec;var qg="ToastViewport",WO=["F8"],Pc="toast.viewportPause",Ic="toast.viewportResume",Xg=C.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=WO,label:o="Notifications ({hotkey})",...s}=e,i=Ei(qg,n),a=BO(n),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=fr(t,f,i.onViewportChange),d=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;C.useEffect(()=>{const g=y=>{var v;r.every(S=>y[S]||y.code===S)&&((v=f.current)==null||v.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),C.useEffect(()=>{const g=l.current,y=f.current;if(p&&g&&y){const b=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Pc);y.dispatchEvent(E),i.isClosePausedRef.current=!0}},v=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Ic);y.dispatchEvent(E),i.isClosePausedRef.current=!1}},S=E=>{!g.contains(E.relatedTarget)&&v()},T=()=>{g.contains(document.activeElement)||v()};return g.addEventListener("focusin",b),g.addEventListener("focusout",S),g.addEventListener("pointermove",b),g.addEventListener("pointerleave",T),window.addEventListener("blur",b),window.addEventListener("focus",v),()=>{g.removeEventListener("focusin",b),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",b),g.removeEventListener("pointerleave",T),window.removeEventListener("blur",b),window.removeEventListener("focus",v)}}},[p,i.isClosePausedRef]);const m=C.useCallback(({tabbingDirection:g})=>{const b=a().map(v=>{const S=v.ref.current,T=[S,...nD(S)];return g==="forwards"?T:T.reverse()});return(g==="forwards"?b.reverse():b).flat()},[a]);return C.useEffect(()=>{const g=f.current;if(g){const y=b=>{var T,E,I;const v=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!v){const A=document.activeElement,k=b.shiftKey;if(b.target===g&&k){(T=c.current)==null||T.focus();return}const F=m({tabbingDirection:k?"backwards":"forwards"}),L=F.findIndex(P=>P===A);Dc(F.slice(L+1))?b.preventDefault():k?(E=c.current)==null||E.focus():(I=u.current)==null||I.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[a,m]),x.jsxs(MO,{ref:l,role:"region","aria-label":o.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&x.jsx(Ac,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Dc(g)}}),x.jsx(Cc.Slot,{scope:n,children:x.jsx(sn.ol,{tabIndex:-1,...s,ref:h})}),p&&x.jsx(Ac,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Dc(g)}})]})});Xg.displayName=qg;var Qg="ToastFocusProxy",Ac=C.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Ei(Qg,n);return x.jsx(Sc,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});Ac.displayName=Qg;var Ci="Toast",HO="toast.swipeStart",zO="toast.swipeMove",UO="toast.swipeCancel",GO="toast.swipeEnd",Zg=C.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=_O({prop:r,defaultProp:o,onChange:s});return x.jsx(Gg,{present:n||a,children:x.jsx(qO,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Tn(e.onPause),onResume:Tn(e.onResume),onSwipeStart:Lt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Lt(e.onSwipeMove,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Lt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Lt(e.onSwipeEnd,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});Zg.displayName=Ci;var[YO,KO]=Yg(Ci,{onClose(){}}),qO=C.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:d,...p}=e,m=Ei(Ci,n),[g,y]=C.useState(null),b=fr(t,P=>y(P)),v=C.useRef(null),S=C.useRef(null),T=o||m.duration,E=C.useRef(0),I=C.useRef(T),A=C.useRef(0),{onToastAdd:k,onToastRemove:O}=m,_=Tn(()=>{var D;(g==null?void 0:g.contains(document.activeElement))&&((D=m.viewport)==null||D.focus()),i()}),F=C.useCallback(P=>{!P||P===1/0||(window.clearTimeout(A.current),E.current=new Date().getTime(),A.current=window.setTimeout(_,P))},[_]);C.useEffect(()=>{const P=m.viewport;if(P){const D=()=>{F(I.current),c==null||c()},N=()=>{const $=new Date().getTime()-E.current;I.current=I.current-$,window.clearTimeout(A.current),l==null||l()};return P.addEventListener(Pc,N),P.addEventListener(Ic,D),()=>{P.removeEventListener(Pc,N),P.removeEventListener(Ic,D)}}},[m.viewport,T,l,c,F]),C.useEffect(()=>{s&&!m.isClosePausedRef.current&&F(T)},[s,T,m.isClosePausedRef,F]),C.useEffect(()=>(k(),()=>O()),[k,O]);const L=C.useMemo(()=>g?oy(g):null,[g]);return m.viewport?x.jsxs(x.Fragment,{children:[L&&x.jsx(XO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),x.jsx(YO,{scope:n,onClose:_,children:No.createPortal(x.jsx(Cc.ItemSlot,{scope:n,children:x.jsx(DO,{asChild:!0,onEscapeKeyDown:Lt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||_(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(sn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Lt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:Lt(e.onPointerDown,P=>{P.button===0&&(v.current={x:P.clientX,y:P.clientY})}),onPointerMove:Lt(e.onPointerMove,P=>{if(!v.current)return;const D=P.clientX-v.current.x,N=P.clientY-v.current.y,$=!!S.current,W=["left","right"].includes(m.swipeDirection),U=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,M=W?U(0,D):0,R=W?0:U(0,N),q=P.pointerType==="touch"?10:2,ee={x:M,y:R},Q={originalEvent:P,delta:ee};$?(S.current=ee,Pi(zO,f,Q,{discrete:!1})):sy(ee,m.swipeDirection,q)?(S.current=ee,Pi(HO,u,Q,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(D)>q||Math.abs(N)>q)&&(v.current=null)}),onPointerUp:Lt(e.onPointerUp,P=>{const D=S.current,N=P.target;if(N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),S.current=null,v.current=null,D){const $=P.currentTarget,W={originalEvent:P,delta:D};sy(D,m.swipeDirection,m.swipeThreshold)?Pi(GO,d,W,{discrete:!0}):Pi(UO,h,W,{discrete:!0}),$.addEventListener("click",U=>U.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),XO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ei(Ci,t),[s,i]=C.useState(!1),[a,l]=C.useState(!1);return eD(()=>i(!0)),C.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(Ug,{asChild:!0,children:x.jsx(Sc,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},QO="ToastTitle",Jg=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(sn.div,{...r,ref:t})});Jg.displayName=QO;var ZO="ToastDescription",ey=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(sn.div,{...r,ref:t})});ey.displayName=ZO;var ty="ToastAction",JO=C.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(ry,{altText:n,asChild:!0,children:x.jsx(Oc,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ty}\`. Expected non-empty \`string\`.`),null)});JO.displayName=ty;var ny="ToastClose",Oc=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=KO(ny,n);return x.jsx(ry,{asChild:!0,children:x.jsx(sn.button,{type:"button",...r,ref:t,onClick:Lt(e.onClick,o.onClose)})})});Oc.displayName=ny;var ry=C.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(sn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function oy(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),tD(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...oy(r))}}),t}function Pi(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?$g(o,s):o.dispatchEvent(s)}var sy=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function eD(e=()=>{}){const t=Tn(e);Ti(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function tD(e){return e.nodeType===e.ELEMENT_NODE}function nD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var rD=Kg,oD=Xg,sD=Zg,iD=Jg,aD=ey,lD=Oc;const cD=e=>{const[t,n]=w.useState(!1),r=()=>n(!0),o=()=>n(!1);return w.useEffect(()=>{const s=e.current;if(s)return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",o),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",o)}},[]),t},uD=Sr("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),iy=w.createContext(()=>{throw new Error("Not implemented")}),fD=()=>w.useContext(iy),ay={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},dD=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=uD({theme:t.theme||"default"});return x.jsx(sD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:s,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:ay[t.reversedIndex]||ay.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:i,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(iD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(aD,{className:"select-text truncate",children:t.text})]}),r?x.jsx(lD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(Jl,{className:"h-5 w-5"})}):null]})})})});function hD({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=cD(r),[s,i]=w.useState([]),a=w.useCallback(()=>i([]),[]);w.useEffect(()=>()=>a(),[a]);const l=w.useCallback((c,u)=>{const f=window.crypto.randomUUID();return i(d=>{const p=[...d,{...u,id:f,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(d=>d.filter(p=>p.id!==f))}},[t]);return x.jsxs(rD,{duration:n,swipeThreshold:150,children:[x.jsx(iy.Provider,{value:l,children:e}),x.jsx(Gr,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,f)=>{const h=()=>i(d=>d.filter(p=>p.id!==c.id));return w.createElement(dD,{...c,key:c.id,hover:o,index:u,onClose:h,isLast:f.length-1===u,reversedIndex:f.length-(u+1)})})}),x.jsx(oD,{ref:r,"data-items":s.length,style:{justifyContent:"start",height:`${(o?s.length:Math.min(1,s.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const pD=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:Oe("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),ly=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},cy=w.createContext(""),mD=e=>{const[t,n]=ly(e.active),r=ar(0),o=ar(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const f=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void f(m)};window.addEventListener("resize",h);let d=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(d=u.querySelector(`li[data-id="${p}"]`),n(p)),d===null){d=u.querySelector("li[data-id]");const m=d.getAttribute("data-id")||"";n(m)}return f(d),()=>window.removeEventListener("resize",h)},[]);const a=bd(e.onChange);w.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=w.Children.toArray(e.children),c=u=>{const f=u.currentTarget,h=f.getBoundingClientRect();o.set(h.width),r.set(f.offsetLeft),n(f.dataset.id||"")};return x.jsx(cy.Provider,{value:t,children:x.jsx(Ng,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const f=u.props;return x.jsx("li",{"data-id":f.id,"data-active":t===f.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:x.jsx(i,{"data-id":f.id,onClick:c,"aria-current":"page",href:e.useHash?`#${f.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:f.title})},`tab-header-${f.id}`)})})})}),children:e.children})})},gD=()=>w.useContext(cy),yD=e=>{const t=gD();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function $n(e){return uy(e)?(e.nodeName||"").toLowerCase():"#document"}function It(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sn(e){var t;return(t=(uy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uy(e){return e instanceof Node||e instanceof It(e).Node}function Fe(e){return e instanceof Element||e instanceof It(e).Element}function nt(e){return e instanceof HTMLElement||e instanceof It(e).HTMLElement}function Mc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof It(e).ShadowRoot}function fs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_t(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function vD(e){return["table","td","th"].includes($n(e))}function Ii(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function kc(e){const t=Fc(),n=Fe(e)?_t(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function bD(e){let t=En(e);for(;nt(t)&&!Bn(t);){if(kc(t))return t;if(Ii(t))return null;t=En(t)}return null}function Fc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bn(e){return["html","body","#document"].includes($n(e))}function _t(e){return It(e).getComputedStyle(e)}function Ai(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function En(e){if($n(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mc(e)&&e.host||Sn(e);return Mc(t)?t.host:t}function fy(e){const t=En(e);return Bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:nt(t)&&fs(t)?t:fy(t)}function Rn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fy(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=It(o);if(s){const a=Nc(i);return t.concat(i,i.visualViewport||[],fs(o)?o:[],a&&n?Rn(a):[])}return t.concat(o,Rn(o,[],n))}function Nc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zt(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 Ke(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Mc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Lc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function dy(){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 hy(e){return e.mozInputSource===0&&e.isTrusted?!0:$c()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function _c(e){return wD()?!1:!$c()&&e.width===0&&e.height===0||$c()&&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 Vc(){return/apple/i.test(navigator.vendor)}function $c(){const e=/android/i;return e.test(Lc())||e.test(dy())}function py(){return Lc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function wD(){return dy().includes("jsdom/")}function to(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function xD(e){return"nativeEvent"in e}function TD(e){return e.matches("html,body")}function dt(e){return(e==null?void 0:e.ownerDocument)||document}function Bc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function an(e){return"composedPath"in e?e.composedPath()[0]:e.target}const SD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Rc(e){return nt(e)&&e.matches(SD)}function gt(e){e.preventDefault(),e.stopPropagation()}function my(e){return e?e.getAttribute("role")==="combobox"&&Rc(e):!1}const ln=Math.min,Vt=Math.max,Oi=Math.round,no=Math.floor,jn=e=>({x:e,y:e}),ED={left:"right",right:"left",bottom:"top",top:"bottom"},CD={start:"end",end:"start"};function jc(e,t,n){return Vt(e,ln(t,n))}function ro(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function oo(e){return e.split("-")[1]}function gy(e){return e==="x"?"y":"x"}function Wc(e){return e==="y"?"height":"width"}function dr(e){return["top","bottom"].includes(Wn(e))?"y":"x"}function Hc(e){return gy(dr(e))}function PD(e,t,n){n===void 0&&(n=!1);const r=oo(e),o=Hc(e),s=Wc(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Di(i)),[i,Di(i)]}function ID(e){const t=Di(e);return[zc(e),t,zc(t)]}function zc(e){return e.replace(/start|end/g,t=>CD[t])}function AD(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function OD(e,t,n,r){const o=oo(e);let s=AD(Wn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(zc)))),s}function Di(e){return e.replace(/left|right|bottom|top/g,t=>ED[t])}function DD(e){return{top:0,right:0,bottom:0,left:0,...e}}function yy(e){return typeof e!="number"?DD(e):{top:e,right:e,bottom:e,left:e}}function Mi(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}}/*!
174
+ */var bg;function QA(){return bg||(bg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=gg();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,f,h,d,p){var m=s(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var y=a(function(){var T=!1,E,I,A=function(F){if(!T){T=!0,E=F;var L=d(F);if(p!==void 0&&g.hasValue){var P=g.value;if(p(P,L))return I=P,P}return I=L,L}var D=E,N=I;if(r(D,F))return N;var $=d(F);return p!==void 0&&p(N,$)?N:(E=F,I=$,$)},k=h===void 0?null:h,O=function(){return A(f())},_=k===null?void 0:function(){return A(k())};return[O,_]},[f,h,d,p]),b=y[0],v=y[1],S=o(u,b,v);return i(function(){g.hasValue=!0,g.value=S},[S]),l(S),S}vg.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),vg}process.env.NODE_ENV==="production"?XA():QA();const Jr=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},ZA=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},JA=e=>Object.entries(e),wg=e=>e instanceof Promise,xg=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),eO=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,f)=>n(h=>xg(u,h,s,f));return wg(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},tO=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>xg(c,u,s,o.current));return wg(a)?a.then(c=>l(c)):l(a)},gc=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=Jr(r),i=Jr((n==null?void 0:n.props)??{}),a=Jr(t),l=Jr((n==null?void 0:n.postMiddleware)??[]),c=Jr((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),f=ZA(r),h=Jr(f),d=w.useRef(null);w.useEffect(()=>{if(d.current===null)return;const m=d.current;l.current.forEach(g=>{g(r,f,m)})},[r,l,f]);const[p]=w.useState(()=>{const m=()=>i.current,g=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>h.current});return JA(g).reduce((y,[b,v])=>({...y,[b]:n!=null&&n.debug?eO(b,v,o,m,d,c.current):tO(b,v,o,m,d,c.current)}),{})});return[r,p,i.current]},nO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function rO(e,t){return w.useRef(nO(e,t)).current}const Ti={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},eo=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(eo(i,t,n,a))},[]),Tg=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:Tg(i,t,n,a)}},{}),Sg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},yc=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},oO={default:e=>yc(e,{result:Sg.default}),dark:e=>yc(e,{result:Sg.dark})},sO=(e,t)=>{const n=(a,l,c)=>({key:`--${c}`,value:`${a}`}),r=eo(e.colors,n),o=eo(e.spacing,n),s=eo(e.rounded,n),i=e.custom?eo(e.custom,n):[];return yc(r.concat(o,s,i),{result:a=>`html${t?`.${t}`:""} {${a}}`,value:(a,l)=>l.replace("hsla(","").replace(")","")})},Eg={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},Cg={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},iO={name:"dark",rounded:Eg,spacing:Cg,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{header:"hsla(0, 0%, 12%)",background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"}}}},aO={name:"light",rounded:Eg,spacing:Cg,shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},lO=iO,cO=aO,vc={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(w.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today"},Si=w.createContext({colorTokenParser:Ti.hsla,translations:vc,locale:void 0}),uO=e=>{const t=w.useMemo(()=>({locale:e.locale,translations:{...vc,...e.map},colorTokenParser:e.parser||Ti.hsla}),[e]);return x.jsx(Si.Provider,{value:t,children:e.children})},Pg=()=>{const e=w.useContext(Si);if(e)return e.locale},Tt=()=>{const e=w.useContext(Si);return e?e.translations:vc},fO=()=>{const e=w.useContext(Si);return e?e.colorTokenParser:Ti.hsla},Wt=(e,t=2)=>e.toString(16).padStart(t,"0"),fs=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${Wt(t,4)+Wt(n,3)}-${Wt(r[0])+Wt(r[1])}-${Wt(r[2])+Wt(r[3])}-${Wt(r[4])+Wt(r[5])}-${Wt(r[6])+Wt(r[7])+Wt(r[8])+Wt(r[9])}`},Ig=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Ag={basic:/[,[\]]+?/,extend:/[,[\].]+?/},bc=(e,t)=>{const n=Ig(t,Ag.basic,e)||Ig(t,Ag.extend,e);return n===void 0||n===e?void 0:n},Ei=()=>typeof window>"u",wc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Og=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},dO={type:"spring",bounce:.3,duration:.6},Dg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Mg={middle:{x:"0%",opacity:1},enter:Dg(1),exit:Dg(-1)},kg={exit:{visibility:"hidden"}},hO=e=>{const t=rn($m(e));return Vm({start:t,end:qr(t,41)})},Fg=(e,t)=>e.toLocaleDateString(t,{month:"long"}),pO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=$m(new Date(1970,o,1).setMonth(o)),i=Fg(s,n);return x.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),xc={ArrowLeft:(e,t)=>t==="days"?AA(e,1):Jm(e,1),ArrowRight:(e,t)=>t==="days"?qr(e,1):pi(e,1),ArrowUp:(e,t)=>t==="days"?OA(e,1):DA(e,1),ArrowDown:(e,t)=>t==="days"?Nm(e,1):Lm(e,1)},Ng=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},fr=e=>e.getFullYear().toString().padStart(4,"0"),mO=(e,t,n)=>e===void 0||n===void 0?!1:OI(t,e)&&DI(t,n),gO=e=>{var n;const t=Tt();return x.jsx(ft.tbody,{layout:!0,variants:Mg,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var s;return x.jsx("tr",{className:(s=e.styles)==null?void 0:s.week,children:r.map(i=>{var d,p,m,g,y,b,v,S,T,E,I,A,k,O;const a=i.toISOString(),l=e.rangeMode?a===((p=(d=e.range)==null?void 0:d.to)==null?void 0:p.toISOString())||a===((g=(m=e.range)==null?void 0:m.from)==null?void 0:g.toISOString()):a===((y=e.date)==null?void 0:y.toISOString()),c=IA(i)&&e.markToday,u=((b=e.disabledDate)==null?void 0:b.call(e,i))||!1,f=!PA(i,e.stateDate)||u,h=e.rangeMode?mO((v=e.range)==null?void 0:v.from,i,(S=e.range)==null?void 0:S.to):!1;return x.jsxs("td",{align:"center",className:Oe("relative",(T=e.styles)==null?void 0:T.dayFrame),children:[x.jsxs("button",{type:"button","data-date":a,disabled:u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${f?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,h&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((I=e.stateRange.from)==null?void 0:I.toISOString())===a?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((A=e.labelRange)==null?void 0:A.from)??t.calendarFromDate})}):null,l&&((k=e.stateRange.to)==null?void 0:k.toISOString())===a?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((O=e.labelRange)==null?void 0:O.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},Lg=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:s=!0,onChangeMonth:i,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:f=!0,...h})=>{const d=w.useRef(fs()),p=Tt(),m=w.useRef(null),{date:g,range:y}=h,b=g||new Date,v=w.useRef(null),[S,T]=gc({date:b,isAnimating:!1,year:fr(b),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:pO(d.current,b,o),selectMode:l?"from":void 0,week:Vm({start:rn(b),end:_P(b)})},_=>({onChangeYear:F=>({year:F}),setToday:()=>({date:Qr(new Date)}),onExitComplete:()=>(Ng(v.current||null,m,_.state().date,200),v.current=null,{isAnimating:!1}),date:F=>{const L=F(_.state().date);return{date:L,year:fr(L)}},nextMonth:F=>{v.current=F.currentTarget;const L=_.state();if(L.isAnimating)return L;const P=pi(L.date,1);return{date:P,isAnimating:!0,direction:1,year:fr(P)}},previousMonth:F=>{v.current=F.currentTarget;const L=_.state();if(L.isAnimating)return L;const P=Jm(L.date,1);return{date:P,isAnimating:!0,direction:-1,year:fr(P)}},onSelectDate:F=>{const L=_.state(),P=F.currentTarget.dataset.range==="true",D=F.currentTarget.dataset.date||"",N=new Date(D);return{date:N,year:fr(N),selectMode:L.selectMode===void 0?void 0:L.selectMode==="from"?"to":"from",range:P?{from:L.selectMode==="from"?N:L.range.from,to:L.selectMode==="to"?N:L.range.to}:L.range}},onChangeMonth:F=>{const L=F.target.value,D=Array.from(F.target.options).find($=>$.value===L),N=_.state();if(D){const $=D.dataset.index||"",H=new Date(_.state().date);return H.setMonth(+$),{...N,date:H,year:fr(H)}}return N},onKeyDown:F=>{const L=F.key,P=_.state();if(L in xc){(L==="ArrowUp"||L==="ArrowDown")&&F.preventDefault();const D=_.state().date,N=vn.keyof(xc,L)?xc[L](D,F.shiftKey?"month":"days"):null;if(N!==null)return Ng(F.target,m,N),{...P,date:N,year:fr(N)}}return _.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(_,F,L)=>{var D,N;return(L.method==="onChangeMonth"||L.method==="previousMonth"||L.method==="nextMonth")&&((N=(D=L.props).onChangeMonth)==null||N.call(D,_.date)),_},(_,F,L)=>{var D,N;return L.method==="onChangeYear"&&((N=(D=L.props).onChangeYear)==null||N.call(D,_.date)),_},(_,F,L)=>{const P=L.method==="onSelectDate"||L.method==="setToday"||L.method==="onKeyDown";return l&&P&&t?(c==null||c(_.range),_):(P&&t&&(c==null||c(_.date)),_)}]}),E=Og(hO(S.date),7),I=S.date.toISOString(),A=Fg(S.date,o);w.useEffect(()=>{t||c==null||c(S.date)},[I]);const k=rO(_=>{T.date(F=>{const L=new Date(F);return L.setFullYear(+_),L})},1200),O=_=>{const F=_.currentTarget.value;T.onChangeYear(F),a==null||a(new Date(F)),k(F)};return x.jsx(wC,{transition:dO,children:x.jsxs("div",{"data-component":"calendar",ref:m,className:Oe("relative overflow-hidden",u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(Yr,{initial:!1,mode:"popLayout",custom:S.direction,onExitComplete:T.onExitComplete,children:x.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(ft.button,{layout:!0,"data-focustrap":"prev",variants:kg,onClick:T.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(hP,{className:"h-4 w-4"})}),x.jsx(ft.span,{layout:!0,variants:Mg,custom:S.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${A.length}ch`},value:A,onChange:T.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:S.months}),x.jsx(fg,{mask:"int",value:S.year,maxLength:4,placeholder:"YYYY",onChange:O,style:{width:`${S.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(ft.button,{layout:!0,"data-focustrap":"next",variants:kg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:T.nextMonth,children:x.jsx(ec,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:S.week.map(_=>x.jsx("th",{className:Oe("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:_.toLocaleDateString(o,{weekday:"short"})},_.toString()))})}),x.jsx(gO,{stateRange:S.range,stateDate:S.date,disabledDate:r,markRange:f,zip:E,range:y,styles:u,dispatch:T,date:g||null,markToday:s,rangeMode:l,labelRange:n,RenderOnDay:e,direction:S.direction,onKeyDown:T.onKeyDown})]})]},A)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:T.setToday,children:p.calendarToday})})]})})},_g=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>x.jsxs(Nr,{...a,as:r,"data-componen":"card",className:Oe("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{className:Oe("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,x.jsx("div",{className:Oe("min-w-full px-8",i),children:e})]}),Vg=e=>{const t=e.Icon??Am,n=Tt();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function yO(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function $g(...e){return t=>e.forEach(n=>yO(n,t))}function dr(...e){return C.useCallback($g(...e),e)}function Bg(e,t=[]){let n=[];function r(s,i){const a=C.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:h,children:d,...p}=f,m=(h==null?void 0:h[e][l])||a,g=C.useMemo(()=>p,Object.values(p));return x.jsx(m.Provider,{value:g,children:d})}function u(f,h){const d=(h==null?void 0:h[e][l])||a,p=C.useContext(d);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>C.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return C.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,vO(o,...t)]}function vO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var to=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),s=o.find(wO);if(s){const i=s.props.children,a=o.map(l=>l===s?C.Children.count(i)>1?C.Children.only(null):C.isValidElement(i)?i.props.children:null:l);return x.jsx(Tc,{...r,ref:t,children:C.isValidElement(i)?C.cloneElement(i,void 0,a):null})}return x.jsx(Tc,{...r,ref:t,children:n})});to.displayName="Slot";var Tc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=TO(n);return C.cloneElement(n,{...xO(r,n.props),ref:t?$g(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});Tc.displayName="SlotClone";var bO=({children:e})=>x.jsx(x.Fragment,{children:e});function wO(e){return C.isValidElement(e)&&e.type===bO}function xO(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function TO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function SO(e){const t=e+"CollectionProvider",[n,r]=Bg(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=d=>{const{scope:p,children:m}=d,g=w.useRef(null),y=w.useRef(new Map).current;return x.jsx(o,{scope:p,itemMap:y,collectionRef:g,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=w.forwardRef((d,p)=>{const{scope:m,children:g}=d,y=s(a,m),b=dr(p,y.collectionRef);return x.jsx(to,{ref:b,children:g})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",f=w.forwardRef((d,p)=>{const{scope:m,children:g,...y}=d,b=w.useRef(null),v=dr(p,b),S=s(c,m);return w.useEffect(()=>(S.itemMap.set(b,{ref:b,...y}),()=>void S.itemMap.delete(b))),x.jsx(to,{[u]:"",ref:v,children:g})});f.displayName=c;function h(d){const p=s(e+"CollectionConsumer",d);return w.useCallback(()=>{const g=p.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,T)=>y.indexOf(S.ref.current)-y.indexOf(T.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},h,r]}var EO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],an=EO.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?to:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Rg(e,t){e&&Lo.flushSync(()=>e.dispatchEvent(t))}function Sn(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function CO(e,t=globalThis==null?void 0:globalThis.document){const n=Sn(e);C.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var PO="DismissableLayer",Sc="dismissableLayer.update",IO="dismissableLayer.pointerDownOutside",AO="dismissableLayer.focusOutside",jg,Hg=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wg=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=C.useContext(Hg),[u,f]=C.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),p=dr(t,I=>f(I)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,T=DO(I=>{const A=I.target,k=[...c.branches].some(O=>O.contains(A));!S||k||(o==null||o(I),i==null||i(I),I.defaultPrevented||a==null||a())},h),E=MO(I=>{const A=I.target;[...c.branches].some(O=>O.contains(A))||(s==null||s(I),i==null||i(I),I.defaultPrevented||a==null||a())},h);return CO(I=>{b===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&a&&(I.preventDefault(),a()))},h),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(jg=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ug(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=jg)}},[u,h,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ug())},[u,c]),C.useEffect(()=>{const I=()=>d({});return document.addEventListener(Sc,I),()=>document.removeEventListener(Sc,I)},[]),x.jsx(an.div,{...l,ref:p,style:{pointerEvents:v?S?"auto":"none":void 0,...e.style},onFocusCapture:Lt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Lt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Lt(e.onPointerDownCapture,T.onPointerDownCapture)})});Wg.displayName=PO;var OO="DismissableLayerBranch",zg=C.forwardRef((e,t)=>{const n=C.useContext(Hg),r=C.useRef(null),o=dr(t,r);return C.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(an.div,{...e,ref:o})});zg.displayName=OO;function DO(e,t=globalThis==null?void 0:globalThis.document){const n=Sn(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Gg(IO,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function MO(e,t=globalThis==null?void 0:globalThis.document){const n=Sn(e),r=C.useRef(!1);return C.useEffect(()=>{const o=s=>{s.target&&!r.current&&Gg(AO,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ug(){const e=new CustomEvent(Sc);document.dispatchEvent(e)}function Gg(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Rg(o,s):o.dispatchEvent(s)}var kO=Wg,FO=zg,Ci=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},NO="Portal",Yg=C.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=C.useState(!1);Ci(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?xa.createPortal(x.jsx(an.div,{...r,ref:t}),i):null});Yg.displayName=NO;function LO(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var Kg=e=>{const{present:t,children:n}=e,r=_O(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),s=dr(r.ref,VO(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:s}):null};Kg.displayName="Presence";function _O(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),s=C.useRef("none"),i=e?"mounted":"unmounted",[a,l]=LO(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Pi(r.current);s.current=a==="mounted"?c:"none"},[a]),Ci(()=>{const c=r.current,u=o.current;if(u!==e){const h=s.current,d=Pi(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ci(()=>{if(t){const c=f=>{const d=Pi(r.current).includes(f.animationName);f.target===t&&d&&Lo.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(s.current=Pi(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Pi(e){return(e==null?void 0:e.animationName)||"none"}function VO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $O({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=BO({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=Sn(n),l=C.useCallback(c=>{if(s){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else o(c)},[s,e,o,a]);return[i,l]}function BO({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),s=Sn(t);return C.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var RO="VisuallyHidden",Ec=C.forwardRef((e,t)=>x.jsx(an.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ec.displayName=RO;var Cc="ToastProvider",[Pc,jO,HO]=SO("Toast"),[qg,O2]=Bg("Toast",[HO]),[WO,Ii]=qg(Cc),Xg=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=C.useState(null),[c,u]=C.useState(0),f=C.useRef(!1),h=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Cc}\`. Expected non-empty \`string\`.`),x.jsx(Pc.Provider,{scope:t,children:x.jsx(WO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:C.useCallback(()=>u(d=>d+1),[]),onToastRemove:C.useCallback(()=>u(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};Xg.displayName=Cc;var Qg="ToastViewport",zO=["F8"],Ic="toast.viewportPause",Ac="toast.viewportResume",Zg=C.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=zO,label:o="Notifications ({hotkey})",...s}=e,i=Ii(Qg,n),a=jO(n),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=dr(t,f,i.onViewportChange),d=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;C.useEffect(()=>{const g=y=>{var v;r.every(S=>y[S]||y.code===S)&&((v=f.current)==null||v.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),C.useEffect(()=>{const g=l.current,y=f.current;if(p&&g&&y){const b=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Ic);y.dispatchEvent(E),i.isClosePausedRef.current=!0}},v=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Ac);y.dispatchEvent(E),i.isClosePausedRef.current=!1}},S=E=>{!g.contains(E.relatedTarget)&&v()},T=()=>{g.contains(document.activeElement)||v()};return g.addEventListener("focusin",b),g.addEventListener("focusout",S),g.addEventListener("pointermove",b),g.addEventListener("pointerleave",T),window.addEventListener("blur",b),window.addEventListener("focus",v),()=>{g.removeEventListener("focusin",b),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",b),g.removeEventListener("pointerleave",T),window.removeEventListener("blur",b),window.removeEventListener("focus",v)}}},[p,i.isClosePausedRef]);const m=C.useCallback(({tabbingDirection:g})=>{const b=a().map(v=>{const S=v.ref.current,T=[S,...oD(S)];return g==="forwards"?T:T.reverse()});return(g==="forwards"?b.reverse():b).flat()},[a]);return C.useEffect(()=>{const g=f.current;if(g){const y=b=>{var T,E,I;const v=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!v){const A=document.activeElement,k=b.shiftKey;if(b.target===g&&k){(T=c.current)==null||T.focus();return}const F=m({tabbingDirection:k?"backwards":"forwards"}),L=F.findIndex(P=>P===A);Mc(F.slice(L+1))?b.preventDefault():k?(E=c.current)==null||E.focus():(I=u.current)==null||I.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[a,m]),x.jsxs(FO,{ref:l,role:"region","aria-label":o.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&x.jsx(Oc,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Mc(g)}}),x.jsx(Pc.Slot,{scope:n,children:x.jsx(an.ol,{tabIndex:-1,...s,ref:h})}),p&&x.jsx(Oc,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Mc(g)}})]})});Zg.displayName=Qg;var Jg="ToastFocusProxy",Oc=C.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Ii(Jg,n);return x.jsx(Ec,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});Oc.displayName=Jg;var Ai="Toast",UO="toast.swipeStart",GO="toast.swipeMove",YO="toast.swipeCancel",KO="toast.swipeEnd",ey=C.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=$O({prop:r,defaultProp:o,onChange:s});return x.jsx(Kg,{present:n||a,children:x.jsx(QO,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Sn(e.onPause),onResume:Sn(e.onResume),onSwipeStart:Lt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Lt(e.onSwipeMove,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Lt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Lt(e.onSwipeEnd,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});ey.displayName=Ai;var[qO,XO]=qg(Ai,{onClose(){}}),QO=C.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:d,...p}=e,m=Ii(Ai,n),[g,y]=C.useState(null),b=dr(t,P=>y(P)),v=C.useRef(null),S=C.useRef(null),T=o||m.duration,E=C.useRef(0),I=C.useRef(T),A=C.useRef(0),{onToastAdd:k,onToastRemove:O}=m,_=Sn(()=>{var D;(g==null?void 0:g.contains(document.activeElement))&&((D=m.viewport)==null||D.focus()),i()}),F=C.useCallback(P=>{!P||P===1/0||(window.clearTimeout(A.current),E.current=new Date().getTime(),A.current=window.setTimeout(_,P))},[_]);C.useEffect(()=>{const P=m.viewport;if(P){const D=()=>{F(I.current),c==null||c()},N=()=>{const $=new Date().getTime()-E.current;I.current=I.current-$,window.clearTimeout(A.current),l==null||l()};return P.addEventListener(Ic,N),P.addEventListener(Ac,D),()=>{P.removeEventListener(Ic,N),P.removeEventListener(Ac,D)}}},[m.viewport,T,l,c,F]),C.useEffect(()=>{s&&!m.isClosePausedRef.current&&F(T)},[s,T,m.isClosePausedRef,F]),C.useEffect(()=>(k(),()=>O()),[k,O]);const L=C.useMemo(()=>g?iy(g):null,[g]);return m.viewport?x.jsxs(x.Fragment,{children:[L&&x.jsx(ZO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),x.jsx(qO,{scope:n,onClose:_,children:Lo.createPortal(x.jsx(Pc.ItemSlot,{scope:n,children:x.jsx(kO,{asChild:!0,onEscapeKeyDown:Lt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||_(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(an.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Lt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:Lt(e.onPointerDown,P=>{P.button===0&&(v.current={x:P.clientX,y:P.clientY})}),onPointerMove:Lt(e.onPointerMove,P=>{if(!v.current)return;const D=P.clientX-v.current.x,N=P.clientY-v.current.y,$=!!S.current,H=["left","right"].includes(m.swipeDirection),U=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,M=H?U(0,D):0,R=H?0:U(0,N),q=P.pointerType==="touch"?10:2,ee={x:M,y:R},Q={originalEvent:P,delta:ee};$?(S.current=ee,Oi(GO,f,Q,{discrete:!1})):ay(ee,m.swipeDirection,q)?(S.current=ee,Oi(UO,u,Q,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(D)>q||Math.abs(N)>q)&&(v.current=null)}),onPointerUp:Lt(e.onPointerUp,P=>{const D=S.current,N=P.target;if(N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),S.current=null,v.current=null,D){const $=P.currentTarget,H={originalEvent:P,delta:D};ay(D,m.swipeDirection,m.swipeThreshold)?Oi(KO,d,H,{discrete:!0}):Oi(YO,h,H,{discrete:!0}),$.addEventListener("click",U=>U.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),ZO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ii(Ai,t),[s,i]=C.useState(!1),[a,l]=C.useState(!1);return nD(()=>i(!0)),C.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(Yg,{asChild:!0,children:x.jsx(Ec,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},JO="ToastTitle",ty=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(an.div,{...r,ref:t})});ty.displayName=JO;var eD="ToastDescription",ny=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(an.div,{...r,ref:t})});ny.displayName=eD;var ry="ToastAction",tD=C.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(sy,{altText:n,asChild:!0,children:x.jsx(Dc,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ry}\`. Expected non-empty \`string\`.`),null)});tD.displayName=ry;var oy="ToastClose",Dc=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=XO(oy,n);return x.jsx(sy,{asChild:!0,children:x.jsx(an.button,{type:"button",...r,ref:t,onClick:Lt(e.onClick,o.onClose)})})});Dc.displayName=oy;var sy=C.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(an.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function iy(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),rD(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...iy(r))}}),t}function Oi(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Rg(o,s):o.dispatchEvent(s)}var ay=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function nD(e=()=>{}){const t=Sn(e);Ci(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function rD(e){return e.nodeType===e.ELEMENT_NODE}function oD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var sD=Xg,iD=Zg,aD=ey,lD=ty,cD=ny,uD=Dc;const fD=e=>{const[t,n]=w.useState(!1),r=()=>n(!0),o=()=>n(!1);return w.useEffect(()=>{const s=e.current;if(s)return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",o),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",o)}},[]),t},dD=Er("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),ly=w.createContext(()=>{throw new Error("Not implemented")}),hD=()=>w.useContext(ly),cy={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},pD=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=dD({theme:t.theme||"default"});return x.jsx(aD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:s,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:cy[t.reversedIndex]||cy.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:i,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(lD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(cD,{className:"select-text truncate",children:t.text})]}),r?x.jsx(uD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(nc,{className:"h-5 w-5"})}):null]})})})});function mD({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=fD(r),[s,i]=w.useState([]),a=w.useCallback(()=>i([]),[]);w.useEffect(()=>()=>a(),[a]);const l=w.useCallback((c,u)=>{const f=window.crypto.randomUUID();return i(d=>{const p=[...d,{...u,id:f,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(d=>d.filter(p=>p.id!==f))}},[t]);return x.jsxs(sD,{duration:n,swipeThreshold:150,children:[x.jsx(ly.Provider,{value:l,children:e}),x.jsx(Yr,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,f)=>{const h=()=>i(d=>d.filter(p=>p.id!==c.id));return w.createElement(pD,{...c,key:c.id,hover:o,index:u,onClose:h,isLast:f.length-1===u,reversedIndex:f.length-(u+1)})})}),x.jsx(iD,{ref:r,"data-items":s.length,style:{justifyContent:"start",height:`${(o?s.length:Math.min(1,s.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const gD=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:Oe("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),uy=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},fy=w.createContext(""),yD=e=>{const[t,n]=uy(e.active),r=lr(0),o=lr(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const f=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void f(m)};window.addEventListener("resize",h);let d=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(d=u.querySelector(`li[data-id="${p}"]`),n(p)),d===null){d=u.querySelector("li[data-id]");const m=d.getAttribute("data-id")||"";n(m)}return f(d),()=>window.removeEventListener("resize",h)},[]);const a=wd(e.onChange);w.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=w.Children.toArray(e.children),c=u=>{const f=u.currentTarget,h=f.getBoundingClientRect();o.set(h.width),r.set(f.offsetLeft),n(f.dataset.id||"")};return x.jsx(fy.Provider,{value:t,children:x.jsx(_g,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const f=u.props;return x.jsx("li",{"data-id":f.id,"data-active":t===f.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:x.jsx(i,{"data-id":f.id,onClick:c,"aria-current":"page",href:e.useHash?`#${f.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:f.title})},`tab-header-${f.id}`)})})})}),children:e.children})})},vD=()=>w.useContext(fy),bD=e=>{const t=vD();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function Bn(e){return dy(e)?(e.nodeName||"").toLowerCase():"#document"}function It(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function En(e){var t;return(t=(dy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dy(e){return e instanceof Node||e instanceof It(e).Node}function Fe(e){return e instanceof Element||e instanceof It(e).Element}function nt(e){return e instanceof HTMLElement||e instanceof It(e).HTMLElement}function kc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof It(e).ShadowRoot}function ds(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_t(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function wD(e){return["table","td","th"].includes(Bn(e))}function Di(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fc(e){const t=Nc(),n=Fe(e)?_t(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function xD(e){let t=Cn(e);for(;nt(t)&&!Rn(t);){if(Fc(t))return t;if(Di(t))return null;t=Cn(t)}return null}function Nc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Rn(e){return["html","body","#document"].includes(Bn(e))}function _t(e){return It(e).getComputedStyle(e)}function Mi(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cn(e){if(Bn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||kc(e)&&e.host||En(e);return kc(t)?t.host:t}function hy(e){const t=Cn(e);return Rn(t)?e.ownerDocument?e.ownerDocument.body:e.body:nt(t)&&ds(t)?t:hy(t)}function jn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hy(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=It(o);if(s){const a=Lc(i);return t.concat(i,i.visualViewport||[],ds(o)?o:[],a&&n?jn(a):[])}return t.concat(o,jn(o,[],n))}function Lc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ut(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 Ke(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&kc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function _c(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function py(){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 my(e){return e.mozInputSource===0&&e.isTrusted?!0:Bc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Vc(e){return TD()?!1:!Bc()&&e.width===0&&e.height===0||Bc()&&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 $c(){return/apple/i.test(navigator.vendor)}function Bc(){const e=/android/i;return e.test(_c())||e.test(py())}function gy(){return _c().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function TD(){return py().includes("jsdom/")}function no(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function SD(e){return"nativeEvent"in e}function ED(e){return e.matches("html,body")}function dt(e){return(e==null?void 0:e.ownerDocument)||document}function Rc(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 ln(e){return"composedPath"in e?e.composedPath()[0]:e.target}const CD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function jc(e){return nt(e)&&e.matches(CD)}function gt(e){e.preventDefault(),e.stopPropagation()}function yy(e){return e?e.getAttribute("role")==="combobox"&&jc(e):!1}const cn=Math.min,Vt=Math.max,ki=Math.round,ro=Math.floor,Hn=e=>({x:e,y:e}),PD={left:"right",right:"left",bottom:"top",top:"bottom"},ID={start:"end",end:"start"};function Hc(e,t,n){return Vt(e,cn(t,n))}function oo(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function so(e){return e.split("-")[1]}function vy(e){return e==="x"?"y":"x"}function Wc(e){return e==="y"?"height":"width"}function hr(e){return["top","bottom"].includes(Wn(e))?"y":"x"}function zc(e){return vy(hr(e))}function AD(e,t,n){n===void 0&&(n=!1);const r=so(e),o=zc(e),s=Wc(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Fi(i)),[i,Fi(i)]}function OD(e){const t=Fi(e);return[Uc(e),t,Uc(t)]}function Uc(e){return e.replace(/start|end/g,t=>ID[t])}function DD(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function MD(e,t,n,r){const o=so(e);let s=DD(Wn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Uc)))),s}function Fi(e){return e.replace(/left|right|bottom|top/g,t=>PD[t])}function kD(e){return{top:0,right:0,bottom:0,left:0,...e}}function by(e){return typeof e!="number"?kD(e):{top:e,right:e,bottom:e,left:e}}function Ni(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
175
175
  * tabbable 6.2.0
176
176
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
177
- */var MD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ki=MD.join(","),vy=typeof Element>"u",so=vy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fi=!vy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ni=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},kD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},FD=function(t,n,r){if(Ni(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ki));return n&&so.call(t,ki)&&o.unshift(t),o=o.filter(r),o},ND=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Ni(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=so.call(i,ki);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!Ni(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&h){var d=e(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else s.unshift.apply(s,i.children)}}return o},by=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},wy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||kD(t))&&!by(t)?0:t.tabIndex},LD=function(t,n){var r=wy(t);return r<0&&n&&!by(t)?0:r},_D=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xy=function(t){return t.tagName==="INPUT"},VD=function(t){return xy(t)&&t.type==="hidden"},$D=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},BD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},RD=function(t){if(!t.name)return!0;var n=t.form||Fi(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(i){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",i.message),!1}var s=BD(o,t.form);return!s||s===t},jD=function(t){return xy(t)&&t.type==="radio"},WD=function(t){return jD(t)&&!RD(t)},HD=function(t){var n,r=t&&Fi(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,f;r=Fi(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},Ty=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},zD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=so.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(so.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Fi(t);if(l&&!l.shadowRoot&&o(l)===!0)return Ty(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(HD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ty(t);return!1},UD=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 so.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},GD=function(t,n){return!(n.disabled||Ni(n)||VD(n)||zD(n,t)||$D(n)||UD(n))},Uc=function(t,n){return!(WD(n)||wy(n)<0||!GD(t,n))},YD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},KD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=LD(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(_D).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ds=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ND([t],n.includeContainer,{filter:Uc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:YD}):r=FD(t,n.includeContainer,Uc.bind(null,n)),KD(r)},qD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return so.call(t,ki)===!1?!1:Uc(n,t)};function Sy(e,t,n){let{reference:r,floating:o}=e;const s=dr(t),i=Hc(t),a=Wc(i),l=Wn(t),c=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(oo(t)){case"start":d[i]-=h*(n&&c?-1:1);break;case"end":d[i]+=h*(n&&c?-1:1);break}return d}const XD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Sy(c,r,l),h=r,d={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:y}=a[m],{x:b,y:v,data:S,reset:T}=await y({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:i,elements:{reference:e,floating:t}});u=b??u,f=v??f,d={...d,[g]:{...d[g],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:f}=Sy(c,h,l)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Gc(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=ro(t,e),p=yy(d),g=a[h?f==="floating"?"reference":"floating":f],y=Mi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},T=Mi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:l}):b);return{top:(y.top-T.top+p.top)/S.y,bottom:(T.bottom-y.bottom+p.bottom)/S.y,left:(y.left-T.left+p.left)/S.x,right:(T.right-y.right+p.right)/S.x}}const QD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=ro(e,t)||{};if(c==null)return{};const f=yy(u),h={x:n,y:r},d=Hc(o),p=Wc(d),m=await i.getDimensions(c),g=d==="y",y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[d]-h[d]-s.floating[p],T=h[d]-s.reference[d],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let I=E?E[v]:0;(!I||!await(i.isElement==null?void 0:i.isElement(E)))&&(I=a.floating[v]||s.floating[p]);const A=S/2-T/2,k=I/2-m[p]/2-1,O=ln(f[y],k),_=ln(f[b],k),F=O,L=I-m[p]-_,P=I/2-m[p]/2+A,D=jc(F,P,L),N=!l.arrow&&oo(o)!=null&&P!==D&&s.reference[p]/2-(P<F?O:_)-m[p]/2<0,$=N?P<F?P-F:P-L:0;return{[d]:h[d]+$,data:{[d]:D,centerOffset:P-D-$,...N&&{alignmentOffset:$}},reset:N}}}),ZD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=ro(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Wn(o),b=dr(a),v=Wn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=h||(v||!m?[Di(a)]:ID(a)),E=p!=="none";!h&&E&&T.push(...OD(a,m,p,S));const I=[a,...T],A=await Gc(t,g),k=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&k.push(A[y]),f){const P=PD(o,i,S);k.push(A[P[0]],A[P[1]])}if(O=[...O,{placement:o,overflows:k}],!k.every(P=>P<=0)){var _,F;const P=(((_=s.flip)==null?void 0:_.index)||0)+1,D=I[P];if(D)return{data:{index:P,overflows:O},reset:{placement:D}};let N=(F=O.filter($=>$.overflows[0]<=0).sort(($,W)=>$.overflows[1]-W.overflows[1])[0])==null?void 0:F.placement;if(!N)switch(d){case"bestFit":{var L;const $=(L=O.filter(W=>{if(E){const U=dr(W.placement);return U===b||U==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(U=>U>0).reduce((U,M)=>U+M,0)]).sort((W,U)=>W[1]-U[1])[0])==null?void 0:L[0];$&&(N=$);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function JD(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Wn(n),a=oo(n),l=dr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,f=ro(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(d=a==="end"?p*-1:p),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const eM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await JD(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},tM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...l}=ro(e,t),c={x:n,y:r},u=await Gc(t,l),f=dr(Wn(o)),h=gy(f);let d=c[h],p=c[f];if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=d+u[g],v=d-u[y];d=jc(b,d,v)}if(i){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+u[g],v=p-u[y];p=jc(b,p,v)}const m=a.fn({...t,[h]:d,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},nM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=ro(e,t),l=await Gc(t,a),c=Wn(n),u=oo(n),f=dr(n)==="y",{width:h,height:d}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=d-l.top-l.bottom,y=h-l.left-l.right,b=ln(d-l[p],g),v=ln(h-l[m],y),S=!t.middlewareData.shift;let T=b,E=v;if(f?E=u||S?ln(v,y):y:T=u||S?ln(b,g):g,S&&!u){const A=Vt(l.left,0),k=Vt(l.right,0),O=Vt(l.top,0),_=Vt(l.bottom,0);f?E=h-2*(A!==0||k!==0?A+k:Vt(l.left,l.right)):T=d-2*(O!==0||_!==0?O+_:Vt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const I=await o.getDimensions(s.floating);return h!==I.width||d!==I.height?{reset:{rects:!0}}:{}}}};function Ey(e){const t=_t(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=nt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Oi(n)!==s||Oi(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Yc(e){return Fe(e)?e:e.contextElement}function io(e){const t=Yc(e);if(!nt(t))return jn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ey(t);let i=(s?Oi(n.width):n.width)/r,a=(s?Oi(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const rM=jn(0);function Cy(e){const t=It(e);return!Fc()||!t.visualViewport?rM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==It(e)?!1:t}function hr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Yc(e);let i=jn(1);t&&(r?Fe(r)&&(i=io(r)):i=io(e));const a=oM(s,n,r)?Cy(s):jn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(s){const h=It(s),d=r&&Fe(r)?It(r):r;let p=h,m=Nc(p);for(;m&&r&&d!==p;){const g=io(m),y=m.getBoundingClientRect(),b=_t(m),v=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=v,c+=S,p=It(m),m=Nc(p)}}return Mi({width:u,height:f,x:l,y:c})}function sM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Sn(r),a=t?Ii(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=jn(1);const u=jn(0),f=nt(r);if((f||!f&&!s)&&(($n(r)!=="body"||fs(i))&&(l=Ai(r)),nt(r))){const h=hr(r);c=io(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function iM(e){return Array.from(e.getClientRects())}function Py(e){return hr(Sn(e)).left+Ai(e).scrollLeft}function aM(e){const t=Sn(e),n=Ai(e),r=e.ownerDocument.body,o=Vt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Vt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Py(e);const a=-n.scrollTop;return _t(r).direction==="rtl"&&(i+=Vt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function lM(e,t){const n=It(e),r=Sn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Fc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function cM(e,t){const n=hr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=nt(e)?io(e):jn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Iy(e,t,n){let r;if(t==="viewport")r=lM(e,n);else if(t==="document")r=aM(Sn(e));else if(Fe(t))r=cM(t,n);else{const o=Cy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Mi(r)}function Ay(e,t){const n=En(e);return n===t||!Fe(n)||Bn(n)?!1:_t(n).position==="fixed"||Ay(n,t)}function uM(e,t){const n=t.get(e);if(n)return n;let r=Rn(e,[],!1).filter(a=>Fe(a)&&$n(a)!=="body"),o=null;const s=_t(e).position==="fixed";let i=s?En(e):e;for(;Fe(i)&&!Bn(i);){const a=_t(i),l=kc(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fs(i)&&!l&&Ay(e,i))?r=r.filter(u=>u!==i):o=a,i=En(i)}return t.set(e,r),r}function fM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ii(t)?[]:uM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=Iy(t,u,o);return c.top=Vt(f.top,c.top),c.right=ln(f.right,c.right),c.bottom=ln(f.bottom,c.bottom),c.left=Vt(f.left,c.left),c},Iy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dM(e){const{width:t,height:n}=Ey(e);return{width:t,height:n}}function hM(e,t,n){const r=nt(t),o=Sn(t),s=n==="fixed",i=hr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=jn(0);if(r||!r&&!s)if(($n(t)!=="body"||fs(o))&&(a=Ai(t)),r){const f=hr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Py(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function Kc(e){return _t(e).position==="static"}function Oy(e,t){return!nt(e)||_t(e).position==="fixed"?null:t?t(e):e.offsetParent}function Dy(e,t){const n=It(e);if(Ii(e))return n;if(!nt(e)){let o=En(e);for(;o&&!Bn(o);){if(Fe(o)&&!Kc(o))return o;o=En(o)}return n}let r=Oy(e,t);for(;r&&vD(r)&&Kc(r);)r=Oy(r,t);return r&&Bn(r)&&Kc(r)&&!kc(r)?n:r||bD(e)||n}const pM=async function(e){const t=this.getOffsetParent||Dy,n=this.getDimensions,r=await n(e.floating);return{reference:hM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mM(e){return _t(e).direction==="rtl"}const gM={convertOffsetParentRelativeRectToViewportRelativeRect:sM,getDocumentElement:Sn,getClippingRect:fM,getOffsetParent:Dy,getElementRects:pM,getClientRects:iM,getDimensions:dM,getScale:io,isElement:Fe,isRTL:mM};function yM(e,t){let n=null,r;const o=Sn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const d=no(u),p=no(o.clientWidth-(c+f)),m=no(o.clientHeight-(u+h)),g=no(c),b={rootMargin:-d+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Vt(0,ln(1,l))||1};let v=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!v)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return i(!0),s}function Li(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Yc(e),u=o||s?[...c?Rn(c):[],...Rn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&a?yM(c,n):null;let h=-1,d=null;i&&(d=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let p,m=l?hr(e):null;l&&g();function g(){const y=hr(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const vM=eM,bM=tM,wM=ZD,xM=nM,My=QD,TM=(e,t,n)=>{const r=new Map,o={platform:gM,...n},s={...o.platform,_c:r};return XD(e,t,{...o,platform:s})};var _i=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Vi(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(!Vi(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Vi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ky(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fy(e,t){const n=ky(e);return Math.round(t*n)/n}function Ny(e){const t=C.useRef(e);return _i(()=>{t.current=e}),t}function SM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=C.useState(r);Vi(h,r)||d(r);const[p,m]=C.useState(null),[g,y]=C.useState(null),b=C.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),v=C.useCallback($=>{$!==I.current&&(I.current=$,y($))},[]),S=s||p,T=i||g,E=C.useRef(null),I=C.useRef(null),A=C.useRef(u),k=l!=null,O=Ny(l),_=Ny(o),F=C.useCallback(()=>{if(!E.current||!I.current)return;const $={placement:t,strategy:n,middleware:h};_.current&&($.platform=_.current),TM(E.current,I.current,$).then(W=>{const U={...W,isPositioned:!0};L.current&&!Vi(A.current,U)&&(A.current=U,No.flushSync(()=>{f(U)}))})},[h,t,n,_]);_i(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[c]);const L=C.useRef(!1);_i(()=>(L.current=!0,()=>{L.current=!1}),[]),_i(()=>{if(S&&(E.current=S),T&&(I.current=T),S&&T){if(O.current)return O.current(S,T,F);F()}},[S,T,F,O,k]);const P=C.useMemo(()=>({reference:E,floating:I,setReference:b,setFloating:v}),[b,v]),D=C.useMemo(()=>({reference:S,floating:T}),[S,T]),N=C.useMemo(()=>{const $={position:n,left:0,top:0};if(!D.floating)return $;const W=Fy(D.floating,u.x),U=Fy(D.floating,u.y);return a?{...$,transform:"translate("+W+"px, "+U+"px)",...ky(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:U}},[n,a,D.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:F,refs:P,elements:D,floatingStyles:N}),[u,F,P,D,N])}const EM=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?My({element:r.current,padding:o}).fn(n):{}:r?My({element:r,padding:o}).fn(n):{}}}},$i=(e,t)=>({...vM(e),options:[e,t]}),qc=(e,t)=>({...bM(e),options:[e,t]}),Xc=(e,t)=>({...wM(e),options:[e,t]}),CM=(e,t)=>({...xM(e),options:[e,t]}),Ly=(e,t)=>({...EM(e),options:[e,t]});function Qc(e){return C.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const _y={...C},PM=_y.useInsertionEffect||(e=>e());function at(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return PM(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Zc="ArrowUp",hs="ArrowDown",ao="ArrowLeft",lo="ArrowRight";function Bi(e,t,n){return Math.floor(e/t)!==n}function ps(e,t){return t<0||t>=e.current.length}function Jc(e,t){return St(e,{disabledIndices:t})}function Vy(e,t){return St(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function St(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&Ri(i,a,o));return a}function IM(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===Zc){if(u&&gt(n),c===-1)f=l;else if(f=St(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||f<0)){const h=c%s,d=l%s,p=l-(d-h);d===h?f=l:f=d>h?p:p-s}ps(e,f)&&(f=c)}if(n.key===hs&&(u&&gt(n),c===-1?f=a:(f=St(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(f=St(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),ps(e,f)&&(f=c)),r==="both"){const h=no(c/s);n.key===lo&&(u&&gt(n),c%s!==s-1?(f=St(e,{startingIndex:c,disabledIndices:i}),o&&Bi(f,s,h)&&(f=St(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(f=St(e,{startingIndex:c-c%s-1,disabledIndices:i})),Bi(f,s,h)&&(f=c)),n.key===ao&&(u&&gt(n),c%s!==0?(f=St(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Bi(f,s,h)&&(f=St(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(f=St(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Bi(f,s,h)&&(f=c));const d=no(l/s)===h;ps(e,f)&&(o&&d?f=n.key===ao?l:St(e,{startingIndex:c-c%s-1,disabledIndices:i}):f=c)}return f}function AM(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let h=0;h<l;h++)u.push(o+f+h*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=i}),c=!0):o++}}),[...r]}function OM(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function DM(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ri(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let $y=0;function Hn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame($y);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():$y=requestAnimationFrame(s)}var ve=typeof document<"u"?w.useLayoutEffect:w.useEffect;function MM(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 kM(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const By=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function FM(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=C.useState(()=>new Map),i=C.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=C.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return ve(()=>{const l=new Map(o);Array.from(l.keys()).sort(MM).forEach((u,f)=>{l.set(u,f)}),kM(o,l)||s(l)},[o]),C.createElement(By.Provider,{value:C.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function Ry(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=C.useContext(By),[a,l]=C.useState(null),c=C.useRef(null),u=C.useCallback(f=>{if(c.current=f,a!==null&&(s.current[a]=f,i)){var h;const d=t!==void 0;i.current[a]=d?t:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,s,i,t]);return ve(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),ve(()=>{const f=c.current?o.get(c.current):null;f!=null&&l(f)},[o]),C.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function co(){return co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},co.apply(this,arguments)}let jy=!1,NM=0;const Wy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+NM++;function LM(){const[e,t]=C.useState(()=>jy?Wy():void 0);return ve(()=>{e==null&&t(Wy())},[]),C.useEffect(()=>{jy=!0},[]),e}const uo=_y.useId||LM;let ms;process.env.NODE_ENV!=="production"&&(ms=new Set);function ji(){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=ms)!=null&&e.has(o))){var s;(s=ms)==null||s.add(o),console.warn(o)}}function _M(){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=ms)!=null&&e.has(o))){var s;(s=ms)==null||s.add(o),console.error(o)}}const Hy=C.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d:h,style:{transform:d,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||ji("The `ref` prop is required for `FloatingArrow`."));const g=uo(),[y,b]=C.useState(!1);if(ve(()=>{if(!o)return;_t(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const v=c*2,S=v/2,T=i/2*(l/-8+1),E=a/2*l/4,[I,A]=r.split("-"),k=!!h,O=I==="top"||I==="bottom",_=u&&A==="end"?"bottom":"top";let F=u&&A==="end"?"right":"left";u&&y&&(F=A==="end"?"left":"right");const L=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",D=h||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",N={top:k?"rotate(180deg)":"",left:k?"rotate(90deg)":"rotate(-90deg)",bottom:k?"":"rotate(180deg)",right:k?"rotate(-90deg)":"rotate(90deg)"}[I];return C.createElement("svg",co({},m,{"aria-hidden":!0,ref:n,width:k?i:i+v,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[F]:L,[_]:P,[I]:O||k?"100%":"calc(100% - "+v/2+"px)",transform:""+N+(d??""),...p}}),v>0&&C.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:v+(h?0:1),d:D}),C.createElement("path",{stroke:v&&!h?m.fill:"none",d:D}),C.createElement("clipPath",{id:g},C.createElement("rect",{x:-S,y:S*(k?-1:1),width:i+v,height:i})))});function zy(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Uy=C.createContext(null),Gy=C.createContext(null),zn=()=>{var e;return((e=C.useContext(Uy))==null?void 0:e.id)||null},Un=()=>C.useContext(Gy);function VM(e){const t=uo(),n=Un(),o=zn();return ve(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function $M(e){const{children:t,id:n}=e,r=zn();return C.createElement(Uy.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function BM(e){const{children:t}=e,n=C.useRef([]),r=C.useCallback(i=>{n.current=[...n.current,i]},[]),o=C.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=C.useState(()=>zy())[0];return C.createElement(Gy.Provider,{value:C.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function Gn(e){return"data-floating-ui-"+e}function yt(e){const t=w.useRef(e);return ve(()=>{t.current=e}),t}const Yy=Gn("safe-polygon");function eu(e,t,n){return n&&!to(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Ky(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=Un(),p=zn(),m=yt(c),g=yt(l),y=yt(n),b=C.useRef(),v=C.useRef(-1),S=C.useRef(),T=C.useRef(-1),E=C.useRef(!0),I=C.useRef(!1),A=C.useRef(()=>{}),k=C.useCallback(()=>{var D;const N=(D=o.current.openEvent)==null?void 0:D.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);C.useEffect(()=>{if(!a)return;function D(N){let{open:$}=N;$||(clearTimeout(v.current),clearTimeout(T.current),E.current=!0)}return s.on("openchange",D),()=>{s.off("openchange",D)}},[a,s]),C.useEffect(()=>{if(!a||!m.current||!n)return;function D($){k()&&r(!1,$,"hover")}const N=dt(i.floating).documentElement;return N.addEventListener("mouseleave",D),()=>{N.removeEventListener("mouseleave",D)}},[i.floating,n,r,a,m,k]);const O=C.useCallback(function(D,N,$){N===void 0&&(N=!0),$===void 0&&($="hover");const W=eu(g.current,"close",b.current);W&&!S.current?(clearTimeout(v.current),v.current=window.setTimeout(()=>r(!1,D,$),W)):N&&(clearTimeout(v.current),r(!1,D,$))},[g,r]),_=at(()=>{A.current(),S.current=void 0}),F=at(()=>{if(I.current){const D=dt(i.floating).body;D.style.pointerEvents="",D.removeAttribute(Yy),I.current=!1}});C.useEffect(()=>{if(!a)return;function D(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(M){if(clearTimeout(v.current),E.current=!1,u&&!to(b.current)||f>0&&!eu(g.current,"open"))return;const R=eu(g.current,"open",b.current);R?v.current=window.setTimeout(()=>{y.current||r(!0,M,"hover")},R):r(!0,M,"hover")}function $(M){if(D())return;A.current();const R=dt(i.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(v.current),S.current=m.current({...o.current.floatingContext,tree:d,x:M.clientX,y:M.clientY,onClose(){F(),_(),O(M,!0,"safe-polygon")}});const ee=S.current;R.addEventListener("mousemove",ee),A.current=()=>{R.removeEventListener("mousemove",ee)};return}(b.current==="touch"?!Ke(i.floating,M.relatedTarget):!0)&&O(M)}function W(M){D()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:M.clientX,y:M.clientY,onClose(){F(),_(),O(M)}})(M))}if(Fe(i.domReference)){var U;const M=i.domReference;return n&&M.addEventListener("mouseleave",W),(U=i.floating)==null||U.addEventListener("mouseleave",W),h&&M.addEventListener("mousemove",N,{once:!0}),M.addEventListener("mouseenter",N),M.addEventListener("mouseleave",$),()=>{var R;n&&M.removeEventListener("mouseleave",W),(R=i.floating)==null||R.removeEventListener("mouseleave",W),h&&M.removeEventListener("mousemove",N),M.removeEventListener("mouseenter",N),M.removeEventListener("mouseleave",$)}}},[i,a,e,u,f,h,O,_,F,r,n,y,d,g,m,o]),ve(()=>{var D;if(a&&n&&(D=m.current)!=null&&D.__options.blockPointerEvents&&k()){const $=dt(i.floating).body;$.setAttribute(Yy,""),$.style.pointerEvents="none",I.current=!0;const W=i.floating;if(Fe(i.domReference)&&W){var N;const U=i.domReference,M=d==null||(N=d.nodesRef.current.find(R=>R.id===p))==null||(N=N.context)==null?void 0:N.elements.floating;return M&&(M.style.pointerEvents=""),U.style.pointerEvents="auto",W.style.pointerEvents="auto",()=>{U.style.pointerEvents="",W.style.pointerEvents=""}}}},[a,n,p,i,d,m,k]),ve(()=>{n||(b.current=void 0,_(),F())},[n,_,F]),C.useEffect(()=>()=>{_(),clearTimeout(v.current),clearTimeout(T.current),F()},[a,i.domReference,_,F]);const L=C.useMemo(()=>{function D(N){b.current=N.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(N){const{nativeEvent:$}=N;function W(){!E.current&&!y.current&&r(!0,$,"hover")}u&&!to(b.current)||n||f===0||(clearTimeout(T.current),b.current==="touch"?W():T.current=window.setTimeout(W,f))}}},[u,r,n,y,f]),P=C.useMemo(()=>({onMouseEnter(){clearTimeout(v.current)},onMouseLeave(D){O(D.nativeEvent,!1)}}),[O]);return C.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function RM(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function pr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function jM(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),pr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let fo=new WeakMap,Wi=new WeakSet,Hi={},tu=0;const WM=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,qy=e=>e&&(e.host||qy(e.parentNode)),HM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=qy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function zM(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=HM(t,e),a=new Set,l=new Set(i),c=[];Hi[o]||(Hi[o]=new WeakMap);const u=Hi[o];i.forEach(f),h(t),a.clear();function f(d){!d||a.has(d)||(a.add(d),d.parentNode&&f(d.parentNode))}function h(d){!d||l.has(d)||[].forEach.call(d.children,p=>{if($n(p)!=="script")if(a.has(p))h(p);else{const m=s?p.getAttribute(s):null,g=m!==null&&m!=="false",y=(fo.get(p)||0)+1,b=(u.get(p)||0)+1;fo.set(p,y),u.set(p,b),c.push(p),y===1&&g&&Wi.add(p),b===1&&p.setAttribute(o,""),!g&&s&&p.setAttribute(s,"true")}})}return tu++,()=>{c.forEach(d=>{const p=(fo.get(d)||0)-1,m=(u.get(d)||0)-1;fo.set(d,p),u.set(d,m),p||(!Wi.has(d)&&s&&d.removeAttribute(s),Wi.delete(d)),m||d.removeAttribute(o)}),tu--,tu||(fo=new WeakMap,fo=new WeakMap,Wi=new WeakSet,Hi={})}}function Xy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=dt(e[0]).body;return zM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const ho=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Qy(e,t){const n=ds(e,ho());t==="prev"&&n.reverse();const r=n.indexOf(zt(dt(e)));return n.slice(r+1)[0]}function Zy(){return Qy(document.body,"next")}function Jy(){return Qy(document.body,"prev")}function gs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ke(n,r)}function UM(e){ds(e,ho()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function GM(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 YM(e,t,n){const r=e.indexOf(t);function o(i){const a=Gn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||Ke(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const nu={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let KM;function ev(e){e.key==="Tab"&&(e.target,clearTimeout(KM))}const zi=C.forwardRef(function(t,n){const[r,o]=C.useState();ve(()=>(Vc()&&o("button"),document.addEventListener("keydown",ev),()=>{document.removeEventListener("keydown",ev)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Gn("focus-guard")]:"",style:nu};return C.createElement("span",co({},t,s))}),tv=C.createContext(null),nv=Gn("portal");function qM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=uo(),o=rv(),[s,i]=C.useState(null),a=C.useRef(null);return ve(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),ve(()=>{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(nv,""),l.appendChild(c),a.current=c,i(c)},[t,r]),ve(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Fe(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(nv,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function po(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=qM({id:n,root:r}),[i,a]=C.useState(null),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=!!i&&!i.modal&&i.open&&o&&!!(r||s);return C.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function d(p){s&&gs(p)&&(p.type==="focusin"?GM:UM)(s)}return s.addEventListener("focusin",d,!0),s.addEventListener("focusout",d,!0),()=>{s.removeEventListener("focusin",d,!0),s.removeEventListener("focusout",d,!0)}},[s,o,i==null?void 0:i.modal]),C.createElement(tv.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:s,setFocusManagerState:a}),[o,s])},h&&s&&C.createElement(zi,{"data-type":"outside",ref:l,onFocus:d=>{if(gs(d,s)){var p;(p=u.current)==null||p.focus()}else{const m=Jy()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),h&&s&&C.createElement("span",{"aria-owns":s.id,style:nu}),s&&No.createPortal(t,s),h&&s&&C.createElement(zi,{"data-type":"outside",ref:c,onFocus:d=>{if(gs(d,s)){var p;(p=f.current)==null||p.focus()}else{const m=Zy()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,d.nativeEvent))}}}))}const rv=()=>C.useContext(tv),ov=20;let mr=[];function ru(e){mr=mr.filter(n=>n.isConnected);let t=e;if(!(!t||$n(t)==="body")){if(!qD(t,ho())){const n=ds(t,ho())[0];n&&(t=n)}mr.push(t),mr.length>ov&&(mr=mr.slice(-ov))}}function sv(){return mr.slice().reverse().find(e=>e.isConnected)}const XM=C.forwardRef(function(t,n){return C.createElement("button",co({},t,{type:"button",ref:n,tabIndex:-1,style:nu}))});function ys(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:h,refs:d,nodeId:p,onOpenChange:m,events:g,dataRef:y,floatingId:b,elements:{domReference:v,floating:S}}=t,T=typeof i=="number"&&i<0,E=my(v)&&T,I=WM()?s:!0,A=yt(o),k=yt(i),O=yt(a),_=Un(),F=rv(),L=C.useRef(null),P=C.useRef(null),D=C.useRef(!1),N=C.useRef(!1),$=C.useRef(-1),W=F!=null,U=S==null?void 0:S.firstElementChild,M=(U==null?void 0:U.id)===b?U:S,R=at(function(G){return G===void 0&&(G=M),G?ds(G,ho()):[]}),q=at(G=>{const V=R(G);return A.current.map(j=>v&&j==="reference"?v:M&&j==="floating"?M:V).filter(Boolean).flat()});C.useEffect(()=>{if(r||!c)return;function G(j){if(j.key==="Tab"){Ke(M,zt(dt(M)))&&R().length===0&&!E&&gt(j);const z=q(),B=an(j);A.current[0]==="reference"&&B===v&&(gt(j),j.shiftKey?Hn(z[z.length-1]):Hn(z[1])),A.current[1]==="floating"&&B===M&&j.shiftKey&&(gt(j),Hn(z[0]))}}const V=dt(M);return V.addEventListener("keydown",G),()=>{V.removeEventListener("keydown",G)}},[r,v,M,c,A,E,R,q]),C.useEffect(()=>{if(r||!S)return;function G(V){const j=an(V),B=R().indexOf(j);B!==-1&&($.current=B)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,R]),C.useEffect(()=>{if(r||!f)return;function G(){N.current=!0,setTimeout(()=>{N.current=!1})}function V(j){const z=j.relatedTarget;queueMicrotask(()=>{const B=!(Ke(v,z)||Ke(S,z)||Ke(z,S)||Ke(F==null?void 0:F.portalNode,z)||z!=null&&z.hasAttribute(Gn("focus-guard"))||_&&(pr(_.nodesRef.current,p).find(Y=>{var te,H;return Ke((te=Y.context)==null?void 0:te.elements.floating,z)||Ke((H=Y.context)==null?void 0:H.elements.domReference,z)})||RM(_.nodesRef.current,p).find(Y=>{var te,H;return((te=Y.context)==null?void 0:te.elements.floating)===z||((H=Y.context)==null?void 0:H.elements.domReference)===z})));if(l&&B&&zt(dt(M))===dt(M).body){nt(M)&&(M==null||M.focus());const Y=$.current,te=R(),H=te[Y]||te[te.length-1]||M;nt(H)&&H.focus()}(E||!c)&&z&&B&&!N.current&&z!==sv()&&(D.current=!0,m(!1,j))})}if(S&&nt(v))return v.addEventListener("focusout",V),v.addEventListener("pointerdown",G),S.addEventListener("focusout",V),()=>{v.removeEventListener("focusout",V),v.removeEventListener("pointerdown",G),S.removeEventListener("focusout",V)}},[r,v,S,M,c,p,_,F,m,f,l,R,E]),C.useEffect(()=>{var G;if(r)return;const V=Array.from((F==null||(G=F.portalNode)==null?void 0:G.querySelectorAll("["+Gn("portal")+"]"))||[]);if(S){const j=[S,...V,L.current,P.current,A.current.includes("reference")||E?v:null].filter(B=>B!=null),z=c||E?Xy(j,I,!I):Xy(j);return()=>{z()}}},[r,v,S,c,A,F,E,I]),ve(()=>{if(r||!nt(M))return;const G=dt(M),V=zt(G);queueMicrotask(()=>{const j=q(M),z=k.current,B=(typeof z=="number"?j[z]:z.current)||M,Y=Ke(M,V);!T&&!Y&&h&&Hn(B,{preventScroll:B===M})})},[r,h,M,T,q,k]),ve(()=>{if(r||!M)return;let G=!1;const V=dt(M),j=zt(V);let B=y.current.openEvent;const Y=d.domReference.current;ru(j);function te(H){let{open:Pe,reason:Xe,event:_e,nested:Qe}=H;Pe&&(B=_e),Xe==="escape-key"&&d.domReference.current&&ru(d.domReference.current),Xe==="hover"&&_e.type==="mouseleave"&&(D.current=!0),Xe==="outside-press"&&(Qe?(D.current=!1,G=!0):D.current=!(hy(_e)||_c(_e)))}return g.on("openchange",te),()=>{g.off("openchange",te);const H=zt(V),Pe=Ke(S,H)||_&&pr(_.nodesRef.current,p).some(ae=>{var ge;return Ke((ge=ae.context)==null?void 0:ge.elements.floating,H)});(Pe||B&&["click","mousedown"].includes(B.type))&&d.domReference.current&&ru(d.domReference.current);const _e=Y||j,Qe=ds(dt(_e).body,ho());queueMicrotask(()=>{let ae=sv();!ae&&nt(_e)&&S&&(ae=YM(Qe,_e,S)),O.current&&!D.current&&nt(ae)&&(!(ae!==H&&H!==V.body)||Pe)&&ae.focus({preventScroll:G})})}},[r,S,M,O,y,d,g,_,p]),ve(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:f,open:h,onOpenChange:m,refs:d}),()=>{F.setFocusManagerState(null)}},[r,F,c,h,m,d,f]),ve(()=>{if(r||!M||typeof MutationObserver!="function"||T)return;const G=()=>{const j=M.getAttribute("tabindex"),z=R(),B=zt(dt(S)),Y=z.indexOf(B);Y!==-1&&($.current=Y),A.current.includes("floating")||B!==d.domReference.current&&z.length===0?j!=="0"&&M.setAttribute("tabindex","0"):j!=="-1"&&M.setAttribute("tabindex","-1")};G();const V=new MutationObserver(G);return V.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}},[r,S,M,d,A,R,T]);function ee(G){return r||!u||!c?null:C.createElement(XM,{ref:G==="start"?L:P,onClick:V=>m(!1,V.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&I&&(c?!E:!0)&&(W||c);return C.createElement(C.Fragment,null,Q&&C.createElement(zi,{"data-type":"inside",ref:F==null?void 0:F.beforeInsideRef,onFocus:G=>{if(c){const j=q();Hn(o[0]==="reference"?j[0]:j[j.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(D.current=!1,gs(G,F.portalNode)){const j=Zy()||v;j==null||j.focus()}else{var V;(V=F.beforeOutsideRef.current)==null||V.focus()}}}),!E&&ee("start"),n,ee("end"),Q&&C.createElement(zi,{"data-type":"inside",ref:F==null?void 0:F.afterInsideRef,onFocus:G=>{if(c)Hn(q()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(f&&(D.current=!0),gs(G,F.portalNode)){const j=Jy()||v;j==null||j.focus()}else{var V;(V=F.afterOutsideRef.current)==null||V.focus()}}}))}const ou=new Set,QM=C.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=uo();return ve(()=>{if(!r)return;ou.add(s);const i=/iP(hone|ad|od)|iOS/.test(Lc()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,f=a.left?parseFloat(a.left):window.scrollX,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var d,p;const m=((d=window.visualViewport)==null?void 0:d.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(g))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{ou.delete(s),ou.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,h)))}},[s,r]),C.createElement("div",co({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function iv(e){return nt(e.target)&&e.target.tagName==="BUTTON"}function av(e){return Rc(e)}function Ui(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=C.useRef(),h=C.useRef(!1),d=C.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(to(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}to(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||iv(p))&&(p.key===" "&&!av(s)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||iv(p)||av(s)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return C.useMemo(()=>i?{reference:d}:{},[i,d])}function ZM(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0: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(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,f=i.height,h=i.x,d=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),h-=n||0,d-=r||0,u=0,f=0,!o||c?(u=t.axis==="y"?i.width:0,f=t.axis==="x"?i.height:0,h=a&&t.x!=null?t.x:h,d=l&&t.y!=null?t.y:d):o&&!c&&(f=t.axis==="x"?i.height:f,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:f,x:h,y:d,top:d,right:h+u,bottom:d+f,left:h}}}}function lv(e){return e!=null&&e.clientX!=null}function JM(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,f=C.useRef(!1),h=C.useRef(null),[d,p]=C.useState(),[m,g]=C.useState([]),y=at((E,I)=>{f.current||r.current.openEvent&&!lv(r.current.openEvent)||i.setPositionReference(ZM(s,{x:E,y:I,axis:l,dataRef:r,pointerType:d}))}),b=at(E=>{c!=null||u!=null||(n?h.current||g([]):y(E.clientX,E.clientY))}),v=to(d)?o:n,S=C.useCallback(()=>{if(!v||!a||c!=null||u!=null)return;const E=It(o);function I(A){const k=an(A);Ke(o,k)?(E.removeEventListener("mousemove",I),h.current=null):y(A.clientX,A.clientY)}if(!r.current.openEvent||lv(r.current.openEvent)){E.addEventListener("mousemove",I);const A=()=>{E.removeEventListener("mousemove",I),h.current=null};return h.current=A,A}i.setPositionReference(s)},[v,a,c,u,o,r,i,s,y]);C.useEffect(()=>S(),[S,m]),C.useEffect(()=>{a&&!o&&(f.current=!1)},[a,o]),C.useEffect(()=>{!a&&n&&(f.current=!0)},[a,n]),ve(()=>{a&&(c!=null||u!=null)&&(f.current=!1,y(c,u))},[a,c,u,y]);const T=C.useMemo(()=>{function E(I){let{pointerType:A}=I;p(A)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:b,onMouseEnter:b}},[b]);return C.useMemo(()=>a?{reference:T}:{},[a,T])}const ek={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},tk={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},cv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function mo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:p}=t,m=Un(),g=at(typeof l=="function"?l:()=>!1),y=typeof l=="function"?g:l,b=C.useRef(!1),v=C.useRef(!1),{escapeKey:S,outsidePress:T}=cv(d),{escapeKey:E,outsidePress:I}=cv(p),A=at(P=>{var D;if(!n||!i||!a||P.key!=="Escape")return;const N=(D=s.current.floatingContext)==null?void 0:D.nodeId,$=m?pr(m.nodesRef.current,N):[];if(!S&&(P.stopPropagation(),$.length>0)){let W=!0;if($.forEach(U=>{var M;if((M=U.context)!=null&&M.open&&!U.context.dataRef.current.__escapeKeyBubbles){W=!1;return}}),!W)return}r(!1,xD(P)?P.nativeEvent:P,"escape-key")}),k=at(P=>{var D;const N=()=>{var $;A(P),($=an(P))==null||$.removeEventListener("keydown",N)};(D=an(P))==null||D.addEventListener("keydown",N)}),O=at(P=>{var D;const N=b.current;b.current=!1;const $=v.current;if(v.current=!1,c==="click"&&$||N||typeof y=="function"&&!y(P))return;const W=an(P),U="["+Gn("inert")+"]",M=dt(o.floating).querySelectorAll(U);let R=Fe(W)?W:null;for(;R&&!Bn(R);){const G=En(R);if(Bn(G)||!Fe(G))break;R=G}if(M.length&&Fe(W)&&!TD(W)&&!Ke(W,o.floating)&&Array.from(M).every(G=>!Ke(R,G)))return;if(nt(W)&&L){const G=W.clientWidth>0&&W.scrollWidth>W.clientWidth,V=W.clientHeight>0&&W.scrollHeight>W.clientHeight;let j=V&&P.offsetX>W.clientWidth;if(V&&_t(W).direction==="rtl"&&(j=P.offsetX<=W.offsetWidth-W.clientWidth),j||G&&P.offsetY>W.clientHeight)return}const q=(D=s.current.floatingContext)==null?void 0:D.nodeId,ee=m&&pr(m.nodesRef.current,q).some(G=>{var V;return Bc(P,(V=G.context)==null?void 0:V.elements.floating)});if(Bc(P,o.floating)||Bc(P,o.domReference)||ee)return;const Q=m?pr(m.nodesRef.current,q):[];if(Q.length>0){let G=!0;if(Q.forEach(V=>{var j;if((j=V.context)!=null&&j.open&&!V.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),_=at(P=>{var D;const N=()=>{var $;O(P),($=an(P))==null||$.removeEventListener(c,N)};(D=an(P))==null||D.addEventListener(c,N)});C.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function P($){r(!1,$,"ancestor-scroll")}const D=dt(o.floating);a&&D.addEventListener("keydown",E?k:A,E),y&&D.addEventListener(c,I?_:O,I);let N=[];return h&&(Fe(o.domReference)&&(N=Rn(o.domReference)),Fe(o.floating)&&(N=N.concat(Rn(o.floating))),!Fe(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(Rn(o.reference.contextElement)))),N=N.filter($=>{var W;return $!==((W=D.defaultView)==null?void 0:W.visualViewport)}),N.forEach($=>{$.addEventListener("scroll",P,{passive:!0})}),()=>{a&&D.removeEventListener("keydown",E?k:A,E),y&&D.removeEventListener(c,I?_:O,I),N.forEach($=>{$.removeEventListener("scroll",P)})}},[s,o,a,y,c,n,r,h,i,S,T,A,E,k,O,I,_]),C.useEffect(()=>{b.current=!1},[y,c]);const F=C.useMemo(()=>({onKeyDown:A,[ek[f]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[A,r,u,f]),L=C.useMemo(()=>({onKeyDown:A,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[tk[c]]:()=>{b.current=!0}}),[A,c]);return C.useMemo(()=>i?{reference:F,floating:L}:{},[i,F,L])}function nk(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=uo(),s=C.useRef({}),[i]=C.useState(()=>zy()),a=zn()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!Fe(d)&&_M("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]=C.useState(r.reference),u=at((d,p,m)=>{s.current.openEvent=d?p:void 0,i.emit("openchange",{open:d,event:p,reason:m,nested:a}),n==null||n(d,p,m)}),f=C.useMemo(()=>({setPositionReference:c}),[]),h=C.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return C.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:h,events:i,floatingId:o,refs:f}),[t,u,h,i,o,f])}function go(e){e===void 0&&(e={});const{nodeId:t}=e,n=nk({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=C.useState(null),[a,l]=C.useState(null),u=(o==null?void 0:o.reference)||s,f=C.useRef(null),h=Un();ve(()=>{u&&(f.current=u)},[u]);const d=SM({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(v=>{const S=Fe(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l(S),d.refs.setReference(S)},[d.refs]),m=C.useCallback(v=>{(Fe(v)||v===null)&&(f.current=v,i(v)),(Fe(d.refs.reference.current)||d.refs.reference.current===null||v!==null&&!Fe(v))&&d.refs.setReference(v)},[d.refs]),g=C.useMemo(()=>({...d.refs,setReference:m,setPositionReference:p,domReference:f}),[d.refs,m,p]),y=C.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),b=C.useMemo(()=>({...d,...r,refs:g,elements:y,nodeId:t}),[d,g,y,t,r]);return ve(()=>{r.dataRef.current.floatingContext=b;const v=h==null?void 0:h.nodesRef.current.find(S=>S.id===t);v&&(v.context=b)}),C.useMemo(()=>({...d,context:b,refs:g,elements:y}),[d,g,y,b])}function rk(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=C.useRef(!1),u=C.useRef(),f=C.useRef(!0);C.useEffect(()=>{if(!a)return;const d=It(i.domReference);function p(){!n&&nt(i.domReference)&&i.domReference===zt(dt(i.domReference))&&(c.current=!0)}function m(){f.current=!0}return d.addEventListener("blur",p),d.addEventListener("keydown",m,!0),()=>{d.removeEventListener("blur",p),d.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),C.useEffect(()=>{if(!a)return;function d(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,a]),C.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=C.useMemo(()=>({onPointerDown(d){_c(d.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const p=an(d.nativeEvent);if(l&&Fe(p))try{if(Vc()&&py())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!Rc(p))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const p=d.relatedTarget,m=d.nativeEvent,g=Fe(p)&&p.hasAttribute(Gn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const b=zt(i.domReference?i.domReference.ownerDocument:document);!p&&b===i.domReference||Ke((y=s.current.floatingContext)==null?void 0:y.refs.floating.current,b)||Ke(i.domReference,b)||g||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return C.useMemo(()=>a?{reference:h}:{},[a,h])}const uv="active",fv="selected";function su(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[uv]:i,[fv]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[uv,fv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),i[c]=function(){for(var h,d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(g=>g(...p)).find(g=>g!==void 0)}}}else i[c]=u}),i),{})}}function yo(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=C.useCallback(a=>su(a,e,"reference"),t),s=C.useCallback(a=>su(a,e,"floating"),n),i=C.useCallback(a=>su(a,e,"item"),r);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let dv=!1;function Gi(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function hv(e,t){return Gi(t,e===Zc||e===hs,e===ao||e===lo)}function iu(e,t,n){return Gi(t,e===hs,n?e===ao:e===lo)||e==="Enter"||e===" "||e===""}function ok(e,t,n){return Gi(t,n?e===ao:e===lo,e===hs)}function pv(e,t,n){return Gi(t,n?e===lo:e===ao,e===Zc)}function mv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:h=!1,rtl:d=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:b=void 0,orientation:v="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:I,dense:A=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||ji("`useListNavigation` looping must be enabled to allow escaping."),p||ji("`useListNavigation` must be virtual to allow escaping.")),v==="vertical"&&S>1&&ji("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const k=zn(),O=Un(),_=at(a),F=C.useRef(m),L=C.useRef(c??-1),P=C.useRef(null),D=C.useRef(!0),N=C.useRef(_),$=C.useRef(!!o.floating),W=C.useRef(n),U=C.useRef(!1),M=C.useRef(!1),R=yt(b),q=yt(n),ee=yt(T),Q=yt(o.floating),G=yt(c),[V,j]=C.useState(),[z,B]=C.useState(),Y=at(function(ae,ge,se){se===void 0&&(se=!1);function be(we){p?(j(we.id),O==null||O.events.emit("virtualfocus",we),E&&(E.current=we)):Hn(we,{preventScroll:!0,sync:py()&&Vc()?dv||U.current:!1})}const ot=ae.current[ge.current];ot&&be(ot),requestAnimationFrame(()=>{const we=ae.current[ge.current]||ot;if(!we)return;ot||be(we);const st=ee.current;st&&H&&(se||!D.current)&&(we.scrollIntoView==null||we.scrollIntoView(typeof st=="boolean"?{block:"nearest",inline:"nearest"}:st))})});ve(()=>{document.createElement("div").focus({get preventScroll(){return dv=!0,!1}})},[]),ve(()=>{l&&(n&&o.floating?F.current&&c!=null&&(M.current=!0,L.current=c,_(c)):$.current&&(L.current=-1,N.current(null)))},[l,n,o.floating,c,_]),ve(()=>{if(l&&n&&o.floating)if(i==null){if(U.current=!1,G.current!=null)return;if($.current&&(L.current=-1,Y(s,L)),(!W.current||!$.current)&&F.current&&(P.current!=null||F.current===!0&&P.current==null)){let ae=0;const ge=()=>{s.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(ge),ae++):(L.current=P.current==null||iu(P.current,v,d)||h?Jc(s,R.current):Vy(s,R.current),P.current=null,_(L.current))};ge()}}else ps(s,i)||(L.current=i,Y(s,L,M.current),M.current=!1)},[l,n,o.floating,i,G,h,s,v,d,_,Y,R]),ve(()=>{var ae;if(!l||o.floating||!O||p||!$.current)return;const ge=O.nodesRef.current,se=(ae=ge.find(we=>we.id===k))==null||(ae=ae.context)==null?void 0:ae.elements.floating,be=zt(dt(o.floating)),ot=ge.some(we=>we.context&&Ke(we.context.elements.floating,be));se&&!ot&&D.current&&se.focus({preventScroll:!0})},[l,o.floating,O,k,p]),ve(()=>{if(!l||!O||!p||k)return;function ae(ge){B(ge.id),E&&(E.current=ge)}return O.events.on("virtualfocus",ae),()=>{O.events.off("virtualfocus",ae)}},[l,O,p,k,E]),ve(()=>{N.current=_,$.current=!!o.floating}),ve(()=>{n||(P.current=null)},[n]),ve(()=>{W.current=n},[n]);const te=i!=null,H=C.useMemo(()=>{function ae(se){if(!n)return;const be=s.current.indexOf(se);be!==-1&&_(be)}return{onFocus(se){let{currentTarget:be}=se;ae(be)},onClick:se=>{let{currentTarget:be}=se;return be.focus({preventScroll:!0})},...g&&{onMouseMove(se){let{currentTarget:be}=se;ae(be)},onPointerLeave(se){let{pointerType:be}=se;!D.current||be==="touch"||(L.current=-1,Y(s,L),_(null),p||Hn(Q.current,{preventScroll:!0}))}}}},[n,Q,Y,g,s,_,p]),Pe=at(ae=>{if(D.current=!1,U.current=!0,!q.current&&ae.currentTarget===Q.current)return;if(h&&pv(ae.key,v,d)){gt(ae),r(!1,ae.nativeEvent,"list-navigation"),nt(o.domReference)&&!p&&o.domReference.focus();return}const ge=L.current,se=Jc(s,b),be=Vy(s,b);if(ae.key==="Home"&&(gt(ae),L.current=se,_(L.current)),ae.key==="End"&&(gt(ae),L.current=be,_(L.current)),S>1){const ot=I||Array.from({length:s.current.length},()=>({width:1,height:1})),we=AM(ot,S,A),st=we.findIndex(oe=>oe!=null&&!Ri(s.current,oe,b)),J=we.reduce((oe,xe,We)=>xe!=null&&!Ri(s.current,xe,b)?We:oe,-1);if(L.current=we[IM({current:we.map(oe=>oe!=null?s.current[oe]:null)},{event:ae,orientation:v,loop:f,cols:S,disabledIndices:DM([...b||s.current.map((oe,xe)=>Ri(s.current,xe)?xe:void 0),void 0],we),minIndex:st,maxIndex:J,prevIndex:OM(L.current>be?se:L.current,ot,we,S,ae.key===hs?"bl":ae.key===lo?"tr":"tl"),stopEvent:!0})],_(L.current),v==="both")return}if(hv(ae.key,v)){if(gt(ae),n&&!p&&zt(ae.currentTarget.ownerDocument)===ae.currentTarget){L.current=iu(ae.key,v,d)?se:be,_(L.current);return}iu(ae.key,v,d)?f?L.current=ge>=be?u&&ge!==s.current.length?-1:se:St(s,{startingIndex:ge,disabledIndices:b}):L.current=Math.min(be,St(s,{startingIndex:ge,disabledIndices:b})):f?L.current=ge<=se?u&&ge!==-1?s.current.length:be:St(s,{startingIndex:ge,decrement:!0,disabledIndices:b}):L.current=Math.max(se,St(s,{startingIndex:ge,decrement:!0,disabledIndices:b})),ps(s,L.current)?_(null):_(L.current)}}),Xe=C.useMemo(()=>p&&n&&te&&{"aria-activedescendant":z||V},[p,n,te,z,V]),_e=C.useMemo(()=>({"aria-orientation":v==="both"?void 0:v,...!my(o.domReference)&&Xe,onKeyDown:Pe,onPointerMove(){D.current=!0}}),[Xe,Pe,o.domReference,v]),Qe=C.useMemo(()=>{function ae(se){m==="auto"&&hy(se.nativeEvent)&&(F.current=!0)}function ge(se){F.current=m,m==="auto"&&_c(se.nativeEvent)&&(F.current=!0)}return{...Xe,onKeyDown(se){D.current=!1;const be=se.key.indexOf("Arrow")===0,ot=ok(se.key,v,d),we=pv(se.key,v,d),st=hv(se.key,v),J=(h?ot:st)||se.key==="Enter"||se.key.trim()==="";if(p&&n){const vt=O==null?void 0:O.nodesRef.current.find(Ot=>Ot.parentId==null),Pt=O&&vt?jM(O.nodesRef.current,vt.id):null;if(be&&Pt&&E){const Ot=new KeyboardEvent("keydown",{key:se.key,bubbles:!0});if(ot||we){var oe,xe;const Tr=((oe=Pt.context)==null?void 0:oe.elements.domReference)===se.currentTarget,ko=we&&!Tr?(xe=Pt.context)==null?void 0:xe.elements.domReference:ot?s.current.find(Fo=>(Fo==null?void 0:Fo.id)===V):null;ko&&(gt(se),ko.dispatchEvent(Ot),B(void 0))}if(st&&Pt.context&&Pt.context.open&&Pt.parentId&&se.currentTarget!==Pt.context.elements.domReference){var We;gt(se),(We=Pt.context.elements.domReference)==null||We.dispatchEvent(Ot);return}}return Pe(se)}if(!(!n&&!y&&be)){if(J&&(P.current=h&&st?null:se.key),h){ot&&(gt(se),n?(L.current=Jc(s,R.current),_(L.current)):r(!0,se.nativeEvent,"list-navigation"));return}st&&(c!=null&&(L.current=c),gt(se),!n&&y?r(!0,se.nativeEvent,"list-navigation"):Pe(se),n&&_(L.current))}},onFocus(){n&&!p&&_(null)},onPointerDown:ge,onMouseDown:ae,onClick:ae}},[V,Xe,Pe,R,m,s,h,_,r,n,y,v,d,c,O,p,E]);return C.useMemo(()=>l?{reference:Qe,floating:_e,item:H}:{},[l,Qe,_e,H])}const sk=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function vo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=sk.get(i))!=null?n:i,l=uo(),u=zn()!=null,f=C.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),h=C.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),d=C.useCallback(p=>{let{active:m,selected:g}=p;const y={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...y,"aria-selected":m&&g};case"combobox":return{...y,...m&&{"aria-selected":!0}}}return{}},[o,i]);return C.useMemo(()=>s?{reference:f,floating:h,item:d}:{},[s,f,h,d])}const gv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function bo(e,t){return typeof e=="function"?e(t):e}function ik(e,t){const[n,r]=C.useState(e);return e&&!n&&r(!0),C.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function ak(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=C.useState("unmounted"),c=ik(n,i);return!c&&a==="close"&&l("unmounted"),ve(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function lk(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=C.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",f=(u?i:i.open)||0,h=(u?i:i.close)||0,[d,p]=C.useState(()=>({...bo(s,c),...bo(n,c)})),{isMounted:m,status:g}=ak(e,{duration:i}),y=yt(n),b=yt(r),v=yt(o),S=yt(s);return ve(()=>{const T=bo(y.current,c),E=bo(v.current,c),I=bo(S.current,c),A=bo(b.current,c)||Object.keys(T).reduce((k,O)=>(k[O]="",k),{});if(g==="initial"&&p(k=>({transitionProperty:k.transitionProperty,...I,...T})),g==="open"&&p({transitionProperty:Object.keys(A).map(gv).join(","),transitionDuration:f+"ms",...I,...A}),g==="close"){const k=E||T;p({transitionProperty:Object.keys(k).map(gv).join(","),transitionDuration:h+"ms",...I,...k})}},[h,v,y,b,S,f,g,c]),{isMounted:m,styles:d}}function ck(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:h=[],selectedIndex:d=null}=t,p=C.useRef(),m=C.useRef(""),g=C.useRef((n=d??i)!=null?n:-1),y=C.useRef(null),b=at(a),v=at(l),S=yt(u),T=yt(h);ve(()=>{r&&(clearTimeout(p.current),y.current=null,m.current="")},[r]),ve(()=>{if(r&&m.current===""){var O;g.current=(O=d??i)!=null?O:-1}},[r,d,i]);const E=at(O=>{O?o.current.typing||(o.current.typing=O,v(O)):o.current.typing&&(o.current.typing=O,v(O))}),I=at(O=>{function _(N,$,W){const U=S.current?S.current($,W):$.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(W.toLocaleLowerCase()))===0);return U?N.indexOf(U):-1}const F=s.current;if(m.current.length>0&&m.current[0]!==" "&&(_(F,F,m.current)===-1?E(!1):O.key===" "&&gt(O)),F==null||T.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(gt(O),E(!0)),F.every(N=>{var $,W;return N?(($=N[0])==null?void 0:$.toLocaleLowerCase())!==((W=N[1])==null?void 0:W.toLocaleLowerCase()):!0})&&m.current===O.key&&(m.current="",g.current=y.current),m.current+=O.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=y.current,E(!1)},f);const P=g.current,D=_(F,[...F.slice((P||0)+1),...F.slice(0,(P||0)+1)],m.current);D!==-1?(b(D),y.current=D):O.key!==" "&&(m.current="",E(!1))}),A=C.useMemo(()=>({onKeyDown:I}),[I]),k=C.useMemo(()=>({onKeyDown:I,onKeyUp(O){O.key===" "&&E(!1)}}),[I,E]);return C.useMemo(()=>c?{reference:A,floating:k}:{},[c,A,k])}function yv(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,f]=t[a]||[0,0];c>=r!=f>=r&&n<=(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function uk(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function fk(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(f,h){const d=performance.now(),p=d-l;if(i===null||a===null||p===0)return i=f,a=h,l=d,null;const m=f-i,g=h-a,b=Math.sqrt(m*m+g*g)/p;return i=f,a=h,l=d,b}const u=f=>{let{x:h,y:d,placement:p,elements:m,onClose:g,nodeId:y,tree:b}=f;return function(S){function T(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||d==null)return;const{clientX:E,clientY:I}=S,A=[E,I],k=an(S),O=S.type==="mouseleave",_=Ke(m.floating,k),F=Ke(m.domReference,k),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),D=p.split("-")[0],N=h>P.right-P.width/2,$=d>P.bottom-P.height/2,W=uk(A,L),U=P.width>L.width,M=P.height>L.height,R=(U?L:P).left,q=(U?L:P).right,ee=(M?L:P).top,Q=(M?L:P).bottom;if(_&&(s=!0,!O))return;if(F&&(s=!1),F&&!O){s=!0;return}if(O&&Fe(S.relatedTarget)&&Ke(m.floating,S.relatedTarget)||b&&pr(b.nodesRef.current,y).some(j=>{let{context:z}=j;return z==null?void 0:z.open}))return;if(D==="top"&&d>=L.bottom-1||D==="bottom"&&d<=L.top+1||D==="left"&&h>=L.right-1||D==="right"&&h<=L.left+1)return T();let G=[];switch(D){case"top":G=[[R,L.top+1],[R,P.bottom-1],[q,P.bottom-1],[q,L.top+1]];break;case"bottom":G=[[R,P.top+1],[R,L.bottom-1],[q,L.bottom-1],[q,P.top+1]];break;case"left":G=[[P.right-1,Q],[P.right-1,ee],[L.left+1,ee],[L.left+1,Q]];break;case"right":G=[[L.right-1,Q],[L.right-1,ee],[P.left+1,ee],[P.left+1,Q]];break}function V(j){let[z,B]=j;switch(D){case"top":{const Y=[U?z+t/2:N?z+t*4:z-t*4,B+t+1],te=[U?z-t/2:N?z+t*4:z-t*4,B+t+1],H=[[P.left,N||U?P.bottom-t:P.top],[P.right,N?U?P.bottom-t:P.top:P.bottom-t]];return[Y,te,...H]}case"bottom":{const Y=[U?z+t/2:N?z+t*4:z-t*4,B-t],te=[U?z-t/2:N?z+t*4:z-t*4,B-t],H=[[P.left,N||U?P.top+t:P.bottom],[P.right,N?U?P.top+t:P.bottom:P.top+t]];return[Y,te,...H]}case"left":{const Y=[z+t+1,M?B+t/2:$?B+t*4:B-t*4],te=[z+t+1,M?B-t/2:$?B+t*4:B-t*4];return[...[[$||M?P.right-t:P.left,P.top],[$?M?P.right-t:P.left:P.right-t,P.bottom]],Y,te]}case"right":{const Y=[z-t,M?B+t/2:$?B+t*4:B-t*4],te=[z-t,M?B-t/2:$?B+t*4:B-t*4],H=[[$||M?P.left+t:P.right,P.top],[$?M?P.left+t:P.right:P.left+t,P.bottom]];return[Y,te,...H]}}}if(!yv([E,I],G)){if(s&&!W)return T();if(!O&&r){const j=c(S.clientX,S.clientY);if(j!==null&&j<.1)return T()}yv([E,I],V([h,d]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const wo=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[$i(10),Xc({fallbackAxisSideDirection:"end"}),qc(),Ly({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=go({open:n,middleware:s,transform:!0,whileElementsMounted:Li,onOpenChange:(p,m)=>{var y;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(y=e.onChange)==null||y.call(e,p))}}),c=Ui(l),u=mo(l),f=vo(l),{getReferenceProps:h,getFloatingProps:d}=yo([c,u,f]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(po,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(ys,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...d(),children:[x.jsx(Hy,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},dk=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=go({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=Ui(a),u=vo(a),f=mo(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:d}=yo([c,u,f]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Nr,{...d(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:x.jsx(ft.span,{layoutId:o,children:e.trigger})}),x.jsx(Gr,{children:s?x.jsx(po,{root:t,children:x.jsx(ys,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(ft.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},vv=300,hk=500,bv=(e="")=>Oe("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),au=w.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),wv=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=zn(),c=l!==null,[u,f]=w.useState(!1),[h,d]=w.useState(!1),[p,m]=w.useState(null),g=w.useRef([]),y=w.useRef([]),b=w.useContext(au),v=Un(),S=VM(),T=Ry(),{floatingStyles:E,refs:I,context:A}=go({nodeId:S,open:u,transform:!0,onOpenChange:f,whileElementsMounted:Li,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[$i({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Xc(),qc()]}),k=vo(A,{role:"menu",enabled:!0}),O=mo(A,{bubbles:!0}),_=Ky(A,{enabled:n,delay:{open:vv},handleClose:fk({blockPointerEvents:!0})}),F=Ui(A,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),L=mv(A,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:g,scrollItemIntoView:!0,onNavigate:m}),P=ck(A,{activeIndex:p,listRef:y,resetMs:hk,onMatch:u?m:void 0}),{getReferenceProps:D,getFloatingProps:N,getItemProps:$}=yo([_,F,k,O,L,P]);w.useEffect(()=>{if(!v)return;const U=()=>f(!1),M=R=>{R.nodeId!==S&&R.parentId===l&&f(!1)};return v.events.on("click",U),v.events.on("menuopen",M),()=>{v.events.off("click",U),v.events.off("menuopen",M)}},[v,S,l]),w.useEffect(()=>{u&&v&&v.events.emit("menuopen",{parentId:l,nodeId:S})},[v,u,S,l]);const W=r?i.className:Oe(bv(i.className));return x.jsxs($M,{id:S,children:[x.jsx(w.Fragment,{children:i.asChild?x.jsx(eo,{children:s,ref:Qc([I.setReference,T.ref,a]),tabIndex:c?b.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:W,...D(b.getItemProps({...i,onFocus(U){var M;(M=i.onFocus)==null||M.call(i,U),d(!1),b.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:Qc([I.setReference,T.ref,a]),tabIndex:c?b.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:W,...D(b.getItemProps({...i,onFocus(U){var M;(M=i.onFocus)==null||M.call(i,U),d(!1),b.setHasFocusInside(!0)}})),children:[s,c&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Ql,{size:14})]})]})}),x.jsx(au.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:$,setHasFocusInside:d,isOpen:u},children:x.jsx(FM,{elementsRef:g,labelsRef:y,children:u&&x.jsx(po,{preserveTabOrder:!0,children:x.jsx(ys,{context:A,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...N(),ref:I.setFloating,style:{...i.style,...E},className:Oe("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),pk=w.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=w.useContext(au),a=Ry({label:r?null:typeof e=="string"?e:t}),l=Un(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,ref:Qc([a.ref,s]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:bv(o.className),...i.getItemProps({onClick(u){var f;(f=o.onClick)==null||f.call(o,u),l==null||l.events.emit("click")},onFocus(u){var f;(f=o.onFocus)==null||f.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),mk=w.forwardRef((e,t)=>zn()!==null?x.jsx(wv,{...e,isParent:!1,ref:t}):x.jsx(BM,{children:x.jsx(wv,{...e,isParent:!0,ref:t})})),gk=(e,t)=>xi()?t:window.matchMedia(e).matches,yk=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(gk(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},Ut="600ms",vk={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:Ut},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:Ut},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:Ut}},bk={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:Ut},exit:{translateX:["0%","30%"],opacity:0,animationDuration:Ut}},lu={drawer:e=>e==="left"?vk:bk,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:Ut,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:Ut,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:Ut,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:Ut},enter:{opacity:1,scale:[1.05,1],animationDuration:Ut},exit:{opacity:0,scale:.97,animationDuration:Ut}}},wk=Sr("isolate z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),xk={top:0,left:0,right:0,bottom:-1},Tk=e=>e*.62,Sk=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,f=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+f))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=Tk(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(ft.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:xk,whileDrag:{cursor:"grabbing"},className:Oe("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},cu={drawer:"right",sheet:"none",dialog:"none"},Ek=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=w.useId(),a=w.useId(),l=yk("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:cu[e]:r?cu[e]:cu.sheet,f=l||r?lu[e]:lu.sheet,h=typeof f=="function"?f(u):f,d=l||r?e:"sheet",{refs:p,context:m}=go({open:s.open,onOpenChange:s.onChange}),g=Ui(m),y=vo(m),b=mo(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:v,getFloatingProps:S}=yo([g,y,b]),T=s.trigger,E=ar(void 0),I=()=>s.onChange(!1);return x.jsxs(w.Fragment,{children:[s.trigger?x.jsx(w.Fragment,{children:s.asChild?x.jsx(eo,{ref:p.setReference,...v({layoutId:s.layoutId}),children:T}):x.jsx(ft.button,{ref:p.setReference,...v(),layoutId:s.layoutId,type:"button",children:T})}):null,x.jsx(po,{children:x.jsx(Gr,{presenceAffectsLayout:!0,children:s.open?x.jsx(QM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${d==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:x.jsx(ys,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(ft.div,{exit:"exit",animate:"enter",initial:"initial",variants:h,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:wk({position:u,type:d}),style:d==="drawer"?{width:E}:{height:E},...S(),children:[s.title?x.jsx("header",{className:"relative w-full",children:s.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:s.title}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s.children}),s.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:s.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:I,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(Jl,{})})}):null,c&&t?x.jsx(Sk,{onChange:s.onChange,parent:p.floating,position:u,sheet:d==="sheet",value:E}):null]})})}):null})})]})},Ck=e=>x.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),xv=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:s,...i})=>{const[a,l]=w.useState(!1),c=w.useRef(null),u=o||"span",{refs:f,floatingStyles:h,context:d}=go({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:Li,middleware:[$i(5),Xc({fallbackAxisSideDirection:"start"}),qc(),Ly({element:c,padding:5})]}),p=Ky(d,{move:!0,enabled:r,delay:{open:vv}}),m=rk(d,{enabled:r}),g=mo(d,{enabled:r}),y=vo(d,{role:"tooltip",enabled:r}),b=JM(d,{enabled:!!r&&!!t}),{getReferenceProps:v,getFloatingProps:S}=yo([p,m,g,y,b]);return x.jsxs(w.Fragment,{children:[x.jsx(u,{ref:f.setReference,...v(i),children:s}),x.jsx(po,{children:a&&x.jsxs(Fr,{...S(),ref:f.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(Hy,{ref:c,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class Yi{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Yi.getDescendantProperty(a[l],s,r);else s&&Yi.getDescendantProperty(a,s,r)}else r.push(t);return r}}class xo{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=xo.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Yi.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=xo.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=xo.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return xo.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const Tv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:Oe("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[s,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(xv,{as:"button",type:"button",title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(Am,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:x.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?x.jsxs(w.Fragment,{children:[x.jsx(Pm,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(dP,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),Ki=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:f,labelClassName:h="",name:d,title:p,componentName:m,placeholder:g,hideLeft:y=!1,required:b})=>{const v=f??d,S=Tt(),T=e??S.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-component":m,"data-interactive":!!s,className:Oe("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:v,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[x.jsx(Tv,{info:a,hideLeft:y,reportStatus:!0,title:p,placeholder:g,children:T||n?x.jsxs(w.Fragment,{children:[b?null:x.jsx("span",{className:"text-opacity-70",children:T}),n?x.jsx(w.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-error:border-danger ${h}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),x.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})},Pk=e=>x.jsx(w.Fragment,{children:e.children}),Sv=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??Pk,a=r.label??r.value;return r.hidden?null:x.jsx("li",{...o,ref:s,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsxs("button",{type:"button","aria-busy":r.disabled,"aria-checked":t,"aria-current":t,"aria-selected":t,onClick:n,"data-value":r.value,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary-hover text-primary-foreground":""} ${e?"bg-primary text-primary-foreground":""}`,children:[x.jsx(i,{...o,label:r.label,value:r.value,children:a}),t?x.jsx("span",{children:x.jsx(uP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),Ik={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},Ak={caseSensitive:!1,sort:!1},Ok=[],Dk=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:s,optionalText:i,container:a,hideLeft:l=!1,right:c,left:u,error:f,required:h=!1,...d},p)=>{const m=d.value??d.defaultValue??"",g=Tt(),[y,b]=w.useState(!1),[v,S]=w.useState(""),[T,E]=w.useState(m),[I,A]=w.useState(()=>{var B;return((B=e.find(Y=>Y.value===m))==null?void 0:B.label)??m}),[k,O]=w.useState(null),_=w.useRef(Ok),F=t&&v!==""?[{value:v,label:v,"data-dynamic":"true"},...e]:e,L=new xo(F,["value","label"],Ak).search(v),P=t?void 0:`^(${e.map(B=>`${bc(B.value)}${B.label?"|"+bc(B.label):""}`).join("|")})$`;w.useEffect(()=>{if(d.value){const B=e.find(Y=>Y.value===d.value);E((B==null?void 0:B.label)??d.value)}},[d.value]);const{x:D,y:N,strategy:$,refs:W,context:U}=go({open:y,transform:!0,strategy:"absolute",onOpenChange:b,whileElementsMounted:Li,middleware:[$i(4),CM({elementContext:"reference",padding:10,apply(B){const te=B.elements.reference.parentElement,H=te==null?void 0:te.getBoundingClientRect().width;Object.assign(B.elements.floating.style,{width:`${H}px`,maxWidth:`${H}px`,minWidth:"max-content",maxHeight:`${Math.min(250,B.availableHeight)}px`})}})]}),M=lk(U,Ik),{getReferenceProps:R,getFloatingProps:q,getItemProps:ee}=yo([vo(U,{role:"listbox"}),mo(U),mv(U,{cols:0,listRef:_,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:B=>O(Y=>B??Y)})]);w.useEffect(()=>{const B=W.reference.current;if(B)return zs(B)},[]);const Q=(B,Y)=>{E(B.value);const te=W.reference.current;if(!te)return;te==null||te.setAttribute("data-value",B.value),te.value=B.value;const H=new Event("change",{bubbles:!1,cancelable:!0});te.dispatchEvent(H),d.onChange&&d.onChange(H),A(B.label??""),b(!1),S(""),O(Y)},G=B=>{var te;const Y=B.target.value;return S(Y),!y&&Y===""?b(!0):(B.target.name=d.name||"",Y?b(!0):(te=d.onChange)==null?void 0:te.call(d,B))},V=()=>{b(!0),S("")},j=()=>{var B;S(""),E(""),(B=W.reference.current)==null||B.setAttribute("data-value",""),A(""),vd(W.reference.current),b(!1)},z=d.id||d.name;return x.jsxs(Ki,{...d,left:u,error:f,form:d.form,name:d.name,feedback:n,hideLeft:l,required:h,title:d.title,container:a,rightLabel:s,interactive:o,id:d.name||d.id,optionalText:i,componentName:"autocomplete",labelClassName:r,placeholder:d.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[x.jsx(Cm,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),T?x.jsx("button",{type:"button",onClick:j,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{...R({...d,onChange:G,onFocus:V,pattern:P,ref:W.setReference,name:`${z}-shadow`,id:`${z}-shadow`,onClick:B=>B.currentTarget.focus(),onKeyDown(B){if(B.key==="Escape")return B.currentTarget.blur(),b(!1);if(B.key==="Enter"){if(k!==null&&L[k])return B.preventDefault(),Q(L[k],k);if(L.length===1)return B.preventDefault(),Q(L[0],0)}}}),"data-value":T,"data-error":!!f,"data-name":z,"data-target":z,required:h,value:y?v:I||T,"aria-autocomplete":"list",autoComplete:"off",className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",d.className)}),x.jsx("input",{id:z,name:z,type:"hidden","data-origin":z,ref:p,required:h,defaultValue:d.value||T||void 0}),x.jsx(po,{preserveTabOrder:!0,children:y?x.jsx(ys,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("ul",{...q({ref:W.setFloating,style:{position:$,left:(D??0)+(T?26:16),top:N??0,...M.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[L.map((B,Y)=>{const te=T===B.value||T===B.label;return x.jsx(Sv,{...ee({onClick:()=>Q(B,Y),ref:H=>void(_.current[Y]=H),selected:k===Y}),option:B,active:te,selected:k===Y},`${B.value}-option`)}),L.length===0?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:g.autocompleteEmpty})}):null]})}):null})]})}),Ev=w.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>x.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[x.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:Oe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,x.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Cv=(e,t,n,r)=>w.forwardRef(({type:s="text",feedback:i=null,info:a,labelClassName:l,next:c,interactive:u,rightLabel:f,optionalText:h,container:d,hideLeft:p=!1,right:m,left:g,error:y,...b},v)=>{const S=e,T=b.id??b.name,E=w.useRef(null);return w.useEffect(()=>{if(E.current===null)return;const I=E.current,A=zs(E.current),k=r==null?void 0:r(I),O=_=>{const F=_;if(F.key==="Enter"&&I.enterKeyHint==="next"){const L=I.getAttribute("data-next");if(L){const P=document.getElementById(L);if(P)return P.focus(),void F.preventDefault()}}};return I.addEventListener("keydown",O),()=>{k==null||k(),A(),I.removeEventListener("keydown",O)}},[]),x.jsx(Ki,{...n,componentName:t,info:a,container:d,error:y,feedback:i,hideLeft:p,left:g,optionalText:h,right:m,rightLabel:f,interactive:u,form:b.form,id:b.name||b.id,name:b.name,labelClassName:l,title:b.title,placeholder:b.placeholder,required:b.required,children:x.jsx(S,{...n,...b,id:T,name:T,type:s,"data-next":c,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:Ua(v,E),className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary",b.className)})})}),vs=Cv(ug,"input",{type:"text"}),Pv=new Date(1970,11,31),uu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Iv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},Mk={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},fu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},kk=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||cO(),l=w.useId(),c=Tt(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[f,h]=w.useState(e||void 0),[d,p]=w.useState(!1),m=fu(u,Pv).flatMap(I=>yn.keyof(uu,I.type)?uu[I.type](I.value):[]),g=fu(u,Pv).reduce((I,A)=>I+(yn.keyof(Iv,A.type)?Iv[A.type](A.value):""),""),[y,b]=w.useState(f?fu(u,f).reduce((I,A)=>I+(yn.keyof(uu,A.type)?Mk[A.type](f,A.value):""),""):""),v=I=>{const A=I.target.value;if(b(A),m.length===A.length&&m.every((O,_)=>{const F=A.charAt(_);return typeof O=="string"?F===O:O.test(F)})){const O=Xr(TA(A,g,new Date));return h(O),r==null?void 0:r(O)}return h(void 0),r==null?void 0:r(void 0)},S=I=>(h(I),r==null||r(I),b(I?SI(I,g):"")),T=Lm(f),E=T?f.toISOString():void 0;return x.jsx(vs,{...s,mask:m,value:y,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!d,"data-target":s.name,"data-component":"date-picker",onChange:v,required:s.required??!0,error:d?void 0:s.error,placeholder:s.placeholder??g,right:x.jsxs(w.Fragment,{children:[x.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),x.jsx(wo,{open:d,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(cP,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(Fg,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?f:void 0})})]})})}),Fk=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Nk=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Lk=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],_k=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Av=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Ov(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?_k:Lk:t.binary?Nk:Fk,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=Av(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=Av(Number(e),t.locale,i),c=n[a];return s+l+r+c}var du={exports:{}},qi={exports:{}},Ie={};/** @license React v16.13.1
177
+ */var FD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Li=FD.join(","),wy=typeof Element>"u",io=wy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_i=!wy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Vi=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},ND=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},LD=function(t,n,r){if(Vi(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Li));return n&&io.call(t,Li)&&o.unshift(t),o=o.filter(r),o},_D=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Vi(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=io.call(i,Li);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!Vi(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&h){var d=e(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else s.unshift.apply(s,i.children)}}return o},xy=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)||ND(t))&&!xy(t)?0:t.tabIndex},VD=function(t,n){var r=Ty(t);return r<0&&n&&!xy(t)?0:r},$D=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Sy=function(t){return t.tagName==="INPUT"},BD=function(t){return Sy(t)&&t.type==="hidden"},RD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},jD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},HD=function(t){if(!t.name)return!0;var n=t.form||_i(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(i){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",i.message),!1}var s=jD(o,t.form);return!s||s===t},WD=function(t){return Sy(t)&&t.type==="radio"},zD=function(t){return WD(t)&&!HD(t)},UD=function(t){var n,r=t&&_i(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,f;r=_i(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},Ey=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},GD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=io.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(io.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=_i(t);if(l&&!l.shadowRoot&&o(l)===!0)return Ey(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(UD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ey(t);return!1},YD=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 io.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},KD=function(t,n){return!(n.disabled||Vi(n)||BD(n)||GD(n,t)||RD(n)||YD(n))},Gc=function(t,n){return!(zD(n)||Ty(n)<0||!KD(t,n))},qD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},XD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=VD(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort($D).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},hs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_D([t],n.includeContainer,{filter:Gc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:qD}):r=LD(t,n.includeContainer,Gc.bind(null,n)),XD(r)},QD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return io.call(t,Li)===!1?!1:Gc(n,t)};function Cy(e,t,n){let{reference:r,floating:o}=e;const s=hr(t),i=zc(t),a=Wc(i),l=Wn(t),c=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(so(t)){case"start":d[i]-=h*(n&&c?-1:1);break;case"end":d[i]+=h*(n&&c?-1:1);break}return d}const ZD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Cy(c,r,l),h=r,d={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:y}=a[m],{x:b,y:v,data:S,reset:T}=await y({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:i,elements:{reference:e,floating:t}});u=b??u,f=v??f,d={...d,[g]:{...d[g],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:f}=Cy(c,h,l)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Yc(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=oo(t,e),p=by(d),g=a[h?f==="floating"?"reference":"floating":f],y=Ni(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},T=Ni(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:l}):b);return{top:(y.top-T.top+p.top)/S.y,bottom:(T.bottom-y.bottom+p.bottom)/S.y,left:(y.left-T.left+p.left)/S.x,right:(T.right-y.right+p.right)/S.x}}const JD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=oo(e,t)||{};if(c==null)return{};const f=by(u),h={x:n,y:r},d=zc(o),p=Wc(d),m=await i.getDimensions(c),g=d==="y",y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[d]-h[d]-s.floating[p],T=h[d]-s.reference[d],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let I=E?E[v]:0;(!I||!await(i.isElement==null?void 0:i.isElement(E)))&&(I=a.floating[v]||s.floating[p]);const A=S/2-T/2,k=I/2-m[p]/2-1,O=cn(f[y],k),_=cn(f[b],k),F=O,L=I-m[p]-_,P=I/2-m[p]/2+A,D=Hc(F,P,L),N=!l.arrow&&so(o)!=null&&P!==D&&s.reference[p]/2-(P<F?O:_)-m[p]/2<0,$=N?P<F?P-F:P-L:0;return{[d]:h[d]+$,data:{[d]:D,centerOffset:P-D-$,...N&&{alignmentOffset:$}},reset:N}}}),eM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=oo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Wn(o),b=hr(a),v=Wn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=h||(v||!m?[Fi(a)]:OD(a)),E=p!=="none";!h&&E&&T.push(...MD(a,m,p,S));const I=[a,...T],A=await Yc(t,g),k=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&k.push(A[y]),f){const P=AD(o,i,S);k.push(A[P[0]],A[P[1]])}if(O=[...O,{placement:o,overflows:k}],!k.every(P=>P<=0)){var _,F;const P=(((_=s.flip)==null?void 0:_.index)||0)+1,D=I[P];if(D)return{data:{index:P,overflows:O},reset:{placement:D}};let N=(F=O.filter($=>$.overflows[0]<=0).sort(($,H)=>$.overflows[1]-H.overflows[1])[0])==null?void 0:F.placement;if(!N)switch(d){case"bestFit":{var L;const $=(L=O.filter(H=>{if(E){const U=hr(H.placement);return U===b||U==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(U=>U>0).reduce((U,M)=>U+M,0)]).sort((H,U)=>H[1]-U[1])[0])==null?void 0:L[0];$&&(N=$);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function tM(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Wn(n),a=so(n),l=hr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,f=oo(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(d=a==="end"?p*-1:p),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const nM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await tM(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},rM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...l}=oo(e,t),c={x:n,y:r},u=await Yc(t,l),f=hr(Wn(o)),h=vy(f);let d=c[h],p=c[f];if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=d+u[g],v=d-u[y];d=Hc(b,d,v)}if(i){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+u[g],v=p-u[y];p=Hc(b,p,v)}const m=a.fn({...t,[h]:d,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},oM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=oo(e,t),l=await Yc(t,a),c=Wn(n),u=so(n),f=hr(n)==="y",{width:h,height:d}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=d-l.top-l.bottom,y=h-l.left-l.right,b=cn(d-l[p],g),v=cn(h-l[m],y),S=!t.middlewareData.shift;let T=b,E=v;if(f?E=u||S?cn(v,y):y:T=u||S?cn(b,g):g,S&&!u){const A=Vt(l.left,0),k=Vt(l.right,0),O=Vt(l.top,0),_=Vt(l.bottom,0);f?E=h-2*(A!==0||k!==0?A+k:Vt(l.left,l.right)):T=d-2*(O!==0||_!==0?O+_:Vt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const I=await o.getDimensions(s.floating);return h!==I.width||d!==I.height?{reset:{rects:!0}}:{}}}};function Py(e){const t=_t(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=nt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ki(n)!==s||ki(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Kc(e){return Fe(e)?e:e.contextElement}function ao(e){const t=Kc(e);if(!nt(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Py(t);let i=(s?ki(n.width):n.width)/r,a=(s?ki(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const sM=Hn(0);function Iy(e){const t=It(e);return!Nc()||!t.visualViewport?sM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==It(e)?!1:t}function pr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Kc(e);let i=Hn(1);t&&(r?Fe(r)&&(i=ao(r)):i=ao(e));const a=iM(s,n,r)?Iy(s):Hn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(s){const h=It(s),d=r&&Fe(r)?It(r):r;let p=h,m=Lc(p);for(;m&&r&&d!==p;){const g=ao(m),y=m.getBoundingClientRect(),b=_t(m),v=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=v,c+=S,p=It(m),m=Lc(p)}}return Ni({width:u,height:f,x:l,y:c})}function aM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=En(r),a=t?Di(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),f=nt(r);if((f||!f&&!s)&&((Bn(r)!=="body"||ds(i))&&(l=Mi(r)),nt(r))){const h=pr(r);c=ao(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function lM(e){return Array.from(e.getClientRects())}function Ay(e){return pr(En(e)).left+Mi(e).scrollLeft}function cM(e){const t=En(e),n=Mi(e),r=e.ownerDocument.body,o=Vt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Vt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ay(e);const a=-n.scrollTop;return _t(r).direction==="rtl"&&(i+=Vt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function uM(e,t){const n=It(e),r=En(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Nc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function fM(e,t){const n=pr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=nt(e)?ao(e):Hn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Oy(e,t,n){let r;if(t==="viewport")r=uM(e,n);else if(t==="document")r=cM(En(e));else if(Fe(t))r=fM(t,n);else{const o=Iy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ni(r)}function Dy(e,t){const n=Cn(e);return n===t||!Fe(n)||Rn(n)?!1:_t(n).position==="fixed"||Dy(n,t)}function dM(e,t){const n=t.get(e);if(n)return n;let r=jn(e,[],!1).filter(a=>Fe(a)&&Bn(a)!=="body"),o=null;const s=_t(e).position==="fixed";let i=s?Cn(e):e;for(;Fe(i)&&!Rn(i);){const a=_t(i),l=Fc(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ds(i)&&!l&&Dy(e,i))?r=r.filter(u=>u!==i):o=a,i=Cn(i)}return t.set(e,r),r}function hM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Di(t)?[]:dM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=Oy(t,u,o);return c.top=Vt(f.top,c.top),c.right=cn(f.right,c.right),c.bottom=cn(f.bottom,c.bottom),c.left=Vt(f.left,c.left),c},Oy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pM(e){const{width:t,height:n}=Py(e);return{width:t,height:n}}function mM(e,t,n){const r=nt(t),o=En(t),s=n==="fixed",i=pr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);if(r||!r&&!s)if((Bn(t)!=="body"||ds(o))&&(a=Mi(t)),r){const f=pr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Ay(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function qc(e){return _t(e).position==="static"}function My(e,t){return!nt(e)||_t(e).position==="fixed"?null:t?t(e):e.offsetParent}function ky(e,t){const n=It(e);if(Di(e))return n;if(!nt(e)){let o=Cn(e);for(;o&&!Rn(o);){if(Fe(o)&&!qc(o))return o;o=Cn(o)}return n}let r=My(e,t);for(;r&&wD(r)&&qc(r);)r=My(r,t);return r&&Rn(r)&&qc(r)&&!Fc(r)?n:r||xD(e)||n}const gM=async function(e){const t=this.getOffsetParent||ky,n=this.getDimensions,r=await n(e.floating);return{reference:mM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function yM(e){return _t(e).direction==="rtl"}const vM={convertOffsetParentRelativeRectToViewportRelativeRect:aM,getDocumentElement:En,getClippingRect:hM,getOffsetParent:ky,getElementRects:gM,getClientRects:lM,getDimensions:pM,getScale:ao,isElement:Fe,isRTL:yM};function bM(e,t){let n=null,r;const o=En(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const d=ro(u),p=ro(o.clientWidth-(c+f)),m=ro(o.clientHeight-(u+h)),g=ro(c),b={rootMargin:-d+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Vt(0,cn(1,l))||1};let v=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!v)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return i(!0),s}function $i(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Kc(e),u=o||s?[...c?jn(c):[],...jn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&a?bM(c,n):null;let h=-1,d=null;i&&(d=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let p,m=l?pr(e):null;l&&g();function g(){const y=pr(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const wM=nM,xM=rM,TM=eM,SM=oM,Fy=JD,EM=(e,t,n)=>{const r=new Map,o={platform:vM,...n},s={...o.platform,_c:r};return ZD(e,t,{...o,platform:s})};var Bi=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Ri(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(!Ri(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Ri(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ny(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ly(e,t){const n=Ny(e);return Math.round(t*n)/n}function _y(e){const t=C.useRef(e);return Bi(()=>{t.current=e}),t}function CM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=C.useState(r);Ri(h,r)||d(r);const[p,m]=C.useState(null),[g,y]=C.useState(null),b=C.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),v=C.useCallback($=>{$!==I.current&&(I.current=$,y($))},[]),S=s||p,T=i||g,E=C.useRef(null),I=C.useRef(null),A=C.useRef(u),k=l!=null,O=_y(l),_=_y(o),F=C.useCallback(()=>{if(!E.current||!I.current)return;const $={placement:t,strategy:n,middleware:h};_.current&&($.platform=_.current),EM(E.current,I.current,$).then(H=>{const U={...H,isPositioned:!0};L.current&&!Ri(A.current,U)&&(A.current=U,Lo.flushSync(()=>{f(U)}))})},[h,t,n,_]);Bi(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[c]);const L=C.useRef(!1);Bi(()=>(L.current=!0,()=>{L.current=!1}),[]),Bi(()=>{if(S&&(E.current=S),T&&(I.current=T),S&&T){if(O.current)return O.current(S,T,F);F()}},[S,T,F,O,k]);const P=C.useMemo(()=>({reference:E,floating:I,setReference:b,setFloating:v}),[b,v]),D=C.useMemo(()=>({reference:S,floating:T}),[S,T]),N=C.useMemo(()=>{const $={position:n,left:0,top:0};if(!D.floating)return $;const H=Ly(D.floating,u.x),U=Ly(D.floating,u.y);return a?{...$,transform:"translate("+H+"px, "+U+"px)",...Ny(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:U}},[n,a,D.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:F,refs:P,elements:D,floatingStyles:N}),[u,F,P,D,N])}const PM=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?Fy({element:r.current,padding:o}).fn(n):{}:r?Fy({element:r,padding:o}).fn(n):{}}}},ji=(e,t)=>({...wM(e),options:[e,t]}),Xc=(e,t)=>({...xM(e),options:[e,t]}),Qc=(e,t)=>({...TM(e),options:[e,t]}),IM=(e,t)=>({...SM(e),options:[e,t]}),Vy=(e,t)=>({...PM(e),options:[e,t]});function Zc(e){return C.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const $y={...C},AM=$y.useInsertionEffect||(e=>e());function at(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return AM(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Jc="ArrowUp",ps="ArrowDown",lo="ArrowLeft",co="ArrowRight";function Hi(e,t,n){return Math.floor(e/t)!==n}function ms(e,t){return t<0||t>=e.current.length}function eu(e,t){return St(e,{disabledIndices:t})}function By(e,t){return St(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function St(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&Wi(i,a,o));return a}function OM(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===Jc){if(u&&gt(n),c===-1)f=l;else if(f=St(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||f<0)){const h=c%s,d=l%s,p=l-(d-h);d===h?f=l:f=d>h?p:p-s}ms(e,f)&&(f=c)}if(n.key===ps&&(u&&gt(n),c===-1?f=a:(f=St(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(f=St(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),ms(e,f)&&(f=c)),r==="both"){const h=ro(c/s);n.key===co&&(u&&gt(n),c%s!==s-1?(f=St(e,{startingIndex:c,disabledIndices:i}),o&&Hi(f,s,h)&&(f=St(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(f=St(e,{startingIndex:c-c%s-1,disabledIndices:i})),Hi(f,s,h)&&(f=c)),n.key===lo&&(u&&gt(n),c%s!==0?(f=St(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Hi(f,s,h)&&(f=St(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(f=St(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Hi(f,s,h)&&(f=c));const d=ro(l/s)===h;ms(e,f)&&(o&&d?f=n.key===lo?l:St(e,{startingIndex:c-c%s-1,disabledIndices:i}):f=c)}return f}function DM(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let h=0;h<l;h++)u.push(o+f+h*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=i}),c=!0):o++}}),[...r]}function MM(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function kM(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Wi(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Ry=0;function zn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ry);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Ry=requestAnimationFrame(s)}var ve=typeof document<"u"?w.useLayoutEffect:w.useEffect;function FM(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 NM(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const jy=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function LM(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=C.useState(()=>new Map),i=C.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=C.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return ve(()=>{const l=new Map(o);Array.from(l.keys()).sort(FM).forEach((u,f)=>{l.set(u,f)}),NM(o,l)||s(l)},[o]),C.createElement(jy.Provider,{value:C.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function Hy(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=C.useContext(jy),[a,l]=C.useState(null),c=C.useRef(null),u=C.useCallback(f=>{if(c.current=f,a!==null&&(s.current[a]=f,i)){var h;const d=t!==void 0;i.current[a]=d?t:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,s,i,t]);return ve(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),ve(()=>{const f=c.current?o.get(c.current):null;f!=null&&l(f)},[o]),C.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uo.apply(this,arguments)}let Wy=!1,_M=0;const zy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+_M++;function VM(){const[e,t]=C.useState(()=>Wy?zy():void 0);return ve(()=>{e==null&&t(zy())},[]),C.useEffect(()=>{Wy=!0},[]),e}const fo=$y.useId||VM;let gs;process.env.NODE_ENV!=="production"&&(gs=new Set);function zi(){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=gs)!=null&&e.has(o))){var s;(s=gs)==null||s.add(o),console.warn(o)}}function $M(){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=gs)!=null&&e.has(o))){var s;(s=gs)==null||s.add(o),console.error(o)}}const Uy=C.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d:h,style:{transform:d,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||zi("The `ref` prop is required for `FloatingArrow`."));const g=fo(),[y,b]=C.useState(!1);if(ve(()=>{if(!o)return;_t(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const v=c*2,S=v/2,T=i/2*(l/-8+1),E=a/2*l/4,[I,A]=r.split("-"),k=!!h,O=I==="top"||I==="bottom",_=u&&A==="end"?"bottom":"top";let F=u&&A==="end"?"right":"left";u&&y&&(F=A==="end"?"left":"right");const L=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",D=h||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",N={top:k?"rotate(180deg)":"",left:k?"rotate(90deg)":"rotate(-90deg)",bottom:k?"":"rotate(180deg)",right:k?"rotate(-90deg)":"rotate(90deg)"}[I];return C.createElement("svg",uo({},m,{"aria-hidden":!0,ref:n,width:k?i:i+v,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[F]:L,[_]:P,[I]:O||k?"100%":"calc(100% - "+v/2+"px)",transform:""+N+(d??""),...p}}),v>0&&C.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:v+(h?0:1),d:D}),C.createElement("path",{stroke:v&&!h?m.fill:"none",d:D}),C.createElement("clipPath",{id:g},C.createElement("rect",{x:-S,y:S*(k?-1:1),width:i+v,height:i})))});function Gy(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Yy=C.createContext(null),Ky=C.createContext(null),Un=()=>{var e;return((e=C.useContext(Yy))==null?void 0:e.id)||null},Gn=()=>C.useContext(Ky);function BM(e){const t=fo(),n=Gn(),o=Un();return ve(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function RM(e){const{children:t,id:n}=e,r=Un();return C.createElement(Yy.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function jM(e){const{children:t}=e,n=C.useRef([]),r=C.useCallback(i=>{n.current=[...n.current,i]},[]),o=C.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=C.useState(()=>Gy())[0];return C.createElement(Ky.Provider,{value:C.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function Yn(e){return"data-floating-ui-"+e}function yt(e){const t=w.useRef(e);return ve(()=>{t.current=e}),t}const qy=Yn("safe-polygon");function tu(e,t,n){return n&&!no(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Xy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=Gn(),p=Un(),m=yt(c),g=yt(l),y=yt(n),b=C.useRef(),v=C.useRef(-1),S=C.useRef(),T=C.useRef(-1),E=C.useRef(!0),I=C.useRef(!1),A=C.useRef(()=>{}),k=C.useCallback(()=>{var D;const N=(D=o.current.openEvent)==null?void 0:D.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);C.useEffect(()=>{if(!a)return;function D(N){let{open:$}=N;$||(clearTimeout(v.current),clearTimeout(T.current),E.current=!0)}return s.on("openchange",D),()=>{s.off("openchange",D)}},[a,s]),C.useEffect(()=>{if(!a||!m.current||!n)return;function D($){k()&&r(!1,$,"hover")}const N=dt(i.floating).documentElement;return N.addEventListener("mouseleave",D),()=>{N.removeEventListener("mouseleave",D)}},[i.floating,n,r,a,m,k]);const O=C.useCallback(function(D,N,$){N===void 0&&(N=!0),$===void 0&&($="hover");const H=tu(g.current,"close",b.current);H&&!S.current?(clearTimeout(v.current),v.current=window.setTimeout(()=>r(!1,D,$),H)):N&&(clearTimeout(v.current),r(!1,D,$))},[g,r]),_=at(()=>{A.current(),S.current=void 0}),F=at(()=>{if(I.current){const D=dt(i.floating).body;D.style.pointerEvents="",D.removeAttribute(qy),I.current=!1}});C.useEffect(()=>{if(!a)return;function D(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(M){if(clearTimeout(v.current),E.current=!1,u&&!no(b.current)||f>0&&!tu(g.current,"open"))return;const R=tu(g.current,"open",b.current);R?v.current=window.setTimeout(()=>{y.current||r(!0,M,"hover")},R):r(!0,M,"hover")}function $(M){if(D())return;A.current();const R=dt(i.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(v.current),S.current=m.current({...o.current.floatingContext,tree:d,x:M.clientX,y:M.clientY,onClose(){F(),_(),O(M,!0,"safe-polygon")}});const ee=S.current;R.addEventListener("mousemove",ee),A.current=()=>{R.removeEventListener("mousemove",ee)};return}(b.current==="touch"?!Ke(i.floating,M.relatedTarget):!0)&&O(M)}function H(M){D()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:M.clientX,y:M.clientY,onClose(){F(),_(),O(M)}})(M))}if(Fe(i.domReference)){var U;const M=i.domReference;return n&&M.addEventListener("mouseleave",H),(U=i.floating)==null||U.addEventListener("mouseleave",H),h&&M.addEventListener("mousemove",N,{once:!0}),M.addEventListener("mouseenter",N),M.addEventListener("mouseleave",$),()=>{var R;n&&M.removeEventListener("mouseleave",H),(R=i.floating)==null||R.removeEventListener("mouseleave",H),h&&M.removeEventListener("mousemove",N),M.removeEventListener("mouseenter",N),M.removeEventListener("mouseleave",$)}}},[i,a,e,u,f,h,O,_,F,r,n,y,d,g,m,o]),ve(()=>{var D;if(a&&n&&(D=m.current)!=null&&D.__options.blockPointerEvents&&k()){const $=dt(i.floating).body;$.setAttribute(qy,""),$.style.pointerEvents="none",I.current=!0;const H=i.floating;if(Fe(i.domReference)&&H){var N;const U=i.domReference,M=d==null||(N=d.nodesRef.current.find(R=>R.id===p))==null||(N=N.context)==null?void 0:N.elements.floating;return M&&(M.style.pointerEvents=""),U.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{U.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,i,d,m,k]),ve(()=>{n||(b.current=void 0,_(),F())},[n,_,F]),C.useEffect(()=>()=>{_(),clearTimeout(v.current),clearTimeout(T.current),F()},[a,i.domReference,_,F]);const L=C.useMemo(()=>{function D(N){b.current=N.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(N){const{nativeEvent:$}=N;function H(){!E.current&&!y.current&&r(!0,$,"hover")}u&&!no(b.current)||n||f===0||(clearTimeout(T.current),b.current==="touch"?H():T.current=window.setTimeout(H,f))}}},[u,r,n,y,f]),P=C.useMemo(()=>({onMouseEnter(){clearTimeout(v.current)},onMouseLeave(D){O(D.nativeEvent,!1)}}),[O]);return C.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function HM(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function mr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function WM(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),mr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let ho=new WeakMap,Ui=new WeakSet,Gi={},nu=0;const zM=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Qy=e=>e&&(e.host||Qy(e.parentNode)),UM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Qy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function GM(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=UM(t,e),a=new Set,l=new Set(i),c=[];Gi[o]||(Gi[o]=new WeakMap);const u=Gi[o];i.forEach(f),h(t),a.clear();function f(d){!d||a.has(d)||(a.add(d),d.parentNode&&f(d.parentNode))}function h(d){!d||l.has(d)||[].forEach.call(d.children,p=>{if(Bn(p)!=="script")if(a.has(p))h(p);else{const m=s?p.getAttribute(s):null,g=m!==null&&m!=="false",y=(ho.get(p)||0)+1,b=(u.get(p)||0)+1;ho.set(p,y),u.set(p,b),c.push(p),y===1&&g&&Ui.add(p),b===1&&p.setAttribute(o,""),!g&&s&&p.setAttribute(s,"true")}})}return nu++,()=>{c.forEach(d=>{const p=(ho.get(d)||0)-1,m=(u.get(d)||0)-1;ho.set(d,p),u.set(d,m),p||(!Ui.has(d)&&s&&d.removeAttribute(s),Ui.delete(d)),m||d.removeAttribute(o)}),nu--,nu||(ho=new WeakMap,ho=new WeakMap,Ui=new WeakSet,Gi={})}}function Zy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=dt(e[0]).body;return GM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const po=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Jy(e,t){const n=hs(e,po());t==="prev"&&n.reverse();const r=n.indexOf(Ut(dt(e)));return n.slice(r+1)[0]}function ev(){return Jy(document.body,"next")}function tv(){return Jy(document.body,"prev")}function ys(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ke(n,r)}function YM(e){hs(e,po()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function KM(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 qM(e,t,n){const r=e.indexOf(t);function o(i){const a=Yn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||Ke(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const ru={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let XM;function nv(e){e.key==="Tab"&&(e.target,clearTimeout(XM))}const Yi=C.forwardRef(function(t,n){const[r,o]=C.useState();ve(()=>($c()&&o("button"),document.addEventListener("keydown",nv),()=>{document.removeEventListener("keydown",nv)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Yn("focus-guard")]:"",style:ru};return C.createElement("span",uo({},t,s))}),rv=C.createContext(null),ov=Yn("portal");function QM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=fo(),o=sv(),[s,i]=C.useState(null),a=C.useRef(null);return ve(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),ve(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(ov,""),l.appendChild(c),a.current=c,i(c)},[t,r]),ve(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Fe(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(ov,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function mo(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=QM({id:n,root:r}),[i,a]=C.useState(null),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=!!i&&!i.modal&&i.open&&o&&!!(r||s);return C.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function d(p){s&&ys(p)&&(p.type==="focusin"?KM:YM)(s)}return s.addEventListener("focusin",d,!0),s.addEventListener("focusout",d,!0),()=>{s.removeEventListener("focusin",d,!0),s.removeEventListener("focusout",d,!0)}},[s,o,i==null?void 0:i.modal]),C.createElement(rv.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:s,setFocusManagerState:a}),[o,s])},h&&s&&C.createElement(Yi,{"data-type":"outside",ref:l,onFocus:d=>{if(ys(d,s)){var p;(p=u.current)==null||p.focus()}else{const m=tv()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),h&&s&&C.createElement("span",{"aria-owns":s.id,style:ru}),s&&Lo.createPortal(t,s),h&&s&&C.createElement(Yi,{"data-type":"outside",ref:c,onFocus:d=>{if(ys(d,s)){var p;(p=f.current)==null||p.focus()}else{const m=ev()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,d.nativeEvent))}}}))}const sv=()=>C.useContext(rv),iv=20;let gr=[];function ou(e){gr=gr.filter(n=>n.isConnected);let t=e;if(!(!t||Bn(t)==="body")){if(!QD(t,po())){const n=hs(t,po())[0];n&&(t=n)}gr.push(t),gr.length>iv&&(gr=gr.slice(-iv))}}function av(){return gr.slice().reverse().find(e=>e.isConnected)}const ZM=C.forwardRef(function(t,n){return C.createElement("button",uo({},t,{type:"button",ref:n,tabIndex:-1,style:ru}))});function vs(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:h,refs:d,nodeId:p,onOpenChange:m,events:g,dataRef:y,floatingId:b,elements:{domReference:v,floating:S}}=t,T=typeof i=="number"&&i<0,E=yy(v)&&T,I=zM()?s:!0,A=yt(o),k=yt(i),O=yt(a),_=Gn(),F=sv(),L=C.useRef(null),P=C.useRef(null),D=C.useRef(!1),N=C.useRef(!1),$=C.useRef(-1),H=F!=null,U=S==null?void 0:S.firstElementChild,M=(U==null?void 0:U.id)===b?U:S,R=at(function(G){return G===void 0&&(G=M),G?hs(G,po()):[]}),q=at(G=>{const V=R(G);return A.current.map(j=>v&&j==="reference"?v:M&&j==="floating"?M:V).filter(Boolean).flat()});C.useEffect(()=>{if(r||!c)return;function G(j){if(j.key==="Tab"){Ke(M,Ut(dt(M)))&&R().length===0&&!E&&gt(j);const z=q(),B=ln(j);A.current[0]==="reference"&&B===v&&(gt(j),j.shiftKey?zn(z[z.length-1]):zn(z[1])),A.current[1]==="floating"&&B===M&&j.shiftKey&&(gt(j),zn(z[0]))}}const V=dt(M);return V.addEventListener("keydown",G),()=>{V.removeEventListener("keydown",G)}},[r,v,M,c,A,E,R,q]),C.useEffect(()=>{if(r||!S)return;function G(V){const j=ln(V),B=R().indexOf(j);B!==-1&&($.current=B)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,R]),C.useEffect(()=>{if(r||!f)return;function G(){N.current=!0,setTimeout(()=>{N.current=!1})}function V(j){const z=j.relatedTarget;queueMicrotask(()=>{const B=!(Ke(v,z)||Ke(S,z)||Ke(z,S)||Ke(F==null?void 0:F.portalNode,z)||z!=null&&z.hasAttribute(Yn("focus-guard"))||_&&(mr(_.nodesRef.current,p).find(Y=>{var te,W;return Ke((te=Y.context)==null?void 0:te.elements.floating,z)||Ke((W=Y.context)==null?void 0:W.elements.domReference,z)})||HM(_.nodesRef.current,p).find(Y=>{var te,W;return((te=Y.context)==null?void 0:te.elements.floating)===z||((W=Y.context)==null?void 0:W.elements.domReference)===z})));if(l&&B&&Ut(dt(M))===dt(M).body){nt(M)&&(M==null||M.focus());const Y=$.current,te=R(),W=te[Y]||te[te.length-1]||M;nt(W)&&W.focus()}(E||!c)&&z&&B&&!N.current&&z!==av()&&(D.current=!0,m(!1,j))})}if(S&&nt(v))return v.addEventListener("focusout",V),v.addEventListener("pointerdown",G),S.addEventListener("focusout",V),()=>{v.removeEventListener("focusout",V),v.removeEventListener("pointerdown",G),S.removeEventListener("focusout",V)}},[r,v,S,M,c,p,_,F,m,f,l,R,E]),C.useEffect(()=>{var G;if(r)return;const V=Array.from((F==null||(G=F.portalNode)==null?void 0:G.querySelectorAll("["+Yn("portal")+"]"))||[]);if(S){const j=[S,...V,L.current,P.current,A.current.includes("reference")||E?v:null].filter(B=>B!=null),z=c||E?Zy(j,I,!I):Zy(j);return()=>{z()}}},[r,v,S,c,A,F,E,I]),ve(()=>{if(r||!nt(M))return;const G=dt(M),V=Ut(G);queueMicrotask(()=>{const j=q(M),z=k.current,B=(typeof z=="number"?j[z]:z.current)||M,Y=Ke(M,V);!T&&!Y&&h&&zn(B,{preventScroll:B===M})})},[r,h,M,T,q,k]),ve(()=>{if(r||!M)return;let G=!1;const V=dt(M),j=Ut(V);let B=y.current.openEvent;const Y=d.domReference.current;ou(j);function te(W){let{open:Pe,reason:Xe,event:_e,nested:Qe}=W;Pe&&(B=_e),Xe==="escape-key"&&d.domReference.current&&ou(d.domReference.current),Xe==="hover"&&_e.type==="mouseleave"&&(D.current=!0),Xe==="outside-press"&&(Qe?(D.current=!1,G=!0):D.current=!(my(_e)||Vc(_e)))}return g.on("openchange",te),()=>{g.off("openchange",te);const W=Ut(V),Pe=Ke(S,W)||_&&mr(_.nodesRef.current,p).some(ae=>{var ge;return Ke((ge=ae.context)==null?void 0:ge.elements.floating,W)});(Pe||B&&["click","mousedown"].includes(B.type))&&d.domReference.current&&ou(d.domReference.current);const _e=Y||j,Qe=hs(dt(_e).body,po());queueMicrotask(()=>{let ae=av();!ae&&nt(_e)&&S&&(ae=qM(Qe,_e,S)),O.current&&!D.current&&nt(ae)&&(!(ae!==W&&W!==V.body)||Pe)&&ae.focus({preventScroll:G})})}},[r,S,M,O,y,d,g,_,p]),ve(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:f,open:h,onOpenChange:m,refs:d}),()=>{F.setFocusManagerState(null)}},[r,F,c,h,m,d,f]),ve(()=>{if(r||!M||typeof MutationObserver!="function"||T)return;const G=()=>{const j=M.getAttribute("tabindex"),z=R(),B=Ut(dt(S)),Y=z.indexOf(B);Y!==-1&&($.current=Y),A.current.includes("floating")||B!==d.domReference.current&&z.length===0?j!=="0"&&M.setAttribute("tabindex","0"):j!=="-1"&&M.setAttribute("tabindex","-1")};G();const V=new MutationObserver(G);return V.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}},[r,S,M,d,A,R,T]);function ee(G){return r||!u||!c?null:C.createElement(ZM,{ref:G==="start"?L:P,onClick:V=>m(!1,V.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&I&&(c?!E:!0)&&(H||c);return C.createElement(C.Fragment,null,Q&&C.createElement(Yi,{"data-type":"inside",ref:F==null?void 0:F.beforeInsideRef,onFocus:G=>{if(c){const j=q();zn(o[0]==="reference"?j[0]:j[j.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(D.current=!1,ys(G,F.portalNode)){const j=ev()||v;j==null||j.focus()}else{var V;(V=F.beforeOutsideRef.current)==null||V.focus()}}}),!E&&ee("start"),n,ee("end"),Q&&C.createElement(Yi,{"data-type":"inside",ref:F==null?void 0:F.afterInsideRef,onFocus:G=>{if(c)zn(q()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(f&&(D.current=!0),ys(G,F.portalNode)){const j=tv()||v;j==null||j.focus()}else{var V;(V=F.afterOutsideRef.current)==null||V.focus()}}}))}const su=new Set,JM=C.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=fo();return ve(()=>{if(!r)return;su.add(s);const i=/iP(hone|ad|od)|iOS/.test(_c()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,f=a.left?parseFloat(a.left):window.scrollX,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var d,p;const m=((d=window.visualViewport)==null?void 0:d.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(g))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{su.delete(s),su.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,h)))}},[s,r]),C.createElement("div",uo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function lv(e){return nt(e.target)&&e.target.tagName==="BUTTON"}function cv(e){return jc(e)}function Ki(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=C.useRef(),h=C.useRef(!1),d=C.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(no(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}no(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||lv(p))&&(p.key===" "&&!cv(s)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||lv(p)||cv(s)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return C.useMemo(()=>i?{reference:d}:{},[i,d])}function ek(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0: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(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,f=i.height,h=i.x,d=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),h-=n||0,d-=r||0,u=0,f=0,!o||c?(u=t.axis==="y"?i.width:0,f=t.axis==="x"?i.height:0,h=a&&t.x!=null?t.x:h,d=l&&t.y!=null?t.y:d):o&&!c&&(f=t.axis==="x"?i.height:f,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:f,x:h,y:d,top:d,right:h+u,bottom:d+f,left:h}}}}function uv(e){return e!=null&&e.clientX!=null}function tk(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,f=C.useRef(!1),h=C.useRef(null),[d,p]=C.useState(),[m,g]=C.useState([]),y=at((E,I)=>{f.current||r.current.openEvent&&!uv(r.current.openEvent)||i.setPositionReference(ek(s,{x:E,y:I,axis:l,dataRef:r,pointerType:d}))}),b=at(E=>{c!=null||u!=null||(n?h.current||g([]):y(E.clientX,E.clientY))}),v=no(d)?o:n,S=C.useCallback(()=>{if(!v||!a||c!=null||u!=null)return;const E=It(o);function I(A){const k=ln(A);Ke(o,k)?(E.removeEventListener("mousemove",I),h.current=null):y(A.clientX,A.clientY)}if(!r.current.openEvent||uv(r.current.openEvent)){E.addEventListener("mousemove",I);const A=()=>{E.removeEventListener("mousemove",I),h.current=null};return h.current=A,A}i.setPositionReference(s)},[v,a,c,u,o,r,i,s,y]);C.useEffect(()=>S(),[S,m]),C.useEffect(()=>{a&&!o&&(f.current=!1)},[a,o]),C.useEffect(()=>{!a&&n&&(f.current=!0)},[a,n]),ve(()=>{a&&(c!=null||u!=null)&&(f.current=!1,y(c,u))},[a,c,u,y]);const T=C.useMemo(()=>{function E(I){let{pointerType:A}=I;p(A)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:b,onMouseEnter:b}},[b]);return C.useMemo(()=>a?{reference:T}:{},[a,T])}const nk={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},rk={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},fv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function go(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:p}=t,m=Gn(),g=at(typeof l=="function"?l:()=>!1),y=typeof l=="function"?g:l,b=C.useRef(!1),v=C.useRef(!1),{escapeKey:S,outsidePress:T}=fv(d),{escapeKey:E,outsidePress:I}=fv(p),A=at(P=>{var D;if(!n||!i||!a||P.key!=="Escape")return;const N=(D=s.current.floatingContext)==null?void 0:D.nodeId,$=m?mr(m.nodesRef.current,N):[];if(!S&&(P.stopPropagation(),$.length>0)){let H=!0;if($.forEach(U=>{var M;if((M=U.context)!=null&&M.open&&!U.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,SD(P)?P.nativeEvent:P,"escape-key")}),k=at(P=>{var D;const N=()=>{var $;A(P),($=ln(P))==null||$.removeEventListener("keydown",N)};(D=ln(P))==null||D.addEventListener("keydown",N)}),O=at(P=>{var D;const N=b.current;b.current=!1;const $=v.current;if(v.current=!1,c==="click"&&$||N||typeof y=="function"&&!y(P))return;const H=ln(P),U="["+Yn("inert")+"]",M=dt(o.floating).querySelectorAll(U);let R=Fe(H)?H:null;for(;R&&!Rn(R);){const G=Cn(R);if(Rn(G)||!Fe(G))break;R=G}if(M.length&&Fe(H)&&!ED(H)&&!Ke(H,o.floating)&&Array.from(M).every(G=>!Ke(R,G)))return;if(nt(H)&&L){const G=H.clientWidth>0&&H.scrollWidth>H.clientWidth,V=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let j=V&&P.offsetX>H.clientWidth;if(V&&_t(H).direction==="rtl"&&(j=P.offsetX<=H.offsetWidth-H.clientWidth),j||G&&P.offsetY>H.clientHeight)return}const q=(D=s.current.floatingContext)==null?void 0:D.nodeId,ee=m&&mr(m.nodesRef.current,q).some(G=>{var V;return Rc(P,(V=G.context)==null?void 0:V.elements.floating)});if(Rc(P,o.floating)||Rc(P,o.domReference)||ee)return;const Q=m?mr(m.nodesRef.current,q):[];if(Q.length>0){let G=!0;if(Q.forEach(V=>{var j;if((j=V.context)!=null&&j.open&&!V.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),_=at(P=>{var D;const N=()=>{var $;O(P),($=ln(P))==null||$.removeEventListener(c,N)};(D=ln(P))==null||D.addEventListener(c,N)});C.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function P($){r(!1,$,"ancestor-scroll")}const D=dt(o.floating);a&&D.addEventListener("keydown",E?k:A,E),y&&D.addEventListener(c,I?_:O,I);let N=[];return h&&(Fe(o.domReference)&&(N=jn(o.domReference)),Fe(o.floating)&&(N=N.concat(jn(o.floating))),!Fe(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(jn(o.reference.contextElement)))),N=N.filter($=>{var H;return $!==((H=D.defaultView)==null?void 0:H.visualViewport)}),N.forEach($=>{$.addEventListener("scroll",P,{passive:!0})}),()=>{a&&D.removeEventListener("keydown",E?k:A,E),y&&D.removeEventListener(c,I?_:O,I),N.forEach($=>{$.removeEventListener("scroll",P)})}},[s,o,a,y,c,n,r,h,i,S,T,A,E,k,O,I,_]),C.useEffect(()=>{b.current=!1},[y,c]);const F=C.useMemo(()=>({onKeyDown:A,[nk[f]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[A,r,u,f]),L=C.useMemo(()=>({onKeyDown:A,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[rk[c]]:()=>{b.current=!0}}),[A,c]);return C.useMemo(()=>i?{reference:F,floating:L}:{},[i,F,L])}function ok(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=fo(),s=C.useRef({}),[i]=C.useState(()=>Gy()),a=Un()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!Fe(d)&&$M("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]=C.useState(r.reference),u=at((d,p,m)=>{s.current.openEvent=d?p:void 0,i.emit("openchange",{open:d,event:p,reason:m,nested:a}),n==null||n(d,p,m)}),f=C.useMemo(()=>({setPositionReference:c}),[]),h=C.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return C.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:h,events:i,floatingId:o,refs:f}),[t,u,h,i,o,f])}function yo(e){e===void 0&&(e={});const{nodeId:t}=e,n=ok({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=C.useState(null),[a,l]=C.useState(null),u=(o==null?void 0:o.reference)||s,f=C.useRef(null),h=Gn();ve(()=>{u&&(f.current=u)},[u]);const d=CM({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(v=>{const S=Fe(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l(S),d.refs.setReference(S)},[d.refs]),m=C.useCallback(v=>{(Fe(v)||v===null)&&(f.current=v,i(v)),(Fe(d.refs.reference.current)||d.refs.reference.current===null||v!==null&&!Fe(v))&&d.refs.setReference(v)},[d.refs]),g=C.useMemo(()=>({...d.refs,setReference:m,setPositionReference:p,domReference:f}),[d.refs,m,p]),y=C.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),b=C.useMemo(()=>({...d,...r,refs:g,elements:y,nodeId:t}),[d,g,y,t,r]);return ve(()=>{r.dataRef.current.floatingContext=b;const v=h==null?void 0:h.nodesRef.current.find(S=>S.id===t);v&&(v.context=b)}),C.useMemo(()=>({...d,context:b,refs:g,elements:y}),[d,g,y,b])}function sk(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=C.useRef(!1),u=C.useRef(),f=C.useRef(!0);C.useEffect(()=>{if(!a)return;const d=It(i.domReference);function p(){!n&&nt(i.domReference)&&i.domReference===Ut(dt(i.domReference))&&(c.current=!0)}function m(){f.current=!0}return d.addEventListener("blur",p),d.addEventListener("keydown",m,!0),()=>{d.removeEventListener("blur",p),d.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),C.useEffect(()=>{if(!a)return;function d(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,a]),C.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=C.useMemo(()=>({onPointerDown(d){Vc(d.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const p=ln(d.nativeEvent);if(l&&Fe(p))try{if($c()&&gy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!jc(p))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const p=d.relatedTarget,m=d.nativeEvent,g=Fe(p)&&p.hasAttribute(Yn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const b=Ut(i.domReference?i.domReference.ownerDocument:document);!p&&b===i.domReference||Ke((y=s.current.floatingContext)==null?void 0:y.refs.floating.current,b)||Ke(i.domReference,b)||g||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return C.useMemo(()=>a?{reference:h}:{},[a,h])}const dv="active",hv="selected";function iu(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[dv]:i,[hv]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[dv,hv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),i[c]=function(){for(var h,d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(g=>g(...p)).find(g=>g!==void 0)}}}else i[c]=u}),i),{})}}function vo(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=C.useCallback(a=>iu(a,e,"reference"),t),s=C.useCallback(a=>iu(a,e,"floating"),n),i=C.useCallback(a=>iu(a,e,"item"),r);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let pv=!1;function qi(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function mv(e,t){return qi(t,e===Jc||e===ps,e===lo||e===co)}function au(e,t,n){return qi(t,e===ps,n?e===lo:e===co)||e==="Enter"||e===" "||e===""}function ik(e,t,n){return qi(t,n?e===lo:e===co,e===ps)}function gv(e,t,n){return qi(t,n?e===co:e===lo,e===Jc)}function yv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:h=!1,rtl:d=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:b=void 0,orientation:v="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:I,dense:A=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||zi("`useListNavigation` looping must be enabled to allow escaping."),p||zi("`useListNavigation` must be virtual to allow escaping.")),v==="vertical"&&S>1&&zi("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const k=Un(),O=Gn(),_=at(a),F=C.useRef(m),L=C.useRef(c??-1),P=C.useRef(null),D=C.useRef(!0),N=C.useRef(_),$=C.useRef(!!o.floating),H=C.useRef(n),U=C.useRef(!1),M=C.useRef(!1),R=yt(b),q=yt(n),ee=yt(T),Q=yt(o.floating),G=yt(c),[V,j]=C.useState(),[z,B]=C.useState(),Y=at(function(ae,ge,se){se===void 0&&(se=!1);function be(we){p?(j(we.id),O==null||O.events.emit("virtualfocus",we),E&&(E.current=we)):zn(we,{preventScroll:!0,sync:gy()&&$c()?pv||U.current:!1})}const ot=ae.current[ge.current];ot&&be(ot),requestAnimationFrame(()=>{const we=ae.current[ge.current]||ot;if(!we)return;ot||be(we);const st=ee.current;st&&W&&(se||!D.current)&&(we.scrollIntoView==null||we.scrollIntoView(typeof st=="boolean"?{block:"nearest",inline:"nearest"}:st))})});ve(()=>{document.createElement("div").focus({get preventScroll(){return pv=!0,!1}})},[]),ve(()=>{l&&(n&&o.floating?F.current&&c!=null&&(M.current=!0,L.current=c,_(c)):$.current&&(L.current=-1,N.current(null)))},[l,n,o.floating,c,_]),ve(()=>{if(l&&n&&o.floating)if(i==null){if(U.current=!1,G.current!=null)return;if($.current&&(L.current=-1,Y(s,L)),(!H.current||!$.current)&&F.current&&(P.current!=null||F.current===!0&&P.current==null)){let ae=0;const ge=()=>{s.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(ge),ae++):(L.current=P.current==null||au(P.current,v,d)||h?eu(s,R.current):By(s,R.current),P.current=null,_(L.current))};ge()}}else ms(s,i)||(L.current=i,Y(s,L,M.current),M.current=!1)},[l,n,o.floating,i,G,h,s,v,d,_,Y,R]),ve(()=>{var ae;if(!l||o.floating||!O||p||!$.current)return;const ge=O.nodesRef.current,se=(ae=ge.find(we=>we.id===k))==null||(ae=ae.context)==null?void 0:ae.elements.floating,be=Ut(dt(o.floating)),ot=ge.some(we=>we.context&&Ke(we.context.elements.floating,be));se&&!ot&&D.current&&se.focus({preventScroll:!0})},[l,o.floating,O,k,p]),ve(()=>{if(!l||!O||!p||k)return;function ae(ge){B(ge.id),E&&(E.current=ge)}return O.events.on("virtualfocus",ae),()=>{O.events.off("virtualfocus",ae)}},[l,O,p,k,E]),ve(()=>{N.current=_,$.current=!!o.floating}),ve(()=>{n||(P.current=null)},[n]),ve(()=>{H.current=n},[n]);const te=i!=null,W=C.useMemo(()=>{function ae(se){if(!n)return;const be=s.current.indexOf(se);be!==-1&&_(be)}return{onFocus(se){let{currentTarget:be}=se;ae(be)},onClick:se=>{let{currentTarget:be}=se;return be.focus({preventScroll:!0})},...g&&{onMouseMove(se){let{currentTarget:be}=se;ae(be)},onPointerLeave(se){let{pointerType:be}=se;!D.current||be==="touch"||(L.current=-1,Y(s,L),_(null),p||zn(Q.current,{preventScroll:!0}))}}}},[n,Q,Y,g,s,_,p]),Pe=at(ae=>{if(D.current=!1,U.current=!0,!q.current&&ae.currentTarget===Q.current)return;if(h&&gv(ae.key,v,d)){gt(ae),r(!1,ae.nativeEvent,"list-navigation"),nt(o.domReference)&&!p&&o.domReference.focus();return}const ge=L.current,se=eu(s,b),be=By(s,b);if(ae.key==="Home"&&(gt(ae),L.current=se,_(L.current)),ae.key==="End"&&(gt(ae),L.current=be,_(L.current)),S>1){const ot=I||Array.from({length:s.current.length},()=>({width:1,height:1})),we=DM(ot,S,A),st=we.findIndex(oe=>oe!=null&&!Wi(s.current,oe,b)),J=we.reduce((oe,xe,He)=>xe!=null&&!Wi(s.current,xe,b)?He:oe,-1);if(L.current=we[OM({current:we.map(oe=>oe!=null?s.current[oe]:null)},{event:ae,orientation:v,loop:f,cols:S,disabledIndices:kM([...b||s.current.map((oe,xe)=>Wi(s.current,xe)?xe:void 0),void 0],we),minIndex:st,maxIndex:J,prevIndex:MM(L.current>be?se:L.current,ot,we,S,ae.key===ps?"bl":ae.key===co?"tr":"tl"),stopEvent:!0})],_(L.current),v==="both")return}if(mv(ae.key,v)){if(gt(ae),n&&!p&&Ut(ae.currentTarget.ownerDocument)===ae.currentTarget){L.current=au(ae.key,v,d)?se:be,_(L.current);return}au(ae.key,v,d)?f?L.current=ge>=be?u&&ge!==s.current.length?-1:se:St(s,{startingIndex:ge,disabledIndices:b}):L.current=Math.min(be,St(s,{startingIndex:ge,disabledIndices:b})):f?L.current=ge<=se?u&&ge!==-1?s.current.length:be:St(s,{startingIndex:ge,decrement:!0,disabledIndices:b}):L.current=Math.max(se,St(s,{startingIndex:ge,decrement:!0,disabledIndices:b})),ms(s,L.current)?_(null):_(L.current)}}),Xe=C.useMemo(()=>p&&n&&te&&{"aria-activedescendant":z||V},[p,n,te,z,V]),_e=C.useMemo(()=>({"aria-orientation":v==="both"?void 0:v,...!yy(o.domReference)&&Xe,onKeyDown:Pe,onPointerMove(){D.current=!0}}),[Xe,Pe,o.domReference,v]),Qe=C.useMemo(()=>{function ae(se){m==="auto"&&my(se.nativeEvent)&&(F.current=!0)}function ge(se){F.current=m,m==="auto"&&Vc(se.nativeEvent)&&(F.current=!0)}return{...Xe,onKeyDown(se){D.current=!1;const be=se.key.indexOf("Arrow")===0,ot=ik(se.key,v,d),we=gv(se.key,v,d),st=mv(se.key,v),J=(h?ot:st)||se.key==="Enter"||se.key.trim()==="";if(p&&n){const vt=O==null?void 0:O.nodesRef.current.find(Ot=>Ot.parentId==null),Pt=O&&vt?WM(O.nodesRef.current,vt.id):null;if(be&&Pt&&E){const Ot=new KeyboardEvent("keydown",{key:se.key,bubbles:!0});if(ot||we){var oe,xe;const Sr=((oe=Pt.context)==null?void 0:oe.elements.domReference)===se.currentTarget,Fo=we&&!Sr?(xe=Pt.context)==null?void 0:xe.elements.domReference:ot?s.current.find(No=>(No==null?void 0:No.id)===V):null;Fo&&(gt(se),Fo.dispatchEvent(Ot),B(void 0))}if(st&&Pt.context&&Pt.context.open&&Pt.parentId&&se.currentTarget!==Pt.context.elements.domReference){var He;gt(se),(He=Pt.context.elements.domReference)==null||He.dispatchEvent(Ot);return}}return Pe(se)}if(!(!n&&!y&&be)){if(J&&(P.current=h&&st?null:se.key),h){ot&&(gt(se),n?(L.current=eu(s,R.current),_(L.current)):r(!0,se.nativeEvent,"list-navigation"));return}st&&(c!=null&&(L.current=c),gt(se),!n&&y?r(!0,se.nativeEvent,"list-navigation"):Pe(se),n&&_(L.current))}},onFocus(){n&&!p&&_(null)},onPointerDown:ge,onMouseDown:ae,onClick:ae}},[V,Xe,Pe,R,m,s,h,_,r,n,y,v,d,c,O,p,E]);return C.useMemo(()=>l?{reference:Qe,floating:_e,item:W}:{},[l,Qe,_e,W])}const ak=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function bo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=ak.get(i))!=null?n:i,l=fo(),u=Un()!=null,f=C.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),h=C.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),d=C.useCallback(p=>{let{active:m,selected:g}=p;const y={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...y,"aria-selected":m&&g};case"combobox":return{...y,...m&&{"aria-selected":!0}}}return{}},[o,i]);return C.useMemo(()=>s?{reference:f,floating:h,item:d}:{},[s,f,h,d])}const vv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function wo(e,t){return typeof e=="function"?e(t):e}function lk(e,t){const[n,r]=C.useState(e);return e&&!n&&r(!0),C.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function ck(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=C.useState("unmounted"),c=lk(n,i);return!c&&a==="close"&&l("unmounted"),ve(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function uk(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=C.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",f=(u?i:i.open)||0,h=(u?i:i.close)||0,[d,p]=C.useState(()=>({...wo(s,c),...wo(n,c)})),{isMounted:m,status:g}=ck(e,{duration:i}),y=yt(n),b=yt(r),v=yt(o),S=yt(s);return ve(()=>{const T=wo(y.current,c),E=wo(v.current,c),I=wo(S.current,c),A=wo(b.current,c)||Object.keys(T).reduce((k,O)=>(k[O]="",k),{});if(g==="initial"&&p(k=>({transitionProperty:k.transitionProperty,...I,...T})),g==="open"&&p({transitionProperty:Object.keys(A).map(vv).join(","),transitionDuration:f+"ms",...I,...A}),g==="close"){const k=E||T;p({transitionProperty:Object.keys(k).map(vv).join(","),transitionDuration:h+"ms",...I,...k})}},[h,v,y,b,S,f,g,c]),{isMounted:m,styles:d}}function fk(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:h=[],selectedIndex:d=null}=t,p=C.useRef(),m=C.useRef(""),g=C.useRef((n=d??i)!=null?n:-1),y=C.useRef(null),b=at(a),v=at(l),S=yt(u),T=yt(h);ve(()=>{r&&(clearTimeout(p.current),y.current=null,m.current="")},[r]),ve(()=>{if(r&&m.current===""){var O;g.current=(O=d??i)!=null?O:-1}},[r,d,i]);const E=at(O=>{O?o.current.typing||(o.current.typing=O,v(O)):o.current.typing&&(o.current.typing=O,v(O))}),I=at(O=>{function _(N,$,H){const U=S.current?S.current($,H):$.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return U?N.indexOf(U):-1}const F=s.current;if(m.current.length>0&&m.current[0]!==" "&&(_(F,F,m.current)===-1?E(!1):O.key===" "&&gt(O)),F==null||T.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(gt(O),E(!0)),F.every(N=>{var $,H;return N?(($=N[0])==null?void 0:$.toLocaleLowerCase())!==((H=N[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===O.key&&(m.current="",g.current=y.current),m.current+=O.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=y.current,E(!1)},f);const P=g.current,D=_(F,[...F.slice((P||0)+1),...F.slice(0,(P||0)+1)],m.current);D!==-1?(b(D),y.current=D):O.key!==" "&&(m.current="",E(!1))}),A=C.useMemo(()=>({onKeyDown:I}),[I]),k=C.useMemo(()=>({onKeyDown:I,onKeyUp(O){O.key===" "&&E(!1)}}),[I,E]);return C.useMemo(()=>c?{reference:A,floating:k}:{},[c,A,k])}function bv(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,f]=t[a]||[0,0];c>=r!=f>=r&&n<=(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function dk(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function hk(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(f,h){const d=performance.now(),p=d-l;if(i===null||a===null||p===0)return i=f,a=h,l=d,null;const m=f-i,g=h-a,b=Math.sqrt(m*m+g*g)/p;return i=f,a=h,l=d,b}const u=f=>{let{x:h,y:d,placement:p,elements:m,onClose:g,nodeId:y,tree:b}=f;return function(S){function T(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||d==null)return;const{clientX:E,clientY:I}=S,A=[E,I],k=ln(S),O=S.type==="mouseleave",_=Ke(m.floating,k),F=Ke(m.domReference,k),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),D=p.split("-")[0],N=h>P.right-P.width/2,$=d>P.bottom-P.height/2,H=dk(A,L),U=P.width>L.width,M=P.height>L.height,R=(U?L:P).left,q=(U?L:P).right,ee=(M?L:P).top,Q=(M?L:P).bottom;if(_&&(s=!0,!O))return;if(F&&(s=!1),F&&!O){s=!0;return}if(O&&Fe(S.relatedTarget)&&Ke(m.floating,S.relatedTarget)||b&&mr(b.nodesRef.current,y).some(j=>{let{context:z}=j;return z==null?void 0:z.open}))return;if(D==="top"&&d>=L.bottom-1||D==="bottom"&&d<=L.top+1||D==="left"&&h>=L.right-1||D==="right"&&h<=L.left+1)return T();let G=[];switch(D){case"top":G=[[R,L.top+1],[R,P.bottom-1],[q,P.bottom-1],[q,L.top+1]];break;case"bottom":G=[[R,P.top+1],[R,L.bottom-1],[q,L.bottom-1],[q,P.top+1]];break;case"left":G=[[P.right-1,Q],[P.right-1,ee],[L.left+1,ee],[L.left+1,Q]];break;case"right":G=[[L.right-1,Q],[L.right-1,ee],[P.left+1,ee],[P.left+1,Q]];break}function V(j){let[z,B]=j;switch(D){case"top":{const Y=[U?z+t/2:N?z+t*4:z-t*4,B+t+1],te=[U?z-t/2:N?z+t*4:z-t*4,B+t+1],W=[[P.left,N||U?P.bottom-t:P.top],[P.right,N?U?P.bottom-t:P.top:P.bottom-t]];return[Y,te,...W]}case"bottom":{const Y=[U?z+t/2:N?z+t*4:z-t*4,B-t],te=[U?z-t/2:N?z+t*4:z-t*4,B-t],W=[[P.left,N||U?P.top+t:P.bottom],[P.right,N?U?P.top+t:P.bottom:P.top+t]];return[Y,te,...W]}case"left":{const Y=[z+t+1,M?B+t/2:$?B+t*4:B-t*4],te=[z+t+1,M?B-t/2:$?B+t*4:B-t*4];return[...[[$||M?P.right-t:P.left,P.top],[$?M?P.right-t:P.left:P.right-t,P.bottom]],Y,te]}case"right":{const Y=[z-t,M?B+t/2:$?B+t*4:B-t*4],te=[z-t,M?B-t/2:$?B+t*4:B-t*4],W=[[$||M?P.left+t:P.right,P.top],[$?M?P.left+t:P.right:P.left+t,P.bottom]];return[Y,te,...W]}}}if(!bv([E,I],G)){if(s&&!H)return T();if(!O&&r){const j=c(S.clientX,S.clientY);if(j!==null&&j<.1)return T()}bv([E,I],V([h,d]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const xo=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[ji(10),Qc({fallbackAxisSideDirection:"end"}),Xc(),Vy({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=yo({open:n,middleware:s,transform:!0,whileElementsMounted:$i,onOpenChange:(p,m)=>{var y;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(y=e.onChange)==null||y.call(e,p))}}),c=Ki(l),u=go(l),f=bo(l),{getReferenceProps:h,getFloatingProps:d}=vo([c,u,f]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(mo,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(vs,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...d(),children:[x.jsx(Uy,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},pk=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=yo({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=Ki(a),u=bo(a),f=go(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:d}=vo([c,u,f]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Lr,{...d(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:x.jsx(ft.span,{layoutId:o,children:e.trigger})}),x.jsx(Yr,{children:s?x.jsx(mo,{root:t,children:x.jsx(vs,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(ft.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},wv=300,mk=500,xv=(e="")=>Oe("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),lu=w.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Tv=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=Un(),c=l!==null,[u,f]=w.useState(!1),[h,d]=w.useState(!1),[p,m]=w.useState(null),g=w.useRef([]),y=w.useRef([]),b=w.useContext(lu),v=Gn(),S=BM(),T=Hy(),{floatingStyles:E,refs:I,context:A}=yo({nodeId:S,open:u,transform:!0,onOpenChange:f,whileElementsMounted:$i,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[ji({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Qc(),Xc()]}),k=bo(A,{role:"menu",enabled:!0}),O=go(A,{bubbles:!0}),_=Xy(A,{enabled:n,delay:{open:wv},handleClose:hk({blockPointerEvents:!0})}),F=Ki(A,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),L=yv(A,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:g,scrollItemIntoView:!0,onNavigate:m}),P=fk(A,{activeIndex:p,listRef:y,resetMs:mk,onMatch:u?m:void 0}),{getReferenceProps:D,getFloatingProps:N,getItemProps:$}=vo([_,F,k,O,L,P]);w.useEffect(()=>{if(!v)return;const U=()=>f(!1),M=R=>{R.nodeId!==S&&R.parentId===l&&f(!1)};return v.events.on("click",U),v.events.on("menuopen",M),()=>{v.events.off("click",U),v.events.off("menuopen",M)}},[v,S,l]),w.useEffect(()=>{u&&v&&v.events.emit("menuopen",{parentId:l,nodeId:S})},[v,u,S,l]);const H=r?i.className:Oe(xv(i.className));return x.jsxs(RM,{id:S,children:[x.jsx(w.Fragment,{children:i.asChild?x.jsx(to,{children:s,ref:Zc([I.setReference,T.ref,a]),tabIndex:c?b.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,...D(b.getItemProps({...i,onFocus(U){var M;(M=i.onFocus)==null||M.call(i,U),d(!1),b.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:Zc([I.setReference,T.ref,a]),tabIndex:c?b.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,...D(b.getItemProps({...i,onFocus(U){var M;(M=i.onFocus)==null||M.call(i,U),d(!1),b.setHasFocusInside(!0)}})),children:[s,c&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(ec,{size:14})]})]})}),x.jsx(lu.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:$,setHasFocusInside:d,isOpen:u},children:x.jsx(LM,{elementsRef:g,labelsRef:y,children:u&&x.jsx(mo,{preserveTabOrder:!0,children:x.jsx(vs,{context:A,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...N(),ref:I.setFloating,style:{...i.style,...E},className:Oe("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),gk=w.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=w.useContext(lu),a=Hy({label:r?null:typeof e=="string"?e:t}),l=Gn(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,ref:Zc([a.ref,s]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:xv(o.className),...i.getItemProps({onClick(u){var f;(f=o.onClick)==null||f.call(o,u),l==null||l.events.emit("click")},onFocus(u){var f;(f=o.onFocus)==null||f.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),yk=w.forwardRef((e,t)=>Un()!==null?x.jsx(Tv,{...e,isParent:!1,ref:t}):x.jsx(jM,{children:x.jsx(Tv,{...e,isParent:!0,ref:t})})),vk=(e,t)=>Ei()?t:window.matchMedia(e).matches,bk=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(vk(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},Gt="600ms",wk={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:Gt},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:Gt},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:Gt}},xk={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:Gt},exit:{translateX:["0%","30%"],opacity:0,animationDuration:Gt}},cu={drawer:e=>e==="left"?wk:xk,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:Gt,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:Gt,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:Gt,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:Gt},enter:{opacity:1,scale:[1.05,1],animationDuration:Gt},exit:{opacity:0,scale:.97,animationDuration:Gt}}},Tk=Er("isolate z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),Sk={top:0,left:0,right:0,bottom:-1},Ek=e=>e*.62,Ck=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,f=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+f))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=Ek(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(ft.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:Sk,whileDrag:{cursor:"grabbing"},className:Oe("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},uu={drawer:"right",sheet:"none",dialog:"none"},Pk=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=w.useId(),a=w.useId(),l=bk("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:uu[e]:r?uu[e]:uu.sheet,f=l||r?cu[e]:cu.sheet,h=typeof f=="function"?f(u):f,d=l||r?e:"sheet",{refs:p,context:m}=yo({open:s.open,onOpenChange:s.onChange}),g=Ki(m),y=bo(m),b=go(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:v,getFloatingProps:S}=vo([g,y,b]),T=s.trigger,E=lr(void 0),I=()=>s.onChange(!1);return x.jsxs(w.Fragment,{children:[s.trigger?x.jsx(w.Fragment,{children:s.asChild?x.jsx(to,{ref:p.setReference,...v({layoutId:s.layoutId}),children:T}):x.jsx(ft.button,{ref:p.setReference,...v(),layoutId:s.layoutId,type:"button",children:T})}):null,x.jsx(mo,{children:x.jsx(Yr,{presenceAffectsLayout:!0,children:s.open?x.jsx(JM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${d==="drawer"?"":"flex items-start justify-center p-10"}`,children:x.jsx(vs,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(ft.div,{exit:"exit",animate:"enter",initial:"initial",variants:h,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:Tk({position:u,type:d}),style:d==="drawer"?{width:E}:{height:E},...S(),children:[s.title?x.jsx("header",{className:"relative w-full",children:s.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:s.title}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s.children}),s.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:s.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:I,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(nc,{})})}):null,c&&t?x.jsx(Ck,{onChange:s.onChange,parent:p.floating,position:u,sheet:d==="sheet",value:E}):null]})})}):null})})]})},Ik=e=>x.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Sv=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:s,...i})=>{const[a,l]=w.useState(!1),c=w.useRef(null),u=o||"span",{refs:f,floatingStyles:h,context:d}=yo({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:$i,middleware:[ji(5),Qc({fallbackAxisSideDirection:"start"}),Xc(),Vy({element:c,padding:5})]}),p=Xy(d,{move:!0,enabled:r,delay:{open:wv}}),m=sk(d,{enabled:r}),g=go(d,{enabled:r}),y=bo(d,{role:"tooltip",enabled:r}),b=tk(d,{enabled:!!r&&!!t}),{getReferenceProps:v,getFloatingProps:S}=vo([p,m,g,y,b]);return x.jsxs(w.Fragment,{children:[x.jsx(u,{ref:f.setReference,...v(i),children:s}),x.jsx(mo,{children:a&&x.jsxs(Nr,{...S(),ref:f.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(Uy,{ref:c,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class Xi{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Xi.getDescendantProperty(a[l],s,r);else s&&Xi.getDescendantProperty(a,s,r)}else r.push(t);return r}}class To{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=To.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Xi.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=To.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=To.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return To.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const Ev=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:Oe("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[s,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(Sv,{as:"button",type:"button",title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(Om,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:x.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?x.jsxs(w.Fragment,{children:[x.jsx(Im,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(pP,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),Qi=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:f,labelClassName:h="",name:d,title:p,componentName:m,placeholder:g,hideLeft:y=!1,required:b})=>{const v=f??d,S=Tt(),T=e??S.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-component":m,"data-interactive":!!s,className:Oe("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:v,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[x.jsx(Ev,{info:a,hideLeft:y,reportStatus:!0,title:p,placeholder:g,children:T||n?x.jsxs(w.Fragment,{children:[b?null:x.jsx("span",{className:"text-opacity-70",children:T}),n?x.jsx(w.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-error:border-danger ${h}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),x.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})},Ak=e=>x.jsx(w.Fragment,{children:e.children}),Cv=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??Ak,a=r.label??r.value;return r.hidden?null:x.jsx("li",{...o,ref:s,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsxs("button",{type:"button","aria-busy":r.disabled,"aria-checked":t,"aria-current":t,"aria-selected":t,onClick:n,"data-value":r.value,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary-hover text-primary-foreground":""} ${e?"bg-primary text-primary-foreground":""}`,children:[x.jsx(i,{...o,label:r.label,value:r.value,children:a}),t?x.jsx("span",{children:x.jsx(dP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),Ok={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},Dk={caseSensitive:!1,sort:!1},Mk=[],kk=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:s,optionalText:i,container:a,hideLeft:l=!1,right:c,left:u,error:f,required:h=!1,...d},p)=>{const m=d.value??d.defaultValue??"",g=Tt(),[y,b]=w.useState(!1),[v,S]=w.useState(""),[T,E]=w.useState(m),[I,A]=w.useState(()=>{var B;return((B=e.find(Y=>Y.value===m))==null?void 0:B.label)??m}),[k,O]=w.useState(null),_=w.useRef(Mk),F=t&&v!==""?[{value:v,label:v,"data-dynamic":"true"},...e]:e,L=new To(F,["value","label"],Dk).search(v),P=t?void 0:`^(${e.map(B=>`${wc(B.value)}${B.label?"|"+wc(B.label):""}`).join("|")})$`;w.useEffect(()=>{if(d.value){const B=e.find(Y=>Y.value===d.value);E((B==null?void 0:B.label)??d.value)}},[d.value]);const{x:D,y:N,strategy:$,refs:H,context:U}=yo({open:y,transform:!0,strategy:"absolute",onOpenChange:b,whileElementsMounted:$i,middleware:[ji(4),IM({elementContext:"reference",padding:10,apply(B){const te=B.elements.reference.parentElement,W=te==null?void 0:te.getBoundingClientRect().width;Object.assign(B.elements.floating.style,{width:`${W}px`,maxWidth:`${W}px`,minWidth:"max-content",maxHeight:`${Math.min(250,B.availableHeight)}px`})}})]}),M=uk(U,Ok),{getReferenceProps:R,getFloatingProps:q,getItemProps:ee}=vo([bo(U,{role:"listbox"}),go(U),yv(U,{cols:0,listRef:_,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:B=>O(Y=>B??Y)})]);w.useEffect(()=>{const B=H.reference.current;if(B)return Us(B)},[]);const Q=(B,Y)=>{E(B.value);const te=H.reference.current;if(!te)return;te==null||te.setAttribute("data-value",B.value),te.value=B.value;const W=new Event("change",{bubbles:!1,cancelable:!0});te.dispatchEvent(W),d.onChange&&d.onChange(W),A(B.label??""),b(!1),S(""),O(Y)},G=B=>{var te;const Y=B.target.value;return S(Y),!y&&Y===""?b(!0):(B.target.name=d.name||"",Y?b(!0):(te=d.onChange)==null?void 0:te.call(d,B))},V=()=>{b(!0),S("")},j=()=>{var B;S(""),E(""),(B=H.reference.current)==null||B.setAttribute("data-value",""),A(""),bd(H.reference.current),b(!1)},z=d.id||d.name;return x.jsxs(Qi,{...d,left:u,error:f,form:d.form,name:d.name,feedback:n,hideLeft:l,required:h,title:d.title,container:a,rightLabel:s,interactive:o,id:d.name||d.id,optionalText:i,componentName:"autocomplete",labelClassName:r,placeholder:d.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[x.jsx(Pm,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),T?x.jsx("button",{type:"button",onClick:j,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{...R({...d,onChange:G,onFocus:V,pattern:P,ref:H.setReference,name:`${z}-shadow`,id:`${z}-shadow`,onClick:B=>B.currentTarget.focus(),onKeyDown(B){if(B.key==="Escape")return B.currentTarget.blur(),b(!1);if(B.key==="Enter"){if(k!==null&&L[k])return B.preventDefault(),Q(L[k],k);if(L.length===1)return B.preventDefault(),Q(L[0],0)}}}),"data-value":T,"data-error":!!f,"data-name":z,"data-target":z,required:h,value:y?v:I||T,"aria-autocomplete":"list",autoComplete:"off",className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",d.className)}),x.jsx("input",{id:z,name:z,type:"hidden","data-origin":z,ref:p,required:h,defaultValue:d.value||T||void 0}),x.jsx(mo,{preserveTabOrder:!0,children:y?x.jsx(vs,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("ul",{...q({ref:H.setFloating,style:{position:$,left:(D??0)+(T?26:16),top:N??0,...M.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[L.map((B,Y)=>{const te=T===B.value||T===B.label;return x.jsx(Cv,{...ee({onClick:()=>Q(B,Y),ref:W=>void(_.current[Y]=W),selected:k===Y}),option:B,active:te,selected:k===Y},`${B.value}-option`)}),L.length===0?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:g.autocompleteEmpty})}):null]})}):null})]})}),Pv=w.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>x.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[x.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:Oe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,x.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Iv=(e,t,n,r)=>w.forwardRef(({type:s="text",feedback:i=null,info:a,labelClassName:l,next:c,interactive:u,rightLabel:f,optionalText:h,container:d,hideLeft:p=!1,right:m,left:g,error:y,...b},v)=>{const S=e,T=b.id??b.name,E=w.useRef(null);return w.useEffect(()=>{if(E.current===null)return;const I=E.current,A=Us(E.current),k=r==null?void 0:r(I),O=_=>{const F=_;if(F.key==="Enter"&&I.enterKeyHint==="next"){const L=I.getAttribute("data-next");if(L){const P=document.getElementById(L);if(P)return P.focus(),void F.preventDefault()}}};return I.addEventListener("keydown",O),()=>{k==null||k(),A(),I.removeEventListener("keydown",O)}},[]),x.jsx(Qi,{...n,componentName:t,info:a,container:d,error:y,feedback:i,hideLeft:p,left:g,optionalText:h,right:m,rightLabel:f,interactive:u,form:b.form,id:b.name||b.id,name:b.name,labelClassName:l,title:b.title,placeholder:b.placeholder,required:b.required,children:x.jsx(S,{...n,...b,id:T,name:T,type:s,"data-next":c,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:Ka(v,E),className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary",b.className)})})}),bs=Iv(fg,"input",{type:"text"}),Av=new Date(1970,11,31),fu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Ov={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},Fk={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},du=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},Nk=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||Pg(),l=w.useId(),c=Tt(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[f,h]=w.useState(e||void 0),[d,p]=w.useState(!1),m=du(u,Av).flatMap(I=>vn.keyof(fu,I.type)?fu[I.type](I.value):[]),g=du(u,Av).reduce((I,A)=>I+(vn.keyof(Ov,A.type)?Ov[A.type](A.value):""),""),[y,b]=w.useState(f?du(u,f).reduce((I,A)=>I+(vn.keyof(fu,A.type)?Fk[A.type](f,A.value):""),""):""),v=I=>{const A=I.target.value;if(b(A),m.length===A.length&&m.every((O,_)=>{const F=A.charAt(_);return typeof O=="string"?F===O:O.test(F)})){const O=Qr(EA(A,g,new Date));return h(O),r==null?void 0:r(O)}return h(void 0),r==null?void 0:r(void 0)},S=I=>(h(I),r==null||r(I),b(I?CI(I,g):"")),T=_m(f),E=T?f.toISOString():void 0;return x.jsx(bs,{...s,mask:m,value:y,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!d,"data-target":s.name,"data-component":"date-picker",onChange:v,required:s.required??!0,error:d?void 0:s.error,placeholder:s.placeholder??g,right:x.jsxs(w.Fragment,{children:[x.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),x.jsx(xo,{open:d,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(fP,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(Lg,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?f:void 0})})]})})}),Lk=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],_k=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Vk=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],$k=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Dv=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Mv(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?$k:Vk:t.binary?_k:Lk,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=Dv(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=Dv(Number(e),t.locale,i),c=n[a];return s+l+r+c}var hu={exports:{}},Zi={exports:{}},Ie={};/** @license React v16.13.1
178
178
  * react-is.production.min.js
179
179
  *
180
180
  * Copyright (c) Facebook, Inc. and its affiliates.
181
181
  *
182
182
  * This source code is licensed under the MIT license found in the
183
183
  * LICENSE file in the root directory of this source tree.
184
- */var Dv;function Vk(){if(Dv)return Ie;Dv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case l:case c:case r:case s:case o:case f:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case d:case i:return T;default:return E}}case n:return E}}}function S(T){return v(T)===c}return Ie.AsyncMode=l,Ie.ConcurrentMode=c,Ie.ContextConsumer=a,Ie.ContextProvider=i,Ie.Element=t,Ie.ForwardRef=u,Ie.Fragment=r,Ie.Lazy=p,Ie.Memo=d,Ie.Portal=n,Ie.Profiler=s,Ie.StrictMode=o,Ie.Suspense=f,Ie.isAsyncMode=function(T){return S(T)||v(T)===l},Ie.isConcurrentMode=S,Ie.isContextConsumer=function(T){return v(T)===a},Ie.isContextProvider=function(T){return v(T)===i},Ie.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Ie.isForwardRef=function(T){return v(T)===u},Ie.isFragment=function(T){return v(T)===r},Ie.isLazy=function(T){return v(T)===p},Ie.isMemo=function(T){return v(T)===d},Ie.isPortal=function(T){return v(T)===n},Ie.isProfiler=function(T){return v(T)===s},Ie.isStrictMode=function(T){return v(T)===o},Ie.isSuspense=function(T){return v(T)===f},Ie.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===s||T===o||T===f||T===h||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===d||T.$$typeof===i||T.$$typeof===a||T.$$typeof===u||T.$$typeof===g||T.$$typeof===y||T.$$typeof===b||T.$$typeof===m)},Ie.typeOf=v,Ie}var Ae={};/** @license React v16.13.1
184
+ */var kv;function Bk(){if(kv)return Ie;kv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case l:case c:case r:case s:case o:case f:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case d:case i:return T;default:return E}}case n:return E}}}function S(T){return v(T)===c}return Ie.AsyncMode=l,Ie.ConcurrentMode=c,Ie.ContextConsumer=a,Ie.ContextProvider=i,Ie.Element=t,Ie.ForwardRef=u,Ie.Fragment=r,Ie.Lazy=p,Ie.Memo=d,Ie.Portal=n,Ie.Profiler=s,Ie.StrictMode=o,Ie.Suspense=f,Ie.isAsyncMode=function(T){return S(T)||v(T)===l},Ie.isConcurrentMode=S,Ie.isContextConsumer=function(T){return v(T)===a},Ie.isContextProvider=function(T){return v(T)===i},Ie.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Ie.isForwardRef=function(T){return v(T)===u},Ie.isFragment=function(T){return v(T)===r},Ie.isLazy=function(T){return v(T)===p},Ie.isMemo=function(T){return v(T)===d},Ie.isPortal=function(T){return v(T)===n},Ie.isProfiler=function(T){return v(T)===s},Ie.isStrictMode=function(T){return v(T)===o},Ie.isSuspense=function(T){return v(T)===f},Ie.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===s||T===o||T===f||T===h||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===d||T.$$typeof===i||T.$$typeof===a||T.$$typeof===u||T.$$typeof===g||T.$$typeof===y||T.$$typeof===b||T.$$typeof===m)},Ie.typeOf=v,Ie}var Ae={};/** @license React v16.13.1
185
185
  * react-is.development.js
186
186
  *
187
187
  * Copyright (c) Facebook, Inc. and its affiliates.
188
188
  *
189
189
  * This source code is licensed under the MIT license found in the
190
190
  * LICENSE file in the root directory of this source tree.
191
- */var Mv;function $k(){return Mv||(Mv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===s||H===o||H===f||H===h||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===d||H.$$typeof===i||H.$$typeof===a||H.$$typeof===u||H.$$typeof===g||H.$$typeof===y||H.$$typeof===b||H.$$typeof===m)}function S(H){if(typeof H=="object"&&H!==null){var Pe=H.$$typeof;switch(Pe){case t:var Xe=H.type;switch(Xe){case l:case c:case r:case s:case o:case f:return Xe;default:var _e=Xe&&Xe.$$typeof;switch(_e){case a:case u:case p:case d:case i:return _e;default:return Pe}}case n:return Pe}}}var T=l,E=c,I=a,A=i,k=t,O=u,_=r,F=p,L=d,P=n,D=s,N=o,$=f,W=!1;function U(H){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(H)||S(H)===l}function M(H){return S(H)===c}function R(H){return S(H)===a}function q(H){return S(H)===i}function ee(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function Q(H){return S(H)===u}function G(H){return S(H)===r}function V(H){return S(H)===p}function j(H){return S(H)===d}function z(H){return S(H)===n}function B(H){return S(H)===s}function Y(H){return S(H)===o}function te(H){return S(H)===f}Ae.AsyncMode=T,Ae.ConcurrentMode=E,Ae.ContextConsumer=I,Ae.ContextProvider=A,Ae.Element=k,Ae.ForwardRef=O,Ae.Fragment=_,Ae.Lazy=F,Ae.Memo=L,Ae.Portal=P,Ae.Profiler=D,Ae.StrictMode=N,Ae.Suspense=$,Ae.isAsyncMode=U,Ae.isConcurrentMode=M,Ae.isContextConsumer=R,Ae.isContextProvider=q,Ae.isElement=ee,Ae.isForwardRef=Q,Ae.isFragment=G,Ae.isLazy=V,Ae.isMemo=j,Ae.isPortal=z,Ae.isProfiler=B,Ae.isStrictMode=Y,Ae.isSuspense=te,Ae.isValidElementType=v,Ae.typeOf=S}()),Ae}var kv;function Fv(){return kv||(kv=1,process.env.NODE_ENV==="production"?qi.exports=Vk():qi.exports=$k()),qi.exports}/*
191
+ */var Fv;function Rk(){return Fv||(Fv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(W){return typeof W=="string"||typeof W=="function"||W===r||W===c||W===s||W===o||W===f||W===h||typeof W=="object"&&W!==null&&(W.$$typeof===p||W.$$typeof===d||W.$$typeof===i||W.$$typeof===a||W.$$typeof===u||W.$$typeof===g||W.$$typeof===y||W.$$typeof===b||W.$$typeof===m)}function S(W){if(typeof W=="object"&&W!==null){var Pe=W.$$typeof;switch(Pe){case t:var Xe=W.type;switch(Xe){case l:case c:case r:case s:case o:case f:return Xe;default:var _e=Xe&&Xe.$$typeof;switch(_e){case a:case u:case p:case d:case i:return _e;default:return Pe}}case n:return Pe}}}var T=l,E=c,I=a,A=i,k=t,O=u,_=r,F=p,L=d,P=n,D=s,N=o,$=f,H=!1;function U(W){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(W)||S(W)===l}function M(W){return S(W)===c}function R(W){return S(W)===a}function q(W){return S(W)===i}function ee(W){return typeof W=="object"&&W!==null&&W.$$typeof===t}function Q(W){return S(W)===u}function G(W){return S(W)===r}function V(W){return S(W)===p}function j(W){return S(W)===d}function z(W){return S(W)===n}function B(W){return S(W)===s}function Y(W){return S(W)===o}function te(W){return S(W)===f}Ae.AsyncMode=T,Ae.ConcurrentMode=E,Ae.ContextConsumer=I,Ae.ContextProvider=A,Ae.Element=k,Ae.ForwardRef=O,Ae.Fragment=_,Ae.Lazy=F,Ae.Memo=L,Ae.Portal=P,Ae.Profiler=D,Ae.StrictMode=N,Ae.Suspense=$,Ae.isAsyncMode=U,Ae.isConcurrentMode=M,Ae.isContextConsumer=R,Ae.isContextProvider=q,Ae.isElement=ee,Ae.isForwardRef=Q,Ae.isFragment=G,Ae.isLazy=V,Ae.isMemo=j,Ae.isPortal=z,Ae.isProfiler=B,Ae.isStrictMode=Y,Ae.isSuspense=te,Ae.isValidElementType=v,Ae.typeOf=S}()),Ae}var Nv;function Lv(){return Nv||(Nv=1,process.env.NODE_ENV==="production"?Zi.exports=Bk():Zi.exports=Rk()),Zi.exports}/*
192
192
  object-assign
193
193
  (c) Sindre Sorhus
194
194
  @license MIT
195
- */var hu,Nv;function Bk(){if(Nv)return hu;Nv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return hu=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},hu}var pu,Lv;function mu(){if(Lv)return pu;Lv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return pu=e,pu}var gu,_v;function Vv(){return _v||(_v=1,gu=Function.call.bind(Object.prototype.hasOwnProperty)),gu}var yu,$v;function Rk(){if($v)return yu;$v=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=mu(),n={},r=Vv();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var f;try{if(typeof s[u]!="function"){var h=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=s[u](i,u,l,a,null,t)}catch(p){f=p}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=c?c():"";e("Failed "+a+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},yu=o,yu}var vu,Bv;function jk(){if(Bv)return vu;Bv=1;var e=Fv(),t=Bk(),n=mu(),r=Vv(),o=Rk(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return vu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(M){var R=M&&(c&&M[c]||M[u]);if(typeof R=="function")return R}var h="<<anonymous>>",d={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:v,element:S(),elementType:T(),instanceOf:E,node:O(),objectOf:A,oneOf:I,oneOfType:k,shape:F,exact:L};function p(M,R){return M===R?M!==0||1/M===1/R:M!==M&&R!==R}function m(M,R){this.message=M,this.data=R&&typeof R=="object"?R:{},this.stack=""}m.prototype=Error.prototype;function g(M){if(process.env.NODE_ENV!=="production")var R={},q=0;function ee(G,V,j,z,B,Y,te){if(z=z||h,Y=Y||j,te!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=z+":"+j;!R[Pe]&&q<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[Pe]=!0,q++)}}return V[j]==null?G?V[j]===null?new m("The "+B+" `"+Y+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+B+" `"+Y+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:M(V,j,z,B,Y)}var Q=ee.bind(null,!1);return Q.isRequired=ee.bind(null,!0),Q}function y(M){function R(q,ee,Q,G,V,j){var z=q[ee],B=N(z);if(B!==M){var Y=$(z);return new m("Invalid "+G+" `"+V+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return g(R)}function b(){return g(i)}function v(M){function R(q,ee,Q,G,V){if(typeof M!="function")return new m("Property `"+V+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var j=q[ee];if(!Array.isArray(j)){var z=N(j);return new m("Invalid "+G+" `"+V+"` of type "+("`"+z+"` supplied to `"+Q+"`, expected an array."))}for(var B=0;B<j.length;B++){var Y=M(j,B,Q,G,V+"["+B+"]",n);if(Y instanceof Error)return Y}return null}return g(R)}function S(){function M(R,q,ee,Q,G){var V=R[q];if(!a(V)){var j=N(V);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return g(M)}function T(){function M(R,q,ee,Q,G){var V=R[q];if(!e.isValidElementType(V)){var j=N(V);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return g(M)}function E(M){function R(q,ee,Q,G,V){if(!(q[ee]instanceof M)){var j=M.name||h,z=U(q[ee]);return new m("Invalid "+G+" `"+V+"` of type "+("`"+z+"` supplied to `"+Q+"`, expected ")+("instance of `"+j+"`."))}return null}return g(R)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function R(q,ee,Q,G,V){for(var j=q[ee],z=0;z<M.length;z++)if(p(j,M[z]))return null;var B=JSON.stringify(M,function(te,H){var Pe=$(H);return Pe==="symbol"?String(H):H});return new m("Invalid "+G+" `"+V+"` of value `"+String(j)+"` "+("supplied to `"+Q+"`, expected one of "+B+"."))}return g(R)}function A(M){function R(q,ee,Q,G,V){if(typeof M!="function")return new m("Property `"+V+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var j=q[ee],z=N(j);if(z!=="object")return new m("Invalid "+G+" `"+V+"` of type "+("`"+z+"` supplied to `"+Q+"`, expected an object."));for(var B in j)if(r(j,B)){var Y=M(j,B,Q,G,V+"."+B,n);if(Y instanceof Error)return Y}return null}return g(R)}function k(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var R=0;R<M.length;R++){var q=M[R];if(typeof q!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(q)+" at index "+R+"."),i}function ee(Q,G,V,j,z){for(var B=[],Y=0;Y<M.length;Y++){var te=M[Y],H=te(Q,G,V,j,z,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&B.push(H.data.expectedType)}var Pe=B.length>0?", expected one of type ["+B.join(", ")+"]":"";return new m("Invalid "+j+" `"+z+"` supplied to "+("`"+V+"`"+Pe+"."))}return g(ee)}function O(){function M(R,q,ee,Q,G){return P(R[q])?null:new m("Invalid "+Q+" `"+G+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return g(M)}function _(M,R,q,ee,Q){return new m((M||"React class")+": "+R+" type `"+q+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function F(M){function R(q,ee,Q,G,V){var j=q[ee],z=N(j);if(z!=="object")return new m("Invalid "+G+" `"+V+"` of type `"+z+"` "+("supplied to `"+Q+"`, expected `object`."));for(var B in M){var Y=M[B];if(typeof Y!="function")return _(Q,G,V,B,$(Y));var te=Y(j,B,Q,G,V+"."+B,n);if(te)return te}return null}return g(R)}function L(M){function R(q,ee,Q,G,V){var j=q[ee],z=N(j);if(z!=="object")return new m("Invalid "+G+" `"+V+"` of type `"+z+"` "+("supplied to `"+Q+"`, expected `object`."));var B=t({},q[ee],M);for(var Y in B){var te=M[Y];if(r(M,Y)&&typeof te!="function")return _(Q,G,V,Y,$(te));if(!te)return new m("Invalid "+G+" `"+V+"` key `"+Y+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(q[ee],null," ")+`
196
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var H=te(j,Y,Q,G,V+"."+Y,n);if(H)return H}return null}return g(R)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||a(M))return!0;var R=f(M);if(R){var q=R.call(M),ee;if(R!==M.entries){for(;!(ee=q.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=q.next()).done;){var Q=ee.value;if(Q&&!P(Q[1]))return!1}}else return!1;return!0;default:return!1}}function D(M,R){return M==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function N(M){var R=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":D(R,M)?"symbol":R}function $(M){if(typeof M>"u"||M===null)return""+M;var R=N(M);if(R==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return R}function W(M){var R=$(M);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function U(M){return!M.constructor||!M.constructor.name?h:M.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},vu}var bu,Rv;function Wk(){if(Rv)return bu;Rv=1;var e=mu();function t(){}function n(){}return n.resetWarningCache=t,bu=function(){function r(i,a,l,c,u,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},bu}if(process.env.NODE_ENV!=="production"){var Hk=Fv(),zk=!0;du.exports=jk()(Hk.isElement,zk)}else du.exports=Wk()();var Uk=du.exports;const Ne=M0(Uk);function To(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(f){i(f)}}function l(u){try{c(r.throw(u))}catch(f){i(f)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function So(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function jv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Wv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Gk=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function bs(e,t){var n=Yk(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Yk(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=Gk.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var Kk=[".DS_Store","Thumbs.db"];function qk(e){return To(this,void 0,void 0,function(){return So(this,function(t){return Xi(e)&&Xk(e.dataTransfer)?[2,eF(e.dataTransfer,e.type)]:Qk(e)?[2,Zk(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Jk(e)]:[2,[]]})})}function Xk(e){return Xi(e)}function Qk(e){return Xi(e)&&Xi(e.target)}function Xi(e){return typeof e=="object"&&e!==null}function Zk(e){return wu(e.target.files).map(function(t){return bs(t)})}function Jk(e){return To(this,void 0,void 0,function(){var t;return So(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return bs(r)})]}})})}function eF(e,t){return To(this,void 0,void 0,function(){var n,r;return So(this,function(o){switch(o.label){case 0:return e.items?(n=wu(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(tF))]):[3,2];case 1:return r=o.sent(),[2,Hv(zv(r))];case 2:return[2,Hv(wu(e.files).map(function(s){return bs(s)}))]}})})}function Hv(e){return e.filter(function(t){return Kk.indexOf(t.name)===-1})}function wu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function tF(e){if(typeof e.webkitGetAsEntry!="function")return Uv(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Gv(t):Uv(e)}function zv(e){return e.reduce(function(t,n){return Wv(Wv([],jv(t),!1),jv(Array.isArray(n)?zv(n):[n]),!1)},[])}function Uv(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=bs(t);return Promise.resolve(n)}function nF(e){return To(this,void 0,void 0,function(){return So(this,function(t){return[2,e.isDirectory?Gv(e):rF(e)]})})}function Gv(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return To(i,void 0,void 0,function(){var l,c,u;return So(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(nF)),o.push(u),s(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function rF(e){return To(this,void 0,void 0,function(){return So(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=bs(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var oF=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function Yv(e){return aF(e)||iF(e)||Qv(e)||sF()}function sF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
197
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aF(e){if(Array.isArray(e))return xu(e)}function Kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kv(Object(n),!0).forEach(function(r){Xv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ws(e,t){return uF(e)||cF(e,t)||Qv(e,t)||lF()}function lF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
198
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qv(e,t){if(e){if(typeof e=="string")return xu(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 xu(e,t)}}function xu(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 cF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function uF(e){if(Array.isArray(e))return e}var fF="file-invalid-type",dF="file-too-large",hF="file-too-small",pF="too-many-files",mF=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:fF,message:"File type must be ".concat(n)}},Zv=function(t){return{code:dF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Jv=function(t){return{code:hF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},gF={code:pF,message:"Too many files"};function eb(e,t){var n=e.type==="application/x-moz-file"||oF(e,t);return[n,n?null:mF(t)]}function tb(e,t,n){if(gr(e.size))if(gr(t)&&gr(n)){if(e.size>n)return[!1,Zv(n)];if(e.size<t)return[!1,Jv(t)]}else{if(gr(t)&&e.size<t)return[!1,Jv(t)];if(gr(n)&&e.size>n)return[!1,Zv(n)]}return[!0,null]}function gr(e){return e!=null}function yF(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=eb(l,n),u=ws(c,1),f=u[0],h=tb(l,r,o),d=ws(h,1),p=d[0],m=a?a(l):null;return f&&p&&!m})}function Qi(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Zi(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 nb(e){e.preventDefault()}function vF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function bF(e){return e.indexOf("Edge/")!==-1}function wF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return vF(e)||bF(e)}function cn(){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,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!Qi(r)&&a&&a.apply(void 0,[r].concat(s)),Qi(r)})}}function xF(){return"showOpenFilePicker"in window}function TF(e){if(gr(e)){var t=Object.entries(e).filter(function(n){var r=ws(n,2),o=r[0],s=r[1],i=!0;return rb(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.')),i=!1),(!Array.isArray(s)||!s.every(ob))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=ws(r,2),s=o[0],i=o[1];return qv(qv({},n),{},Xv({},s,i))},{});return[{description:"Files",accept:t}]}return e}function SF(e){if(gr(e))return Object.entries(e).reduce(function(t,n){var r=ws(n,2),o=r[0],s=r[1];return[].concat(Yv(t),[o],Yv(s))},[]).filter(function(t){return rb(t)||ob(t)}).join(",")}function EF(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function CF(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function rb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function ob(e){return/^.*\.[\w]+$/.test(e)}var PF=["children"],IF=["open"],AF=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],OF=["refKey","onChange","onClick"];function DF(e){return FF(e)||kF(e)||sb(e)||MF()}function MF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
199
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FF(e){if(Array.isArray(e))return Su(e)}function Tu(e,t){return _F(e)||LF(e,t)||sb(e,t)||NF()}function NF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sb(e,t){if(e){if(typeof e=="string")return Su(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 Su(e,t)}}function Su(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 LF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function _F(e){if(Array.isArray(e))return e}function ib(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 ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ib(Object(n),!0).forEach(function(r){Eu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ib(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ji(e,t){if(e==null)return{};var n=VF(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VF(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Cu=w.forwardRef(function(e,t){var n=e.children,r=Ji(e,PF),o=lb(r),s=o.open,i=Ji(o,IF);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(ze(ze({},i),{},{open:s})))});Cu.displayName="Dropzone";var ab={disabled:!1,getFilesFromEvent:qk,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Cu.defaultProps=ab,Cu.propTypes={children:Ne.func,accept:Ne.objectOf(Ne.arrayOf(Ne.string)),multiple:Ne.bool,preventDropOnDocument:Ne.bool,noClick:Ne.bool,noKeyboard:Ne.bool,noDrag:Ne.bool,noDragEventsBubbling:Ne.bool,minSize:Ne.number,maxSize:Ne.number,maxFiles:Ne.number,disabled:Ne.bool,getFilesFromEvent:Ne.func,onFileDialogCancel:Ne.func,onFileDialogOpen:Ne.func,useFsAccessApi:Ne.bool,autoFocus:Ne.bool,onDragEnter:Ne.func,onDragLeave:Ne.func,onDragOver:Ne.func,onDrop:Ne.func,onDropAccepted:Ne.func,onDropRejected:Ne.func,onError:Ne.func,validator:Ne.func};var Pu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function lb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ze(ze({},ab),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,h=t.onDrop,d=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,v=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,I=t.noDragEventsBubbling,A=t.onError,k=t.validator,O=w.useMemo(function(){return SF(n)},[n]),_=w.useMemo(function(){return TF(n)},[n]),F=w.useMemo(function(){return typeof g=="function"?g:cb},[g]),L=w.useMemo(function(){return typeof m=="function"?m:cb},[m]),P=w.useRef(null),D=w.useRef(null),N=w.useReducer($F,Pu),$=Tu(N,2),W=$[0],U=$[1],M=W.isFocused,R=W.isFileDialogActive,q=w.useRef(typeof window<"u"&&window.isSecureContext&&y&&xF()),ee=function(){!q.current&&R&&setTimeout(function(){if(D.current){var oe=D.current.files;oe.length||(U({type:"closeDialog"}),L())}},300)};w.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[D,R,L,q]);var Q=w.useRef([]),G=function(oe){P.current&&P.current.contains(oe.target)||(oe.preventDefault(),Q.current=[])};w.useEffect(function(){return v&&(document.addEventListener("dragover",nb,!1),document.addEventListener("drop",G,!1)),function(){v&&(document.removeEventListener("dragover",nb),document.removeEventListener("drop",G))}},[P,v]),w.useEffect(function(){return!r&&b&&P.current&&P.current.focus(),function(){}},[P,b,r]);var V=w.useCallback(function(J){A?A(J):console.error(J)},[A]),j=w.useCallback(function(J){J.preventDefault(),J.persist(),be(J),Q.current=[].concat(DF(Q.current),[J.target]),Zi(J)&&Promise.resolve(o(J)).then(function(oe){if(!(Qi(J)&&!I)){var xe=oe.length,We=xe>0&&yF({files:oe,accept:O,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:k}),vt=xe>0&&!We;U({isDragAccept:We,isDragReject:vt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(J)}}).catch(function(oe){return V(oe)})},[o,c,V,I,O,i,s,a,l,k]),z=w.useCallback(function(J){J.preventDefault(),J.persist(),be(J);var oe=Zi(J);if(oe&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(J),!1},[f,I]),B=w.useCallback(function(J){J.preventDefault(),J.persist(),be(J);var oe=Q.current.filter(function(We){return P.current&&P.current.contains(We)}),xe=oe.indexOf(J.target);xe!==-1&&oe.splice(xe,1),Q.current=oe,!(oe.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Zi(J)&&u&&u(J))},[P,u,I]),Y=w.useCallback(function(J,oe){var xe=[],We=[];J.forEach(function(vt){var Pt=eb(vt,O),Ot=Tu(Pt,2),Tr=Ot[0],ko=Ot[1],Fo=tb(vt,i,s),ya=Tu(Fo,2),gf=ya[0],yf=ya[1],vf=k?k(vt):null;if(Tr&&gf&&!vf)xe.push(vt);else{var bf=[ko,yf];vf&&(bf=bf.concat(vf)),We.push({file:vt,errors:bf.filter(function(m2){return m2})})}}),(!a&&xe.length>1||a&&l>=1&&xe.length>l)&&(xe.forEach(function(vt){We.push({file:vt,errors:[gF]})}),xe.splice(0)),U({acceptedFiles:xe,fileRejections:We,type:"setFiles"}),h&&h(xe,We,oe),We.length>0&&p&&p(We,oe),xe.length>0&&d&&d(xe,oe)},[U,a,O,i,s,l,h,d,p,k]),te=w.useCallback(function(J){J.preventDefault(),J.persist(),be(J),Q.current=[],Zi(J)&&Promise.resolve(o(J)).then(function(oe){Qi(J)&&!I||Y(oe,J)}).catch(function(oe){return V(oe)}),U({type:"reset"})},[o,Y,V,I]),H=w.useCallback(function(){if(q.current){U({type:"openDialog"}),F();var J={multiple:a,types:_};window.showOpenFilePicker(J).then(function(oe){return o(oe)}).then(function(oe){Y(oe,null),U({type:"closeDialog"})}).catch(function(oe){EF(oe)?(L(oe),U({type:"closeDialog"})):CF(oe)?(q.current=!1,D.current?(D.current.value=null,D.current.click()):V(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."))):V(oe)});return}D.current&&(U({type:"openDialog"}),F(),D.current.value=null,D.current.click())},[U,F,L,y,Y,V,_,a]),Pe=w.useCallback(function(J){!P.current||!P.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),H())},[P,H]),Xe=w.useCallback(function(){U({type:"focus"})},[]),_e=w.useCallback(function(){U({type:"blur"})},[]),Qe=w.useCallback(function(){S||(wF()?setTimeout(H,0):H())},[S,H]),ae=function(oe){return r?null:oe},ge=function(oe){return T?null:ae(oe)},se=function(oe){return E?null:ae(oe)},be=function(oe){I&&oe.stopPropagation()},ot=w.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=J.refKey,xe=oe===void 0?"ref":oe,We=J.role,vt=J.onKeyDown,Pt=J.onFocus,Ot=J.onBlur,Tr=J.onClick,ko=J.onDragEnter,Fo=J.onDragOver,ya=J.onDragLeave,gf=J.onDrop,yf=Ji(J,AF);return ze(ze(Eu({onKeyDown:ge(cn(vt,Pe)),onFocus:ge(cn(Pt,Xe)),onBlur:ge(cn(Ot,_e)),onClick:ae(cn(Tr,Qe)),onDragEnter:se(cn(ko,j)),onDragOver:se(cn(Fo,z)),onDragLeave:se(cn(ya,B)),onDrop:se(cn(gf,te)),role:typeof We=="string"&&We!==""?We:"presentation"},xe,P),!r&&!T?{tabIndex:0}:{}),yf)}},[P,Pe,Xe,_e,Qe,j,z,B,te,T,E,r]),we=w.useCallback(function(J){J.stopPropagation()},[]),st=w.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=J.refKey,xe=oe===void 0?"ref":oe,We=J.onChange,vt=J.onClick,Pt=Ji(J,OF),Ot=Eu({accept:O,multiple:a,type:"file",style:{display:"none"},onChange:ae(cn(We,te)),onClick:ae(cn(vt,we)),tabIndex:-1},xe,D);return ze(ze({},Ot),Pt)}},[D,n,a,te,r]);return ze(ze({},W),{},{isFocused:M&&!r,getRootProps:ot,getInputProps:st,rootRef:P,inputRef:D,open:ae(H)})}function $F(e,t){switch(t.type){case"focus":return ze(ze({},e),{},{isFocused:!0});case"blur":return ze(ze({},e),{},{isFocused:!1});case"openDialog":return ze(ze({},Pu),{},{isFileDialogActive:!0});case"closeDialog":return ze(ze({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ze(ze({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ze(ze({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ze({},Pu);default:return e}}function cb(){}const BF={isImage:e=>e.type.includes("image")},RF=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(BF.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Ov(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Ov(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Nr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Yr,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(Im,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Nr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Yr,{className:"text-danger"})})]})},jF=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(RF,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),WF=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(jF,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),HF=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(bP,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),zF=({idle:e=HF,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=f=>{n==null||n(f),s(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=lb({onDrop:i});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(WF,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},UF=["INPUT","SELECT"],Iu=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{UF.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},GF=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},YF=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:Oe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),yr=w.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:f,left:h,error:d,...p},m)=>{const g=Tt(),y=w.useRef(null),b=p.id??p.name;w.useImperativeHandle(m,()=>y.current),w.useEffect(()=>{if(y.current===null)return;const S=y.current,T=zs(y.current),E=()=>S.setAttribute("data-selected","true");return S.addEventListener("change",E),()=>{T(),S.removeEventListener("change",E)}},[]);const v=()=>{var S;return(S=y.current)==null?void 0:S.focus()};return x.jsx(Ki,{info:n,left:h,error:d,form:p.form,name:p.name,feedback:o,hideLeft:u,required:e,title:p.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:p.name||p.id,optionalText:l,labelClassName:s,placeholder:p.placeholder,right:x.jsx("label",{htmlFor:b,children:x.jsxs("button",{onClick:v,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Cm,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:b,name:b,value:p.value,required:e,ref:Ua(m,y),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:Oe("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(S=>x.jsx("option",{...S,children:S.label??S.value},`${b}-select-option-${S.value}`))]})})}),Au=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},KF=w.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=w.useId(),[i,a]=w.useState(r.checked??!1),l=i,c=w.useRef(null),u=Au(r.onChange);w.useImperativeHandle(o,()=>c.current),w.useEffect(()=>{if(c.current!==null&&u.current){const h=d=>{d.target.checked=!d.target.checked,u.current&&u.current(d)};return c.current.addEventListener("change",h),()=>{var d;return(d=c.current)==null?void 0:d.removeEventListener("change",h)}}},[]);const f=()=>{var d,p;const h=!((d=c.current)!=null&&d.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),c.current!==null&&(c.current.checked=h,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:Oe("flex flex-wrap items-center",t),"data-component":"switch",children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:h=>a(h.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),qF=e=>{const[t,n]=ZC();return w.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:rP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},XF=Cv("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
201
- `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),ea=0,Yn=1,Eo=2,ub=4;function xs(e,t){return n=>e(t(n))}function QF(e,t){return t(e)}function fb(e,t){return n=>e(t,n)}function db(e,t){return()=>e(t)}function ta(e,t){return t(e),e}function Re(...e){return e}function ZF(e){e()}function hb(e){return()=>e}function JF(...e){return()=>{e.map(ZF)}}function Ou(e){return e!==void 0}function vr(){}function Me(e,t){return e(Yn,t)}function de(e,t){e(ea,t)}function Du(e){e(Eo)}function Et(e){return e(ub)}function ie(e,t){return Me(e,fb(t,ea))}function un(e,t){const n=e(Yn,r=>{n(),t(r)});return n}function ye(){const e=[];return(t,n)=>{switch(t){case Eo:e.splice(0,e.length);return;case Yn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ea:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Z(e){let t=e;const n=ye();return(r,o)=>{switch(r){case Yn:o(t);break;case ea:t=o;break;case ub:return t}return n(r,o)}}function eN(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case Yn:return s?n===s?void 0:(r(),n=s,t=Me(e,s),t):(r(),vr);case Eo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function $t(e){return ta(ye(),t=>ie(e,t))}function Ct(e,t){return ta(Z(t),n=>ie(e,n))}function tN(...e){return t=>e.reduceRight(QF,t)}function K(e,...t){const n=tN(...t);return(r,o)=>{switch(r){case Yn:return Me(e,n(o));case Eo:Du(e);return}}}function pb(e,t){return e===t}function je(e=pb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ce(e){return t=>n=>{e(n)&&t(n)}}function re(e){return t=>xs(t,e)}function fn(e){return t=>()=>t(e)}function dn(e,t){return n=>r=>n(t=e(t,r))}function Co(e){return t=>n=>{e>0?e--:t(n)}}function Kn(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function mb(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function he(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Me(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function gb(...e){return function(t,n){switch(t){case Yn:return JF(...e.map(r=>Me(r,n)));case Eo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ue(e,t=pb){return K(e,je(t))}function ht(...e){const t=ye(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Me(s,l=>{n[i]=l,r=r|a,r===o&&de(t,n)})}),function(s,i){switch(s){case Yn:return r===o&&i(n),Me(t,i);case Eo:return Du(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ce(e,t=[],{singleton:n}={singleton:!0}){return{id:nN(),constructor:e,dependencies:t,singleton:n}}const nN=()=>Symbol();function rN(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function oN(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const na=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Mu(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=w.createContext({});function l(y,b){y.propsReady&&de(y.propsReady,!1);for(const v of r){const S=y[t.required[v]];de(S,b[v])}for(const v of o)if(v in b){const S=y[t.optional[v]];de(S,b[v])}y.propsReady&&de(y.propsReady,!0)}function c(y){return s.reduce((b,v)=>(b[v]=S=>{const T=y[t.methods[v]];de(T,S)},b),{})}function u(y){return i.reduce((b,v)=>(b[v]=eN(y[t.events[v]]),b),{})}const f=w.forwardRef((y,b)=>{const{children:v,...S}=y,[T]=w.useState(()=>ta(rN(e),I=>l(I,S))),[E]=w.useState(db(u,T));return na(()=>{for(const I of i)I in S&&Me(E[I],S[I]);return()=>{Object.values(E).map(Du)}},[S,E,T]),na(()=>{l(T,S)}),w.useImperativeHandle(b,hb(c(T))),w.createElement(a.Provider,{value:T},n?w.createElement(n,oN([...r,...o,...i],S),v):v)}),h=y=>w.useCallback(fb(de,w.useContext(a)[y]),[y]),d=y=>{const v=w.useContext(a)[y],S=w.useCallback(T=>Me(v,T),[v]);return w.useSyncExternalStore(S,()=>Et(v),()=>Et(v))},p=y=>{const v=w.useContext(a)[y],[S,T]=w.useState(db(Et,v));return na(()=>Me(v,E=>{E!==S&&T(hb(E))}),[v,S]),S},m=w.version.startsWith("18")?d:p;return{Component:f,usePublisher:h,useEmitterValue:m,useEmitter:(y,b)=>{const S=w.useContext(a)[y];na(()=>Me(S,b),[b,S])}}}const sN=typeof document<"u"?w.useLayoutEffect:w.useEffect;var Bt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Bt||{});const iN={0:"debug",1:"log",2:"warn",3:"error"},aN=()=>typeof globalThis>"u"?window:globalThis,qn=Ce(()=>{const e=Z(3);return{log:Z((n,r,o=1)=>{var s;const i=(s=aN().VIRTUOSO_LOG_LEVEL)!=null?s:Et(e);o>=i&&console[iN[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function ku(e,t=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function hn(e,t=!0){return ku(e,t).callbackRef}function yb(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=lN(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",h=i?i.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,d=i?i.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:d,viewportHeight:p}),s==null||s(cN("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return ku(a,n)}function lN(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Bt.ERROR),u===c)continue;const f=s[s.length-1];s.length===0||f.size!==u||f.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function cN(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Bt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Gt(e,t){return Math.round(e.getBoundingClientRect()[t])}function vb(e,t){return Math.abs(e-t)<1.01}function bb(e,t,n,r=vr,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(f=>{const h=f.target,d=h===window||h===document,p=d?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=d?document.documentElement.scrollHeight:h.scrollHeight,g=d?window.innerHeight:h.offsetHeight,y=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};f.suppressFlushSync?y():va.flushSync(y),i.current!==null&&(p===i.current||p<=0||p===m-g)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const f=o||s.current;return r(o||s.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(f){const h=s.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const d=f.behavior==="smooth";let p,m,g;h===window?(m=Math.max(Gt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=h.scrollHeight,p=Gt(h,"height"),g=h.scrollTop);const y=m-p;if(f.top=Math.ceil(Math.max(Math.min(y,f.top),0)),vb(p,m)||f.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),d&&t(!0);return}d?(i.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,h.scrollTo(f)}function u(f){s.current.scrollBy(f)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const At=Ce(()=>{const e=ye(),t=ye(),n=Z(0),r=ye(),o=Z(0),s=ye(),i=ye(),a=Z(0),l=Z(0),c=Z(0),u=Z(0),f=ye(),h=ye(),d=Z(!1);return ie(K(e,re(({scrollTop:p})=>p)),t),ie(K(e,re(({scrollHeight:p})=>p)),i),ie(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:f,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:d}},[],{singleton:!0}),Ts={lvl:0};function wb(e,t,n,r=Ts,o=Ts){return{k:e,v:t,lvl:n,l:r,r:o}}function Le(e){return e===Ts}function Po(){return Ts}function Fu(e,t){if(Le(e))return Ts;const{k:n,l:r,r:o}=e;if(t===n){if(Le(r))return o;if(Le(o))return r;{const[s,i]=xb(r);return ra(lt(e,{k:s,v:i,l:Tb(r)}))}}else return t<n?ra(lt(e,{l:Fu(r,t)})):ra(lt(e,{r:Fu(o,t)}))}function Ss(e,t){if(!Le(e))return t===e.k?e.v:t<e.k?Ss(e.l,t):Ss(e.r,t)}function Yt(e,t,n="k"){if(Le(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Yt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Yt(e.l,t,n)}function Rt(e,t,n){return Le(e)?wb(t,n,1):t===e.k?lt(e,{k:t,v:n}):t<e.k?Sb(lt(e,{l:Rt(e.l,t,n)})):Sb(lt(e,{r:Rt(e.r,t,n)}))}function Nu(e,t,n){if(Le(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Nu(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Nu(i,t,n))),a}function br(e){return Le(e)?[]:[...br(e.l),{k:e.k,v:e.v},...br(e.r)]}function xb(e){return Le(e.r)?[e.k,e.v]:xb(e.r)}function Tb(e){return Le(e.r)?e.l:ra(lt(e,{r:Tb(e.r)}))}function lt(e,t){return wb(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function Lu(e){return Le(e)||e.lvl>e.r.lvl}function Sb(e){return _u(Cb(e))}function ra(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(Lu(t))return Cb(lt(e,{lvl:r-1}));if(!Le(t)&&!Le(t.r))return lt(t.r,{l:lt(t,{r:t.r.l}),r:lt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Lu(e))return _u(lt(e,{lvl:r-1}));if(!Le(n)&&!Le(n.l)){const o=n.l,s=Lu(o)?n.lvl-1:n.lvl;return lt(o,{l:lt(e,{r:o.l,lvl:r-1}),r:_u(lt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function oa(e,t,n){if(Le(e))return[];const r=Yt(e,t)[0];return uN(Nu(e,r,n))}function Eb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function uN(e){return Eb(e,({k:t,v:n})=>({index:t,value:n}))}function _u(e){const{r:t,lvl:n}=e;return!Le(t)&&!Le(t.r)&&t.lvl===n&&t.r.lvl===n?lt(t,{l:lt(e,{r:t.l}),lvl:n+1}):e}function Cb(e){const{l:t}=e;return!Le(t)&&t.lvl===e.lvl?lt(t,{r:lt(e,{l:t.r})}):e}function sa(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Pb(e,t,n){return e[sa(e,t,n)]}function fN(e,t,n,r){const o=sa(e,t,r),s=sa(e,n,r,o);return e.slice(o,s+1)}const Vu=Ce(()=>({recalcInProgress:Z(!1)}),[],{singleton:!0});function dN(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function Ib(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function hN(e,t){let n=Le(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Le(e)){e=Rt(e,0,o);continue}const a=oa(e,s-1,i+1);if(a.some(dN(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:h}of a)l?(i>=u||o===h)&&(e=Fu(e,u)):(c=h!==o,l=!0),f>i&&i>=u&&h!==o&&(e=Rt(e,i+1,h));c&&(e=Rt(e,s,o))}return[e,n]}function pN(){return{offsetTree:[],sizeTree:Po(),groupOffsetTree:Po(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function $u({index:e},t){return t===e?0:t<e?-1:1}function mN({offset:e},t){return t===e?0:t<e?-1:1}function gN(e){return{index:e.index,value:e}}function yN(e,t,n,r=0){return r>0&&(t=Math.max(t,Pb(e,r,$u).offset)),Eb(fN(e,t,n,mN),gN)}function Bu(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=sa(o,t-1,$u),a=o[l].offset;const u=Yt(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===Yt(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of oa(n,t,1/0)){const f=c-s,h=f*i+a+f*r;o.push({offset:h,size:u,index:c}),s=c,a=h,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function vN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Bt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Le(s)&&t.length===2){const h=t[0].size,d=t[1].size;i=n.reduce((p,m)=>Rt(Rt(p,m,h),m+1,d),i)}else[i,a]=hN(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Bu(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((h,d)=>Rt(h,d,Es(d,l,o)),Po()),groupIndices:n}}function Es(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=Pb(t,e,$u),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function bN(e){return typeof e.groupIndex<"u"}function Ab(e,t,n){if(bN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Ob(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Ob(e,t){if(!ia(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function ia(e){return!Le(e.groupOffsetTree)}function wN(e){return br(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const xN={offsetHeight:"height",offsetWidth:"width"},pn=Ce(([{log:e},{recalcInProgress:t}])=>{const n=ye(),r=ye(),o=Ct(r,0),s=ye(),i=ye(),a=Z(0),l=Z([]),c=Z(void 0),u=Z(void 0),f=Z((T,E)=>Gt(T,xN[E])),h=Z(void 0),d=Z(0),p=pN(),m=Ct(K(n,he(l,e,d),dn(vN,p),je()),p),g=Ct(K(l,je(),dn((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),re(({prev:T})=>T)),[]);ie(K(l,ce(T=>T.length>0),he(m,d),re(([T,E,I])=>{const A=T.reduce((k,O,_)=>Rt(k,O,Es(O,E.offsetTree,I)||_),Po());return{...E,groupIndices:T,groupOffsetTree:A}})),m),ie(K(r,he(m),ce(([T,{lastIndex:E}])=>T<E),re(([T,{lastIndex:E,lastSize:I}])=>[{startIndex:T,endIndex:E,size:I}])),n),ie(c,u);const y=Ct(K(c,re(T=>T===void 0)),!0);ie(K(u,ce(T=>T!==void 0&&Le(Et(m).sizeTree)),re(T=>[{startIndex:0,endIndex:0,size:T}])),n);const b=$t(K(n,he(m),dn(({sizes:T},[E,I])=>({changed:I!==T,sizes:I}),{changed:!1,sizes:p}),re(T=>T.changed)));Me(K(a,dn((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),re(T=>T.diff)),T=>{const{groupIndices:E}=Et(m);if(T>0)de(t,!0),de(s,T+Ib(T,E));else if(T<0){const I=Et(g);I.length>0&&(T-=Ib(-T,I)),de(i,T)}}),Me(K(a,he(e)),([T,E])=>{T<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Bt.ERROR)});const v=$t(s);ie(K(s,he(m),re(([T,E])=>{const I=E.groupIndices.length>0,A=[],k=E.lastSize;if(I){const O=Ss(E.sizeTree,0);let _=0,F=0;for(;_<T;){const D=E.groupIndices[F],N=E.groupIndices.length===F+1?1/0:E.groupIndices[F+1]-D-1;A.push({startIndex:D,endIndex:D,size:O}),A.push({startIndex:D+1,endIndex:D+1+N-1,size:k}),F++,_+=N+1}const L=br(E.sizeTree);return _!==T&&L.shift(),L.reduce((D,{k:N,v:$})=>{let W=D.ranges;return D.prevSize!==0&&(W=[...D.ranges,{startIndex:D.prevIndex,endIndex:N+T-1,size:D.prevSize}]),{ranges:W,prevIndex:N+T,prevSize:$}},{ranges:A,prevIndex:T,prevSize:0}).ranges}return br(E.sizeTree).reduce((O,{k:_,v:F})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:_+T-1,size:O.prevSize}],prevIndex:_+T,prevSize:F}),{ranges:[],prevIndex:0,prevSize:k}).ranges})),n);const S=$t(K(i,he(m,d),re(([T,{offsetTree:E},I])=>{const A=-T;return Es(A,E,I)})));return ie(K(i,he(m,d),re(([T,E,I])=>{if(E.groupIndices.length>0){if(Le(E.sizeTree))return E;let k=Po();const O=Et(g);let _=0,F=0,L=0;for(;_<-T;){L=O[F];const D=O[F+1]-L-1;F++,_+=D+1}if(k=br(E.sizeTree).reduce((D,{k:N,v:$})=>Rt(D,Math.max(0,N+T),$),k),_!==-T){const D=Ss(E.sizeTree,L);k=Rt(k,0,D);const N=Yt(E.sizeTree,-T+1)[1];k=Rt(k,1,N)}return{...E,sizeTree:k,...Bu(E.offsetTree,0,k,I)}}else{const k=br(E.sizeTree).reduce((O,{k:_,v:F})=>Rt(O,Math.max(0,_+T),F),Po());return{...E,sizeTree:k,...Bu(E.offsetTree,0,k,I)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:S,beforeUnshiftWith:v,firstItemIndex:a,gap:d,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:y,itemSize:f}},Re(qn,Vu),{singleton:!0}),TN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Db(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!TN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Cs=Ce(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:h}])=>{const d=ye(),p=ye(),m=Z(0);let g=null,y=null,b=null;function v(){g&&(g(),g=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),de(o,!1)}return ie(K(d,he(e,s,t,m,l,c,h),he(r,u,f),re(([[S,T,E,I,A,k,O,_],F,L,P])=>{const D=Db(S),{align:N,behavior:$,offset:W}=D,U=I-1,M=Ab(D,T,U);let R=Es(M,T.offsetTree,F)+k;N==="end"?(R+=L+Yt(T.sizeTree,M)[1]-E+P,M===U&&(R+=O)):N==="center"?R+=(L+Yt(T.sizeTree,M)[1]-E+P)/2:R-=A,W&&(R+=W);const q=ee=>{v(),ee?(_("retrying to scroll to",{location:S},Bt.DEBUG),de(d,S)):(de(p,!0),_("list did not change, scroll successful",{},Bt.DEBUG))};if(v(),$==="smooth"){let ee=!1;b=Me(n,Q=>{ee=ee||Q}),g=un(a,()=>{q(ee)})}else g=un(K(n,SN(150)),q);return y=setTimeout(()=>{v()},1200),de(o,!0),_("scrolling from index to",{index:M,top:R,behavior:$},Bt.DEBUG),{top:R,behavior:$}})),i),{scrollToIndex:d,scrollTargetReached:p,topListHeight:m}},Re(pn,At,qn),{singleton:!0});function SN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Ps="up",Is="down",EN="none",CN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},PN=0,As=Ce(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=Z(!1),a=Z(!0),l=ye(),c=ye(),u=Z(4),f=Z(PN),h=Ct(K(gb(K(ue(t),Co(1),fn(!0)),K(ue(t),Co(1),fn(!1),mb(100))),je()),!1),d=Ct(K(gb(K(s,fn(!0)),K(s,fn(!1),mb(200))),je()),!1);ie(K(ht(ue(t),ue(f)),re(([b,v])=>b<=v),je()),a),ie(K(a,Kn(50)),c);const p=$t(K(ht(e,ue(n),ue(r),ue(o),ue(u)),dn((b,[{scrollTop:v,scrollHeight:S},T,E,I,A])=>{const k=v+T-S>-A,O={viewportHeight:T,scrollTop:v,scrollHeight:S};if(k){let F,L;return v>b.state.scrollTop?(F="SCROLLED_DOWN",L=b.state.scrollTop-v):(F="SIZE_DECREASED",L=b.state.scrollTop-v||b.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:F,scrollTopDelta:L}}let _;return O.scrollHeight>b.state.scrollHeight?_="SIZE_INCREASED":T<b.state.viewportHeight?_="VIEWPORT_HEIGHT_DECREASING":v<b.state.scrollTop?_="SCROLLING_UPWARDS":_="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:_,state:O}},CN),je((b,v)=>b&&b.atBottom===v.atBottom))),m=Ct(K(e,dn((b,{scrollTop:v,scrollHeight:S,viewportHeight:T})=>{if(vb(b.scrollHeight,S))return{scrollTop:v,scrollHeight:S,jump:0,changed:!1};{const E=S-(v+T)<1;return b.scrollTop!==v&&E?{scrollHeight:S,scrollTop:v,jump:b.scrollTop-v,changed:!0}:{scrollHeight:S,scrollTop:v,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ce(b=>b.changed),re(b=>b.jump)),0);ie(K(p,re(b=>b.atBottom)),i),ie(K(i,Kn(50)),l);const g=Z(Is);ie(K(e,re(({scrollTop:b})=>b),je(),dn((b,v)=>Et(d)?{direction:b.direction,prevScrollTop:v}:{direction:v<b.prevScrollTop?Ps:Is,prevScrollTop:v},{direction:Is,prevScrollTop:0}),re(b=>b.direction)),g),ie(K(e,Kn(50),fn(EN)),g);const y=Z(0);return ie(K(h,ce(b=>!b),fn(0)),y),ie(K(t,Kn(100),he(h),ce(([b,v])=>!!v),dn(([b,v],[S])=>[v,S],[0,0]),re(([b,v])=>v-b)),y),{isScrolling:h,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:y,lastJumpDueToItemResize:m}},Re(At)),Xn=Ce(([{log:e}])=>{const t=Z(!1),n=$t(K(t,ce(r=>r),je()));return Me(t,r=>{r&&Et(e)("props updated",{},Bt.DEBUG)}),{propsReady:t,didMount:n}},Re(qn),{singleton:!0});function Ru(e,t){e==0?t():requestAnimationFrame(()=>Ru(e-1,t))}function ju(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Os=Ce(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=Z(!0),l=Z(0),c=Z(!0);return ie(K(i,he(l),ce(([u,f])=>!!f),fn(!1)),a),ie(K(i,he(l),ce(([u,f])=>!!f),fn(!1)),c),Me(K(ht(t,i),he(a,e,n,c),ce(([[,u],f,{sizeTree:h},d,p])=>u&&(!Le(h)||Ou(d))&&!f&&!p),he(l)),([,u])=>{un(s,()=>{de(c,!0)}),Ru(4,()=>{un(r,()=>{de(a,!0)}),de(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Re(pn,At,Cs,Xn),{singleton:!0});function Mb(e){return e?e==="smooth"?"smooth":"auto":!1}const IN=(e,t)=>typeof e=="function"?Mb(e(t)):t&&Mb(e),AN=Ce(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=Z(!1),f=ye();let h=null;function d(m){de(o,{index:"LAST",align:"end",behavior:m})}Me(K(ht(K(ue(e),Co(1)),a),he(ue(u),n,s,c),re(([[m,g],y,b,v,S])=>{let T=g&&v,E="auto";return T&&(E=IN(y,b||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),ce(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{h&&(h(),h=null),h=un(t,()=>{Et(l)("following output to ",{totalCount:m},Bt.DEBUG),d(g),h=null})});function p(m){const g=un(r,y=>{m&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Et(l)("scrolling to bottom due to increased size",{},Bt.DEBUG),d("auto"))});setTimeout(g,100)}return Me(K(ht(ue(u),e,i),ce(([m,,g])=>m&&g),dn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),ce(({refreshed:m})=>m),he(u,e)),([,m])=>{Et(s)&&p(m!==!1)}),Me(f,()=>{p(Et(u)!==!1)}),Me(ht(ue(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&d("auto")}),{followOutput:u,autoscrollToBottom:f}},Re(pn,As,Cs,Os,Xn,qn,At));function ON(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const kb=Ce(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=ye(),i=ye(),a=$t(K(s,re(ON)));return ie(K(a,re(l=>l.totalCount)),e),ie(K(a,re(l=>l.groupIndices)),t),ie(K(ht(r,n,o),ce(([l,c])=>ia(c)),re(([l,c,u])=>Yt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),je(),re(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Re(pn,At));function Ds(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Fb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const aa="top",la="bottom",Nb="none";function Lb(e,t,n){return typeof e=="number"?n===Ps&&t===aa||n===Is&&t===la?e:0:n===Ps?t===aa?e.main:e.reverse:t===la?e.main:e.reverse}function _b(e,t){return typeof e=="number"?e:e[t]||0}const Wu=Ce(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=ye(),i=Z(0),a=Z(0),l=Z(0),c=Ct(K(ht(ue(e),ue(t),ue(r),ue(s,Ds),ue(l),ue(i),ue(o),ue(n),ue(a)),re(([u,f,h,[d,p],m,g,y,b,v])=>{const S=u-b,T=g+y,E=Math.max(h-S,0);let I=Nb;const A=_b(v,aa),k=_b(v,la);return d-=b,d+=h+y,p+=h+y,p-=b,d>u+T-A&&(I=Ps),p<u-E+f+k&&(I=Is),I!==Nb?[Math.max(S-h-Lb(m,aa,I)-A,0),S-E-y+f+Lb(m,la,I)+k]:null}),ce(u=>u!=null),je(Ds)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Re(At),{singleton:!0});function DN(e,t,n){if(ia(t)){const r=Ob(e,t);return[{index:Yt(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const Hu={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Vb(e,t,n){if(e.length===0)return[];if(!ia(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=oa(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function ca(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const f=n-l,h=a+f*i+(f-1)*r,d=c,p=h-u;return{items:Vb(e,o,s),topItems:Vb(t,o,s),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:d,bottom:u,totalCount:n,firstItemIndex:s}}function $b(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=ju(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:s[f+l]}));return ca(c,[],a,o,n,r)}const wr=Ce(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},h,{didMount:d},{recalcInProgress:p}])=>{const m=Z([]),g=Z(0),y=ye();ie(s.topItemsIndexes,m);const b=Ct(K(ht(d,p,ue(i,Ds),ue(t),ue(e),ue(u),c,ue(m),ue(r),ue(o),n),ce(([E,I,,A,,,,,,,k])=>{const O=k&&k.length!==A;return E&&!I&&!O}),re(([,,[E,I],A,k,O,_,F,L,P,D])=>{const N=k,{sizeTree:$,offsetTree:W}=N,U=Et(g);if(A===0)return{...Hu,totalCount:A};if(E===0&&I===0)return U===0?{...Hu,totalCount:A}:$b(U,O,k,L,P,D||[]);if(Le($))return U>0?null:ca(DN(ju(O,A),N,D),[],A,P,N,L);const M=[];if(F.length>0){const G=F[0],V=F[F.length-1];let j=0;for(const z of oa($,G,V)){const B=z.value,Y=Math.max(z.start,G),te=Math.min(z.end,V);for(let H=Y;H<=te;H++)M.push({index:H,size:B,offset:j,data:D&&D[H]}),j+=B}}if(!_)return ca([],M,A,P,N,L);const R=F.length>0?F[F.length-1]+1:0,q=yN(W,E,I,R);if(q.length===0)return null;const ee=A-1,Q=ta([],G=>{for(const V of q){const j=V.value;let z=j.offset,B=V.start;const Y=j.size;if(j.offset<E){B+=Math.floor((E-j.offset+P)/(Y+P));const H=B-V.start;z+=H*Y+H*P}B<R&&(z+=(R-B)*Y,B=R);const te=Math.min(V.end,ee);for(let H=B;H<=te&&!(z>=I);H++)G.push({index:H,size:Y,offset:z,data:D&&D[H]}),z+=Y+P}});return ca(Q,M,A,P,N,L)}),ce(E=>E!==null),je()),Hu);ie(K(n,ce(Ou),re(E=>E==null?void 0:E.length)),t),ie(K(b,re(E=>E.topListHeight)),f),ie(f,l),ie(K(b,re(E=>[E.top,E.bottom])),a),ie(K(b,re(E=>E.items)),y);const v=$t(K(b,ce(({items:E})=>E.length>0),he(t,n),ce(([{items:E},I])=>E[E.length-1].originalIndex===I-1),re(([,E,I])=>[E-1,I]),je(Ds),re(([E])=>E))),S=$t(K(b,Kn(200),ce(({items:E,topItems:I})=>E.length>0&&E[0].originalIndex===I.length),re(({items:E})=>E[0].index),je())),T=$t(K(b,ce(({items:E})=>E.length>0),re(({items:E})=>{let I=0,A=E.length-1;for(;E[I].type==="group"&&I<A;)I++;for(;E[A].type==="group"&&A>I;)A--;return{startIndex:E[I].index,endIndex:E[A].index}}),je(Fb)));return{listState:b,topItemsIndexes:m,endReached:v,startReached:S,rangeChanged:T,itemsRendered:y,initialItemCount:g,...h}},Re(pn,kb,Wu,Os,Cs,As,Xn,Vu),{singleton:!0}),MN=Ce(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ie(K(a,he(s),ce(([,l])=>l!==0),he(o,e,t,r,n),re(([[,l],c,u,f,h,d=[]])=>$b(l,c,u,f,h,d))),i),{}),Re(pn,Os,wr,Xn),{singleton:!0}),Bb=Ce(([{scrollVelocity:e}])=>{const t=Z(!1),n=ye(),r=Z(!1);return ie(K(e,he(r,t,n),ce(([o,s])=>!!s),re(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),je()),t),Me(K(ht(t,e,n),he(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Re(As),{singleton:!0}),kN=Ce(([{topItemsIndexes:e}])=>{const t=Z(0);return ie(K(t,ce(n=>n>0),re(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Re(wr)),Rb=Ce(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=ye(),i=Ct(K(ht(e,r,t,n,o),re(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ie(ue(i),s),{totalListHeight:i,totalListHeightChanged:s}},Re(At,wr),{singleton:!0});function jb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const FN=jb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),NN=Ce(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:h},{log:d},{recalcInProgress:p}])=>{const m=$t(K(l,he(a),dn(([,y,b,v],[{items:S,totalCount:T,bottom:E,offsetBottom:I},A])=>{const k=E+I;let O=0;return b===T&&y.length>0&&S.length>0&&(S[0].originalIndex===0&&y[0].originalIndex===0||(O=k-v,O!==0&&(O+=A))),[O,S,T,k]},[0,[],0,0]),ce(([y])=>y!==0),he(t,i,r,s,d,p),ce(([,y,b,v,,,S])=>!S&&!v&&y!==0&&b===Ps),re(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},Bt.DEBUG),y))));function g(y){y>0?(de(e,{top:-y,behavior:"auto"}),de(n,0)):(de(n,0),de(e,{top:-y,behavior:"auto"}))}return Me(K(m,he(n,o)),([y,b,v])=>{v&&FN()?de(n,b-y):g(-y)}),Me(K(ht(Ct(o,!1),n,p),ce(([y,b,v])=>!y&&!v&&b!==0),re(([y,b])=>b),Kn(1)),g),ie(K(u,re(y=>({top:-y}))),e),Me(K(c,he(f,h),re(([y,{lastSize:b,groupIndices:v,sizeTree:S},T])=>{function E(I){return I*(b+T)}if(v.length===0)return E(y);{let I=0;const A=Ss(S,0);let k=0,O=0;for(;k<y;){k++,I+=A;let _=v.length===O+1?1/0:v[O+1]-v[O]-1;k+_>y&&(I-=A,_=y-k+1),k+=_,I+=E(_),O++}return I}})),y=>{de(n,y),requestAnimationFrame(()=>{de(e,{top:y}),requestAnimationFrame(()=>{de(n,0),de(p,!1)})})}),{deviation:n}},Re(At,As,wr,pn,qn,Vu)),LN=Ce(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Z(0);return Me(K(e,he(r),ce(([,o])=>o!==0),re(([,o])=>({top:o}))),o=>{un(K(n,Co(1),ce(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{de(t,o)})})}),{initialScrollTop:r}},Re(Xn,At,wr),{singleton:!0}),_N=Ce(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Z(!1),r=Ct(K(ht(n,e,t),ce(([o])=>o),re(([,o,s])=>Math.max(0,o-s)),Kn(0),je()),0);return{alignToBottom:n,paddingTopAddition:r}},Re(At,Rb),{singleton:!0}),zu=Ce(([{scrollTo:e,scrollContainerState:t}])=>{const n=ye(),r=ye(),o=ye(),s=Z(!1),i=Z(void 0);return ie(K(ht(n,r),re(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ie(K(e,he(r),re(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Re(At)),VN=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,$N=Ce(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=ye();return ie(K(u,he(e,o,t,s,i,a,r),he(n),re(([[f,h,d,p,m,g,y,b],v])=>{const{done:S,behavior:T,align:E,calculateViewLocation:I=VN,...A}=f,k=Ab(f,h,p-1),O=Es(k,h.offsetTree,v)+m+g,_=O+Yt(h.sizeTree,k)[1],F=b+g,L=b+d-y,P=I({itemTop:O,itemBottom:_,viewportTop:F,viewportBottom:L,locationParams:{behavior:T,align:E,...A}});return P?S&&un(K(l,ce(D=>D===!1),Co(Et(l)?1:2)),S):S&&S(),P}),ce(f=>f!==null)),c),{scrollIntoView:u}},Re(pn,At,Cs,wr,qn),{singleton:!0}),BN=Ce(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=ye(),u=Z(void 0),f=Z(null),h=Z(null);return ie(a,f),ie(l,h),Me(K(c,he(e,n,i,f,h,r)),([d,p,m,g,y,b,v])=>{const S=wN(p.sizeTree);g&&y!==null&&b!==null&&(m=y.scrollTop-b.offsetTop),m-=v,d({ranges:S,scrollTop:m})}),ie(K(u,ce(Ou),re(RN)),o),ie(K(s,he(u),ce(([,d])=>d!==void 0),je(),re(([,d])=>d.ranges)),t),{getState:c,restoreStateFrom:u}},Re(pn,At,Os,Xn,zu));function RN(e){return{offset:e.scrollTop,index:0,align:"start"}}const jN=Ce(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Re(Wu,MN,Xn,Bb,Rb,LN,_N,zu,$N,qn)),Wb=Ce(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p},m,g,y,{listState:b,topItemsIndexes:v,...S},{scrollToIndex:T},E,{topItemCount:I},{groupCounts:A},k])=>(ie(S.rangeChanged,k.scrollSeekRangeChanged),ie(K(k.windowViewportRect,re(O=>O.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p,topItemsIndexes:v,topItemCount:I,groupCounts:A,fixedItemHeight:n,defaultItemHeight:r,gap:u,...y,statefulTotalCount:c,listState:b,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...k,...m,sizes:f,...g}),Re(pn,Os,At,BN,AN,wr,Cs,NN,kN,kb,jN)),Uu="-webkit-sticky",Hb="sticky",zb=jb(()=>{if(typeof document>"u")return Hb;const e=document.createElement("div");return e.style.position=Uu,e.style.position===Uu?Uu:Hb});function Gu(e,t){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(t){const h=t.getBoundingClientRect(),d=l.top-h.top;u=h.height-Math.max(0,d),f=d+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=ku(r),i=w.useCallback(()=>{r(s.current)},[r,s]);return w.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const ua=w.createContext(void 0),Ub=w.createContext(void 0);function Yu(e){return e}const WN=Ce(([e,t])=>({...e,...t}),Re(Wb,Ce(()=>{const e=Z(l=>`Item ${l}`),t=Z(null),n=Z(l=>`Group ${l}`),r=Z({}),o=Z(Yu),s=Z("div"),i=Z(vr),a=(l,c=null)=>Ct(K(r,re(u=>u[l]),je()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),HN=({height:e})=>w.createElement("div",{style:{height:e}}),zN={position:zb(),zIndex:1,overflowAnchor:"none"},UN={overflowAnchor:"none"},Gb=w.memo(function({showTopList:t=!1}){const n=me("listState"),r=Ht("sizeRanges"),o=me("useWindowScroll"),s=me("customScrollParent"),i=Ht("windowScrollContainerState"),a=Ht("scrollContainerState"),l=s||o?i:a,c=me("itemContent"),u=me("context"),f=me("groupContent"),h=me("trackItemSizes"),d=me("itemSize"),p=me("log"),m=Ht("gap"),{callbackRef:g}=yb(r,d,h,t?vr:l,p,m,s),[y,b]=w.useState(0);Xu("deviation",P=>{y!==P&&b(P)});const v=me("EmptyPlaceholder"),S=me("ScrollSeekPlaceholder")||HN,T=me("ListComponent"),E=me("ItemComponent"),I=me("GroupComponent"),A=me("computeItemKey"),k=me("isSeeking"),O=me("groupIndices").length>0,_=me("alignToBottom"),F=me("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:y!==0?y:_?"auto":0,...F?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&v?w.createElement(v,qe(v,u)):w.createElement(T,{...qe(T,u),ref:g,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const D=P.originalIndex,N=A(D+n.firstItemIndex,P.data,u);return k?w.createElement(S,{...qe(S,u),key:N,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?w.createElement(I,{...qe(I,u),key:N,"data-index":D,"data-known-size":P.size,"data-item-index":P.index,style:zN},f(P.index,u)):w.createElement(E,{...qe(E,u),...Yb(E,P.data),key:N,"data-index":D,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:UN},O?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),GN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Io=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),YN={width:"100%",position:zb(),top:0,zIndex:1};function qe(e,t){if(typeof e!="string")return{context:t}}function Yb(e,t){return{item:typeof e=="string"?void 0:t}}const KN=w.memo(function(){const t=me("HeaderComponent"),n=Ht("headerHeight"),r=me("headerFooterTag"),o=hn(w.useMemo(()=>i=>n(Gt(i,"height")),[n])),s=me("context");return t?w.createElement(r,{ref:o},w.createElement(t,qe(t,s))):null}),qN=w.memo(function(){const t=me("FooterComponent"),n=Ht("footerHeight"),r=me("headerFooterTag"),o=hn(w.useMemo(()=>i=>n(Gt(i,"height")),[n])),s=me("context");return t?w.createElement(r,{ref:o},w.createElement(t,qe(t,s))):null});function Ku({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),h=n("context"),{scrollerRef:d,scrollByCallback:p,scrollToCallback:m}=bb(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:d,style:{...GN,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...qe(c,h)},i)})}function qu({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),d=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:y}=bb(l,u,c,vr,d);return sN(()=>(m.current=d||window,()=>{m.current=null}),[m,d]),t("windowScrollTo",y),t("scrollBy",g),w.createElement(c,{style:{position:"relative",...s,...f!==0?{height:f+h}:{}},"data-virtuoso-scroller":!0,...a,...qe(c,p)},i)})}const XN=({children:e})=>{const t=w.useContext(ua),n=Ht("viewportHeight"),r=Ht("fixedItemHeight"),o=me("alignToBottom"),s=hn(w.useMemo(()=>xs(n,i=>Gt(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:Io(o),ref:s,"data-viewport-type":"element"},e)},QN=({children:e})=>{const t=w.useContext(ua),n=Ht("windowViewportRect"),r=Ht("fixedItemHeight"),o=me("customScrollParent"),s=Gu(n,o),i=me("alignToBottom");return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:Io(i),"data-viewport-type":"window"},e)},ZN=({children:e})=>{const t=me("TopItemListComponent")||"div",n=me("headerHeight"),r={...YN,marginTop:`${n}px`},o=me("context");return w.createElement(t,{style:r,...qe(t,o)},e)},JN=w.memo(function(t){const n=me("useWindowScroll"),r=me("topItemsIndexes").length>0,o=me("customScrollParent"),s=o||n?nL:tL,i=o||n?QN:XN;return w.createElement(s,{...t},r&&w.createElement(ZN,null,w.createElement(Gb,{showTopList:!0})),w.createElement(i,null,w.createElement(KN,null),w.createElement(Gb,null),w.createElement(qN,null)))}),{Component:eL,usePublisher:Ht,useEmitterValue:me,useEmitter:Xu}=Mu(WN,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},JN),tL=Ku({usePublisher:Ht,useEmitterValue:me,useEmitter:Xu}),nL=qu({usePublisher:Ht,useEmitterValue:me,useEmitter:Xu}),rL=eL,Kb={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},oL={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:qb,ceil:Xb,floor:fa,min:Qu,max:Ms}=Math;function sL(e){return{...oL,items:e}}function Qb(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function iL(e,t){return e&&e.column===t.column&&e.row===t.row}function da(e,t){return e&&e.width===t.width&&e.height===t.height}const aL=Ce(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,h,{propsReady:d,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:y,windowScrollContainerState:b,windowScrollTo:v},S])=>{const T=Z(0),E=Z(0),I=Z(Kb),A=Z({height:0,width:0}),k=Z({height:0,width:0}),O=ye(),_=ye(),F=Z(0),L=Z(null),P=Z({row:0,column:0}),D=ye(),N=ye(),$=Z(!1),W=Z(0),U=Z(!0),M=Z(!1);Me(K(p,he(W),ce(([V,j])=>!!j)),()=>{de(U,!1),de(E,0)}),Me(K(ht(p,U,k,A,W,M),ce(([V,j,z,B,,Y])=>V&&!j&&z.height!==0&&B.height!==0&&!Y)),([,,,,V])=>{de(M,!0),Ru(1,()=>{de(O,V)}),un(K(r),()=>{de(n,[0,0]),de(U,!0)})}),ie(K(N,ce(V=>V!=null&&V.scrollTop>0),fn(0)),E),Me(K(p,he(N),ce(([,V])=>V!=null)),([,V])=>{V&&(de(A,V.viewport),de(k,V==null?void 0:V.item),de(P,V.gap),V.scrollTop>0&&(de($,!0),un(K(r,Co(1)),j=>{de($,!1)}),de(i,{top:V.scrollTop})))}),ie(K(A,re(({height:V})=>V)),o),ie(K(ht(ue(A,da),ue(k,da),ue(P,(V,j)=>V&&V.column===j.column&&V.row===j.row),ue(r)),re(([V,j,z,B])=>({viewport:V,item:j,gap:z,scrollTop:B}))),D),ie(K(ht(ue(T),t,ue(P,iL),ue(k,da),ue(A,da),ue(L),ue(E),ue($),ue(U),ue(W)),ce(([,,,,,,,V])=>!V),re(([V,[j,z],B,Y,te,H,Pe,,Xe,_e])=>{const{row:Qe,column:ae}=B,{height:ge,width:se}=Y,{width:be}=te;if(Pe===0&&(V===0||be===0))return Kb;if(se===0){const Ot=ju(_e,V),Tr=Ot===0?Math.max(Pe-1,0):Ot;return sL(Qb(Ot,Tr,H))}const ot=Jb(be,se,ae);let we,st;Xe?j===0&&z===0&&Pe>0?(we=0,st=Pe-1):(we=ot*fa((j+Qe)/(ge+Qe)),st=ot*Xb((z+Qe)/(ge+Qe))-1,st=Qu(V-1,Ms(st,ot-1)),we=Qu(st,Ms(0,we))):(we=0,st=-1);const J=Qb(we,st,H),{top:oe,bottom:xe}=Zb(te,B,Y,J),We=Xb(V/ot),Pt=We*ge+(We-1)*Qe-xe;return{items:J,offsetTop:oe,offsetBottom:Pt,top:oe,bottom:xe,itemHeight:ge,itemWidth:se}})),I),ie(K(L,ce(V=>V!==null),re(V=>V.length)),T),ie(K(ht(A,k,I,P),ce(([V,j,{items:z}])=>z.length>0&&j.height!==0&&V.height!==0),re(([V,j,{items:z},B])=>{const{top:Y,bottom:te}=Zb(V,B,j,z);return[Y,te]}),je(Ds)),n);const R=Z(!1);ie(K(r,he(R),re(([V,j])=>j||V!==0)),R);const q=$t(K(ue(I),ce(({items:V})=>V.length>0),he(T,R),ce(([{items:V},j,z])=>z&&V[V.length-1].index===j-1),re(([,V])=>V-1),je())),ee=$t(K(ue(I),ce(({items:V})=>V.length>0&&V[0].index===0),fn(0),je())),Q=$t(K(ue(I),he($),ce(([{items:V},j])=>V.length>0&&!j),re(([{items:V}])=>({startIndex:V[0].index,endIndex:V[V.length-1].index})),je(Fb),Kn(0)));ie(Q,h.scrollSeekRangeChanged),ie(K(O,he(A,k,T,P),re(([V,j,z,B,Y])=>{const te=Db(V),{align:H,behavior:Pe,offset:Xe}=te;let _e=te.index;_e==="LAST"&&(_e=B-1),_e=Ms(0,_e,Qu(B-1,_e));let Qe=Zu(j,Y,z,_e);return H==="end"?Qe=qb(Qe-j.height+z.height):H==="center"&&(Qe=qb(Qe-j.height/2+z.height/2)),Xe&&(Qe+=Xe),{top:Qe,behavior:Pe}})),i);const G=Ct(K(I,re(V=>V.offsetBottom+V.bottom)),0);return ie(K(m,re(V=>({width:V.visibleWidth,height:V.visibleHeight}))),A),{data:L,totalCount:T,viewportDimensions:A,itemDimensions:k,scrollTop:r,scrollHeight:_,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:v,useWindowScroll:g,customScrollParent:y,windowScrollContainerState:b,deviation:F,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:N,...h,initialTopMostItemIndex:W,gridState:I,totalListHeight:G,...f,startReached:ee,endReached:q,rangeChanged:Q,stateChanged:D,propsReady:d,stateRestoreInProgress:$,...S}},Re(Wu,At,As,Bb,Xn,zu,qn));function Zb(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Zu(e,t,n,r[0].index),i=Zu(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Zu(e,t,n,r){const o=Jb(e.width,n.width,t.column),s=fa(r/o),i=s*n.height+Ms(0,s-1)*t.row;return i>0?i+t.row:i}function Jb(e,t,n){return Ms(1,fa((e+n)/(fa(t)+n)))}const lL=Ce(([e,t])=>({...e,...t}),Re(aL,Ce(()=>{const e=Z(c=>`Item ${c}`),t=Z({}),n=Z(null),r=Z("virtuoso-grid-item"),o=Z("virtuoso-grid-list"),s=Z(Yu),i=Z("div"),a=Z(vr),l=(c,u=null)=>Ct(K(t,re(f=>f[c]),je()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),cL=w.memo(function(){const t=Ue("gridState"),n=Ue("listClassName"),r=Ue("itemClassName"),o=Ue("itemContent"),s=Ue("computeItemKey"),i=Ue("isSeeking"),a=Kt("scrollHeight"),l=Ue("ItemComponent"),c=Ue("ListComponent"),u=Ue("ScrollSeekPlaceholder"),f=Ue("context"),h=Kt("itemDimensions"),d=Kt("gap"),p=Ue("log"),m=Ue("stateRestoreInProgress"),g=hn(w.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;a(b);const v=y.firstChild;if(v){const{width:S,height:T}=v.getBoundingClientRect();h({width:S,height:T})}d({row:t0("row-gap",getComputedStyle(y).rowGap,p),column:t0("column-gap",getComputedStyle(y).columnGap,p)})},[a,h,d,p]));return m?null:w.createElement(c,{ref:g,className:n,...qe(c,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(y=>{const b=s(y.index,y.data,f);return i?w.createElement(u,{key:b,...qe(u,f),index:y.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...qe(l,f),className:r,"data-index":y.index,key:b},o(y.index,y.data,f))}))}),uL=w.memo(function(){const t=Ue("HeaderComponent"),n=Kt("headerHeight"),r=Ue("headerFooterTag"),o=hn(w.useMemo(()=>i=>n(Gt(i,"height")),[n])),s=Ue("context");return t?w.createElement(r,{ref:o},w.createElement(t,qe(t,s))):null}),fL=w.memo(function(){const t=Ue("FooterComponent"),n=Kt("footerHeight"),r=Ue("headerFooterTag"),o=hn(w.useMemo(()=>i=>n(Gt(i,"height")),[n])),s=Ue("context");return t?w.createElement(r,{ref:o},w.createElement(t,qe(t,s))):null}),dL=({children:e})=>{const t=w.useContext(Ub),n=Kt("itemDimensions"),r=Kt("viewportDimensions"),o=hn(w.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return w.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),w.createElement("div",{style:Io(!1),ref:o},e)},hL=({children:e})=>{const t=w.useContext(Ub),n=Kt("windowViewportRect"),r=Kt("itemDimensions"),o=Ue("customScrollParent"),s=Gu(n,o);return w.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),w.createElement("div",{ref:s,style:Io(!1)},e)},pL=w.memo(function({...t}){const n=Ue("useWindowScroll"),r=Ue("customScrollParent"),o=r||n?gL:mL,s=r||n?hL:dL;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(uL,null),w.createElement(cL,null),w.createElement(fL,null)))}),{Component:F2,usePublisher:Kt,useEmitterValue:Ue,useEmitter:e0}=Mu(lL,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},pL),mL=Ku({usePublisher:Kt,useEmitterValue:Ue,useEmitter:e0}),gL=qu({usePublisher:Kt,useEmitterValue:Ue,useEmitter:e0});function t0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Bt.WARN),t==="normal"?0:parseInt(t??"0",10)}const yL=Ce(([e,t])=>({...e,...t}),Re(Wb,Ce(()=>{const e=Z(l=>w.createElement("td",null,"Item $",l)),t=Z(null),n=Z(null),r=Z(null),o=Z({}),s=Z(Yu),i=Z(vr),a=(l,c=null)=>Ct(K(o,re(u=>u[l]),je()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),vL=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),bL=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),wL={overflowAnchor:"none"},xL=w.memo(function(){const t=ke("listState"),n=qt("sizeRanges"),r=ke("useWindowScroll"),o=ke("customScrollParent"),s=qt("windowScrollContainerState"),i=qt("scrollContainerState"),a=o||r?s:i,l=ke("itemContent"),c=ke("trackItemSizes"),u=ke("itemSize"),f=ke("log"),{callbackRef:h,ref:d}=yb(n,u,c,a,f,void 0,o),[p,m]=w.useState(0);Ju("deviation",N=>{p!==N&&(d.current.style.marginTop=`${N}px`,m(N))});const g=ke("EmptyPlaceholder"),y=ke("ScrollSeekPlaceholder")||vL,b=ke("FillerRow")||bL,v=ke("TableBodyComponent"),S=ke("TableRowComponent"),T=ke("computeItemKey"),E=ke("isSeeking"),I=ke("paddingTopAddition"),A=ke("firstItemIndex"),k=ke("statefulTotalCount"),O=ke("context");if(k===0&&g)return w.createElement(g,qe(g,O));const _=t.offsetTop+I+p,F=t.offsetBottom,L=_>0?w.createElement(b,{height:_,key:"padding-top",context:O}):null,P=F>0?w.createElement(b,{height:F,key:"padding-bottom",context:O}):null,D=t.items.map(N=>{const $=N.originalIndex,W=T($+A,N.data,O);return E?w.createElement(y,{...qe(y,O),key:W,index:N.index,height:N.size,type:N.type||"item"}):w.createElement(S,{...qe(S,O),...Yb(S,N.data),key:W,"data-index":$,"data-known-size":N.size,"data-item-index":N.index,style:wL},l(N.index,N.data,O))});return w.createElement(v,{ref:h,"data-testid":"virtuoso-item-list",...qe(v,O)},[L,...D,P])}),TL=({children:e})=>{const t=w.useContext(ua),n=qt("viewportHeight"),r=qt("fixedItemHeight"),o=hn(w.useMemo(()=>xs(n,s=>Gt(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:Io(!1),ref:o,"data-viewport-type":"element"},e)},SL=({children:e})=>{const t=w.useContext(ua),n=qt("windowViewportRect"),r=qt("fixedItemHeight"),o=ke("customScrollParent"),s=Gu(n,o);return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:Io(!1),"data-viewport-type":"window"},e)},EL=w.memo(function(t){const n=ke("useWindowScroll"),r=ke("customScrollParent"),o=qt("fixedHeaderHeight"),s=qt("fixedFooterHeight"),i=ke("fixedHeaderContent"),a=ke("fixedFooterContent"),l=ke("context"),c=hn(w.useMemo(()=>xs(o,b=>Gt(b,"height")),[o])),u=hn(w.useMemo(()=>xs(s,b=>Gt(b,"height")),[s])),f=r||n?IL:PL,h=r||n?SL:TL,d=ke("TableComponent"),p=ke("TableHeadComponent"),m=ke("TableFooterComponent"),g=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...qe(p,l)},i()):null,y=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...qe(m,l)},a()):null;return w.createElement(f,{...t},w.createElement(h,null,w.createElement(d,{style:{borderSpacing:0,overflowAnchor:"none"},...qe(d,l)},[g,w.createElement(xL,{key:"TableBody"}),y])))}),{Component:CL,usePublisher:qt,useEmitterValue:ke,useEmitter:Ju}=Mu(yL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},EL),PL=Ku({usePublisher:qt,useEmitterValue:ke,useEmitter:Ju}),IL=qu({usePublisher:qt,useEmitterValue:ke,useEmitter:Ju}),AL=CL,OL=e=>{const[t,n]=w.useState(0);return w.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},DL={Item:w.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:w.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},ML=e=>{const t=w.useRef(null),n=OL(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(vs,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(rL,{height:n,useWindowScroll:!0,data:e.source,components:DL,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(Ev,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Nr,{children:x.jsx(Ql,{})})}),x.jsx("div",{})]})};var kL=Object.defineProperty,n0=Object.getOwnPropertySymbols,FL=Object.prototype.hasOwnProperty,NL=Object.prototype.propertyIsEnumerable,r0=(e,t,n)=>t in e?kL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LL=(e,t)=>{for(var n in t||(t={}))FL.call(t,n)&&r0(e,n,t[n]);if(n0)for(var n of n0(t))NL.call(t,n)&&r0(e,n,t[n]);return e},ef=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},_L=(e,t,n,r)=>pa(ef,e,t,n,r),Ao=e=>typeof e=="object",Qn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Ao(e)&&!Ao(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Qn(e[r],t[r]))},VL=(e,t)=>(Ao(e)||Array.isArray(e))&&t?e[t]:e,$L=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,ha=e=>/[0-9.]+/.test(e),o0=e=>["string","number"].includes(typeof e),s0=e=>e==null||(e==null?void 0:e.length)===0||e==="",i0={eq:Qn,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:s0,notEmpty:e=>!s0(e),in:(e,t)=>ef(t,n=>Qn(e,n)),notIn:(e,t)=>a0(t,n=>!Qn(e,n))},BL=e=>{if(e in i0)return i0[e];throw new Error("Linq - Symbol not found")},Oo=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},pa=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=BL(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},RL=(e,t,n,r)=>pa(Oo,e,t,n,r),a0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},jL=(e,t,n,r)=>pa(a0,e,t,n,r),l0=e=>{if(e===null)return null;const t=LL({},e);return Object.keys(t).forEach(n=>t[n]=Ao(e[n])?l0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},c0=(e,t)=>{if(Ao(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Qn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Qn(t,r))return!0}return!1},WL=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},HL=e=>Oo(e,(t,n,r)=>Ao(t)?n===r.findIndex(o=>Qn(o,t)):n===r.indexOf(t)),zL=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},u0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},UL=(e,t)=>u0(e,n=>n[t]),f0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},GL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},YL=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return ha(e)&&ha(t)?r.map(i=>Number.parseInt(i)):r},tf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&ha(e)&&ha(t)){const o=[],[s,i]=GL(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return YL(e,t,r)},KL=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?tf(r,o,1):tf(r,s,Number.parseInt(o,10))}return o0(e)&&o0(t)?tf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},nf=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},d0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},qL=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},XL=(e,t,n,r)=>pa(qL,e,t,n,r),h0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted($L(t))},p0=(e=>(e.Asc="asc",e.Desc="desc",e))(p0||{}),QL=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),ZL=(e,t)=>e.sort(QL(t)),JL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Oo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},e_=class wf{constructor(t=[]){this.array=t}static Range(...t){return KL(...t)}static New(t){return new wf(t)}Where(t,n,r){return this.array=RL(this.array,t,n,r),this}Some(t,n,r){return _L(this.array,t,n,r)}All(t,n,r){return jL(this.array,t,n,r)}Reverse(){return this.array=d0(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=XL(this.array,t,n,r),this}Distinct(){return this.array=HL(this.array),this}First(t){return t===void 0?this.array[0]:zL(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?nf((n,r)=>n+r,0,this.array):nf((n,r)=>n+VL(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return UL(this.array,t)}GroupWith(t){return u0(this.array,t)}Except(t){return Oo(this.array,n=>!c0(t,n))}Intersect(t){return Oo(this.array,n=>c0(t,n))}OrderBy(t,n){let r;return r=t?h0(this.array,t):this.array.toSorted(),this.array=n==="desc"?d0(r):r,this}Includes(t){return ef(this.array,n=>Qn(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return nf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(f0(this.array,n=>[t,n]))}Zip(t,n){return f0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Oo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new wf(l0(this.array))}ToObject(t){return WL(this.array,t)}Sort(t){return Array.isArray(t)?ZL(this.array,t):h0(this.array,t)}Unique(t){return JL(this.array,t)}},m0=e_,rf={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,y)=>{try{Object.keys(g).forEach(y)}catch(b){window.console.log(b)}},n=g=>g==null,r=g=>{const y=typeof g;return y==="string"||y==="number"||y==="boolean"||n(g)},o=(g,y)=>{const b=y.getItem(g);try{return JSON.parse(b)}catch{return b??null}},s=g=>Object.keys(g).reduce((y,b)=>({...y,[b]:o(b,g)}),{}),i=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,y)=>(g[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(y=>y(g))},f=[{name:"expires",parse:g=>`expires=${i(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${i(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const y=g.domain??"";return y===""?"":`domain=${g.multiDomain?".":""}${y}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],h={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(y=>y.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const y=h.json()[g];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,y,b={})=>{const v=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=f.reduce((T,E)=>{const I=E.parse(b);return I===""?T:T.concat(I)},[`${encodeURIComponent(g)}=${v}`]).join(";");document.cookie=S,u()}},d=g=>{const y=new Set,b=v=>{g().removeItem(v);const S=s(g());y.forEach(T=>T(S))};return{delete:b,listener:v=>(y.add(v),()=>y.delete(v)),clearListeners:()=>y.clear(),json:(v=!1)=>v?s(g()):g(),has:v=>{const S=g().getItem(v);return!n(S)},deleteAll:()=>{t(g(),b),y.forEach(v=>v(g()))},get:v=>o(v,g()),set:(v,S)=>{g().setItem(v,JSON.stringify(S)),y.forEach(T=>T(g()))}}},p=d(()=>window.sessionStorage),m=d(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=d})(rf);const of=e=>e.headerLabel??e.thead??e.id,sf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Do=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Do||{});const af=e=>e.type==="number"?e.valueAsNumber:e.value,t_=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},n_={},r_=(e,t)=>{if(!Array.isArray(t))return e;const n=new Map(e.map(r=>[r.id,r]));return t.map(r=>{const o=n.get(r.id);return{...r,...o}})},o_=(e,t,n=n_)=>{const r=xi()?null:rf.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=hc({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:r_(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return xi()||rf.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},lf=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??Do.Text,i=t[s]??[],a=((c=i.find(f=>f["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:us(),operation:l,label:of(e),name:o,type:s,value:"",...r}},cf=()=>{const e=Tt(),t=w.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:w.useMemo(()=>({[Do.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Do.Boolean]:[t.is,t.isNot],[Do.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},s_=e=>{const t=Tt(),n=cf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,lf(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(f=>f.map(h=>{if(c!==h.id)return h;const d=e.cols.find(p=>u===p.id);return lf(d,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(f=>f.map(h=>h.id===c?{...h,operation:n.operations[u]}:h))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=af(l.target);e.set(f=>f.map(h=>h.id===c?{...h,value:u}:h))};return x.jsx(w.Fragment,{children:x.jsx(wo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(pP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(yr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(yr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(vs,{"data-id":l.id,onChange:a,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":l.id,type:"button",onClick:i,children:x.jsx(Yr,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(Zl,{size:14})," ",t.tableFilterNewFilter]})})]})})})},i_=({filter:e,onDelete:t,set:n})=>{const r=Tt(),o=cf(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(f=>f.id===c?{...f,operation:o.operations[l]}:f))},i=a=>{const l=a.target.dataset.id||"",c=af(a.target);n(u=>u.map(f=>f.id===l?{...f,value:c}:f))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(yr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(vs,{"data-id":e.id,onChange:i,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Yr,{className:"text-danger",size:14})})]})},a_=({item:e,onPointerDown:t})=>{const n=ar(0);return x.jsxs(di.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(hP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},l_=e=>{var l;const t=Tt(),n=sf(e.cols),r=tP(),[o,s]=w.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var g;const u=c.target,f=u.value,h=u.options.selectedIndex,d=((g=u.options.item(h))==null?void 0:g.label)||"";s(d);const p=new m0(e.rows).GroupBy(f),m=e.cols.find(y=>y.id===f);e.setGroups(wx(p).map((y,b)=>{const v=p[y];return{...m,groupId:us(),groupKey:f,index:b,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(wo,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(vP,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(yr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(Nr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Yr,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(TC,{children:x.jsx(di.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx(a_,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},c_=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),u_=(e,t)=>e.toSorted(c_(t)),g0=(e,t,n)=>({id:us(),type:n,value:e.id,label:t}),f_=e=>{const t=Tt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,g0(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,value:u}:h))},i=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,type:u}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))};return x.jsx(w.Fragment,{children:x.jsx(wo,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Em,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(yr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(yr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(Yr,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Zl,{size:14})," ",t.tableSortAddButton]})})]})})})},d_=e=>{const t=Tt(),[n,r]=w.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");w.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=g0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=of(e.col);return x.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?x.jsx(lP,{size:14}):null,n==="desc"?x.jsx(aP,{size:14}):null,n==="undefined"?x.jsx(Em,{size:14}):null]})},h_=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(s_,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(f_,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(l_,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=af(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function p_(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const m_=e=>{const t=w.useId(),n=Tt(),r=e.asLink||"button",o=w.useMemo(()=>p_(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(w.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:x.jsx(w.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},g_={top:0,left:0,right:0,bottom:-1},y_=e=>{var p;const t=Tt(),n=e.filters.filter(m=>m.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,s=e.header.allowFilter??!0,i=cf(),a=r?mP:gP,l=m=>{const g=m.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==g))},c=w.useCallback(m=>{if(m===null)return;const g=new AbortController;return m.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:g.signal}),()=>g.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),f=u!=null&&u.type?u.type===p0.Asc?"ascending":"descending":"none",h=of(e.header),d=ar(void 0);return x.jsxs(di.Item,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:d},role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,className:`relative hidden min-w-0 border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((p=e.header.thProps)==null?void 0:p.className)??""}`,children:[x.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?x.jsx(wo,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",h]}),x.jsx(a,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:h})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(m=>x.jsx("li",{className:"my-1",children:x.jsx(i_,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(lf(e.header,i.options,i.operations))),children:[x.jsx(Zl,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?x.jsx(d_,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),x.jsx(ft.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",dragConstraints:g_,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,g)=>{const y=m.target,b=d.get()||y.getBoundingClientRect().width,v=g.delta.x;return d.set(Math.abs(b+v))}})]})},v_=e=>x.jsx(di.Group,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:x.jsx(Gr,{children:e.headers.map(t=>x.jsx(y_,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),y0=w.createContext({}),b_=()=>w.useContext(y0),w_=w.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(Gr,{children:n.children})})),x_=w.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),T_=w.forwardRef(({context:e,...t},n)=>{const r=b_(),o={...t==null?void 0:t.style,top:yn.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),S_=w.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),E_=w.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),C_={TableHead:T_,Table:x_,TableBody:w_,TableRow:S_,TableFoot:E_},P_=[0,0,0,0,0,0,0,0,0,0],v0=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),I_=(e,t,n)=>x.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?v0:x.jsx(Lg,{})}),A_=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{var f;const a=`${i},${e}`,l=vc(t,s.id),c=s.Element,u=((f=s.cellProps)==null?void 0:f.className)||"";return w.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?v0:c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(w.Fragment,{children:yn.nil(l)?"":l}))})})},O_=()=>x.jsx(w.Fragment,{}),D_=[{}],b0=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,onScrollEnd:i,border:a=!1,pagination:l=null,useControl:c=!1,...u})=>{const f=w.useRef(null),[h,d]=w.useState(!1),p=Au(i),m=Au(u.loadingMore),g=w.useMemo(()=>{if(u.loading)return P_;if(c)return u.rows;const y=new m0(u.rows);return t.length>0&&t.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:y.Where(b.name,b.operation.symbol,b.value)),r.length===0?y.Select():u_(y.Select(),r)},[u.rows,t,r,u.loading]);return w.useEffect(()=>{if(f.current===null)return()=>{};const y=f.current,b=new IntersectionObserver(v=>{var E;return v[v.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void d(!0)):d(!1)});return b.observe(y),()=>b.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[x.jsx(AL,{useWindowScroll:!0,followOutput:"smooth",components:C_,totalCount:g.length,data:g.length===0?D_:g,fixedFooterContent:h?O_:null,itemContent:g.length===0?I_:A_,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(v_,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),x.jsx("div",{"aria-hidden":"true",ref:f,className:"h-0.5 w-full"})]}),l!==null?x.jsx(m_,{...l}):null]})},M_=(e,t)=>typeof t=="function"?t(e):t,ma=(e,t,n)=>e===t||n==null?void 0:n(t),k_=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>sf(e.cols),[e.cols]),[o,s]=hc({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:M_(u[l],c)}};return{cols:a("cols"),sorters:a("sorters"),groups:a("groups"),filters:a("filters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),ma((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),ma((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),ma((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),ma((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(y0.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(h_,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?x.jsx(b0,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):x.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>x.jsx("div",{className:"min-w-full",children:x.jsx(b0,{...e,group:i,index:a,cols:o.cols,pagination:null,rows:i.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${i.groupId}`))})]})})};var F_=String.prototype.replace,N_=/%20/g,uf={RFC1738:"RFC1738",RFC3986:"RFC3986"},ff={default:uf.RFC3986,formatters:{RFC1738:function(e){return F_.call(e,N_,"+")},RFC3986:function(e){return String(e)}},RFC1738:uf.RFC1738,RFC3986:uf.RFC3986},L_=ff,df=Object.prototype.hasOwnProperty,xr=Array.isArray,mn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),__=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(xr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},w0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},V_=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(xr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!df.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return xr(t)&&!xr(n)&&(o=w0(t,r)),xr(t)&&xr(n)?(n.forEach(function(s,i){if(df.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return df.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},$_=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},B_=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},hf=1024,R_=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=hf){for(var c=i.length>=hf?i.slice(l,l+hf):i,u=[],f=0;f<c.length;++f){var h=c.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===L_.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(f);continue}if(h<128){u[u.length]=mn[h];continue}if(h<2048){u[u.length]=mn[192|h>>6]+mn[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=mn[224|h>>12]+mn[128|h>>6&63]+mn[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=mn[240|h>>18]+mn[128|h>>12&63]+mn[128|h>>6&63]+mn[128|h&63]}a+=u.join("")}return a},j_=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return __(n),t},W_=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},H_=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},z_=function(t,n){return[].concat(t,n)},U_=function(t,n){if(xr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},x0={arrayToObject:w0,assign:$_,combine:z_,compact:j_,decode:B_,encode:R_,isBuffer:H_,isRegExp:W_,maybeMap:U_,merge:V_},T0=mx,ga=x0,ks=ff,G_=Object.prototype.hasOwnProperty,S0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},gn=Array.isArray,Y_=Array.prototype.push,E0=function(e,t){Y_.apply(e,gn(t)?t:[t])},K_=Date.prototype.toISOString,C0=ks.default,ct={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ga.encode,encodeValuesOnly:!1,format:C0,formatter:ks.formatters[C0],indices:!1,serializeDate:function(t){return K_.call(t)},skipNulls:!1,strictNullHandling:!1},q_=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},pf={},X_=function e(t,n,r,o,s,i,a,l,c,u,f,h,d,p,m,g,y,b){for(var v=t,S=b,T=0,E=!1;(S=S.get(pf))!==void 0&&!E;){var I=S.get(t);if(T+=1,typeof I<"u"){if(I===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(pf)>"u"&&(T=0)}if(typeof u=="function"?v=u(n,v):v instanceof Date?v=d(v):r==="comma"&&gn(v)&&(v=ga.maybeMap(v,function(M){return M instanceof Date?d(M):M})),v===null){if(i)return c&&!g?c(n,ct.encoder,y,"key",p):n;v=""}if(q_(v)||ga.isBuffer(v)){if(c){var A=g?n:c(n,ct.encoder,y,"key",p);return[m(A)+"="+m(c(v,ct.encoder,y,"value",p))]}return[m(n)+"="+m(String(v))]}var k=[];if(typeof v>"u")return k;var O;if(r==="comma"&&gn(v))g&&c&&(v=ga.maybeMap(v,c)),O=[{value:v.length>0?v.join(",")||null:void 0}];else if(gn(u))O=u;else{var _=Object.keys(v);O=f?_.sort(f):_}var F=l?n.replace(/\./g,"%2E"):n,L=o&&gn(v)&&v.length===1?F+"[]":F;if(s&&gn(v)&&v.length===0)return L+"[]";for(var P=0;P<O.length;++P){var D=O[P],N=typeof D=="object"&&typeof D.value<"u"?D.value:v[D];if(!(a&&N===null)){var $=h&&l?D.replace(/\./g,"%2E"):D,W=gn(v)?typeof r=="function"?r(L,$):L:L+(h?"."+$:"["+$+"]");b.set(t,T);var U=T0();U.set(pf,b),E0(k,e(N,W,r,o,s,i,a,l,r==="comma"&&g&&gn(v)?null:c,u,f,h,d,p,m,g,y,U))}}return k},Q_=function(t){if(!t)return ct;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||ct.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ks.default;if(typeof t.format<"u"){if(!G_.call(ks.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ks.formatters[r],s=ct.filter;(typeof t.filter=="function"||gn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in S0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=ct.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:ct.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:ct.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ct.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ct.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?ct.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:ct.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:ct.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:ct.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:ct.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:ct.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:ct.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ct.strictNullHandling}},Z_=function(e,t){var n=e,r=Q_(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):gn(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=S0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=T0(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||E0(i,X_(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var h=i.join(r.delimiter),d=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),h.length>0?d+h:""},Mo=x0,mf=Object.prototype.hasOwnProperty,J_=Array.isArray,rt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Mo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},e2=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},P0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},t2="utf8=%26%2310003%3B",n2="utf8=%E2%9C%93",r2=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===n2?c="utf-8":i[l]===t2&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],f=u.indexOf("]="),h=f===-1?u.indexOf("="):f+1,d,p;h===-1?(d=n.decoder(u,rt.decoder,c,"key"),p=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,h),rt.decoder,c,"key"),p=Mo.maybeMap(P0(u.slice(h+1),n),function(g){return n.decoder(g,rt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=e2(p)),u.indexOf("[]=")>-1&&(p=J_(p)?[p]:p);var m=mf.call(r,d);m&&n.duplicates==="combine"?r[d]=Mo.combine(r[d],p):(!m||n.duplicates==="last")&&(r[d]=p)}return r},o2=function(e,t,n,r){for(var o=r?t:P0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},s2=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&mf.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(s))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&mf.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),o2(u,n,r,o)}},i2=function(t){if(!t)return rt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?rt.charset:t.charset,r=typeof t.duplicates>"u"?rt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:rt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:rt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:rt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:rt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:rt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:rt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:rt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:rt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:rt.decoder,delimiter:typeof t.delimiter=="string"||Mo.isRegExp(t.delimiter)?t.delimiter:rt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:rt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:rt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:rt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:rt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:rt.strictNullHandling}},a2=function(e,t){var n=i2(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?r2(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=s2(a,r[a],n,typeof e=="string");o=Mo.merge(o,l,n)}return n.allowSparse===!0?o:Mo.compact(o)},l2=Z_,c2=a2,u2=ff,f2={formats:u2,parse:c2,stringify:l2};const d2={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},I0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return f2.parse(n.toString(),d2)},A0=e=>e.replace("[",".").replace("]","").split("."),Fs=(e,t)=>A0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),Ns=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),h2=(e,t)=>{const[n,r]=w.useState(null),o=w.useRef({}),[s,i]=w.useState({}),a=(p,m)=>{const g=Fs(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},l=(p,m)=>{const g=Fs(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},c=(p,m)=>{const g=Fs(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},u=(p,m)=>{const g=Fs(p,e);return{...m,name:p,id:p,required:!g.isOptional(),form:t,type:g._def.typeName==="ZodNumber"?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}};w.useEffect(()=>{const p=Object.values(o.current).map(g=>{const y=g.element.dataset.origin?document.querySelector(`[data-target="${g.element.name}"]`):g.element,b=g.schema.safeParse(Ns(y)),v=T=>{var k;const E=y.dataset.target||y.name;if(!E)return;const I=Ns(T.target)||(T.relatedTarget?Ns(T.relatedTarget):""),A=g.schema.safeParse(I);if(A.success)return y.setCustomValidity(""),i(O=>Wa(O,E,A.data)),r(O=>{const{[E]:_,...F}=O||{};return F===null||yn.empty(F)?null:F});if(y.required){const O=((k=A.error.issues[0])==null?void 0:k.message)||"";y.setCustomValidity(O),r(_=>({..._,[E]:O}))}},S=y.getAttribute("data-trigger")||"blur";return y.addEventListener(S,v),y.tagName==="SELECT"&&y.addEventListener("change",v),{input:g,hasInitialError:y.required?!b.success:!1,unsubscribe:()=>{y.removeEventListener(S,v),y.tagName==="SELECT"&&y.addEventListener("change",v)}}});return p.some(g=>g.hasInitialError)&&r(g=>g===null?{}:g),()=>p.forEach(g=>g.unsubscribe())});const f=w.useCallback(p=>m=>{const g=m.currentTarget,y=Object.values(o.current).reduce((v,S)=>{var k;const T=S.element,E=S.schema.safeParse(Ns(T));if(T.dataset.ignore==="ignore"||E.success)return v;const I=(k=E.error.issues[0])==null?void 0:k.message;T.setAttribute("data-initialized","true");const A=T.dataset.name||T.name||"";return{...v,[A]:I}},{}),b=yn.empty(y)?null:y;r(b),p==null||p({form:g,errors:b||{}})},[]),h=w.useCallback(p=>m=>{m.preventDefault();const g=m.currentTarget;let y=I0(g);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(g.elements)).forEach(S=>{if(S.tagName==="SELECT"){const T=S;y=Wa(y,T.name,T.value)}if(S.tagName==="INPUT"){const T=S;y=Wa(y,T.name,Ns(T))}});const v=e.safeParse(s);return v.success?p({form:g,json:y,data:v.data,event:m,reset:()=>Iu(g),success:!0,errors:[]}):p({form:g,json:y,event:m,data:y,success:!1,reset:()=>Iu(g),errors:v.error.issues.map(S=>({message:S.message,path:S.path.map(T=>String(T))}))})},[t]);return{state:s,input:u,datepicker:a,checkbox:c,select:l,onSubmit:h,errors:n,onInvalid:f,disabled:n!==null,name:t,get:p=>vc(s,p)||""}},p2=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};X.Alert=TP,X.Autocomplete=Dk,X.Button=Nr,X.Calendar=Fg,X.Card=Ng,X.Checkbox=Ev,X.ColType=Do,X.Collapse=Dm,X.ComponentsProvider=lO,X.DatePicker=kk,X.Dropdown=wo,X.Empty=Lg,X.Expand=dk,X.FileUpload=zF,X.Form=GF,X.Input=vs,X.InputFeedback=Tv,X.InputField=Ki,X.Menu=mk,X.MenuItem=pk,X.Modal=Ek,X.Notifications=hD,X.Option=Sv,X.Polymorph=Fr,X.Radiobox=YF,X.RenderOnView=o1,X.Select=yr,X.Stats=pD,X.Switch=KF,X.Tab=yD,X.Table=k_,X.Tabs=mD,X.Tag=a1,X.TaskList=qF,X.Textarea=XF,X.Toolbar=Ck,X.Tooltip=xv,X.TransferList=ML,X.convertPath=A0,X.createColumns=t_,X.createDesignTokens=xg,X.createOptionCols=sf,X.createStyles=nO,X.createTheme=rO,X.css=Oe,X.defaultDarkTheme=iO,X.defaultLightTheme=aO,X.dispatchInput=vd,X.formReset=Iu,X.formToJson=I0,X.getSchemaShape=Fs,X.initializeInputDataset=zs,X.isReactComponent=e1,X.isReactFC=t1,X.isSsr=xi,X.mergeRefs=Ua,X.parsers=pc,X.path=vc,X.reduceTokens=Jr,X.safeRegex=bc,X.splitInto=Ig,X.useForm=h2,X.useNotification=fD,X.usePrevious=p2,X.useReactive=ly,X.useTablePreferences=o_,X.useTranslations=Tt,X.uuid=us,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
195
+ */var pu,_v;function jk(){if(_v)return pu;_v=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return pu=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},pu}var mu,Vv;function gu(){if(Vv)return mu;Vv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return mu=e,mu}var yu,$v;function Bv(){return $v||($v=1,yu=Function.call.bind(Object.prototype.hasOwnProperty)),yu}var vu,Rv;function Hk(){if(Rv)return vu;Rv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=gu(),n={},r=Bv();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var f;try{if(typeof s[u]!="function"){var h=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=s[u](i,u,l,a,null,t)}catch(p){f=p}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=c?c():"";e("Failed "+a+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},vu=o,vu}var bu,jv;function Wk(){if(jv)return bu;jv=1;var e=Lv(),t=jk(),n=gu(),r=Bv(),o=Hk(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return bu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(M){var R=M&&(c&&M[c]||M[u]);if(typeof R=="function")return R}var h="<<anonymous>>",d={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:v,element:S(),elementType:T(),instanceOf:E,node:O(),objectOf:A,oneOf:I,oneOfType:k,shape:F,exact:L};function p(M,R){return M===R?M!==0||1/M===1/R:M!==M&&R!==R}function m(M,R){this.message=M,this.data=R&&typeof R=="object"?R:{},this.stack=""}m.prototype=Error.prototype;function g(M){if(process.env.NODE_ENV!=="production")var R={},q=0;function ee(G,V,j,z,B,Y,te){if(z=z||h,Y=Y||j,te!==n){if(l){var W=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw W.name="Invariant Violation",W}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=z+":"+j;!R[Pe]&&q<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[Pe]=!0,q++)}}return V[j]==null?G?V[j]===null?new m("The "+B+" `"+Y+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+B+" `"+Y+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:M(V,j,z,B,Y)}var Q=ee.bind(null,!1);return Q.isRequired=ee.bind(null,!0),Q}function y(M){function R(q,ee,Q,G,V,j){var z=q[ee],B=N(z);if(B!==M){var Y=$(z);return new m("Invalid "+G+" `"+V+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return g(R)}function b(){return g(i)}function v(M){function R(q,ee,Q,G,V){if(typeof M!="function")return new m("Property `"+V+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var j=q[ee];if(!Array.isArray(j)){var z=N(j);return new m("Invalid "+G+" `"+V+"` of type "+("`"+z+"` supplied to `"+Q+"`, expected an array."))}for(var B=0;B<j.length;B++){var Y=M(j,B,Q,G,V+"["+B+"]",n);if(Y instanceof Error)return Y}return null}return g(R)}function S(){function M(R,q,ee,Q,G){var V=R[q];if(!a(V)){var j=N(V);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return g(M)}function T(){function M(R,q,ee,Q,G){var V=R[q];if(!e.isValidElementType(V)){var j=N(V);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return g(M)}function E(M){function R(q,ee,Q,G,V){if(!(q[ee]instanceof M)){var j=M.name||h,z=U(q[ee]);return new m("Invalid "+G+" `"+V+"` of type "+("`"+z+"` supplied to `"+Q+"`, expected ")+("instance of `"+j+"`."))}return null}return g(R)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function R(q,ee,Q,G,V){for(var j=q[ee],z=0;z<M.length;z++)if(p(j,M[z]))return null;var B=JSON.stringify(M,function(te,W){var Pe=$(W);return Pe==="symbol"?String(W):W});return new m("Invalid "+G+" `"+V+"` of value `"+String(j)+"` "+("supplied to `"+Q+"`, expected one of "+B+"."))}return g(R)}function A(M){function R(q,ee,Q,G,V){if(typeof M!="function")return new m("Property `"+V+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var j=q[ee],z=N(j);if(z!=="object")return new m("Invalid "+G+" `"+V+"` of type "+("`"+z+"` supplied to `"+Q+"`, expected an object."));for(var B in j)if(r(j,B)){var Y=M(j,B,Q,G,V+"."+B,n);if(Y instanceof Error)return Y}return null}return g(R)}function k(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var R=0;R<M.length;R++){var q=M[R];if(typeof q!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(q)+" at index "+R+"."),i}function ee(Q,G,V,j,z){for(var B=[],Y=0;Y<M.length;Y++){var te=M[Y],W=te(Q,G,V,j,z,n);if(W==null)return null;W.data&&r(W.data,"expectedType")&&B.push(W.data.expectedType)}var Pe=B.length>0?", expected one of type ["+B.join(", ")+"]":"";return new m("Invalid "+j+" `"+z+"` supplied to "+("`"+V+"`"+Pe+"."))}return g(ee)}function O(){function M(R,q,ee,Q,G){return P(R[q])?null:new m("Invalid "+Q+" `"+G+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return g(M)}function _(M,R,q,ee,Q){return new m((M||"React class")+": "+R+" type `"+q+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function F(M){function R(q,ee,Q,G,V){var j=q[ee],z=N(j);if(z!=="object")return new m("Invalid "+G+" `"+V+"` of type `"+z+"` "+("supplied to `"+Q+"`, expected `object`."));for(var B in M){var Y=M[B];if(typeof Y!="function")return _(Q,G,V,B,$(Y));var te=Y(j,B,Q,G,V+"."+B,n);if(te)return te}return null}return g(R)}function L(M){function R(q,ee,Q,G,V){var j=q[ee],z=N(j);if(z!=="object")return new m("Invalid "+G+" `"+V+"` of type `"+z+"` "+("supplied to `"+Q+"`, expected `object`."));var B=t({},q[ee],M);for(var Y in B){var te=M[Y];if(r(M,Y)&&typeof te!="function")return _(Q,G,V,Y,$(te));if(!te)return new m("Invalid "+G+" `"+V+"` key `"+Y+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(q[ee],null," ")+`
196
+ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var W=te(j,Y,Q,G,V+"."+Y,n);if(W)return W}return null}return g(R)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||a(M))return!0;var R=f(M);if(R){var q=R.call(M),ee;if(R!==M.entries){for(;!(ee=q.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=q.next()).done;){var Q=ee.value;if(Q&&!P(Q[1]))return!1}}else return!1;return!0;default:return!1}}function D(M,R){return M==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function N(M){var R=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":D(R,M)?"symbol":R}function $(M){if(typeof M>"u"||M===null)return""+M;var R=N(M);if(R==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return R}function H(M){var R=$(M);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function U(M){return!M.constructor||!M.constructor.name?h:M.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},bu}var wu,Hv;function zk(){if(Hv)return wu;Hv=1;var e=gu();function t(){}function n(){}return n.resetWarningCache=t,wu=function(){function r(i,a,l,c,u,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},wu}if(process.env.NODE_ENV!=="production"){var Uk=Lv(),Gk=!0;hu.exports=Wk()(Uk.isElement,Gk)}else hu.exports=zk()();var Yk=hu.exports;const Ne=F0(Yk);function So(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(f){i(f)}}function l(u){try{c(r.throw(u))}catch(f){i(f)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Eo(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Wv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function zv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Kk=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function ws(e,t){var n=qk(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function qk(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=Kk.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var Xk=[".DS_Store","Thumbs.db"];function Qk(e){return So(this,void 0,void 0,function(){return Eo(this,function(t){return Ji(e)&&Zk(e.dataTransfer)?[2,nF(e.dataTransfer,e.type)]:Jk(e)?[2,eF(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,tF(e)]:[2,[]]})})}function Zk(e){return Ji(e)}function Jk(e){return Ji(e)&&Ji(e.target)}function Ji(e){return typeof e=="object"&&e!==null}function eF(e){return xu(e.target.files).map(function(t){return ws(t)})}function tF(e){return So(this,void 0,void 0,function(){var t;return Eo(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return ws(r)})]}})})}function nF(e,t){return So(this,void 0,void 0,function(){var n,r;return Eo(this,function(o){switch(o.label){case 0:return e.items?(n=xu(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(rF))]):[3,2];case 1:return r=o.sent(),[2,Uv(Gv(r))];case 2:return[2,Uv(xu(e.files).map(function(s){return ws(s)}))]}})})}function Uv(e){return e.filter(function(t){return Xk.indexOf(t.name)===-1})}function xu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function rF(e){if(typeof e.webkitGetAsEntry!="function")return Yv(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Kv(t):Yv(e)}function Gv(e){return e.reduce(function(t,n){return zv(zv([],Wv(t),!1),Wv(Array.isArray(n)?Gv(n):[n]),!1)},[])}function Yv(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=ws(t);return Promise.resolve(n)}function oF(e){return So(this,void 0,void 0,function(){return Eo(this,function(t){return[2,e.isDirectory?Kv(e):sF(e)]})})}function Kv(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return So(i,void 0,void 0,function(){var l,c,u;return Eo(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(oF)),o.push(u),s(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function sF(e){return So(this,void 0,void 0,function(){return Eo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=ws(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var iF=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function qv(e){return cF(e)||lF(e)||Jv(e)||aF()}function aF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
197
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cF(e){if(Array.isArray(e))return Tu(e)}function Xv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xv(Object(n),!0).forEach(function(r){Zv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xs(e,t){return dF(e)||fF(e,t)||Jv(e,t)||uF()}function uF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
198
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jv(e,t){if(e){if(typeof e=="string")return Tu(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 Tu(e,t)}}function Tu(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 fF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function dF(e){if(Array.isArray(e))return e}var hF="file-invalid-type",pF="file-too-large",mF="file-too-small",gF="too-many-files",yF=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:hF,message:"File type must be ".concat(n)}},eb=function(t){return{code:pF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},tb=function(t){return{code:mF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},vF={code:gF,message:"Too many files"};function nb(e,t){var n=e.type==="application/x-moz-file"||iF(e,t);return[n,n?null:yF(t)]}function rb(e,t,n){if(yr(e.size))if(yr(t)&&yr(n)){if(e.size>n)return[!1,eb(n)];if(e.size<t)return[!1,tb(t)]}else{if(yr(t)&&e.size<t)return[!1,tb(t)];if(yr(n)&&e.size>n)return[!1,eb(n)]}return[!0,null]}function yr(e){return e!=null}function bF(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=nb(l,n),u=xs(c,1),f=u[0],h=rb(l,r,o),d=xs(h,1),p=d[0],m=a?a(l):null;return f&&p&&!m})}function ea(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ta(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 ob(e){e.preventDefault()}function wF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function xF(e){return e.indexOf("Edge/")!==-1}function TF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return wF(e)||xF(e)}function un(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!ea(r)&&a&&a.apply(void 0,[r].concat(s)),ea(r)})}}function SF(){return"showOpenFilePicker"in window}function EF(e){if(yr(e)){var t=Object.entries(e).filter(function(n){var r=xs(n,2),o=r[0],s=r[1],i=!0;return sb(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.')),i=!1),(!Array.isArray(s)||!s.every(ib))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=xs(r,2),s=o[0],i=o[1];return Qv(Qv({},n),{},Zv({},s,i))},{});return[{description:"Files",accept:t}]}return e}function CF(e){if(yr(e))return Object.entries(e).reduce(function(t,n){var r=xs(n,2),o=r[0],s=r[1];return[].concat(qv(t),[o],qv(s))},[]).filter(function(t){return sb(t)||ib(t)}).join(",")}function PF(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function IF(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function sb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function ib(e){return/^.*\.[\w]+$/.test(e)}var AF=["children"],OF=["open"],DF=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],MF=["refKey","onChange","onClick"];function kF(e){return LF(e)||NF(e)||ab(e)||FF()}function FF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
199
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LF(e){if(Array.isArray(e))return Eu(e)}function Su(e,t){return $F(e)||VF(e,t)||ab(e,t)||_F()}function _F(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ab(e,t){if(e){if(typeof e=="string")return Eu(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 Eu(e,t)}}function Eu(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 VF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function $F(e){if(Array.isArray(e))return e}function lb(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 ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lb(Object(n),!0).forEach(function(r){Cu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function na(e,t){if(e==null)return{};var n=BF(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BF(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Pu=w.forwardRef(function(e,t){var n=e.children,r=na(e,AF),o=ub(r),s=o.open,i=na(o,OF);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(ze(ze({},i),{},{open:s})))});Pu.displayName="Dropzone";var cb={disabled:!1,getFilesFromEvent:Qk,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Pu.defaultProps=cb,Pu.propTypes={children:Ne.func,accept:Ne.objectOf(Ne.arrayOf(Ne.string)),multiple:Ne.bool,preventDropOnDocument:Ne.bool,noClick:Ne.bool,noKeyboard:Ne.bool,noDrag:Ne.bool,noDragEventsBubbling:Ne.bool,minSize:Ne.number,maxSize:Ne.number,maxFiles:Ne.number,disabled:Ne.bool,getFilesFromEvent:Ne.func,onFileDialogCancel:Ne.func,onFileDialogOpen:Ne.func,useFsAccessApi:Ne.bool,autoFocus:Ne.bool,onDragEnter:Ne.func,onDragLeave:Ne.func,onDragOver:Ne.func,onDrop:Ne.func,onDropAccepted:Ne.func,onDropRejected:Ne.func,onError:Ne.func,validator:Ne.func};var Iu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ub(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ze(ze({},cb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,h=t.onDrop,d=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,v=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,I=t.noDragEventsBubbling,A=t.onError,k=t.validator,O=w.useMemo(function(){return CF(n)},[n]),_=w.useMemo(function(){return EF(n)},[n]),F=w.useMemo(function(){return typeof g=="function"?g:fb},[g]),L=w.useMemo(function(){return typeof m=="function"?m:fb},[m]),P=w.useRef(null),D=w.useRef(null),N=w.useReducer(RF,Iu),$=Su(N,2),H=$[0],U=$[1],M=H.isFocused,R=H.isFileDialogActive,q=w.useRef(typeof window<"u"&&window.isSecureContext&&y&&SF()),ee=function(){!q.current&&R&&setTimeout(function(){if(D.current){var oe=D.current.files;oe.length||(U({type:"closeDialog"}),L())}},300)};w.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[D,R,L,q]);var Q=w.useRef([]),G=function(oe){P.current&&P.current.contains(oe.target)||(oe.preventDefault(),Q.current=[])};w.useEffect(function(){return v&&(document.addEventListener("dragover",ob,!1),document.addEventListener("drop",G,!1)),function(){v&&(document.removeEventListener("dragover",ob),document.removeEventListener("drop",G))}},[P,v]),w.useEffect(function(){return!r&&b&&P.current&&P.current.focus(),function(){}},[P,b,r]);var V=w.useCallback(function(J){A?A(J):console.error(J)},[A]),j=w.useCallback(function(J){J.preventDefault(),J.persist(),be(J),Q.current=[].concat(kF(Q.current),[J.target]),ta(J)&&Promise.resolve(o(J)).then(function(oe){if(!(ea(J)&&!I)){var xe=oe.length,He=xe>0&&bF({files:oe,accept:O,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:k}),vt=xe>0&&!He;U({isDragAccept:He,isDragReject:vt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(J)}}).catch(function(oe){return V(oe)})},[o,c,V,I,O,i,s,a,l,k]),z=w.useCallback(function(J){J.preventDefault(),J.persist(),be(J);var oe=ta(J);if(oe&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(J),!1},[f,I]),B=w.useCallback(function(J){J.preventDefault(),J.persist(),be(J);var oe=Q.current.filter(function(He){return P.current&&P.current.contains(He)}),xe=oe.indexOf(J.target);xe!==-1&&oe.splice(xe,1),Q.current=oe,!(oe.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ta(J)&&u&&u(J))},[P,u,I]),Y=w.useCallback(function(J,oe){var xe=[],He=[];J.forEach(function(vt){var Pt=nb(vt,O),Ot=Su(Pt,2),Sr=Ot[0],Fo=Ot[1],No=rb(vt,i,s),wa=Su(No,2),yf=wa[0],vf=wa[1],bf=k?k(vt):null;if(Sr&&yf&&!bf)xe.push(vt);else{var wf=[Fo,vf];bf&&(wf=wf.concat(bf)),He.push({file:vt,errors:wf.filter(function(y2){return y2})})}}),(!a&&xe.length>1||a&&l>=1&&xe.length>l)&&(xe.forEach(function(vt){He.push({file:vt,errors:[vF]})}),xe.splice(0)),U({acceptedFiles:xe,fileRejections:He,type:"setFiles"}),h&&h(xe,He,oe),He.length>0&&p&&p(He,oe),xe.length>0&&d&&d(xe,oe)},[U,a,O,i,s,l,h,d,p,k]),te=w.useCallback(function(J){J.preventDefault(),J.persist(),be(J),Q.current=[],ta(J)&&Promise.resolve(o(J)).then(function(oe){ea(J)&&!I||Y(oe,J)}).catch(function(oe){return V(oe)}),U({type:"reset"})},[o,Y,V,I]),W=w.useCallback(function(){if(q.current){U({type:"openDialog"}),F();var J={multiple:a,types:_};window.showOpenFilePicker(J).then(function(oe){return o(oe)}).then(function(oe){Y(oe,null),U({type:"closeDialog"})}).catch(function(oe){PF(oe)?(L(oe),U({type:"closeDialog"})):IF(oe)?(q.current=!1,D.current?(D.current.value=null,D.current.click()):V(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."))):V(oe)});return}D.current&&(U({type:"openDialog"}),F(),D.current.value=null,D.current.click())},[U,F,L,y,Y,V,_,a]),Pe=w.useCallback(function(J){!P.current||!P.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),W())},[P,W]),Xe=w.useCallback(function(){U({type:"focus"})},[]),_e=w.useCallback(function(){U({type:"blur"})},[]),Qe=w.useCallback(function(){S||(TF()?setTimeout(W,0):W())},[S,W]),ae=function(oe){return r?null:oe},ge=function(oe){return T?null:ae(oe)},se=function(oe){return E?null:ae(oe)},be=function(oe){I&&oe.stopPropagation()},ot=w.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=J.refKey,xe=oe===void 0?"ref":oe,He=J.role,vt=J.onKeyDown,Pt=J.onFocus,Ot=J.onBlur,Sr=J.onClick,Fo=J.onDragEnter,No=J.onDragOver,wa=J.onDragLeave,yf=J.onDrop,vf=na(J,DF);return ze(ze(Cu({onKeyDown:ge(un(vt,Pe)),onFocus:ge(un(Pt,Xe)),onBlur:ge(un(Ot,_e)),onClick:ae(un(Sr,Qe)),onDragEnter:se(un(Fo,j)),onDragOver:se(un(No,z)),onDragLeave:se(un(wa,B)),onDrop:se(un(yf,te)),role:typeof He=="string"&&He!==""?He:"presentation"},xe,P),!r&&!T?{tabIndex:0}:{}),vf)}},[P,Pe,Xe,_e,Qe,j,z,B,te,T,E,r]),we=w.useCallback(function(J){J.stopPropagation()},[]),st=w.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=J.refKey,xe=oe===void 0?"ref":oe,He=J.onChange,vt=J.onClick,Pt=na(J,MF),Ot=Cu({accept:O,multiple:a,type:"file",style:{display:"none"},onChange:ae(un(He,te)),onClick:ae(un(vt,we)),tabIndex:-1},xe,D);return ze(ze({},Ot),Pt)}},[D,n,a,te,r]);return ze(ze({},H),{},{isFocused:M&&!r,getRootProps:ot,getInputProps:st,rootRef:P,inputRef:D,open:ae(W)})}function RF(e,t){switch(t.type){case"focus":return ze(ze({},e),{},{isFocused:!0});case"blur":return ze(ze({},e),{},{isFocused:!1});case"openDialog":return ze(ze({},Iu),{},{isFileDialogActive:!0});case"closeDialog":return ze(ze({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ze(ze({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ze(ze({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ze({},Iu);default:return e}}function fb(){}const jF={isImage:e=>e.type.includes("image")},HF=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(jF.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Mv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Mv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Lr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Kr,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(Am,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Lr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Kr,{className:"text-danger"})})]})},WF=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(HF,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),zF=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(WF,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),UF=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(xP,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),GF=({idle:e=UF,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=f=>{n==null||n(f),s(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=ub({onDrop:i});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(zF,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},YF=["INPUT","SELECT"],Au=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{YF.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},KF=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},qF=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:Oe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),vr=w.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:f,left:h,error:d,...p},m)=>{const g=Tt(),y=w.useRef(null),b=p.id??p.name;w.useImperativeHandle(m,()=>y.current),w.useEffect(()=>{if(y.current===null)return;const S=y.current,T=Us(y.current),E=()=>S.setAttribute("data-selected","true");return S.addEventListener("change",E),()=>{T(),S.removeEventListener("change",E)}},[]);const v=()=>{var S;return(S=y.current)==null?void 0:S.focus()};return x.jsx(Qi,{info:n,left:h,error:d,form:p.form,name:p.name,feedback:o,hideLeft:u,required:e,title:p.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:p.name||p.id,optionalText:l,labelClassName:s,placeholder:p.placeholder,right:x.jsx("label",{htmlFor:b,children:x.jsxs("button",{onClick:v,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Pm,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:b,name:b,value:p.value,required:e,ref:Ka(m,y),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:Oe("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(S=>x.jsx("option",{...S,children:S.label??S.value},`${b}-select-option-${S.value}`))]})})}),Ou=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},XF=w.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=w.useId(),[i,a]=w.useState(r.checked??!1),l=i,c=w.useRef(null),u=Ou(r.onChange);w.useImperativeHandle(o,()=>c.current),w.useEffect(()=>{if(c.current!==null&&u.current){const h=d=>{d.target.checked=!d.target.checked,u.current&&u.current(d)};return c.current.addEventListener("change",h),()=>{var d;return(d=c.current)==null?void 0:d.removeEventListener("change",h)}}},[]);const f=()=>{var d,p;const h=!((d=c.current)!=null&&d.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),c.current!==null&&(c.current.checked=h,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:Oe("flex flex-wrap items-center",t),"data-component":"switch",children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:h=>a(h.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),QF=e=>{const[t,n]=eP();return w.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:sP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},ZF=Iv("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
201
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),ra=0,Kn=1,Co=2,db=4;function Ts(e,t){return n=>e(t(n))}function JF(e,t){return t(e)}function hb(e,t){return n=>e(t,n)}function pb(e,t){return()=>e(t)}function oa(e,t){return t(e),e}function Re(...e){return e}function eN(e){e()}function mb(e){return()=>e}function tN(...e){return()=>{e.map(eN)}}function Du(e){return e!==void 0}function br(){}function Me(e,t){return e(Kn,t)}function de(e,t){e(ra,t)}function Mu(e){e(Co)}function Et(e){return e(db)}function ie(e,t){return Me(e,hb(t,ra))}function fn(e,t){const n=e(Kn,r=>{n(),t(r)});return n}function ye(){const e=[];return(t,n)=>{switch(t){case Co:e.splice(0,e.length);return;case Kn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ra:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Z(e){let t=e;const n=ye();return(r,o)=>{switch(r){case Kn:o(t);break;case ra:t=o;break;case db:return t}return n(r,o)}}function nN(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case Kn:return s?n===s?void 0:(r(),n=s,t=Me(e,s),t):(r(),br);case Co:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function $t(e){return oa(ye(),t=>ie(e,t))}function Ct(e,t){return oa(Z(t),n=>ie(e,n))}function rN(...e){return t=>e.reduceRight(JF,t)}function K(e,...t){const n=rN(...t);return(r,o)=>{switch(r){case Kn:return Me(e,n(o));case Co:Mu(e);return}}}function gb(e,t){return e===t}function je(e=gb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ce(e){return t=>n=>{e(n)&&t(n)}}function re(e){return t=>Ts(t,e)}function dn(e){return t=>()=>t(e)}function hn(e,t){return n=>r=>n(t=e(t,r))}function Po(e){return t=>n=>{e>0?e--:t(n)}}function qn(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function yb(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function he(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Me(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function vb(...e){return function(t,n){switch(t){case Kn:return tN(...e.map(r=>Me(r,n)));case Co:return;default:throw new Error(`unrecognized action ${t}`)}}}function ue(e,t=gb){return K(e,je(t))}function ht(...e){const t=ye(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Me(s,l=>{n[i]=l,r=r|a,r===o&&de(t,n)})}),function(s,i){switch(s){case Kn:return r===o&&i(n),Me(t,i);case Co:return Mu(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ce(e,t=[],{singleton:n}={singleton:!0}){return{id:oN(),constructor:e,dependencies:t,singleton:n}}const oN=()=>Symbol();function sN(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function iN(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const sa=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ku(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=w.createContext({});function l(y,b){y.propsReady&&de(y.propsReady,!1);for(const v of r){const S=y[t.required[v]];de(S,b[v])}for(const v of o)if(v in b){const S=y[t.optional[v]];de(S,b[v])}y.propsReady&&de(y.propsReady,!0)}function c(y){return s.reduce((b,v)=>(b[v]=S=>{const T=y[t.methods[v]];de(T,S)},b),{})}function u(y){return i.reduce((b,v)=>(b[v]=nN(y[t.events[v]]),b),{})}const f=w.forwardRef((y,b)=>{const{children:v,...S}=y,[T]=w.useState(()=>oa(sN(e),I=>l(I,S))),[E]=w.useState(pb(u,T));return sa(()=>{for(const I of i)I in S&&Me(E[I],S[I]);return()=>{Object.values(E).map(Mu)}},[S,E,T]),sa(()=>{l(T,S)}),w.useImperativeHandle(b,mb(c(T))),w.createElement(a.Provider,{value:T},n?w.createElement(n,iN([...r,...o,...i],S),v):v)}),h=y=>w.useCallback(hb(de,w.useContext(a)[y]),[y]),d=y=>{const v=w.useContext(a)[y],S=w.useCallback(T=>Me(v,T),[v]);return w.useSyncExternalStore(S,()=>Et(v),()=>Et(v))},p=y=>{const v=w.useContext(a)[y],[S,T]=w.useState(pb(Et,v));return sa(()=>Me(v,E=>{E!==S&&T(mb(E))}),[v,S]),S},m=w.version.startsWith("18")?d:p;return{Component:f,usePublisher:h,useEmitterValue:m,useEmitter:(y,b)=>{const S=w.useContext(a)[y];sa(()=>Me(S,b),[b,S])}}}const aN=typeof document<"u"?w.useLayoutEffect:w.useEffect;var Bt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Bt||{});const lN={0:"debug",1:"log",2:"warn",3:"error"},cN=()=>typeof globalThis>"u"?window:globalThis,Xn=Ce(()=>{const e=Z(3);return{log:Z((n,r,o=1)=>{var s;const i=(s=cN().VIRTUOSO_LOG_LEVEL)!=null?s:Et(e);o>=i&&console[lN[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Fu(e,t=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function pn(e,t=!0){return Fu(e,t).callbackRef}function bb(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=uN(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",h=i?i.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,d=i?i.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:d,viewportHeight:p}),s==null||s(fN("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Fu(a,n)}function uN(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Bt.ERROR),u===c)continue;const f=s[s.length-1];s.length===0||f.size!==u||f.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function fN(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Bt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Yt(e,t){return Math.round(e.getBoundingClientRect()[t])}function wb(e,t){return Math.abs(e-t)<1.01}function xb(e,t,n,r=br,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(f=>{const h=f.target,d=h===window||h===document,p=d?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=d?document.documentElement.scrollHeight:h.scrollHeight,g=d?window.innerHeight:h.offsetHeight,y=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};f.suppressFlushSync?y():xa.flushSync(y),i.current!==null&&(p===i.current||p<=0||p===m-g)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const f=o||s.current;return r(o||s.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(f){const h=s.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const d=f.behavior==="smooth";let p,m,g;h===window?(m=Math.max(Yt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=h.scrollHeight,p=Yt(h,"height"),g=h.scrollTop);const y=m-p;if(f.top=Math.ceil(Math.max(Math.min(y,f.top),0)),wb(p,m)||f.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),d&&t(!0);return}d?(i.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,h.scrollTo(f)}function u(f){s.current.scrollBy(f)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const At=Ce(()=>{const e=ye(),t=ye(),n=Z(0),r=ye(),o=Z(0),s=ye(),i=ye(),a=Z(0),l=Z(0),c=Z(0),u=Z(0),f=ye(),h=ye(),d=Z(!1);return ie(K(e,re(({scrollTop:p})=>p)),t),ie(K(e,re(({scrollHeight:p})=>p)),i),ie(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:f,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:d}},[],{singleton:!0}),Ss={lvl:0};function Tb(e,t,n,r=Ss,o=Ss){return{k:e,v:t,lvl:n,l:r,r:o}}function Le(e){return e===Ss}function Io(){return Ss}function Nu(e,t){if(Le(e))return Ss;const{k:n,l:r,r:o}=e;if(t===n){if(Le(r))return o;if(Le(o))return r;{const[s,i]=Sb(r);return ia(lt(e,{k:s,v:i,l:Eb(r)}))}}else return t<n?ia(lt(e,{l:Nu(r,t)})):ia(lt(e,{r:Nu(o,t)}))}function Es(e,t){if(!Le(e))return t===e.k?e.v:t<e.k?Es(e.l,t):Es(e.r,t)}function Kt(e,t,n="k"){if(Le(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Kt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Kt(e.l,t,n)}function Rt(e,t,n){return Le(e)?Tb(t,n,1):t===e.k?lt(e,{k:t,v:n}):t<e.k?Cb(lt(e,{l:Rt(e.l,t,n)})):Cb(lt(e,{r:Rt(e.r,t,n)}))}function Lu(e,t,n){if(Le(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Lu(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Lu(i,t,n))),a}function wr(e){return Le(e)?[]:[...wr(e.l),{k:e.k,v:e.v},...wr(e.r)]}function Sb(e){return Le(e.r)?[e.k,e.v]:Sb(e.r)}function Eb(e){return Le(e.r)?e.l:ia(lt(e,{r:Eb(e.r)}))}function lt(e,t){return Tb(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function _u(e){return Le(e)||e.lvl>e.r.lvl}function Cb(e){return Vu(Ib(e))}function ia(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(_u(t))return Ib(lt(e,{lvl:r-1}));if(!Le(t)&&!Le(t.r))return lt(t.r,{l:lt(t,{r:t.r.l}),r:lt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(_u(e))return Vu(lt(e,{lvl:r-1}));if(!Le(n)&&!Le(n.l)){const o=n.l,s=_u(o)?n.lvl-1:n.lvl;return lt(o,{l:lt(e,{r:o.l,lvl:r-1}),r:Vu(lt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function aa(e,t,n){if(Le(e))return[];const r=Kt(e,t)[0];return dN(Lu(e,r,n))}function Pb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function dN(e){return Pb(e,({k:t,v:n})=>({index:t,value:n}))}function Vu(e){const{r:t,lvl:n}=e;return!Le(t)&&!Le(t.r)&&t.lvl===n&&t.r.lvl===n?lt(t,{l:lt(e,{r:t.l}),lvl:n+1}):e}function Ib(e){const{l:t}=e;return!Le(t)&&t.lvl===e.lvl?lt(t,{r:lt(e,{l:t.r})}):e}function la(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Ab(e,t,n){return e[la(e,t,n)]}function hN(e,t,n,r){const o=la(e,t,r),s=la(e,n,r,o);return e.slice(o,s+1)}const $u=Ce(()=>({recalcInProgress:Z(!1)}),[],{singleton:!0});function pN(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function Ob(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function mN(e,t){let n=Le(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Le(e)){e=Rt(e,0,o);continue}const a=aa(e,s-1,i+1);if(a.some(pN(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:h}of a)l?(i>=u||o===h)&&(e=Nu(e,u)):(c=h!==o,l=!0),f>i&&i>=u&&h!==o&&(e=Rt(e,i+1,h));c&&(e=Rt(e,s,o))}return[e,n]}function gN(){return{offsetTree:[],sizeTree:Io(),groupOffsetTree:Io(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Bu({index:e},t){return t===e?0:t<e?-1:1}function yN({offset:e},t){return t===e?0:t<e?-1:1}function vN(e){return{index:e.index,value:e}}function bN(e,t,n,r=0){return r>0&&(t=Math.max(t,Ab(e,r,Bu).offset)),Pb(hN(e,t,n,yN),vN)}function Ru(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=la(o,t-1,Bu),a=o[l].offset;const u=Kt(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===Kt(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of aa(n,t,1/0)){const f=c-s,h=f*i+a+f*r;o.push({offset:h,size:u,index:c}),s=c,a=h,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function wN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Bt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Le(s)&&t.length===2){const h=t[0].size,d=t[1].size;i=n.reduce((p,m)=>Rt(Rt(p,m,h),m+1,d),i)}else[i,a]=mN(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Ru(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((h,d)=>Rt(h,d,Cs(d,l,o)),Io()),groupIndices:n}}function Cs(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=Ab(t,e,Bu),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function xN(e){return typeof e.groupIndex<"u"}function Db(e,t,n){if(xN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Mb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Mb(e,t){if(!ca(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function ca(e){return!Le(e.groupOffsetTree)}function TN(e){return wr(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const SN={offsetHeight:"height",offsetWidth:"width"},mn=Ce(([{log:e},{recalcInProgress:t}])=>{const n=ye(),r=ye(),o=Ct(r,0),s=ye(),i=ye(),a=Z(0),l=Z([]),c=Z(void 0),u=Z(void 0),f=Z((T,E)=>Yt(T,SN[E])),h=Z(void 0),d=Z(0),p=gN(),m=Ct(K(n,he(l,e,d),hn(wN,p),je()),p),g=Ct(K(l,je(),hn((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),re(({prev:T})=>T)),[]);ie(K(l,ce(T=>T.length>0),he(m,d),re(([T,E,I])=>{const A=T.reduce((k,O,_)=>Rt(k,O,Cs(O,E.offsetTree,I)||_),Io());return{...E,groupIndices:T,groupOffsetTree:A}})),m),ie(K(r,he(m),ce(([T,{lastIndex:E}])=>T<E),re(([T,{lastIndex:E,lastSize:I}])=>[{startIndex:T,endIndex:E,size:I}])),n),ie(c,u);const y=Ct(K(c,re(T=>T===void 0)),!0);ie(K(u,ce(T=>T!==void 0&&Le(Et(m).sizeTree)),re(T=>[{startIndex:0,endIndex:0,size:T}])),n);const b=$t(K(n,he(m),hn(({sizes:T},[E,I])=>({changed:I!==T,sizes:I}),{changed:!1,sizes:p}),re(T=>T.changed)));Me(K(a,hn((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),re(T=>T.diff)),T=>{const{groupIndices:E}=Et(m);if(T>0)de(t,!0),de(s,T+Ob(T,E));else if(T<0){const I=Et(g);I.length>0&&(T-=Ob(-T,I)),de(i,T)}}),Me(K(a,he(e)),([T,E])=>{T<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Bt.ERROR)});const v=$t(s);ie(K(s,he(m),re(([T,E])=>{const I=E.groupIndices.length>0,A=[],k=E.lastSize;if(I){const O=Es(E.sizeTree,0);let _=0,F=0;for(;_<T;){const D=E.groupIndices[F],N=E.groupIndices.length===F+1?1/0:E.groupIndices[F+1]-D-1;A.push({startIndex:D,endIndex:D,size:O}),A.push({startIndex:D+1,endIndex:D+1+N-1,size:k}),F++,_+=N+1}const L=wr(E.sizeTree);return _!==T&&L.shift(),L.reduce((D,{k:N,v:$})=>{let H=D.ranges;return D.prevSize!==0&&(H=[...D.ranges,{startIndex:D.prevIndex,endIndex:N+T-1,size:D.prevSize}]),{ranges:H,prevIndex:N+T,prevSize:$}},{ranges:A,prevIndex:T,prevSize:0}).ranges}return wr(E.sizeTree).reduce((O,{k:_,v:F})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:_+T-1,size:O.prevSize}],prevIndex:_+T,prevSize:F}),{ranges:[],prevIndex:0,prevSize:k}).ranges})),n);const S=$t(K(i,he(m,d),re(([T,{offsetTree:E},I])=>{const A=-T;return Cs(A,E,I)})));return ie(K(i,he(m,d),re(([T,E,I])=>{if(E.groupIndices.length>0){if(Le(E.sizeTree))return E;let k=Io();const O=Et(g);let _=0,F=0,L=0;for(;_<-T;){L=O[F];const D=O[F+1]-L-1;F++,_+=D+1}if(k=wr(E.sizeTree).reduce((D,{k:N,v:$})=>Rt(D,Math.max(0,N+T),$),k),_!==-T){const D=Es(E.sizeTree,L);k=Rt(k,0,D);const N=Kt(E.sizeTree,-T+1)[1];k=Rt(k,1,N)}return{...E,sizeTree:k,...Ru(E.offsetTree,0,k,I)}}else{const k=wr(E.sizeTree).reduce((O,{k:_,v:F})=>Rt(O,Math.max(0,_+T),F),Io());return{...E,sizeTree:k,...Ru(E.offsetTree,0,k,I)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:S,beforeUnshiftWith:v,firstItemIndex:a,gap:d,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:y,itemSize:f}},Re(Xn,$u),{singleton:!0}),EN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function kb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!EN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ps=Ce(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:h}])=>{const d=ye(),p=ye(),m=Z(0);let g=null,y=null,b=null;function v(){g&&(g(),g=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),de(o,!1)}return ie(K(d,he(e,s,t,m,l,c,h),he(r,u,f),re(([[S,T,E,I,A,k,O,_],F,L,P])=>{const D=kb(S),{align:N,behavior:$,offset:H}=D,U=I-1,M=Db(D,T,U);let R=Cs(M,T.offsetTree,F)+k;N==="end"?(R+=L+Kt(T.sizeTree,M)[1]-E+P,M===U&&(R+=O)):N==="center"?R+=(L+Kt(T.sizeTree,M)[1]-E+P)/2:R-=A,H&&(R+=H);const q=ee=>{v(),ee?(_("retrying to scroll to",{location:S},Bt.DEBUG),de(d,S)):(de(p,!0),_("list did not change, scroll successful",{},Bt.DEBUG))};if(v(),$==="smooth"){let ee=!1;b=Me(n,Q=>{ee=ee||Q}),g=fn(a,()=>{q(ee)})}else g=fn(K(n,CN(150)),q);return y=setTimeout(()=>{v()},1200),de(o,!0),_("scrolling from index to",{index:M,top:R,behavior:$},Bt.DEBUG),{top:R,behavior:$}})),i),{scrollToIndex:d,scrollTargetReached:p,topListHeight:m}},Re(mn,At,Xn),{singleton:!0});function CN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Is="up",As="down",PN="none",IN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},AN=0,Os=Ce(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=Z(!1),a=Z(!0),l=ye(),c=ye(),u=Z(4),f=Z(AN),h=Ct(K(vb(K(ue(t),Po(1),dn(!0)),K(ue(t),Po(1),dn(!1),yb(100))),je()),!1),d=Ct(K(vb(K(s,dn(!0)),K(s,dn(!1),yb(200))),je()),!1);ie(K(ht(ue(t),ue(f)),re(([b,v])=>b<=v),je()),a),ie(K(a,qn(50)),c);const p=$t(K(ht(e,ue(n),ue(r),ue(o),ue(u)),hn((b,[{scrollTop:v,scrollHeight:S},T,E,I,A])=>{const k=v+T-S>-A,O={viewportHeight:T,scrollTop:v,scrollHeight:S};if(k){let F,L;return v>b.state.scrollTop?(F="SCROLLED_DOWN",L=b.state.scrollTop-v):(F="SIZE_DECREASED",L=b.state.scrollTop-v||b.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:F,scrollTopDelta:L}}let _;return O.scrollHeight>b.state.scrollHeight?_="SIZE_INCREASED":T<b.state.viewportHeight?_="VIEWPORT_HEIGHT_DECREASING":v<b.state.scrollTop?_="SCROLLING_UPWARDS":_="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:_,state:O}},IN),je((b,v)=>b&&b.atBottom===v.atBottom))),m=Ct(K(e,hn((b,{scrollTop:v,scrollHeight:S,viewportHeight:T})=>{if(wb(b.scrollHeight,S))return{scrollTop:v,scrollHeight:S,jump:0,changed:!1};{const E=S-(v+T)<1;return b.scrollTop!==v&&E?{scrollHeight:S,scrollTop:v,jump:b.scrollTop-v,changed:!0}:{scrollHeight:S,scrollTop:v,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ce(b=>b.changed),re(b=>b.jump)),0);ie(K(p,re(b=>b.atBottom)),i),ie(K(i,qn(50)),l);const g=Z(As);ie(K(e,re(({scrollTop:b})=>b),je(),hn((b,v)=>Et(d)?{direction:b.direction,prevScrollTop:v}:{direction:v<b.prevScrollTop?Is:As,prevScrollTop:v},{direction:As,prevScrollTop:0}),re(b=>b.direction)),g),ie(K(e,qn(50),dn(PN)),g);const y=Z(0);return ie(K(h,ce(b=>!b),dn(0)),y),ie(K(t,qn(100),he(h),ce(([b,v])=>!!v),hn(([b,v],[S])=>[v,S],[0,0]),re(([b,v])=>v-b)),y),{isScrolling:h,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:y,lastJumpDueToItemResize:m}},Re(At)),Qn=Ce(([{log:e}])=>{const t=Z(!1),n=$t(K(t,ce(r=>r),je()));return Me(t,r=>{r&&Et(e)("props updated",{},Bt.DEBUG)}),{propsReady:t,didMount:n}},Re(Xn),{singleton:!0});function ju(e,t){e==0?t():requestAnimationFrame(()=>ju(e-1,t))}function Hu(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ds=Ce(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=Z(!0),l=Z(0),c=Z(!0);return ie(K(i,he(l),ce(([u,f])=>!!f),dn(!1)),a),ie(K(i,he(l),ce(([u,f])=>!!f),dn(!1)),c),Me(K(ht(t,i),he(a,e,n,c),ce(([[,u],f,{sizeTree:h},d,p])=>u&&(!Le(h)||Du(d))&&!f&&!p),he(l)),([,u])=>{fn(s,()=>{de(c,!0)}),ju(4,()=>{fn(r,()=>{de(a,!0)}),de(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Re(mn,At,Ps,Qn),{singleton:!0});function Fb(e){return e?e==="smooth"?"smooth":"auto":!1}const ON=(e,t)=>typeof e=="function"?Fb(e(t)):t&&Fb(e),DN=Ce(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=Z(!1),f=ye();let h=null;function d(m){de(o,{index:"LAST",align:"end",behavior:m})}Me(K(ht(K(ue(e),Po(1)),a),he(ue(u),n,s,c),re(([[m,g],y,b,v,S])=>{let T=g&&v,E="auto";return T&&(E=ON(y,b||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),ce(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{h&&(h(),h=null),h=fn(t,()=>{Et(l)("following output to ",{totalCount:m},Bt.DEBUG),d(g),h=null})});function p(m){const g=fn(r,y=>{m&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Et(l)("scrolling to bottom due to increased size",{},Bt.DEBUG),d("auto"))});setTimeout(g,100)}return Me(K(ht(ue(u),e,i),ce(([m,,g])=>m&&g),hn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),ce(({refreshed:m})=>m),he(u,e)),([,m])=>{Et(s)&&p(m!==!1)}),Me(f,()=>{p(Et(u)!==!1)}),Me(ht(ue(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&d("auto")}),{followOutput:u,autoscrollToBottom:f}},Re(mn,Os,Ps,Ds,Qn,Xn,At));function MN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Nb=Ce(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=ye(),i=ye(),a=$t(K(s,re(MN)));return ie(K(a,re(l=>l.totalCount)),e),ie(K(a,re(l=>l.groupIndices)),t),ie(K(ht(r,n,o),ce(([l,c])=>ca(c)),re(([l,c,u])=>Kt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),je(),re(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Re(mn,At));function Ms(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Lb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const ua="top",fa="bottom",_b="none";function Vb(e,t,n){return typeof e=="number"?n===Is&&t===ua||n===As&&t===fa?e:0:n===Is?t===ua?e.main:e.reverse:t===fa?e.main:e.reverse}function $b(e,t){return typeof e=="number"?e:e[t]||0}const Wu=Ce(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=ye(),i=Z(0),a=Z(0),l=Z(0),c=Ct(K(ht(ue(e),ue(t),ue(r),ue(s,Ms),ue(l),ue(i),ue(o),ue(n),ue(a)),re(([u,f,h,[d,p],m,g,y,b,v])=>{const S=u-b,T=g+y,E=Math.max(h-S,0);let I=_b;const A=$b(v,ua),k=$b(v,fa);return d-=b,d+=h+y,p+=h+y,p-=b,d>u+T-A&&(I=Is),p<u-E+f+k&&(I=As),I!==_b?[Math.max(S-h-Vb(m,ua,I)-A,0),S-E-y+f+Vb(m,fa,I)+k]:null}),ce(u=>u!=null),je(Ms)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Re(At),{singleton:!0});function kN(e,t,n){if(ca(t)){const r=Mb(e,t);return[{index:Kt(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const zu={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Bb(e,t,n){if(e.length===0)return[];if(!ca(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=aa(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function da(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const f=n-l,h=a+f*i+(f-1)*r,d=c,p=h-u;return{items:Bb(e,o,s),topItems:Bb(t,o,s),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:d,bottom:u,totalCount:n,firstItemIndex:s}}function Rb(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Hu(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:s[f+l]}));return da(c,[],a,o,n,r)}const xr=Ce(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},h,{didMount:d},{recalcInProgress:p}])=>{const m=Z([]),g=Z(0),y=ye();ie(s.topItemsIndexes,m);const b=Ct(K(ht(d,p,ue(i,Ms),ue(t),ue(e),ue(u),c,ue(m),ue(r),ue(o),n),ce(([E,I,,A,,,,,,,k])=>{const O=k&&k.length!==A;return E&&!I&&!O}),re(([,,[E,I],A,k,O,_,F,L,P,D])=>{const N=k,{sizeTree:$,offsetTree:H}=N,U=Et(g);if(A===0)return{...zu,totalCount:A};if(E===0&&I===0)return U===0?{...zu,totalCount:A}:Rb(U,O,k,L,P,D||[]);if(Le($))return U>0?null:da(kN(Hu(O,A),N,D),[],A,P,N,L);const M=[];if(F.length>0){const G=F[0],V=F[F.length-1];let j=0;for(const z of aa($,G,V)){const B=z.value,Y=Math.max(z.start,G),te=Math.min(z.end,V);for(let W=Y;W<=te;W++)M.push({index:W,size:B,offset:j,data:D&&D[W]}),j+=B}}if(!_)return da([],M,A,P,N,L);const R=F.length>0?F[F.length-1]+1:0,q=bN(H,E,I,R);if(q.length===0)return null;const ee=A-1,Q=oa([],G=>{for(const V of q){const j=V.value;let z=j.offset,B=V.start;const Y=j.size;if(j.offset<E){B+=Math.floor((E-j.offset+P)/(Y+P));const W=B-V.start;z+=W*Y+W*P}B<R&&(z+=(R-B)*Y,B=R);const te=Math.min(V.end,ee);for(let W=B;W<=te&&!(z>=I);W++)G.push({index:W,size:Y,offset:z,data:D&&D[W]}),z+=Y+P}});return da(Q,M,A,P,N,L)}),ce(E=>E!==null),je()),zu);ie(K(n,ce(Du),re(E=>E==null?void 0:E.length)),t),ie(K(b,re(E=>E.topListHeight)),f),ie(f,l),ie(K(b,re(E=>[E.top,E.bottom])),a),ie(K(b,re(E=>E.items)),y);const v=$t(K(b,ce(({items:E})=>E.length>0),he(t,n),ce(([{items:E},I])=>E[E.length-1].originalIndex===I-1),re(([,E,I])=>[E-1,I]),je(Ms),re(([E])=>E))),S=$t(K(b,qn(200),ce(({items:E,topItems:I})=>E.length>0&&E[0].originalIndex===I.length),re(({items:E})=>E[0].index),je())),T=$t(K(b,ce(({items:E})=>E.length>0),re(({items:E})=>{let I=0,A=E.length-1;for(;E[I].type==="group"&&I<A;)I++;for(;E[A].type==="group"&&A>I;)A--;return{startIndex:E[I].index,endIndex:E[A].index}}),je(Lb)));return{listState:b,topItemsIndexes:m,endReached:v,startReached:S,rangeChanged:T,itemsRendered:y,initialItemCount:g,...h}},Re(mn,Nb,Wu,Ds,Ps,Os,Qn,$u),{singleton:!0}),FN=Ce(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ie(K(a,he(s),ce(([,l])=>l!==0),he(o,e,t,r,n),re(([[,l],c,u,f,h,d=[]])=>Rb(l,c,u,f,h,d))),i),{}),Re(mn,Ds,xr,Qn),{singleton:!0}),jb=Ce(([{scrollVelocity:e}])=>{const t=Z(!1),n=ye(),r=Z(!1);return ie(K(e,he(r,t,n),ce(([o,s])=>!!s),re(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),je()),t),Me(K(ht(t,e,n),he(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Re(Os),{singleton:!0}),NN=Ce(([{topItemsIndexes:e}])=>{const t=Z(0);return ie(K(t,ce(n=>n>0),re(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Re(xr)),Hb=Ce(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=ye(),i=Ct(K(ht(e,r,t,n,o),re(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ie(ue(i),s),{totalListHeight:i,totalListHeightChanged:s}},Re(At,xr),{singleton:!0});function Wb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const LN=Wb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),_N=Ce(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:h},{log:d},{recalcInProgress:p}])=>{const m=$t(K(l,he(a),hn(([,y,b,v],[{items:S,totalCount:T,bottom:E,offsetBottom:I},A])=>{const k=E+I;let O=0;return b===T&&y.length>0&&S.length>0&&(S[0].originalIndex===0&&y[0].originalIndex===0||(O=k-v,O!==0&&(O+=A))),[O,S,T,k]},[0,[],0,0]),ce(([y])=>y!==0),he(t,i,r,s,d,p),ce(([,y,b,v,,,S])=>!S&&!v&&y!==0&&b===Is),re(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},Bt.DEBUG),y))));function g(y){y>0?(de(e,{top:-y,behavior:"auto"}),de(n,0)):(de(n,0),de(e,{top:-y,behavior:"auto"}))}return Me(K(m,he(n,o)),([y,b,v])=>{v&&LN()?de(n,b-y):g(-y)}),Me(K(ht(Ct(o,!1),n,p),ce(([y,b,v])=>!y&&!v&&b!==0),re(([y,b])=>b),qn(1)),g),ie(K(u,re(y=>({top:-y}))),e),Me(K(c,he(f,h),re(([y,{lastSize:b,groupIndices:v,sizeTree:S},T])=>{function E(I){return I*(b+T)}if(v.length===0)return E(y);{let I=0;const A=Es(S,0);let k=0,O=0;for(;k<y;){k++,I+=A;let _=v.length===O+1?1/0:v[O+1]-v[O]-1;k+_>y&&(I-=A,_=y-k+1),k+=_,I+=E(_),O++}return I}})),y=>{de(n,y),requestAnimationFrame(()=>{de(e,{top:y}),requestAnimationFrame(()=>{de(n,0),de(p,!1)})})}),{deviation:n}},Re(At,Os,xr,mn,Xn,$u)),VN=Ce(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Z(0);return Me(K(e,he(r),ce(([,o])=>o!==0),re(([,o])=>({top:o}))),o=>{fn(K(n,Po(1),ce(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{de(t,o)})})}),{initialScrollTop:r}},Re(Qn,At,xr),{singleton:!0}),$N=Ce(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Z(!1),r=Ct(K(ht(n,e,t),ce(([o])=>o),re(([,o,s])=>Math.max(0,o-s)),qn(0),je()),0);return{alignToBottom:n,paddingTopAddition:r}},Re(At,Hb),{singleton:!0}),Uu=Ce(([{scrollTo:e,scrollContainerState:t}])=>{const n=ye(),r=ye(),o=ye(),s=Z(!1),i=Z(void 0);return ie(K(ht(n,r),re(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ie(K(e,he(r),re(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Re(At)),BN=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,RN=Ce(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=ye();return ie(K(u,he(e,o,t,s,i,a,r),he(n),re(([[f,h,d,p,m,g,y,b],v])=>{const{done:S,behavior:T,align:E,calculateViewLocation:I=BN,...A}=f,k=Db(f,h,p-1),O=Cs(k,h.offsetTree,v)+m+g,_=O+Kt(h.sizeTree,k)[1],F=b+g,L=b+d-y,P=I({itemTop:O,itemBottom:_,viewportTop:F,viewportBottom:L,locationParams:{behavior:T,align:E,...A}});return P?S&&fn(K(l,ce(D=>D===!1),Po(Et(l)?1:2)),S):S&&S(),P}),ce(f=>f!==null)),c),{scrollIntoView:u}},Re(mn,At,Ps,xr,Xn),{singleton:!0}),jN=Ce(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=ye(),u=Z(void 0),f=Z(null),h=Z(null);return ie(a,f),ie(l,h),Me(K(c,he(e,n,i,f,h,r)),([d,p,m,g,y,b,v])=>{const S=TN(p.sizeTree);g&&y!==null&&b!==null&&(m=y.scrollTop-b.offsetTop),m-=v,d({ranges:S,scrollTop:m})}),ie(K(u,ce(Du),re(HN)),o),ie(K(s,he(u),ce(([,d])=>d!==void 0),je(),re(([,d])=>d.ranges)),t),{getState:c,restoreStateFrom:u}},Re(mn,At,Ds,Qn,Uu));function HN(e){return{offset:e.scrollTop,index:0,align:"start"}}const WN=Ce(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Re(Wu,FN,Qn,jb,Hb,VN,$N,Uu,RN,Xn)),zb=Ce(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p},m,g,y,{listState:b,topItemsIndexes:v,...S},{scrollToIndex:T},E,{topItemCount:I},{groupCounts:A},k])=>(ie(S.rangeChanged,k.scrollSeekRangeChanged),ie(K(k.windowViewportRect,re(O=>O.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p,topItemsIndexes:v,topItemCount:I,groupCounts:A,fixedItemHeight:n,defaultItemHeight:r,gap:u,...y,statefulTotalCount:c,listState:b,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...k,...m,sizes:f,...g}),Re(mn,Ds,At,jN,DN,xr,Ps,_N,NN,Nb,WN)),Gu="-webkit-sticky",Ub="sticky",Gb=Wb(()=>{if(typeof document>"u")return Ub;const e=document.createElement("div");return e.style.position=Gu,e.style.position===Gu?Gu:Ub});function Yu(e,t){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(t){const h=t.getBoundingClientRect(),d=l.top-h.top;u=h.height-Math.max(0,d),f=d+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Fu(r),i=w.useCallback(()=>{r(s.current)},[r,s]);return w.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const ha=w.createContext(void 0),Yb=w.createContext(void 0);function Ku(e){return e}const zN=Ce(([e,t])=>({...e,...t}),Re(zb,Ce(()=>{const e=Z(l=>`Item ${l}`),t=Z(null),n=Z(l=>`Group ${l}`),r=Z({}),o=Z(Ku),s=Z("div"),i=Z(br),a=(l,c=null)=>Ct(K(r,re(u=>u[l]),je()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),UN=({height:e})=>w.createElement("div",{style:{height:e}}),GN={position:Gb(),zIndex:1,overflowAnchor:"none"},YN={overflowAnchor:"none"},Kb=w.memo(function({showTopList:t=!1}){const n=me("listState"),r=zt("sizeRanges"),o=me("useWindowScroll"),s=me("customScrollParent"),i=zt("windowScrollContainerState"),a=zt("scrollContainerState"),l=s||o?i:a,c=me("itemContent"),u=me("context"),f=me("groupContent"),h=me("trackItemSizes"),d=me("itemSize"),p=me("log"),m=zt("gap"),{callbackRef:g}=bb(r,d,h,t?br:l,p,m,s),[y,b]=w.useState(0);Qu("deviation",P=>{y!==P&&b(P)});const v=me("EmptyPlaceholder"),S=me("ScrollSeekPlaceholder")||UN,T=me("ListComponent"),E=me("ItemComponent"),I=me("GroupComponent"),A=me("computeItemKey"),k=me("isSeeking"),O=me("groupIndices").length>0,_=me("alignToBottom"),F=me("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:y!==0?y:_?"auto":0,...F?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&v?w.createElement(v,qe(v,u)):w.createElement(T,{...qe(T,u),ref:g,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const D=P.originalIndex,N=A(D+n.firstItemIndex,P.data,u);return k?w.createElement(S,{...qe(S,u),key:N,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?w.createElement(I,{...qe(I,u),key:N,"data-index":D,"data-known-size":P.size,"data-item-index":P.index,style:GN},f(P.index,u)):w.createElement(E,{...qe(E,u),...qb(E,P.data),key:N,"data-index":D,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:YN},O?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),KN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ao=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),qN={width:"100%",position:Gb(),top:0,zIndex:1};function qe(e,t){if(typeof e!="string")return{context:t}}function qb(e,t){return{item:typeof e=="string"?void 0:t}}const XN=w.memo(function(){const t=me("HeaderComponent"),n=zt("headerHeight"),r=me("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=me("context");return t?w.createElement(r,{ref:o},w.createElement(t,qe(t,s))):null}),QN=w.memo(function(){const t=me("FooterComponent"),n=zt("footerHeight"),r=me("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=me("context");return t?w.createElement(r,{ref:o},w.createElement(t,qe(t,s))):null});function qu({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),h=n("context"),{scrollerRef:d,scrollByCallback:p,scrollToCallback:m}=xb(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:d,style:{...KN,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...qe(c,h)},i)})}function Xu({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),d=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:y}=xb(l,u,c,br,d);return aN(()=>(m.current=d||window,()=>{m.current=null}),[m,d]),t("windowScrollTo",y),t("scrollBy",g),w.createElement(c,{style:{position:"relative",...s,...f!==0?{height:f+h}:{}},"data-virtuoso-scroller":!0,...a,...qe(c,p)},i)})}const ZN=({children:e})=>{const t=w.useContext(ha),n=zt("viewportHeight"),r=zt("fixedItemHeight"),o=me("alignToBottom"),s=pn(w.useMemo(()=>Ts(n,i=>Yt(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:Ao(o),ref:s,"data-viewport-type":"element"},e)},JN=({children:e})=>{const t=w.useContext(ha),n=zt("windowViewportRect"),r=zt("fixedItemHeight"),o=me("customScrollParent"),s=Yu(n,o),i=me("alignToBottom");return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:Ao(i),"data-viewport-type":"window"},e)},eL=({children:e})=>{const t=me("TopItemListComponent")||"div",n=me("headerHeight"),r={...qN,marginTop:`${n}px`},o=me("context");return w.createElement(t,{style:r,...qe(t,o)},e)},tL=w.memo(function(t){const n=me("useWindowScroll"),r=me("topItemsIndexes").length>0,o=me("customScrollParent"),s=o||n?oL:rL,i=o||n?JN:ZN;return w.createElement(s,{...t},r&&w.createElement(eL,null,w.createElement(Kb,{showTopList:!0})),w.createElement(i,null,w.createElement(XN,null),w.createElement(Kb,null),w.createElement(QN,null)))}),{Component:nL,usePublisher:zt,useEmitterValue:me,useEmitter:Qu}=ku(zN,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},tL),rL=qu({usePublisher:zt,useEmitterValue:me,useEmitter:Qu}),oL=Xu({usePublisher:zt,useEmitterValue:me,useEmitter:Qu}),sL=nL,Xb={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},iL={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Qb,ceil:Zb,floor:pa,min:Zu,max:ks}=Math;function aL(e){return{...iL,items:e}}function Jb(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function lL(e,t){return e&&e.column===t.column&&e.row===t.row}function ma(e,t){return e&&e.width===t.width&&e.height===t.height}const cL=Ce(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,h,{propsReady:d,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:y,windowScrollContainerState:b,windowScrollTo:v},S])=>{const T=Z(0),E=Z(0),I=Z(Xb),A=Z({height:0,width:0}),k=Z({height:0,width:0}),O=ye(),_=ye(),F=Z(0),L=Z(null),P=Z({row:0,column:0}),D=ye(),N=ye(),$=Z(!1),H=Z(0),U=Z(!0),M=Z(!1);Me(K(p,he(H),ce(([V,j])=>!!j)),()=>{de(U,!1),de(E,0)}),Me(K(ht(p,U,k,A,H,M),ce(([V,j,z,B,,Y])=>V&&!j&&z.height!==0&&B.height!==0&&!Y)),([,,,,V])=>{de(M,!0),ju(1,()=>{de(O,V)}),fn(K(r),()=>{de(n,[0,0]),de(U,!0)})}),ie(K(N,ce(V=>V!=null&&V.scrollTop>0),dn(0)),E),Me(K(p,he(N),ce(([,V])=>V!=null)),([,V])=>{V&&(de(A,V.viewport),de(k,V==null?void 0:V.item),de(P,V.gap),V.scrollTop>0&&(de($,!0),fn(K(r,Po(1)),j=>{de($,!1)}),de(i,{top:V.scrollTop})))}),ie(K(A,re(({height:V})=>V)),o),ie(K(ht(ue(A,ma),ue(k,ma),ue(P,(V,j)=>V&&V.column===j.column&&V.row===j.row),ue(r)),re(([V,j,z,B])=>({viewport:V,item:j,gap:z,scrollTop:B}))),D),ie(K(ht(ue(T),t,ue(P,lL),ue(k,ma),ue(A,ma),ue(L),ue(E),ue($),ue(U),ue(H)),ce(([,,,,,,,V])=>!V),re(([V,[j,z],B,Y,te,W,Pe,,Xe,_e])=>{const{row:Qe,column:ae}=B,{height:ge,width:se}=Y,{width:be}=te;if(Pe===0&&(V===0||be===0))return Xb;if(se===0){const Ot=Hu(_e,V),Sr=Ot===0?Math.max(Pe-1,0):Ot;return aL(Jb(Ot,Sr,W))}const ot=t0(be,se,ae);let we,st;Xe?j===0&&z===0&&Pe>0?(we=0,st=Pe-1):(we=ot*pa((j+Qe)/(ge+Qe)),st=ot*Zb((z+Qe)/(ge+Qe))-1,st=Zu(V-1,ks(st,ot-1)),we=Zu(st,ks(0,we))):(we=0,st=-1);const J=Jb(we,st,W),{top:oe,bottom:xe}=e0(te,B,Y,J),He=Zb(V/ot),Pt=He*ge+(He-1)*Qe-xe;return{items:J,offsetTop:oe,offsetBottom:Pt,top:oe,bottom:xe,itemHeight:ge,itemWidth:se}})),I),ie(K(L,ce(V=>V!==null),re(V=>V.length)),T),ie(K(ht(A,k,I,P),ce(([V,j,{items:z}])=>z.length>0&&j.height!==0&&V.height!==0),re(([V,j,{items:z},B])=>{const{top:Y,bottom:te}=e0(V,B,j,z);return[Y,te]}),je(Ms)),n);const R=Z(!1);ie(K(r,he(R),re(([V,j])=>j||V!==0)),R);const q=$t(K(ue(I),ce(({items:V})=>V.length>0),he(T,R),ce(([{items:V},j,z])=>z&&V[V.length-1].index===j-1),re(([,V])=>V-1),je())),ee=$t(K(ue(I),ce(({items:V})=>V.length>0&&V[0].index===0),dn(0),je())),Q=$t(K(ue(I),he($),ce(([{items:V},j])=>V.length>0&&!j),re(([{items:V}])=>({startIndex:V[0].index,endIndex:V[V.length-1].index})),je(Lb),qn(0)));ie(Q,h.scrollSeekRangeChanged),ie(K(O,he(A,k,T,P),re(([V,j,z,B,Y])=>{const te=kb(V),{align:W,behavior:Pe,offset:Xe}=te;let _e=te.index;_e==="LAST"&&(_e=B-1),_e=ks(0,_e,Zu(B-1,_e));let Qe=Ju(j,Y,z,_e);return W==="end"?Qe=Qb(Qe-j.height+z.height):W==="center"&&(Qe=Qb(Qe-j.height/2+z.height/2)),Xe&&(Qe+=Xe),{top:Qe,behavior:Pe}})),i);const G=Ct(K(I,re(V=>V.offsetBottom+V.bottom)),0);return ie(K(m,re(V=>({width:V.visibleWidth,height:V.visibleHeight}))),A),{data:L,totalCount:T,viewportDimensions:A,itemDimensions:k,scrollTop:r,scrollHeight:_,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:v,useWindowScroll:g,customScrollParent:y,windowScrollContainerState:b,deviation:F,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:N,...h,initialTopMostItemIndex:H,gridState:I,totalListHeight:G,...f,startReached:ee,endReached:q,rangeChanged:Q,stateChanged:D,propsReady:d,stateRestoreInProgress:$,...S}},Re(Wu,At,Os,jb,Qn,Uu,Xn));function e0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Ju(e,t,n,r[0].index),i=Ju(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Ju(e,t,n,r){const o=t0(e.width,n.width,t.column),s=pa(r/o),i=s*n.height+ks(0,s-1)*t.row;return i>0?i+t.row:i}function t0(e,t,n){return ks(1,pa((e+n)/(pa(t)+n)))}const uL=Ce(([e,t])=>({...e,...t}),Re(cL,Ce(()=>{const e=Z(c=>`Item ${c}`),t=Z({}),n=Z(null),r=Z("virtuoso-grid-item"),o=Z("virtuoso-grid-list"),s=Z(Ku),i=Z("div"),a=Z(br),l=(c,u=null)=>Ct(K(t,re(f=>f[c]),je()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),fL=w.memo(function(){const t=Ue("gridState"),n=Ue("listClassName"),r=Ue("itemClassName"),o=Ue("itemContent"),s=Ue("computeItemKey"),i=Ue("isSeeking"),a=qt("scrollHeight"),l=Ue("ItemComponent"),c=Ue("ListComponent"),u=Ue("ScrollSeekPlaceholder"),f=Ue("context"),h=qt("itemDimensions"),d=qt("gap"),p=Ue("log"),m=Ue("stateRestoreInProgress"),g=pn(w.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;a(b);const v=y.firstChild;if(v){const{width:S,height:T}=v.getBoundingClientRect();h({width:S,height:T})}d({row:r0("row-gap",getComputedStyle(y).rowGap,p),column:r0("column-gap",getComputedStyle(y).columnGap,p)})},[a,h,d,p]));return m?null:w.createElement(c,{ref:g,className:n,...qe(c,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(y=>{const b=s(y.index,y.data,f);return i?w.createElement(u,{key:b,...qe(u,f),index:y.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...qe(l,f),className:r,"data-index":y.index,key:b},o(y.index,y.data,f))}))}),dL=w.memo(function(){const t=Ue("HeaderComponent"),n=qt("headerHeight"),r=Ue("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=Ue("context");return t?w.createElement(r,{ref:o},w.createElement(t,qe(t,s))):null}),hL=w.memo(function(){const t=Ue("FooterComponent"),n=qt("footerHeight"),r=Ue("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=Ue("context");return t?w.createElement(r,{ref:o},w.createElement(t,qe(t,s))):null}),pL=({children:e})=>{const t=w.useContext(Yb),n=qt("itemDimensions"),r=qt("viewportDimensions"),o=pn(w.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return w.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),w.createElement("div",{style:Ao(!1),ref:o},e)},mL=({children:e})=>{const t=w.useContext(Yb),n=qt("windowViewportRect"),r=qt("itemDimensions"),o=Ue("customScrollParent"),s=Yu(n,o);return w.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),w.createElement("div",{ref:s,style:Ao(!1)},e)},gL=w.memo(function({...t}){const n=Ue("useWindowScroll"),r=Ue("customScrollParent"),o=r||n?vL:yL,s=r||n?mL:pL;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(dL,null),w.createElement(fL,null),w.createElement(hL,null)))}),{Component:L2,usePublisher:qt,useEmitterValue:Ue,useEmitter:n0}=ku(uL,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},gL),yL=qu({usePublisher:qt,useEmitterValue:Ue,useEmitter:n0}),vL=Xu({usePublisher:qt,useEmitterValue:Ue,useEmitter:n0});function r0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Bt.WARN),t==="normal"?0:parseInt(t??"0",10)}const bL=Ce(([e,t])=>({...e,...t}),Re(zb,Ce(()=>{const e=Z(l=>w.createElement("td",null,"Item $",l)),t=Z(null),n=Z(null),r=Z(null),o=Z({}),s=Z(Ku),i=Z(br),a=(l,c=null)=>Ct(K(o,re(u=>u[l]),je()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),wL=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),xL=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),TL={overflowAnchor:"none"},SL=w.memo(function(){const t=ke("listState"),n=Xt("sizeRanges"),r=ke("useWindowScroll"),o=ke("customScrollParent"),s=Xt("windowScrollContainerState"),i=Xt("scrollContainerState"),a=o||r?s:i,l=ke("itemContent"),c=ke("trackItemSizes"),u=ke("itemSize"),f=ke("log"),{callbackRef:h,ref:d}=bb(n,u,c,a,f,void 0,o),[p,m]=w.useState(0);ef("deviation",N=>{p!==N&&(d.current.style.marginTop=`${N}px`,m(N))});const g=ke("EmptyPlaceholder"),y=ke("ScrollSeekPlaceholder")||wL,b=ke("FillerRow")||xL,v=ke("TableBodyComponent"),S=ke("TableRowComponent"),T=ke("computeItemKey"),E=ke("isSeeking"),I=ke("paddingTopAddition"),A=ke("firstItemIndex"),k=ke("statefulTotalCount"),O=ke("context");if(k===0&&g)return w.createElement(g,qe(g,O));const _=t.offsetTop+I+p,F=t.offsetBottom,L=_>0?w.createElement(b,{height:_,key:"padding-top",context:O}):null,P=F>0?w.createElement(b,{height:F,key:"padding-bottom",context:O}):null,D=t.items.map(N=>{const $=N.originalIndex,H=T($+A,N.data,O);return E?w.createElement(y,{...qe(y,O),key:H,index:N.index,height:N.size,type:N.type||"item"}):w.createElement(S,{...qe(S,O),...qb(S,N.data),key:H,"data-index":$,"data-known-size":N.size,"data-item-index":N.index,style:TL},l(N.index,N.data,O))});return w.createElement(v,{ref:h,"data-testid":"virtuoso-item-list",...qe(v,O)},[L,...D,P])}),EL=({children:e})=>{const t=w.useContext(ha),n=Xt("viewportHeight"),r=Xt("fixedItemHeight"),o=pn(w.useMemo(()=>Ts(n,s=>Yt(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:Ao(!1),ref:o,"data-viewport-type":"element"},e)},CL=({children:e})=>{const t=w.useContext(ha),n=Xt("windowViewportRect"),r=Xt("fixedItemHeight"),o=ke("customScrollParent"),s=Yu(n,o);return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:Ao(!1),"data-viewport-type":"window"},e)},PL=w.memo(function(t){const n=ke("useWindowScroll"),r=ke("customScrollParent"),o=Xt("fixedHeaderHeight"),s=Xt("fixedFooterHeight"),i=ke("fixedHeaderContent"),a=ke("fixedFooterContent"),l=ke("context"),c=pn(w.useMemo(()=>Ts(o,b=>Yt(b,"height")),[o])),u=pn(w.useMemo(()=>Ts(s,b=>Yt(b,"height")),[s])),f=r||n?OL:AL,h=r||n?CL:EL,d=ke("TableComponent"),p=ke("TableHeadComponent"),m=ke("TableFooterComponent"),g=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...qe(p,l)},i()):null,y=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...qe(m,l)},a()):null;return w.createElement(f,{...t},w.createElement(h,null,w.createElement(d,{style:{borderSpacing:0,overflowAnchor:"none"},...qe(d,l)},[g,w.createElement(SL,{key:"TableBody"}),y])))}),{Component:IL,usePublisher:Xt,useEmitterValue:ke,useEmitter:ef}=ku(bL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},PL),AL=qu({usePublisher:Xt,useEmitterValue:ke,useEmitter:ef}),OL=Xu({usePublisher:Xt,useEmitterValue:ke,useEmitter:ef}),DL=IL,ML=e=>{const[t,n]=w.useState(0);return w.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},kL={Item:w.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:w.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},FL=e=>{const t=w.useRef(null),n=ML(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(bs,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(sL,{height:n,useWindowScroll:!0,data:e.source,components:kL,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(Pv,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Lr,{children:x.jsx(ec,{})})}),x.jsx("div",{})]})};var NL=Object.defineProperty,o0=Object.getOwnPropertySymbols,LL=Object.prototype.hasOwnProperty,_L=Object.prototype.propertyIsEnumerable,s0=(e,t,n)=>t in e?NL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VL=(e,t)=>{for(var n in t||(t={}))LL.call(t,n)&&s0(e,n,t[n]);if(o0)for(var n of o0(t))_L.call(t,n)&&s0(e,n,t[n]);return e},tf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},$L=(e,t,n,r)=>ya(tf,e,t,n,r),Oo=e=>typeof e=="object",Zn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Oo(e)&&!Oo(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Zn(e[r],t[r]))},BL=(e,t)=>(Oo(e)||Array.isArray(e))&&t?e[t]:e,RL=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,ga=e=>/[0-9.]+/.test(e),i0=e=>["string","number"].includes(typeof e),a0=e=>e==null||(e==null?void 0:e.length)===0||e==="",l0={eq:Zn,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:a0,notEmpty:e=>!a0(e),in:(e,t)=>tf(t,n=>Zn(e,n)),notIn:(e,t)=>c0(t,n=>!Zn(e,n))},jL=e=>{if(e in l0)return l0[e];throw new Error("Linq - Symbol not found")},Do=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},ya=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=jL(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},HL=(e,t,n,r)=>ya(Do,e,t,n,r),c0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},WL=(e,t,n,r)=>ya(c0,e,t,n,r),u0=e=>{if(e===null)return null;const t=VL({},e);return Object.keys(t).forEach(n=>t[n]=Oo(e[n])?u0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},f0=(e,t)=>{if(Oo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Zn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Zn(t,r))return!0}return!1},zL=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},UL=e=>Do(e,(t,n,r)=>Oo(t)?n===r.findIndex(o=>Zn(o,t)):n===r.indexOf(t)),GL=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},d0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},YL=(e,t)=>d0(e,n=>n[t]),h0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},KL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},qL=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return ga(e)&&ga(t)?r.map(i=>Number.parseInt(i)):r},nf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&ga(e)&&ga(t)){const o=[],[s,i]=KL(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return qL(e,t,r)},XL=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?nf(r,o,1):nf(r,s,Number.parseInt(o,10))}return i0(e)&&i0(t)?nf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},rf=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},p0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},QL=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},ZL=(e,t,n,r)=>ya(QL,e,t,n,r),m0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(RL(t))},g0=(e=>(e.Asc="asc",e.Desc="desc",e))(g0||{}),JL=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),e_=(e,t)=>e.sort(JL(t)),t_=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Do(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},n_=class xf{constructor(t=[]){this.array=t}static Range(...t){return XL(...t)}static New(t){return new xf(t)}Where(t,n,r){return this.array=HL(this.array,t,n,r),this}Some(t,n,r){return $L(this.array,t,n,r)}All(t,n,r){return WL(this.array,t,n,r)}Reverse(){return this.array=p0(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=ZL(this.array,t,n,r),this}Distinct(){return this.array=UL(this.array),this}First(t){return t===void 0?this.array[0]:GL(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?rf((n,r)=>n+r,0,this.array):rf((n,r)=>n+BL(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return YL(this.array,t)}GroupWith(t){return d0(this.array,t)}Except(t){return Do(this.array,n=>!f0(t,n))}Intersect(t){return Do(this.array,n=>f0(t,n))}OrderBy(t,n){let r;return r=t?m0(this.array,t):this.array.toSorted(),this.array=n==="desc"?p0(r):r,this}Includes(t){return tf(this.array,n=>Zn(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return rf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(h0(this.array,n=>[t,n]))}Zip(t,n){return h0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Do(this.array,t).length}Get(t){return this.array[t]}Clone(){return new xf(u0(this.array))}ToObject(t){return zL(this.array,t)}Sort(t){return Array.isArray(t)?e_(this.array,t):m0(this.array,t)}Unique(t){return t_(this.array,t)}},y0=n_,of={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,y)=>{try{Object.keys(g).forEach(y)}catch(b){window.console.log(b)}},n=g=>g==null,r=g=>{const y=typeof g;return y==="string"||y==="number"||y==="boolean"||n(g)},o=(g,y)=>{const b=y.getItem(g);try{return JSON.parse(b)}catch{return b??null}},s=g=>Object.keys(g).reduce((y,b)=>({...y,[b]:o(b,g)}),{}),i=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,y)=>(g[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(y=>y(g))},f=[{name:"expires",parse:g=>`expires=${i(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${i(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const y=g.domain??"";return y===""?"":`domain=${g.multiDomain?".":""}${y}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],h={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(y=>y.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const y=h.json()[g];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,y,b={})=>{const v=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=f.reduce((T,E)=>{const I=E.parse(b);return I===""?T:T.concat(I)},[`${encodeURIComponent(g)}=${v}`]).join(";");document.cookie=S,u()}},d=g=>{const y=new Set,b=v=>{g().removeItem(v);const S=s(g());y.forEach(T=>T(S))};return{delete:b,listener:v=>(y.add(v),()=>y.delete(v)),clearListeners:()=>y.clear(),json:(v=!1)=>v?s(g()):g(),has:v=>{const S=g().getItem(v);return!n(S)},deleteAll:()=>{t(g(),b),y.forEach(v=>v(g()))},get:v=>o(v,g()),set:(v,S)=>{g().setItem(v,JSON.stringify(S)),y.forEach(T=>T(g()))}}},p=d(()=>window.sessionStorage),m=d(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=d})(of);const sf=e=>e.headerLabel??e.thead??e.id,af=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Mo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Mo||{});const lf=e=>e.type==="number"?e.valueAsNumber:e.value,r_=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},o_={},s_=(e,t)=>{if(!Array.isArray(t))return e;const n=new Map(e.map(r=>[r.id,r]));return t.map(r=>{const o=n.get(r.id);return{...r,...o}})},i_=(e,t,n=o_)=>{const r=Ei()?null:of.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=gc({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:s_(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Ei()||of.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},cf=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??Mo.Text,i=t[s]??[],a=((c=i.find(f=>f["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:fs(),operation:l,label:sf(e),name:o,type:s,value:"",...r}},uf=()=>{const e=Tt(),t=w.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:w.useMemo(()=>({[Mo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Mo.Boolean]:[t.is,t.isNot],[Mo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},a_=e=>{const t=Tt(),n=uf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,cf(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(f=>f.map(h=>{if(c!==h.id)return h;const d=e.cols.find(p=>u===p.id);return cf(d,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(f=>f.map(h=>h.id===c?{...h,operation:n.operations[u]}:h))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=lf(l.target);e.set(f=>f.map(h=>h.id===c?{...h,value:u}:h))};return x.jsx(w.Fragment,{children:x.jsx(xo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(gP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(vr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(vr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(bs,{"data-id":l.id,onChange:a,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":l.id,type:"button",onClick:i,children:x.jsx(Kr,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(tc,{size:14})," ",t.tableFilterNewFilter]})})]})})})},l_=({filter:e,onDelete:t,set:n})=>{const r=Tt(),o=uf(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(f=>f.id===c?{...f,operation:o.operations[l]}:f))},i=a=>{const l=a.target.dataset.id||"",c=lf(a.target);n(u=>u.map(f=>f.id===l?{...f,value:c}:f))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(vr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(bs,{"data-id":e.id,onChange:i,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Kr,{className:"text-danger",size:14})})]})},c_=({item:e,onPointerDown:t})=>{const n=lr(0);return x.jsxs(hi.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(mP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},u_=e=>{var l;const t=Tt(),n=af(e.cols),r=rP(),[o,s]=w.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var g;const u=c.target,f=u.value,h=u.options.selectedIndex,d=((g=u.options.item(h))==null?void 0:g.label)||"";s(d);const p=new y0(e.rows).GroupBy(f),m=e.cols.find(y=>y.id===f);e.setGroups(Tx(p).map((y,b)=>{const v=p[y];return{...m,groupId:fs(),groupKey:f,index:b,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(xo,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(wP,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(vr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(Lr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Kr,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(EC,{children:x.jsx(hi.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx(c_,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},f_=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),d_=(e,t)=>e.toSorted(f_(t)),v0=(e,t,n)=>({id:fs(),type:n,value:e.id,label:t}),h_=e=>{const t=Tt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,v0(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,value:u}:h))},i=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,type:u}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))};return x.jsx(w.Fragment,{children:x.jsx(xo,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Cm,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(vr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(vr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(Kr,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(tc,{size:14})," ",t.tableSortAddButton]})})]})})})},p_=e=>{const t=Tt(),[n,r]=w.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");w.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=v0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=sf(e.col);return x.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?x.jsx(uP,{size:14}):null,n==="desc"?x.jsx(cP,{size:14}):null,n==="undefined"?x.jsx(Cm,{size:14}):null]})},m_=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(a_,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(h_,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(u_,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=lf(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function g_(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const y_=e=>{const t=w.useId(),n=Tt(),r=e.asLink||"button",o=w.useMemo(()=>g_(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(w.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:x.jsx(w.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},v_={top:0,left:0,right:0,bottom:-1},b_=e=>{var p;const t=Tt(),n=e.filters.filter(m=>m.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,s=e.header.allowFilter??!0,i=uf(),a=r?yP:vP,l=m=>{const g=m.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==g))},c=w.useCallback(m=>{if(m===null)return;const g=new AbortController;return m.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:g.signal}),()=>g.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),f=u!=null&&u.type?u.type===g0.Asc?"ascending":"descending":"none",h=sf(e.header),d=lr(void 0);return x.jsxs(hi.Item,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:d},role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,className:`relative hidden min-w-0 border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((p=e.header.thProps)==null?void 0:p.className)??""}`,children:[x.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?x.jsx(xo,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",h]}),x.jsx(a,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:h})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(m=>x.jsx("li",{className:"my-1",children:x.jsx(l_,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(cf(e.header,i.options,i.operations))),children:[x.jsx(tc,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?x.jsx(p_,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),x.jsx(ft.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",dragConstraints:v_,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,g)=>{const y=m.target,b=d.get()||y.getBoundingClientRect().width,v=g.delta.x;return d.set(Math.abs(b+v))}})]})},w_=e=>x.jsx(hi.Group,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:x.jsx(Yr,{children:e.headers.map(t=>x.jsx(b_,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),b0=w.createContext({}),x_=()=>w.useContext(b0),T_=w.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(Yr,{children:n.children})})),S_=w.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),E_=w.forwardRef(({context:e,...t},n)=>{const r=x_(),o={...t==null?void 0:t.style,top:vn.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),C_=w.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),P_=w.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),I_={TableHead:E_,Table:S_,TableBody:T_,TableRow:C_,TableFoot:P_},A_=[0,0,0,0,0,0,0,0,0,0],w0=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),O_=(e,t,n)=>x.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?w0:x.jsx(Vg,{})}),D_=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{var f;const a=`${i},${e}`,l=bc(t,s.id),c=s.Element,u=((f=s.cellProps)==null?void 0:f.className)||"";return w.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?w0:c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(w.Fragment,{children:vn.nil(l)?"":l}))})})},M_=()=>x.jsx(w.Fragment,{}),k_=[{}],x0=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,onScrollEnd:i,border:a=!1,pagination:l=null,useControl:c=!1,...u})=>{const f=w.useRef(null),[h,d]=w.useState(!1),p=Ou(i),m=Ou(u.loadingMore),g=w.useMemo(()=>{if(u.loading)return A_;if(c)return u.rows;const y=new y0(u.rows);return t.length>0&&t.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:y.Where(b.name,b.operation.symbol,b.value)),r.length===0?y.Select():d_(y.Select(),r)},[u.rows,t,r,u.loading]);return w.useEffect(()=>{if(f.current===null)return()=>{};const y=f.current,b=new IntersectionObserver(v=>{var E;return v[v.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void d(!0)):d(!1)});return b.observe(y),()=>b.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[x.jsx(DL,{useWindowScroll:!0,followOutput:"smooth",components:I_,totalCount:g.length,data:g.length===0?k_:g,fixedFooterContent:h?M_:null,itemContent:g.length===0?O_:D_,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(w_,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),x.jsx("div",{"aria-hidden":"true",ref:f,className:"h-0.5 w-full"})]}),l!==null?x.jsx(y_,{...l}):null]})},F_=(e,t)=>typeof t=="function"?t(e):t,va=(e,t,n)=>e===t||n==null?void 0:n(t),N_=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>af(e.cols),[e.cols]),[o,s]=gc({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:F_(u[l],c)}};return{cols:a("cols"),sorters:a("sorters"),groups:a("groups"),filters:a("filters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),va((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),va((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),va((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),va((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(b0.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(m_,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?x.jsx(x0,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):x.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>x.jsx("div",{className:"min-w-full",children:x.jsx(x0,{...e,group:i,index:a,cols:o.cols,pagination:null,rows:i.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${i.groupId}`))})]})})};var L_=String.prototype.replace,__=/%20/g,ff={RFC1738:"RFC1738",RFC3986:"RFC3986"},df={default:ff.RFC3986,formatters:{RFC1738:function(e){return L_.call(e,__,"+")},RFC3986:function(e){return String(e)}},RFC1738:ff.RFC1738,RFC3986:ff.RFC3986},V_=df,hf=Object.prototype.hasOwnProperty,Tr=Array.isArray,gn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),$_=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Tr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},T0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},B_=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Tr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!hf.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Tr(t)&&!Tr(n)&&(o=T0(t,r)),Tr(t)&&Tr(n)?(n.forEach(function(s,i){if(hf.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return hf.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},R_=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},j_=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},pf=1024,H_=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=pf){for(var c=i.length>=pf?i.slice(l,l+pf):i,u=[],f=0;f<c.length;++f){var h=c.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===V_.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(f);continue}if(h<128){u[u.length]=gn[h];continue}if(h<2048){u[u.length]=gn[192|h>>6]+gn[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=gn[224|h>>12]+gn[128|h>>6&63]+gn[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=gn[240|h>>18]+gn[128|h>>12&63]+gn[128|h>>6&63]+gn[128|h&63]}a+=u.join("")}return a},W_=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return $_(n),t},z_=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},U_=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},G_=function(t,n){return[].concat(t,n)},Y_=function(t,n){if(Tr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},S0={arrayToObject:T0,assign:R_,combine:G_,compact:W_,decode:j_,encode:H_,isBuffer:U_,isRegExp:z_,maybeMap:Y_,merge:B_},E0=yx,ba=S0,Fs=df,K_=Object.prototype.hasOwnProperty,C0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},yn=Array.isArray,q_=Array.prototype.push,P0=function(e,t){q_.apply(e,yn(t)?t:[t])},X_=Date.prototype.toISOString,I0=Fs.default,ct={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ba.encode,encodeValuesOnly:!1,format:I0,formatter:Fs.formatters[I0],indices:!1,serializeDate:function(t){return X_.call(t)},skipNulls:!1,strictNullHandling:!1},Q_=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},mf={},Z_=function e(t,n,r,o,s,i,a,l,c,u,f,h,d,p,m,g,y,b){for(var v=t,S=b,T=0,E=!1;(S=S.get(mf))!==void 0&&!E;){var I=S.get(t);if(T+=1,typeof I<"u"){if(I===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(mf)>"u"&&(T=0)}if(typeof u=="function"?v=u(n,v):v instanceof Date?v=d(v):r==="comma"&&yn(v)&&(v=ba.maybeMap(v,function(M){return M instanceof Date?d(M):M})),v===null){if(i)return c&&!g?c(n,ct.encoder,y,"key",p):n;v=""}if(Q_(v)||ba.isBuffer(v)){if(c){var A=g?n:c(n,ct.encoder,y,"key",p);return[m(A)+"="+m(c(v,ct.encoder,y,"value",p))]}return[m(n)+"="+m(String(v))]}var k=[];if(typeof v>"u")return k;var O;if(r==="comma"&&yn(v))g&&c&&(v=ba.maybeMap(v,c)),O=[{value:v.length>0?v.join(",")||null:void 0}];else if(yn(u))O=u;else{var _=Object.keys(v);O=f?_.sort(f):_}var F=l?n.replace(/\./g,"%2E"):n,L=o&&yn(v)&&v.length===1?F+"[]":F;if(s&&yn(v)&&v.length===0)return L+"[]";for(var P=0;P<O.length;++P){var D=O[P],N=typeof D=="object"&&typeof D.value<"u"?D.value:v[D];if(!(a&&N===null)){var $=h&&l?D.replace(/\./g,"%2E"):D,H=yn(v)?typeof r=="function"?r(L,$):L:L+(h?"."+$:"["+$+"]");b.set(t,T);var U=E0();U.set(mf,b),P0(k,e(N,H,r,o,s,i,a,l,r==="comma"&&g&&yn(v)?null:c,u,f,h,d,p,m,g,y,U))}}return k},J_=function(t){if(!t)return ct;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||ct.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Fs.default;if(typeof t.format<"u"){if(!K_.call(Fs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Fs.formatters[r],s=ct.filter;(typeof t.filter=="function"||yn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in C0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=ct.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:ct.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:ct.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ct.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ct.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?ct.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:ct.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:ct.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:ct.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:ct.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:ct.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:ct.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ct.strictNullHandling}},e2=function(e,t){var n=e,r=J_(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):yn(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=C0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=E0(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||P0(i,Z_(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var h=i.join(r.delimiter),d=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),h.length>0?d+h:""},ko=S0,gf=Object.prototype.hasOwnProperty,t2=Array.isArray,rt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ko.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},n2=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},A0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},r2="utf8=%26%2310003%3B",o2="utf8=%E2%9C%93",s2=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===o2?c="utf-8":i[l]===r2&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],f=u.indexOf("]="),h=f===-1?u.indexOf("="):f+1,d,p;h===-1?(d=n.decoder(u,rt.decoder,c,"key"),p=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,h),rt.decoder,c,"key"),p=ko.maybeMap(A0(u.slice(h+1),n),function(g){return n.decoder(g,rt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=n2(p)),u.indexOf("[]=")>-1&&(p=t2(p)?[p]:p);var m=gf.call(r,d);m&&n.duplicates==="combine"?r[d]=ko.combine(r[d],p):(!m||n.duplicates==="last")&&(r[d]=p)}return r},i2=function(e,t,n,r){for(var o=r?t:A0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},a2=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&gf.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(s))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&gf.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),i2(u,n,r,o)}},l2=function(t){if(!t)return rt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?rt.charset:t.charset,r=typeof t.duplicates>"u"?rt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:rt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:rt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:rt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:rt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:rt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:rt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:rt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:rt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:rt.decoder,delimiter:typeof t.delimiter=="string"||ko.isRegExp(t.delimiter)?t.delimiter:rt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:rt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:rt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:rt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:rt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:rt.strictNullHandling}},c2=function(e,t){var n=l2(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?s2(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=a2(a,r[a],n,typeof e=="string");o=ko.merge(o,l,n)}return n.allowSparse===!0?o:ko.compact(o)},u2=e2,f2=c2,d2=df,h2={formats:d2,parse:f2,stringify:u2};const p2={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},O0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return h2.parse(n.toString(),p2)},D0=e=>e.replace("[",".").replace("]","").split("."),Ns=(e,t)=>D0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),Ls=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),m2=(e,t)=>{const[n,r]=w.useState(null),o=w.useRef({}),[s,i]=w.useState({}),a=(p,m)=>{const g=Ns(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},l=(p,m)=>{const g=Ns(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},c=(p,m)=>{const g=Ns(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},u=(p,m)=>{const g=Ns(p,e);return{...m,name:p,id:p,required:!g.isOptional(),form:t,type:g._def.typeName==="ZodNumber"?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}};w.useEffect(()=>{const p=Object.values(o.current).map(g=>{const y=g.element.dataset.origin?document.querySelector(`[data-target="${g.element.name}"]`):g.element,b=g.schema.safeParse(Ls(y)),v=T=>{var k;const E=y.dataset.target||y.name;if(!E)return;const I=Ls(T.target)||(T.relatedTarget?Ls(T.relatedTarget):""),A=g.schema.safeParse(I);if(A.success)return y.setCustomValidity(""),i(O=>Ua(O,E,A.data)),r(O=>{const{[E]:_,...F}=O||{};return F===null||vn.empty(F)?null:F});if(y.required){const O=((k=A.error.issues[0])==null?void 0:k.message)||"";y.setCustomValidity(O),r(_=>({..._,[E]:O}))}},S=y.getAttribute("data-trigger")||"blur";return y.addEventListener(S,v),y.tagName==="SELECT"&&y.addEventListener("change",v),{input:g,hasInitialError:y.required?!b.success:!1,unsubscribe:()=>{y.removeEventListener(S,v),y.tagName==="SELECT"&&y.addEventListener("change",v)}}});return p.some(g=>g.hasInitialError)&&r(g=>g===null?{}:g),()=>p.forEach(g=>g.unsubscribe())});const f=w.useCallback(p=>m=>{const g=m.currentTarget,y=Object.values(o.current).reduce((v,S)=>{var k;const T=S.element,E=S.schema.safeParse(Ls(T));if(T.dataset.ignore==="ignore"||E.success)return v;const I=(k=E.error.issues[0])==null?void 0:k.message;T.setAttribute("data-initialized","true");const A=T.dataset.name||T.name||"";return{...v,[A]:I}},{}),b=vn.empty(y)?null:y;r(b),p==null||p({form:g,errors:b||{}})},[]),h=w.useCallback(p=>m=>{m.preventDefault();const g=m.currentTarget;let y=O0(g);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(g.elements)).forEach(S=>{if(S.tagName==="SELECT"){const T=S;y=Ua(y,T.name,T.value)}if(S.tagName==="INPUT"){const T=S;y=Ua(y,T.name,Ls(T))}});const v=e.safeParse(s);return v.success?p({form:g,json:y,data:v.data,event:m,reset:()=>Au(g),success:!0,errors:[]}):p({form:g,json:y,event:m,data:y,success:!1,reset:()=>Au(g),errors:v.error.issues.map(S=>({message:S.message,path:S.path.map(T=>String(T))}))})},[t]);return{state:s,input:u,datepicker:a,checkbox:c,select:l,onSubmit:h,errors:n,onInvalid:f,disabled:n!==null,name:t,get:p=>bc(s,p)||""}},g2=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};X.Alert=EP,X.Autocomplete=kk,X.Button=Lr,X.Calendar=Lg,X.Card=_g,X.Checkbox=Pv,X.ColType=Mo,X.Collapse=Mm,X.ComponentsProvider=uO,X.DatePicker=Nk,X.Dropdown=xo,X.Empty=Vg,X.Expand=pk,X.FileUpload=GF,X.Form=KF,X.Input=bs,X.InputFeedback=Ev,X.InputField=Qi,X.Menu=yk,X.MenuItem=gk,X.Modal=Pk,X.Notifications=mD,X.Option=Cv,X.Polymorph=Nr,X.Radiobox=qF,X.RenderOnView=i1,X.Select=vr,X.Stats=gD,X.Switch=XF,X.Tab=bD,X.Table=N_,X.Tabs=yD,X.Tag=c1,X.TaskList=QF,X.Textarea=ZF,X.Toolbar=Ik,X.Tooltip=Sv,X.TransferList=FL,X.convertPath=D0,X.createColumns=r_,X.createDesignTokens=Tg,X.createOptionCols=af,X.createStyles=oO,X.createTheme=sO,X.css=Oe,X.defaultDarkTheme=lO,X.defaultLightTheme=cO,X.dispatchInput=bd,X.formReset=Au,X.formToJson=O0,X.getSchemaShape=Ns,X.initializeInputDataset=Us,X.isReactComponent=n1,X.isReactFC=r1,X.isSsr=Ei,X.mergeRefs=Ka,X.parsers=Ti,X.path=bc,X.reduceTokens=eo,X.safeRegex=wc,X.splitInto=Og,X.useColorParser=fO,X.useForm=m2,X.useLocale=Pg,X.useNotification=hD,X.usePrevious=g2,X.useReactive=uy,X.useTablePreferences=i_,X.useTranslations=Tt,X.uuid=fs,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
202
202
  //# sourceMappingURL=index.umd.js.map