@g4rcez/components 0.0.63 → 0.0.64
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.css +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4445 -4433
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +41 -41
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/form/autocomplete.d.ts +1 -0
- package/dist/src/components/form/autocomplete.d.ts.map +1 -1
- package/dist/src/components/form/autocomplete.js +24 -16
- package/dist/src/components/form/date-picker.d.ts +2 -2
- package/dist/src/components/form/free-text.d.ts.map +1 -1
- package/dist/src/components/form/free-text.js +1 -1
- package/dist/src/components/form/input-field.d.ts +1 -1
- package/dist/src/components/form/input-field.d.ts.map +1 -1
- package/dist/src/components/form/input-field.js +5 -5
- package/dist/src/components/form/input.d.ts +16 -3
- package/dist/src/components/form/input.d.ts.map +1 -1
- package/dist/src/hooks/use-components-provider.d.ts +2 -0
- package/dist/src/hooks/use-components-provider.d.ts.map +1 -1
- package/dist/src/hooks/use-components-provider.js +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var D0=Object.defineProperty;var M0=(e,t,n)=>t in e?D0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>M0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),x=require("react/jsx-runtime"),_c=require("react-dom");function ym(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=ym(w),vs=ym(_c);function vm(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=vm(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function k0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=vm(e))&&(r&&(r+=" "),r+=t);return r}const wf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Tf=k0,uo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Tf(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=wf(u)||wf(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 Tf(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function bm(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=bm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bm(e))&&(r&&(r+=" "),r+=t);return r}var Sf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j0(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,xm=SyntaxError,bs=TypeError,B0=URIError,H0=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},Ef=typeof Symbol<"u"&&Symbol,W0=H0,z0=function(){return typeof Ef!="function"||typeof Symbol!="function"||typeof Ef("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:W0()},Ea={__proto__:null,foo:{}},U0=Object,G0=function(){return{__proto__:Ea}.foo===Ea.foo&&!(Ea instanceof U0)},Y0="Function.prototype.bind called on incompatible ",K0=Object.prototype.toString,q0=Math.max,X0="[object Function]",Cf=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},Z0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},J0=function(t){var n=this;if(typeof n!="function"||K0.apply(n)!==X0)throw new TypeError(Y0+n);for(var r=Q0(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Cf(r,arguments));return Object(u)===u?u:this}return n.apply(t,Cf(r,arguments))},i=q0(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Z0(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},ex=J0,Vc=Function.prototype.bind||ex,tx=Function.prototype.call,nx=Object.prototype.hasOwnProperty,rx=Vc,ox=rx.call(tx,nx),he,sx=L0,ix=_0,ax=V0,lx=$0,zr=xm,Vr=bs,cx=B0,wm=Function,Ca=function(e){try{return wm('"use strict"; return ('+e+").constructor;")()}catch{}},fr=Object.getOwnPropertyDescriptor;if(fr)try{fr({},"")}catch{fr=null}var Pa=function(){throw new Vr},ux=fr?function(){try{return arguments.callee,Pa}catch{try{return fr(arguments,"callee").get}catch{return Pa}}}():Pa,Cr=z0(),fx=G0(),ct=Object.getPrototypeOf||(fx?function(e){return e.__proto__}:null),Dr={},dx=typeof Uint8Array>"u"||!ct?he:ct(Uint8Array),dr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?he:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?he:ArrayBuffer,"%ArrayIteratorPrototype%":Cr&&ct?ct([][Symbol.iterator]()):he,"%AsyncFromSyncIteratorPrototype%":he,"%AsyncFunction%":Dr,"%AsyncGenerator%":Dr,"%AsyncGeneratorFunction%":Dr,"%AsyncIteratorPrototype%":Dr,"%Atomics%":typeof Atomics>"u"?he:Atomics,"%BigInt%":typeof BigInt>"u"?he:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?he:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?he:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?he:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":sx,"%eval%":eval,"%EvalError%":ix,"%Float32Array%":typeof Float32Array>"u"?he:Float32Array,"%Float64Array%":typeof Float64Array>"u"?he:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?he:FinalizationRegistry,"%Function%":wm,"%GeneratorFunction%":Dr,"%Int8Array%":typeof Int8Array>"u"?he:Int8Array,"%Int16Array%":typeof Int16Array>"u"?he:Int16Array,"%Int32Array%":typeof Int32Array>"u"?he:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Cr&&ct?ct(ct([][Symbol.iterator]())):he,"%JSON%":typeof JSON=="object"?JSON:he,"%Map%":typeof Map>"u"?he:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Cr||!ct?he:ct(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?he:Promise,"%Proxy%":typeof Proxy>"u"?he:Proxy,"%RangeError%":ax,"%ReferenceError%":lx,"%Reflect%":typeof Reflect>"u"?he:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?he:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Cr||!ct?he:ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?he:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Cr&&ct?ct(""[Symbol.iterator]()):he,"%Symbol%":Cr?Symbol:he,"%SyntaxError%":zr,"%ThrowTypeError%":ux,"%TypedArray%":dx,"%TypeError%":Vr,"%Uint8Array%":typeof Uint8Array>"u"?he:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?he:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?he:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?he:Uint32Array,"%URIError%":cx,"%WeakMap%":typeof WeakMap>"u"?he:WeakMap,"%WeakRef%":typeof WeakRef>"u"?he:WeakRef,"%WeakSet%":typeof WeakSet>"u"?he:WeakSet};if(ct)try{null.error}catch(e){var hx=ct(ct(e));dr["%Error.prototype%"]=hx}var px=function e(t){var n;if(t==="%AsyncFunction%")n=Ca("async function () {}");else if(t==="%GeneratorFunction%")n=Ca("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ca("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ct&&(n=ct(o.prototype))}return dr[t]=n,n},Pf={__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"]},xs=Vc,di=ox,mx=xs.call(Function.call,Array.prototype.concat),gx=xs.call(Function.apply,Array.prototype.splice),Rf=xs.call(Function.call,String.prototype.replace),hi=xs.call(Function.call,String.prototype.slice),yx=xs.call(Function.call,RegExp.prototype.exec),vx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,bx=/\\(\\)?/g,xx=function(t){var n=hi(t,0,1),r=hi(t,-1);if(n==="%"&&r!=="%")throw new zr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new zr("invalid intrinsic syntax, expected opening `%`");var o=[];return Rf(t,vx,function(s,i,a,l){o[o.length]=a?Rf(l,bx,"$1"):i||s}),o},wx=function(t,n){var r=t,o;if(di(Pf,r)&&(o=Pf[r],r="%"+o[0]+"%"),di(dr,r)){var s=dr[r];if(s===Dr&&(s=px(r)),typeof s>"u"&&!n)throw new Vr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new zr("intrinsic "+t+" does not exist!")},fo=function(t,n){if(typeof t!="string"||t.length===0)throw new Vr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Vr('"allowMissing" argument must be a boolean');if(yx(/^%?[^%]*%?$/,t)===null)throw new zr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=xx(t),o=r.length>0?r[0]:"",s=wx("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],gx(r,mx([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var h=r[u],d=hi(h,0,1),p=hi(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new zr("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),o+="."+h,i="%"+o+"%",di(dr,i))a=dr[i];else if(a!=null){if(!(h in a)){if(!n)throw new Vr("base intrinsic for "+t+" exists, but the property is not available.");return}if(fr&&u+1>=r.length){var m=fr(a,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else f=di(a,h),a=a[h];f&&!l&&(dr[i]=a)}}return a},Tm={exports:{}},Ra,If;function $c(){if(If)return Ra;If=1;var e=fo,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ra=t,Ra}var Tx=fo,ti=Tx("%Object.getOwnPropertyDescriptor%",!0);if(ti)try{ti([],"length")}catch{ti=null}var Sm=ti,Af=$c(),Sx=xm,Pr=bs,Of=Sm,Ex=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Pr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Pr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Pr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Pr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Pr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Pr("`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=!!Of&&Of(t,n);if(Af)Af(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 Sx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ml=$c(),Em=function(){return!!Ml};Em.hasArrayLengthDefineBug=function(){if(!Ml)return null;try{return Ml([],"length",{value:1}).length!==1}catch{return!0}};var Cx=Em,Px=fo,Df=Ex,Rx=Cx(),Mf=Sm,kf=bs,Ix=Px("%Math.floor%"),Ax=function(t,n){if(typeof t!="function")throw new kf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Ix(n)!==n)throw new kf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&Mf){var i=Mf(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(Rx?Df(t,"length",n,!0,!0):Df(t,"length",n)),t};(function(e){var t=Vc,n=fo,r=Ax,o=bs,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=$c(),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})(Tm);var Ox=Tm.exports,Cm=fo,Pm=Ox,Dx=Pm(Cm("String.prototype.indexOf")),Mx=function(t,n){var r=Cm(t,!!n);return typeof r=="function"&&Dx(t,".prototype.")>-1?Pm(r):r};const kx={},Fx=Object.freeze(Object.defineProperty({__proto__:null,default:kx},Symbol.toStringTag,{value:"Module"})),jx=N0(Fx);var Bc=typeof Map=="function"&&Map.prototype,Ia=Object.getOwnPropertyDescriptor&&Bc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,pi=Bc&&Ia&&typeof Ia.get=="function"?Ia.get:null,Ff=Bc&&Map.prototype.forEach,Hc=typeof Set=="function"&&Set.prototype,Aa=Object.getOwnPropertyDescriptor&&Hc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,mi=Hc&&Aa&&typeof Aa.get=="function"?Aa.get:null,jf=Hc&&Set.prototype.forEach,Nx=typeof WeakMap=="function"&&WeakMap.prototype,zo=Nx?WeakMap.prototype.has:null,Lx=typeof WeakSet=="function"&&WeakSet.prototype,Uo=Lx?WeakSet.prototype.has:null,_x=typeof WeakRef=="function"&&WeakRef.prototype,Nf=_x?WeakRef.prototype.deref:null,Vx=Boolean.prototype.valueOf,$x=Object.prototype.toString,Bx=Function.prototype.toString,Hx=String.prototype.match,Wc=String.prototype.slice,Mn=String.prototype.replace,Wx=String.prototype.toUpperCase,Lf=String.prototype.toLowerCase,Rm=RegExp.prototype.test,_f=Array.prototype.concat,Jt=Array.prototype.join,zx=Array.prototype.slice,Vf=Math.floor,kl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Oa=Object.getOwnPropertySymbols,Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ur=typeof Symbol=="function"&&typeof Symbol.iterator=="object",St=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ur||!0)?Symbol.toStringTag:null,Im=Object.prototype.propertyIsEnumerable,$f=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Bf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Rm.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Vf(-e):Vf(e);if(r!==e){var o=String(r),s=Wc.call(t,o.length+1);return Mn.call(o,n,"$&_")+"."+Mn.call(Mn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mn.call(t,n,"$&_")}var jl=jx,Hf=jl.custom,Wf=Om(Hf)?Hf:null,Ux=function e(t,n,r,o){var s=n||{};if(An(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(An(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=An(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(An(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(An(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 Mm(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Bf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Bf(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 Nl(t)?"[Array]":"[Object]";var f=cw(s,r);if(typeof o>"u")o=[];else if(Dm(o,t)>=0)return"[Circular]";function h(j,P,O){if(P&&(o=zx.call(o),o.push(P)),O){var F={depth:s.depth};return An(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(j,F,r+1,o)}return e(j,s,r+1,o)}if(typeof t=="function"&&!zf(t)){var d=ew(t),p=Ns(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+Jt.call(p,", ")+" }":"")}if(Om(t)){var m=Ur?Mn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Fl.call(t);return typeof t=="object"&&!Ur?Fo(m):m}if(iw(t)){for(var g="<"+Lf.call(String(t.nodeName)),y=t.attributes||[],b=0;b<y.length;b++)g+=" "+y[b].name+"="+Am(Gx(y[b].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Lf.call(String(t.nodeName))+">",g}if(Nl(t)){if(t.length===0)return"[]";var v=Ns(t,h);return f&&!lw(v)?"["+Ll(v,f)+"]":"[ "+Jt.call(v,", ")+" ]"}if(Kx(t)){var S=Ns(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Im.call(t,"cause")?"{ ["+String(t)+"] "+Jt.call(_f.call("[cause]: "+h(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Jt.call(S,", ")+" }"}if(typeof t=="object"&&i){if(Wf&&typeof t[Wf]=="function"&&jl)return jl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(tw(t)){var T=[];return Ff&&Ff.call(t,function(j,P){T.push(h(P,t,!0)+" => "+h(j,t))}),Uf("Map",pi.call(t),T,f)}if(ow(t)){var E=[];return jf&&jf.call(t,function(j){E.push(h(j,t))}),Uf("Set",mi.call(t),E,f)}if(nw(t))return Da("WeakMap");if(sw(t))return Da("WeakSet");if(rw(t))return Da("WeakRef");if(Xx(t))return Fo(h(Number(t)));if(Zx(t))return Fo(h(kl.call(t)));if(Qx(t))return Fo(Vx.call(t));if(qx(t))return Fo(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Sf<"u"&&t===Sf)return"{ [object globalThis] }";if(!Yx(t)&&!zf(t)){var R=Ns(t,h),I=$f?$f(t)===Object.prototype:t instanceof Object||t.constructor===Object,M=t instanceof Object?"":"null prototype",A=!I&&St&&Object(t)===t&&St in t?Wc.call(Wn(t),8,-1):M?"Object":"",N=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",k=N+(A||M?"["+Jt.call(_f.call([],A||[],M||[]),": ")+"] ":"");return R.length===0?k+"{}":f?k+"{"+Ll(R,f)+"}":k+"{ "+Jt.call(R,", ")+" }"}return String(t)};function Am(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Gx(e){return Mn.call(String(e),/"/g,""")}function Nl(e){return Wn(e)==="[object Array]"&&(!St||!(typeof e=="object"&&St in e))}function Yx(e){return Wn(e)==="[object Date]"&&(!St||!(typeof e=="object"&&St in e))}function zf(e){return Wn(e)==="[object RegExp]"&&(!St||!(typeof e=="object"&&St in e))}function Kx(e){return Wn(e)==="[object Error]"&&(!St||!(typeof e=="object"&&St in e))}function qx(e){return Wn(e)==="[object String]"&&(!St||!(typeof e=="object"&&St in e))}function Xx(e){return Wn(e)==="[object Number]"&&(!St||!(typeof e=="object"&&St in e))}function Qx(e){return Wn(e)==="[object Boolean]"&&(!St||!(typeof e=="object"&&St in e))}function Om(e){if(Ur)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Fl)return!1;try{return Fl.call(e),!0}catch{}return!1}function Zx(e){if(!e||typeof e!="object"||!kl)return!1;try{return kl.call(e),!0}catch{}return!1}var Jx=Object.prototype.hasOwnProperty||function(e){return e in this};function An(e,t){return Jx.call(e,t)}function Wn(e){return $x.call(e)}function ew(e){if(e.name)return e.name;var t=Hx.call(Bx.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Dm(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 tw(e){if(!pi||!e||typeof e!="object")return!1;try{pi.call(e);try{mi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function nw(e){if(!zo||!e||typeof e!="object")return!1;try{zo.call(e,zo);try{Uo.call(e,Uo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function rw(e){if(!Nf||!e||typeof e!="object")return!1;try{return Nf.call(e),!0}catch{}return!1}function ow(e){if(!mi||!e||typeof e!="object")return!1;try{mi.call(e);try{pi.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function sw(e){if(!Uo||!e||typeof e!="object")return!1;try{Uo.call(e,Uo);try{zo.call(e,zo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function iw(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Mm(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Mm(Wc.call(e,0,t.maxStringLength),t)+r}var o=Mn.call(Mn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,aw);return Am(o,"single",t)}function aw(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":"")+Wx.call(t.toString(16))}function Fo(e){return"Object("+e+")"}function Da(e){return e+" { ? }"}function Uf(e,t,n,r){var o=r?Ll(n,r):Jt.call(n,", ");return e+" ("+t+") {"+o+"}"}function lw(e){for(var t=0;t<e.length;t++)if(Dm(e[t],`
|
|
2
|
-
`)>=0)return!1;return!0}function cw(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Jt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Jt.call(Array(t+1),n)}}function
|
|
1
|
+
"use strict";var D0=Object.defineProperty;var M0=(e,t,n)=>t in e?D0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ee=(e,t,n)=>M0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),x=require("react/jsx-runtime"),Vc=require("react-dom");function ym(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=ym(w),vs=ym(Vc);function vm(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=vm(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function k0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=vm(e))&&(r&&(r+=" "),r+=t);return r}const xd=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,wd=k0,uo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return wd(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],d=s==null?void 0:s[c];if(u===null)return null;const f=xd(u)||xd(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...s,...a}[m]):{...s,...a}[m]===g})?[...c,d,f]:c},[]);return wd(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function bm(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=bm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bm(e))&&(r&&(r+=" "),r+=t);return r}var Td=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j0(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,xm=SyntaxError,bs=TypeError,B0=URIError,H0=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},Sd=typeof Symbol<"u"&&Symbol,W0=H0,z0=function(){return typeof Sd!="function"||typeof Symbol!="function"||typeof Sd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:W0()},Ca={__proto__:null,foo:{}},U0=Object,G0=function(){return{__proto__:Ca}.foo===Ca.foo&&!(Ca instanceof U0)},Y0="Function.prototype.bind called on incompatible ",K0=Object.prototype.toString,q0=Math.max,X0="[object Function]",Ed=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},Z0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},J0=function(t){var n=this;if(typeof n!="function"||K0.apply(n)!==X0)throw new TypeError(Y0+n);for(var r=Q0(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Ed(r,arguments));return Object(u)===u?u:this}return n.apply(t,Ed(r,arguments))},i=q0(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Z0(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},ex=J0,$c=Function.prototype.bind||ex,tx=Function.prototype.call,nx=Object.prototype.hasOwnProperty,rx=$c,ox=rx.call(tx,nx),me,sx=L0,ix=_0,ax=V0,lx=$0,zr=xm,Vr=bs,cx=B0,wm=Function,Pa=function(e){try{return wm('"use strict"; return ('+e+").constructor;")()}catch{}},dr=Object.getOwnPropertyDescriptor;if(dr)try{dr({},"")}catch{dr=null}var Ra=function(){throw new Vr},ux=dr?function(){try{return arguments.callee,Ra}catch{try{return dr(arguments,"callee").get}catch{return Ra}}}():Ra,Cr=z0(),dx=G0(),ct=Object.getPrototypeOf||(dx?function(e){return e.__proto__}:null),Dr={},fx=typeof Uint8Array>"u"||!ct?me:ct(Uint8Array),fr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?me:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?me:ArrayBuffer,"%ArrayIteratorPrototype%":Cr&&ct?ct([][Symbol.iterator]()):me,"%AsyncFromSyncIteratorPrototype%":me,"%AsyncFunction%":Dr,"%AsyncGenerator%":Dr,"%AsyncGeneratorFunction%":Dr,"%AsyncIteratorPrototype%":Dr,"%Atomics%":typeof Atomics>"u"?me:Atomics,"%BigInt%":typeof BigInt>"u"?me:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?me:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?me:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?me:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":sx,"%eval%":eval,"%EvalError%":ix,"%Float32Array%":typeof Float32Array>"u"?me:Float32Array,"%Float64Array%":typeof Float64Array>"u"?me:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?me:FinalizationRegistry,"%Function%":wm,"%GeneratorFunction%":Dr,"%Int8Array%":typeof Int8Array>"u"?me:Int8Array,"%Int16Array%":typeof Int16Array>"u"?me:Int16Array,"%Int32Array%":typeof Int32Array>"u"?me:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Cr&&ct?ct(ct([][Symbol.iterator]())):me,"%JSON%":typeof JSON=="object"?JSON:me,"%Map%":typeof Map>"u"?me:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Cr||!ct?me:ct(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?me:Promise,"%Proxy%":typeof Proxy>"u"?me:Proxy,"%RangeError%":ax,"%ReferenceError%":lx,"%Reflect%":typeof Reflect>"u"?me:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?me:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Cr||!ct?me:ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?me:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Cr&&ct?ct(""[Symbol.iterator]()):me,"%Symbol%":Cr?Symbol:me,"%SyntaxError%":zr,"%ThrowTypeError%":ux,"%TypedArray%":fx,"%TypeError%":Vr,"%Uint8Array%":typeof Uint8Array>"u"?me:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?me:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?me:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?me:Uint32Array,"%URIError%":cx,"%WeakMap%":typeof WeakMap>"u"?me:WeakMap,"%WeakRef%":typeof WeakRef>"u"?me:WeakRef,"%WeakSet%":typeof WeakSet>"u"?me:WeakSet};if(ct)try{null.error}catch(e){var hx=ct(ct(e));fr["%Error.prototype%"]=hx}var px=function e(t){var n;if(t==="%AsyncFunction%")n=Pa("async function () {}");else if(t==="%GeneratorFunction%")n=Pa("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Pa("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ct&&(n=ct(o.prototype))}return fr[t]=n,n},Cd={__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"]},xs=$c,fi=ox,mx=xs.call(Function.call,Array.prototype.concat),gx=xs.call(Function.apply,Array.prototype.splice),Pd=xs.call(Function.call,String.prototype.replace),hi=xs.call(Function.call,String.prototype.slice),yx=xs.call(Function.call,RegExp.prototype.exec),vx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,bx=/\\(\\)?/g,xx=function(t){var n=hi(t,0,1),r=hi(t,-1);if(n==="%"&&r!=="%")throw new zr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new zr("invalid intrinsic syntax, expected opening `%`");var o=[];return Pd(t,vx,function(s,i,a,l){o[o.length]=a?Pd(l,bx,"$1"):i||s}),o},wx=function(t,n){var r=t,o;if(fi(Cd,r)&&(o=Cd[r],r="%"+o[0]+"%"),fi(fr,r)){var s=fr[r];if(s===Dr&&(s=px(r)),typeof s>"u"&&!n)throw new Vr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new zr("intrinsic "+t+" does not exist!")},fo=function(t,n){if(typeof t!="string"||t.length===0)throw new Vr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Vr('"allowMissing" argument must be a boolean');if(yx(/^%?[^%]*%?$/,t)===null)throw new zr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=xx(t),o=r.length>0?r[0]:"",s=wx("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],gx(r,mx([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=hi(f,0,1),p=hi(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new zr("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",fi(fr,i))a=fr[i];else if(a!=null){if(!(f in a)){if(!n)throw new Vr("base intrinsic for "+t+" exists, but the property is not available.");return}if(dr&&u+1>=r.length){var m=dr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=fi(a,f),a=a[f];d&&!l&&(fr[i]=a)}}return a},Tm={exports:{}},Ia,Rd;function Bc(){if(Rd)return Ia;Rd=1;var e=fo,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ia=t,Ia}var Tx=fo,ti=Tx("%Object.getOwnPropertyDescriptor%",!0);if(ti)try{ti([],"length")}catch{ti=null}var Sm=ti,Id=Bc(),Sx=xm,Pr=bs,Ad=Sm,Ex=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Pr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Pr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Pr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Pr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Pr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Pr("`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=!!Ad&&Ad(t,n);if(Id)Id(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 Sx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},kl=Bc(),Em=function(){return!!kl};Em.hasArrayLengthDefineBug=function(){if(!kl)return null;try{return kl([],"length",{value:1}).length!==1}catch{return!0}};var Cx=Em,Px=fo,Od=Ex,Rx=Cx(),Dd=Sm,Md=bs,Ix=Px("%Math.floor%"),Ax=function(t,n){if(typeof t!="function")throw new Md("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Ix(n)!==n)throw new Md("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&Dd){var i=Dd(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(Rx?Od(t,"length",n,!0,!0):Od(t,"length",n)),t};(function(e){var t=$c,n=fo,r=Ax,o=bs,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Bc(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(Tm);var Ox=Tm.exports,Cm=fo,Pm=Ox,Dx=Pm(Cm("String.prototype.indexOf")),Mx=function(t,n){var r=Cm(t,!!n);return typeof r=="function"&&Dx(t,".prototype.")>-1?Pm(r):r};const kx={},Fx=Object.freeze(Object.defineProperty({__proto__:null,default:kx},Symbol.toStringTag,{value:"Module"})),jx=N0(Fx);var Hc=typeof Map=="function"&&Map.prototype,Aa=Object.getOwnPropertyDescriptor&&Hc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,pi=Hc&&Aa&&typeof Aa.get=="function"?Aa.get:null,kd=Hc&&Map.prototype.forEach,Wc=typeof Set=="function"&&Set.prototype,Oa=Object.getOwnPropertyDescriptor&&Wc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,mi=Wc&&Oa&&typeof Oa.get=="function"?Oa.get:null,Fd=Wc&&Set.prototype.forEach,Nx=typeof WeakMap=="function"&&WeakMap.prototype,zo=Nx?WeakMap.prototype.has:null,Lx=typeof WeakSet=="function"&&WeakSet.prototype,Uo=Lx?WeakSet.prototype.has:null,_x=typeof WeakRef=="function"&&WeakRef.prototype,jd=_x?WeakRef.prototype.deref:null,Vx=Boolean.prototype.valueOf,$x=Object.prototype.toString,Bx=Function.prototype.toString,Hx=String.prototype.match,zc=String.prototype.slice,Mn=String.prototype.replace,Wx=String.prototype.toUpperCase,Nd=String.prototype.toLowerCase,Rm=RegExp.prototype.test,Ld=Array.prototype.concat,Jt=Array.prototype.join,zx=Array.prototype.slice,_d=Math.floor,Fl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Da=Object.getOwnPropertySymbols,jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ur=typeof Symbol=="function"&&typeof Symbol.iterator=="object",St=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ur||!0)?Symbol.toStringTag:null,Im=Object.prototype.propertyIsEnumerable,Vd=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function $d(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Rm.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-_d(-e):_d(e);if(r!==e){var o=String(r),s=zc.call(t,o.length+1);return Mn.call(o,n,"$&_")+"."+Mn.call(Mn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mn.call(t,n,"$&_")}var Nl=jx,Bd=Nl.custom,Hd=Om(Bd)?Bd:null,Ux=function e(t,n,r,o){var s=n||{};if(An(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(An(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=An(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(An(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(An(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 Mm(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?$d(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?$d(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 Ll(t)?"[Array]":"[Object]";var d=cw(s,r);if(typeof o>"u")o=[];else if(Dm(o,t)>=0)return"[Circular]";function f(j,P,O){if(P&&(o=zx.call(o),o.push(P)),O){var F={depth:s.depth};return An(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(j,F,r+1,o)}return e(j,s,r+1,o)}if(typeof t=="function"&&!Wd(t)){var h=ew(t),p=Ns(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+Jt.call(p,", ")+" }":"")}if(Om(t)){var m=Ur?Mn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):jl.call(t);return typeof t=="object"&&!Ur?Fo(m):m}if(iw(t)){for(var g="<"+Nd.call(String(t.nodeName)),v=t.attributes||[],b=0;b<v.length;b++)g+=" "+v[b].name+"="+Am(Gx(v[b].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Nd.call(String(t.nodeName))+">",g}if(Ll(t)){if(t.length===0)return"[]";var y=Ns(t,f);return d&&!lw(y)?"["+_l(y,d)+"]":"[ "+Jt.call(y,", ")+" ]"}if(Kx(t)){var T=Ns(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Im.call(t,"cause")?"{ ["+String(t)+"] "+Jt.call(Ld.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Jt.call(T,", ")+" }"}if(typeof t=="object"&&i){if(Hd&&typeof t[Hd]=="function"&&Nl)return Nl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(tw(t)){var S=[];return kd&&kd.call(t,function(j,P){S.push(f(P,t,!0)+" => "+f(j,t))}),zd("Map",pi.call(t),S,d)}if(ow(t)){var E=[];return Fd&&Fd.call(t,function(j){E.push(f(j,t))}),zd("Set",mi.call(t),E,d)}if(nw(t))return Ma("WeakMap");if(sw(t))return Ma("WeakSet");if(rw(t))return Ma("WeakRef");if(Xx(t))return Fo(f(Number(t)));if(Zx(t))return Fo(f(Fl.call(t)));if(Qx(t))return Fo(Vx.call(t));if(qx(t))return Fo(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Td<"u"&&t===Td)return"{ [object globalThis] }";if(!Yx(t)&&!Wd(t)){var R=Ns(t,f),I=Vd?Vd(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",A=!I&&St&&Object(t)===t&&St in t?zc.call(Wn(t),8,-1):k?"Object":"",N=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",M=N+(A||k?"["+Jt.call(Ld.call([],A||[],k||[]),": ")+"] ":"");return R.length===0?M+"{}":d?M+"{"+_l(R,d)+"}":M+"{ "+Jt.call(R,", ")+" }"}return String(t)};function Am(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Gx(e){return Mn.call(String(e),/"/g,""")}function Ll(e){return Wn(e)==="[object Array]"&&(!St||!(typeof e=="object"&&St in e))}function Yx(e){return Wn(e)==="[object Date]"&&(!St||!(typeof e=="object"&&St in e))}function Wd(e){return Wn(e)==="[object RegExp]"&&(!St||!(typeof e=="object"&&St in e))}function Kx(e){return Wn(e)==="[object Error]"&&(!St||!(typeof e=="object"&&St in e))}function qx(e){return Wn(e)==="[object String]"&&(!St||!(typeof e=="object"&&St in e))}function Xx(e){return Wn(e)==="[object Number]"&&(!St||!(typeof e=="object"&&St in e))}function Qx(e){return Wn(e)==="[object Boolean]"&&(!St||!(typeof e=="object"&&St in e))}function Om(e){if(Ur)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!jl)return!1;try{return jl.call(e),!0}catch{}return!1}function Zx(e){if(!e||typeof e!="object"||!Fl)return!1;try{return Fl.call(e),!0}catch{}return!1}var Jx=Object.prototype.hasOwnProperty||function(e){return e in this};function An(e,t){return Jx.call(e,t)}function Wn(e){return $x.call(e)}function ew(e){if(e.name)return e.name;var t=Hx.call(Bx.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Dm(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 tw(e){if(!pi||!e||typeof e!="object")return!1;try{pi.call(e);try{mi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function nw(e){if(!zo||!e||typeof e!="object")return!1;try{zo.call(e,zo);try{Uo.call(e,Uo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function rw(e){if(!jd||!e||typeof e!="object")return!1;try{return jd.call(e),!0}catch{}return!1}function ow(e){if(!mi||!e||typeof e!="object")return!1;try{mi.call(e);try{pi.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function sw(e){if(!Uo||!e||typeof e!="object")return!1;try{Uo.call(e,Uo);try{zo.call(e,zo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function iw(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Mm(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Mm(zc.call(e,0,t.maxStringLength),t)+r}var o=Mn.call(Mn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,aw);return Am(o,"single",t)}function aw(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":"")+Wx.call(t.toString(16))}function Fo(e){return"Object("+e+")"}function Ma(e){return e+" { ? }"}function zd(e,t,n,r){var o=r?_l(n,r):Jt.call(n,", ");return e+" ("+t+") {"+o+"}"}function lw(e){for(var t=0;t<e.length;t++)if(Dm(e[t],`
|
|
2
|
+
`)>=0)return!1;return!0}function cw(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Jt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Jt.call(Array(t+1),n)}}function _l(e,t){if(e.length===0)return"";var n=`
|
|
3
3
|
`+t.prev+t.base;return n+Jt.call(e,","+n)+`
|
|
4
|
-
`+t.prev}function Ns(e,t){var n=Nl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=An(e,o)?t(e[o],e):""}var s=typeof Oa=="function"?Oa(e):[],i;if(Ur){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)An(e,l)&&(n&&String(Number(l))===l&&l<e.length||Ur&&i["$"+l]instanceof Symbol||(Rm.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Oa=="function")for(var c=0;c<s.length;c++)Im.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var km=fo,ho=Mx,uw=Ux,fw=bs,Ls=km("%WeakMap%",!0),_s=km("%Map%",!0),dw=ho("WeakMap.prototype.get",!0),hw=ho("WeakMap.prototype.set",!0),pw=ho("WeakMap.prototype.has",!0),mw=ho("Map.prototype.get",!0),gw=ho("Map.prototype.set",!0),yw=ho("Map.prototype.has",!0),zc=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},vw=function(e,t){var n=zc(e,t);return n&&n.value},bw=function(e,t,n){var r=zc(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},xw=function(e,t){return!!zc(e,t)},ww=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new fw("Side channel does not contain "+uw(s))},get:function(s){if(Ls&&s&&(typeof s=="object"||typeof s=="function")){if(t)return dw(t,s)}else if(_s){if(n)return mw(n,s)}else if(r)return vw(r,s)},has:function(s){if(Ls&&s&&(typeof s=="object"||typeof s=="function")){if(t)return pw(t,s)}else if(_s){if(n)return yw(n,s)}else if(r)return xw(r,s);return!1},set:function(s,i){Ls&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Ls),hw(t,s,i)):_s?(n||(n=new _s),gw(n,s,i)):(r||(r={key:{},next:null}),bw(r,s,i))}};return o},Gf=e=>Array.isArray(e),Ma=e=>e===void 0,ka=e=>e===null,Tw=Function.bind.call(Function.call,Object.prototype.toString),Sw=e=>!!e&&Tw(e)==="[object Error]"||e instanceof Error,Fm=(e,t)=>e instanceof t,Ew=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Cw=e=>Object.prototype.toString.call(e)==="[object Date]"&&Fm(e,Date),bn={array:Gf,date:Cw,empty:e=>ka(e)||Ma(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:Fm,isError:Sw,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>ka(e)||Ma(e),null:ka,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Gf(e)&&typeof e=="object",primitive:Ew,string:e=>typeof e=="string",undefined:Ma},_l=(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]=_l(s?[]:{},o,n)}else e[r]=_l(e[r],o,n)}else e[r]=n;return e},Pw=e=>Object.keys(e),Rw=e=>e.replace("[",".").replace("]","").split("."),Fa=(e,t,n)=>{const r=Array.isArray(t)?t:Rw(t),o=structuredClone(e);return _l(o,r,n),o};const Uc="-";function Iw(e){const t=Ow(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Uc);return a[0]===""&&a.length!==1&&a.shift(),jm(a,t)||Aw(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function jm(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?jm(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Uc);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Yf=/^\[(.+)\]$/;function Aw(e){if(Yf.test(e)){const t=Yf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Ow(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Mw(Object.entries(e.classGroups),n).forEach(([s,i])=>{Vl(i,r,s,t)}),r}function Vl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Kf(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Dw(o)){Vl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Vl(i,Kf(t,s),n,r)})})}function Kf(e,t){let n=e;return t.split(Uc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Dw(e){return e.isThemeGetter}function Mw(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 kw(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 Nm="!";function Fw(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(Nm),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 jw(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 Nw(e){return{cache:kw(e.cacheSize),parseClassName:Fw(e),...Iw(e)}}const Lw=/\s+/;function _w(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(Lw).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=jw(a).join(":");return{isTailwindClass:!0,modifierId:l?d+Nm: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 Vw(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Lm(t))&&(r&&(r+=" "),r+=n);return r}function Lm(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Lm(e[r]))&&(n&&(n+=" "),n+=t);return n}function $w(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=Nw(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=_w(l,n);return o(l,u),u}return function(){return s(Vw.apply(null,arguments))}}function Le(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const _m=/^\[(?:([a-z-]+):)?(.+)\]$/i,Bw=/^\d+\/\d+$/,Hw=new Set(["px","full","screen"]),Ww=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zw=/\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$/,Uw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Gw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function yn(e){return lr(e)||Hw.has(e)||Bw.test(e)}function Cn(e){return po(e,"length",t1)}function lr(e){return!!e&&!Number.isNaN(Number(e))}function Vs(e){return po(e,"number",lr)}function jo(e){return!!e&&Number.isInteger(Number(e))}function Kw(e){return e.endsWith("%")&&lr(e.slice(0,-1))}function ue(e){return _m.test(e)}function Pn(e){return Ww.test(e)}const qw=new Set(["length","size","percentage"]);function Xw(e){return po(e,qw,Vm)}function Qw(e){return po(e,"position",Vm)}const Zw=new Set(["image","url"]);function Jw(e){return po(e,Zw,r1)}function e1(e){return po(e,"",n1)}function No(){return!0}function po(e,t,n){const r=_m.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function t1(e){return zw.test(e)&&!Uw.test(e)}function Vm(){return!1}function n1(e){return Gw.test(e)}function r1(e){return Yw.test(e)}function o1(){const e=Le("colors"),t=Le("spacing"),n=Le("blur"),r=Le("brightness"),o=Le("borderColor"),s=Le("borderRadius"),i=Le("borderSpacing"),a=Le("borderWidth"),l=Le("contrast"),c=Le("grayscale"),u=Le("hueRotate"),f=Le("invert"),h=Le("gap"),d=Le("gradientColorStops"),p=Le("gradientColorStopPositions"),m=Le("inset"),g=Le("margin"),y=Le("opacity"),b=Le("padding"),v=Le("saturate"),S=Le("scale"),T=Le("sepia"),E=Le("skew"),R=Le("space"),I=Le("translate"),M=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",ue,t],k=()=>[ue,t],j=()=>["",yn,Cn],P=()=>["auto",lr,ue],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["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",ue],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[lr,Vs],q=()=>[lr,ue];return{cacheSize:500,separator:":",theme:{colors:[No],spacing:[yn,Cn],blur:["none","",Pn,ue],brightness:$(),borderColor:[e],borderRadius:["none","","full",Pn,ue],borderSpacing:k(),borderWidth:j(),contrast:$(),grayscale:U(),hueRotate:q(),invert:U(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Kw,Cn],inset:N(),margin:N(),opacity:$(),padding:k(),saturate:$(),scale:$(),sepia:U(),skew:q(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Pn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...O(),ue]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],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,ue]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",jo,ue]}],"grid-cols":[{"grid-cols":[No]}],"col-start-end":[{col:["auto",{span:["full",jo,ue]},ue]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[No]}],"row-start-end":[{row:["auto",{span:[jo,ue]},ue]}],"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",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],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":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[Pn]},Pn]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Pn,Cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vs]}],"font-family":[{font:[No]}],"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",ue]}],"line-clamp":[{"line-clamp":["none",lr,Vs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yn,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"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:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yn,Cn]}],"underline-offset":[{"underline-offset":["auto",yn,ue]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],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",ue]}],"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:[...O(),Qw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Xw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jw]}],"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:[...F(),"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:F()}],"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:["",...F()]}],"outline-offset":[{"outline-offset":[yn,ue]}],"outline-w":[{outline:[yn,Cn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[yn,Cn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Pn,e1]}],"shadow-color":[{shadow:[No]}],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",Pn,ue]}],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",ue]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[jo,ue]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"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",ue]}],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",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[yn,Cn,Vs]}],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 s1=$w(o1),Gc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},i1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),a1=e=>bn.function(e),De=(...e)=>s1(F0(e)),$m=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Ui=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},mo=w.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return x.jsx(s,{ref:o,...r,children:n})}),l1=uo("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"}}),Gr=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(mo,{...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:De(l1({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),Bm=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function c1(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 u1=({children:e,...t})=>{const n=Bm(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:c1(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})},f1=uo("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"}}}),d1=uo("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"}}),h1=w.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return x.jsxs(mo,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:De(d1({size:i,theme:s}),t),children:[n?x.jsx("span",{className:f1({theme:n})}):null,r,a.children]})}),Yr=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Gi=w.createContext({}),Yi=w.createContext(null),Yc=typeof document<"u",Ki=Yc?w.useLayoutEffect:w.useEffect,Hm=w.createContext({strict:!1}),qi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),p1="framerAppearId",Wm="data-"+qi(p1),m1={skipAnimations:!1,useManualTiming:!1};function g1(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 $s=["read","resolveKeyframes","update","preRender","render","postRender"],y1=40;function zm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=$s.reduce((y,b)=>(y[b]=g1(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,y1),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:$s.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<$s.length;b++)i[$s[b]].cancel(y)},state:o,steps:i}}const{schedule:Kc,cancel:jL}=zm(queueMicrotask,!1);function Mr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Um=w.createContext({});let qf=!1;function v1(e,t,n,r,o){const{visualElement:s}=w.useContext(Gi),i=w.useContext(Hm),a=w.useContext(Yi),l=w.useContext(Yr).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(Um);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&x1(c.current,n,o,f),w.useInsertionEffect(()=>{u&&u.update(n,a)});const h=w.useRef(!!(n[Wm]&&!window.HandoffComplete));return Ki(()=>{u&&(u.updateFeatures(),Kc.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,qf||(qf=!0,queueMicrotask(b1))))}),u}function b1(){window.HandoffComplete=!0}function x1(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:Gm(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&Mr(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Gm(e){if(e)return e.options.allowProjection!==!1?e.projection:Gm(e.parent)}function w1(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):Mr(n)&&(n.current=r))},[t])}function rs(e){return typeof e=="string"||Array.isArray(e)}function os(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const qc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xc=["initial",...qc];function Xi(e){return os(e.animate)||Xc.some(t=>rs(e[t]))}function Ym(e){return!!(Xi(e)||e.variants)}function T1(e,t){if(Xi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rs(n)?n:void 0,animate:rs(r)?r:void 0}}return e.inherit!==!1?t:{}}function S1(e){const{initial:t,animate:n}=T1(e,w.useContext(Gi));return w.useMemo(()=>({initial:t,animate:n}),[Xf(t),Xf(n)])}function Xf(e){return Array.isArray(e)?e.join(" "):e}const Qf={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"]},Kr={};for(const e in Qf)Kr[e]={isEnabled:t=>Qf[e].some(n=>!!t[n])};function E1(e){for(const t in e)Kr[t]={...Kr[t],...e[t]}}const ss=w.createContext({}),C1=Symbol.for("motionComponentSymbol"),yt=e=>e;let go=yt,Lt=yt;process.env.NODE_ENV!=="production"&&(go=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Lt=(e,t)=>{if(!e)throw new Error(t)});function P1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&E1(e);function s(a,l){let c;const u={...w.useContext(Yr),...a,layoutId:R1(a)},{isStatic:f}=u,h=S1(a),d=r(a,f);if(!f&&Yc){I1(u,e);const p=A1(u);c=p.MeasureLayout,h.visualElement=v1(o,d,u,t,p.ProjectionNode)}return x.jsxs(Gi.Provider,{value:h,children:[c&&h.visualElement?x.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,w1(d,h.visualElement,l),d,f,h.visualElement)]})}const i=w.forwardRef(s);return i[C1]=o,i}function R1({layoutId:e}){const t=w.useContext(ss).id;return t&&e!==void 0?t+"-"+e:e}function I1(e,t){const n=w.useContext(Hm).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?go(!1,r):Lt(!1,r)}}function A1(e){const{drag:t,layout:n}=Kr;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 O1(e){function t(r,o={}){return P1(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 D1=["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 Qc(e){return typeof e!="string"||e.includes("-")?!1:!!(D1.indexOf(e)>-1||/[A-Z]/u.test(e))}const gi={};function M1(e){Object.assign(gi,e)}const ws=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zn=new Set(ws);function Km(e,{layout:t,layoutId:n}){return zn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!gi[e]||e==="opacity")}const lt=e=>!!(e&&e.getVelocity),k1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},F1=ws.length;function j1(e,t,n){let r="";for(let o=0;o<F1;o++){const s=ws[o];if(e[s]!==void 0){const i=k1[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const qm=e=>t=>typeof t=="string"&&t.startsWith(e),Xm=qm("--"),N1=qm("var(--"),Zc=e=>N1(e)?L1.test(e.split("/*")[0].trim()):!1,L1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,_1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ln=(e,t,n)=>n>t?t:n<e?e:n,yo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Go={...yo,transform:e=>Ln(0,1,e)},Bs={...yo,default:1},Yo=e=>Math.round(e*1e5)/1e5,Jc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,V1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,$1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ts(e){return typeof e=="string"}function B1(e){return e==null}const Ss=e=>({test:t=>Ts(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),In=Ss("deg"),an=Ss("%"),ae=Ss("px"),H1=Ss("vh"),W1=Ss("vw"),Zf={...an,parse:e=>an.parse(e)/100,transform:e=>an.transform(e*100)},Jf={...yo,transform:Math.round},Qm={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,size:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,rotate:In,rotateX:In,rotateY:In,rotateZ:In,scale:Bs,scaleX:Bs,scaleY:Bs,scaleZ:Bs,skew:In,skewX:In,skewY:In,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:Go,originX:Zf,originY:Zf,originZ:ae,zIndex:Jf,backgroundPositionX:ae,backgroundPositionY:ae,fillOpacity:Go,strokeOpacity:Go,numOctaves:Jf};function eu(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(Xm(u)){o[u]=f;continue}const h=Qm[u],d=_1(f,h);if(zn.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=j1(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 tu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zm(e,t,n){for(const r in t)!lt(t[r])&&!Km(r,n)&&(e[r]=t[r])}function z1({transformTemplate:e},t){return w.useMemo(()=>{const n=tu();return eu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function U1(e,t){const n=e.style||{},r={};return Zm(r,n,e),Object.assign(r,z1(e,t)),r}function G1(e,t){const n={},r=U1(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 Y1=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 yi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Y1.has(e)}let Jm=e=>!yi(e);function eg(e){e&&(Jm=t=>t.startsWith("on")?!yi(t):e(t))}try{eg(require("@emotion/is-prop-valid").default)}catch{}function K1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Jm(o)||n===!0&&yi(o)||!t&&!yi(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function ed(e,t,n){return typeof e=="string"?e:ae.transform(t+n*e)}function q1(e,t,n){const r=ed(t,e.x,e.width),o=ed(n,e.y,e.height);return`${r} ${o}`}const X1={offset:"stroke-dashoffset",array:"stroke-dasharray"},Q1={offset:"strokeDashoffset",array:"strokeDasharray"};function Z1(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?X1:Q1;e[s.offset]=ae.transform(-r);const i=ae.transform(t),a=ae.transform(n);e[s.array]=`${i} ${a}`}function nu(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(eu(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=q1(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&&Z1(h,i,a,l,!1)}const tg=()=>({...tu(),attrs:{}}),ru=e=>typeof e=="string"&&e.toLowerCase()==="svg";function J1(e,t,n,r){const o=w.useMemo(()=>{const s=tg();return nu(s,t,ru(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Zm(s,e.style,e),o.style={...s,...o.style}}return o}function eT(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Qc(n)?J1:G1)(r,s,i,n),c=K1(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:f}=r,h=w.useMemo(()=>lt(f)?f.get():f,[f]);return w.createElement(n,{...u,children:h})}}function ng(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 rg=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 og(e,t,n,r){ng(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(rg.has(o)?o:qi(o),t.attrs[o])}function ou(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(lt(o[i])||t.style&<(t.style[i])||Km(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 sg(e,t,n){const r=ou(e,t,n);for(const o in e)if(lt(e[o])||lt(t[o])){const s=ws.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function td(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function su(e,t,n,r){if(typeof t=="function"){const[o,s]=td(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]=td(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function un(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const $l=e=>Array.isArray(e),tT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),nT=e=>$l(e)?e[e.length-1]||0:e;function ni(e){const t=lt(e)?e.get():e;return tT(t)?t.toValue():t}const ig=new Set(["opacity","clipPath","filter","transform"]);function ag(e){if(zn.has(e))return"transform";if(ig.has(e))return qi(e)}function Qi(e,t){e.indexOf(t)===-1&&e.push(t)}function Es(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function rT([...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 oT({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:iT(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const lg=e=>(t,n)=>{const r=w.useContext(Gi),o=w.useContext(Yi),s=()=>oT(e,t,r,o,n);return n?s():un(s)};function sT(e,t){const n=ag(t);n&&Qi(e,n)}function nd(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=su(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function iT(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]=ni(c[g]);let{initial:u,animate:f}=e;const h=Xi(e),d=Ym(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"&&!os(m)&&nd(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&&!os(f)&&nd(e,f,g=>{for(const y in g)sT(a,y)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Te,cancel:fn,state:pt,steps:ja}=zm(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),aT={useVisualState:lg({scrapeMotionValuesFromProps:sg,createRenderState:tg,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(()=>{nu(n,r,ru(t.tagName),e.transformTemplate),og(t,n)})}})},lT={useVisualState:lg({applyWillChange:!0,scrapeMotionValuesFromProps:ou,createRenderState:tu})};function cT(e,{forwardMotionProps:t=!1},n,r){return{...Qc(e)?aT:lT,preloadedFeatures:n,useRender:eT(t),createVisualElement:r,Component:e}}function vn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const cg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Zi(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const uT=e=>t=>cg(t)&&e(t,Zi(t));function xn(e,t,n,r){return vn(e,t,uT(n),r)}const fT=(e,t)=>n=>t(e(n)),wn=(...e)=>e.reduce(fT);function ug(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const rd=ug("dragHorizontal"),od=ug("dragVertical");function fg(e){let t=!1;if(e==="y")t=od();else if(e==="x")t=rd();else{const n=rd(),r=od();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function dg(){const e=fg(!0);return e?(e(),!1):!0}class Un{constructor(t){this.isMounted=!1,this.node=t}update(){}}function sd(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||dg())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 dT extends Un{mount(){this.unmount=wn(sd(this.node,!0),sd(this.node,!1))}unmount(){}}class hT extends Un{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=wn(vn(this.node.current,"focus",()=>this.onFocus()),vn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const hg=(e,t)=>t?e===t?!0:hg(e,t.parentElement):!1;function Na(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Zi(n))}class pT extends Un{constructor(){super(...arguments),this.removeStartListeners=yt,this.removeEndListeners=yt,this.removeAccessibleListeners=yt,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&&!hg(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=wn(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()||Na("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Te.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=vn(this.node.current,"keyup",i),Na("down",(a,l)=>{this.startPress(a,l)})},n=vn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Na("cancel",(s,i)=>this.cancelPress(s,i))},o=vn(this.node.current,"blur",r);this.removeAccessibleListeners=wn(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),!dg()}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=vn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=wn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Bl=new WeakMap,La=new WeakMap,mT=e=>{const t=Bl.get(e.target);t&&t(e)},gT=e=>{e.forEach(mT)};function yT({root:e,...t}){const n=e||document;La.has(n)||La.set(n,{});const r=La.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(gT,{root:e,...t})),r[o]}function vT(e,t,n){const r=yT(t);return Bl.set(e,n),r.observe(e),()=>{Bl.delete(e),r.unobserve(e)}}const bT={some:0,all:1};class xT extends Un{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:bT[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 vT(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(wT(t,n))&&this.startObserver()}unmount(){}}function wT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const TT={inView:{Feature:xT},tap:{Feature:pT},focus:{Feature:hT},hover:{Feature:dT}};function pg(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 Ji(e,t,n){const r=e.getProps();return su(r,t,n!==void 0?n:r.custom,e)}const ln=e=>e*1e3,cn=e=>e/1e3,ST={type:"spring",stiffness:500,damping:25,restSpeed:10},ET=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),CT={type:"keyframes",duration:.8},PT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RT=(e,{keyframes:t})=>t.length>2?CT:zn.has(e)?e.startsWith("scale")?ET(t[1]):ST:PT;function IT({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 iu(e,t){return e[t]||e.default||e}const AT=e=>e!==null;function ea(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(AT),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let ri;function OT(){ri=void 0}const Fn={now:()=>(ri===void 0&&Fn.set(pt.isProcessing||m1.useManualTiming?pt.timestamp:performance.now()),ri),set:e=>{ri=e,queueMicrotask(OT)}},mg=e=>/^0[^.\s]+$/u.test(e);function DT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mg(e):!0}const gg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),MT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function kT(e){const t=MT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const FT=4;function yg(e,t,n=1){Lt(n<=FT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=kT(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return gg(i)?parseFloat(i):i}return Zc(o)?yg(o,t,n+1):o}const jT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),id=e=>e===yo||e===ae,ad=(e,t)=>parseFloat(e.split(", ")[t]),ld=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ad(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?ad(s[1],e):0}},NT=new Set(["x","y","z"]),LT=ws.filter(e=>!NT.has(e));function _T(e){const t=[];return LT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const qr={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:ld(4,13),y:ld(5,14)};qr.translateX=qr.x;qr.translateY=qr.y;const vg=e=>t=>t.test(e),VT={test:e=>e==="auto",parse:e=>e},bg=[yo,ae,an,In,W1,H1,VT],cd=e=>bg.find(vg(e)),hr=new Set;let Hl=!1,Wl=!1;function xg(){if(Wl){const e=Array.from(hr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=_T(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)})}Wl=!1,Hl=!1,hr.forEach(e=>e.complete()),hr.clear()}function wg(){hr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Wl=!0)})}function $T(){wg(),xg()}class au{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?(hr.add(this),Hl||(Hl=!0,Te.read(wg),Te.resolveKeyframes(xg))):(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),hr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,hr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const lu=(e,t)=>n=>!!(Ts(n)&&$1.test(n)&&n.startsWith(e)||t&&!B1(n)&&Object.prototype.hasOwnProperty.call(n,t)),Tg=(e,t,n)=>r=>{if(!Ts(r))return r;const[o,s,i,a]=r.match(Jc);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},BT=e=>Ln(0,255,e),_a={...yo,transform:e=>Math.round(BT(e))},cr={test:lu("rgb","red"),parse:Tg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+_a.transform(e)+", "+_a.transform(t)+", "+_a.transform(n)+", "+Yo(Go.transform(r))+")"};function HT(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 zl={test:lu("#"),parse:HT,transform:cr.transform},kr={test:lu("hsl","hue"),parse:Tg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+an.transform(Yo(t))+", "+an.transform(Yo(n))+", "+Yo(Go.transform(r))+")"},bt={test:e=>cr.test(e)||zl.test(e)||kr.test(e),parse:e=>cr.test(e)?cr.parse(e):kr.test(e)?kr.parse(e):zl.parse(e),transform:e=>Ts(e)?e:e.hasOwnProperty("red")?cr.transform(e):kr.transform(e)};function WT(e){var t,n;return isNaN(e)&&Ts(e)&&(((t=e.match(Jc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(V1))===null||n===void 0?void 0:n.length)||0)>0}const Sg="number",Eg="color",zT="var",UT="var(",ud="${}",GT=/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 is(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(GT,l=>(bt.test(l)?(r.color.push(s),o.push(Eg),n.push(bt.parse(l))):l.startsWith(UT)?(r.var.push(s),o.push(zT),n.push(l)):(r.number.push(s),o.push(Sg),n.push(parseFloat(l))),++s,ud)).split(ud);return{values:n,split:a,indexes:r,types:o}}function Cg(e){return is(e).values}function Pg(e){const{split:t,types:n}=is(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===Sg?s+=Yo(o[i]):a===Eg?s+=bt.transform(o[i]):s+=o[i]}return s}}const YT=e=>typeof e=="number"?0:e;function KT(e){const t=Cg(e);return Pg(e)(t.map(YT))}const _n={test:WT,parse:Cg,createTransformer:Pg,getAnimatableNone:KT},qT=new Set(["brightness","contrast","saturate","opacity"]);function XT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Jc)||[];if(!r)return e;const o=n.replace(r,"");let s=qT.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const QT=/\b([a-z-]*)\(.*?\)/gu,Ul={..._n,getAnimatableNone:e=>{const t=e.match(QT);return t?t.map(XT).join(" "):e}},ZT={...Qm,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Ul,WebkitFilter:Ul},cu=e=>ZT[e];function Rg(e,t){let n=cu(e);return n!==Ul&&(n=_n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const JT=new Set(["auto","none","0"]);function eS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!JT.has(s)&&is(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Rg(n,o)}class Ig extends au{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(),Zc(c))){const u=yg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!jT.has(r)||t.length!==2)return;const[o,s]=t,i=cd(o),a=cd(s);if(i!==a)if(id(i)&&id(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++)DT(t[o])&&r.push(o);r.length&&eS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qr[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]=qr[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 Ag(e){let t;return()=>(t===void 0&&(t=e()),t)}const fd=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_n.test(e)||e==="0")&&!e.startsWith("url("));function tS(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 nS(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=fd(o,t),a=fd(s,t);return go(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:tS(e)||n==="spring"&&r}class Og{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&&$T(),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&&!nS(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(ea(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 Dg(e,t){return t?e*(1e3/t):0}const rS=5;function Mg(e,t,n){const r=Math.max(t-rS,0);return Dg(n-e(r),t-r)}const Va=.001,oS=.01,dd=10,sS=.05,iS=1;function aS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;go(e<=ln(dd),"Spring duration must be 10 seconds or less");let i=1-t;i=Ln(sS,iS,i),e=Ln(oS,dd,cn(e)),i<1?(o=c=>{const u=c*i,f=u*e,h=u-n,d=Gl(c,i),p=Math.exp(-f);return Va-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=Gl(Math.pow(c,2),i);return(-o(c)+Va>0?-1:1)*((h-d)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Va+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=cS(o,s,a);if(e=ln(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 lS=12;function cS(e,t,n){let r=n;for(let o=1;o<lS;o++)r=r-e(r)/t(r);return r}function Gl(e,t){return e*Math.sqrt(1-t*t)}const uS=["duration","bounce"],fS=["stiffness","damping","mass"];function hd(e,t){return t.some(n=>e[n]!==void 0)}function dS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!hd(e,fS)&&hd(e,uS)){const n=aS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function uu({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}=dS({...r,velocity:-cn(r.velocity||0)}),d=f||0,p=l/(2*Math.sqrt(a*c)),m=s-o,g=cn(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=Gl(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=Mg(b,v,S):T=0);const E=Math.abs(T)<=n,R=Math.abs(s-S)<=t;i.done=E&&R}return i.value=i.done?s:S,i}}}function pd({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=I=>a!==void 0&&I<a||l!==void 0&&I>l,p=I=>a===void 0?l:l===void 0||Math.abs(a-I)<Math.abs(l-I)?a:l;let m=n*t;const g=f+m,y=i===void 0?g:i(g);y!==g&&(m=y-f);const b=I=>-m*Math.exp(-I/r),v=I=>y+b(I),S=I=>{const M=b(I),A=v(I);h.done=Math.abs(M)<=c,h.value=h.done?y:A};let T,E;const R=I=>{d(h.value)&&(T=I,E=uu({keyframes:[h.value,p(h.value)],velocity:Mg(v,I,h.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return R(0),{calculatedDuration:null,next:I=>{let M=!1;return!E&&T===void 0&&(M=!0,S(I),R(I)),T!==void 0&&I>=T?E.next(I-T):(!M&&S(I),h)}}}const kg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,hS=1e-7,pS=12;function mS(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=kg(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>hS&&++a<pS);return i}function Cs(e,t,n,r){if(e===t&&n===r)return yt;const o=s=>mS(s,0,1,e,n);return s=>s===0||s===1?s:kg(o(s),t,r)}const gS=Cs(.42,0,1,1),yS=Cs(0,0,.58,1),Fg=Cs(.42,0,.58,1),jg=e=>Array.isArray(e)&&typeof e[0]!="number",Ng=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Lg=e=>t=>1-e(1-t),fu=e=>1-Math.sin(Math.acos(e)),_g=Lg(fu),vS=Ng(fu),Vg=Cs(.33,1.53,.69,.99),du=Lg(Vg),bS=Ng(du),xS=e=>(e*=2)<1?.5*du(e):.5*(2-Math.pow(2,-10*(e-1))),md={linear:yt,easeIn:gS,easeInOut:Fg,easeOut:yS,circIn:fu,circInOut:vS,circOut:_g,backIn:du,backInOut:bS,backOut:Vg,anticipate:xS},Yl=e=>{if(Array.isArray(e)){Lt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Cs(t,n,r,o)}else if(typeof e=="string")return Lt(md[e]!==void 0,`Invalid easing type '${e}'`),md[e];return e},Xr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ve=(e,t,n)=>e+(t-e)*n;function $a(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 wS({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=$a(l,a,e+1/3),s=$a(l,a,e),i=$a(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function vi(e,t){return n=>n>0?t:e}const Ba=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},TS=[zl,cr,kr],SS=e=>TS.find(t=>t.test(e));function gd(e){const t=SS(e);if(go(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===kr&&(n=wS(n)),n}const yd=(e,t)=>{const n=gd(e),r=gd(t);if(!n||!r)return vi(e,t);const o={...n};return s=>(o.red=Ba(n.red,r.red,s),o.green=Ba(n.green,r.green,s),o.blue=Ba(n.blue,r.blue,s),o.alpha=Ve(n.alpha,r.alpha,s),cr.transform(o))},Kl=new Set(["none","hidden"]);function ES(e,t){return Kl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function CS(e,t){return n=>Ve(e,t,n)}function hu(e){return typeof e=="number"?CS:typeof e=="string"?Zc(e)?vi:bt.test(e)?yd:IS:Array.isArray(e)?$g:typeof e=="object"?bt.test(e)?yd:PS:vi}function $g(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>hu(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function PS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=hu(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function RS(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 IS=(e,t)=>{const n=_n.createTransformer(t),r=is(e),o=is(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?Kl.has(e)&&!o.values.length||Kl.has(t)&&!r.values.length?ES(e,t):wn($g(RS(r,o),o.values),n):(go(!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.`),vi(e,t))};function Bg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):hu(e)(e,t)}function AS(e,t,n){const r=[],o=n||Bg,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]||yt:t;a=wn(l,a)}r.push(a)}return r}function Hg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Lt(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=AS(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=Xr(e[u],e[u+1],c);return i[u](f)};return n?c=>l(Ln(e[0],e[s-1],c)):l}function Wg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Xr(0,t,r);e.push(Ve(n,1,o))}}function zg(e){const t=[0];return Wg(t,e.length-1),t}function OS(e,t){return e.map(n=>n*t)}function DS(e,t){return e.map(()=>t||Fg).splice(0,e.length-1)}function bi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=jg(r)?r.map(Yl):Yl(r),s={done:!1,value:t[0]},i=OS(n&&n.length===t.length?n:zg(t),e),a=Hg(i,t,{ease:Array.isArray(o)?o:DS(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const ql=2e4;function Ug(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ql;)t+=n,r=e.next(t);return t>=ql?1/0:t}const MS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Te.update(t,!0),stop:()=>fn(t),now:()=>pt.isProcessing?pt.timestamp:Fn.now()}},kS={decay:pd,inertia:pd,tween:bi,keyframes:bi,spring:uu},FS=e=>e/100;class pu extends Og{constructor({KeyframeResolver:t=au,...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=kS[n]||bi;let l,c;a!==bi&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Lt(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=wn(FS,Bg(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=Ug(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:I}=this.options;return{done:!0,value:I[I.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 I=Math.min(this.currentTime,u)/f;let M=Math.floor(I),A=I%1;!A&&I>=1&&(A=1),A===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/f)):p==="mirror"&&(S=i)),v=Ln(0,1,A)*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 R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return R&&o!==void 0&&(T.value=ea(l,this.options,o)),g&&g(T.value),R&&this.finish(),T}get duration(){const{resolved:t}=this;return t?cn(t.calculatedDuration):0}get time(){return cn(this.currentTime)}set time(t){t=ln(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=cn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=MS,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 Gg=e=>Array.isArray(e)&&typeof e[0]=="number";function Yg(e){return!!(!e||typeof e=="string"&&e in mu||Gg(e)||Array.isArray(e)&&e.every(Yg))}const Bo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,mu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bo([0,.65,.55,1]),circOut:Bo([.55,0,1,.45]),backIn:Bo([.31,.01,.66,-.59]),backOut:Bo([.33,1.53,.69,.99])};function jS(e){return Kg(e)||mu.easeOut}function Kg(e){if(e)return Gg(e)?Bo(e):Array.isArray(e)?e.map(jS):mu[e]}function NS(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=Kg(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 LS=Ag(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xi=10,_S=2e4;function VS(e){return e.type==="spring"||!Yg(e.ease)}function $S(e,t){const n=new pu({...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<_S;)r=n.sample(s),o.push(r.value),s+=xi;return{times:void 0,keyframes:o,duration:s-xi,ease:"linear"}}class vd extends Og{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new Ig(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(VS(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,...p}=this.options,m=$S(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=NS(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Fn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(ea(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 cn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return cn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ln(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 yt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return yt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;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 pu({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=ln(this.time);c.setWithVelocity(d.sample(p-xi).value,d.sample(p).value,xi)}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 LS()&&r&&ig.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function BS(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),()=>fn(r)}const HS=Ag(()=>window.ScrollTimeline!==void 0);class gu{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(HS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),BS(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 yu=(e,t,n,r={},o,s,i)=>a=>{const l=iu(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ln(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};IT(l)||(f={...f,...RT(e,f)}),f.duration&&(f.duration=ln(f.duration)),f.repeatDelay&&(f.repeatDelay=ln(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=ea(f.keyframes,l);if(d!==void 0)return Te.update(()=>{f.onUpdate(d),f.onComplete()}),new gu([])}return!s&&vd.supports(f)?new vd(f):new pu(f)};class vu{constructor(){this.subscriptions=[]}add(t){return Qi(this.subscriptions,t),()=>Es(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let 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 bd=new Set;function bu(e,t,n){e||bd.has(t)||(console.warn(t),bd.add(t))}const xd=30,WS=e=>!isNaN(parseFloat(e)),Ko={current:void 0};class qg{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Fn.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=Fn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=WS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&bu(!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 vu);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 Ko.current&&Ko.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Fn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>xd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xd);return Dg(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 Qr(e,t){return new qg(e,t)}function zS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qr(n))}function US(e,t){const n=Ji(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=nT(s[i]);zS(e,i,a)}}function Xg(e){return e.getProps()[Wm]}class GS extends qg{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=ag(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&&(Es(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function YS(e){return!!(lt(e)&&e.add)}function Xl(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 GS("auto"),e.addValue("willChange",r)),YS(r))return r.add(t)}function KS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function xu(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&&KS(u,f))continue;const p={delay:n,elapsed:0,...iu(i||{},f)};let m=!1;if(window.HandoffAppearAnimations){const y=Xg(e);if(y){const b=window.HandoffAppearAnimations(y,f,h,Te);b!==null&&(p.elapsed=b,m=!0)}}h.start(yu(f,h,d,e.shouldReduceMotion&&zn.has(f)?{type:!1}:p,e,m,Xl(e,f)));const g=h.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Te.update(()=>{a&&US(e,a)})}),c}function Ql(e,t,n={}){var r;const o=Ji(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(xu(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=s;return qS(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 qS(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(XS).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Ql(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function XS(e,t){return e.sortNodePosition(t)}function QS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ql(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ql(e,t,n);else{const o=typeof t=="function"?Ji(e,t,n.custom):t;r=Promise.all(xu(e,o,n))}return r.then(()=>{Te.postRender(()=>{e.notify("AnimationComplete",t)})})}const ZS=[...qc].reverse(),JS=qc.length;function eE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>QS(e,n,r)))}function tE(e){let t=eE(e),n=wd(),r=!0;const o=l=>(c,u)=>{var f;const h=Ji(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<JS;g++){const y=ZS[g],b=n[y],v=c[y]!==void 0?c[y]:u[y],S=rs(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||os(v)||typeof v=="boolean")continue;let I=nE(b.prevProp,v)||y===l&&b.isActive&&!E&&S||g>p&&S,M=!1;const A=Array.isArray(v)?v:[v];let N=A.reduce(o(y),{});T===!1&&(N={});const{prevResolvedValues:k={}}=b,j={...k,...N},P=O=>{I=!0,h.has(O)&&(M=!0,h.delete(O)),b.needsAnimating[O]=!0;const F=e.getValue(O);F&&(F.liveStyle=!1)};for(const O in j){const F=N[O],_=k[O];if(d.hasOwnProperty(O))continue;let H=!1;$l(F)&&$l(_)?H=!pg(F,_):H=F!==_,H?F!=null?P(O):h.add(O):F!==void 0&&h.has(O)?P(O):b.protectedKeys[O]=!0}b.prevProp=v,b.prevResolvedValues=N,b.isActive&&(d={...d,...N}),r&&e.blockInitialAnimation&&(I=!1),I&&(!E||M)&&f.push(...A.map(O=>({animation:O,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=wd(),r=!0}}}function nE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pg(t,e):!1}function Jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wd(){return{animate:Jn(!0),whileInView:Jn(),whileHover:Jn(),whileTap:Jn(),whileDrag:Jn(),whileFocus:Jn(),exit:Jn()}}class rE extends Un{constructor(t){super(t),t.animationState||(t.animationState=tE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();os(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 oE=0;class sE extends Un{constructor(){super(...arguments),this.id=oE++}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 iE={animation:{Feature:rE},exit:{Feature:sE}},Td=(e,t)=>Math.abs(e-t);function aE(e,t){const n=Td(e.x,t.x),r=Td(e.y,t.y);return Math.sqrt(n**2+r**2)}class Qg{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=Wa(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=aE(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:m}=pt;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=Ha(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=Wa(f.type==="pointercancel"?this.lastMoveEventInfo:Ha(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,g),p&&p(f,g)},!cg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=Zi(t),a=Ha(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=pt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Wa(a,this.history)),this.removeListeners=wn(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(),fn(this.updatePoint)}}function Ha(e,t){return t?{point:t(e.point)}:e}function Sd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wa({point:e},t){return{point:e,delta:Sd(e,Zg(t)),offset:Sd(e,lE(t)),velocity:cE(t,.1)}}function lE(e){return e[0]}function Zg(e){return e[e.length-1]}function cE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Zg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ln(t)));)n--;if(!r)return{x:0,y:0};const s=cn(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 Jg=1e-4,uE=1-Jg,fE=1+Jg,ey=.01,dE=0-ey,hE=0+ey;function _t(e){return e.max-e.min}function pE(e,t,n){return Math.abs(e-t)<=n}function Ed(e,t,n,r=.5){e.origin=r,e.originPoint=Ve(t.min,t.max,e.origin),e.scale=_t(n)/_t(t),e.translate=Ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uE&&e.scale<=fE||isNaN(e.scale))&&(e.scale=1),(e.translate>=dE&&e.translate<=hE||isNaN(e.translate))&&(e.translate=0)}function qo(e,t,n,r){Ed(e.x,t.x,n.x,r?r.originX:void 0),Ed(e.y,t.y,n.y,r?r.originY:void 0)}function Cd(e,t,n){e.min=n.min+t.min,e.max=e.min+_t(t)}function mE(e,t,n){Cd(e.x,t.x,n.x),Cd(e.y,t.y,n.y)}function Pd(e,t,n){e.min=t.min-n.min,e.max=e.min+_t(t)}function Xo(e,t,n){Pd(e.x,t.x,n.x),Pd(e.y,t.y,n.y)}function gE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ve(n,e,r.max):Math.min(e,n)),e}function Rd(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 yE(e,{top:t,left:n,bottom:r,right:o}){return{x:Rd(e.x,n,o),y:Rd(e.y,t,r)}}function Id(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 vE(e,t){return{x:Id(e.x,t.x),y:Id(e.y,t.y)}}function bE(e,t){let n=.5;const r=_t(e),o=_t(t);return o>r?n=Xr(t.min,t.max-r,e.min):r>o&&(n=Xr(e.min,e.max-o,t.min)),Ln(0,1,n)}function xE(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 wE(e=Zl){return e===!1?e=0:e===!0&&(e=Zl),{x:Ad(e,"left","right"),y:Ad(e,"top","bottom")}}function Ad(e,t,n){return{min:Od(e,t),max:Od(e,n)}}function Od(e,t){return typeof e=="number"?e:e[t]||0}const Dd=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fr=()=>({x:Dd(),y:Dd()}),Md=()=>({min:0,max:0}),Je=()=>({x:Md(),y:Md()});function Ht(e){return[e("x"),e("y")]}function ty({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function TE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function SE(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 za(e){return e===void 0||e===1}function Jl({scale:e,scaleX:t,scaleY:n}){return!za(e)||!za(t)||!za(n)}function tr(e){return Jl(e)||ny(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ny(e){return kd(e.x)||kd(e.y)}function kd(e){return e&&e!=="0%"}function wi(e,t,n){const r=e-n,o=t*r;return n+o}function Fd(e,t,n,r,o){return o!==void 0&&(e=wi(e,o,r)),wi(e,n,r)+t}function ec(e,t=0,n=1,r,o){e.min=Fd(e.min,t,n,r,o),e.max=Fd(e.max,t,n,r,o)}function ry(e,{x:t,y:n}){ec(e.x,t.translate,t.scale,t.originPoint),ec(e.y,n.translate,n.scale,n.originPoint)}const jd=.999999999999,Nd=1.0000000000001;function EE(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&&jr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,ry(e,i)),r&&tr(s.latestValues)&&jr(e,s.latestValues))}t.x<Nd&&t.x>jd&&(t.x=1),t.y<Nd&&t.y>jd&&(t.y=1)}function On(e,t){e.min=e.min+t,e.max=e.max+t}function Ld(e,t,n,r,o=.5){const s=Ve(e.min,e.max,o);ec(e,t,n,s,r)}function jr(e,t){Ld(e.x,t.x,t.scaleX,t.scale,t.originX),Ld(e.y,t.y,t.scaleY,t.scale,t.originY)}function oy(e,t){return ty(SE(e.getBoundingClientRect(),t))}function CE(e,t,n){const r=oy(e,n),{scroll:o}=t;return o&&(On(r.x,o.offset.x),On(r.y,o.offset.y)),r}const sy=({current:e})=>e?e.ownerDocument.defaultView:null,PE=new WeakMap;class RE{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=Je(),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(Zi(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=fg(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),Ht(y=>{let b=this.getAxisMotionValue(y).get()||0;if(an.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[y];S&&(b=_t(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=Xl(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=IE(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=()=>Ht(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 Qg(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:sy(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||!Hs(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=gE(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&&Mr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=yE(o.layoutBox,n):this.constraints=!1,this.elastic=wE(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Ht(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=xE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Mr(t))return!1;const r=t.current;Lt(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=CE(r,o.root,this.visualElement.getTransformPagePoint());let i=vE(o.layout.layoutBox,s);if(n){const a=n(TE(i));this.hasMutatedConstraints=!!a,a&&(i=ty(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ht(u=>{if(!Hs(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(yu(t,r,0,n,this.visualElement,!1,Xl(this.visualElement,t)))}stopAnimation(){Ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ht(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){Ht(n=>{const{drag:r}=this.getProps();if(!Hs(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]-Ve(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Mr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ht(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=bE({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(),Ht(i=>{if(!Hs(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ve(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;PE.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();Mr(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=vn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ht(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 Hs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function IE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AE extends Un{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new RE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const _d=e=>(t,n)=>{e&&Te.postRender(()=>e(t,n))};class OE extends Un{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new Qg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:_d(t),onStart:_d(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 DE(){const e=w.useContext(Yi);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 oi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Vd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=Vd(e,t.target.x),r=Vd(e,t.target.y);return`${n}% ${r}%`}},ME={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=Ve(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 kE extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;M1(FE),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()})),oi.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(),Kc.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 iy(e){const[t,n]=DE(),r=w.useContext(ss);return x.jsx(kE,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(Um),isPresent:t,safeToRemove:n})}const FE={borderRadius:{...Lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:ME},ay=["TopLeft","TopRight","BottomLeft","BottomRight"],jE=ay.length,$d=e=>typeof e=="string"?parseFloat(e):e,Bd=e=>typeof e=="number"||ae.test(e);function NE(e,t,n,r,o,s){o?(e.opacity=Ve(0,n.opacity!==void 0?n.opacity:1,LE(r)),e.opacityExit=Ve(t.opacity!==void 0?t.opacity:1,0,_E(r))):s&&(e.opacity=Ve(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<jE;i++){const a=`border${ay[i]}Radius`;let l=Hd(t,a),c=Hd(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Bd(l)===Bd(c)?(e[a]=Math.max(Ve($d(l),$d(c),r),0),(an.test(c)||an.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,r))}function Hd(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const LE=ly(0,.5,_g),_E=ly(.5,.95,yt);function ly(e,t,n){return r=>r<e?0:r>t?1:n(Xr(e,t,r))}function Wd(e,t){e.min=t.min,e.max=t.max}function $t(e,t){Wd(e.x,t.x),Wd(e.y,t.y)}function zd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ud(e,t,n,r,o){return e-=t,e=wi(e,1/n,r),o!==void 0&&(e=wi(e,1/o,r)),e}function VE(e,t=0,n=1,r=.5,o,s=e,i=e){if(an.test(t)&&(t=parseFloat(t),t=Ve(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ve(s.min,s.max,r);e===s&&(a-=t),e.min=Ud(e.min,t,n,a,o),e.max=Ud(e.max,t,n,a,o)}function Gd(e,t,[n,r,o],s,i){VE(e,t[n],t[r],t[o],t.scale,s,i)}const $E=["x","scaleX","originX"],BE=["y","scaleY","originY"];function Yd(e,t,n,r){Gd(e.x,t,$E,n?n.x:void 0,r?r.x:void 0),Gd(e.y,t,BE,n?n.y:void 0,r?r.y:void 0)}function Kd(e){return e.translate===0&&e.scale===1}function cy(e){return Kd(e.x)&&Kd(e.y)}function HE(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 uy(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 qd(e){return _t(e.x)/_t(e.y)}function Xd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class WE{constructor(){this.members=[]}add(t){Qi(this.members,t),t.scheduleRender()}remove(t){if(Es(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const 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 zE(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 UE=(e,t)=>e.depth-t.depth;class GE{constructor(){this.children=[],this.isDirty=!1}add(t){Qi(this.children,t),this.isDirty=!0}remove(t){Es(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(UE),this.isDirty=!1,this.children.forEach(t)}}function YE(e,t){const n=Fn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(fn(r),e(s-t))};return Te.read(r,!0),()=>fn(r)}function fy(e){return e instanceof SVGElement&&e.tagName!=="svg"}function wu(e,t,n){const r=lt(e)?e:Qr(e);return r.start(yu("",r,t,n)),r.animation}const nr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ua=["","X","Y","Z"],KE={visibility:"hidden"},Qd=1e3;let qE=0;function Ga(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function dy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Xg(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?dy(e.parent):!1:!1}function hy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=qE++,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&&(nr.totalNodes=nr.resolvedTargetDeltas=nr.recalculatedProjection=0),this.nodes.forEach(ZE),this.nodes.forEach(rC),this.nodes.forEach(oC),this.nodes.forEach(JE),window.MotionDebug&&window.MotionDebug.record(nr)},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 GE)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new vu),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=fy(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=YE(h,250),oi.hasAnimatedSinceResize&&(oi.hasAnimatedSinceResize=!1,this.nodes.forEach(Jd))})}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()||cC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!uy(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={...iu(m,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||Jd(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,fn(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(sC),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&&dy(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(Zd);return}this.isUpdating||this.nodes.forEach(tC),this.isUpdating=!1,this.nodes.forEach(nC),this.nodes.forEach(XE),this.nodes.forEach(QE),this.clearAllSnapshots();const a=Fn.now();pt.delta=Ln(0,1e3/60,a-pt.timestamp),pt.timestamp=a,pt.isProcessing=!0,ja.update.process(pt),ja.preRender.process(pt),ja.render.process(pt),pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Kc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eC),this.sharedNodes.forEach(iC)}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=Je(),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&&!cy(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||tr(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)),uC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return Je();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(On(a.x,l.offset.x),On(a.y,l.offset.y)),a}removeElementScroll(i){const a=Je();$t(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){$t(a,i);const{scroll:h}=this.root;h&&(On(a.x,-h.offset.x),On(a.y,-h.offset.y))}On(a.x,u.offset.x),On(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=Je();$t(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&&jr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),tr(u.latestValues)&&jr(l,u.latestValues)}return tr(this.latestValues)&&jr(l,this.latestValues),l}removeTransform(i){const a=Je();$t(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!tr(c.latestValues))continue;Jl(c.latestValues)&&c.updateSnapshot();const u=Je(),f=c.measurePageBox();$t(u,f),Yd(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return tr(this.latestValues)&&Yd(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!==pt.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=pt.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),Xo(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Je(),this.targetWithTransforms=Je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),ry(this.target,this.targetDelta)):$t(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=Je(),this.relativeTargetOrigin=Je(),Xo(this.relativeTargetOrigin,this.target,d.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&nr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Jl(this.parent.latestValues)||ny(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===pt.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;$t(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;EE(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=Je());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zd(this.prevProjectionDelta.x,this.projectionDelta.x),zd(this.prevProjectionDelta.y,this.projectionDelta.y)),qo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Xd(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&nr.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=Fr(),this.projectionDelta=Fr(),this.projectionDeltaWithTransform=Fr()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Fr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Je(),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(lC));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const T=S/1e3;eh(f.x,i.x,T),eh(f.y,i.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xo(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aC(this.relativeTarget,this.relativeTargetOrigin,h,T),v&&HE(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Je()),$t(v,this.relativeTarget)),m&&(this.animationValues=u,NE(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&&(fn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Te.update(()=>{oi.hasAnimatedSinceResize=!0,this.currentAnimation=wu(0,Qd,{...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(Qd),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&&py(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Je();const f=_t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const h=_t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}$t(a,l),jr(a,u),qo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new WE),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&&Ga("z",i,c,this.animationValues);for(let u=0;u<Ua.length;u++)Ga(`rotate${Ua[u]}`,i,c,this.animationValues),Ga(`skew${Ua[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 KE;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ni(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=ni(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!tr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=zE(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 gi){if(h[m]===void 0)continue;const{correct:g,applyTo:y}=gi[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?ni(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(Zd),this.root.sharedNodes.clear()}}}function XE(e){e.updateLayout()}function QE(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"?Ht(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=_t(h);h.min=r[f].min,h.max=h.min+d}):py(s,n.layoutBox,r)&&Ht(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=_t(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=Fr();qo(a,r,n.layoutBox);const l=Fr();i?qo(l,e.applyTransform(o,!0),n.measuredBox):qo(l,r,n.layoutBox);const c=!cy(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=Je();Xo(p,n.layoutBox,h.layoutBox);const m=Je();Xo(m,r,d.layoutBox),uy(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 ZE(e){window.MotionDebug&&nr.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 JE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eC(e){e.clearSnapshot()}function Zd(e){e.clearMeasurements()}function tC(e){e.isLayoutDirty=!1}function nC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Jd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rC(e){e.resolveTargetDelta()}function oC(e){e.calcProjection()}function sC(e){e.resetSkewAndRotation()}function iC(e){e.removeLeadSnapshot()}function eh(e,t,n){e.translate=Ve(t.translate,0,n),e.scale=Ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function th(e,t,n,r){e.min=Ve(t.min,n.min,r),e.max=Ve(t.max,n.max,r)}function aC(e,t,n,r){th(e.x,t.x,n.x,r),th(e.y,t.y,n.y,r)}function lC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cC={duration:.45,ease:[.4,0,.1,1]},nh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rh=nh("applewebkit/")&&!nh("chrome/")?Math.round:yt;function oh(e){e.min=rh(e.min),e.max=rh(e.max)}function uC(e){oh(e.x),oh(e.y)}function py(e,t,n){return e==="position"||e==="preserve-aspect"&&!pE(qd(t),qd(n),.2)}const fC=hy({attachResizeListener:(e,t)=>vn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ya={current:void 0},my=hy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ya.current){const e=new fC({});e.mount(window),e.setOptions({layoutScroll:!0}),Ya.current=e}return Ya.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dC={pan:{Feature:OE},drag:{Feature:AE,ProjectionNode:my,MeasureLayout:iy}},tc={current:null},gy={current:!1};function hC(){if(gy.current=!0,!!Yc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tc.current=e.matches;e.addListener(t),t()}else tc.current=!1}function pC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(lt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&bu(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(lt(s))e.addValue(r,Qr(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,Qr(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const as=new WeakMap,mC=[...bg,bt,_n],gC=e=>mC.find(vg(e)),sh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],yC=Xc.length;class vC{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=au,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=Xi(n),this.isVariantNode=Ym(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&<(d)&&d.set(l[h],!1)}}mount(t){this.current=t,as.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)),gy.current||hC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:tc.current,process.env.NODE_ENV!=="production"&&bu(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(){as.delete(this.current),this.projection&&this.projection.unmount(),fn(this.notifyUpdate),fn(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=zn.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 Kr){const n=Kr[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):Je()}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<sh.length;r++){const o=sh[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=pC(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<yC;r++){const o=Xc[r],s=this.props[o];(rs(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=Qr(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"&&(gg(o)||mg(o))?o=parseFloat(o):!gC(o)&&_n.test(n)&&(o=Rg(t,n)),this.setBaseTarget(t,lt(o)?o.get():o)),lt(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=su(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&&!lt(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 vu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class yy extends vC{constructor(){super(...arguments),this.KeyframeResolver=Ig}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 bC(e){return window.getComputedStyle(e)}class vy extends yy{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=ng}readValueFromInstance(t,n){if(zn.has(n)){const r=cu(n);return r&&r.default||0}else{const r=bC(t),o=(Xm(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return oy(t,n)}build(t,n,r){eu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ou(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;lt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class by extends yy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(zn.has(n)){const r=cu(n);return r&&r.default||0}return n=rg.has(n)?n:qi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return sg(t,n,r)}build(t,n,r){nu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){og(t,n,r,o)}mount(t){this.isSVGTag=ru(t.tagName),super.mount(t)}}const xC=(e,t)=>Qc(e)?new by(t):new vy(t,{allowProjection:e!==w.Fragment}),wC={layout:{ProjectionNode:my,MeasureLayout:iy}},TC={...iE,...TT,...dC,...wC},ft=O1((e,t)=>cT(e,t,TC,xC));function xy(){const e=w.useRef(!1);return Ki(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function wy(){const e=xy(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Te.postRender(r),[r]),t]}class SC 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 EC({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(Yr);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(`
|
|
4
|
+
`+t.prev}function Ns(e,t){var n=Ll(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=An(e,o)?t(e[o],e):""}var s=typeof Da=="function"?Da(e):[],i;if(Ur){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)An(e,l)&&(n&&String(Number(l))===l&&l<e.length||Ur&&i["$"+l]instanceof Symbol||(Rm.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Da=="function")for(var c=0;c<s.length;c++)Im.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var km=fo,ho=Mx,uw=Ux,dw=bs,Ls=km("%WeakMap%",!0),_s=km("%Map%",!0),fw=ho("WeakMap.prototype.get",!0),hw=ho("WeakMap.prototype.set",!0),pw=ho("WeakMap.prototype.has",!0),mw=ho("Map.prototype.get",!0),gw=ho("Map.prototype.set",!0),yw=ho("Map.prototype.has",!0),Uc=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},vw=function(e,t){var n=Uc(e,t);return n&&n.value},bw=function(e,t,n){var r=Uc(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},xw=function(e,t){return!!Uc(e,t)},ww=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new dw("Side channel does not contain "+uw(s))},get:function(s){if(Ls&&s&&(typeof s=="object"||typeof s=="function")){if(t)return fw(t,s)}else if(_s){if(n)return mw(n,s)}else if(r)return vw(r,s)},has:function(s){if(Ls&&s&&(typeof s=="object"||typeof s=="function")){if(t)return pw(t,s)}else if(_s){if(n)return yw(n,s)}else if(r)return xw(r,s);return!1},set:function(s,i){Ls&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Ls),hw(t,s,i)):_s?(n||(n=new _s),gw(n,s,i)):(r||(r={key:{},next:null}),bw(r,s,i))}};return o},Ud=e=>Array.isArray(e),ka=e=>e===void 0,Fa=e=>e===null,Tw=Function.bind.call(Function.call,Object.prototype.toString),Sw=e=>!!e&&Tw(e)==="[object Error]"||e instanceof Error,Fm=(e,t)=>e instanceof t,Ew=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Cw=e=>Object.prototype.toString.call(e)==="[object Date]"&&Fm(e,Date),bn={array:Ud,date:Cw,empty:e=>Fa(e)||ka(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:Fm,isError:Sw,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Fa(e)||ka(e),null:Fa,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Ud(e)&&typeof e=="object",primitive:Ew,string:e=>typeof e=="string",undefined:ka},Vl=(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]=Vl(s?[]:{},o,n)}else e[r]=Vl(e[r],o,n)}else e[r]=n;return e},Pw=e=>Object.keys(e),Rw=e=>e.replace("[",".").replace("]","").split("."),ja=(e,t,n)=>{const r=Array.isArray(t)?t:Rw(t),o=structuredClone(e);return Vl(o,r,n),o};const Gc="-";function Iw(e){const t=Ow(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Gc);return a[0]===""&&a.length!==1&&a.shift(),jm(a,t)||Aw(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function jm(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?jm(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Gc);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Gd=/^\[(.+)\]$/;function Aw(e){if(Gd.test(e)){const t=Gd.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Ow(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Mw(Object.entries(e.classGroups),n).forEach(([s,i])=>{$l(i,r,s,t)}),r}function $l(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Yd(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Dw(o)){$l(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{$l(i,Yd(t,s),n,r)})})}function Yd(e,t){let n=e;return t.split(Gc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Dw(e){return e.isThemeGetter}function Mw(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 kw(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 Nm="!";function Fw(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,d;for(let g=0;g<a.length;g++){let v=a[g];if(c===0){if(v===o&&(r||a.slice(g,g+s)===t)){l.push(a.slice(u,g)),u=g+s;continue}if(v==="/"){d=g;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Nm),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function jw(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 Nw(e){return{cache:kw(e.cacheSize),parseClassName:Fw(e),...Iw(e)}}const Lw=/\s+/;function _w(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(Lw).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=jw(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Nm:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).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(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function Vw(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Lm(t))&&(r&&(r+=" "),r+=n);return r}function Lm(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Lm(e[r]))&&(n&&(n+=" "),n+=t);return n}function $w(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=Nw(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=_w(l,n);return o(l,u),u}return function(){return s(Vw.apply(null,arguments))}}function _e(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const _m=/^\[(?:([a-z-]+):)?(.+)\]$/i,Bw=/^\d+\/\d+$/,Hw=new Set(["px","full","screen"]),Ww=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zw=/\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$/,Uw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Gw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function yn(e){return lr(e)||Hw.has(e)||Bw.test(e)}function Cn(e){return po(e,"length",tT)}function lr(e){return!!e&&!Number.isNaN(Number(e))}function Vs(e){return po(e,"number",lr)}function jo(e){return!!e&&Number.isInteger(Number(e))}function Kw(e){return e.endsWith("%")&&lr(e.slice(0,-1))}function de(e){return _m.test(e)}function Pn(e){return Ww.test(e)}const qw=new Set(["length","size","percentage"]);function Xw(e){return po(e,qw,Vm)}function Qw(e){return po(e,"position",Vm)}const Zw=new Set(["image","url"]);function Jw(e){return po(e,Zw,rT)}function eT(e){return po(e,"",nT)}function No(){return!0}function po(e,t,n){const r=_m.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function tT(e){return zw.test(e)&&!Uw.test(e)}function Vm(){return!1}function nT(e){return Gw.test(e)}function rT(e){return Yw.test(e)}function oT(){const e=_e("colors"),t=_e("spacing"),n=_e("blur"),r=_e("brightness"),o=_e("borderColor"),s=_e("borderRadius"),i=_e("borderSpacing"),a=_e("borderWidth"),l=_e("contrast"),c=_e("grayscale"),u=_e("hueRotate"),d=_e("invert"),f=_e("gap"),h=_e("gradientColorStops"),p=_e("gradientColorStopPositions"),m=_e("inset"),g=_e("margin"),v=_e("opacity"),b=_e("padding"),y=_e("saturate"),T=_e("scale"),S=_e("sepia"),E=_e("skew"),R=_e("space"),I=_e("translate"),k=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",de,t],M=()=>[de,t],j=()=>["",yn,Cn],P=()=>["auto",lr,de],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],V=()=>["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"],z=()=>["","0",de],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[lr,Vs],K=()=>[lr,de];return{cacheSize:500,separator:":",theme:{colors:[No],spacing:[yn,Cn],blur:["none","",Pn,de],brightness:$(),borderColor:[e],borderRadius:["none","","full",Pn,de],borderSpacing:M(),borderWidth:j(),contrast:$(),grayscale:z(),hueRotate:K(),invert:z(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Kw,Cn],inset:N(),margin:N(),opacity:$(),padding:M(),saturate:$(),scale:$(),sepia:z(),skew:K(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",de]}],container:["container"],columns:[{columns:[Pn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...O(),de]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],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,de]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",de]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",jo,de]}],"grid-cols":[{"grid-cols":[No]}],"col-start-end":[{col:["auto",{span:["full",jo,de]},de]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[No]}],"row-start-end":[{row:["auto",{span:[jo,de]},de]}],"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",de]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",de]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"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":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",de,t]}],"min-w":[{"min-w":[de,t,"min","max","fit"]}],"max-w":[{"max-w":[de,t,"none","full","min","max","fit","prose",{screen:[Pn]},Pn]}],h:[{h:[de,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[de,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[de,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[de,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Pn,Cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vs]}],"font-family":[{font:[No]}],"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",de]}],"line-clamp":[{"line-clamp":["none",lr,Vs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yn,de]}],"list-image":[{"list-image":["none",de]}],"list-style-type":[{list:["none","disc","decimal",de]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yn,Cn]}],"underline-offset":[{"underline-offset":["auto",yn,de]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de]}],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",de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),Qw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Xw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jw]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],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":[v]}],"border-style":[{border:[...F(),"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":[v]}],"divide-style":[{divide:F()}],"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:["",...F()]}],"outline-offset":[{"outline-offset":[yn,de]}],"outline-w":[{outline:[yn,Cn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[yn,Cn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Pn,eT]}],"shadow-color":[{shadow:[No]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Pn,de]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[S]}],"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":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",de]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",de]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",de]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[jo,de]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"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",de]}],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",de]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",de]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[yn,Cn,Vs]}],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 sT=$w(oT),Yc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},iT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),aT=e=>bn.function(e),ke=(...e)=>sT(F0(e)),$m=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Ui=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},mo=w.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return x.jsx(s,{ref:o,...r,children:n})}),lT=uo("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"}}),Gr=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(mo,{...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:ke(lT({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),Bm=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function cT(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 uT=({children:e,...t})=>{const n=Bm(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:cT(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(d=>c.isIntersecting?!0:d)});return a.observe(i),()=>a.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},dT=uo("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"}}}),fT=uo("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"}}),hT=w.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return x.jsxs(mo,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:ke(fT({size:i,theme:s}),t),children:[n?x.jsx("span",{className:dT({theme:n})}):null,r,a.children]})}),Yr=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Gi=w.createContext({}),Yi=w.createContext(null),Kc=typeof document<"u",Ki=Kc?w.useLayoutEffect:w.useEffect,Hm=w.createContext({strict:!1}),qi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),pT="framerAppearId",Wm="data-"+qi(pT),mT={skipAnimations:!1,useManualTiming:!1};function gT(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,d=!1)=>{const h=d&&r?t:n;return u&&s.add(c),h.has(c)||h.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 $s=["read","resolveKeyframes","update","preRender","render","postRender"],yT=40;function zm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=$s.reduce((v,b)=>(v[b]=gT(s),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,yT),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:$s.reduce((v,b)=>{const y=i[b];return v[b]=(T,S=!1,E=!1)=>(n||p(),y.schedule(T,S,E)),v},{}),cancel:v=>{for(let b=0;b<$s.length;b++)i[$s[b]].cancel(v)},state:o,steps:i}}const{schedule:qc,cancel:jL}=zm(queueMicrotask,!1);function Mr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Um=w.createContext({});let Kd=!1;function vT(e,t,n,r,o){const{visualElement:s}=w.useContext(Gi),i=w.useContext(Hm),a=w.useContext(Yi),l=w.useContext(Yr).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,d=w.useContext(Um);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&xT(c.current,n,o,d),w.useInsertionEffect(()=>{u&&u.update(n,a)});const f=w.useRef(!!(n[Wm]&&!window.HandoffComplete));return Ki(()=>{u&&(u.updateFeatures(),qc.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,Kd||(Kd=!0,queueMicrotask(bT))))}),u}function bT(){window.HandoffComplete=!0}function xT(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:Gm(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&Mr(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Gm(e){if(e)return e.options.allowProjection!==!1?e.projection:Gm(e.parent)}function wT(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):Mr(n)&&(n.current=r))},[t])}function rs(e){return typeof e=="string"||Array.isArray(e)}function os(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Xc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qc=["initial",...Xc];function Xi(e){return os(e.animate)||Qc.some(t=>rs(e[t]))}function Ym(e){return!!(Xi(e)||e.variants)}function TT(e,t){if(Xi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rs(n)?n:void 0,animate:rs(r)?r:void 0}}return e.inherit!==!1?t:{}}function ST(e){const{initial:t,animate:n}=TT(e,w.useContext(Gi));return w.useMemo(()=>({initial:t,animate:n}),[qd(t),qd(n)])}function qd(e){return Array.isArray(e)?e.join(" "):e}const Xd={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"]},Kr={};for(const e in Xd)Kr[e]={isEnabled:t=>Xd[e].some(n=>!!t[n])};function ET(e){for(const t in e)Kr[t]={...Kr[t],...e[t]}}const ss=w.createContext({}),CT=Symbol.for("motionComponentSymbol"),yt=e=>e;let go=yt,Lt=yt;process.env.NODE_ENV!=="production"&&(go=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Lt=(e,t)=>{if(!e)throw new Error(t)});function PT({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&ET(e);function s(a,l){let c;const u={...w.useContext(Yr),...a,layoutId:RT(a)},{isStatic:d}=u,f=ST(a),h=r(a,d);if(!d&&Kc){IT(u,e);const p=AT(u);c=p.MeasureLayout,f.visualElement=vT(o,h,u,t,p.ProjectionNode)}return x.jsxs(Gi.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,wT(h,f.visualElement,l),h,d,f.visualElement)]})}const i=w.forwardRef(s);return i[CT]=o,i}function RT({layoutId:e}){const t=w.useContext(ss).id;return t&&e!==void 0?t+"-"+e:e}function IT(e,t){const n=w.useContext(Hm).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?go(!1,r):Lt(!1,r)}}function AT(e){const{drag:t,layout:n}=Kr;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 OT(e){function t(r,o={}){return PT(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 DT=["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 Zc(e){return typeof e!="string"||e.includes("-")?!1:!!(DT.indexOf(e)>-1||/[A-Z]/u.test(e))}const gi={};function MT(e){Object.assign(gi,e)}const ws=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zn=new Set(ws);function Km(e,{layout:t,layoutId:n}){return zn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!gi[e]||e==="opacity")}const lt=e=>!!(e&&e.getVelocity),kT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},FT=ws.length;function jT(e,t,n){let r="";for(let o=0;o<FT;o++){const s=ws[o];if(e[s]!==void 0){const i=kT[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const qm=e=>t=>typeof t=="string"&&t.startsWith(e),Xm=qm("--"),NT=qm("var(--"),Jc=e=>NT(e)?LT.test(e.split("/*")[0].trim()):!1,LT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,_T=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ln=(e,t,n)=>n>t?t:n<e?e:n,yo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Go={...yo,transform:e=>Ln(0,1,e)},Bs={...yo,default:1},Yo=e=>Math.round(e*1e5)/1e5,eu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,VT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,$T=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ts(e){return typeof e=="string"}function BT(e){return e==null}const Ss=e=>({test:t=>Ts(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),In=Ss("deg"),an=Ss("%"),le=Ss("px"),HT=Ss("vh"),WT=Ss("vw"),Qd={...an,parse:e=>an.parse(e)/100,transform:e=>an.transform(e*100)},Zd={...yo,transform:Math.round},Qm={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:In,rotateX:In,rotateY:In,rotateZ:In,scale:Bs,scaleX:Bs,scaleY:Bs,scaleZ:Bs,skew:In,skewX:In,skewY:In,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:Go,originX:Qd,originY:Qd,originZ:le,zIndex:Zd,backgroundPositionX:le,backgroundPositionY:le,fillOpacity:Go,strokeOpacity:Go,numOctaves:Zd};function tu(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 d=t[u];if(Xm(u)){o[u]=d;continue}const f=Qm[u],h=_T(d,f);if(zn.has(u)){if(a=!0,s[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=jT(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=i;r.transformOrigin=`${u} ${d} ${f}`}}const nu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zm(e,t,n){for(const r in t)!lt(t[r])&&!Km(r,n)&&(e[r]=t[r])}function zT({transformTemplate:e},t){return w.useMemo(()=>{const n=nu();return tu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function UT(e,t){const n=e.style||{},r={};return Zm(r,n,e),Object.assign(r,zT(e,t)),r}function GT(e,t){const n={},r=UT(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 YT=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 yi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||YT.has(e)}let Jm=e=>!yi(e);function eg(e){e&&(Jm=t=>t.startsWith("on")?!yi(t):e(t))}try{eg(require("@emotion/is-prop-valid").default)}catch{}function KT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Jm(o)||n===!0&&yi(o)||!t&&!yi(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Jd(e,t,n){return typeof e=="string"?e:le.transform(t+n*e)}function qT(e,t,n){const r=Jd(t,e.x,e.width),o=Jd(n,e.y,e.height);return`${r} ${o}`}const XT={offset:"stroke-dashoffset",array:"stroke-dasharray"},QT={offset:"strokeDashoffset",array:"strokeDasharray"};function ZT(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?XT:QT;e[s.offset]=le.transform(-r);const i=le.transform(t),a=le.transform(n);e[s.array]=`${i} ${a}`}function ru(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(tu(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=qT(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&ZT(f,i,a,l,!1)}const tg=()=>({...nu(),attrs:{}}),ou=e=>typeof e=="string"&&e.toLowerCase()==="svg";function JT(e,t,n,r){const o=w.useMemo(()=>{const s=tg();return ru(s,t,ou(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Zm(s,e.style,e),o.style={...s,...o.style}}return o}function e1(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Zc(n)?JT:GT)(r,s,i,n),c=KT(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=w.useMemo(()=>lt(d)?d.get():d,[d]);return w.createElement(n,{...u,children:f})}}function ng(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 rg=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 og(e,t,n,r){ng(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(rg.has(o)?o:qi(o),t.attrs[o])}function su(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(lt(o[i])||t.style&<(t.style[i])||Km(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 sg(e,t,n){const r=su(e,t,n);for(const o in e)if(lt(e[o])||lt(t[o])){const s=ws.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function ef(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function iu(e,t,n,r){if(typeof t=="function"){const[o,s]=ef(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]=ef(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function un(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bl=e=>Array.isArray(e),t1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),n1=e=>Bl(e)?e[e.length-1]||0:e;function ni(e){const t=lt(e)?e.get():e;return t1(t)?t.toValue():t}const ig=new Set(["opacity","clipPath","filter","transform"]);function ag(e){if(zn.has(e))return"transform";if(ig.has(e))return qi(e)}function Qi(e,t){e.indexOf(t)===-1&&e.push(t)}function Es(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function r1([...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 o1({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:i1(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const lg=e=>(t,n)=>{const r=w.useContext(Gi),o=w.useContext(Yi),s=()=>o1(e,t,r,o,n);return n?s():un(s)};function s1(e,t){const n=ag(t);n&&Qi(e,n)}function tf(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=iu(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function i1(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]=ni(c[g]);let{initial:u,animate:d}=e;const f=Xi(e),h=Ym(e);t&&h&&!f&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!os(m)&&tf(e,m,(g,v)=>{for(const b in g){let y=g[b];if(Array.isArray(y)){const T=p?y.length-1:0;y=y[T]}y!==null&&(i[b]=y)}for(const b in v)i[b]=v[b]}),l&&(d&&u!==!1&&!os(d)&&tf(e,d,g=>{for(const v in g)s1(a,v)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Ee,cancel:dn,state:pt,steps:Na}=zm(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),a1={useVisualState:lg({scrapeMotionValuesFromProps:sg,createRenderState:tg,onMount:(e,t,{renderState:n,latestValues:r})=>{Ee.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ee.render(()=>{ru(n,r,ou(t.tagName),e.transformTemplate),og(t,n)})}})},l1={useVisualState:lg({applyWillChange:!0,scrapeMotionValuesFromProps:su,createRenderState:nu})};function c1(e,{forwardMotionProps:t=!1},n,r){return{...Zc(e)?a1:l1,preloadedFeatures:n,useRender:e1(t),createVisualElement:r,Component:e}}function vn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const cg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Zi(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const u1=e=>t=>cg(t)&&e(t,Zi(t));function xn(e,t,n,r){return vn(e,t,u1(n),r)}const d1=(e,t)=>n=>t(e(n)),wn=(...e)=>e.reduce(d1);function ug(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const nf=ug("dragHorizontal"),rf=ug("dragVertical");function dg(e){let t=!1;if(e==="y")t=rf();else if(e==="x")t=nf();else{const n=nf(),r=rf();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function fg(){const e=dg(!0);return e?(e(),!1):!0}class Un{constructor(t){this.isMounted=!1,this.node=t}update(){}}function of(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||fg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Ee.postRender(()=>l(s,i))};return xn(e.current,n,o,{passive:!e.getProps()[r]})}class f1 extends Un{mount(){this.unmount=wn(of(this.node,!0),of(this.node,!1))}unmount(){}}class h1 extends Un{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=wn(vn(this.node.current,"focus",()=>this.onFocus()),vn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const hg=(e,t)=>t?e===t?!0:hg(e,t.parentElement):!1;function La(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Zi(n))}class p1 extends Un{constructor(){super(...arguments),this.removeStartListeners=yt,this.removeEndListeners=yt,this.removeAccessibleListeners=yt,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:d}=this.node.getProps(),f=!d&&!hg(this.node.current,a.target)?u:c;f&&Ee.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=xn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=wn(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()||La("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Ee.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=vn(this.node.current,"keyup",i),La("down",(a,l)=>{this.startPress(a,l)})},n=vn(this.node.current,"keydown",t),r=()=>{this.isPressing&&La("cancel",(s,i)=>this.cancelPress(s,i))},o=vn(this.node.current,"blur",r);this.removeAccessibleListeners=wn(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&&Ee.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!fg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ee.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=vn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=wn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Hl=new WeakMap,_a=new WeakMap,m1=e=>{const t=Hl.get(e.target);t&&t(e)},g1=e=>{e.forEach(m1)};function y1({root:e,...t}){const n=e||document;_a.has(n)||_a.set(n,{});const r=_a.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(g1,{root:e,...t})),r[o]}function v1(e,t,n){const r=y1(t);return Hl.set(e,n),r.observe(e),()=>{Hl.delete(e),r.unobserve(e)}}const b1={some:0,all:1};class x1 extends Un{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:b1[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:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return v1(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(w1(t,n))&&this.startObserver()}unmount(){}}function w1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const T1={inView:{Feature:x1},tap:{Feature:p1},focus:{Feature:h1},hover:{Feature:f1}};function pg(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 Ji(e,t,n){const r=e.getProps();return iu(r,t,n!==void 0?n:r.custom,e)}const ln=e=>e*1e3,cn=e=>e/1e3,S1={type:"spring",stiffness:500,damping:25,restSpeed:10},E1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),C1={type:"keyframes",duration:.8},P1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},R1=(e,{keyframes:t})=>t.length>2?C1:zn.has(e)?e.startsWith("scale")?E1(t[1]):S1:P1;function I1({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 au(e,t){return e[t]||e.default||e}const A1=e=>e!==null;function ea(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(A1),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let ri;function O1(){ri=void 0}const Fn={now:()=>(ri===void 0&&Fn.set(pt.isProcessing||mT.useManualTiming?pt.timestamp:performance.now()),ri),set:e=>{ri=e,queueMicrotask(O1)}},mg=e=>/^0[^.\s]+$/u.test(e);function D1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mg(e):!0}const gg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),M1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function k1(e){const t=M1.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const F1=4;function yg(e,t,n=1){Lt(n<=F1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=k1(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return gg(i)?parseFloat(i):i}return Jc(o)?yg(o,t,n+1):o}const j1=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),sf=e=>e===yo||e===le,af=(e,t)=>parseFloat(e.split(", ")[t]),lf=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return af(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?af(s[1],e):0}},N1=new Set(["x","y","z"]),L1=ws.filter(e=>!N1.has(e));function _1(e){const t=[];return L1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const qr={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:lf(4,13),y:lf(5,14)};qr.translateX=qr.x;qr.translateY=qr.y;const vg=e=>t=>t.test(e),V1={test:e=>e==="auto",parse:e=>e},bg=[yo,le,an,In,WT,HT,V1],cf=e=>bg.find(vg(e)),hr=new Set;let Wl=!1,zl=!1;function xg(){if(zl){const e=Array.from(hr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=_1(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)})}zl=!1,Wl=!1,hr.forEach(e=>e.complete()),hr.clear()}function wg(){hr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zl=!0)})}function $1(){wg(),xg()}class lu{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?(hr.add(this),Wl||(Wl=!0,Ee.read(wg),Ee.resolveKeyframes(xg))):(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),hr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,hr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const cu=(e,t)=>n=>!!(Ts(n)&&$T.test(n)&&n.startsWith(e)||t&&!BT(n)&&Object.prototype.hasOwnProperty.call(n,t)),Tg=(e,t,n)=>r=>{if(!Ts(r))return r;const[o,s,i,a]=r.match(eu);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},B1=e=>Ln(0,255,e),Va={...yo,transform:e=>Math.round(B1(e))},cr={test:cu("rgb","red"),parse:Tg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Va.transform(e)+", "+Va.transform(t)+", "+Va.transform(n)+", "+Yo(Go.transform(r))+")"};function H1(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 Ul={test:cu("#"),parse:H1,transform:cr.transform},kr={test:cu("hsl","hue"),parse:Tg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+an.transform(Yo(t))+", "+an.transform(Yo(n))+", "+Yo(Go.transform(r))+")"},bt={test:e=>cr.test(e)||Ul.test(e)||kr.test(e),parse:e=>cr.test(e)?cr.parse(e):kr.test(e)?kr.parse(e):Ul.parse(e),transform:e=>Ts(e)?e:e.hasOwnProperty("red")?cr.transform(e):kr.transform(e)};function W1(e){var t,n;return isNaN(e)&&Ts(e)&&(((t=e.match(eu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(VT))===null||n===void 0?void 0:n.length)||0)>0}const Sg="number",Eg="color",z1="var",U1="var(",uf="${}",G1=/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 is(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(G1,l=>(bt.test(l)?(r.color.push(s),o.push(Eg),n.push(bt.parse(l))):l.startsWith(U1)?(r.var.push(s),o.push(z1),n.push(l)):(r.number.push(s),o.push(Sg),n.push(parseFloat(l))),++s,uf)).split(uf);return{values:n,split:a,indexes:r,types:o}}function Cg(e){return is(e).values}function Pg(e){const{split:t,types:n}=is(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===Sg?s+=Yo(o[i]):a===Eg?s+=bt.transform(o[i]):s+=o[i]}return s}}const Y1=e=>typeof e=="number"?0:e;function K1(e){const t=Cg(e);return Pg(e)(t.map(Y1))}const _n={test:W1,parse:Cg,createTransformer:Pg,getAnimatableNone:K1},q1=new Set(["brightness","contrast","saturate","opacity"]);function X1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(eu)||[];if(!r)return e;const o=n.replace(r,"");let s=q1.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const Q1=/\b([a-z-]*)\(.*?\)/gu,Gl={..._n,getAnimatableNone:e=>{const t=e.match(Q1);return t?t.map(X1).join(" "):e}},Z1={...Qm,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Gl,WebkitFilter:Gl},uu=e=>Z1[e];function Rg(e,t){let n=uu(e);return n!==Gl&&(n=_n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const J1=new Set(["auto","none","0"]);function eS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!J1.has(s)&&is(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Rg(n,o)}class Ig extends lu{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(),Jc(c))){const u=yg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!j1.has(r)||t.length!==2)return;const[o,s]=t,i=cf(o),a=cf(s);if(i!==a)if(sf(i)&&sf(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++)D1(t[o])&&r.push(o);r.length&&eS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qr[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]=qr[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 Ag(e){let t;return()=>(t===void 0&&(t=e()),t)}const df=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_n.test(e)||e==="0")&&!e.startsWith("url("));function tS(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 nS(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=df(o,t),a=df(s,t);return go(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:tS(e)||n==="spring"&&r}class Og{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&&$1(),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&&!nS(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(ea(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 Dg(e,t){return t?e*(1e3/t):0}const rS=5;function Mg(e,t,n){const r=Math.max(t-rS,0);return Dg(n-e(r),t-r)}const $a=.001,oS=.01,ff=10,sS=.05,iS=1;function aS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;go(e<=ln(ff),"Spring duration must be 10 seconds or less");let i=1-t;i=Ln(sS,iS,i),e=Ln(oS,ff,cn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=Yl(c,i),p=Math.exp(-d);return $a-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Yl(Math.pow(c,2),i);return(-o(c)+$a>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-$a+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=cS(o,s,a);if(e=ln(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 lS=12;function cS(e,t,n){let r=n;for(let o=1;o<lS;o++)r=r-e(r)/t(r);return r}function Yl(e,t){return e*Math.sqrt(1-t*t)}const uS=["duration","bounce"],dS=["stiffness","damping","mass"];function hf(e,t){return t.some(n=>e[n]!==void 0)}function fS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!hf(e,dS)&&hf(e,uS)){const n=aS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function du({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:d,isResolvedFromDuration:f}=fS({...r,velocity:-cn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=s-o,g=cn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let b;if(p<1){const y=Yl(g,p);b=T=>{const S=Math.exp(-p*g*T);return s-S*((h+p*g*m)/y*Math.sin(y*T)+m*Math.cos(y*T))}}else if(p===1)b=y=>s-Math.exp(-g*y)*(m+(h+g*m)*y);else{const y=g*Math.sqrt(p*p-1);b=T=>{const S=Math.exp(-p*g*T),E=Math.min(y*T,300);return s-S*((h+p*g*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:f&&u||null,next:y=>{const T=b(y);if(f)i.done=y>=u;else{let S=h;y!==0&&(p<1?S=Mg(b,y,T):S=0);const E=Math.abs(S)<=n,R=Math.abs(s-T)<=t;i.done=E&&R}return i.value=i.done?s:T,i}}}function pf({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 d=e[0],f={done:!1,value:d},h=I=>a!==void 0&&I<a||l!==void 0&&I>l,p=I=>a===void 0?l:l===void 0||Math.abs(a-I)<Math.abs(l-I)?a:l;let m=n*t;const g=d+m,v=i===void 0?g:i(g);v!==g&&(m=v-d);const b=I=>-m*Math.exp(-I/r),y=I=>v+b(I),T=I=>{const k=b(I),A=y(I);f.done=Math.abs(k)<=c,f.value=f.done?v:A};let S,E;const R=I=>{h(f.value)&&(S=I,E=du({keyframes:[f.value,p(f.value)],velocity:Mg(y,I,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return R(0),{calculatedDuration:null,next:I=>{let k=!1;return!E&&S===void 0&&(k=!0,T(I),R(I)),S!==void 0&&I>=S?E.next(I-S):(!k&&T(I),f)}}}const kg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,hS=1e-7,pS=12;function mS(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=kg(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>hS&&++a<pS);return i}function Cs(e,t,n,r){if(e===t&&n===r)return yt;const o=s=>mS(s,0,1,e,n);return s=>s===0||s===1?s:kg(o(s),t,r)}const gS=Cs(.42,0,1,1),yS=Cs(0,0,.58,1),Fg=Cs(.42,0,.58,1),jg=e=>Array.isArray(e)&&typeof e[0]!="number",Ng=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Lg=e=>t=>1-e(1-t),fu=e=>1-Math.sin(Math.acos(e)),_g=Lg(fu),vS=Ng(fu),Vg=Cs(.33,1.53,.69,.99),hu=Lg(Vg),bS=Ng(hu),xS=e=>(e*=2)<1?.5*hu(e):.5*(2-Math.pow(2,-10*(e-1))),mf={linear:yt,easeIn:gS,easeInOut:Fg,easeOut:yS,circIn:fu,circInOut:vS,circOut:_g,backIn:hu,backInOut:bS,backOut:Vg,anticipate:xS},Kl=e=>{if(Array.isArray(e)){Lt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Cs(t,n,r,o)}else if(typeof e=="string")return Lt(mf[e]!==void 0,`Invalid easing type '${e}'`),mf[e];return e},Xr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$e=(e,t,n)=>e+(t-e)*n;function Ba(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 wS({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=Ba(l,a,e+1/3),s=Ba(l,a,e),i=Ba(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function vi(e,t){return n=>n>0?t:e}const Ha=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},TS=[Ul,cr,kr],SS=e=>TS.find(t=>t.test(e));function gf(e){const t=SS(e);if(go(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===kr&&(n=wS(n)),n}const yf=(e,t)=>{const n=gf(e),r=gf(t);if(!n||!r)return vi(e,t);const o={...n};return s=>(o.red=Ha(n.red,r.red,s),o.green=Ha(n.green,r.green,s),o.blue=Ha(n.blue,r.blue,s),o.alpha=$e(n.alpha,r.alpha,s),cr.transform(o))},ql=new Set(["none","hidden"]);function ES(e,t){return ql.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function CS(e,t){return n=>$e(e,t,n)}function pu(e){return typeof e=="number"?CS:typeof e=="string"?Jc(e)?vi:bt.test(e)?yf:IS:Array.isArray(e)?$g:typeof e=="object"?bt.test(e)?yf:PS:vi}function $g(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>pu(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function PS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=pu(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function RS(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 IS=(e,t)=>{const n=_n.createTransformer(t),r=is(e),o=is(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?ql.has(e)&&!o.values.length||ql.has(t)&&!r.values.length?ES(e,t):wn($g(RS(r,o),o.values),n):(go(!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.`),vi(e,t))};function Bg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?$e(e,t,n):pu(e)(e,t)}function AS(e,t,n){const r=[],o=n||Bg,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]||yt:t;a=wn(l,a)}r.push(a)}return r}function Hg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Lt(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=AS(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 d=Xr(e[u],e[u+1],c);return i[u](d)};return n?c=>l(Ln(e[0],e[s-1],c)):l}function Wg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Xr(0,t,r);e.push($e(n,1,o))}}function zg(e){const t=[0];return Wg(t,e.length-1),t}function OS(e,t){return e.map(n=>n*t)}function DS(e,t){return e.map(()=>t||Fg).splice(0,e.length-1)}function bi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=jg(r)?r.map(Kl):Kl(r),s={done:!1,value:t[0]},i=OS(n&&n.length===t.length?n:zg(t),e),a=Hg(i,t,{ease:Array.isArray(o)?o:DS(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Xl=2e4;function Ug(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Xl;)t+=n,r=e.next(t);return t>=Xl?1/0:t}const MS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ee.update(t,!0),stop:()=>dn(t),now:()=>pt.isProcessing?pt.timestamp:Fn.now()}},kS={decay:pf,inertia:pf,tween:bi,keyframes:bi,spring:du},FS=e=>e/100;class mu extends Og{constructor({KeyframeResolver:t=lu,...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=kS[n]||bi;let l,c;a!==bi&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Lt(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=wn(FS,Bg(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=Ug(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}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:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,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 v=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,T=s;if(h){const I=Math.min(this.currentTime,u)/d;let k=Math.floor(I),A=I%1;!A&&I>=1&&(A=1),A===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/d)):p==="mirror"&&(T=i)),y=Ln(0,1,A)*d}const S=b?{done:!1,value:l[0]}:T.next(y);a&&(S.value=a(S.value));let{done:E}=S;!b&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return R&&o!==void 0&&(S.value=ea(l,this.options,o)),g&&g(S.value),R&&this.finish(),S}get duration(){const{resolved:t}=this;return t?cn(t.calculatedDuration):0}get time(){return cn(this.currentTime)}set time(t){t=ln(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=cn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=MS,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 Gg=e=>Array.isArray(e)&&typeof e[0]=="number";function Yg(e){return!!(!e||typeof e=="string"&&e in gu||Gg(e)||Array.isArray(e)&&e.every(Yg))}const Bo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bo([0,.65,.55,1]),circOut:Bo([.55,0,1,.45]),backIn:Bo([.31,.01,.66,-.59]),backOut:Bo([.33,1.53,.69,.99])};function jS(e){return Kg(e)||gu.easeOut}function Kg(e){if(e)return Gg(e)?Bo(e):Array.isArray(e)?e.map(jS):gu[e]}function NS(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=Kg(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 LS=Ag(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xi=10,_S=2e4;function VS(e){return e.type==="spring"||!Yg(e.ease)}function $S(e,t){const n=new mu({...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<_S;)r=n.sample(s),o.push(r.value),s+=xi;return{times:void 0,keyframes:o,duration:s-xi,ease:"linear"}}class vf extends Og{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new Ig(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(VS(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=$S(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=NS(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Fn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(ea(t,this.options,n)),d&&d(),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 cn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return cn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ln(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 yt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return yt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;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:d,...f}=this.options,h=new mu({...f,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=ln(this.time);c.setWithVelocity(h.sample(p-xi).value,h.sample(p).value,xi)}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 LS()&&r&&ig.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function BS(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Ee.update(r,!0),()=>dn(r)}const HS=Ag(()=>window.ScrollTimeline!==void 0);class yu{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(HS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),BS(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 vu=(e,t,n,r={},o,s,i)=>a=>{const l=au(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ln(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};I1(l)||(d={...d,...R1(e,d)}),d.duration&&(d.duration=ln(d.duration)),d.repeatDelay&&(d.repeatDelay=ln(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=ea(d.keyframes,l);if(h!==void 0)return Ee.update(()=>{d.onUpdate(h),d.onComplete()}),new yu([])}return!s&&vf.supports(d)?new vf(d):new mu(d)};class bu{constructor(){this.subscriptions=[]}add(t){return Qi(this.subscriptions,t),()=>Es(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let 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 bf=new Set;function xu(e,t,n){e||bf.has(t)||(console.warn(t),bf.add(t))}const xf=30,WS=e=>!isNaN(parseFloat(e)),Ko={current:void 0};class qg{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Fn.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=Fn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=WS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&xu(!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 bu);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ee.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 Ko.current&&Ko.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Fn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>xf)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xf);return Dg(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 Qr(e,t){return new qg(e,t)}function zS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qr(n))}function US(e,t){const n=Ji(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=n1(s[i]);zS(e,i,a)}}function Xg(e){return e.getProps()[Wm]}class GS extends qg{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=ag(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&&(Es(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function YS(e){return!!(lt(e)&&e.add)}function Ql(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 GS("auto"),e.addValue("willChange",r)),YS(r))return r.add(t)}function KS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function wu(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 d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&KS(u,d))continue;const p={delay:n,elapsed:0,...au(i||{},d)};let m=!1;if(window.HandoffAppearAnimations){const v=Xg(e);if(v){const b=window.HandoffAppearAnimations(v,d,f,Ee);b!==null&&(p.elapsed=b,m=!0)}}f.start(vu(d,f,h,e.shouldReduceMotion&&zn.has(d)?{type:!1}:p,e,m,Ql(e,d)));const g=f.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Ee.update(()=>{a&&US(e,a)})}),c}function Zl(e,t,n={}){var r;const o=Ji(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(wu(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return qS(e,t,u+c,d,f,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 qS(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(XS).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Zl(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function XS(e,t){return e.sortNodePosition(t)}function QS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Zl(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Zl(e,t,n);else{const o=typeof t=="function"?Ji(e,t,n.custom):t;r=Promise.all(wu(e,o,n))}return r.then(()=>{Ee.postRender(()=>{e.notify("AnimationComplete",t)})})}const ZS=[...Xc].reverse(),JS=Xc.length;function eE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>QS(e,n,r)))}function tE(e){let t=eE(e),n=wf(),r=!0;const o=l=>(c,u)=>{var d;const f=Ji(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let g=0;g<JS;g++){const v=ZS[g],b=n[v],y=c[v]!==void 0?c[v]:u[v],T=rs(y),S=v===l?b.isActive:null;S===!1&&(p=g);let E=y===u[v]&&y!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...h},!b.isActive&&S===null||!y&&!b.prevProp||os(y)||typeof y=="boolean")continue;let I=nE(b.prevProp,y)||v===l&&b.isActive&&!E&&T||g>p&&T,k=!1;const A=Array.isArray(y)?y:[y];let N=A.reduce(o(v),{});S===!1&&(N={});const{prevResolvedValues:M={}}=b,j={...M,...N},P=O=>{I=!0,f.has(O)&&(k=!0,f.delete(O)),b.needsAnimating[O]=!0;const F=e.getValue(O);F&&(F.liveStyle=!1)};for(const O in j){const F=N[O],V=M[O];if(h.hasOwnProperty(O))continue;let H=!1;Bl(F)&&Bl(V)?H=!pg(F,V):H=F!==V,H?F!=null?P(O):f.add(O):F!==void 0&&f.has(O)?P(O):b.protectedKeys[O]=!0}b.prevProp=y,b.prevResolvedValues=N,b.isActive&&(h={...h,...N}),r&&e.blockInitialAnimation&&(I=!1),I&&(!E||k)&&d.push(...A.map(O=>({animation:O,options:{type:v}})))}if(f.size){const g={};f.forEach(v=>{const b=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),g[v]=b??null}),d.push({animation:g})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=wf(),r=!0}}}function nE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pg(t,e):!1}function Jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wf(){return{animate:Jn(!0),whileInView:Jn(),whileHover:Jn(),whileTap:Jn(),whileDrag:Jn(),whileFocus:Jn(),exit:Jn()}}class rE extends Un{constructor(t){super(t),t.animationState||(t.animationState=tE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();os(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 oE=0;class sE extends Un{constructor(){super(...arguments),this.id=oE++}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 iE={animation:{Feature:rE},exit:{Feature:sE}},Tf=(e,t)=>Math.abs(e-t);function aE(e,t){const n=Tf(e.x,t.x),r=Tf(e.y,t.y);return Math.sqrt(n**2+r**2)}class Qg{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 d=za(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=aE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=pt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:v}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Wa(f,this.transformPagePoint),Ee.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=za(d.type==="pointercancel"?this.lastMoveEventInfo:Wa(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,g),p&&p(d,g)},!cg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=Zi(t),a=Wa(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=pt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,za(a,this.history)),this.removeListeners=wn(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(),dn(this.updatePoint)}}function Wa(e,t){return t?{point:t(e.point)}:e}function Sf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function za({point:e},t){return{point:e,delta:Sf(e,Zg(t)),offset:Sf(e,lE(t)),velocity:cE(t,.1)}}function lE(e){return e[0]}function Zg(e){return e[e.length-1]}function cE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Zg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ln(t)));)n--;if(!r)return{x:0,y:0};const s=cn(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 Jg=1e-4,uE=1-Jg,dE=1+Jg,ey=.01,fE=0-ey,hE=0+ey;function _t(e){return e.max-e.min}function pE(e,t,n){return Math.abs(e-t)<=n}function Ef(e,t,n,r=.5){e.origin=r,e.originPoint=$e(t.min,t.max,e.origin),e.scale=_t(n)/_t(t),e.translate=$e(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uE&&e.scale<=dE||isNaN(e.scale))&&(e.scale=1),(e.translate>=fE&&e.translate<=hE||isNaN(e.translate))&&(e.translate=0)}function qo(e,t,n,r){Ef(e.x,t.x,n.x,r?r.originX:void 0),Ef(e.y,t.y,n.y,r?r.originY:void 0)}function Cf(e,t,n){e.min=n.min+t.min,e.max=e.min+_t(t)}function mE(e,t,n){Cf(e.x,t.x,n.x),Cf(e.y,t.y,n.y)}function Pf(e,t,n){e.min=t.min-n.min,e.max=e.min+_t(t)}function Xo(e,t,n){Pf(e.x,t.x,n.x),Pf(e.y,t.y,n.y)}function gE(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 Rf(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 yE(e,{top:t,left:n,bottom:r,right:o}){return{x:Rf(e.x,n,o),y:Rf(e.y,t,r)}}function If(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 vE(e,t){return{x:If(e.x,t.x),y:If(e.y,t.y)}}function bE(e,t){let n=.5;const r=_t(e),o=_t(t);return o>r?n=Xr(t.min,t.max-r,e.min):r>o&&(n=Xr(e.min,e.max-o,t.min)),Ln(0,1,n)}function xE(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 wE(e=Jl){return e===!1?e=0:e===!0&&(e=Jl),{x:Af(e,"left","right"),y:Af(e,"top","bottom")}}function Af(e,t,n){return{min:Of(e,t),max:Of(e,n)}}function Of(e,t){return typeof e=="number"?e:e[t]||0}const Df=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fr=()=>({x:Df(),y:Df()}),Mf=()=>({min:0,max:0}),Je=()=>({x:Mf(),y:Mf()});function Ht(e){return[e("x"),e("y")]}function ty({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function TE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function SE(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 Ua(e){return e===void 0||e===1}function ec({scale:e,scaleX:t,scaleY:n}){return!Ua(e)||!Ua(t)||!Ua(n)}function tr(e){return ec(e)||ny(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ny(e){return kf(e.x)||kf(e.y)}function kf(e){return e&&e!=="0%"}function wi(e,t,n){const r=e-n,o=t*r;return n+o}function Ff(e,t,n,r,o){return o!==void 0&&(e=wi(e,o,r)),wi(e,n,r)+t}function tc(e,t=0,n=1,r,o){e.min=Ff(e.min,t,n,r,o),e.max=Ff(e.max,t,n,r,o)}function ry(e,{x:t,y:n}){tc(e.x,t.translate,t.scale,t.originPoint),tc(e.y,n.translate,n.scale,n.originPoint)}const jf=.999999999999,Nf=1.0000000000001;function EE(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&&jr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,ry(e,i)),r&&tr(s.latestValues)&&jr(e,s.latestValues))}t.x<Nf&&t.x>jf&&(t.x=1),t.y<Nf&&t.y>jf&&(t.y=1)}function On(e,t){e.min=e.min+t,e.max=e.max+t}function Lf(e,t,n,r,o=.5){const s=$e(e.min,e.max,o);tc(e,t,n,s,r)}function jr(e,t){Lf(e.x,t.x,t.scaleX,t.scale,t.originX),Lf(e.y,t.y,t.scaleY,t.scale,t.originY)}function oy(e,t){return ty(SE(e.getBoundingClientRect(),t))}function CE(e,t,n){const r=oy(e,n),{scroll:o}=t;return o&&(On(r.x,o.offset.x),On(r.y,o.offset.y)),r}const sy=({current:e})=>e?e.ownerDocument.defaultView:null,PE=new WeakMap;class RE{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=Je(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Zi(u,"page").point)},s=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=dg(h),!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),Ht(v=>{let b=this.getAxisMotionValue(v).get()||0;if(an.test(b)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[v];T&&(b=_t(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&Ee.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=Ql(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:g}=d;if(h&&this.currentDirection===null){this.currentDirection=IE(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Ht(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Qg(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:sy(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&&Ee.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||!Hs(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=gE(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&&Mr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=yE(o.layoutBox,n):this.constraints=!1,this.elastic=wE(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Ht(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=xE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Mr(t))return!1;const r=t.current;Lt(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=CE(r,o.root,this.visualElement.getTransformPagePoint());let i=vE(o.layout.layoutBox,s);if(n){const a=n(TE(i));this.hasMutatedConstraints=!!a,a&&(i=ty(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ht(u=>{if(!Hs(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(vu(t,r,0,n,this.visualElement,!1,Ql(this.visualElement,t)))}stopAnimation(){Ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ht(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){Ht(n=>{const{drag:r}=this.getProps();if(!Hs(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(!Mr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ht(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=bE({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(),Ht(i=>{if(!Hs(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;PE.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();Mr(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()),Ee.read(r);const i=vn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ht(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.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 Hs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function IE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AE extends Un{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new RE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const _f=e=>(t,n)=>{e&&Ee.postRender(()=>e(t,n))};class OE extends Un{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new Qg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:_f(t),onStart:_f(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Ee.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 DE(){const e=w.useContext(Yi);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 oi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Vf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(le.test(e))e=parseFloat(e);else return e;const n=Vf(e,t.target.x),r=Vf(e,t.target.y);return`${n}% ${r}%`}},ME={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 kE extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;MT(FE),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()})),oi.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()||Ee.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),qc.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 iy(e){const[t,n]=DE(),r=w.useContext(ss);return x.jsx(kE,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(Um),isPresent:t,safeToRemove:n})}const FE={borderRadius:{...Lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:ME},ay=["TopLeft","TopRight","BottomLeft","BottomRight"],jE=ay.length,$f=e=>typeof e=="string"?parseFloat(e):e,Bf=e=>typeof e=="number"||le.test(e);function NE(e,t,n,r,o,s){o?(e.opacity=$e(0,n.opacity!==void 0?n.opacity:1,LE(r)),e.opacityExit=$e(t.opacity!==void 0?t.opacity:1,0,_E(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<jE;i++){const a=`border${ay[i]}Radius`;let l=Hf(t,a),c=Hf(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Bf(l)===Bf(c)?(e[a]=Math.max($e($f(l),$f(c),r),0),(an.test(c)||an.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=$e(t.rotate||0,n.rotate||0,r))}function Hf(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const LE=ly(0,.5,_g),_E=ly(.5,.95,yt);function ly(e,t,n){return r=>r<e?0:r>t?1:n(Xr(e,t,r))}function Wf(e,t){e.min=t.min,e.max=t.max}function $t(e,t){Wf(e.x,t.x),Wf(e.y,t.y)}function zf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Uf(e,t,n,r,o){return e-=t,e=wi(e,1/n,r),o!==void 0&&(e=wi(e,1/o,r)),e}function VE(e,t=0,n=1,r=.5,o,s=e,i=e){if(an.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=Uf(e.min,t,n,a,o),e.max=Uf(e.max,t,n,a,o)}function Gf(e,t,[n,r,o],s,i){VE(e,t[n],t[r],t[o],t.scale,s,i)}const $E=["x","scaleX","originX"],BE=["y","scaleY","originY"];function Yf(e,t,n,r){Gf(e.x,t,$E,n?n.x:void 0,r?r.x:void 0),Gf(e.y,t,BE,n?n.y:void 0,r?r.y:void 0)}function Kf(e){return e.translate===0&&e.scale===1}function cy(e){return Kf(e.x)&&Kf(e.y)}function HE(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 uy(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 qf(e){return _t(e.x)/_t(e.y)}function Xf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class WE{constructor(){this.members=[]}add(t){Qi(this.members,t),t.scheduleRender()}remove(t){if(Es(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const 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 zE(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:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}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 UE=(e,t)=>e.depth-t.depth;class GE{constructor(){this.children=[],this.isDirty=!1}add(t){Qi(this.children,t),this.isDirty=!0}remove(t){Es(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(UE),this.isDirty=!1,this.children.forEach(t)}}function YE(e,t){const n=Fn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(dn(r),e(s-t))};return Ee.read(r,!0),()=>dn(r)}function dy(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Tu(e,t,n){const r=lt(e)?e:Qr(e);return r.start(vu("",r,t,n)),r.animation}const nr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ga=["","X","Y","Z"],KE={visibility:"hidden"},Qf=1e3;let qE=0;function Ya(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Xg(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?fy(e.parent):!1:!1}function hy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=qE++,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&&(nr.totalNodes=nr.resolvedTargetDeltas=nr.recalculatedProjection=0),this.nodes.forEach(ZE),this.nodes.forEach(rC),this.nodes.forEach(oC),this.nodes.forEach(JE),window.MotionDebug&&window.MotionDebug.record(nr)},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 GE)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new bu),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=dy(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 d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=YE(f,250),oi.hasAnimatedSinceResize&&(oi.hasAnimatedSinceResize=!1,this.nodes.forEach(Jf))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||cC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!uy(this.targetLayout,p)||h,y=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const T={...au(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||Jf(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,dn(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(sC),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&&fy(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 d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Zf);return}this.isUpdating||this.nodes.forEach(tC),this.isUpdating=!1,this.nodes.forEach(nC),this.nodes.forEach(XE),this.nodes.forEach(QE),this.clearAllSnapshots();const a=Fn.now();pt.delta=Ln(0,1e3/60,a-pt.timestamp),pt.timestamp=a,pt.isProcessing=!0,Na.update.process(pt),Na.preRender.process(pt),Na.render.process(pt),pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eC),this.sharedNodes.forEach(iC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ee.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ee.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=Je(),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&&!cy(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||tr(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)),uC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return Je();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(On(a.x,l.offset.x),On(a.y,l.offset.y)),a}removeElementScroll(i){const a=Je();$t(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){$t(a,i);const{scroll:f}=this.root;f&&(On(a.x,-f.offset.x),On(a.y,-f.offset.y))}On(a.x,u.offset.x),On(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=Je();$t(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&&jr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),tr(u.latestValues)&&jr(l,u.latestValues)}return tr(this.latestValues)&&jr(l,this.latestValues),l}removeTransform(i){const a=Je();$t(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!tr(c.latestValues))continue;ec(c.latestValues)&&c.updateSnapshot();const u=Je(),d=c.measurePageBox();$t(u,d),Yf(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return tr(this.latestValues)&&Yf(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!==pt.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:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=pt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),Xo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Je(),this.targetWithTransforms=Je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),ry(this.target,this.targetDelta)):$t(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),Xo(this.relativeTargetOrigin,this.target,h.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&nr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ec(this.parent.latestValues)||ny(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===pt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;$t(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;EE(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=Je());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zf(this.prevProjectionDelta.x,this.projectionDelta.x),zf(this.prevProjectionDelta.y,this.projectionDelta.y)),qo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Xf(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xf(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&nr.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=Fr(),this.projectionDelta=Fr(),this.projectionDeltaWithTransform=Fr()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Fr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Je(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,g=this.getStack(),v=!g||g.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(lC));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/1e3;eh(d.x,i.x,S),eh(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xo(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aC(this.relativeTarget,this.relativeTargetOrigin,f,S),y&&HE(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Je()),$t(y,this.relativeTarget)),m&&(this.animationValues=u,NE(u,c,this.latestValues,S,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},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&&(dn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ee.update(()=>{oi.hasAnimatedSinceResize=!0,this.currentAnimation=Tu(0,Qf,{...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(Qf),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&&py(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Je();const d=_t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=_t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}$t(a,l),jr(a,u),qo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new WE),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&&Ya("z",i,c,this.animationValues);for(let u=0;u<Ga.length;u++)Ya(`rotate${Ga[u]}`,i,c,this.animationValues),Ya(`skew${Ga[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 KE;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ni(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ni(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!tr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=zE(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in gi){if(f[m]===void 0)continue;const{correct:g,applyTo:v}=gi[m],b=c.transform==="none"?f[m]:g(f[m],d);if(v){const y=v.length;for(let T=0;T<y;T++)c[v[T]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=d===this?ni(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(Zf),this.root.sharedNodes.clear()}}}function XE(e){e.updateLayout()}function QE(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"?Ht(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=_t(f);f.min=r[d].min,f.max=f.min+h}):py(s,n.layoutBox,r)&&Ht(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=_t(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=Fr();qo(a,r,n.layoutBox);const l=Fr();i?qo(l,e.applyTransform(o,!0),n.measuredBox):qo(l,r,n.layoutBox);const c=!cy(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=Je();Xo(p,n.layoutBox,f.layoutBox);const m=Je();Xo(m,r,h.layoutBox),uy(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}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 ZE(e){window.MotionDebug&&nr.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 JE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eC(e){e.clearSnapshot()}function Zf(e){e.clearMeasurements()}function tC(e){e.isLayoutDirty=!1}function nC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Jf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rC(e){e.resolveTargetDelta()}function oC(e){e.calcProjection()}function sC(e){e.resetSkewAndRotation()}function iC(e){e.removeLeadSnapshot()}function eh(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 th(e,t,n,r){e.min=$e(t.min,n.min,r),e.max=$e(t.max,n.max,r)}function aC(e,t,n,r){th(e.x,t.x,n.x,r),th(e.y,t.y,n.y,r)}function lC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cC={duration:.45,ease:[.4,0,.1,1]},nh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rh=nh("applewebkit/")&&!nh("chrome/")?Math.round:yt;function oh(e){e.min=rh(e.min),e.max=rh(e.max)}function uC(e){oh(e.x),oh(e.y)}function py(e,t,n){return e==="position"||e==="preserve-aspect"&&!pE(qf(t),qf(n),.2)}const dC=hy({attachResizeListener:(e,t)=>vn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ka={current:void 0},my=hy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ka.current){const e=new dC({});e.mount(window),e.setOptions({layoutScroll:!0}),Ka.current=e}return Ka.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fC={pan:{Feature:OE},drag:{Feature:AE,ProjectionNode:my,MeasureLayout:iy}},nc={current:null},gy={current:!1};function hC(){if(gy.current=!0,!!Kc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nc.current=e.matches;e.addListener(t),t()}else nc.current=!1}function pC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(lt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&xu(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(lt(s))e.addValue(r,Qr(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,Qr(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const as=new WeakMap,mC=[...bg,bt,_n],gC=e=>mC.find(vg(e)),sh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],yC=Qc.length;class vC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,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=lu,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,Ee.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=Xi(n),this.isVariantNode=Ym(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&<(h)&&h.set(l[f],!1)}}mount(t){this.current=t,as.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)),gy.current||hC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:nc.current,process.env.NODE_ENV!=="production"&&xu(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(){as.delete(this.current),this.projection&&this.projection.unmount(),dn(this.notifyUpdate),dn(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=zn.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Ee.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 Kr){const n=Kr[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):Je()}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<sh.length;r++){const o=sh[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=pC(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<yC;r++){const o=Qc[r],s=this.props[o];(rs(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=Qr(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"&&(gg(o)||mg(o))?o=parseFloat(o):!gC(o)&&_n.test(n)&&(o=Rg(t,n)),this.setBaseTarget(t,lt(o)?o.get():o)),lt(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=iu(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&&!lt(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 bu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class yy extends vC{constructor(){super(...arguments),this.KeyframeResolver=Ig}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 bC(e){return window.getComputedStyle(e)}class vy extends yy{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=ng}readValueFromInstance(t,n){if(zn.has(n)){const r=uu(n);return r&&r.default||0}else{const r=bC(t),o=(Xm(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return oy(t,n)}build(t,n,r){tu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return su(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;lt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class by extends yy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(zn.has(n)){const r=uu(n);return r&&r.default||0}return n=rg.has(n)?n:qi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return sg(t,n,r)}build(t,n,r){ru(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){og(t,n,r,o)}mount(t){this.isSVGTag=ou(t.tagName),super.mount(t)}}const xC=(e,t)=>Zc(e)?new by(t):new vy(t,{allowProjection:e!==w.Fragment}),wC={layout:{ProjectionNode:my,MeasureLayout:iy}},TC={...iE,...T1,...fC,...wC},dt=OT((e,t)=>c1(e,t,TC,xC));function xy(){const e=w.useRef(!1);return Ki(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function wy(){const e=xy(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Ee.postRender(r),[r]),t]}class SC 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 EC({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(Yr);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,7 +9,7 @@
|
|
|
9
9
|
top: ${l}px !important;
|
|
10
10
|
left: ${c}px !important;
|
|
11
11
|
}
|
|
12
|
-
`),()=>{document.head.removeChild(u)}},[t]),x.jsx(SC,{isPresent:t,childRef:r,sizeRef:o,children:C.cloneElement(e,{ref:r})})}const Ka=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=un(CC),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(EC,{isPresent:n,children:e})),x.jsx(Yi.Provider,{value:c,children:e})};function CC(){return new Map}function Ty(e){return w.useEffect(()=>()=>e(),[])}const rr=e=>e.key||"";function PC(e,t){e.forEach(n=>{const r=rr(n);t.set(r,n)})}function RC(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const vo=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{Lt(!o,"Replace exitBeforeEnter with mode='wait'");const a=w.useContext(ss).forceRender||wy()[0],l=xy(),c=RC(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(Ki(()=>{p.current=!1,PC(c,d),h.current=u}),Ty(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(b=>x.jsx(Ka,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:b},rr(b)))});u=[...u];const m=h.current.map(rr),g=c.map(rr),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 R=()=>{f.delete(v);const I=Array.from(d.keys()).filter(M=>!g.includes(M));if(I.forEach(M=>d.delete(M)),h.current=c.filter(M=>{const A=rr(M);return A===v||I.includes(A)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(Ka,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:s,mode:i,children:S},rr(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(Ka,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:b},rr(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 IC({children:e,isValidProp:t,...n}){t&&eg(t),n={...w.useContext(Yr),...n},n.isStatic=un(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Yr.Provider,{value:r,children:e})}const AC=w.createContext(null),OC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function ih(){const e=new Set,t=new WeakMap,n=()=>e.forEach(OC);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 Sy=e=>e===!0,DC=e=>Sy(e===!0)||e==="id",MC=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(ss),o=w.useContext(AC),[s,i]=wy(),a=w.useRef(null),l=r.id||o;a.current===null&&(DC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Sy(n)&&r.group||ih()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(ss.Provider,{value:c,children:e})},Ey=w.createContext(null);function kC(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=Ve(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?rT(e,o,o+s):e}function FC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=un(()=>ft(t)),l=[],c=w.useRef(!1);Lt(!!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(LC)},updateOrder:(f,h,d)=>{if(c.current)return;const p=kC(l,f,h,d);l!==p&&(c.current=!0,r(p.map(NC).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(Ey.Provider,{value:u,children:e})})}const jC=w.forwardRef(FC);function NC(e){return e.value}function LC(e,t){return e.layout.min-t.layout.min}function mr(e){const t=un(()=>Qr(e)),{isStatic:n}=w.useContext(Yr);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}const _C=e=>e&&typeof e=="object"&&e.mix,VC=e=>_C(e)?e.mix:void 0;function $C(...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=Hg(o,s,{mixer:VC(s[0]),...i});return t?a(r):a}function Cy(e,t){const n=mr(t()),r=()=>n.set(t());return r(),Ki(()=>{const o=()=>Te.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),fn(r)}}),n}function BC(e){Ko.current=[],e();const t=Cy(Ko.current,e);return Ko.current=void 0,t}function HC(e,t,n,r){if(typeof e=="function")return BC(e);const o=typeof t=="function"?t:$C(t,n,r);return Array.isArray(e)?ah(e,o):ah([e],([s])=>o(s))}function ah(e,t){const n=un(()=>[]);return Cy(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function lh(e,t=0){return lt(e)?e:mr(t)}function WC({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=un(()=>ft(r)),c=w.useContext(Ey),u={x:lh(t.x),y:lh(t.y)},f=HC([u.x,u.y],([m,g])=>m||g?1:"unset");Lt(!!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 zC=w.forwardRef(WC),ta={Group:jC,Item:zC};function Py(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Lt(!!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 UC(e){return typeof e=="object"&&!Array.isArray(e)}function GC(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=fy(e)?new by(t):new vy(t);n.mount(e),as.set(e,n)}function YC(e,t=100){const n=uu({keyframes:[0,t],...e}),r=Math.min(Ug(n),ql);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:cn(r)}}function ch(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 KC=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function qC(e,t){return jg(e)?e[KC(0,e.length,t)]:e}function XC(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Es(e,o),r--)}}function QC(e,t,n,r,o,s){XC(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ve(o,s,r[i]),easing:qC(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 JC="easeInOut";function eP(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,ch(u,d.at,c,l));continue}let[p,m,g={}]=d;g.at!==void 0&&(u=ch(u,g.at,c,l));let y=0;const b=(v,S,T,E=0,R=0)=>{const I=tP(v),{delay:M=0,times:A=zg(I),type:N="keyframes",...k}=S;let{ease:j=t.ease||"easeOut",duration:P}=S;const O=typeof M=="function"?M(E,R):M,F=I.length;if(F<=2&&N==="spring"){let D=100;if(F===2&&oP(I)){const J=I[1]-I[0];D=Math.abs(J)}const $={...k};P!==void 0&&($.duration=ln(P));const q=YC($,D);j=q.ease,P=q.duration}P??(P=o);const _=u+O,H=_+P;A.length===1&&A[0]===0&&(A[1]=1);const U=A.length-I.length;U>0&&Wg(A,U),I.length===1&&I.unshift(null),QC(T,I,j,A,_,H),y=Math.max(O+P,y),f=Math.max(H,f)};if(lt(p)){const v=uh(p,i);b(m,g,fh("default",v))}else{const v=Py(p,r,a),S=v.length;for(let T=0;T<S;T++){m=m,g=g;const E=v[T],R=uh(E,i);for(const I in m)b(m[I],nP(g,I),fh(I,R),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:R}=m[S];g.push(E),y.push(Xr(0,f,T)),b.push(R||"easeOut")}y[0]!==0&&(y.unshift(0),g.unshift(g[0]),b.unshift(JC)),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 uh(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function fh(e,t){return t[e]||(t[e]=[]),t[e]}function tP(e){return Array.isArray(e)?e:[e]}function nP(e,t){return e[t]?{...e,...e[t]}:{...e}}const rP=e=>typeof e=="number",oP=e=>e.every(rP);function Ry(e,t,n,r){const o=Py(e,r),s=o.length;Lt(!!s,"No valid element provided.");const i=[];for(let a=0;a<s;a++){const l=o[a];as.has(l)||GC(l);const c=as.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,s)),i.push(...xu(c,{...t,transition:u},{}))}return new gu(i)}const sP=e=>Array.isArray(e)&&Array.isArray(e[0]);function iP(e,t,n){const r=[];return eP(e,t,n).forEach(({keyframes:s,transition:i},a)=>{let l;lt(a)?l=wu(a,s.default,i.default):l=Ry(a,s,i),r.push(l)}),new gu(r)}const aP=e=>{function t(n,r,o){let s;return sP(n)?s=iP(n,r,e):UC(r)?s=Ry(n,r,o,e):s=wu(n,r,o),e&&e.animations.push(s),s}return t};function lP(){const e=un(()=>({current:null,animations:[]})),t=un(()=>aP(e));return Ty(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class cP{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 uP=()=>new cP;function fP(){return un(uP)}function dP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function hP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:dP(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=Yl(r)(l/c)*c}return t+l}}/**
|
|
12
|
+
`),()=>{document.head.removeChild(u)}},[t]),x.jsx(SC,{isPresent:t,childRef:r,sizeRef:o,children:C.cloneElement(e,{ref:r})})}const qa=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=un(CC),l=w.useId(),c=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return w.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),C.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(EC,{isPresent:n,children:e})),x.jsx(Yi.Provider,{value:c,children:e})};function CC(){return new Map}function Ty(e){return w.useEffect(()=>()=>e(),[])}const rr=e=>e.key||"";function PC(e,t){e.forEach(n=>{const r=rr(n);t.set(r,n)})}function RC(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const vo=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{Lt(!o,"Replace exitBeforeEnter with mode='wait'");const a=w.useContext(ss).forceRender||wy()[0],l=xy(),c=RC(e);let u=c;const d=w.useRef(new Map).current,f=w.useRef(u),h=w.useRef(new Map).current,p=w.useRef(!0);if(Ki(()=>{p.current=!1,PC(c,h),f.current=u}),Ty(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(b=>x.jsx(qa,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:b},rr(b)))});u=[...u];const m=f.current.map(rr),g=c.map(rr),v=m.length;for(let b=0;b<v;b++){const y=m[b];g.indexOf(y)===-1&&!d.has(y)&&d.set(y,void 0)}return i==="wait"&&d.size&&(u=[]),d.forEach((b,y)=>{if(g.indexOf(y)!==-1)return;const T=h.get(y);if(!T)return;const S=m.indexOf(y);let E=b;if(!E){const R=()=>{d.delete(y);const I=Array.from(h.keys()).filter(k=>!g.includes(k));if(I.forEach(k=>h.delete(k)),f.current=c.filter(k=>{const A=rr(k);return A===y||I.includes(A)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(qa,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:s,mode:i,children:T},rr(T)),d.set(y,E)}u.splice(S,0,E)}),u=u.map(b=>{const y=b.key;return d.has(y)?b:x.jsx(qa,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:b},rr(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:d.size?u:u.map(b=>w.cloneElement(b))})};function IC({children:e,isValidProp:t,...n}){t&&eg(t),n={...w.useContext(Yr),...n},n.isStatic=un(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Yr.Provider,{value:r,children:e})}const AC=w.createContext(null),OC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function ih(){const e=new Set,t=new WeakMap,n=()=>e.forEach(OC);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 Sy=e=>e===!0,DC=e=>Sy(e===!0)||e==="id",MC=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(ss),o=w.useContext(AC),[s,i]=wy(),a=w.useRef(null),l=r.id||o;a.current===null&&(DC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Sy(n)&&r.group||ih()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(ss.Provider,{value:c,children:e})},Ey=w.createContext(null);function kC(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?r1(e,o,o+s):e}function FC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=un(()=>dt(t)),l=[],c=w.useRef(!1);Lt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(LC)},updateOrder:(d,f,h)=>{if(c.current)return;const p=kC(l,d,f,h);l!==p&&(c.current=!0,r(p.map(NC).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(Ey.Provider,{value:u,children:e})})}const jC=w.forwardRef(FC);function NC(e){return e.value}function LC(e,t){return e.layout.min-t.layout.min}function mr(e){const t=un(()=>Qr(e)),{isStatic:n}=w.useContext(Yr);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}const _C=e=>e&&typeof e=="object"&&e.mix,VC=e=>_C(e)?e.mix:void 0;function $C(...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=Hg(o,s,{mixer:VC(s[0]),...i});return t?a(r):a}function Cy(e,t){const n=mr(t()),r=()=>n.set(t());return r(),Ki(()=>{const o=()=>Ee.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),dn(r)}}),n}function BC(e){Ko.current=[],e();const t=Cy(Ko.current,e);return Ko.current=void 0,t}function HC(e,t,n,r){if(typeof e=="function")return BC(e);const o=typeof t=="function"?t:$C(t,n,r);return Array.isArray(e)?ah(e,o):ah([e],([s])=>o(s))}function ah(e,t){const n=un(()=>[]);return Cy(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function lh(e,t=0){return lt(e)?e:mr(t)}function WC({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=un(()=>dt(r)),c=w.useContext(Ey),u={x:lh(t.x),y:lh(t.y)},d=HC([u.x,u.y],([m,g])=>m||g?1:"unset");Lt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,g)=>{const{velocity:v}=g;v[f]&&p(n,u[f].get(),v[f]),o&&o(m,g)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const zC=w.forwardRef(WC),ta={Group:jC,Item:zC};function Py(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Lt(!!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 UC(e){return typeof e=="object"&&!Array.isArray(e)}function GC(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=dy(e)?new by(t):new vy(t);n.mount(e),as.set(e,n)}function YC(e,t=100){const n=du({keyframes:[0,t],...e}),r=Math.min(Ug(n),Xl);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:cn(r)}}function ch(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 KC=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function qC(e,t){return jg(e)?e[KC(0,e.length,t)]:e}function XC(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Es(e,o),r--)}}function QC(e,t,n,r,o,s){XC(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:$e(o,s,r[i]),easing:qC(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 JC="easeInOut";function eP(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,d=0;for(let f=0;f<e.length;f++){const h=e[f];if(typeof h=="string"){l.set(h,u);continue}else if(!Array.isArray(h)){l.set(h.name,ch(u,h.at,c,l));continue}let[p,m,g={}]=h;g.at!==void 0&&(u=ch(u,g.at,c,l));let v=0;const b=(y,T,S,E=0,R=0)=>{const I=tP(y),{delay:k=0,times:A=zg(I),type:N="keyframes",...M}=T;let{ease:j=t.ease||"easeOut",duration:P}=T;const O=typeof k=="function"?k(E,R):k,F=I.length;if(F<=2&&N==="spring"){let D=100;if(F===2&&oP(I)){const J=I[1]-I[0];D=Math.abs(J)}const $={...M};P!==void 0&&($.duration=ln(P));const K=YC($,D);j=K.ease,P=K.duration}P??(P=o);const V=u+O,H=V+P;A.length===1&&A[0]===0&&(A[1]=1);const z=A.length-I.length;z>0&&Wg(A,z),I.length===1&&I.unshift(null),QC(S,I,j,A,V,H),v=Math.max(O+P,v),d=Math.max(H,d)};if(lt(p)){const y=uh(p,i);b(m,g,dh("default",y))}else{const y=Py(p,r,a),T=y.length;for(let S=0;S<T;S++){m=m,g=g;const E=y[S],R=uh(E,i);for(const I in m)b(m[I],nP(g,I),dh(I,R),S,T)}}c=u,u+=v}return i.forEach((f,h)=>{for(const p in f){const m=f[p];m.sort(ZC);const g=[],v=[],b=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:R}=m[T];g.push(E),v.push(Xr(0,d,S)),b.push(R||"easeOut")}v[0]!==0&&(v.unshift(0),g.unshift(g[0]),b.unshift(JC)),v[v.length-1]!==1&&(v.push(1),g.push(null)),s.has(h)||s.set(h,{keyframes:{},transition:{}});const y=s.get(h);y.keyframes[p]=g,y.transition[p]={...t,duration:d,ease:b,times:v,...n}}}),s}function uh(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function dh(e,t){return t[e]||(t[e]=[]),t[e]}function tP(e){return Array.isArray(e)?e:[e]}function nP(e,t){return e[t]?{...e,...e[t]}:{...e}}const rP=e=>typeof e=="number",oP=e=>e.every(rP);function Ry(e,t,n,r){const o=Py(e,r),s=o.length;Lt(!!s,"No valid element provided.");const i=[];for(let a=0;a<s;a++){const l=o[a];as.has(l)||GC(l);const c=as.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,s)),i.push(...wu(c,{...t,transition:u},{}))}return new yu(i)}const sP=e=>Array.isArray(e)&&Array.isArray(e[0]);function iP(e,t,n){const r=[];return eP(e,t,n).forEach(({keyframes:s,transition:i},a)=>{let l;lt(a)?l=Tu(a,s.default,i.default):l=Ry(a,s,i),r.push(l)}),new yu(r)}const aP=e=>{function t(n,r,o){let s;return sP(n)?s=iP(n,r,e):UC(r)?s=Ry(n,r,o,e):s=Tu(n,r,o),e&&e.animations.push(s),s}return t};function lP(){const e=un(()=>({current:null,animations:[]})),t=un(()=>aP(e));return Ty(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class cP{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 uP=()=>new cP;function dP(){return un(uP)}function fP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function hP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:fP(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=Kl(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.
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
72
|
+
*/const Su=Xe("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.
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const Eu=Xe("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.
|
|
@@ -139,7 +139,7 @@
|
|
|
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 Eu=Xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),dh={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},OP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Fy=e=>x.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:dh,exit:dh.false,transition:OP,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:De("aria-hidden:pointer-events-none",e.className),children:e.children}),DP=uo("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"}}),MP=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:De("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Fy,{"data-open":!!s,open:!!s,children:x.jsxs(mo,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:De(DP({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Dy,{size:20}):null,!r&&n==="info"?x.jsx(ky,{size:20}):null,!r&&n==="danger"?x.jsx(RP,{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(Eu,{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 _e(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function bo(e,t){const n=Se(e);return isNaN(t)?_e(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function na(e,t){const n=Se(e);if(isNaN(t))return _e(e,NaN);if(!t)return n;const r=n.getDate(),o=_e(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 jy=6048e5,kP=864e5,FP=6e4,jP=36e5,NP=1e3;let LP={};function xr(){return LP}function dn(e,t){var a,l,c,u;const n=xr(),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 Jr(e){return dn(e,{weekStartsOn:1})}function Ny(e){const t=Se(e),n=t.getFullYear(),r=_e(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Jr(r),s=_e(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Jr(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function eo(e){const t=Se(e);return t.setHours(0,0,0,0),t}function Ti(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 _P(e,t){const n=eo(e),r=eo(t),o=+n-Ti(n),s=+r-Ti(r);return Math.round((o-s)/kP)}function VP(e){const t=Ny(e),n=_e(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Jr(n)}function Ly(e,t){const n=t*7;return bo(e,n)}function _y(e,t){return na(e,t*12)}function $P(e){return _e(e,Date.now())}function BP(e,t){const n=eo(e),r=eo(t);return+n==+r}function HP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Vy(e){if(!HP(e)&&typeof e!="number")return!1;const t=Se(e);return!isNaN(Number(t))}function $y(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 By(e){const t=Se(e);return t.setDate(1),t.setHours(0,0,0,0),t}function WP(e){const t=Se(e),n=_e(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function zP(e,t){var a,l;const n=xr(),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 UP={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"}},GP=(e,t,n)=>{let r;const o=UP[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 qa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const YP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},KP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},XP={date:qa({formats:YP,defaultWidth:"full"}),time:qa({formats:KP,defaultWidth:"full"}),dateTime:qa({formats:qP,defaultWidth:"full"})},QP={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)=>QP[e];function _o(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 JP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tR={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"]},nR={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"]},rR={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"}},oR={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"}},sR=(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"},iR={ordinalNumber:sR,era:_o({values:JP,defaultWidth:"wide"}),quarter:_o({values:eR,defaultWidth:"wide",argumentCallback:e=>e-1}),month:_o({values:tR,defaultWidth:"wide"}),day:_o({values:nR,defaultWidth:"wide"}),dayPeriod:_o({values:rR,defaultWidth:"wide",formattingValues:oR,defaultFormattingWidth:"wide"})};function Vo(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)?lR(a,f=>f.test(i)):aR(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 aR(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function lR(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function cR(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 uR=/^(\d+)(th|st|nd|rd)?/i,fR=/\d+/i,dR={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},hR={any:[/^b/i,/^(a|c)/i]},pR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},mR={any:[/1/i,/2/i,/3/i,/4/i]},gR={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},yR={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]},vR={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},bR={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]},xR={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},wR={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}},TR={ordinalNumber:cR({matchPattern:uR,parsePattern:fR,valueCallback:e=>parseInt(e,10)}),era:Vo({matchPatterns:dR,defaultMatchWidth:"wide",parsePatterns:hR,defaultParseWidth:"any"}),quarter:Vo({matchPatterns:pR,defaultMatchWidth:"wide",parsePatterns:mR,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Vo({matchPatterns:gR,defaultMatchWidth:"wide",parsePatterns:yR,defaultParseWidth:"any"}),day:Vo({matchPatterns:vR,defaultMatchWidth:"wide",parsePatterns:bR,defaultParseWidth:"any"}),dayPeriod:Vo({matchPatterns:xR,defaultMatchWidth:"any",parsePatterns:wR,defaultParseWidth:"any"})},Hy={code:"en-US",formatDistance:GP,formatLong:XP,formatRelative:ZP,localize:iR,match:TR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function SR(e){const t=Se(e);return _P(t,WP(t))+1}function Wy(e){const t=Se(e),n=+Jr(t)-+VP(t);return Math.round(n/jy)+1}function Cu(e,t){var u,f,h,d;const n=Se(e),r=n.getFullYear(),o=xr(),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=_e(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=dn(i,t),l=_e(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=dn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ER(e,t){var a,l,c,u;const n=xr(),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=Cu(e,t),s=_e(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),dn(s,t)}function zy(e,t){const n=Se(e),r=+dn(n,t)-+ER(n,t);return Math.round(r/jy)+1}function Ae(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Rn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ae(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ae(n+1,2)},d(e,t){return Ae(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 Ae(e.getHours()%12||12,t.length)},H(e,t){return Ae(e.getHours(),t.length)},m(e,t){return Ae(e.getMinutes(),t.length)},s(e,t){return Ae(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ae(o,t.length)}},Rr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},hh={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 Rn.y(e,t)},Y:function(e,t,n,r){const o=Cu(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ae(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ae(s,t.length)},R:function(e,t){const n=Ny(e);return Ae(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ae(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 Ae(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 Ae(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 Rn.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 Ae(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=zy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ae(o,t.length)},I:function(e,t,n){const r=Wy(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ae(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Rn.d(e,t)},D:function(e,t,n){const r=SR(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ae(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 Ae(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 Ae(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 Ae(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=Rr.noon:r===0?o=Rr.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=Rr.evening:r>=12?o=Rr.afternoon:r>=4?o=Rr.morning:o=Rr.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 Rn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Rn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ae(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ae(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Rn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Rn.s(e,t)},S:function(e,t){return Rn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return mh(r);case"XXXX":case"XX":return or(r);case"XXXXX":case"XXX":default:return or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return mh(r);case"xxxx":case"xx":return or(r);case"xxxxx":case"xxx":default:return or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ph(r,":");case"OOOO":default:return"GMT"+or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ph(r,":");case"zzzz":default:return"GMT"+or(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Ae(r,t.length)},T:function(e,t,n){const r=e.getTime();return Ae(r,t.length)}};function ph(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+Ae(s,2)}function mh(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):or(e,t)}function or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ae(Math.trunc(r/60),2),s=Ae(r%60,2);return n+o+t+s}const gh=(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"})}},Uy=(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"})}},CR=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return gh(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}}",gh(r,t)).replace("{{time}}",Uy(o,t))},nc={p:Uy,P:CR},PR=/^D+$/,RR=/^Y+$/,IR=["D","DD","YY","YYYY"];function Gy(e){return PR.test(e)}function Yy(e){return RR.test(e)}function rc(e,t,n){const r=AR(e,t,n);if(console.warn(r),IR.includes(e))throw new RangeError(r)}function AR(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 OR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,MR=/^'([^]*?)'?$/,kR=/''/g,FR=/[a-zA-Z]/;function jR(e,t,n){var u,f,h,d;const r=xr(),o=r.locale??Hy,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(!Vy(a))throw new RangeError("Invalid time value");let l=t.match(DR).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=nc[m];return g(p,o.formatLong)}return p}).join("").match(OR).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:NR(p)};if(hh[m])return{isToken:!0,value:p};if(m.match(FR))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;(Yy(m)||Gy(m))&&rc(m,t,String(e));const g=hh[m[0]];return g(a,m,o.localize,c)}).join("")}function NR(e){const t=e.match(MR);return t?t[1].replace(kR,"'"):e}function LR(){return Object.assign({},xr())}function _R(e){let n=Se(e).getDay();return n===0&&(n=7),n}function VR(e,t){const n=Se(e),r=Se(t);return n.getTime()>r.getTime()}function $R(e,t){const n=Se(e),r=Se(t);return+n<+r}function BR(e,t){const n=t instanceof Date?_e(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 HR=10;class Ky{constructor(){te(this,"subPriority",0)}validate(t,n){return!0}}class WR extends Ky{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 zR extends Ky{constructor(){super(...arguments);te(this,"priority",HR);te(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:_e(n,BR(n,Date))}}class Ee{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new WR(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class UR extends Ee{constructor(){super(...arguments);te(this,"priority",140);te(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 tt={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}/},tn={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 nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function ze(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function nn(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*jP+s*FP+i*NP),rest:t.slice(n[0].length)}}function qy(e){return ze(tt.anyDigitsSigned,e)}function qe(e,t){switch(e){case 1:return ze(tt.singleDigit,t);case 2:return ze(tt.twoDigits,t);case 3:return ze(tt.threeDigits,t);case 4:return ze(tt.fourDigits,t);default:return ze(new RegExp("^\\d{1,"+e+"}"),t)}}function Si(e,t){switch(e){case 1:return ze(tt.singleDigitSigned,t);case 2:return ze(tt.twoDigitsSigned,t);case 3:return ze(tt.threeDigitsSigned,t);case 4:return ze(tt.fourDigitsSigned,t);default:return ze(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Pu(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 Xy(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 Qy(e){return e%400===0||e%4===0&&e%100!==0}class GR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(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 nt(qe(4,n),s);case"yo":return nt(o.ordinalNumber(n,{unit:"year"}),s);default:return nt(qe(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=Xy(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 YR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(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 nt(qe(4,n),s);case"Yo":return nt(o.ordinalNumber(n,{unit:"year"}),s);default:return nt(qe(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Cu(n,s);if(o.isTwoDigitYear){const l=Xy(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),dn(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),dn(n,s)}}class KR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Si(r==="R"?4:r.length,n)}set(n,r,o){const s=_e(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Jr(s)}}class qR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Si(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class XR extends Ee{constructor(){super(...arguments);te(this,"priority",120);te(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 qe(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 QR extends Ee{constructor(){super(...arguments);te(this,"priority",120);te(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 qe(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 ZR extends Ee{constructor(){super(...arguments);te(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);te(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return nt(ze(tt.month,n),s);case"MM":return nt(qe(2,n),s);case"Mo":return nt(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 JR extends Ee{constructor(){super(...arguments);te(this,"priority",110);te(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 nt(ze(tt.month,n),s);case"LL":return nt(qe(2,n),s);case"Lo":return nt(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 eI(e,t,n){const r=Se(e),o=zy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class tI extends Ee{constructor(){super(...arguments);te(this,"priority",100);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ze(tt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return dn(eI(n,o,s),s)}}function nI(e,t){const n=Se(e),r=Wy(n)-t;return n.setDate(n.getDate()-r*7),n}class rI extends Ee{constructor(){super(...arguments);te(this,"priority",100);te(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 ze(tt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Jr(nI(n,o))}}const oI=[31,28,31,30,31,30,31,31,30,31,30,31],sI=[31,29,31,30,31,30,31,31,30,31,30,31];class iI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"subPriority",1);te(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ze(tt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=Qy(o),i=n.getMonth();return s?r>=1&&r<=sI[i]:r>=1&&r<=oI[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class aI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"subpriority",1);te(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 ze(tt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear();return Qy(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 Ru(e,t,n){var f,h,d,p;const r=xr(),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 bo(s,u)}class lI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(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=Ru(n,o,s),n.setHours(0,0,0,0),n}}class cI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(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 nt(qe(r.length,n),i);case"eo":return nt(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=Ru(n,o,s),n.setHours(0,0,0,0),n}}class uI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(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 nt(qe(r.length,n),i);case"co":return nt(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=Ru(n,o,s),n.setHours(0,0,0,0),n}}function fI(e,t){const n=Se(e),r=_R(n),o=t-r;return bo(n,o)}class dI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(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 qe(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return nt(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 nt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return nt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return nt(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=fI(n,o),n.setHours(0,0,0,0),n}}class hI extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(Pu(o),0,0,0),n}}class pI extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(Pu(o),0,0,0),n}}class mI extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(Pu(o),0,0,0),n}}class gI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ze(tt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(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 yI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ze(tt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class vI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ze(tt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(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 bI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ze(tt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(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 xI extends Ee{constructor(){super(...arguments);te(this,"priority",60);te(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ze(tt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class wI extends Ee{constructor(){super(...arguments);te(this,"priority",50);te(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ze(tt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class TI extends Ee{constructor(){super(...arguments);te(this,"priority",30);te(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return nt(qe(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class SI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return nn(tn.basicOptionalMinutes,n);case"XX":return nn(tn.basic,n);case"XXXX":return nn(tn.basicOptionalSeconds,n);case"XXXXX":return nn(tn.extendedOptionalSeconds,n);case"XXX":default:return nn(tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-Ti(n)-o)}}class EI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return nn(tn.basicOptionalMinutes,n);case"xx":return nn(tn.basic,n);case"xxxx":return nn(tn.basicOptionalSeconds,n);case"xxxxx":return nn(tn.extendedOptionalSeconds,n);case"xxx":default:return nn(tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-Ti(n)-o)}}class CI extends Ee{constructor(){super(...arguments);te(this,"priority",40);te(this,"incompatibleTokens","*")}parse(n){return qy(n)}set(n,r,o){return[_e(n,o*1e3),{timestampIsSet:!0}]}}class PI extends Ee{constructor(){super(...arguments);te(this,"priority",20);te(this,"incompatibleTokens","*")}parse(n){return qy(n)}set(n,r,o){return[_e(n,o),{timestampIsSet:!0}]}}const RI={G:new UR,y:new GR,Y:new YR,R:new KR,u:new qR,Q:new XR,q:new QR,M:new ZR,L:new JR,w:new tI,I:new rI,d:new iI,D:new aI,E:new lI,e:new cI,c:new uI,i:new dI,a:new hI,b:new pI,B:new mI,h:new gI,H:new yI,K:new vI,k:new bI,m:new xI,s:new wI,S:new TI,X:new SI,x:new EI,t:new CI,T:new PI},II=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,AI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,OI=/^'([^]*?)'?$/,DI=/''/g,MI=/\S/,kI=/[a-zA-Z]/;function FI(e,t,n,r){var m,g,y,b;const o=LR(),s=o.locale??Hy,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):_e(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new zR],u=t.match(AI).map(v=>{const S=v[0];if(S in nc){const T=nc[S];return T(v,s.formatLong)}return v}).join("").match(II),f=[];for(let v of u){Yy(v)&&rc(v,t,e),Gy(v)&&rc(v,t,e);const S=v[0],T=RI[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const I=f.find(M=>E.includes(M.token)||M.token===S);if(I)throw new RangeError(`The format string mustn't contain \`${I.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 R=T.run(e,v,s.match,l);if(!R)return _e(n,NaN);c.push(R.setter),e=R.rest}else{if(S.match(kI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(v==="''"?v="'":S==="'"&&(v=jI(v)),e.indexOf(v)===0)e=e.slice(v.length);else return _e(n,NaN)}}if(e.length>0&&MI.test(e))return _e(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 _e(n,NaN);const p={};for(const v of h){if(!v.validate(d,l))return _e(n,NaN);const S=v.set(d,p,l);Array.isArray(S)?(d=S[0],Object.assign(p,S[1])):d=S}return _e(n,d)}function jI(e){return e.match(OI)[1].replace(DI,"'")}function NI(e,t){const n=Se(e),r=Se(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function LI(e){return BP(e,$P(e))}function _I(e,t){return bo(e,-t)}function Zy(e,t){return na(e,-t)}function VI(e,t){return Ly(e,-t)}function $I(e,t){return _y(e,-t)}var rt=function(){return rt=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},rt.apply(this,arguments)};function Iu(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 oc(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}var ls=function(e){return e.replace(new RegExp(" ","g")," ")},Jy=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)},BI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},ev=function(e,t,n){var r=e.length-2,o=BI(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},tv=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ei=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},HI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Xa=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},WI=function(e){return e==="money"||e==="currency"},zI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return rt(rt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Ws=function(e,t){var n=Jy(tv(e),t.fraction.length),r="".concat(t.currency).concat(ev(n,t.group,t.decimal));return ls(r)},UI=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=Iu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var f=w.useMemo(function(){var p=zI(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=Ws(p.target.value,f),g=Ei(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=Ws(p,f),g=Ei(m);u.current.value=m,u.current.setAttribute("data-number",g.toString());var y=new InputEvent("change",{});l==null||l(rt(rt({},y),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=m.length)}}},[f]);var d=c.defaultValue?Ws(c.defaultValue,f):void 0;return w.createElement("input",rt({},c,{value:typeof c.value=="string"?Ws(c.value,f):c.value,defaultValue:d,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),GI=1,YI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},KI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return rt(rt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},zs=function(e,t){var n=Jy(tv(e),t.fraction.length),r="".concat(ev(n,t.group,t.decimal)," ").concat(t.percentSign);return ls(r)},qI=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=Iu(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=oc(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(zs(b,f))},[i.value]);var f=w.useMemo(function(){var y=KI(r);return y.percentSign=ls("".concat(y.percentSign)),y},[r]),h=c.length-f.percentSign.length-GI,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=zs(y.target.value,f),v=Ei(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=zs(y,f),v=Ei(b);u(b),a.current.value=b,a.current.setAttribute("data-number",v.toString());var S=new InputEvent("change",{});o==null||o(rt(rt({},S),{target:a.current,currentTarget:a.current}))}}},[]),w.useEffect(function(){return d()},[c]);var g=i.defaultValue?zs(i.defaultValue,f):void 0;return w.createElement("input",rt({},i,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:d,onKeyUp:p,ref:a,type:"text"}))}),Ho={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},XI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Ci[s];i===void 0?r.push(s.replace(Ho.dots,"\\.").replace(Ho.openParenthesis,"\\(").replace(Ho.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ho.leadingBars,"\\")},Qo=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return sc(o,n);var s=XI(o);return n?"^".concat(s,"$"):s},QI=function(e){return e.replace(Ho.escape,"\\$&")},sc=function(e,t){var n=e.map(function(r){return typeof r=="string"?QI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ci={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]/}},ZI=/\d/,yh="(dd) 9dddd-dddd",vh="(dd) dddd-dddd",bh="ddd.ddd.ddd-dd",xh="dd.ddd.ddd/dddd-dd",si=function(e){return e.replace(/\D/g,"")},JI=["2",/[0-3]/,":",/[0-5]/,/\d/],eA=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],At={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:bh,isoDate:"dddd-dd-dd",cnpj:xh,telephone:vh,cellphone:yh,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return si(e).length<=11?bh:xh},int:function(e){return e===void 0&&(e=""),ZI.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=si(e);return t.length<11?vh:yh},time:function(e){var t=si(e),n=t[0];return n==="2"?JI:eA}},Ot=function(e,t,n){var r;return n===void 0&&(n={}),rt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Qo(e,"",!0),infinity:n.infinity},n)},Et={cellTelephone:Ot(At.cellTelephone,"tel"),cellphone:Ot(At.cellphone,"tel"),cep:Ot(At.cep,"decimal"),cnpj:Ot(At.cnpj,"decimal"),color:Ot(At.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ot(At.cpf,"decimal"),cpfCnpj:Ot(At.cpfCnpj,"decimal",{transform:si}),creditCard:Ot(At.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ot(At.date,"decimal"),int:Ot(At.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ot(At.isoDate,"decimal"),telephone:Ot(At.telephone,"tel"),time:Ot(At.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ot(At.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function wh(e,t,n,r){var o,s;r===void 0&&(r=Ci);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 Th=function(e){return e},tA=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Qo(e,n,t));return r.test(n)};function nA(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var rA=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=Iu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=Xa(a),g=Xa(f),y=Xa(u),b=w.useRef(tA(u,s,d.value||d.defaultValue)),v=h??"input",S=oc(w.useState(""),2),T=S[0],E=S[1],R=nA(T),I=w.useCallback(function(O,F){var _,H,U=(_=O??F)!==null&&_!==void 0?_:"";if(u===void 0)return U;var D=(H=U==null?void 0:U.toString())!==null&&H!==void 0?H:"";return wh(D,typeof u=="function"?u(D):u,i??Th,c??Ci)},[i,u,c]),M=oc(w.useState(function(){return I(d.value,d.defaultValue)}),2),A=M[0],N=M[1],k=I(d.defaultValue,d.defaultValue),j=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(A);return Array.isArray(O)?sc(O,s):Qo(u,A,s)}return typeof u=="string"?Qo(u,A,s):sc(u,s)},[l,A,s,u]);w.useEffect(function(){if(d.value!==void 0){var O=I(d.value,d.defaultValue);N(O),p.current!==null&&(p.current.value=O)}},[d.value,u,i,d.defaultValue]);var P=function(O){var F,_,H,U,D,$=O.currentTarget,q=O.target.value;if(y.current===void 0)return N(q),(F=g.current)===null||F===void 0||F.call(g,q),(_=m.current)===null||_===void 0||_.call(m,O),f==null?void 0:f(q);var J=new RegExp(Qo(y.current,q,s)),X=(H=$.selectionEnd)!==null&&H!==void 0?H:0,G=function(Y,ee,W){if(Y.type!=="number")return Y.setSelectionRange(ee,W)};if(r&&b.current&&q.length>=A.length)return $.value=A,G($,X-1,X-1);var L=!1;q.length<R.length&&(b.current=!1,L=!0),J.test(q)&&(b.current=!0);var B=X,z=q[B-1],V=wh(q,typeof y.current=="function"?y.current(q):y.current,i??Th,c??Ci);for($.value=V,N(V);B<V.length&&V.charAt(B-1)!==z;)B+=1;L?G($,X,X):G($,B,B),O.target.value=V,E(V),(U=g.current)===null||U===void 0||U.call(g,V),(D=m.current)===null||D===void 0||D.call(m,O)};return w.createElement(v,rt({},d,{ref:p,pattern:j,onChange:P,defaultValue:Sh(d.defaultValue)?k:void 0,value:Sh(d.value)?I(d.value,d.value):d.value}))}),Sh=function(e){return typeof e=="string"},nv=w.forwardRef(function(e,t){return WI(e.mask)?w.createElement(UI,rt({},e,{mask:void 0,ref:t})):YI(e.mask)?w.createElement(qI,rt({},e,{mask:void 0,ref:t})):w.createElement(rA,rt({},e,{ref:t}))}),Dt=function(e){return function(t){return w.createElement(nv,rt({},e,t))}};Dt(Et.cellTelephone);Dt(Et.cellphone);Dt(Et.cep);Dt(Et.cnpj);Dt(Et.color);Dt(Et.cpf);Dt(Et.cpfCnpj);Dt(Et.creditCard);Dt(Et.date);Dt(Et.int);Dt(Et.isoDate);Dt(Et.telephone);Dt(Et.time);Dt(Et.uuid);var rv=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&HI(Et,t.mask)?Et[t.mask]:{mask:t.mask}},[t.mask]),o=rt(rt({},t),r);return w.createElement(nv,rt({},o,{ref:n}))}),Qa={},Za={exports:{}},Ja={};/**
|
|
142
|
+
*/const na=Xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fh={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},OP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Fy=e=>x.jsx(dt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:fh,exit:fh.false,transition:OP,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:ke("aria-hidden:pointer-events-none",e.className),children:e.children}),DP=uo("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"}}),MP=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:ke("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Fy,{"data-open":!!s,open:!!s,children:x.jsxs(mo,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:ke(DP({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Dy,{size:20}):null,!r&&n==="info"?x.jsx(ky,{size:20}):null,!r&&n==="danger"?x.jsx(RP,{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(na,{size:20})}):null]})})})});function Ce(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 Ve(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function bo(e,t){const n=Ce(e);return isNaN(t)?Ve(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ra(e,t){const n=Ce(e);if(isNaN(t))return Ve(e,NaN);if(!t)return n;const r=n.getDate(),o=Ve(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 jy=6048e5,kP=864e5,FP=6e4,jP=36e5,NP=1e3;let LP={};function xr(){return LP}function fn(e,t){var a,l,c,u;const n=xr(),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=Ce(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 Jr(e){return fn(e,{weekStartsOn:1})}function Ny(e){const t=Ce(e),n=t.getFullYear(),r=Ve(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Jr(r),s=Ve(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Jr(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function eo(e){const t=Ce(e);return t.setHours(0,0,0,0),t}function Ti(e){const t=Ce(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 _P(e,t){const n=eo(e),r=eo(t),o=+n-Ti(n),s=+r-Ti(r);return Math.round((o-s)/kP)}function VP(e){const t=Ny(e),n=Ve(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Jr(n)}function Ly(e,t){const n=t*7;return bo(e,n)}function _y(e,t){return ra(e,t*12)}function $P(e){return Ve(e,Date.now())}function BP(e,t){const n=eo(e),r=eo(t);return+n==+r}function HP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Vy(e){if(!HP(e)&&typeof e!="number")return!1;const t=Ce(e);return!isNaN(Number(t))}function $y(e,t){const n=Ce(e.start),r=Ce(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(Ce(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function By(e){const t=Ce(e);return t.setDate(1),t.setHours(0,0,0,0),t}function WP(e){const t=Ce(e),n=Ve(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function zP(e,t){var a,l;const n=xr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Ce(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 UP={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"}},GP=(e,t,n)=>{let r;const o=UP[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 Xa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const YP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},KP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},XP={date:Xa({formats:YP,defaultWidth:"full"}),time:Xa({formats:KP,defaultWidth:"full"}),dateTime:Xa({formats:qP,defaultWidth:"full"})},QP={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)=>QP[e];function _o(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 JP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tR={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"]},nR={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"]},rR={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"}},oR={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"}},sR=(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"},iR={ordinalNumber:sR,era:_o({values:JP,defaultWidth:"wide"}),quarter:_o({values:eR,defaultWidth:"wide",argumentCallback:e=>e-1}),month:_o({values:tR,defaultWidth:"wide"}),day:_o({values:nR,defaultWidth:"wide"}),dayPeriod:_o({values:rR,defaultWidth:"wide",formattingValues:oR,defaultFormattingWidth:"wide"})};function Vo(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)?lR(a,d=>d.test(i)):aR(a,d=>d.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 aR(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function lR(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function cR(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 uR=/^(\d+)(th|st|nd|rd)?/i,dR=/\d+/i,fR={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},hR={any:[/^b/i,/^(a|c)/i]},pR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},mR={any:[/1/i,/2/i,/3/i,/4/i]},gR={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},yR={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]},vR={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},bR={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]},xR={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},wR={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}},TR={ordinalNumber:cR({matchPattern:uR,parsePattern:dR,valueCallback:e=>parseInt(e,10)}),era:Vo({matchPatterns:fR,defaultMatchWidth:"wide",parsePatterns:hR,defaultParseWidth:"any"}),quarter:Vo({matchPatterns:pR,defaultMatchWidth:"wide",parsePatterns:mR,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Vo({matchPatterns:gR,defaultMatchWidth:"wide",parsePatterns:yR,defaultParseWidth:"any"}),day:Vo({matchPatterns:vR,defaultMatchWidth:"wide",parsePatterns:bR,defaultParseWidth:"any"}),dayPeriod:Vo({matchPatterns:xR,defaultMatchWidth:"any",parsePatterns:wR,defaultParseWidth:"any"})},Hy={code:"en-US",formatDistance:GP,formatLong:XP,formatRelative:ZP,localize:iR,match:TR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function SR(e){const t=Ce(e);return _P(t,WP(t))+1}function Wy(e){const t=Ce(e),n=+Jr(t)-+VP(t);return Math.round(n/jy)+1}function Cu(e,t){var u,d,f,h;const n=Ce(e),r=n.getFullYear(),o=xr(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Ve(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=fn(i,t),l=Ve(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=fn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ER(e,t){var a,l,c,u;const n=xr(),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=Cu(e,t),s=Ve(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),fn(s,t)}function zy(e,t){const n=Ce(e),r=+fn(n,t)-+ER(n,t);return Math.round(r/jy)+1}function De(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Rn={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)}},Rr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},hh={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 Rn.y(e,t)},Y:function(e,t,n,r){const o=Cu(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=Ny(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 Rn.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=zy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):De(o,t.length)},I:function(e,t,n){const r=Wy(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"}):Rn.d(e,t)},D:function(e,t,n){const r=SR(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=Rr.noon:r===0?o=Rr.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=Rr.evening:r>=12?o=Rr.afternoon:r>=4?o=Rr.morning:o=Rr.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 Rn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Rn.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"}):Rn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Rn.s(e,t)},S:function(e,t){return Rn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return mh(r);case"XXXX":case"XX":return or(r);case"XXXXX":case"XXX":default:return or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return mh(r);case"xxxx":case"xx":return or(r);case"xxxxx":case"xxx":default:return or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ph(r,":");case"OOOO":default:return"GMT"+or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ph(r,":");case"zzzz":default:return"GMT"+or(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 ph(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 mh(e,t){return e%60===0?(e>0?"-":"+")+De(Math.abs(e)/60,2):or(e,t)}function or(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 gh=(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"})}},Uy=(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"})}},CR=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return gh(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}}",gh(r,t)).replace("{{time}}",Uy(o,t))},rc={p:Uy,P:CR},PR=/^D+$/,RR=/^Y+$/,IR=["D","DD","YY","YYYY"];function Gy(e){return PR.test(e)}function Yy(e){return RR.test(e)}function oc(e,t,n){const r=AR(e,t,n);if(console.warn(r),IR.includes(e))throw new RangeError(r)}function AR(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 OR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,MR=/^'([^]*?)'?$/,kR=/''/g,FR=/[a-zA-Z]/;function jR(e,t,n){var u,d,f,h;const r=xr(),o=r.locale??Hy,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Ce(e);if(!Vy(a))throw new RangeError("Invalid time value");let l=t.match(DR).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=rc[m];return g(p,o.formatLong)}return p}).join("").match(OR).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:NR(p)};if(hh[m])return{isToken:!0,value:p};if(m.match(FR))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;(Yy(m)||Gy(m))&&oc(m,t,String(e));const g=hh[m[0]];return g(a,m,o.localize,c)}).join("")}function NR(e){const t=e.match(MR);return t?t[1].replace(kR,"'"):e}function LR(){return Object.assign({},xr())}function _R(e){let n=Ce(e).getDay();return n===0&&(n=7),n}function VR(e,t){const n=Ce(e),r=Ce(t);return n.getTime()>r.getTime()}function $R(e,t){const n=Ce(e),r=Ce(t);return+n<+r}function BR(e,t){const n=t instanceof Date?Ve(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 HR=10;class Ky{constructor(){ee(this,"subPriority",0)}validate(t,n){return!0}}class WR extends Ky{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 zR extends Ky{constructor(){super(...arguments);ee(this,"priority",HR);ee(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ve(n,BR(n,Date))}}class Pe{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new WR(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class UR extends Pe{constructor(){super(...arguments);ee(this,"priority",140);ee(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 tt={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}/},tn={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 nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function Ge(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function nn(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*jP+s*FP+i*NP),rest:t.slice(n[0].length)}}function qy(e){return Ge(tt.anyDigitsSigned,e)}function qe(e,t){switch(e){case 1:return Ge(tt.singleDigit,t);case 2:return Ge(tt.twoDigits,t);case 3:return Ge(tt.threeDigits,t);case 4:return Ge(tt.fourDigits,t);default:return Ge(new RegExp("^\\d{1,"+e+"}"),t)}}function Si(e,t){switch(e){case 1:return Ge(tt.singleDigitSigned,t);case 2:return Ge(tt.twoDigitsSigned,t);case 3:return Ge(tt.threeDigitsSigned,t);case 4:return Ge(tt.fourDigitsSigned,t);default:return Ge(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Pu(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 Xy(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 Qy(e){return e%400===0||e%4===0&&e%100!==0}class GR extends Pe{constructor(){super(...arguments);ee(this,"priority",130);ee(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 nt(qe(4,n),s);case"yo":return nt(o.ordinalNumber(n,{unit:"year"}),s);default:return nt(qe(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=Xy(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 YR extends Pe{constructor(){super(...arguments);ee(this,"priority",130);ee(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 nt(qe(4,n),s);case"Yo":return nt(o.ordinalNumber(n,{unit:"year"}),s);default:return nt(qe(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Cu(n,s);if(o.isTwoDigitYear){const l=Xy(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),fn(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),fn(n,s)}}class KR extends Pe{constructor(){super(...arguments);ee(this,"priority",130);ee(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Si(r==="R"?4:r.length,n)}set(n,r,o){const s=Ve(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Jr(s)}}class qR extends Pe{constructor(){super(...arguments);ee(this,"priority",130);ee(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Si(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class XR extends Pe{constructor(){super(...arguments);ee(this,"priority",120);ee(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 qe(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 QR extends Pe{constructor(){super(...arguments);ee(this,"priority",120);ee(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 qe(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 ZR extends Pe{constructor(){super(...arguments);ee(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ee(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return nt(Ge(tt.month,n),s);case"MM":return nt(qe(2,n),s);case"Mo":return nt(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 JR extends Pe{constructor(){super(...arguments);ee(this,"priority",110);ee(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 nt(Ge(tt.month,n),s);case"LL":return nt(qe(2,n),s);case"Lo":return nt(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 eI(e,t,n){const r=Ce(e),o=zy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class tI extends Pe{constructor(){super(...arguments);ee(this,"priority",100);ee(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Ge(tt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return fn(eI(n,o,s),s)}}function nI(e,t){const n=Ce(e),r=Wy(n)-t;return n.setDate(n.getDate()-r*7),n}class rI extends Pe{constructor(){super(...arguments);ee(this,"priority",100);ee(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 Ge(tt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Jr(nI(n,o))}}const oI=[31,28,31,30,31,30,31,31,30,31,30,31],sI=[31,29,31,30,31,30,31,31,30,31,30,31];class iI extends Pe{constructor(){super(...arguments);ee(this,"priority",90);ee(this,"subPriority",1);ee(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Ge(tt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=Qy(o),i=n.getMonth();return s?r>=1&&r<=sI[i]:r>=1&&r<=oI[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class aI extends Pe{constructor(){super(...arguments);ee(this,"priority",90);ee(this,"subpriority",1);ee(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 Ge(tt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear();return Qy(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 Ru(e,t,n){var d,f,h,p;const r=xr(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=Ce(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 bo(s,u)}class lI extends Pe{constructor(){super(...arguments);ee(this,"priority",90);ee(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=Ru(n,o,s),n.setHours(0,0,0,0),n}}class cI extends Pe{constructor(){super(...arguments);ee(this,"priority",90);ee(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 nt(qe(r.length,n),i);case"eo":return nt(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=Ru(n,o,s),n.setHours(0,0,0,0),n}}class uI extends Pe{constructor(){super(...arguments);ee(this,"priority",90);ee(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 nt(qe(r.length,n),i);case"co":return nt(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=Ru(n,o,s),n.setHours(0,0,0,0),n}}function dI(e,t){const n=Ce(e),r=_R(n),o=t-r;return bo(n,o)}class fI extends Pe{constructor(){super(...arguments);ee(this,"priority",90);ee(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 qe(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return nt(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 nt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return nt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return nt(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=dI(n,o),n.setHours(0,0,0,0),n}}class hI extends Pe{constructor(){super(...arguments);ee(this,"priority",80);ee(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(Pu(o),0,0,0),n}}class pI extends Pe{constructor(){super(...arguments);ee(this,"priority",80);ee(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(Pu(o),0,0,0),n}}class mI extends Pe{constructor(){super(...arguments);ee(this,"priority",80);ee(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(Pu(o),0,0,0),n}}class gI extends Pe{constructor(){super(...arguments);ee(this,"priority",70);ee(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Ge(tt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(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 yI extends Pe{constructor(){super(...arguments);ee(this,"priority",70);ee(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Ge(tt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class vI extends Pe{constructor(){super(...arguments);ee(this,"priority",70);ee(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Ge(tt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(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 bI extends Pe{constructor(){super(...arguments);ee(this,"priority",70);ee(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Ge(tt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(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 xI extends Pe{constructor(){super(...arguments);ee(this,"priority",60);ee(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Ge(tt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class wI extends Pe{constructor(){super(...arguments);ee(this,"priority",50);ee(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Ge(tt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class TI extends Pe{constructor(){super(...arguments);ee(this,"priority",30);ee(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return nt(qe(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class SI extends Pe{constructor(){super(...arguments);ee(this,"priority",10);ee(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return nn(tn.basicOptionalMinutes,n);case"XX":return nn(tn.basic,n);case"XXXX":return nn(tn.basicOptionalSeconds,n);case"XXXXX":return nn(tn.extendedOptionalSeconds,n);case"XXX":default:return nn(tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ve(n,n.getTime()-Ti(n)-o)}}class EI extends Pe{constructor(){super(...arguments);ee(this,"priority",10);ee(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return nn(tn.basicOptionalMinutes,n);case"xx":return nn(tn.basic,n);case"xxxx":return nn(tn.basicOptionalSeconds,n);case"xxxxx":return nn(tn.extendedOptionalSeconds,n);case"xxx":default:return nn(tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ve(n,n.getTime()-Ti(n)-o)}}class CI extends Pe{constructor(){super(...arguments);ee(this,"priority",40);ee(this,"incompatibleTokens","*")}parse(n){return qy(n)}set(n,r,o){return[Ve(n,o*1e3),{timestampIsSet:!0}]}}class PI extends Pe{constructor(){super(...arguments);ee(this,"priority",20);ee(this,"incompatibleTokens","*")}parse(n){return qy(n)}set(n,r,o){return[Ve(n,o),{timestampIsSet:!0}]}}const RI={G:new UR,y:new GR,Y:new YR,R:new KR,u:new qR,Q:new XR,q:new QR,M:new ZR,L:new JR,w:new tI,I:new rI,d:new iI,D:new aI,E:new lI,e:new cI,c:new uI,i:new fI,a:new hI,b:new pI,B:new mI,h:new gI,H:new yI,K:new vI,k:new bI,m:new xI,s:new wI,S:new TI,X:new SI,x:new EI,t:new CI,T:new PI},II=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,AI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,OI=/^'([^]*?)'?$/,DI=/''/g,MI=/\S/,kI=/[a-zA-Z]/;function FI(e,t,n,r){var m,g,v,b;const o=LR(),s=o.locale??Hy,i=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((b=(v=o.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?Ce(n):Ve(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new zR],u=t.match(AI).map(y=>{const T=y[0];if(T in rc){const S=rc[T];return S(y,s.formatLong)}return y}).join("").match(II),d=[];for(let y of u){Yy(y)&&oc(y,t,e),Gy(y)&&oc(y,t,e);const T=y[0],S=RI[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const I=d.find(k=>E.includes(k.token)||k.token===T);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${y}\` at the same time`)}else if(S.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);d.push({token:T,fullToken:y});const R=S.run(e,y,s.match,l);if(!R)return Ve(n,NaN);c.push(R.setter),e=R.rest}else{if(T.match(kI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(y==="''"?y="'":T==="'"&&(y=jI(y)),e.indexOf(y)===0)e=e.slice(y.length);else return Ve(n,NaN)}}if(e.length>0&&MI.test(e))return Ve(n,NaN);const f=c.map(y=>y.priority).sort((y,T)=>T-y).filter((y,T,S)=>S.indexOf(y)===T).map(y=>c.filter(T=>T.priority===y).sort((T,S)=>S.subPriority-T.subPriority)).map(y=>y[0]);let h=Ce(n);if(isNaN(h.getTime()))return Ve(n,NaN);const p={};for(const y of f){if(!y.validate(h,l))return Ve(n,NaN);const T=y.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return Ve(n,h)}function jI(e){return e.match(OI)[1].replace(DI,"'")}function NI(e,t){const n=Ce(e),r=Ce(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function LI(e){return BP(e,$P(e))}function _I(e,t){return bo(e,-t)}function Zy(e,t){return ra(e,-t)}function VI(e,t){return Ly(e,-t)}function $I(e,t){return _y(e,-t)}var rt=function(){return rt=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},rt.apply(this,arguments)};function Iu(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 sc(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}var ls=function(e){return e.replace(new RegExp(" ","g")," ")},Jy=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)},BI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},ev=function(e,t,n){var r=e.length-2,o=BI(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},tv=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ei=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},HI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Qa=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},WI=function(e){return e==="money"||e==="currency"},zI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return rt(rt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Ws=function(e,t){var n=Jy(tv(e),t.fraction.length),r="".concat(t.currency).concat(ev(n,t.group,t.decimal));return ls(r)},UI=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=Iu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var d=w.useMemo(function(){var p=zI(r,s,a);return p.currency=ls("".concat(p.currency.trim()," ")),p.literal=ls(p.literal.trim()),p},[r,s]),f=function(p){var m=Ws(p.target.value,d),g=Ei(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=Ws(p,d),g=Ei(m);u.current.value=m,u.current.setAttribute("data-number",g.toString());var v=new InputEvent("change",{});l==null||l(rt(rt({},v),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?Ws(c.defaultValue,d):void 0;return w.createElement("input",rt({},c,{value:typeof c.value=="string"?Ws(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),GI=1,YI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},KI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return rt(rt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},zs=function(e,t){var n=Jy(tv(e),t.fraction.length),r="".concat(ev(n,t.group,t.decimal)," ").concat(t.percentSign);return ls(r)},qI=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=Iu(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=sc(w.useState(function(){var v,b;return(b=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var v,b=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(zs(b,d))},[i.value]);var d=w.useMemo(function(){var v=KI(r);return v.percentSign=ls("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-GI,h=function(v){var b,y=a.current;y&&(y.setSelectionRange(f,f),v&&((b=i.onFocus)===null||b===void 0||b.call(i,v)))},p=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var y=b.selectionStart,T=b.selectionEnd,S=y!==T,E=f<y;!S&&E&&h()}s==null||s(v)},m=function(v){var b=zs(v.target.value,d),y=Ei(b);u(b),v.target.value=b,v.target.setAttribute("data-number",y.toString()),o==null||o(v)};w.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var b=zs(v,d),y=Ei(b);u(b),a.current.value=b,a.current.setAttribute("data-number",y.toString());var T=new InputEvent("change",{});o==null||o(rt(rt({},T),{target:a.current,currentTarget:a.current}))}}},[]),w.useEffect(function(){return h()},[c]);var g=i.defaultValue?zs(i.defaultValue,d):void 0;return w.createElement("input",rt({},i,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Ho={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},XI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Ci[s];i===void 0?r.push(s.replace(Ho.dots,"\\.").replace(Ho.openParenthesis,"\\(").replace(Ho.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ho.leadingBars,"\\")},Qo=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return ic(o,n);var s=XI(o);return n?"^".concat(s,"$"):s},QI=function(e){return e.replace(Ho.escape,"\\$&")},ic=function(e,t){var n=e.map(function(r){return typeof r=="string"?QI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ci={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]/}},ZI=/\d/,yh="(dd) 9dddd-dddd",vh="(dd) dddd-dddd",bh="ddd.ddd.ddd-dd",xh="dd.ddd.ddd/dddd-dd",si=function(e){return e.replace(/\D/g,"")},JI=["2",/[0-3]/,":",/[0-5]/,/\d/],eA=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],At={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:bh,isoDate:"dddd-dd-dd",cnpj:xh,telephone:vh,cellphone:yh,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return si(e).length<=11?bh:xh},int:function(e){return e===void 0&&(e=""),ZI.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=si(e);return t.length<11?vh:yh},time:function(e){var t=si(e),n=t[0];return n==="2"?JI:eA}},Ot=function(e,t,n){var r;return n===void 0&&(n={}),rt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Qo(e,"",!0),infinity:n.infinity},n)},Et={cellTelephone:Ot(At.cellTelephone,"tel"),cellphone:Ot(At.cellphone,"tel"),cep:Ot(At.cep,"decimal"),cnpj:Ot(At.cnpj,"decimal"),color:Ot(At.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ot(At.cpf,"decimal"),cpfCnpj:Ot(At.cpfCnpj,"decimal",{transform:si}),creditCard:Ot(At.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ot(At.date,"decimal"),int:Ot(At.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ot(At.isoDate,"decimal"),telephone:Ot(At.telephone,"tel"),time:Ot(At.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ot(At.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function wh(e,t,n,r){var o,s;r===void 0&&(r=Ci);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var Th=function(e){return e},tA=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Qo(e,n,t));return r.test(n)};function nA(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var rA=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,d=e.onChangeText,f=e.as,h=Iu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=Qa(a),g=Qa(d),v=Qa(u),b=w.useRef(tA(u,s,h.value||h.defaultValue)),y=f??"input",T=sc(w.useState(""),2),S=T[0],E=T[1],R=nA(S),I=w.useCallback(function(O,F){var V,H,z=(V=O??F)!==null&&V!==void 0?V:"";if(u===void 0)return z;var D=(H=z==null?void 0:z.toString())!==null&&H!==void 0?H:"";return wh(D,typeof u=="function"?u(D):u,i??Th,c??Ci)},[i,u,c]),k=sc(w.useState(function(){return I(h.value,h.defaultValue)}),2),A=k[0],N=k[1],M=I(h.defaultValue,h.defaultValue),j=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(A);return Array.isArray(O)?ic(O,s):Qo(u,A,s)}return typeof u=="string"?Qo(u,A,s):ic(u,s)},[l,A,s,u]);w.useEffect(function(){if(h.value!==void 0){var O=I(h.value,h.defaultValue);N(O),p.current!==null&&(p.current.value=O)}},[h.value,u,i,h.defaultValue]);var P=function(O){var F,V,H,z,D,$=O.currentTarget,K=O.target.value;if(v.current===void 0)return N(K),(F=g.current)===null||F===void 0||F.call(g,K),(V=m.current)===null||V===void 0||V.call(m,O),d==null?void 0:d(K);var J=new RegExp(Qo(v.current,K,s)),X=(H=$.selectionEnd)!==null&&H!==void 0?H:0,G=function(q,te,_){if(q.type!=="number")return q.setSelectionRange(te,_)};if(r&&b.current&&K.length>=A.length)return $.value=A,G($,X-1,X-1);var L=!1;K.length<R.length&&(b.current=!1,L=!0),J.test(K)&&(b.current=!0);var B=X,W=K[B-1],U=wh(K,typeof v.current=="function"?v.current(K):v.current,i??Th,c??Ci);for($.value=U,N(U);B<U.length&&U.charAt(B-1)!==W;)B+=1;L?G($,X,X):G($,B,B),O.target.value=U,E(U),(z=g.current)===null||z===void 0||z.call(g,U),(D=m.current)===null||D===void 0||D.call(m,O)};return w.createElement(y,rt({},h,{ref:p,pattern:j,onChange:P,defaultValue:Sh(h.defaultValue)?M:void 0,value:Sh(h.value)?I(h.value,h.value):h.value}))}),Sh=function(e){return typeof e=="string"},nv=w.forwardRef(function(e,t){return WI(e.mask)?w.createElement(UI,rt({},e,{mask:void 0,ref:t})):YI(e.mask)?w.createElement(qI,rt({},e,{mask:void 0,ref:t})):w.createElement(rA,rt({},e,{ref:t}))}),Dt=function(e){return function(t){return w.createElement(nv,rt({},e,t))}};Dt(Et.cellTelephone);Dt(Et.cellphone);Dt(Et.cep);Dt(Et.cnpj);Dt(Et.color);Dt(Et.cpf);Dt(Et.cpfCnpj);Dt(Et.creditCard);Dt(Et.date);Dt(Et.int);Dt(Et.isoDate);Dt(Et.telephone);Dt(Et.time);Dt(Et.uuid);var rv=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&HI(Et,t.mask)?Et[t.mask]:{mask:t.mask}},[t.mask]),o=rt(rt({},t),r);return w.createElement(nv,rt({},o,{ref:n}))}),Za={},Ja={exports:{}},el={};/**
|
|
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 Eh;function oA(){if(Eh)return
|
|
150
|
+
*/var Eh;function oA(){if(Eh)return el;Eh=1;var e=w;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,g=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&g({inst:m})},[d,h,f]),o(function(){return l(m)&&g({inst:m}),d(function(){l(m)&&g({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return el.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,el}var Ch={};/**
|
|
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 Ph;function sA(){return Ph||(Ph=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(
|
|
158
|
+
*/var Ph;function sA(){return Ph||(Ph=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(y){{for(var T=arguments.length,S=new Array(T>1?T-1:0),E=1;E<T;E++)S[E-1]=arguments[E];r("error",y,S)}}function r(y,T,S){{var E=t.ReactDebugCurrentFrame,R=E.getStackAddendum();R!==""&&(T+="%s",S=S.concat([R]));var I=S.map(function(k){return String(k)});I.unshift("Warning: "+T),Function.prototype.apply.call(console[y],console,I)}}function o(y,T){return y===T&&(y!==0||1/y===1/T)||y!==y&&T!==T}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(y,T,S){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=T();if(!d){var R=T();s(E,R)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var I=i({inst:{value:E,getSnapshot:T}}),k=I[0].inst,A=I[1];return l(function(){k.value=E,k.getSnapshot=T,h(k)&&A({inst:k})},[y,E,T]),a(function(){h(k)&&A({inst:k});var N=function(){h(k)&&A({inst:k})};return y(N)},[y]),c(E),E}function h(y){var T=y.getSnapshot,S=y.value;try{var E=T();return!s(S,E)}catch{return!0}}function p(y,T,S){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,v=g?p:f,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;Ch.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ch}var Rh;function ov(){return Rh||(Rh=1,process.env.NODE_ENV==="production"?Ja.exports=oA():Ja.exports=sA()),Ja.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 Ih;function iA(){if(Ih)return
|
|
166
|
+
*/var Ih;function iA(){if(Ih)return Za;Ih=1;var e=w,t=ov();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 Za.useSyncExternalStoreWithSelector=function(c,u,d,f,h){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 v(E){if(!b){if(b=!0,y=E,E=f(E),h!==void 0&&m.hasValue){var R=m.value;if(h(R,E))return T=R}return T=E}if(R=T,r(y,E))return R;var I=f(E);return h!==void 0&&h(R,I)?R:(y=E,T=I)}var b=!1,y,T,S=d===void 0?null:d;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,d,f,h]);var g=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Za}var Ah={};/**
|
|
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 Oh;function aA(){return Oh||(Oh=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=ov();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,R,I=function(k){if(!T){T=!0,E=k;var j=d(k);if(p!==void 0&&g.hasValue){var P=g.value;if(p(P,j))return R=P,P}return R=j,j}var O=E,F=R;if(r(O,k))return F;var _=d(k);return p!==void 0&&p(F,_)?F:(E=k,R=_,_)},M=h===void 0?null:h,A=function(){return I(f())},N=M===null?void 0:function(){return I(M())};return[A,N]},[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}Ah.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ah}process.env.NODE_ENV==="production"?iA():aA();const Ir=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},lA=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},cA=e=>Object.entries(e),sv=e=>e instanceof Promise,iv=(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),uA=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,f)=>n(h=>iv(u,h,s,f));return sv(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))},fA=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>iv(c,u,s,o.current));return sv(a)?a.then(c=>l(c)):l(a)},Au=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=Ir(r),i=Ir((n==null?void 0:n.props)??{}),a=Ir(t),l=Ir((n==null?void 0:n.postMiddleware)??[]),c=Ir((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),f=lA(r),h=Ir(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 cA(g).reduce((y,[b,v])=>({...y,[b]:n!=null&&n.debug?uA(b,v,o,m,d,c.current):fA(b,v,o,m,d,c.current)}),{})});return[r,p,i.current]},dA=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function hA(e,t){return w.useRef(dA(e,t)).current}const ra={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>)`},Nr=(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(Nr(i,t,n,a))},[]),av=(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]:av(i,t,n,a)}},{}),Dh={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ic=(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)},pA={default:e=>ic(e,{result:Dh.default}),dark:e=>ic(e,{result:Dh.dark})},mA=(e,t)=>{const n=(a,l,c)=>({key:`--${c}`,value:`${a}`}),r=Nr(e.colors,n),o=Nr(e.spacing,n),s=Nr(e.rounded,n),i=e.custom?Nr(e.custom,n):[];return ic(r.concat(o,s,i),{result:a=>`html${t?`.${t}`:""} {${a}}`,value:(a,l)=>l.replace("hsla(","").replace(")","")})},lv={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},cv={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"},gA={name:"dark",rounded:lv,spacing:cv,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%)"}}}},yA={name:"light",rounded:lv,spacing:cv,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%)"}}}},vA=gA,bA=yA,Ou={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"},oa=w.createContext({colorTokenParser:ra.hsla,translations:Ou,locale:void 0}),xA=e=>{const t=w.useMemo(()=>({locale:e.locale,translations:{...Ou,...e.map},colorTokenParser:e.parser||ra.hsla}),[e]);return x.jsx(oa.Provider,{value:t,children:e.children})},uv=()=>{const e=w.useContext(oa);if(e)return e.locale},Ct=()=>{const e=w.useContext(oa);return e?e.translations:Ou},wA=()=>{const e=w.useContext(oa);return e?e.colorTokenParser:ra.hsla},Bt=(e,t=2)=>e.toString(16).padStart(t,"0"),Ps=()=>{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,`${Bt(t,4)+Bt(n,3)}-${Bt(r[0])+Bt(r[1])}-${Bt(r[2])+Bt(r[3])}-${Bt(r[4])+Bt(r[5])}-${Bt(r[6])+Bt(r[7])+Bt(r[8])+Bt(r[9])}`},Mh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),kh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Du=(e,t)=>{const n=Mh(t,kh.basic,e)||Mh(t,kh.extend,e);return n===void 0||n===e?void 0:n},Pi=()=>typeof window>"u",ac=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),fv=(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},TA={type:"spring",bounce:.3,duration:.6},Fh=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),dv={middle:{x:"0%",opacity:1},enter:Fh(1),exit:Fh(-1)},jh={exit:{visibility:"hidden"}},SA=e=>{const t=dn(By(e));return $y({start:t,end:bo(t,41)})},hv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),EA=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=By(new Date(1970,o,1).setMonth(o)),i=hv(s,n);return x.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),el={ArrowLeft:(e,t)=>t==="days"?_I(e,1):Zy(e,1),ArrowRight:(e,t)=>t==="days"?bo(e,1):na(e,1),ArrowUp:(e,t)=>t==="days"?VI(e,1):$I(e,1),ArrowDown:(e,t)=>t==="days"?Ly(e,1):_y(e,1)},Nh=(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)},er=e=>e.getFullYear().toString().padStart(4,"0"),CA=(e,t,n)=>e===void 0||n===void 0?!1:VR(t,e)&&$R(t,n),PA=e=>{var n;const t=Ct();return x.jsx(ft.tbody,{layout:!0,variants:dv,custom:e.direction,onKeyDown:e.onKeyDown,className:De((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,R,I,M,A;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=LI(i)&&e.markToday,u=((b=e.disabledDate)==null?void 0:b.call(e,i))||!1,f=!NI(i,e.stateDate)||u,h=e.rangeMode?CA((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:De("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:De(`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&&((R=e.stateRange.from)==null?void 0:R.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:((I=e.labelRange)==null?void 0:I.from)??t.calendarFromDate})}):null,l&&((M=e.stateRange.to)==null?void 0:M.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.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},pv=({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(Ps()),p=Ct(),m=w.useRef(null),{date:g,range:y}=h,b=g||new Date,v=w.useRef(null),[S,T]=Au({date:b,isAnimating:!1,year:er(b),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:EA(d.current,b,o),selectMode:l?"from":void 0,week:$y({start:dn(b),end:zP(b)})},N=>({onChangeYear:k=>({year:k}),setToday:()=>({date:eo(new Date)}),onExitComplete:()=>(Nh(v.current||null,m,N.state().date,200),v.current=null,{isAnimating:!1}),date:k=>{const j=k(N.state().date);return{date:j,year:er(j)}},nextMonth:k=>{v.current=k.currentTarget;const j=N.state();if(j.isAnimating)return j;const P=na(j.date,1);return{date:P,isAnimating:!0,direction:1,year:er(P)}},previousMonth:k=>{v.current=k.currentTarget;const j=N.state();if(j.isAnimating)return j;const P=Zy(j.date,1);return{date:P,isAnimating:!0,direction:-1,year:er(P)}},onSelectDate:k=>{const j=N.state(),P=k.currentTarget.dataset.range==="true",O=k.currentTarget.dataset.date||"",F=new Date(O);return{date:F,year:er(F),selectMode:j.selectMode===void 0?void 0:j.selectMode==="from"?"to":"from",range:P?{from:j.selectMode==="from"?F:j.range.from,to:j.selectMode==="to"?F:j.range.to}:j.range}},onChangeMonth:k=>{const j=k.target.value,O=Array.from(k.target.options).find(_=>_.value===j),F=N.state();if(O){const _=O.dataset.index||"",H=new Date(N.state().date);return H.setMonth(+_),{...F,date:H,year:er(H)}}return F},onKeyDown:k=>{const j=k.key,P=N.state();if(j in el){(j==="ArrowUp"||j==="ArrowDown")&&k.preventDefault();const O=N.state().date,F=bn.keyof(el,j)?el[j](O,k.shiftKey?"month":"days"):null;if(F!==null)return Nh(k.target,m,F),{...P,date:F,year:er(F)}}return N.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(N,k,j)=>{var O,F;return(j.method==="onChangeMonth"||j.method==="previousMonth"||j.method==="nextMonth")&&((F=(O=j.props).onChangeMonth)==null||F.call(O,N.date)),N},(N,k,j)=>{var O,F;return j.method==="onChangeYear"&&((F=(O=j.props).onChangeYear)==null||F.call(O,N.date)),N},(N,k,j)=>{const P=j.method==="onSelectDate"||j.method==="setToday"||j.method==="onKeyDown";return l&&P&&t?(c==null||c(N.range),N):(P&&t&&(c==null||c(N.date)),N)}]}),E=fv(SA(S.date),7),R=S.date.toISOString(),I=hv(S.date,o);w.useEffect(()=>{t||c==null||c(S.date)},[R]);const M=hA(N=>{T.date(k=>{const j=new Date(k);return j.setFullYear(+N),j})},1200),A=N=>{const k=N.currentTarget.value;T.onChangeYear(k),a==null||a(new Date(k)),M(k)};return x.jsx(IC,{transition:TA,children:x.jsxs("div",{"data-component":"calendar",ref:m,className:De("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(vo,{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:jh,onClick:T.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(wP,{className:"h-4 w-4"})}),x.jsx(ft.span,{layout:!0,variants:dv,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:`${I.length}ch`},value:I,onChange:T.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:S.months}),x.jsx(rv,{mask:"int",value:S.year,maxLength:4,placeholder:"YYYY",onChange:A,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:jh,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:T.nextMonth,children:x.jsx(Tu,{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(N=>x.jsx("th",{className:De("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:N.toLocaleDateString(o,{weekday:"short"})},N.toString()))})}),x.jsx(PA,{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})]})]},I)})}),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})})]})})},mv=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>x.jsxs(mo,{...a,as:r,"data-componen":"card",className:De("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:De("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:De("min-w-full px-8",i),children:e})]}),gv=e=>{const t=e.Icon??My,n=Ct();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 kt(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 RA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yv(...e){return t=>e.forEach(n=>RA(n,t))}function gr(...e){return C.useCallback(yv(...e),e)}function vv(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,IA(o,...t)]}function IA(...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(OA);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(lc,{...r,ref:t,children:C.isValidElement(i)?C.cloneElement(i,void 0,a):null})}return x.jsx(lc,{...r,ref:t,children:n})});to.displayName="Slot";var lc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=MA(n);return C.cloneElement(n,{...DA(r,n.props),ref:t?yv(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});lc.displayName="SlotClone";var AA=({children:e})=>x.jsx(x.Fragment,{children:e});function OA(e){return C.isValidElement(e)&&e.type===AA}function DA(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 MA(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 kA(e){const t=e+"CollectionProvider",[n,r]=vv(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=gr(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=gr(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 FA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],mn=FA.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 bv(e,t){e&&vs.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 jA(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 NA="DismissableLayer",cc="dismissableLayer.update",LA="dismissableLayer.pointerDownOutside",_A="dismissableLayer.focusOutside",Lh,xv=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wv=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=C.useContext(xv),[u,f]=C.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),p=gr(t,R=>f(R)),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=$A(R=>{const I=R.target,M=[...c.branches].some(A=>A.contains(I));!S||M||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},h),E=BA(R=>{const I=R.target;[...c.branches].some(A=>A.contains(I))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},h);return jA(R=>{b===c.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},h),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Lh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),_h(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Lh)}},[u,h,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),_h())},[u,c]),C.useEffect(()=>{const R=()=>d({});return document.addEventListener(cc,R),()=>document.removeEventListener(cc,R)},[]),x.jsx(mn.div,{...l,ref:p,style:{pointerEvents:v?S?"auto":"none":void 0,...e.style},onFocusCapture:kt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:kt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:kt(e.onPointerDownCapture,T.onPointerDownCapture)})});wv.displayName=NA;var VA="DismissableLayerBranch",Tv=C.forwardRef((e,t)=>{const n=C.useContext(xv),r=C.useRef(null),o=gr(t,r);return C.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(mn.div,{...e,ref:o})});Tv.displayName=VA;function $A(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(){Sv(LA,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 BA(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&&Sv(_A,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 _h(){const e=new CustomEvent(cc);document.dispatchEvent(e)}function Sv(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?bv(o,s):o.dispatchEvent(s)}var HA=wv,WA=Tv,Ri=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},zA="Portal",Ev=C.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=C.useState(!1);Ri(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?_c.createPortal(x.jsx(mn.div,{...r,ref:t}),i):null});Ev.displayName=zA;function UA(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var Cv=e=>{const{present:t,children:n}=e,r=GA(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),s=gr(r.ref,YA(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:s}):null};Cv.displayName="Presence";function GA(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),s=C.useRef("none"),i=e?"mounted":"unmounted",[a,l]=UA(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Us(r.current);s.current=a==="mounted"?c:"none"},[a]),Ri(()=>{const c=r.current,u=o.current;if(u!==e){const h=s.current,d=Us(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]),Ri(()=>{if(t){const c=f=>{const d=Us(r.current).includes(f.animationName);f.target===t&&d&&vs.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(s.current=Us(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 Us(e){return(e==null?void 0:e.animationName)||"none"}function YA(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 KA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=qA({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 qA({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 XA="VisuallyHidden",Mu=C.forwardRef((e,t)=>x.jsx(mn.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}}));Mu.displayName=XA;var ku="ToastProvider",[Fu,QA,ZA]=kA("Toast"),[Pv,LL]=vv("Toast",[ZA]),[JA,sa]=Pv(ku),Rv=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 \`${ku}\`. Expected non-empty \`string\`.`),x.jsx(Fu.Provider,{scope:t,children:x.jsx(JA,{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})})};Rv.displayName=ku;var Iv="ToastViewport",eO=["F8"],uc="toast.viewportPause",fc="toast.viewportResume",Av=C.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=eO,label:o="Notifications ({hotkey})",...s}=e,i=sa(Iv,n),a=QA(n),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=gr(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(uc);y.dispatchEvent(E),i.isClosePausedRef.current=!0}},v=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(fc);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,...pO(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,R;const v=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!v){const I=document.activeElement,M=b.shiftKey;if(b.target===g&&M){(T=c.current)==null||T.focus();return}const k=m({tabbingDirection:M?"backwards":"forwards"}),j=k.findIndex(P=>P===I);tl(k.slice(j+1))?b.preventDefault():M?(E=c.current)==null||E.focus():(R=u.current)==null||R.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[a,m]),x.jsxs(WA,{ref:l,role:"region","aria-label":o.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&x.jsx(dc,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});tl(g)}}),x.jsx(Fu.Slot,{scope:n,children:x.jsx(mn.ol,{tabIndex:-1,...s,ref:h})}),p&&x.jsx(dc,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});tl(g)}})]})});Av.displayName=Iv;var Ov="ToastFocusProxy",dc=C.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=sa(Ov,n);return x.jsx(Mu,{"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()}})});dc.displayName=Ov;var ia="Toast",tO="toast.swipeStart",nO="toast.swipeMove",rO="toast.swipeCancel",oO="toast.swipeEnd",Dv=C.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=KA({prop:r,defaultProp:o,onChange:s});return x.jsx(Cv,{present:n||a,children:x.jsx(aO,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Tn(e.onPause),onResume:Tn(e.onResume),onSwipeStart:kt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:kt(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:kt(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:kt(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)})})})});Dv.displayName=ia;var[sO,iO]=Pv(ia,{onClose(){}}),aO=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=sa(ia,n),[g,y]=C.useState(null),b=gr(t,P=>y(P)),v=C.useRef(null),S=C.useRef(null),T=o||m.duration,E=C.useRef(0),R=C.useRef(T),I=C.useRef(0),{onToastAdd:M,onToastRemove:A}=m,N=Tn(()=>{var O;(g==null?void 0:g.contains(document.activeElement))&&((O=m.viewport)==null||O.focus()),i()}),k=C.useCallback(P=>{!P||P===1/0||(window.clearTimeout(I.current),E.current=new Date().getTime(),I.current=window.setTimeout(N,P))},[N]);C.useEffect(()=>{const P=m.viewport;if(P){const O=()=>{k(R.current),c==null||c()},F=()=>{const _=new Date().getTime()-E.current;R.current=R.current-_,window.clearTimeout(I.current),l==null||l()};return P.addEventListener(uc,F),P.addEventListener(fc,O),()=>{P.removeEventListener(uc,F),P.removeEventListener(fc,O)}}},[m.viewport,T,l,c,k]),C.useEffect(()=>{s&&!m.isClosePausedRef.current&&k(T)},[s,T,m.isClosePausedRef,k]),C.useEffect(()=>(M(),()=>A()),[M,A]);const j=C.useMemo(()=>g?Lv(g):null,[g]);return m.viewport?x.jsxs(x.Fragment,{children:[j&&x.jsx(lO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:j}),x.jsx(sO,{scope:n,onClose:N,children:vs.createPortal(x.jsx(Fu.ItemSlot,{scope:n,children:x.jsx(HA,{asChild:!0,onEscapeKeyDown:kt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||N(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(mn.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:kt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:kt(e.onPointerDown,P=>{P.button===0&&(v.current={x:P.clientX,y:P.clientY})}),onPointerMove:kt(e.onPointerMove,P=>{if(!v.current)return;const O=P.clientX-v.current.x,F=P.clientY-v.current.y,_=!!S.current,H=["left","right"].includes(m.swipeDirection),U=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=H?U(0,O):0,$=H?0:U(0,F),q=P.pointerType==="touch"?10:2,J={x:D,y:$},X={originalEvent:P,delta:J};_?(S.current=J,Gs(nO,f,X,{discrete:!1})):Vh(J,m.swipeDirection,q)?(S.current=J,Gs(tO,u,X,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(O)>q||Math.abs(F)>q)&&(v.current=null)}),onPointerUp:kt(e.onPointerUp,P=>{const O=S.current,F=P.target;if(F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),S.current=null,v.current=null,O){const _=P.currentTarget,H={originalEvent:P,delta:O};Vh(O,m.swipeDirection,m.swipeThreshold)?Gs(oO,d,H,{discrete:!0}):Gs(rO,h,H,{discrete:!0}),_.addEventListener("click",U=>U.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),lO=e=>{const{__scopeToast:t,children:n,...r}=e,o=sa(ia,t),[s,i]=C.useState(!1),[a,l]=C.useState(!1);return dO(()=>i(!0)),C.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(Ev,{asChild:!0,children:x.jsx(Mu,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},cO="ToastTitle",Mv=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(mn.div,{...r,ref:t})});Mv.displayName=cO;var uO="ToastDescription",kv=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(mn.div,{...r,ref:t})});kv.displayName=uO;var Fv="ToastAction",fO=C.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(Nv,{altText:n,asChild:!0,children:x.jsx(ju,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Fv}\`. Expected non-empty \`string\`.`),null)});fO.displayName=Fv;var jv="ToastClose",ju=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=iO(jv,n);return x.jsx(Nv,{asChild:!0,children:x.jsx(mn.button,{type:"button",...r,ref:t,onClick:kt(e.onClick,o.onClose)})})});ju.displayName=jv;var Nv=C.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(mn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Lv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),hO(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(...Lv(r))}}),t}function Gs(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?bv(o,s):o.dispatchEvent(s)}var Vh=(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 dO(e=()=>{}){const t=Tn(e);Ri(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function hO(e){return e.nodeType===e.ELEMENT_NODE}function pO(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 tl(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var mO=Rv,gO=Av,yO=Dv,vO=Mv,bO=kv,xO=ju;const wO=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},TO=uo("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"}}),_v=w.createContext(()=>{throw new Error("Not implemented")}),SO=()=>w.useContext(_v),$h={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]}},EO=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=TO({theme:t.theme||"default"});return x.jsx(yO,{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:$h[t.reversedIndex]||$h.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(vO,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(bO,{className:"select-text truncate",children:t.text})]}),r?x.jsx(xO,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(Eu,{className:"h-5 w-5"})}):null]})})})});function CO({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=wO(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(mO,{duration:n,swipeThreshold:150,children:[x.jsx(_v.Provider,{value:l,children:e}),x.jsx(vo,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,f)=>{const h=()=>i(d=>d.filter(p=>p.id!==c.id));return w.createElement(EO,{...c,key:c.id,hover:o,index:u,onClose:h,isLast:f.length-1===u,reversedIndex:f.length-(u+1)})})}),x.jsx(gO,{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 PO=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:De("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]}),Vv=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},$v=w.createContext(""),RO=e=>{const[t,n]=Vv(e.active),r=mr(0),o=mr(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=Bm(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($v.Provider,{value:t,children:x.jsx(mv,{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})})},IO=()=>w.useContext($v),AO=e=>{const t=IO();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function Gn(e){return Bv(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function En(e){var t;return(t=(Bv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bv(e){return e instanceof Node||e instanceof Rt(e).Node}function Me(e){return e instanceof Element||e instanceof Rt(e).Element}function et(e){return e instanceof HTMLElement||e instanceof Rt(e).HTMLElement}function hc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}function Rs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function OO(e){return["table","td","th"].includes(Gn(e))}function aa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Nu(e){const t=Lu(),n=Me(e)?Vt(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 DO(e){let t=Sn(e);for(;et(t)&&!Vn(t);){if(Nu(t))return t;if(aa(t))return null;t=Sn(t)}return null}function Lu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vn(e){return["html","body","#document"].includes(Gn(e))}function Vt(e){return Rt(e).getComputedStyle(e)}function la(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sn(e){if(Gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hc(e)&&e.host||En(e);return hc(t)?t.host:t}function Hv(e){const t=Sn(e);return Vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&Rs(t)?t:Hv(t)}function jn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Hv(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Rt(o);if(s){const a=pc(i);return t.concat(i,i.visualViewport||[],Rs(o)?o:[],a&&n?jn(a):[])}return t.concat(o,jn(o,[],n))}function pc(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 Ye(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&hc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function _u(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Wv(){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 zv(e){return e.mozInputSource===0&&e.isTrusted?!0:mc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Vu(e){return MO()?!1:!mc()&&e.width===0&&e.height===0||mc()&&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 $u(){return/apple/i.test(navigator.vendor)}function mc(){const e=/android/i;return e.test(_u())||e.test(Wv())}function Uv(){return _u().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function MO(){return Wv().includes("jsdom/")}function no(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function kO(e){return"nativeEvent"in e}function FO(e){return e.matches("html,body")}function ut(e){return(e==null?void 0:e.ownerDocument)||document}function nl(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 rn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const jO="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Bu(e){return et(e)&&e.matches(jO)}function mt(e){e.preventDefault(),e.stopPropagation()}function Gv(e){return e?e.getAttribute("role")==="combobox"&&Bu(e):!1}const on=Math.min,Mt=Math.max,Ii=Math.round,Lr=Math.floor,$n=e=>({x:e,y:e}),NO={left:"right",right:"left",bottom:"top",top:"bottom"},LO={start:"end",end:"start"};function gc(e,t,n){return Mt(e,on(t,n))}function xo(e,t){return typeof e=="function"?e(t):e}function Bn(e){return e.split("-")[0]}function wo(e){return e.split("-")[1]}function Yv(e){return e==="x"?"y":"x"}function Hu(e){return e==="y"?"height":"width"}function yr(e){return["top","bottom"].includes(Bn(e))?"y":"x"}function Wu(e){return Yv(yr(e))}function _O(e,t,n){n===void 0&&(n=!1);const r=wo(e),o=Wu(e),s=Hu(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ai(i)),[i,Ai(i)]}function VO(e){const t=Ai(e);return[yc(e),t,yc(t)]}function yc(e){return e.replace(/start|end/g,t=>LO[t])}function $O(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 BO(e,t,n,r){const o=wo(e);let s=$O(Bn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(yc)))),s}function Ai(e){return e.replace(/left|right|bottom|top/g,t=>NO[t])}function HO(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kv(e){return typeof e!="number"?HO(e):{top:e,right:e,bottom:e,left:e}}function Oi(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 Oh;function aA(){return Oh||(Oh=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=ov();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}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,d,f,h,p){var m=s(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var v=a(function(){var S=!1,E,R,I=function(M){if(!S){S=!0,E=M;var j=h(M);if(p!==void 0&&g.hasValue){var P=g.value;if(p(P,j))return R=P,P}return R=j,j}var O=E,F=R;if(r(O,M))return F;var V=h(M);return p!==void 0&&p(F,V)?F:(E=M,R=V,V)},k=f===void 0?null:f,A=function(){return I(d())},N=k===null?void 0:function(){return I(k())};return[A,N]},[d,f,h,p]),b=v[0],y=v[1],T=o(u,b,y);return i(function(){g.hasValue=!0,g.value=T},[T]),l(T),T}Ah.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ah}process.env.NODE_ENV==="production"?iA():aA();const Ir=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},lA=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},cA=e=>Object.entries(e),sv=e=>e instanceof Promise,iv=(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),uA=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>iv(u,f,s,d));return sv(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))},dA=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>iv(c,u,s,o.current));return sv(a)?a.then(c=>l(c)):l(a)},Au=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=Ir(r),i=Ir((n==null?void 0:n.props)??{}),a=Ir(t),l=Ir((n==null?void 0:n.postMiddleware)??[]),c=Ir((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),d=lA(r),f=Ir(d),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(g=>{g(r,d,m)})},[r,l,d]);const[p]=w.useState(()=>{const m=()=>i.current,g=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return cA(g).reduce((v,[b,y])=>({...v,[b]:n!=null&&n.debug?uA(b,y,o,m,h,c.current):dA(b,y,o,m,h,c.current)}),{})});return[r,p,i.current]},fA=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function hA(e,t){return w.useRef(fA(e,t)).current}const oa={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>)`},Nr=(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(Nr(i,t,n,a))},[]),av=(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]:av(i,t,n,a)}},{}),Dh={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ac=(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)},pA={default:e=>ac(e,{result:Dh.default}),dark:e=>ac(e,{result:Dh.dark})},mA=(e,t)=>{const n=(a,l,c)=>({key:`--${c}`,value:`${a}`}),r=Nr(e.colors,n),o=Nr(e.spacing,n),s=Nr(e.rounded,n),i=e.custom?Nr(e.custom,n):[];return ac(r.concat(o,s,i),{result:a=>`html${t?`.${t}`:""} {${a}}`,value:(a,l)=>l.replace("hsla(","").replace(")","")})},lv={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},cv={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"},gA={name:"dark",rounded:lv,spacing:cv,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%)"}}}},yA={name:"light",rounded:lv,spacing:cv,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%)"}}}},vA=gA,bA=yA,Ou={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(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"},sa=w.createContext({colorTokenParser:oa.hsla,translations:Ou,locale:void 0}),xA=e=>{const t=w.useMemo(()=>({locale:e.locale,translations:{...Ou,...e.map},colorTokenParser:e.parser||oa.hsla}),[e]);return x.jsx(sa.Provider,{value:t,children:e.children})},uv=()=>{const e=w.useContext(sa);if(e)return e.locale},Ct=()=>{const e=w.useContext(sa);return e?e.translations:Ou},wA=()=>{const e=w.useContext(sa);return e?e.colorTokenParser:oa.hsla},Bt=(e,t=2)=>e.toString(16).padStart(t,"0"),Ps=()=>{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,`${Bt(t,4)+Bt(n,3)}-${Bt(r[0])+Bt(r[1])}-${Bt(r[2])+Bt(r[3])}-${Bt(r[4])+Bt(r[5])}-${Bt(r[6])+Bt(r[7])+Bt(r[8])+Bt(r[9])}`},Mh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),kh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Du=(e,t)=>{const n=Mh(t,kh.basic,e)||Mh(t,kh.extend,e);return n===void 0||n===e?void 0:n},Pi=()=>typeof window>"u",lc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),dv=(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},TA={type:"spring",bounce:.3,duration:.6},Fh=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),fv={middle:{x:"0%",opacity:1},enter:Fh(1),exit:Fh(-1)},jh={exit:{visibility:"hidden"}},SA=e=>{const t=fn(By(e));return $y({start:t,end:bo(t,41)})},hv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),EA=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=By(new Date(1970,o,1).setMonth(o)),i=hv(s,n);return x.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),tl={ArrowLeft:(e,t)=>t==="days"?_I(e,1):Zy(e,1),ArrowRight:(e,t)=>t==="days"?bo(e,1):ra(e,1),ArrowUp:(e,t)=>t==="days"?VI(e,1):$I(e,1),ArrowDown:(e,t)=>t==="days"?Ly(e,1):_y(e,1)},Nh=(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)},er=e=>e.getFullYear().toString().padStart(4,"0"),CA=(e,t,n)=>e===void 0||n===void 0?!1:VR(t,e)&&$R(t,n),PA=e=>{var n;const t=Ct();return x.jsx(dt.tbody,{layout:!0,variants:fv,custom:e.direction,onKeyDown:e.onKeyDown,className:ke((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 h,p,m,g,v,b,y,T,S,E,R,I,k,A;const a=i.toISOString(),l=e.rangeMode?a===((p=(h=e.range)==null?void 0:h.to)==null?void 0:p.toISOString())||a===((g=(m=e.range)==null?void 0:m.from)==null?void 0:g.toISOString()):a===((v=e.date)==null?void 0:v.toISOString()),c=LI(i)&&e.markToday,u=((b=e.disabledDate)==null?void 0:b.call(e,i))||!1,d=!NI(i,e.stateDate)||u,f=e.rangeMode?CA((y=e.range)==null?void 0:y.from,i,(T=e.range)==null?void 0:T.to):!1;return x.jsxs("td",{align:"center",className:ke("relative",(S=e.styles)==null?void 0:S.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:ke(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${d?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,f&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((R=e.stateRange.from)==null?void 0:R.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:((I=e.labelRange)==null?void 0:I.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:((A=e.labelRange)==null?void 0:A.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},pv=({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:d=!0,...f})=>{const h=w.useRef(Ps()),p=Ct(),m=w.useRef(null),{date:g,range:v}=f,b=g||new Date,y=w.useRef(null),[T,S]=Au({date:b,isAnimating:!1,year:er(b),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:EA(h.current,b,o),selectMode:l?"from":void 0,week:$y({start:fn(b),end:zP(b)})},N=>({onChangeYear:M=>({year:M}),setToday:()=>({date:eo(new Date)}),onExitComplete:()=>(Nh(y.current||null,m,N.state().date,200),y.current=null,{isAnimating:!1}),date:M=>{const j=M(N.state().date);return{date:j,year:er(j)}},nextMonth:M=>{y.current=M.currentTarget;const j=N.state();if(j.isAnimating)return j;const P=ra(j.date,1);return{date:P,isAnimating:!0,direction:1,year:er(P)}},previousMonth:M=>{y.current=M.currentTarget;const j=N.state();if(j.isAnimating)return j;const P=Zy(j.date,1);return{date:P,isAnimating:!0,direction:-1,year:er(P)}},onSelectDate:M=>{const j=N.state(),P=M.currentTarget.dataset.range==="true",O=M.currentTarget.dataset.date||"",F=new Date(O);return{date:F,year:er(F),selectMode:j.selectMode===void 0?void 0:j.selectMode==="from"?"to":"from",range:P?{from:j.selectMode==="from"?F:j.range.from,to:j.selectMode==="to"?F:j.range.to}:j.range}},onChangeMonth:M=>{const j=M.target.value,O=Array.from(M.target.options).find(V=>V.value===j),F=N.state();if(O){const V=O.dataset.index||"",H=new Date(N.state().date);return H.setMonth(+V),{...F,date:H,year:er(H)}}return F},onKeyDown:M=>{const j=M.key,P=N.state();if(j in tl){(j==="ArrowUp"||j==="ArrowDown")&&M.preventDefault();const O=N.state().date,F=bn.keyof(tl,j)?tl[j](O,M.shiftKey?"month":"days"):null;if(F!==null)return Nh(M.target,m,F),{...P,date:F,year:er(F)}}return N.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(N,M,j)=>{var O,F;return(j.method==="onChangeMonth"||j.method==="previousMonth"||j.method==="nextMonth")&&((F=(O=j.props).onChangeMonth)==null||F.call(O,N.date)),N},(N,M,j)=>{var O,F;return j.method==="onChangeYear"&&((F=(O=j.props).onChangeYear)==null||F.call(O,N.date)),N},(N,M,j)=>{const P=j.method==="onSelectDate"||j.method==="setToday"||j.method==="onKeyDown";return l&&P&&t?(c==null||c(N.range),N):(P&&t&&(c==null||c(N.date)),N)}]}),E=dv(SA(T.date),7),R=T.date.toISOString(),I=hv(T.date,o);w.useEffect(()=>{t||c==null||c(T.date)},[R]);const k=hA(N=>{S.date(M=>{const j=new Date(M);return j.setFullYear(+N),j})},1200),A=N=>{const M=N.currentTarget.value;S.onChangeYear(M),a==null||a(new Date(M)),k(M)};return x.jsx(IC,{transition:TA,children:x.jsxs("div",{"data-component":"calendar",ref:m,className:ke("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(vo,{initial:!1,mode:"popLayout",custom:T.direction,onExitComplete:S.onExitComplete,children:x.jsxs(dt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(dt.button,{layout:!0,"data-focustrap":"prev",variants:jh,onClick:S.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(wP,{className:"h-4 w-4"})}),x.jsx(dt.span,{layout:!0,variants:fv,custom:T.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:`${I.length}ch`},value:I,onChange:S.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:T.months}),x.jsx(rv,{mask:"int",value:T.year,maxLength:4,placeholder:"YYYY",onChange:A,style:{width:`${T.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(dt.button,{layout:!0,"data-focustrap":"next",variants:jh,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:S.nextMonth,children:x.jsx(Su,{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(dt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:T.week.map(N=>x.jsx("th",{className:ke("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:N.toLocaleDateString(o,{weekday:"short"})},N.toString()))})}),x.jsx(PA,{stateRange:T.range,stateDate:T.date,disabledDate:r,markRange:d,zip:E,range:v,styles:u,dispatch:S,date:g||null,markToday:s,rangeMode:l,labelRange:n,RenderOnDay:e,direction:T.direction,onKeyDown:S.onKeyDown})]})]},I)})}),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:S.setToday,children:p.calendarToday})})]})})},mv=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>x.jsxs(mo,{...a,as:r,"data-componen":"card",className:ke("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:ke("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:ke("min-w-full px-8",i),children:e})]}),gv=e=>{const t=e.Icon??My,n=Ct();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 kt(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 RA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yv(...e){return t=>e.forEach(n=>RA(n,t))}function gr(...e){return C.useCallback(yv(...e),e)}function vv(e,t=[]){let n=[];function r(s,i){const a=C.createContext(i),l=n.length;n=[...n,i];function c(d){const{scope:f,children:h,...p}=d,m=(f==null?void 0:f[e][l])||a,g=C.useMemo(()=>p,Object.values(p));return x.jsx(m.Provider,{value:g,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||a,p=C.useContext(h);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${d}\` 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,IA(o,...t)]}function IA(...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 d=l(s)[`__scope${c}`];return{...a,...d}},{});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(OA);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(cc,{...r,ref:t,children:C.isValidElement(i)?C.cloneElement(i,void 0,a):null})}return x.jsx(cc,{...r,ref:t,children:n})});to.displayName="Slot";var cc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=MA(n);return C.cloneElement(n,{...DA(r,n.props),ref:t?yv(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});cc.displayName="SlotClone";var AA=({children:e})=>x.jsx(x.Fragment,{children:e});function OA(e){return C.isValidElement(e)&&e.type===AA}function DA(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 MA(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 kA(e){const t=e+"CollectionProvider",[n,r]=vv(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:p,children:m}=h,g=w.useRef(null),v=w.useRef(new Map).current;return x.jsx(o,{scope:p,itemMap:v,collectionRef:g,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=w.forwardRef((h,p)=>{const{scope:m,children:g}=h,v=s(a,m),b=gr(p,v.collectionRef);return x.jsx(to,{ref:b,children:g})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=w.forwardRef((h,p)=>{const{scope:m,children:g,...v}=h,b=w.useRef(null),y=gr(p,b),T=s(c,m);return w.useEffect(()=>(T.itemMap.set(b,{ref:b,...v}),()=>void T.itemMap.delete(b))),x.jsx(to,{[u]:"",ref:y,children:g})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return w.useCallback(()=>{const g=p.collectionRef.current;if(!g)return[];const v=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((T,S)=>v.indexOf(T.ref.current)-v.indexOf(S.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},f,r]}var FA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],mn=FA.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 bv(e,t){e&&vs.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 jA(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 NA="DismissableLayer",uc="dismissableLayer.update",LA="dismissableLayer.pointerDownOutside",_A="dismissableLayer.focusOutside",Lh,xv=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wv=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=C.useContext(xv),[u,d]=C.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=C.useState({}),p=gr(t,R=>d(R)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),b=u?m.indexOf(u):-1,y=c.layersWithOutsidePointerEventsDisabled.size>0,T=b>=v,S=$A(R=>{const I=R.target,k=[...c.branches].some(A=>A.contains(I));!T||k||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},f),E=BA(R=>{const I=R.target;[...c.branches].some(A=>A.contains(I))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},f);return jA(R=>{b===c.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},f),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Lh=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),_h(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Lh)}},[u,f,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),_h())},[u,c]),C.useEffect(()=>{const R=()=>h({});return document.addEventListener(uc,R),()=>document.removeEventListener(uc,R)},[]),x.jsx(mn.div,{...l,ref:p,style:{pointerEvents:y?T?"auto":"none":void 0,...e.style},onFocusCapture:kt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:kt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:kt(e.onPointerDownCapture,S.onPointerDownCapture)})});wv.displayName=NA;var VA="DismissableLayerBranch",Tv=C.forwardRef((e,t)=>{const n=C.useContext(xv),r=C.useRef(null),o=gr(t,r);return C.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(mn.div,{...e,ref:o})});Tv.displayName=VA;function $A(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(){Sv(LA,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 BA(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&&Sv(_A,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 _h(){const e=new CustomEvent(uc);document.dispatchEvent(e)}function Sv(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?bv(o,s):o.dispatchEvent(s)}var HA=wv,WA=Tv,Ri=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},zA="Portal",Ev=C.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=C.useState(!1);Ri(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Vc.createPortal(x.jsx(mn.div,{...r,ref:t}),i):null});Ev.displayName=zA;function UA(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var Cv=e=>{const{present:t,children:n}=e,r=GA(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),s=gr(r.ref,YA(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:s}):null};Cv.displayName="Presence";function GA(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),s=C.useRef("none"),i=e?"mounted":"unmounted",[a,l]=UA(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Us(r.current);s.current=a==="mounted"?c:"none"},[a]),Ri(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=Us(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ri(()=>{if(t){const c=d=>{const h=Us(r.current).includes(d.animationName);d.target===t&&h&&vs.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=Us(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 Us(e){return(e==null?void 0:e.animationName)||"none"}function YA(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 KA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=qA({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=Tn(n),l=C.useCallback(c=>{if(s){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[s,e,o,a]);return[i,l]}function qA({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 XA="VisuallyHidden",Mu=C.forwardRef((e,t)=>x.jsx(mn.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}}));Mu.displayName=XA;var ku="ToastProvider",[Fu,QA,ZA]=kA("Toast"),[Pv,LL]=vv("Toast",[ZA]),[JA,ia]=Pv(ku),Rv=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),d=C.useRef(!1),f=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ku}\`. Expected non-empty \`string\`.`),x.jsx(Fu.Provider,{scope:t,children:x.jsx(JA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:C.useCallback(()=>u(h=>h+1),[]),onToastRemove:C.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Rv.displayName=ku;var Iv="ToastViewport",eO=["F8"],dc="toast.viewportPause",fc="toast.viewportResume",Av=C.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=eO,label:o="Notifications ({hotkey})",...s}=e,i=ia(Iv,n),a=QA(n),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),d=C.useRef(null),f=gr(t,d,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;C.useEffect(()=>{const g=v=>{var y;r.every(T=>v[T]||v.code===T)&&((y=d.current)==null||y.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),C.useEffect(()=>{const g=l.current,v=d.current;if(p&&g&&v){const b=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(dc);v.dispatchEvent(E),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(fc);v.dispatchEvent(E),i.isClosePausedRef.current=!1}},T=E=>{!g.contains(E.relatedTarget)&&y()},S=()=>{g.contains(document.activeElement)||y()};return g.addEventListener("focusin",b),g.addEventListener("focusout",T),g.addEventListener("pointermove",b),g.addEventListener("pointerleave",S),window.addEventListener("blur",b),window.addEventListener("focus",y),()=>{g.removeEventListener("focusin",b),g.removeEventListener("focusout",T),g.removeEventListener("pointermove",b),g.removeEventListener("pointerleave",S),window.removeEventListener("blur",b),window.removeEventListener("focus",y)}}},[p,i.isClosePausedRef]);const m=C.useCallback(({tabbingDirection:g})=>{const b=a().map(y=>{const T=y.ref.current,S=[T,...pO(T)];return g==="forwards"?S:S.reverse()});return(g==="forwards"?b.reverse():b).flat()},[a]);return C.useEffect(()=>{const g=d.current;if(g){const v=b=>{var S,E,R;const y=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!y){const I=document.activeElement,k=b.shiftKey;if(b.target===g&&k){(S=c.current)==null||S.focus();return}const M=m({tabbingDirection:k?"backwards":"forwards"}),j=M.findIndex(P=>P===I);nl(M.slice(j+1))?b.preventDefault():k?(E=c.current)==null||E.focus():(R=u.current)==null||R.focus()}};return g.addEventListener("keydown",v),()=>g.removeEventListener("keydown",v)}},[a,m]),x.jsxs(WA,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&x.jsx(hc,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});nl(g)}}),x.jsx(Fu.Slot,{scope:n,children:x.jsx(mn.ol,{tabIndex:-1,...s,ref:f})}),p&&x.jsx(hc,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});nl(g)}})]})});Av.displayName=Iv;var Ov="ToastFocusProxy",hc=C.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=ia(Ov,n);return x.jsx(Mu,{"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()}})});hc.displayName=Ov;var aa="Toast",tO="toast.swipeStart",nO="toast.swipeMove",rO="toast.swipeCancel",oO="toast.swipeEnd",Dv=C.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=KA({prop:r,defaultProp:o,onChange:s});return x.jsx(Cv,{present:n||a,children:x.jsx(aO,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Tn(e.onPause),onResume:Tn(e.onResume),onSwipeStart:kt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:kt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:kt(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:kt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Dv.displayName=aa;var[sO,iO]=Pv(aa,{onClose(){}}),aO=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:d,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=ia(aa,n),[g,v]=C.useState(null),b=gr(t,P=>v(P)),y=C.useRef(null),T=C.useRef(null),S=o||m.duration,E=C.useRef(0),R=C.useRef(S),I=C.useRef(0),{onToastAdd:k,onToastRemove:A}=m,N=Tn(()=>{var O;(g==null?void 0:g.contains(document.activeElement))&&((O=m.viewport)==null||O.focus()),i()}),M=C.useCallback(P=>{!P||P===1/0||(window.clearTimeout(I.current),E.current=new Date().getTime(),I.current=window.setTimeout(N,P))},[N]);C.useEffect(()=>{const P=m.viewport;if(P){const O=()=>{M(R.current),c==null||c()},F=()=>{const V=new Date().getTime()-E.current;R.current=R.current-V,window.clearTimeout(I.current),l==null||l()};return P.addEventListener(dc,F),P.addEventListener(fc,O),()=>{P.removeEventListener(dc,F),P.removeEventListener(fc,O)}}},[m.viewport,S,l,c,M]),C.useEffect(()=>{s&&!m.isClosePausedRef.current&&M(S)},[s,S,m.isClosePausedRef,M]),C.useEffect(()=>(k(),()=>A()),[k,A]);const j=C.useMemo(()=>g?Lv(g):null,[g]);return m.viewport?x.jsxs(x.Fragment,{children:[j&&x.jsx(lO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:j}),x.jsx(sO,{scope:n,onClose:N,children:vs.createPortal(x.jsx(Fu.ItemSlot,{scope:n,children:x.jsx(HA,{asChild:!0,onEscapeKeyDown:kt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||N(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(mn.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:kt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:kt(e.onPointerDown,P=>{P.button===0&&(y.current={x:P.clientX,y:P.clientY})}),onPointerMove:kt(e.onPointerMove,P=>{if(!y.current)return;const O=P.clientX-y.current.x,F=P.clientY-y.current.y,V=!!T.current,H=["left","right"].includes(m.swipeDirection),z=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=H?z(0,O):0,$=H?0:z(0,F),K=P.pointerType==="touch"?10:2,J={x:D,y:$},X={originalEvent:P,delta:J};V?(T.current=J,Gs(nO,d,X,{discrete:!1})):Vh(J,m.swipeDirection,K)?(T.current=J,Gs(tO,u,X,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(O)>K||Math.abs(F)>K)&&(y.current=null)}),onPointerUp:kt(e.onPointerUp,P=>{const O=T.current,F=P.target;if(F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),T.current=null,y.current=null,O){const V=P.currentTarget,H={originalEvent:P,delta:O};Vh(O,m.swipeDirection,m.swipeThreshold)?Gs(oO,h,H,{discrete:!0}):Gs(rO,f,H,{discrete:!0}),V.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),lO=e=>{const{__scopeToast:t,children:n,...r}=e,o=ia(aa,t),[s,i]=C.useState(!1),[a,l]=C.useState(!1);return fO(()=>i(!0)),C.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(Ev,{asChild:!0,children:x.jsx(Mu,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},cO="ToastTitle",Mv=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(mn.div,{...r,ref:t})});Mv.displayName=cO;var uO="ToastDescription",kv=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(mn.div,{...r,ref:t})});kv.displayName=uO;var Fv="ToastAction",dO=C.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(Nv,{altText:n,asChild:!0,children:x.jsx(ju,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Fv}\`. Expected non-empty \`string\`.`),null)});dO.displayName=Fv;var jv="ToastClose",ju=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=iO(jv,n);return x.jsx(Nv,{asChild:!0,children:x.jsx(mn.button,{type:"button",...r,ref:t,onClick:kt(e.onClick,o.onClose)})})});ju.displayName=jv;var Nv=C.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(mn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Lv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),hO(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(...Lv(r))}}),t}function Gs(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?bv(o,s):o.dispatchEvent(s)}var Vh=(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 fO(e=()=>{}){const t=Tn(e);Ri(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function hO(e){return e.nodeType===e.ELEMENT_NODE}function pO(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 nl(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var mO=Rv,gO=Av,yO=Dv,vO=Mv,bO=kv,xO=ju;const wO=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},TO=uo("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"}}),_v=w.createContext(()=>{throw new Error("Not implemented")}),SO=()=>w.useContext(_v),$h={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]}},EO=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=TO({theme:t.theme||"default"});return x.jsx(yO,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(dt.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:$h[t.reversedIndex]||$h.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(vO,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(bO,{className:"select-text truncate",children:t.text})]}),r?x.jsx(xO,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(na,{className:"h-5 w-5"})}):null]})})})});function CO({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=wO(r),[s,i]=w.useState([]),a=w.useCallback(()=>i([]),[]);w.useEffect(()=>()=>a(),[a]);const l=w.useCallback((c,u)=>{const d=window.crypto.randomUUID();return i(h=>{const p=[...h,{...u,id:d,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(h=>h.filter(p=>p.id!==d))}},[t]);return x.jsxs(mO,{duration:n,swipeThreshold:150,children:[x.jsx(_v.Provider,{value:l,children:e}),x.jsx(vo,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,d)=>{const f=()=>i(h=>h.filter(p=>p.id!==c.id));return w.createElement(EO,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(gO,{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 PO=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:ke("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]}),Vv=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},$v=w.createContext(""),RO=e=>{const[t,n]=Vv(e.active),r=mr(0),o=mr(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},f=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(h=u.querySelector(`li[data-id="${p}"]`),n(p)),h===null){h=u.querySelector("li[data-id]");const m=h.getAttribute("data-id")||"";n(m)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=Bm(e.onChange);w.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=w.Children.toArray(e.children),c=u=>{const d=u.currentTarget,f=d.getBoundingClientRect();o.set(f.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return x.jsx($v.Provider,{value:t,children:x.jsx(mv,{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 d=u.props;return x.jsx("li",{"data-id":d.id,"data-active":t===d.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":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},IO=()=>w.useContext($v),AO=e=>{const t=IO();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function Gn(e){return Bv(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function En(e){var t;return(t=(Bv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bv(e){return e instanceof Node||e instanceof Rt(e).Node}function Fe(e){return e instanceof Element||e instanceof Rt(e).Element}function et(e){return e instanceof HTMLElement||e instanceof Rt(e).HTMLElement}function pc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}function Rs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function OO(e){return["table","td","th"].includes(Gn(e))}function la(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Nu(e){const t=Lu(),n=Fe(e)?Vt(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 DO(e){let t=Sn(e);for(;et(t)&&!Vn(t);){if(Nu(t))return t;if(la(t))return null;t=Sn(t)}return null}function Lu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vn(e){return["html","body","#document"].includes(Gn(e))}function Vt(e){return Rt(e).getComputedStyle(e)}function ca(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sn(e){if(Gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pc(e)&&e.host||En(e);return pc(t)?t.host:t}function Hv(e){const t=Sn(e);return Vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&Rs(t)?t:Hv(t)}function jn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Hv(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Rt(o);if(s){const a=mc(i);return t.concat(i,i.visualViewport||[],Rs(o)?o:[],a&&n?jn(a):[])}return t.concat(o,jn(o,[],n))}function mc(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 Ye(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&pc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function _u(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Wv(){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 zv(e){return e.mozInputSource===0&&e.isTrusted?!0:gc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Vu(e){return MO()?!1:!gc()&&e.width===0&&e.height===0||gc()&&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 $u(){return/apple/i.test(navigator.vendor)}function gc(){const e=/android/i;return e.test(_u())||e.test(Wv())}function Uv(){return _u().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function MO(){return Wv().includes("jsdom/")}function no(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function kO(e){return"nativeEvent"in e}function FO(e){return e.matches("html,body")}function ut(e){return(e==null?void 0:e.ownerDocument)||document}function rl(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 rn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const jO="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Bu(e){return et(e)&&e.matches(jO)}function mt(e){e.preventDefault(),e.stopPropagation()}function Gv(e){return e?e.getAttribute("role")==="combobox"&&Bu(e):!1}const on=Math.min,Mt=Math.max,Ii=Math.round,Lr=Math.floor,$n=e=>({x:e,y:e}),NO={left:"right",right:"left",bottom:"top",top:"bottom"},LO={start:"end",end:"start"};function yc(e,t,n){return Mt(e,on(t,n))}function xo(e,t){return typeof e=="function"?e(t):e}function Bn(e){return e.split("-")[0]}function wo(e){return e.split("-")[1]}function Yv(e){return e==="x"?"y":"x"}function Hu(e){return e==="y"?"height":"width"}function yr(e){return["top","bottom"].includes(Bn(e))?"y":"x"}function Wu(e){return Yv(yr(e))}function _O(e,t,n){n===void 0&&(n=!1);const r=wo(e),o=Wu(e),s=Hu(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ai(i)),[i,Ai(i)]}function VO(e){const t=Ai(e);return[vc(e),t,vc(t)]}function vc(e){return e.replace(/start|end/g,t=>LO[t])}function $O(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 BO(e,t,n,r){const o=wo(e);let s=$O(Bn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(vc)))),s}function Ai(e){return e.replace(/left|right|bottom|top/g,t=>NO[t])}function HO(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kv(e){return typeof e!="number"?HO(e):{top:e,right:e,bottom:e,left:e}}function Oi(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 WO=["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])"],Di=WO.join(","),qv=typeof Element>"u",ro=qv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mi=!qv&&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},ki=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},zO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},UO=function(t,n,r){if(ki(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Di));return n&&ro.call(t,Di)&&o.unshift(t),o=o.filter(r),o},GO=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!ki(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=ro.call(i,Di);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!ki(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},Xv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Qv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zO(t))&&!Xv(t)?0:t.tabIndex},YO=function(t,n){var r=Qv(t);return r<0&&n&&!Xv(t)?0:r},KO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Zv=function(t){return t.tagName==="INPUT"},qO=function(t){return Zv(t)&&t.type==="hidden"},XO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},ZO=function(t){if(!t.name)return!0;var n=t.form||Mi(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=QO(o,t.form);return!s||s===t},JO=function(t){return Zv(t)&&t.type==="radio"},eD=function(t){return JO(t)&&!ZO(t)},tD=function(t){var n,r=t&&Mi(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=Mi(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},Bh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},nD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=ro.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(ro.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=Mi(t);if(l&&!l.shadowRoot&&o(l)===!0)return Bh(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(tD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Bh(t);return!1},rD=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 ro.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},oD=function(t,n){return!(n.disabled||ki(n)||qO(n)||nD(n,t)||XO(n)||rD(n))},vc=function(t,n){return!(eD(n)||Qv(n)<0||!oD(t,n))},sD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},iD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=YO(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(KO).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},cs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=GO([t],n.includeContainer,{filter:vc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:sD}):r=UO(t,n.includeContainer,vc.bind(null,n)),iD(r)},aD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ro.call(t,Di)===!1?!1:vc(n,t)};function Hh(e,t,n){let{reference:r,floating:o}=e;const s=yr(t),i=Wu(t),a=Hu(i),l=Bn(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(wo(t)){case"start":d[i]-=h*(n&&c?-1:1);break;case"end":d[i]+=h*(n&&c?-1:1);break}return d}const lD=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}=Hh(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}=Hh(c,h,l)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function zu(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}=xo(t,e),p=Kv(d),g=a[h?f==="floating"?"reference":"floating":f],y=Oi(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=Oi(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 cD=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}=xo(e,t)||{};if(c==null)return{};const f=Kv(u),h={x:n,y:r},d=Wu(o),p=Hu(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 R=E?E[v]:0;(!R||!await(i.isElement==null?void 0:i.isElement(E)))&&(R=a.floating[v]||s.floating[p]);const I=S/2-T/2,M=R/2-m[p]/2-1,A=on(f[y],M),N=on(f[b],M),k=A,j=R-m[p]-N,P=R/2-m[p]/2+I,O=gc(k,P,j),F=!l.arrow&&wo(o)!=null&&P!==O&&s.reference[p]/2-(P<k?A:N)-m[p]/2<0,_=F?P<k?P-k:P-j:0;return{[d]:h[d]+_,data:{[d]:O,centerOffset:P-O-_,...F&&{alignmentOffset:_}},reset:F}}}),uD=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}=xo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Bn(o),b=yr(a),v=Bn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=h||(v||!m?[Ai(a)]:VO(a)),E=p!=="none";!h&&E&&T.push(...BO(a,m,p,S));const R=[a,...T],I=await zu(t,g),M=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&M.push(I[y]),f){const P=_O(o,i,S);M.push(I[P[0]],I[P[1]])}if(A=[...A,{placement:o,overflows:M}],!M.every(P=>P<=0)){var N,k;const P=(((N=s.flip)==null?void 0:N.index)||0)+1,O=R[P];if(O)return{data:{index:P,overflows:A},reset:{placement:O}};let F=(k=A.filter(_=>_.overflows[0]<=0).sort((_,H)=>_.overflows[1]-H.overflows[1])[0])==null?void 0:k.placement;if(!F)switch(d){case"bestFit":{var j;const _=(j=A.filter(H=>{if(E){const U=yr(H.placement);return U===b||U==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(U=>U>0).reduce((U,D)=>U+D,0)]).sort((H,U)=>H[1]-U[1])[0])==null?void 0:j[0];_&&(F=_);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function fD(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Bn(n),a=wo(n),l=yr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,f=xo(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 dD=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 fD(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}}}}},hD=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}=xo(e,t),c={x:n,y:r},u=await zu(t,l),f=yr(Bn(o)),h=Yv(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=gc(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=gc(b,p,v)}const m=a.fn({...t,[h]:d,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},pD=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}=xo(e,t),l=await zu(t,a),c=Bn(n),u=wo(n),f=yr(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=on(d-l[p],g),v=on(h-l[m],y),S=!t.middlewareData.shift;let T=b,E=v;if(f?E=u||S?on(v,y):y:T=u||S?on(b,g):g,S&&!u){const I=Mt(l.left,0),M=Mt(l.right,0),A=Mt(l.top,0),N=Mt(l.bottom,0);f?E=h-2*(I!==0||M!==0?I+M:Mt(l.left,l.right)):T=d-2*(A!==0||N!==0?A+N:Mt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const R=await o.getDimensions(s.floating);return h!==R.width||d!==R.height?{reset:{rects:!0}}:{}}}};function Jv(e){const t=Vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ii(n)!==s||Ii(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Uu(e){return Me(e)?e:e.contextElement}function $r(e){const t=Uu(e);if(!et(t))return $n(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Jv(t);let i=(s?Ii(n.width):n.width)/r,a=(s?Ii(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const mD=$n(0);function eb(e){const t=Rt(e);return!Lu()||!t.visualViewport?mD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function vr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Uu(e);let i=$n(1);t&&(r?Me(r)&&(i=$r(r)):i=$r(e));const a=gD(s,n,r)?eb(s):$n(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=Rt(s),d=r&&Me(r)?Rt(r):r;let p=h,m=pc(p);for(;m&&r&&d!==p;){const g=$r(m),y=m.getBoundingClientRect(),b=Vt(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=Rt(m),m=pc(p)}}return Oi({width:u,height:f,x:l,y:c})}function yD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=En(r),a=t?aa(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=$n(1);const u=$n(0),f=et(r);if((f||!f&&!s)&&((Gn(r)!=="body"||Rs(i))&&(l=la(r)),et(r))){const h=vr(r);c=$r(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 vD(e){return Array.from(e.getClientRects())}function tb(e){return vr(En(e)).left+la(e).scrollLeft}function bD(e){const t=En(e),n=la(e),r=e.ownerDocument.body,o=Mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+tb(e);const a=-n.scrollTop;return Vt(r).direction==="rtl"&&(i+=Mt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function xD(e,t){const n=Rt(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=Lu();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function wD(e,t){const n=vr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=et(e)?$r(e):$n(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 Wh(e,t,n){let r;if(t==="viewport")r=xD(e,n);else if(t==="document")r=bD(En(e));else if(Me(t))r=wD(t,n);else{const o=eb(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Oi(r)}function nb(e,t){const n=Sn(e);return n===t||!Me(n)||Vn(n)?!1:Vt(n).position==="fixed"||nb(n,t)}function TD(e,t){const n=t.get(e);if(n)return n;let r=jn(e,[],!1).filter(a=>Me(a)&&Gn(a)!=="body"),o=null;const s=Vt(e).position==="fixed";let i=s?Sn(e):e;for(;Me(i)&&!Vn(i);){const a=Vt(i),l=Nu(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Rs(i)&&!l&&nb(e,i))?r=r.filter(u=>u!==i):o=a,i=Sn(i)}return t.set(e,r),r}function SD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?aa(t)?[]:TD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=Wh(t,u,o);return c.top=Mt(f.top,c.top),c.right=on(f.right,c.right),c.bottom=on(f.bottom,c.bottom),c.left=Mt(f.left,c.left),c},Wh(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ED(e){const{width:t,height:n}=Jv(e);return{width:t,height:n}}function CD(e,t,n){const r=et(t),o=En(t),s=n==="fixed",i=vr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=$n(0);if(r||!r&&!s)if((Gn(t)!=="body"||Rs(o))&&(a=la(t)),r){const f=vr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=tb(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 rl(e){return Vt(e).position==="static"}function zh(e,t){return!et(e)||Vt(e).position==="fixed"?null:t?t(e):e.offsetParent}function rb(e,t){const n=Rt(e);if(aa(e))return n;if(!et(e)){let o=Sn(e);for(;o&&!Vn(o);){if(Me(o)&&!rl(o))return o;o=Sn(o)}return n}let r=zh(e,t);for(;r&&OO(r)&&rl(r);)r=zh(r,t);return r&&Vn(r)&&rl(r)&&!Nu(r)?n:r||DO(e)||n}const PD=async function(e){const t=this.getOffsetParent||rb,n=this.getDimensions,r=await n(e.floating);return{reference:CD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function RD(e){return Vt(e).direction==="rtl"}const ID={convertOffsetParentRelativeRectToViewportRelativeRect:yD,getDocumentElement:En,getClippingRect:SD,getOffsetParent:rb,getElementRects:PD,getClientRects:vD,getDimensions:ED,getScale:$r,isElement:Me,isRTL:RD};function AD(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=Lr(u),p=Lr(o.clientWidth-(c+f)),m=Lr(o.clientHeight-(u+h)),g=Lr(c),b={rootMargin:-d+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Mt(0,on(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 ca(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=Uu(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?AD(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?vr(e):null;l&&g();function g(){const y=vr(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 OD=dD,DD=hD,MD=uD,kD=pD,Uh=cD,FD=(e,t,n)=>{const r=new Map,o={platform:ID,...n},s={...o.platform,_c:r};return lD(e,t,{...o,platform:s})};var ii=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Fi(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(!Fi(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)&&!Fi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ob(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gh(e,t){const n=ob(e);return Math.round(t*n)/n}function Yh(e){const t=C.useRef(e);return ii(()=>{t.current=e}),t}function jD(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);Fi(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(_=>{_!==R.current&&(R.current=_,y(_))},[]),S=s||p,T=i||g,E=C.useRef(null),R=C.useRef(null),I=C.useRef(u),M=l!=null,A=Yh(l),N=Yh(o),k=C.useCallback(()=>{if(!E.current||!R.current)return;const _={placement:t,strategy:n,middleware:h};N.current&&(_.platform=N.current),FD(E.current,R.current,_).then(H=>{const U={...H,isPositioned:!0};j.current&&!Fi(I.current,U)&&(I.current=U,vs.flushSync(()=>{f(U)}))})},[h,t,n,N]);ii(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[c]);const j=C.useRef(!1);ii(()=>(j.current=!0,()=>{j.current=!1}),[]),ii(()=>{if(S&&(E.current=S),T&&(R.current=T),S&&T){if(A.current)return A.current(S,T,k);k()}},[S,T,k,A,M]);const P=C.useMemo(()=>({reference:E,floating:R,setReference:b,setFloating:v}),[b,v]),O=C.useMemo(()=>({reference:S,floating:T}),[S,T]),F=C.useMemo(()=>{const _={position:n,left:0,top:0};if(!O.floating)return _;const H=Gh(O.floating,u.x),U=Gh(O.floating,u.y);return a?{..._,transform:"translate("+H+"px, "+U+"px)",...ob(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:U}},[n,a,O.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:k,refs:P,elements:O,floatingStyles:F}),[u,k,P,O,F])}const ND=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?Uh({element:r.current,padding:o}).fn(n):{}:r?Uh({element:r,padding:o}).fn(n):{}}}},ua=(e,t)=>({...OD(e),options:[e,t]}),Gu=(e,t)=>({...DD(e),options:[e,t]}),Yu=(e,t)=>({...MD(e),options:[e,t]}),LD=(e,t)=>({...kD(e),options:[e,t]}),sb=(e,t)=>({...ND(e),options:[e,t]});function bc(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 ib={...C},_D=ib.useInsertionEffect,VD=_D||(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 VD(()=>{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 Ku="ArrowUp",Is="ArrowDown",oo="ArrowLeft",To="ArrowRight";function Ys(e,t,n){return Math.floor(e/t)!==n}function Zo(e,t){return t<0||t>=e.current.length}function ol(e,t){return xt(e,{disabledIndices:t})}function Kh(e,t){return xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xt(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&&ai(i,a,o));return a}function $D(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===Ku){if(u&&mt(n),c===-1)f=l;else if(f=xt(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}Zo(e,f)&&(f=c)}if(n.key===Is&&(u&&mt(n),c===-1?f=a:(f=xt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(f=xt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Zo(e,f)&&(f=c)),r==="both"){const h=Lr(c/s);n.key===To&&(u&&mt(n),c%s!==s-1?(f=xt(e,{startingIndex:c,disabledIndices:i}),o&&Ys(f,s,h)&&(f=xt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(f=xt(e,{startingIndex:c-c%s-1,disabledIndices:i})),Ys(f,s,h)&&(f=c)),n.key===oo&&(u&&mt(n),c%s!==0?(f=xt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Ys(f,s,h)&&(f=xt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(f=xt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Ys(f,s,h)&&(f=c));const d=Lr(l/s)===h;Zo(e,f)&&(o&&d?f=n.key===oo?l:xt(e,{startingIndex:c-c%s-1,disabledIndices:i}):f=c)}return f}function BD(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 HD(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 WD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ai(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 qh=0;function Dn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qh);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():qh=requestAnimationFrame(s)}var be=typeof document<"u"?w.useLayoutEffect:w.useEffect;function zD(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 UD(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 ab=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function GD(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 be(()=>{const l=new Map(o);Array.from(l.keys()).sort(zD).forEach((u,f)=>{l.set(u,f)}),UD(o,l)||s(l)},[o]),C.createElement(ab.Provider,{value:C.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function lb(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=C.useContext(ab),[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 be(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),be(()=>{const f=c.current?o.get(c.current):null;f!=null&&l(f)},[o]),C.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function so(){return so=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},so.apply(this,arguments)}let Xh=!1,YD=0;const Qh=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+YD++;function KD(){const[e,t]=C.useState(()=>Xh?Qh():void 0);return be(()=>{e==null&&t(Qh())},[]),C.useEffect(()=>{Xh=!0},[]),e}const qD=ib.useId,So=qD||KD;let us;process.env.NODE_ENV!=="production"&&(us=new Set);function li(){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=us)!=null&&e.has(o))){var s;(s=us)==null||s.add(o),console.warn(o)}}function XD(){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=us)!=null&&e.has(o))){var s;(s=us)==null||s.add(o),console.error(o)}}const cb=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||li("The `ref` prop is required for `FloatingArrow`."));const g=So(),[y,b]=C.useState(!1);if(be(()=>{if(!o)return;Vt(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,[R,I]=r.split("-"),M=!!h,A=R==="top"||R==="bottom",N=u&&I==="end"?"bottom":"top";let k=u&&I==="end"?"right":"left";u&&y&&(k=I==="end"?"left":"right");const j=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",O=h||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",F={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[R];return C.createElement("svg",so({},m,{"aria-hidden":!0,ref:n,width:M?i:i+v,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[k]:j,[N]:P,[R]:A||M?"100%":"calc(100% - "+v/2+"px)",transform:""+F+(d??""),...p}}),v>0&&C.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:v+(h?0:1),d:O}),C.createElement("path",{stroke:v&&!h?m.fill:"none",d:O}),C.createElement("clipPath",{id:g},C.createElement("rect",{x:-S,y:S*(M?-1:1),width:i+v,height:i})))});function ub(){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 fb=C.createContext(null),db=C.createContext(null),Yn=()=>{var e;return((e=C.useContext(fb))==null?void 0:e.id)||null},Kn=()=>C.useContext(db);function QD(e){const t=So(),n=Kn(),o=Yn();return be(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function ZD(e){const{children:t,id:n}=e,r=Yn();return C.createElement(fb.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function JD(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(()=>ub())[0];return C.createElement(db.Provider,{value:C.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function Hn(e){return"data-floating-ui-"+e}function gt(e){const t=w.useRef(e);return be(()=>{t.current=e}),t}const Zh=Hn("safe-polygon");function sl(e,t,n){return n&&!no(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function hb(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=Kn(),p=Yn(),m=gt(c),g=gt(l),y=gt(n),b=C.useRef(),v=C.useRef(-1),S=C.useRef(),T=C.useRef(-1),E=C.useRef(!0),R=C.useRef(!1),I=C.useRef(()=>{}),M=C.useCallback(()=>{var O;const F=(O=o.current.openEvent)==null?void 0:O.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);C.useEffect(()=>{if(!a)return;function O(F){let{open:_}=F;_||(clearTimeout(v.current),clearTimeout(T.current),E.current=!0)}return s.on("openchange",O),()=>{s.off("openchange",O)}},[a,s]),C.useEffect(()=>{if(!a||!m.current||!n)return;function O(_){M()&&r(!1,_,"hover")}const F=ut(i.floating).documentElement;return F.addEventListener("mouseleave",O),()=>{F.removeEventListener("mouseleave",O)}},[i.floating,n,r,a,m,M]);const A=C.useCallback(function(O,F,_){F===void 0&&(F=!0),_===void 0&&(_="hover");const H=sl(g.current,"close",b.current);H&&!S.current?(clearTimeout(v.current),v.current=window.setTimeout(()=>r(!1,O,_),H)):F&&(clearTimeout(v.current),r(!1,O,_))},[g,r]),N=at(()=>{I.current(),S.current=void 0}),k=at(()=>{if(R.current){const O=ut(i.floating).body;O.style.pointerEvents="",O.removeAttribute(Zh),R.current=!1}});C.useEffect(()=>{if(!a)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(D){if(clearTimeout(v.current),E.current=!1,u&&!no(b.current)||f>0&&!sl(g.current,"open"))return;const $=sl(g.current,"open",b.current);$?v.current=window.setTimeout(()=>{y.current||r(!0,D,"hover")},$):r(!0,D,"hover")}function _(D){if(O())return;I.current();const $=ut(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:D.clientX,y:D.clientY,onClose(){k(),N(),A(D,!0,"safe-polygon")}});const J=S.current;$.addEventListener("mousemove",J),I.current=()=>{$.removeEventListener("mousemove",J)};return}(b.current==="touch"?!Ye(i.floating,D.relatedTarget):!0)&&A(D)}function H(D){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:D.clientX,y:D.clientY,onClose(){k(),N(),A(D)}})(D))}if(Me(i.domReference)){var U;const D=i.domReference;return n&&D.addEventListener("mouseleave",H),(U=i.floating)==null||U.addEventListener("mouseleave",H),h&&D.addEventListener("mousemove",F,{once:!0}),D.addEventListener("mouseenter",F),D.addEventListener("mouseleave",_),()=>{var $;n&&D.removeEventListener("mouseleave",H),($=i.floating)==null||$.removeEventListener("mouseleave",H),h&&D.removeEventListener("mousemove",F),D.removeEventListener("mouseenter",F),D.removeEventListener("mouseleave",_)}}},[i,a,e,u,f,h,A,N,k,r,n,y,d,g,m,o]),be(()=>{var O;if(a&&n&&(O=m.current)!=null&&O.__options.blockPointerEvents&&M()){const _=ut(i.floating).body;_.setAttribute(Zh,""),_.style.pointerEvents="none",R.current=!0;const H=i.floating;if(Me(i.domReference)&&H){var F;const U=i.domReference,D=d==null||(F=d.nodesRef.current.find($=>$.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return D&&(D.style.pointerEvents=""),U.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{U.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,i,d,m,M]),be(()=>{n||(b.current=void 0,N(),k())},[n,N,k]),C.useEffect(()=>()=>{N(),clearTimeout(v.current),clearTimeout(T.current),k()},[a,i.domReference,N,k]);const j=C.useMemo(()=>{function O(F){b.current=F.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(F){const{nativeEvent:_}=F;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(O){A(O.nativeEvent,!1)}}),[A]);return C.useMemo(()=>a?{reference:j,floating:P}:{},[a,j,P])}function eM(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 tM(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 Ar=new WeakMap,Ks=new WeakSet,qs={},il=0;const nM=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,pb=e=>e&&(e.host||pb(e.parentNode)),rM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=pb(n);return e.contains(r)?r:null}).filter(n=>n!=null);function oM(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=rM(t,e),a=new Set,l=new Set(i),c=[];qs[o]||(qs[o]=new WeakMap);const u=qs[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(Gn(p)!=="script")if(a.has(p))h(p);else{const m=s?p.getAttribute(s):null,g=m!==null&&m!=="false",y=(Ar.get(p)||0)+1,b=(u.get(p)||0)+1;Ar.set(p,y),u.set(p,b),c.push(p),y===1&&g&&Ks.add(p),b===1&&p.setAttribute(o,""),!g&&s&&p.setAttribute(s,"true")}})}return il++,()=>{c.forEach(d=>{const p=(Ar.get(d)||0)-1,m=(u.get(d)||0)-1;Ar.set(d,p),u.set(d,m),p||(!Ks.has(d)&&s&&d.removeAttribute(s),Ks.delete(d)),m||d.removeAttribute(o)}),il--,il||(Ar=new WeakMap,Ar=new WeakMap,Ks=new WeakSet,qs={})}}function Jh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ut(e[0]).body;return oM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const io=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function mb(e,t){const n=cs(e,io());t==="prev"&&n.reverse();const r=n.indexOf(zt(ut(e)));return n.slice(r+1)[0]}function gb(){return mb(document.body,"next")}function yb(){return mb(document.body,"prev")}function Jo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ye(n,r)}function sM(e){cs(e,io()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function iM(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 aM(e,t,n){const r=e.indexOf(t);function o(i){const a=Hn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||Ye(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const qu={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 lM;function ep(e){e.key==="Tab"&&(e.target,clearTimeout(lM))}const ji=C.forwardRef(function(t,n){const[r,o]=C.useState();be(()=>($u()&&o("button"),document.addEventListener("keydown",ep),()=>{document.removeEventListener("keydown",ep)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Hn("focus-guard")]:"",style:qu};return C.createElement("span",so({},t,s))}),vb=C.createContext(null),tp=Hn("portal");function cM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=So(),o=bb(),[s,i]=C.useState(null),a=C.useRef(null);return be(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),be(()=>{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(tp,""),l.appendChild(c),a.current=c,i(c)},[t,r]),be(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Me(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(tp,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function Eo(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=cM({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&&Jo(p)&&(p.type==="focusin"?iM:sM)(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(vb.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:s,setFocusManagerState:a}),[o,s])},h&&s&&C.createElement(ji,{"data-type":"outside",ref:l,onFocus:d=>{if(Jo(d,s)){var p;(p=u.current)==null||p.focus()}else{const m=yb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),h&&s&&C.createElement("span",{"aria-owns":s.id,style:qu}),s&&vs.createPortal(t,s),h&&s&&C.createElement(ji,{"data-type":"outside",ref:c,onFocus:d=>{if(Jo(d,s)){var p;(p=f.current)==null||p.focus()}else{const m=gb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,d.nativeEvent))}}}))}const bb=()=>C.useContext(vb),np=20;let sr=[];function al(e){sr=sr.filter(n=>n.isConnected);let t=e;if(!(!t||Gn(t)==="body")){if(!aD(t,io())){const n=cs(t,io())[0];n&&(t=n)}sr.push(t),sr.length>np&&(sr=sr.slice(-np))}}function rp(){return sr.slice().reverse().find(e=>e.isConnected)}const uM=C.forwardRef(function(t,n){return C.createElement("button",so({},t,{type:"button",ref:n,tabIndex:-1,style:qu}))});function As(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=Gv(v)&&T,R=nM()?s:!0,I=gt(o),M=gt(i),A=gt(a),N=Kn(),k=bb(),j=C.useRef(null),P=C.useRef(null),O=C.useRef(!1),F=C.useRef(!1),_=C.useRef(-1),H=k!=null,U=S==null?void 0:S.firstElementChild,D=(U==null?void 0:U.id)===b?U:S,$=at(function(G){return G===void 0&&(G=D),G?cs(G,io()):[]}),q=at(G=>{const L=$(G);return I.current.map(B=>v&&B==="reference"?v:D&&B==="floating"?D:L).filter(Boolean).flat()});C.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){Ye(D,zt(ut(D)))&&$().length===0&&!E&&mt(B);const z=q(),V=rn(B);I.current[0]==="reference"&&V===v&&(mt(B),B.shiftKey?Dn(z[z.length-1]):Dn(z[1])),I.current[1]==="floating"&&V===D&&B.shiftKey&&(mt(B),Dn(z[0]))}}const L=ut(D);return L.addEventListener("keydown",G),()=>{L.removeEventListener("keydown",G)}},[r,v,D,c,I,E,$,q]),C.useEffect(()=>{if(r||!S)return;function G(L){const B=rn(L),V=$().indexOf(B);V!==-1&&(_.current=V)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,$]),C.useEffect(()=>{if(r||!f)return;function G(){F.current=!0,setTimeout(()=>{F.current=!1})}function L(B){const z=B.relatedTarget;queueMicrotask(()=>{const V=!(Ye(v,z)||Ye(S,z)||Ye(z,S)||Ye(k==null?void 0:k.portalNode,z)||z!=null&&z.hasAttribute(Hn("focus-guard"))||N&&(pr(N.nodesRef.current,p).find(Y=>{var ee,W;return Ye((ee=Y.context)==null?void 0:ee.elements.floating,z)||Ye((W=Y.context)==null?void 0:W.elements.domReference,z)})||eM(N.nodesRef.current,p).find(Y=>{var ee,W;return((ee=Y.context)==null?void 0:ee.elements.floating)===z||((W=Y.context)==null?void 0:W.elements.domReference)===z})));if(l&&V&&zt(ut(D))===ut(D).body){et(D)&&(D==null||D.focus());const Y=_.current,ee=$(),W=ee[Y]||ee[ee.length-1]||D;et(W)&&W.focus()}(E||!c)&&z&&V&&!F.current&&z!==rp()&&(O.current=!0,m(!1,B))})}if(S&&et(v))return v.addEventListener("focusout",L),v.addEventListener("pointerdown",G),S.addEventListener("focusout",L),()=>{v.removeEventListener("focusout",L),v.removeEventListener("pointerdown",G),S.removeEventListener("focusout",L)}},[r,v,S,D,c,p,N,k,m,f,l,$,E]),C.useEffect(()=>{var G;if(r)return;const L=Array.from((k==null||(G=k.portalNode)==null?void 0:G.querySelectorAll("["+Hn("portal")+"]"))||[]);if(S){const B=[S,...L,j.current,P.current,I.current.includes("reference")||E?v:null].filter(V=>V!=null),z=c||E?Jh(B,R,!R):Jh(B);return()=>{z()}}},[r,v,S,c,I,k,E,R]),be(()=>{if(r||!et(D))return;const G=ut(D),L=zt(G);queueMicrotask(()=>{const B=q(D),z=M.current,V=(typeof z=="number"?B[z]:z.current)||D,Y=Ye(D,L);!T&&!Y&&h&&Dn(V,{preventScroll:V===D})})},[r,h,D,T,q,M]),be(()=>{if(r||!D)return;let G=!1;const L=ut(D),B=zt(L);let V=y.current.openEvent;const Y=d.domReference.current;al(B);function ee(W){let{open:we,reason:Ue,event:je,nested:Ge}=W;we&&(V=je),Ue==="escape-key"&&d.domReference.current&&al(d.domReference.current),Ue==="hover"&&je.type==="mouseleave"&&(O.current=!0),Ue==="outside-press"&&(Ge?(O.current=!1,G=!0):O.current=!(zv(je)||Vu(je)))}return g.on("openchange",ee),()=>{g.off("openchange",ee);const W=zt(L),we=Ye(S,W)||N&&pr(N.nodesRef.current,p).some(se=>{var me;return Ye((me=se.context)==null?void 0:me.elements.floating,W)});(we||V&&["click","mousedown"].includes(V.type))&&d.domReference.current&&al(d.domReference.current);const je=Y||B,Ge=cs(ut(je).body,io());queueMicrotask(()=>{let se=rp();!se&&et(je)&&S&&(se=aM(Ge,je,S)),A.current&&!O.current&&et(se)&&(!(se!==W&&W!==L.body)||we)&&se.focus({preventScroll:G})})}},[r,S,D,A,y,d,g,N,p]),be(()=>{if(!r&&k)return k.setFocusManagerState({modal:c,closeOnFocusOut:f,open:h,onOpenChange:m,refs:d}),()=>{k.setFocusManagerState(null)}},[r,k,c,h,m,d,f]),be(()=>{if(r||!D||typeof MutationObserver!="function"||T)return;const G=()=>{const B=D.getAttribute("tabindex"),z=$(),V=zt(ut(S)),Y=z.indexOf(V);Y!==-1&&(_.current=Y),I.current.includes("floating")||V!==d.domReference.current&&z.length===0?B!=="0"&&D.setAttribute("tabindex","0"):B!=="-1"&&D.setAttribute("tabindex","-1")};G();const L=new MutationObserver(G);return L.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{L.disconnect()}},[r,S,D,d,I,$,T]);function J(G){return r||!u||!c?null:C.createElement(uM,{ref:G==="start"?j:P,onClick:L=>m(!1,L.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&R&&(c?!E:!0)&&(H||c);return C.createElement(C.Fragment,null,X&&C.createElement(ji,{"data-type":"inside",ref:k==null?void 0:k.beforeInsideRef,onFocus:G=>{if(c){const B=q();Dn(o[0]==="reference"?B[0]:B[B.length-1])}else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(O.current=!1,Jo(G,k.portalNode)){const B=gb()||v;B==null||B.focus()}else{var L;(L=k.beforeOutsideRef.current)==null||L.focus()}}}),!E&&J("start"),n,J("end"),X&&C.createElement(ji,{"data-type":"inside",ref:k==null?void 0:k.afterInsideRef,onFocus:G=>{if(c)Dn(q()[0]);else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(f&&(O.current=!0),Jo(G,k.portalNode)){const B=yb()||v;B==null||B.focus()}else{var L;(L=k.afterOutsideRef.current)==null||L.focus()}}}))}const ll=new Set,fM=C.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=So();return be(()=>{if(!r)return;ll.add(s);const i=/iP(hone|ad|od)|iOS/.test(_u()),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()=>{ll.delete(s),ll.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,h)))}},[s,r]),C.createElement("div",so({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function op(e){return et(e.target)&&e.target.tagName==="BUTTON"}function sp(e){return Bu(e)}function fa(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||op(p))&&(p.key===" "&&!sp(s)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||op(p)||sp(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 dM(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 ip(e){return e!=null&&e.clientX!=null}function hM(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,R)=>{f.current||r.current.openEvent&&!ip(r.current.openEvent)||i.setPositionReference(dM(s,{x:E,y:R,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=Rt(o);function R(I){const M=rn(I);Ye(o,M)?(E.removeEventListener("mousemove",R),h.current=null):y(I.clientX,I.clientY)}if(!r.current.openEvent||ip(r.current.openEvent)){E.addEventListener("mousemove",R);const I=()=>{E.removeEventListener("mousemove",R),h.current=null};return h.current=I,I}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]),be(()=>{a&&(c!=null||u!=null)&&(f.current=!1,y(c,u))},[a,c,u,y]);const T=C.useMemo(()=>{function E(R){let{pointerType:I}=R;p(I)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:b,onMouseEnter:b}},[b]);return C.useMemo(()=>a?{reference:T}:{},[a,T])}const pM={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},mM={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ap=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 Co(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=Kn(),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}=ap(d),{escapeKey:E,outsidePress:R}=ap(p),I=at(P=>{var O;if(!n||!i||!a||P.key!=="Escape")return;const F=(O=s.current.floatingContext)==null?void 0:O.nodeId,_=m?pr(m.nodesRef.current,F):[];if(!S&&(P.stopPropagation(),_.length>0)){let H=!0;if(_.forEach(U=>{var D;if((D=U.context)!=null&&D.open&&!U.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,kO(P)?P.nativeEvent:P,"escape-key")}),M=at(P=>{var O;const F=()=>{var _;I(P),(_=rn(P))==null||_.removeEventListener("keydown",F)};(O=rn(P))==null||O.addEventListener("keydown",F)}),A=at(P=>{var O;const F=b.current;b.current=!1;const _=v.current;if(v.current=!1,c==="click"&&_||F||typeof y=="function"&&!y(P))return;const H=rn(P),U="["+Hn("inert")+"]",D=ut(o.floating).querySelectorAll(U);let $=Me(H)?H:null;for(;$&&!Vn($);){const G=Sn($);if(Vn(G)||!Me(G))break;$=G}if(D.length&&Me(H)&&!FO(H)&&!Ye(H,o.floating)&&Array.from(D).every(G=>!Ye($,G)))return;if(et(H)&&j){const G=H.clientWidth>0&&H.scrollWidth>H.clientWidth,L=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let B=L&&P.offsetX>H.clientWidth;if(L&&Vt(H).direction==="rtl"&&(B=P.offsetX<=H.offsetWidth-H.clientWidth),B||G&&P.offsetY>H.clientHeight)return}const q=(O=s.current.floatingContext)==null?void 0:O.nodeId,J=m&&pr(m.nodesRef.current,q).some(G=>{var L;return nl(P,(L=G.context)==null?void 0:L.elements.floating)});if(nl(P,o.floating)||nl(P,o.domReference)||J)return;const X=m?pr(m.nodesRef.current,q):[];if(X.length>0){let G=!0;if(X.forEach(L=>{var B;if((B=L.context)!=null&&B.open&&!L.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),N=at(P=>{var O;const F=()=>{var _;A(P),(_=rn(P))==null||_.removeEventListener(c,F)};(O=rn(P))==null||O.addEventListener(c,F)});C.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function P(_){r(!1,_,"ancestor-scroll")}const O=ut(o.floating);a&&O.addEventListener("keydown",E?M:I,E),y&&O.addEventListener(c,R?N:A,R);let F=[];return h&&(Me(o.domReference)&&(F=jn(o.domReference)),Me(o.floating)&&(F=F.concat(jn(o.floating))),!Me(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(jn(o.reference.contextElement)))),F=F.filter(_=>{var H;return _!==((H=O.defaultView)==null?void 0:H.visualViewport)}),F.forEach(_=>{_.addEventListener("scroll",P,{passive:!0})}),()=>{a&&O.removeEventListener("keydown",E?M:I,E),y&&O.removeEventListener(c,R?N:A,R),F.forEach(_=>{_.removeEventListener("scroll",P)})}},[s,o,a,y,c,n,r,h,i,S,T,I,E,M,A,R,N]),C.useEffect(()=>{b.current=!1},[y,c]);const k=C.useMemo(()=>({onKeyDown:I,[pM[f]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[I,r,u,f]),j=C.useMemo(()=>({onKeyDown:I,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[mM[c]]:()=>{b.current=!0}}),[I,c]);return C.useMemo(()=>i?{reference:k,floating:j}:{},[i,k,j])}function gM(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=So(),s=C.useRef({}),[i]=C.useState(()=>ub()),a=Yn()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!Me(d)&&XD("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 Po(e){e===void 0&&(e={});const{nodeId:t}=e,n=gM({...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=Kn();be(()=>{u&&(f.current=u)},[u]);const d=jD({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(v=>{const S=Me(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l(S),d.refs.setReference(S)},[d.refs]),m=C.useCallback(v=>{(Me(v)||v===null)&&(f.current=v,i(v)),(Me(d.refs.reference.current)||d.refs.reference.current===null||v!==null&&!Me(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 be(()=>{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 yM(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=Rt(i.domReference);function p(){!n&&et(i.domReference)&&i.domReference===zt(ut(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){Vu(d.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const p=rn(d.nativeEvent);if(l&&Me(p))try{if($u()&&Uv())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!Bu(p))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const p=d.relatedTarget,m=d.nativeEvent,g=Me(p)&&p.hasAttribute(Hn("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||Ye((y=s.current.floatingContext)==null?void 0:y.refs.floating.current,b)||Ye(i.domReference,b)||g||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return C.useMemo(()=>a?{reference:h}:{},[a,h])}const lp="active",cp="selected";function cl(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[lp]:i,[cp]: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&&[lp,cp].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 Ro(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=>cl(a,e,"reference"),t),s=C.useCallback(a=>cl(a,e,"floating"),n),i=C.useCallback(a=>cl(a,e,"item"),r);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let up=!1;function da(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function fp(e,t){return da(t,e===Ku||e===Is,e===oo||e===To)}function ul(e,t,n){return da(t,e===Is,n?e===oo:e===To)||e==="Enter"||e===" "||e===""}function vM(e,t,n){return da(t,n?e===oo:e===To,e===Is)}function dp(e,t,n){return da(t,n?e===To:e===oo,e===Ku)}function xb(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:R,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||li("`useListNavigation` looping must be enabled to allow escaping."),p||li("`useListNavigation` must be virtual to allow escaping.")),v==="vertical"&&S>1&&li("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const M=Yn(),A=Kn(),N=at(a),k=C.useRef(m),j=C.useRef(c??-1),P=C.useRef(null),O=C.useRef(!0),F=C.useRef(N),_=C.useRef(!!o.floating),H=C.useRef(n),U=C.useRef(!1),D=C.useRef(!1),$=gt(b),q=gt(n),J=gt(T),X=gt(o.floating),G=gt(c),[L,B]=C.useState(),[z,V]=C.useState(),Y=at(function(se,me,oe){oe===void 0&&(oe=!1);function ye(ve){p?(B(ve.id),A==null||A.events.emit("virtualfocus",ve),E&&(E.current=ve)):Dn(ve,{preventScroll:!0,sync:Uv()&&$u()?up||U.current:!1})}const Qe=se.current[me.current];Qe&&ye(Qe),requestAnimationFrame(()=>{const ve=se.current[me.current]||Qe;if(!ve)return;Qe||ye(ve);const ot=J.current;ot&&W&&(oe||!O.current)&&(ve.scrollIntoView==null||ve.scrollIntoView(typeof ot=="boolean"?{block:"nearest",inline:"nearest"}:ot))})});be(()=>{document.createElement("div").focus({get preventScroll(){return up=!0,!1}})},[]),be(()=>{l&&(n&&o.floating?k.current&&c!=null&&(D.current=!0,j.current=c,N(c)):_.current&&(j.current=-1,F.current(null)))},[l,n,o.floating,c,N]),be(()=>{if(l&&n&&o.floating)if(i==null){if(U.current=!1,G.current!=null)return;if(_.current&&(j.current=-1,Y(s,j)),(!H.current||!_.current)&&k.current&&(P.current!=null||k.current===!0&&P.current==null)){let se=0;const me=()=>{s.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(me),se++):(j.current=P.current==null||ul(P.current,v,d)||h?ol(s,$.current):Kh(s,$.current),P.current=null,N(j.current))};me()}}else Zo(s,i)||(j.current=i,Y(s,j,D.current),D.current=!1)},[l,n,o.floating,i,G,h,s,v,d,N,Y,$]),be(()=>{var se;if(!l||o.floating||!A||p||!_.current)return;const me=A.nodesRef.current,oe=(se=me.find(ve=>ve.id===M))==null||(se=se.context)==null?void 0:se.elements.floating,ye=zt(ut(o.floating)),Qe=me.some(ve=>ve.context&&Ye(ve.context.elements.floating,ye));oe&&!Qe&&O.current&&oe.focus({preventScroll:!0})},[l,o.floating,A,M,p]),be(()=>{if(!l||!A||!p||M)return;function se(me){V(me.id),E&&(E.current=me)}return A.events.on("virtualfocus",se),()=>{A.events.off("virtualfocus",se)}},[l,A,p,M,E]),be(()=>{F.current=N,_.current=!!o.floating}),be(()=>{n||(P.current=null)},[n]),be(()=>{H.current=n},[n]);const ee=i!=null,W=C.useMemo(()=>{function se(oe){if(!n)return;const ye=s.current.indexOf(oe);ye!==-1&&N(ye)}return{onFocus(oe){let{currentTarget:ye}=oe;se(ye)},onClick:oe=>{let{currentTarget:ye}=oe;return ye.focus({preventScroll:!0})},...g&&{onMouseMove(oe){let{currentTarget:ye}=oe;se(ye)},onPointerLeave(oe){let{pointerType:ye}=oe;!O.current||ye==="touch"||(j.current=-1,Y(s,j),N(null),p||Dn(X.current,{preventScroll:!0}))}}}},[n,X,Y,g,s,N,p]),we=at(se=>{if(O.current=!1,U.current=!0,!q.current&&se.currentTarget===X.current)return;if(h&&dp(se.key,v,d)){mt(se),r(!1,se.nativeEvent,"list-navigation"),et(o.domReference)&&!p&&o.domReference.focus();return}const me=j.current,oe=ol(s,b),ye=Kh(s,b);if(se.key==="Home"&&(mt(se),j.current=oe,N(j.current)),se.key==="End"&&(mt(se),j.current=ye,N(j.current)),S>1){const Qe=R||Array.from({length:s.current.length},()=>({width:1,height:1})),ve=BD(Qe,S,I),ot=ve.findIndex(re=>re!=null&&!ai(s.current,re,b)),Z=ve.reduce((re,xe,Ne)=>xe!=null&&!ai(s.current,xe,b)?Ne:re,-1);if(j.current=ve[$D({current:ve.map(re=>re!=null?s.current[re]:null)},{event:se,orientation:v,loop:f,cols:S,disabledIndices:WD([...b||s.current.map((re,xe)=>ai(s.current,xe)?xe:void 0),void 0],ve),minIndex:ot,maxIndex:Z,prevIndex:HD(j.current>ye?oe:j.current,Qe,ve,S,se.key===Is?"bl":se.key===To?"tr":"tl"),stopEvent:!0})],N(j.current),v==="both")return}if(fp(se.key,v)){if(mt(se),n&&!p&&zt(se.currentTarget.ownerDocument)===se.currentTarget){j.current=ul(se.key,v,d)?oe:ye,N(j.current);return}ul(se.key,v,d)?f?j.current=me>=ye?u&&me!==s.current.length?-1:oe:xt(s,{startingIndex:me,disabledIndices:b}):j.current=Math.min(ye,xt(s,{startingIndex:me,disabledIndices:b})):f?j.current=me<=oe?u&&me!==-1?s.current.length:ye:xt(s,{startingIndex:me,decrement:!0,disabledIndices:b}):j.current=Math.max(oe,xt(s,{startingIndex:me,decrement:!0,disabledIndices:b})),Zo(s,j.current)?N(null):N(j.current)}}),Ue=C.useMemo(()=>p&&n&&ee&&{"aria-activedescendant":z||L},[p,n,ee,z,L]),je=C.useMemo(()=>({"aria-orientation":v==="both"?void 0:v,...!Gv(o.domReference)&&Ue,onKeyDown:we,onPointerMove(){O.current=!0}}),[Ue,we,o.domReference,v]),Ge=C.useMemo(()=>{function se(oe){m==="auto"&&zv(oe.nativeEvent)&&(k.current=!0)}function me(oe){k.current=m,m==="auto"&&Vu(oe.nativeEvent)&&(k.current=!0)}return{...Ue,onKeyDown(oe){O.current=!1;const ye=oe.key.indexOf("Arrow")===0,Qe=vM(oe.key,v,d),ve=dp(oe.key,v,d),ot=fp(oe.key,v),Z=(h?Qe:ot)||oe.key==="Enter"||oe.key.trim()==="";if(p&&n){const ht=A==null?void 0:A.nodesRef.current.find(Pt=>Pt.parentId==null),vt=A&&ht?tM(A.nodesRef.current,ht.id):null;if(ye&&vt&&E){const Pt=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(Qe||ve){var re,xe;const Zn=((re=vt.context)==null?void 0:re.elements.domReference)===oe.currentTarget,Sr=ve&&!Zn?(xe=vt.context)==null?void 0:xe.elements.domReference:Qe?s.current.find(Er=>(Er==null?void 0:Er.id)===L):null;Sr&&(mt(oe),Sr.dispatchEvent(Pt),V(void 0))}if(ot&&vt.context&&vt.context.open&&vt.parentId&&oe.currentTarget!==vt.context.elements.domReference){var Ne;mt(oe),(Ne=vt.context.elements.domReference)==null||Ne.dispatchEvent(Pt);return}}return we(oe)}if(!(!n&&!y&&ye)){if(Z&&(P.current=h&&ot?null:oe.key),h){Qe&&(mt(oe),n?(j.current=ol(s,$.current),N(j.current)):r(!0,oe.nativeEvent,"list-navigation"));return}ot&&(c!=null&&(j.current=c),mt(oe),!n&&y?r(!0,oe.nativeEvent,"list-navigation"):we(oe),n&&N(j.current))}},onFocus(){n&&!p&&N(null)},onPointerDown:me,onMouseDown:se,onClick:se}},[L,Ue,we,$,m,s,h,N,r,n,y,v,d,c,A,p,E]);return C.useMemo(()=>l?{reference:Ge,floating:je,item:W}:{},[l,Ge,je,W])}const bM=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Io(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=bM.get(i))!=null?n:i,l=So(),u=Yn()!=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 hp=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Or(e,t){return typeof e=="function"?e(t):e}function xM(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 wM(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=xM(n,i);return!c&&a==="close"&&l("unmounted"),be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function TM(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(()=>({...Or(s,c),...Or(n,c)})),{isMounted:m,status:g}=wM(e,{duration:i}),y=gt(n),b=gt(r),v=gt(o),S=gt(s);return be(()=>{const T=Or(y.current,c),E=Or(v.current,c),R=Or(S.current,c),I=Or(b.current,c)||Object.keys(T).reduce((M,A)=>(M[A]="",M),{});if(g==="initial"&&p(M=>({transitionProperty:M.transitionProperty,...R,...T})),g==="open"&&p({transitionProperty:Object.keys(I).map(hp).join(","),transitionDuration:f+"ms",...R,...I}),g==="close"){const M=E||T;p({transitionProperty:Object.keys(M).map(hp).join(","),transitionDuration:h+"ms",...R,...M})}},[h,v,y,b,S,f,g,c]),{isMounted:m,styles:d}}function SM(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=gt(u),T=gt(h);be(()=>{r&&(clearTimeout(p.current),y.current=null,m.current="")},[r]),be(()=>{if(r&&m.current===""){var A;g.current=(A=d??i)!=null?A:-1}},[r,d,i]);const E=at(A=>{A?o.current.typing||(o.current.typing=A,v(A)):o.current.typing&&(o.current.typing=A,v(A))}),R=at(A=>{function N(F,_,H){const U=S.current?S.current(_,H):_.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return U?F.indexOf(U):-1}const k=s.current;if(m.current.length>0&&m.current[0]!==" "&&(N(k,k,m.current)===-1?E(!1):A.key===" "&&mt(A)),k==null||T.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(mt(A),E(!0)),k.every(F=>{var _,H;return F?((_=F[0])==null?void 0:_.toLocaleLowerCase())!==((H=F[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===A.key&&(m.current="",g.current=y.current),m.current+=A.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=y.current,E(!1)},f);const P=g.current,O=N(k,[...k.slice((P||0)+1),...k.slice(0,(P||0)+1)],m.current);O!==-1?(b(O),y.current=O):A.key!==" "&&(m.current="",E(!1))}),I=C.useMemo(()=>({onKeyDown:R}),[R]),M=C.useMemo(()=>({onKeyDown:R,onKeyUp(A){A.key===" "&&E(!1)}}),[R,E]);return C.useMemo(()=>c?{reference:I,floating:M}:{},[c,I,M])}function pp(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 EM(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function CM(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:R}=S,I=[E,R],M=rn(S),A=S.type==="mouseleave",N=Ye(m.floating,M),k=Ye(m.domReference,M),j=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),O=p.split("-")[0],F=h>P.right-P.width/2,_=d>P.bottom-P.height/2,H=EM(I,j),U=P.width>j.width,D=P.height>j.height,$=(U?j:P).left,q=(U?j:P).right,J=(D?j:P).top,X=(D?j:P).bottom;if(N&&(s=!0,!A))return;if(k&&(s=!1),k&&!A){s=!0;return}if(A&&Me(S.relatedTarget)&&Ye(m.floating,S.relatedTarget)||b&&pr(b.nodesRef.current,y).some(B=>{let{context:z}=B;return z==null?void 0:z.open}))return;if(O==="top"&&d>=j.bottom-1||O==="bottom"&&d<=j.top+1||O==="left"&&h>=j.right-1||O==="right"&&h<=j.left+1)return T();let G=[];switch(O){case"top":G=[[$,j.top+1],[$,P.bottom-1],[q,P.bottom-1],[q,j.top+1]];break;case"bottom":G=[[$,P.top+1],[$,j.bottom-1],[q,j.bottom-1],[q,P.top+1]];break;case"left":G=[[P.right-1,X],[P.right-1,J],[j.left+1,J],[j.left+1,X]];break;case"right":G=[[j.right-1,X],[j.right-1,J],[P.left+1,J],[P.left+1,X]];break}function L(B){let[z,V]=B;switch(O){case"top":{const Y=[U?z+t/2:F?z+t*4:z-t*4,V+t+1],ee=[U?z-t/2:F?z+t*4:z-t*4,V+t+1],W=[[P.left,F||U?P.bottom-t:P.top],[P.right,F?U?P.bottom-t:P.top:P.bottom-t]];return[Y,ee,...W]}case"bottom":{const Y=[U?z+t/2:F?z+t*4:z-t*4,V-t],ee=[U?z-t/2:F?z+t*4:z-t*4,V-t],W=[[P.left,F||U?P.top+t:P.bottom],[P.right,F?U?P.top+t:P.bottom:P.top+t]];return[Y,ee,...W]}case"left":{const Y=[z+t+1,D?V+t/2:_?V+t*4:V-t*4],ee=[z+t+1,D?V-t/2:_?V+t*4:V-t*4];return[...[[_||D?P.right-t:P.left,P.top],[_?D?P.right-t:P.left:P.right-t,P.bottom]],Y,ee]}case"right":{const Y=[z-t,D?V+t/2:_?V+t*4:V-t*4],ee=[z-t,D?V-t/2:_?V+t*4:V-t*4],W=[[_||D?P.left+t:P.right,P.top],[_?D?P.left+t:P.right:P.left+t,P.bottom]];return[Y,ee,...W]}}}if(!pp([E,R],G)){if(s&&!H)return T();if(!A&&r){const B=c(S.clientX,S.clientY);if(B!==null&&B<.1)return T()}pp([E,R],L([h,d]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Ao=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[ua(10),Yu({fallbackAxisSideDirection:"end"}),Gu(),sb({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Po({open:n,middleware:s,transform:!0,whileElementsMounted:ca,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=fa(l),u=Co(l),f=Io(l),{getReferenceProps:h,getFloatingProps:d}=Ro([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(Eo,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(As,{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(cb,{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]})})})]})},PM=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=Po({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=fa(a),u=Io(a),f=Co(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:d}=Ro([c,u,f]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Gr,{...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(vo,{children:s?x.jsx(Eo,{root:t,children:x.jsx(As,{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})]})},wb=300,RM=500,Tb=(e="")=>De("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),xc=w.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),mp=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=Yn(),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(xc),v=Kn(),S=QD(),T=lb(),{floatingStyles:E,refs:R,context:I}=Po({nodeId:S,open:u,transform:!0,onOpenChange:f,whileElementsMounted:ca,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[ua({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Yu(),Gu()]}),M=Io(I,{role:"menu",enabled:!0}),A=Co(I,{bubbles:!0}),N=hb(I,{enabled:n,delay:{open:wb},handleClose:CM({blockPointerEvents:!0})}),k=fa(I,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),j=xb(I,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:g,scrollItemIntoView:!0,onNavigate:m}),P=SM(I,{activeIndex:p,listRef:y,resetMs:RM,onMatch:u?m:void 0}),{getReferenceProps:O,getFloatingProps:F,getItemProps:_}=Ro([N,k,M,A,j,P]);w.useEffect(()=>{if(!v)return;const U=()=>f(!1),D=$=>{$.nodeId!==S&&$.parentId===l&&f(!1)};return v.events.on("click",U),v.events.on("menuopen",D),()=>{v.events.off("click",U),v.events.off("menuopen",D)}},[v,S,l]),w.useEffect(()=>{u&&v&&v.events.emit("menuopen",{parentId:l,nodeId:S})},[v,u,S,l]);const H=r?i.className:De(Tb(i.className));return x.jsxs(ZD,{id:S,children:[x.jsx(w.Fragment,{children:i.asChild?x.jsx(to,{children:s,ref:bc([R.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,...O(b.getItemProps({...i,onFocus(U){var D;(D=i.onFocus)==null||D.call(i,U),d(!1),b.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:bc([R.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,...O(b.getItemProps({...i,onFocus(U){var D;(D=i.onFocus)==null||D.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(Tu,{size:14})]})]})}),x.jsx(xc.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:_,setHasFocusInside:d,isOpen:u},children:x.jsx(GD,{elementsRef:g,labelsRef:y,children:u&&x.jsx(Eo,{preserveTabOrder:!0,children:x.jsx(As,{context:I,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...F(),ref:R.setFloating,style:{...i.style,...E},className:De("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})})})})})]})}),IM=w.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=w.useContext(xc),a=lb({label:r?null:typeof e=="string"?e:t}),l=Kn(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,ref:bc([a.ref,s]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Tb(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]})}),AM=w.forwardRef((e,t)=>Yn()!==null?x.jsx(mp,{...e,isParent:!1,ref:t}):x.jsx(JD,{children:x.jsx(mp,{...e,isParent:!0,ref:t})})),OM=(e,t)=>Pi()?t:window.matchMedia(e).matches,DM=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(OM(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",MM={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:Ut},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:Ut},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:Ut}},kM={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:Ut},exit:{translateX:["0%","30%"],opacity:0,animationDuration:Ut}},fl={drawer:e=>e==="left"?MM:kM,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}}},FM=uo("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"}}),jM={top:0,left:0,right:0,bottom:-1},NM=e=>e*.62,LM=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=NM(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:jM,whileDrag:{cursor:"grabbing"},className:De("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})},dl={drawer:"right",sheet:"none",dialog:"none"},_M=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=w.useId(),a=w.useId(),l=DM("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:dl[e]:r?dl[e]:dl.sheet,f=l||r?fl[e]:fl.sheet,h=typeof f=="function"?f(u):f,d=l||r?e:"sheet",{refs:p,context:m}=Po({open:s.open,onOpenChange:s.onChange}),g=fa(m),y=Io(m),b=Co(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:v,getFloatingProps:S}=Ro([g,y,b]),T=s.trigger,E=mr(void 0),R=()=>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(Eo,{children:x.jsx(vo,{presenceAffectsLayout:!0,children:s.open?x.jsx(fM,{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(As,{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:FM({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:R,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(Eu,{})})}):null,c&&t?x.jsx(LM,{onChange:s.onChange,parent:p.floating,position:u,sheet:d==="sheet",value:E}):null]})})}):null})})]})},VM=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}),Sb=({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}=Po({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:ca,middleware:[ua(5),Yu({fallbackAxisSideDirection:"start"}),Gu(),sb({element:c,padding:5})]}),p=hb(d,{move:!0,enabled:r,delay:{open:wb}}),m=yM(d,{enabled:r}),g=Co(d,{enabled:r}),y=Io(d,{role:"tooltip",enabled:r}),b=hM(d,{enabled:!!r&&!!t}),{getReferenceProps:v,getFloatingProps:S}=Ro([p,m,g,y,b]);return x.jsxs(w.Fragment,{children:[x.jsx(u,{ref:f.setReference,...v(i),children:s}),x.jsx(Eo,{children:a&&x.jsxs(mo,{...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(cb,{ref:c,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class Ni{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++)Ni.getDescendantProperty(a[l],s,r);else s&&Ni.getDescendantProperty(a,s,r)}else r.push(t);return r}}class _r{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=_r.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=Ni.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=_r.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=_r.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 _r.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 Eb=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:De("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(Sb,{as:"button",type:"button",title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(ky,{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(Dy,{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(TP,{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]}),ha=({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=Ct(),T=e??S.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-component":m,"data-interactive":!!s,className:De("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(Eb,{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})]})},$M=e=>x.jsx(w.Fragment,{children:e.children}),Cb=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??$M,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(xP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),BM={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},HM={caseSensitive:!1,sort:!1},WM=[],zM=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=Ct(),[y,b]=w.useState(!1),[v,S]=w.useState(""),[T,E]=w.useState(m),[R,I]=w.useState(()=>{var V;return((V=e.find(Y=>Y.value===m))==null?void 0:V.label)??m}),[M,A]=w.useState(null),N=w.useRef(WM),k=t&&v!==""?[{value:v,label:v,"data-dynamic":"true"},...e]:e,j=new _r(k,["value","label"],HM).search(v),P=t?void 0:`^(${e.map(V=>`${ac(V.value)}${V.label?"|"+ac(V.label):""}`).join("|")})$`;w.useEffect(()=>{if(d.value){const V=e.find(Y=>Y.value===d.value);E((V==null?void 0:V.label)??d.value)}},[d.value]);const{x:O,y:F,strategy:_,refs:H,context:U}=Po({open:y,transform:!0,strategy:"absolute",onOpenChange:b,whileElementsMounted:ca,middleware:[ua(4),LD({elementContext:"reference",padding:10,apply(V){const ee=V.elements.reference.parentElement,W=ee==null?void 0:ee.getBoundingClientRect().width;Object.assign(V.elements.floating.style,{width:`${W}px`,maxWidth:`${W}px`,minWidth:"max-content",maxHeight:`${Math.min(250,V.availableHeight)}px`})}})]}),D=TM(U,BM),{getReferenceProps:$,getFloatingProps:q,getItemProps:J}=Ro([Io(U,{role:"listbox"}),Co(U),xb(U,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:M,selectedIndex:M,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:V=>A(Y=>V??Y)})]);w.useEffect(()=>{const V=H.reference.current;if(V)return Ui(V)},[]);const X=(V,Y)=>{E(V.value);const ee=H.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",V.value),ee.value=V.value;const W=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(W),d.onChange&&d.onChange(W),I(V.label??""),b(!1),S(""),A(Y)},G=V=>{var ee;const Y=V.target.value;return S(Y),!y&&Y===""?b(!0):(V.target.name=d.name||"",Y?b(!0):(ee=d.onChange)==null?void 0:ee.call(d,V))},L=()=>{b(!0),S("")},B=()=>{var V;S(""),E(""),(V=H.reference.current)==null||V.setAttribute("data-value",""),I(""),$m(H.reference.current),b(!1)},z=d.id||d.name;return x.jsxs(ha,{...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(Oy,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),T?x.jsx("button",{type:"button",onClick:B,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",{...$({...d,onChange:G,onFocus:L,pattern:P,ref:H.setReference,name:`${z}-shadow`,id:`${z}-shadow`,onClick:V=>V.currentTarget.focus(),onKeyDown(V){if(V.key==="Escape")return V.currentTarget.blur(),b(!1);if(V.key==="Enter"){if(M!==null&&j[M])return V.preventDefault(),X(j[M],M);if(j.length===1)return V.preventDefault(),X(j[0],0)}}}),"data-value":T,"data-error":!!f,"data-name":z,"data-target":z,required:h,value:y?v:R||T,"aria-autocomplete":"list",autoComplete:"off",className:De("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(Eo,{preserveTabOrder:!0,children:y?x.jsx(As,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("ul",{...q({ref:H.setFloating,style:{position:_,left:(O??0)+(T?26:16),top:F??0,...D.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:[j.map((V,Y)=>{const ee=T===V.value||T===V.label;return x.jsx(Cb,{...J({onClick:()=>X(V,Y),ref:W=>void(N.current[Y]=W),selected:M===Y}),option:V,active:ee,selected:M===Y},`${V.value}-option`)}),j.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})]})}),Pb=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:De("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:De("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:De("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Rb=(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 R=E.current,I=Ui(E.current),M=r==null?void 0:r(R),A=N=>{const k=N;if(k.key==="Enter"&&R.enterKeyHint==="next"){const j=R.getAttribute("data-next");if(j){const P=document.getElementById(j);if(P)return P.focus(),void k.preventDefault()}}};return R.addEventListener("keydown",A),()=>{M==null||M(),I(),R.removeEventListener("keydown",A)}},[]),x.jsx(ha,{...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:Gc(v,E),className:De("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)})})}),Os=Rb(rv,"input",{type:"text"}),gp=new Date(1970,11,31),hl={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},yp={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},UM={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")},pl=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},GM=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||uv(),l=w.useId(),c=Ct(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[f,h]=w.useState(e||void 0),[d,p]=w.useState(!1),m=pl(u,gp).flatMap(R=>bn.keyof(hl,R.type)?hl[R.type](R.value):[]),g=pl(u,gp).reduce((R,I)=>R+(bn.keyof(yp,I.type)?yp[I.type](I.value):""),""),[y,b]=w.useState(f?pl(u,f).reduce((R,I)=>R+(bn.keyof(hl,I.type)?UM[I.type](f,I.value):""),""):""),v=R=>{const I=R.target.value;if(b(I),m.length===I.length&&m.every((A,N)=>{const k=I.charAt(N);return typeof A=="string"?k===A:A.test(k)})){const A=eo(FI(I,g,new Date));return h(A),r==null?void 0:r(A)}return h(void 0),r==null?void 0:r(void 0)},S=R=>(h(R),r==null||r(R),b(R?jR(R,g):"")),T=Vy(f),E=T?f.toISOString():void 0;return x.jsx(Os,{...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(Ao,{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(bP,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(pv,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?f:void 0})})]})})}),YM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],KM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],qM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],XM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],vp=(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 bp(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?XM:qM:t.binary?KM:YM,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=vp(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=vp(Number(e),t.locale,i),c=n[a];return s+l+r+c}var wc={exports:{}},Xs={exports:{}},Pe={};/** @license React v16.13.1
|
|
177
|
+
*/var WO=["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])"],Di=WO.join(","),qv=typeof Element>"u",ro=qv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mi=!qv&&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},ki=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},zO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},UO=function(t,n,r){if(ki(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Di));return n&&ro.call(t,Di)&&o.unshift(t),o=o.filter(r),o},GO=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!ki(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=ro.call(i,Di);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!ki(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},Xv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Qv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zO(t))&&!Xv(t)?0:t.tabIndex},YO=function(t,n){var r=Qv(t);return r<0&&n&&!Xv(t)?0:r},KO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Zv=function(t){return t.tagName==="INPUT"},qO=function(t){return Zv(t)&&t.type==="hidden"},XO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},ZO=function(t){if(!t.name)return!0;var n=t.form||Mi(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=QO(o,t.form);return!s||s===t},JO=function(t){return Zv(t)&&t.type==="radio"},eD=function(t){return JO(t)&&!ZO(t)},tD=function(t){var n,r=t&&Mi(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,d;r=Mi(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},Bh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},nD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=ro.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(ro.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=Mi(t);if(l&&!l.shadowRoot&&o(l)===!0)return Bh(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(tD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Bh(t);return!1},rD=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 ro.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},oD=function(t,n){return!(n.disabled||ki(n)||qO(n)||nD(n,t)||XO(n)||rD(n))},bc=function(t,n){return!(eD(n)||Qv(n)<0||!oD(t,n))},sD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},iD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=YO(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(KO).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},cs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=GO([t],n.includeContainer,{filter:bc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:sD}):r=UO(t,n.includeContainer,bc.bind(null,n)),iD(r)},aD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ro.call(t,Di)===!1?!1:bc(n,t)};function Hh(e,t,n){let{reference:r,floating:o}=e;const s=yr(t),i=Wu(t),a=Hu(i),l=Bn(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(wo(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const lD=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:d}=Hh(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x:b,y,data:T,reset:S}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=b??u,d=y??d,h={...h,[g]:{...h[g],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=Hh(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function zu(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:d="floating",altBoundary:f=!1,padding:h=0}=xo(t,e),p=Kv(h),g=a[f?d==="floating"?"reference":"floating":d],v=Oi(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=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},S=Oi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(v.top-S.top+p.top)/T.y,bottom:(S.bottom-v.bottom+p.bottom)/T.y,left:(v.left-S.left+p.left)/T.x,right:(S.right-v.right+p.right)/T.x}}const cD=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}=xo(e,t)||{};if(c==null)return{};const d=Kv(u),f={x:n,y:r},h=Wu(o),p=Hu(h),m=await i.getDimensions(c),g=h==="y",v=g?"top":"left",b=g?"bottom":"right",y=g?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-f[h]-s.floating[p],S=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let R=E?E[y]:0;(!R||!await(i.isElement==null?void 0:i.isElement(E)))&&(R=a.floating[y]||s.floating[p]);const I=T/2-S/2,k=R/2-m[p]/2-1,A=on(d[v],k),N=on(d[b],k),M=A,j=R-m[p]-N,P=R/2-m[p]/2+I,O=yc(M,P,j),F=!l.arrow&&wo(o)!=null&&P!==O&&s.reference[p]/2-(P<M?A:N)-m[p]/2<0,V=F?P<M?P-M:P-j:0;return{[h]:f[h]+V,data:{[h]:O,centerOffset:P-O-V,...F&&{alignmentOffset:V}},reset:F}}}),uD=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:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=xo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Bn(o),b=yr(a),y=Bn(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(y||!m?[Ai(a)]:VO(a)),E=p!=="none";!f&&E&&S.push(...BO(a,m,p,T));const R=[a,...S],I=await zu(t,g),k=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&k.push(I[v]),d){const P=_O(o,i,T);k.push(I[P[0]],I[P[1]])}if(A=[...A,{placement:o,overflows:k}],!k.every(P=>P<=0)){var N,M;const P=(((N=s.flip)==null?void 0:N.index)||0)+1,O=R[P];if(O)return{data:{index:P,overflows:A},reset:{placement:O}};let F=(M=A.filter(V=>V.overflows[0]<=0).sort((V,H)=>V.overflows[1]-H.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(h){case"bestFit":{var j;const V=(j=A.filter(H=>{if(E){const z=yr(H.placement);return z===b||z==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(z=>z>0).reduce((z,D)=>z+D,0)]).sort((H,z)=>H[1]-z[1])[0])==null?void 0:j[0];V&&(F=V);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function dD(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Bn(n),a=wo(n),l=yr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=xo(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const fD=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 dD(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}}}}},hD=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:v,y:b}=g;return{x:v,y:b}}},...l}=xo(e,t),c={x:n,y:r},u=await zu(t,l),d=yr(Bn(o)),f=Yv(d);let h=c[f],p=c[d];if(s){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+u[g],y=h-u[v];h=yc(b,h,y)}if(i){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=p+u[g],y=p-u[v];p=yc(b,p,y)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},pD=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}=xo(e,t),l=await zu(t,a),c=Bn(n),u=wo(n),d=yr(n)==="y",{width:f,height:h}=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=h-l.top-l.bottom,v=f-l.left-l.right,b=on(h-l[p],g),y=on(f-l[m],v),T=!t.middlewareData.shift;let S=b,E=y;if(d?E=u||T?on(y,v):v:S=u||T?on(b,g):g,T&&!u){const I=Mt(l.left,0),k=Mt(l.right,0),A=Mt(l.top,0),N=Mt(l.bottom,0);d?E=f-2*(I!==0||k!==0?I+k:Mt(l.left,l.right)):S=h-2*(A!==0||N!==0?A+N:Mt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:S});const R=await o.getDimensions(s.floating);return f!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function Jv(e){const t=Vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ii(n)!==s||Ii(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Uu(e){return Fe(e)?e:e.contextElement}function $r(e){const t=Uu(e);if(!et(t))return $n(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Jv(t);let i=(s?Ii(n.width):n.width)/r,a=(s?Ii(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const mD=$n(0);function eb(e){const t=Rt(e);return!Lu()||!t.visualViewport?mD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function vr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Uu(e);let i=$n(1);t&&(r?Fe(r)&&(i=$r(r)):i=$r(e));const a=gD(s,n,r)?eb(s):$n(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Rt(s),h=r&&Fe(r)?Rt(r):r;let p=f,m=mc(p);for(;m&&r&&h!==p;){const g=$r(m),v=m.getBoundingClientRect(),b=Vt(m),y=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,T=v.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=y,c+=T,p=Rt(m),m=mc(p)}}return Oi({width:u,height:d,x:l,y:c})}function yD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=En(r),a=t?la(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=$n(1);const u=$n(0),d=et(r);if((d||!d&&!s)&&((Gn(r)!=="body"||Rs(i))&&(l=ca(r)),et(r))){const f=vr(r);c=$r(r),u.x=f.x+r.clientLeft,u.y=f.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 vD(e){return Array.from(e.getClientRects())}function tb(e){return vr(En(e)).left+ca(e).scrollLeft}function bD(e){const t=En(e),n=ca(e),r=e.ownerDocument.body,o=Mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+tb(e);const a=-n.scrollTop;return Vt(r).direction==="rtl"&&(i+=Mt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function xD(e,t){const n=Rt(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=Lu();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function wD(e,t){const n=vr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=et(e)?$r(e):$n(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 Wh(e,t,n){let r;if(t==="viewport")r=xD(e,n);else if(t==="document")r=bD(En(e));else if(Fe(t))r=wD(t,n);else{const o=eb(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Oi(r)}function nb(e,t){const n=Sn(e);return n===t||!Fe(n)||Vn(n)?!1:Vt(n).position==="fixed"||nb(n,t)}function TD(e,t){const n=t.get(e);if(n)return n;let r=jn(e,[],!1).filter(a=>Fe(a)&&Gn(a)!=="body"),o=null;const s=Vt(e).position==="fixed";let i=s?Sn(e):e;for(;Fe(i)&&!Vn(i);){const a=Vt(i),l=Nu(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Rs(i)&&!l&&nb(e,i))?r=r.filter(u=>u!==i):o=a,i=Sn(i)}return t.set(e,r),r}function SD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?la(t)?[]:TD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=Wh(t,u,o);return c.top=Mt(d.top,c.top),c.right=on(d.right,c.right),c.bottom=on(d.bottom,c.bottom),c.left=Mt(d.left,c.left),c},Wh(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ED(e){const{width:t,height:n}=Jv(e);return{width:t,height:n}}function CD(e,t,n){const r=et(t),o=En(t),s=n==="fixed",i=vr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=$n(0);if(r||!r&&!s)if((Gn(t)!=="body"||Rs(o))&&(a=ca(t)),r){const d=vr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=tb(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 ol(e){return Vt(e).position==="static"}function zh(e,t){return!et(e)||Vt(e).position==="fixed"?null:t?t(e):e.offsetParent}function rb(e,t){const n=Rt(e);if(la(e))return n;if(!et(e)){let o=Sn(e);for(;o&&!Vn(o);){if(Fe(o)&&!ol(o))return o;o=Sn(o)}return n}let r=zh(e,t);for(;r&&OO(r)&&ol(r);)r=zh(r,t);return r&&Vn(r)&&ol(r)&&!Nu(r)?n:r||DO(e)||n}const PD=async function(e){const t=this.getOffsetParent||rb,n=this.getDimensions,r=await n(e.floating);return{reference:CD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function RD(e){return Vt(e).direction==="rtl"}const ID={convertOffsetParentRelativeRectToViewportRelativeRect:yD,getDocumentElement:En,getClippingRect:SD,getOffsetParent:rb,getElementRects:PD,getClientRects:vD,getDimensions:ED,getScale:$r,isElement:Fe,isRTL:RD};function AD(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:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Lr(u),p=Lr(o.clientWidth-(c+d)),m=Lr(o.clientHeight-(u+f)),g=Lr(c),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Mt(0,on(1,l))||1};let y=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!y)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(T,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return i(!0),s}function ua(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=Uu(e),u=o||s?[...c?jn(c):[],...jn(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?AD(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?vr(e):null;l&&g();function g(){const v=vr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const OD=fD,DD=hD,MD=uD,kD=pD,Uh=cD,FD=(e,t,n)=>{const r=new Map,o={platform:ID,...n},s={...o.platform,_c:r};return lD(e,t,{...o,platform:s})};var ii=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Fi(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(!Fi(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)&&!Fi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ob(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gh(e,t){const n=ob(e);return Math.round(t*n)/n}function Yh(e){const t=C.useRef(e);return ii(()=>{t.current=e}),t}function jD(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,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=C.useState(r);Fi(f,r)||h(r);const[p,m]=C.useState(null),[g,v]=C.useState(null),b=C.useCallback(V=>{V!==E.current&&(E.current=V,m(V))},[]),y=C.useCallback(V=>{V!==R.current&&(R.current=V,v(V))},[]),T=s||p,S=i||g,E=C.useRef(null),R=C.useRef(null),I=C.useRef(u),k=l!=null,A=Yh(l),N=Yh(o),M=C.useCallback(()=>{if(!E.current||!R.current)return;const V={placement:t,strategy:n,middleware:f};N.current&&(V.platform=N.current),FD(E.current,R.current,V).then(H=>{const z={...H,isPositioned:!0};j.current&&!Fi(I.current,z)&&(I.current=z,vs.flushSync(()=>{d(z)}))})},[f,t,n,N]);ii(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[c]);const j=C.useRef(!1);ii(()=>(j.current=!0,()=>{j.current=!1}),[]),ii(()=>{if(T&&(E.current=T),S&&(R.current=S),T&&S){if(A.current)return A.current(T,S,M);M()}},[T,S,M,A,k]);const P=C.useMemo(()=>({reference:E,floating:R,setReference:b,setFloating:y}),[b,y]),O=C.useMemo(()=>({reference:T,floating:S}),[T,S]),F=C.useMemo(()=>{const V={position:n,left:0,top:0};if(!O.floating)return V;const H=Gh(O.floating,u.x),z=Gh(O.floating,u.y);return a?{...V,transform:"translate("+H+"px, "+z+"px)",...ob(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:z}},[n,a,O.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:M,refs:P,elements:O,floatingStyles:F}),[u,M,P,O,F])}const ND=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?Uh({element:r.current,padding:o}).fn(n):{}:r?Uh({element:r,padding:o}).fn(n):{}}}},da=(e,t)=>({...OD(e),options:[e,t]}),Gu=(e,t)=>({...DD(e),options:[e,t]}),Yu=(e,t)=>({...MD(e),options:[e,t]}),LD=(e,t)=>({...kD(e),options:[e,t]}),sb=(e,t)=>({...ND(e),options:[e,t]});function xc(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 ib={...C},_D=ib.useInsertionEffect,VD=_D||(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 VD(()=>{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 Ku="ArrowUp",Is="ArrowDown",oo="ArrowLeft",To="ArrowRight";function Ys(e,t,n){return Math.floor(e/t)!==n}function Zo(e,t){return t<0||t>=e.current.length}function sl(e,t){return xt(e,{disabledIndices:t})}function Kh(e,t){return xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xt(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&&ai(i,a,o));return a}function $D(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Ku){if(u&&mt(n),c===-1)d=l;else if(d=xt(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}Zo(e,d)&&(d=c)}if(n.key===Is&&(u&&mt(n),c===-1?d=a:(d=xt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=xt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Zo(e,d)&&(d=c)),r==="both"){const f=Lr(c/s);n.key===To&&(u&&mt(n),c%s!==s-1?(d=xt(e,{startingIndex:c,disabledIndices:i}),o&&Ys(d,s,f)&&(d=xt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=xt(e,{startingIndex:c-c%s-1,disabledIndices:i})),Ys(d,s,f)&&(d=c)),n.key===oo&&(u&&mt(n),c%s!==0?(d=xt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Ys(d,s,f)&&(d=xt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=xt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Ys(d,s,f)&&(d=c));const h=Lr(l/s)===f;Zo(e,d)&&(o&&h?d=n.key===oo?l:xt(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function BD(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 d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function HD(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 WD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ai(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 qh=0;function Dn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qh);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():qh=requestAnimationFrame(s)}var Te=typeof document<"u"?w.useLayoutEffect:w.useEffect;function zD(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 UD(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 ab=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function GD(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 Te(()=>{const l=new Map(o);Array.from(l.keys()).sort(zD).forEach((u,d)=>{l.set(u,d)}),UD(o,l)||s(l)},[o]),C.createElement(ab.Provider,{value:C.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function lb(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=C.useContext(ab),[a,l]=C.useState(null),c=C.useRef(null),u=C.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var f;const h=t!==void 0;i.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,s,i,t]);return Te(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Te(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),C.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function so(){return so=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},so.apply(this,arguments)}let Xh=!1,YD=0;const Qh=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+YD++;function KD(){const[e,t]=C.useState(()=>Xh?Qh():void 0);return Te(()=>{e==null&&t(Qh())},[]),C.useEffect(()=>{Xh=!0},[]),e}const qD=ib.useId,So=qD||KD;let us;process.env.NODE_ENV!=="production"&&(us=new Set);function li(){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=us)!=null&&e.has(o))){var s;(s=us)==null||s.add(o),console.warn(o)}}function XD(){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=us)!=null&&e.has(o))){var s;(s=us)==null||s.add(o),console.error(o)}}const cb=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:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||li("The `ref` prop is required for `FloatingArrow`."));const g=So(),[v,b]=C.useState(!1);if(Te(()=>{if(!o)return;Vt(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const y=c*2,T=y/2,S=i/2*(l/-8+1),E=a/2*l/4,[R,I]=r.split("-"),k=!!f,A=R==="top"||R==="bottom",N=u&&I==="end"?"bottom":"top";let M=u&&I==="end"?"right":"left";u&&v&&(M=I==="end"?"left":"right");const j=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",O=f||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",F={top:k?"rotate(180deg)":"",left:k?"rotate(90deg)":"rotate(-90deg)",bottom:k?"":"rotate(180deg)",right:k?"rotate(-90deg)":"rotate(90deg)"}[R];return C.createElement("svg",so({},m,{"aria-hidden":!0,ref:n,width:k?i:i+y,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[M]:j,[N]:P,[R]:A||k?"100%":"calc(100% - "+y/2+"px)",transform:""+F+(h??""),...p}}),y>0&&C.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:y+(f?0:1),d:O}),C.createElement("path",{stroke:y&&!f?m.fill:"none",d:O}),C.createElement("clipPath",{id:g},C.createElement("rect",{x:-T,y:T*(k?-1:1),width:i+y,height:i})))});function ub(){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 db=C.createContext(null),fb=C.createContext(null),Yn=()=>{var e;return((e=C.useContext(db))==null?void 0:e.id)||null},Kn=()=>C.useContext(fb);function QD(e){const t=So(),n=Kn(),o=Yn();return Te(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function ZD(e){const{children:t,id:n}=e,r=Yn();return C.createElement(db.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function JD(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(()=>ub())[0];return C.createElement(fb.Provider,{value:C.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function Hn(e){return"data-floating-ui-"+e}function gt(e){const t=w.useRef(e);return Te(()=>{t.current=e}),t}const Zh=Hn("safe-polygon");function il(e,t,n){return n&&!no(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function hb(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:d=0,move:f=!0}=t,h=Kn(),p=Yn(),m=gt(c),g=gt(l),v=gt(n),b=C.useRef(),y=C.useRef(-1),T=C.useRef(),S=C.useRef(-1),E=C.useRef(!0),R=C.useRef(!1),I=C.useRef(()=>{}),k=C.useCallback(()=>{var O;const F=(O=o.current.openEvent)==null?void 0:O.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);C.useEffect(()=>{if(!a)return;function O(F){let{open:V}=F;V||(clearTimeout(y.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",O),()=>{s.off("openchange",O)}},[a,s]),C.useEffect(()=>{if(!a||!m.current||!n)return;function O(V){k()&&r(!1,V,"hover")}const F=ut(i.floating).documentElement;return F.addEventListener("mouseleave",O),()=>{F.removeEventListener("mouseleave",O)}},[i.floating,n,r,a,m,k]);const A=C.useCallback(function(O,F,V){F===void 0&&(F=!0),V===void 0&&(V="hover");const H=il(g.current,"close",b.current);H&&!T.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,O,V),H)):F&&(clearTimeout(y.current),r(!1,O,V))},[g,r]),N=at(()=>{I.current(),T.current=void 0}),M=at(()=>{if(R.current){const O=ut(i.floating).body;O.style.pointerEvents="",O.removeAttribute(Zh),R.current=!1}});C.useEffect(()=>{if(!a)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(D){if(clearTimeout(y.current),E.current=!1,u&&!no(b.current)||d>0&&!il(g.current,"open"))return;const $=il(g.current,"open",b.current);$?y.current=window.setTimeout(()=>{v.current||r(!0,D,"hover")},$):r(!0,D,"hover")}function V(D){if(O())return;I.current();const $=ut(i.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),T.current=m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){M(),N(),A(D,!0,"safe-polygon")}});const J=T.current;$.addEventListener("mousemove",J),I.current=()=>{$.removeEventListener("mousemove",J)};return}(b.current==="touch"?!Ye(i.floating,D.relatedTarget):!0)&&A(D)}function H(D){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){M(),N(),A(D)}})(D))}if(Fe(i.domReference)){var z;const D=i.domReference;return n&&D.addEventListener("mouseleave",H),(z=i.floating)==null||z.addEventListener("mouseleave",H),f&&D.addEventListener("mousemove",F,{once:!0}),D.addEventListener("mouseenter",F),D.addEventListener("mouseleave",V),()=>{var $;n&&D.removeEventListener("mouseleave",H),($=i.floating)==null||$.removeEventListener("mouseleave",H),f&&D.removeEventListener("mousemove",F),D.removeEventListener("mouseenter",F),D.removeEventListener("mouseleave",V)}}},[i,a,e,u,d,f,A,N,M,r,n,v,h,g,m,o]),Te(()=>{var O;if(a&&n&&(O=m.current)!=null&&O.__options.blockPointerEvents&&k()){const V=ut(i.floating).body;V.setAttribute(Zh,""),V.style.pointerEvents="none",R.current=!0;const H=i.floating;if(Fe(i.domReference)&&H){var F;const z=i.domReference,D=h==null||(F=h.nodesRef.current.find($=>$.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return D&&(D.style.pointerEvents=""),z.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{z.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,i,h,m,k]),Te(()=>{n||(b.current=void 0,N(),M())},[n,N,M]),C.useEffect(()=>()=>{N(),clearTimeout(y.current),clearTimeout(S.current),M()},[a,i.domReference,N,M]);const j=C.useMemo(()=>{function O(F){b.current=F.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(F){const{nativeEvent:V}=F;function H(){!E.current&&!v.current&&r(!0,V,"hover")}u&&!no(b.current)||n||d===0||(clearTimeout(S.current),b.current==="touch"?H():S.current=window.setTimeout(H,d))}}},[u,r,n,v,d]),P=C.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(O){A(O.nativeEvent,!1)}}),[A]);return C.useMemo(()=>a?{reference:j,floating:P}:{},[a,j,P])}function eM(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 tM(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 Ar=new WeakMap,Ks=new WeakSet,qs={},al=0;const nM=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,pb=e=>e&&(e.host||pb(e.parentNode)),rM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=pb(n);return e.contains(r)?r:null}).filter(n=>n!=null);function oM(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=rM(t,e),a=new Set,l=new Set(i),c=[];qs[o]||(qs[o]=new WeakMap);const u=qs[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(Gn(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,g=m!==null&&m!=="false",v=(Ar.get(p)||0)+1,b=(u.get(p)||0)+1;Ar.set(p,v),u.set(p,b),c.push(p),v===1&&g&&Ks.add(p),b===1&&p.setAttribute(o,""),!g&&s&&p.setAttribute(s,"true")}})}return al++,()=>{c.forEach(h=>{const p=(Ar.get(h)||0)-1,m=(u.get(h)||0)-1;Ar.set(h,p),u.set(h,m),p||(!Ks.has(h)&&s&&h.removeAttribute(s),Ks.delete(h)),m||h.removeAttribute(o)}),al--,al||(Ar=new WeakMap,Ar=new WeakMap,Ks=new WeakSet,qs={})}}function Jh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ut(e[0]).body;return oM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const io=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function mb(e,t){const n=cs(e,io());t==="prev"&&n.reverse();const r=n.indexOf(zt(ut(e)));return n.slice(r+1)[0]}function gb(){return mb(document.body,"next")}function yb(){return mb(document.body,"prev")}function Jo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ye(n,r)}function sM(e){cs(e,io()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function iM(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 aM(e,t,n){const r=e.indexOf(t);function o(i){const a=Hn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||Ye(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const qu={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 lM;function ep(e){e.key==="Tab"&&(e.target,clearTimeout(lM))}const ji=C.forwardRef(function(t,n){const[r,o]=C.useState();Te(()=>($u()&&o("button"),document.addEventListener("keydown",ep),()=>{document.removeEventListener("keydown",ep)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Hn("focus-guard")]:"",style:qu};return C.createElement("span",so({},t,s))}),vb=C.createContext(null),tp=Hn("portal");function cM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=So(),o=bb(),[s,i]=C.useState(null),a=C.useRef(null);return Te(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Te(()=>{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(tp,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Te(()=>{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(tp,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function Eo(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=cM({id:n,root:r}),[i,a]=C.useState(null),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),d=C.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return C.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&Jo(p)&&(p.type==="focusin"?iM:sM)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),C.createElement(vb.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&C.createElement(ji,{"data-type":"outside",ref:l,onFocus:h=>{if(Jo(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=yb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&C.createElement("span",{"aria-owns":s.id,style:qu}),s&&vs.createPortal(t,s),f&&s&&C.createElement(ji,{"data-type":"outside",ref:c,onFocus:h=>{if(Jo(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=gb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const bb=()=>C.useContext(vb),np=20;let sr=[];function ll(e){sr=sr.filter(n=>n.isConnected);let t=e;if(!(!t||Gn(t)==="body")){if(!aD(t,io())){const n=cs(t,io())[0];n&&(t=n)}sr.push(t),sr.length>np&&(sr=sr.slice(-np))}}function rp(){return sr.slice().reverse().find(e=>e.isConnected)}const uM=C.forwardRef(function(t,n){return C.createElement("button",so({},t,{type:"button",ref:n,tabIndex:-1,style:qu}))});function As(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:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:g,dataRef:v,floatingId:b,elements:{domReference:y,floating:T}}=t,S=typeof i=="number"&&i<0,E=Gv(y)&&S,R=nM()?s:!0,I=gt(o),k=gt(i),A=gt(a),N=Kn(),M=bb(),j=C.useRef(null),P=C.useRef(null),O=C.useRef(!1),F=C.useRef(!1),V=C.useRef(-1),H=M!=null,z=T==null?void 0:T.firstElementChild,D=(z==null?void 0:z.id)===b?z:T,$=at(function(G){return G===void 0&&(G=D),G?cs(G,io()):[]}),K=at(G=>{const L=$(G);return I.current.map(B=>y&&B==="reference"?y:D&&B==="floating"?D:L).filter(Boolean).flat()});C.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){Ye(D,zt(ut(D)))&&$().length===0&&!E&&mt(B);const W=K(),U=rn(B);I.current[0]==="reference"&&U===y&&(mt(B),B.shiftKey?Dn(W[W.length-1]):Dn(W[1])),I.current[1]==="floating"&&U===D&&B.shiftKey&&(mt(B),Dn(W[0]))}}const L=ut(D);return L.addEventListener("keydown",G),()=>{L.removeEventListener("keydown",G)}},[r,y,D,c,I,E,$,K]),C.useEffect(()=>{if(r||!T)return;function G(L){const B=rn(L),U=$().indexOf(B);U!==-1&&(V.current=U)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,$]),C.useEffect(()=>{if(r||!d)return;function G(){F.current=!0,setTimeout(()=>{F.current=!1})}function L(B){const W=B.relatedTarget;queueMicrotask(()=>{const U=!(Ye(y,W)||Ye(T,W)||Ye(W,T)||Ye(M==null?void 0:M.portalNode,W)||W!=null&&W.hasAttribute(Hn("focus-guard"))||N&&(pr(N.nodesRef.current,p).find(q=>{var te,_;return Ye((te=q.context)==null?void 0:te.elements.floating,W)||Ye((_=q.context)==null?void 0:_.elements.domReference,W)})||eM(N.nodesRef.current,p).find(q=>{var te,_;return((te=q.context)==null?void 0:te.elements.floating)===W||((_=q.context)==null?void 0:_.elements.domReference)===W})));if(l&&U&&zt(ut(D))===ut(D).body){et(D)&&(D==null||D.focus());const q=V.current,te=$(),_=te[q]||te[te.length-1]||D;et(_)&&_.focus()}(E||!c)&&W&&U&&!F.current&&W!==rp()&&(O.current=!0,m(!1,B))})}if(T&&et(y))return y.addEventListener("focusout",L),y.addEventListener("pointerdown",G),T.addEventListener("focusout",L),()=>{y.removeEventListener("focusout",L),y.removeEventListener("pointerdown",G),T.removeEventListener("focusout",L)}},[r,y,T,D,c,p,N,M,m,d,l,$,E]),C.useEffect(()=>{var G;if(r)return;const L=Array.from((M==null||(G=M.portalNode)==null?void 0:G.querySelectorAll("["+Hn("portal")+"]"))||[]);if(T){const B=[T,...L,j.current,P.current,I.current.includes("reference")||E?y:null].filter(U=>U!=null),W=c||E?Jh(B,R,!R):Jh(B);return()=>{W()}}},[r,y,T,c,I,M,E,R]),Te(()=>{if(r||!et(D))return;const G=ut(D),L=zt(G);queueMicrotask(()=>{const B=K(D),W=k.current,U=(typeof W=="number"?B[W]:W.current)||D,q=Ye(D,L);!S&&!q&&f&&Dn(U,{preventScroll:U===D})})},[r,f,D,S,K,k]),Te(()=>{if(r||!D)return;let G=!1;const L=ut(D),B=zt(L);let U=v.current.openEvent;const q=h.domReference.current;ll(B);function te(_){let{open:ae,reason:he,event:ve,nested:We}=_;ae&&(U=ve),he==="escape-key"&&h.domReference.current&&ll(h.domReference.current),he==="hover"&&ve.type==="mouseleave"&&(O.current=!0),he==="outside-press"&&(We?(O.current=!1,G=!0):O.current=!(zv(ve)||Vu(ve)))}return g.on("openchange",te),()=>{g.off("openchange",te);const _=zt(L),ae=Ye(T,_)||N&&pr(N.nodesRef.current,p).some(oe=>{var ye;return Ye((ye=oe.context)==null?void 0:ye.elements.floating,_)});(ae||U&&["click","mousedown"].includes(U.type))&&h.domReference.current&&ll(h.domReference.current);const ve=q||B,We=cs(ut(ve).body,io());queueMicrotask(()=>{let oe=rp();!oe&&et(ve)&&T&&(oe=aM(We,ve,T)),A.current&&!O.current&&et(oe)&&(!(oe!==_&&_!==L.body)||ae)&&oe.focus({preventScroll:G})})}},[r,T,D,A,v,h,g,N,p]),Te(()=>{if(!r&&M)return M.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{M.setFocusManagerState(null)}},[r,M,c,f,m,h,d]),Te(()=>{if(r||!D||typeof MutationObserver!="function"||S)return;const G=()=>{const B=D.getAttribute("tabindex"),W=$(),U=zt(ut(T)),q=W.indexOf(U);q!==-1&&(V.current=q),I.current.includes("floating")||U!==h.domReference.current&&W.length===0?B!=="0"&&D.setAttribute("tabindex","0"):B!=="-1"&&D.setAttribute("tabindex","-1")};G();const L=new MutationObserver(G);return L.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{L.disconnect()}},[r,T,D,h,I,$,S]);function J(G){return r||!u||!c?null:C.createElement(uM,{ref:G==="start"?j:P,onClick:L=>m(!1,L.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&R&&(c?!E:!0)&&(H||c);return C.createElement(C.Fragment,null,X&&C.createElement(ji,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:G=>{if(c){const B=K();Dn(o[0]==="reference"?B[0]:B[B.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(O.current=!1,Jo(G,M.portalNode)){const B=gb()||y;B==null||B.focus()}else{var L;(L=M.beforeOutsideRef.current)==null||L.focus()}}}),!E&&J("start"),n,J("end"),X&&C.createElement(ji,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:G=>{if(c)Dn(K()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(d&&(O.current=!0),Jo(G,M.portalNode)){const B=yb()||y;B==null||B.focus()}else{var L;(L=M.afterOutsideRef.current)==null||L.focus()}}}))}const cl=new Set,dM=C.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=So();return Te(()=>{if(!r)return;cl.add(s);const i=/iP(hone|ad|od)|iOS/.test(_u()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(g))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{cl.delete(s),cl.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),C.createElement("div",so({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function op(e){return et(e.target)&&e.target.tagName==="BUTTON"}function sp(e){return Bu(e)}function fa(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,d=C.useRef(),f=C.useRef(!1),h=C.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.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=d.current;if(a==="mousedown"&&d.current){d.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){d.current=void 0,!(p.defaultPrevented||!u||op(p))&&(p.key===" "&&!sp(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||op(p)||sp(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return C.useMemo(()=>i?{reference:h}:{},[i,h])}function fM(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,d=i.height,f=i.x,h=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function ip(e){return e!=null&&e.clientX!=null}function hM(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,d=C.useRef(!1),f=C.useRef(null),[h,p]=C.useState(),[m,g]=C.useState([]),v=at((E,R)=>{d.current||r.current.openEvent&&!ip(r.current.openEvent)||i.setPositionReference(fM(s,{x:E,y:R,axis:l,dataRef:r,pointerType:h}))}),b=at(E=>{c!=null||u!=null||(n?f.current||g([]):v(E.clientX,E.clientY))}),y=no(h)?o:n,T=C.useCallback(()=>{if(!y||!a||c!=null||u!=null)return;const E=Rt(o);function R(I){const k=rn(I);Ye(o,k)?(E.removeEventListener("mousemove",R),f.current=null):v(I.clientX,I.clientY)}if(!r.current.openEvent||ip(r.current.openEvent)){E.addEventListener("mousemove",R);const I=()=>{E.removeEventListener("mousemove",R),f.current=null};return f.current=I,I}i.setPositionReference(s)},[y,a,c,u,o,r,i,s,v]);C.useEffect(()=>T(),[T,m]),C.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),C.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),Te(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const S=C.useMemo(()=>{function E(R){let{pointerType:I}=R;p(I)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:b,onMouseEnter:b}},[b]);return C.useMemo(()=>a?{reference:S}:{},[a,S])}const pM={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},mM={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ap=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 Co(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:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=Kn(),g=at(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,b=C.useRef(!1),y=C.useRef(!1),{escapeKey:T,outsidePress:S}=ap(h),{escapeKey:E,outsidePress:R}=ap(p),I=at(P=>{var O;if(!n||!i||!a||P.key!=="Escape")return;const F=(O=s.current.floatingContext)==null?void 0:O.nodeId,V=m?pr(m.nodesRef.current,F):[];if(!T&&(P.stopPropagation(),V.length>0)){let H=!0;if(V.forEach(z=>{var D;if((D=z.context)!=null&&D.open&&!z.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,kO(P)?P.nativeEvent:P,"escape-key")}),k=at(P=>{var O;const F=()=>{var V;I(P),(V=rn(P))==null||V.removeEventListener("keydown",F)};(O=rn(P))==null||O.addEventListener("keydown",F)}),A=at(P=>{var O;const F=b.current;b.current=!1;const V=y.current;if(y.current=!1,c==="click"&&V||F||typeof v=="function"&&!v(P))return;const H=rn(P),z="["+Hn("inert")+"]",D=ut(o.floating).querySelectorAll(z);let $=Fe(H)?H:null;for(;$&&!Vn($);){const G=Sn($);if(Vn(G)||!Fe(G))break;$=G}if(D.length&&Fe(H)&&!FO(H)&&!Ye(H,o.floating)&&Array.from(D).every(G=>!Ye($,G)))return;if(et(H)&&j){const G=H.clientWidth>0&&H.scrollWidth>H.clientWidth,L=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let B=L&&P.offsetX>H.clientWidth;if(L&&Vt(H).direction==="rtl"&&(B=P.offsetX<=H.offsetWidth-H.clientWidth),B||G&&P.offsetY>H.clientHeight)return}const K=(O=s.current.floatingContext)==null?void 0:O.nodeId,J=m&&pr(m.nodesRef.current,K).some(G=>{var L;return rl(P,(L=G.context)==null?void 0:L.elements.floating)});if(rl(P,o.floating)||rl(P,o.domReference)||J)return;const X=m?pr(m.nodesRef.current,K):[];if(X.length>0){let G=!0;if(X.forEach(L=>{var B;if((B=L.context)!=null&&B.open&&!L.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),N=at(P=>{var O;const F=()=>{var V;A(P),(V=rn(P))==null||V.removeEventListener(c,F)};(O=rn(P))==null||O.addEventListener(c,F)});C.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function P(V){r(!1,V,"ancestor-scroll")}const O=ut(o.floating);a&&O.addEventListener("keydown",E?k:I,E),v&&O.addEventListener(c,R?N:A,R);let F=[];return f&&(Fe(o.domReference)&&(F=jn(o.domReference)),Fe(o.floating)&&(F=F.concat(jn(o.floating))),!Fe(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(jn(o.reference.contextElement)))),F=F.filter(V=>{var H;return V!==((H=O.defaultView)==null?void 0:H.visualViewport)}),F.forEach(V=>{V.addEventListener("scroll",P,{passive:!0})}),()=>{a&&O.removeEventListener("keydown",E?k:I,E),v&&O.removeEventListener(c,R?N:A,R),F.forEach(V=>{V.removeEventListener("scroll",P)})}},[s,o,a,v,c,n,r,f,i,T,S,I,E,k,A,R,N]),C.useEffect(()=>{b.current=!1},[v,c]);const M=C.useMemo(()=>({onKeyDown:I,[pM[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[I,r,u,d]),j=C.useMemo(()=>({onKeyDown:I,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[mM[c]]:()=>{b.current=!0}}),[I,c]);return C.useMemo(()=>i?{reference:M,floating:j}:{},[i,M,j])}function gM(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=So(),s=C.useRef({}),[i]=C.useState(()=>ub()),a=Yn()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Fe(h)&&XD("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((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=C.useMemo(()=>({setPositionReference:c}),[]),f=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:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Po(e){e===void 0&&(e={});const{nodeId:t}=e,n=gM({...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,d=C.useRef(null),f=Kn();Te(()=>{u&&(d.current=u)},[u]);const h=jD({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(y=>{const T=Fe(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(T),h.refs.setReference(T)},[h.refs]),m=C.useCallback(y=>{(Fe(y)||y===null)&&(d.current=y,i(y)),(Fe(h.refs.reference.current)||h.refs.reference.current===null||y!==null&&!Fe(y))&&h.refs.setReference(y)},[h.refs]),g=C.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=C.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),b=C.useMemo(()=>({...h,...r,refs:g,elements:v,nodeId:t}),[h,g,v,t,r]);return Te(()=>{r.dataRef.current.floatingContext=b;const y=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);y&&(y.context=b)}),C.useMemo(()=>({...h,context:b,refs:g,elements:v}),[h,g,v,b])}function yM(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(),d=C.useRef(!0);C.useEffect(()=>{if(!a)return;const h=Rt(i.domReference);function p(){!n&&et(i.domReference)&&i.domReference===zt(ut(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),C.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),C.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=C.useMemo(()=>({onPointerDown(h){Vu(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=rn(h.nativeEvent);if(l&&Fe(p))try{if($u()&&Uv())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Bu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,g=Fe(p)&&p.hasAttribute(Hn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=zt(i.domReference?i.domReference.ownerDocument:document);!p&&b===i.domReference||Ye((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Ye(i.domReference,b)||g||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return C.useMemo(()=>a?{reference:f}:{},[a,f])}const lp="active",cp="selected";function ul(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[lp]:i,[cp]: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&&[lp,cp].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(g=>g(...p)).find(g=>g!==void 0)}}}else i[c]=u}),i),{})}}function Ro(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=>ul(a,e,"reference"),t),s=C.useCallback(a=>ul(a,e,"floating"),n),i=C.useCallback(a=>ul(a,e,"item"),r);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let up=!1;function ha(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function dp(e,t){return ha(t,e===Ku||e===Is,e===oo||e===To)}function dl(e,t,n){return ha(t,e===Is,n?e===oo:e===To)||e==="Enter"||e===" "||e===""}function vM(e,t,n){return ha(t,n?e===oo:e===To,e===Is)}function fp(e,t,n){return ha(t,n?e===To:e===oo,e===Ku)}function xb(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:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:y="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:R,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||li("`useListNavigation` looping must be enabled to allow escaping."),p||li("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&T>1&&li("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const k=Yn(),A=Kn(),N=at(a),M=C.useRef(m),j=C.useRef(c??-1),P=C.useRef(null),O=C.useRef(!0),F=C.useRef(N),V=C.useRef(!!o.floating),H=C.useRef(n),z=C.useRef(!1),D=C.useRef(!1),$=gt(b),K=gt(n),J=gt(S),X=gt(o.floating),G=gt(c),[L,B]=C.useState(),[W,U]=C.useState(),q=at(function(oe,ye,se){se===void 0&&(se=!1);function xe(we){p?(B(we.id),A==null||A.events.emit("virtualfocus",we),E&&(E.current=we)):Dn(we,{preventScroll:!0,sync:Uv()&&$u()?up||z.current:!1})}const Qe=oe.current[ye.current];Qe&&xe(Qe),requestAnimationFrame(()=>{const we=oe.current[ye.current]||Qe;if(!we)return;Qe||xe(we);const ot=J.current;ot&&_&&(se||!O.current)&&(we.scrollIntoView==null||we.scrollIntoView(typeof ot=="boolean"?{block:"nearest",inline:"nearest"}:ot))})});Te(()=>{document.createElement("div").focus({get preventScroll(){return up=!0,!1}})},[]),Te(()=>{l&&(n&&o.floating?M.current&&c!=null&&(D.current=!0,j.current=c,N(c)):V.current&&(j.current=-1,F.current(null)))},[l,n,o.floating,c,N]),Te(()=>{if(l&&n&&o.floating)if(i==null){if(z.current=!1,G.current!=null)return;if(V.current&&(j.current=-1,q(s,j)),(!H.current||!V.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let oe=0;const ye=()=>{s.current[0]==null?(oe<2&&(oe?requestAnimationFrame:queueMicrotask)(ye),oe++):(j.current=P.current==null||dl(P.current,y,h)||f?sl(s,$.current):Kh(s,$.current),P.current=null,N(j.current))};ye()}}else Zo(s,i)||(j.current=i,q(s,j,D.current),D.current=!1)},[l,n,o.floating,i,G,f,s,y,h,N,q,$]),Te(()=>{var oe;if(!l||o.floating||!A||p||!V.current)return;const ye=A.nodesRef.current,se=(oe=ye.find(we=>we.id===k))==null||(oe=oe.context)==null?void 0:oe.elements.floating,xe=zt(ut(o.floating)),Qe=ye.some(we=>we.context&&Ye(we.context.elements.floating,xe));se&&!Qe&&O.current&&se.focus({preventScroll:!0})},[l,o.floating,A,k,p]),Te(()=>{if(!l||!A||!p||k)return;function oe(ye){U(ye.id),E&&(E.current=ye)}return A.events.on("virtualfocus",oe),()=>{A.events.off("virtualfocus",oe)}},[l,A,p,k,E]),Te(()=>{F.current=N,V.current=!!o.floating}),Te(()=>{n||(P.current=null)},[n]),Te(()=>{H.current=n},[n]);const te=i!=null,_=C.useMemo(()=>{function oe(se){if(!n)return;const xe=s.current.indexOf(se);xe!==-1&&N(xe)}return{onFocus(se){let{currentTarget:xe}=se;oe(xe)},onClick:se=>{let{currentTarget:xe}=se;return xe.focus({preventScroll:!0})},...g&&{onMouseMove(se){let{currentTarget:xe}=se;oe(xe)},onPointerLeave(se){let{pointerType:xe}=se;!O.current||xe==="touch"||(j.current=-1,q(s,j),N(null),p||Dn(X.current,{preventScroll:!0}))}}}},[n,X,q,g,s,N,p]),ae=at(oe=>{if(O.current=!1,z.current=!0,!K.current&&oe.currentTarget===X.current)return;if(f&&fp(oe.key,y,h)){mt(oe),r(!1,oe.nativeEvent,"list-navigation"),et(o.domReference)&&!p&&o.domReference.focus();return}const ye=j.current,se=sl(s,b),xe=Kh(s,b);if(oe.key==="Home"&&(mt(oe),j.current=se,N(j.current)),oe.key==="End"&&(mt(oe),j.current=xe,N(j.current)),T>1){const Qe=R||Array.from({length:s.current.length},()=>({width:1,height:1})),we=BD(Qe,T,I),ot=we.findIndex(re=>re!=null&&!ai(s.current,re,b)),Z=we.reduce((re,Se,Le)=>Se!=null&&!ai(s.current,Se,b)?Le:re,-1);if(j.current=we[$D({current:we.map(re=>re!=null?s.current[re]:null)},{event:oe,orientation:y,loop:d,cols:T,disabledIndices:WD([...b||s.current.map((re,Se)=>ai(s.current,Se)?Se:void 0),void 0],we),minIndex:ot,maxIndex:Z,prevIndex:HD(j.current>xe?se:j.current,Qe,we,T,oe.key===Is?"bl":oe.key===To?"tr":"tl"),stopEvent:!0})],N(j.current),y==="both")return}if(dp(oe.key,y)){if(mt(oe),n&&!p&&zt(oe.currentTarget.ownerDocument)===oe.currentTarget){j.current=dl(oe.key,y,h)?se:xe,N(j.current);return}dl(oe.key,y,h)?d?j.current=ye>=xe?u&&ye!==s.current.length?-1:se:xt(s,{startingIndex:ye,disabledIndices:b}):j.current=Math.min(xe,xt(s,{startingIndex:ye,disabledIndices:b})):d?j.current=ye<=se?u&&ye!==-1?s.current.length:xe:xt(s,{startingIndex:ye,decrement:!0,disabledIndices:b}):j.current=Math.max(se,xt(s,{startingIndex:ye,decrement:!0,disabledIndices:b})),Zo(s,j.current)?N(null):N(j.current)}}),he=C.useMemo(()=>p&&n&&te&&{"aria-activedescendant":W||L},[p,n,te,W,L]),ve=C.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!Gv(o.domReference)&&he,onKeyDown:ae,onPointerMove(){O.current=!0}}),[he,ae,o.domReference,y]),We=C.useMemo(()=>{function oe(se){m==="auto"&&zv(se.nativeEvent)&&(M.current=!0)}function ye(se){M.current=m,m==="auto"&&Vu(se.nativeEvent)&&(M.current=!0)}return{...he,onKeyDown(se){O.current=!1;const xe=se.key.indexOf("Arrow")===0,Qe=vM(se.key,y,h),we=fp(se.key,y,h),ot=dp(se.key,y),Z=(f?Qe:ot)||se.key==="Enter"||se.key.trim()==="";if(p&&n){const ht=A==null?void 0:A.nodesRef.current.find(Pt=>Pt.parentId==null),vt=A&&ht?tM(A.nodesRef.current,ht.id):null;if(xe&&vt&&E){const Pt=new KeyboardEvent("keydown",{key:se.key,bubbles:!0});if(Qe||we){var re,Se;const Zn=((re=vt.context)==null?void 0:re.elements.domReference)===se.currentTarget,Sr=we&&!Zn?(Se=vt.context)==null?void 0:Se.elements.domReference:Qe?s.current.find(Er=>(Er==null?void 0:Er.id)===L):null;Sr&&(mt(se),Sr.dispatchEvent(Pt),U(void 0))}if(ot&&vt.context&&vt.context.open&&vt.parentId&&se.currentTarget!==vt.context.elements.domReference){var Le;mt(se),(Le=vt.context.elements.domReference)==null||Le.dispatchEvent(Pt);return}}return ae(se)}if(!(!n&&!v&&xe)){if(Z&&(P.current=f&&ot?null:se.key),f){Qe&&(mt(se),n?(j.current=sl(s,$.current),N(j.current)):r(!0,se.nativeEvent,"list-navigation"));return}ot&&(c!=null&&(j.current=c),mt(se),!n&&v?r(!0,se.nativeEvent,"list-navigation"):ae(se),n&&N(j.current))}},onFocus(){n&&!p&&N(null)},onPointerDown:ye,onMouseDown:oe,onClick:oe}},[L,he,ae,$,m,s,f,N,r,n,v,y,h,c,A,p,E]);return C.useMemo(()=>l?{reference:We,floating:ve,item:_}:{},[l,We,ve,_])}const bM=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Io(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=bM.get(i))!=null?n:i,l=So(),u=Yn()!=null,d=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]),f=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]),h=C.useCallback(p=>{let{active:m,selected:g}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&g};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return C.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const hp=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Or(e,t){return typeof e=="function"?e(t):e}function xM(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 wM(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=xM(n,i);return!c&&a==="close"&&l("unmounted"),Te(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function TM(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",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=C.useState(()=>({...Or(s,c),...Or(n,c)})),{isMounted:m,status:g}=wM(e,{duration:i}),v=gt(n),b=gt(r),y=gt(o),T=gt(s);return Te(()=>{const S=Or(v.current,c),E=Or(y.current,c),R=Or(T.current,c),I=Or(b.current,c)||Object.keys(S).reduce((k,A)=>(k[A]="",k),{});if(g==="initial"&&p(k=>({transitionProperty:k.transitionProperty,...R,...S})),g==="open"&&p({transitionProperty:Object.keys(I).map(hp).join(","),transitionDuration:d+"ms",...R,...I}),g==="close"){const k=E||S;p({transitionProperty:Object.keys(k).map(hp).join(","),transitionDuration:f+"ms",...R,...k})}},[f,y,v,b,T,d,g,c]),{isMounted:m,styles:h}}function SM(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:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=C.useRef(),m=C.useRef(""),g=C.useRef((n=h??i)!=null?n:-1),v=C.useRef(null),b=at(a),y=at(l),T=gt(u),S=gt(f);Te(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),Te(()=>{if(r&&m.current===""){var A;g.current=(A=h??i)!=null?A:-1}},[r,h,i]);const E=at(A=>{A?o.current.typing||(o.current.typing=A,y(A)):o.current.typing&&(o.current.typing=A,y(A))}),R=at(A=>{function N(F,V,H){const z=T.current?T.current(V,H):V.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return z?F.indexOf(z):-1}const M=s.current;if(m.current.length>0&&m.current[0]!==" "&&(N(M,M,m.current)===-1?E(!1):A.key===" "&&mt(A)),M==null||S.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(mt(A),E(!0)),M.every(F=>{var V,H;return F?((V=F[0])==null?void 0:V.toLocaleLowerCase())!==((H=F[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===A.key&&(m.current="",g.current=v.current),m.current+=A.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=v.current,E(!1)},d);const P=g.current,O=N(M,[...M.slice((P||0)+1),...M.slice(0,(P||0)+1)],m.current);O!==-1?(b(O),v.current=O):A.key!==" "&&(m.current="",E(!1))}),I=C.useMemo(()=>({onKeyDown:R}),[R]),k=C.useMemo(()=>({onKeyDown:R,onKeyUp(A){A.key===" "&&E(!1)}}),[R,E]);return C.useMemo(()=>c?{reference:I,floating:k}:{},[c,I,k])}function pp(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,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function EM(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function CM(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(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,g=f-a,b=Math.sqrt(m*m+g*g)/p;return i=d,a=f,l=h,b}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:g,nodeId:v,tree:b}=d;return function(T){function S(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:R}=T,I=[E,R],k=rn(T),A=T.type==="mouseleave",N=Ye(m.floating,k),M=Ye(m.domReference,k),j=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),O=p.split("-")[0],F=f>P.right-P.width/2,V=h>P.bottom-P.height/2,H=EM(I,j),z=P.width>j.width,D=P.height>j.height,$=(z?j:P).left,K=(z?j:P).right,J=(D?j:P).top,X=(D?j:P).bottom;if(N&&(s=!0,!A))return;if(M&&(s=!1),M&&!A){s=!0;return}if(A&&Fe(T.relatedTarget)&&Ye(m.floating,T.relatedTarget)||b&&pr(b.nodesRef.current,v).some(B=>{let{context:W}=B;return W==null?void 0:W.open}))return;if(O==="top"&&h>=j.bottom-1||O==="bottom"&&h<=j.top+1||O==="left"&&f>=j.right-1||O==="right"&&f<=j.left+1)return S();let G=[];switch(O){case"top":G=[[$,j.top+1],[$,P.bottom-1],[K,P.bottom-1],[K,j.top+1]];break;case"bottom":G=[[$,P.top+1],[$,j.bottom-1],[K,j.bottom-1],[K,P.top+1]];break;case"left":G=[[P.right-1,X],[P.right-1,J],[j.left+1,J],[j.left+1,X]];break;case"right":G=[[j.right-1,X],[j.right-1,J],[P.left+1,J],[P.left+1,X]];break}function L(B){let[W,U]=B;switch(O){case"top":{const q=[z?W+t/2:F?W+t*4:W-t*4,U+t+1],te=[z?W-t/2:F?W+t*4:W-t*4,U+t+1],_=[[P.left,F||z?P.bottom-t:P.top],[P.right,F?z?P.bottom-t:P.top:P.bottom-t]];return[q,te,..._]}case"bottom":{const q=[z?W+t/2:F?W+t*4:W-t*4,U-t],te=[z?W-t/2:F?W+t*4:W-t*4,U-t],_=[[P.left,F||z?P.top+t:P.bottom],[P.right,F?z?P.top+t:P.bottom:P.top+t]];return[q,te,..._]}case"left":{const q=[W+t+1,D?U+t/2:V?U+t*4:U-t*4],te=[W+t+1,D?U-t/2:V?U+t*4:U-t*4];return[...[[V||D?P.right-t:P.left,P.top],[V?D?P.right-t:P.left:P.right-t,P.bottom]],q,te]}case"right":{const q=[W-t,D?U+t/2:V?U+t*4:U-t*4],te=[W-t,D?U-t/2:V?U+t*4:U-t*4],_=[[V||D?P.left+t:P.right,P.top],[V?D?P.left+t:P.right:P.left+t,P.bottom]];return[q,te,..._]}}}if(!pp([E,R],G)){if(s&&!H)return S();if(!A&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return S()}pp([E,R],L([f,h]))?!s&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const Ao=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[da(10),Yu({fallbackAxisSideDirection:"end"}),Gu(),sb({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Po({open:n,middleware:s,transform:!0,whileElementsMounted:ua,onOpenChange:(p,m)=>{var v;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=fa(l),u=Co(l),d=Io(l),{getReferenceProps:f,getFloatingProps:h}=Ro([c,u,d]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(Eo,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(As,{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,...h(),children:[x.jsx(cb,{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]})})})]})},PM=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=Po({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=fa(a),u=Io(a),d=Co(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Ro([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Gr,{...h(e),as:dt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:x.jsx(dt.span,{layoutId:o,children:e.trigger})}),x.jsx(vo,{children:s?x.jsx(Eo,{root:t,children:x.jsx(As,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(dt.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},wb=300,RM=500,Tb=(e="")=>ke("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),wc=w.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),mp=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=Yn(),c=l!==null,[u,d]=w.useState(!1),[f,h]=w.useState(!1),[p,m]=w.useState(null),g=w.useRef([]),v=w.useRef([]),b=w.useContext(wc),y=Kn(),T=QD(),S=lb(),{floatingStyles:E,refs:R,context:I}=Po({nodeId:T,open:u,transform:!0,onOpenChange:d,whileElementsMounted:ua,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[da({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Yu(),Gu()]}),k=Io(I,{role:"menu",enabled:!0}),A=Co(I,{bubbles:!0}),N=hb(I,{enabled:n,delay:{open:wb},handleClose:CM({blockPointerEvents:!0})}),M=fa(I,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),j=xb(I,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:g,scrollItemIntoView:!0,onNavigate:m}),P=SM(I,{activeIndex:p,listRef:v,resetMs:RM,onMatch:u?m:void 0}),{getReferenceProps:O,getFloatingProps:F,getItemProps:V}=Ro([N,M,k,A,j,P]);w.useEffect(()=>{if(!y)return;const z=()=>d(!1),D=$=>{$.nodeId!==T&&$.parentId===l&&d(!1)};return y.events.on("click",z),y.events.on("menuopen",D),()=>{y.events.off("click",z),y.events.off("menuopen",D)}},[y,T,l]),w.useEffect(()=>{u&&y&&y.events.emit("menuopen",{parentId:l,nodeId:T})},[y,u,T,l]);const H=r?i.className:ke(Tb(i.className));return x.jsxs(ZD,{id:T,children:[x.jsx(w.Fragment,{children:i.asChild?x.jsx(to,{children:s,ref:xc([R.setReference,S.ref,a]),tabIndex:c?b.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":f?"":void 0,className:H,...O(b.getItemProps({...i,onFocus(z){var D;(D=i.onFocus)==null||D.call(i,z),h(!1),b.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:xc([R.setReference,S.ref,a]),tabIndex:c?b.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":f?"":void 0,className:H,...O(b.getItemProps({...i,onFocus(z){var D;(D=i.onFocus)==null||D.call(i,z),h(!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(Su,{size:14})]})]})}),x.jsx(wc.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:V,setHasFocusInside:h,isOpen:u},children:x.jsx(GD,{elementsRef:g,labelsRef:v,children:u&&x.jsx(Eo,{preserveTabOrder:!0,children:x.jsx(As,{context:I,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...F(),ref:R.setFloating,style:{...i.style,...E},className:ke("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})})})})})]})}),IM=w.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=w.useContext(wc),a=lb({label:r?null:typeof e=="string"?e:t}),l=Kn(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,ref:xc([a.ref,s]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Tb(o.className),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),AM=w.forwardRef((e,t)=>Yn()!==null?x.jsx(mp,{...e,isParent:!1,ref:t}):x.jsx(JD,{children:x.jsx(mp,{...e,isParent:!0,ref:t})})),OM=(e,t)=>Pi()?t:window.matchMedia(e).matches,DM=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(OM(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",MM={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:Ut},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:Ut},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:Ut}},kM={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:Ut},exit:{translateX:["0%","30%"],opacity:0,animationDuration:Ut}},fl={drawer:e=>e==="left"?MM:kM,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}}},FM=uo("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"}}),jM={top:0,left:0,right:0,bottom:-1},NM=e=>e*.62,LM=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=NM(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(dt.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:jM,whileDrag:{cursor:"grabbing"},className:ke("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})},hl={drawer:"right",sheet:"none",dialog:"none"},_M=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=w.useId(),a=w.useId(),l=DM("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:hl[e]:r?hl[e]:hl.sheet,d=l||r?fl[e]:fl.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=Po({open:s.open,onOpenChange:s.onChange}),g=fa(m),v=Io(m),b=Co(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:T}=Ro([g,v,b]),S=s.trigger,E=mr(void 0),R=()=>s.onChange(!1);return x.jsxs(w.Fragment,{children:[s.trigger?x.jsx(w.Fragment,{children:s.asChild?x.jsx(to,{ref:p.setReference,...y({layoutId:s.layoutId}),children:S}):x.jsx(dt.button,{ref:p.setReference,...y(),layoutId:s.layoutId,type:"button",children:S})}):null,x.jsx(Eo,{children:x.jsx(vo,{presenceAffectsLayout:!0,children:s.open?x.jsx(dM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"flex items-start justify-center p-10"}`,children:x.jsx(As,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(dt.div,{exit:"exit",animate:"enter",initial:"initial",variants:f,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:FM({position:u,type:h}),style:h==="drawer"?{width:E}:{height:E},...T(),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:R,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(na,{})})}):null,c&&t?x.jsx(LM,{onChange:s.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})}):null})})]})},VM=e=>x.jsx(dt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Sb=({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:d,floatingStyles:f,context:h}=Po({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:ua,middleware:[da(5),Yu({fallbackAxisSideDirection:"start"}),Gu(),sb({element:c,padding:5})]}),p=hb(h,{move:!0,enabled:r,delay:{open:wb}}),m=yM(h,{enabled:r}),g=Co(h,{enabled:r}),v=Io(h,{role:"tooltip",enabled:r}),b=hM(h,{enabled:!!r&&!!t}),{getReferenceProps:y,getFloatingProps:T}=Ro([p,m,g,v,b]);return x.jsxs(w.Fragment,{children:[x.jsx(u,{ref:d.setReference,...y(i),children:s}),x.jsx(Eo,{children:a&&x.jsxs(mo,{...T(),ref:d.setFloating,style:f,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(cb,{ref:c,context:h,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class Ni{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++)Ni.getDescendantProperty(a[l],s,r);else s&&Ni.getDescendantProperty(a,s,r)}else r.push(t);return r}}class _r{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=_r.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=Ni.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=_r.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=_r.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 _r.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 Eb=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:ke("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(Sb,{as:"button",type:"button",title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(ky,{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(Dy,{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(TP,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),pa=w.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,componentName:m,placeholder:g,hideLeft:v=!1,required:b,disabled:y},T)=>{const S=d??h,E=Ct(),R=e??E.inputOptionalLabel;return x.jsxs("fieldset",{ref:T,form:u,disabled:y,"data-error":!!c,"aria-disabled":y,"data-component":m,"data-interactive":!!s,className:ke("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:S,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(Eb,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:g,children:R||n?x.jsxs(w.Fragment,{children:[b?null:x.jsx("span",{"aria-disabled":y,className:"text-opacity-70 aria-disabled:text-disabled",children:R}),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-disabled:border-disabled group-error:border-danger ${f}`,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})]})}),$M=e=>x.jsx(w.Fragment,{children:e.children}),Cb=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??$M,a=r.label??r.value;return r.hidden?null:x.jsx("li",{...o,ref:s,role:"option","aria-selected":t,className:"w-full min-w-0 container border-b border-tooltip-border last:border-b-0",children:x.jsxs("button",{type:"button","aria-checked":t,"aria-current":t,"aria-selected":t,onClick:n,"data-value":r.value,"aria-busy":r.disabled,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(xP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),BM={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},HM={caseSensitive:!1,sort:!1},WM=[],zM=w.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:s,interactive:i,emptyMessage:a,optionalText:l,labelClassName:c,feedback:u=null,hideLeft:d=!1,required:f=!1,dynamicOption:h=!1,...p},m)=>{const g=Ct(),v=p.value??p.defaultValue??"",[b,y]=w.useState(!1),[T,S]=w.useState(""),[E,R]=w.useState(v),[I,k]=w.useState(()=>{var _;return((_=r.find(ae=>ae.value===v))==null?void 0:_.label)??v}),[A,N]=w.useState(null),M=w.useRef(WM),j=w.useRef(null),P=h&&T!==""?[{value:T,label:T,"data-dynamic":"true"},...r]:r,O=new _r(P,["value","label"],HM).search(T),F=h?void 0:`^(${r.map(_=>`${lc(_.value)}${_.label?"|"+lc(_.label):""}`).join("|")})$`;w.useEffect(()=>{if(p.value){const _=r.find(ae=>ae.value===p.value);R((_==null?void 0:_.label)??p.value)}},[p.value]);const{x:V,y:H,strategy:z,refs:D,context:$}=Po({open:b,transform:!0,strategy:"absolute",onOpenChange:y,whileElementsMounted:ua,middleware:[da(4),LD({padding:10,elementContext:"reference",apply(_){var oe;const he=_.elements.reference.parentElement,ve=(oe=j.current)==null?void 0:oe.getBoundingClientRect().width,We=(he==null?void 0:he.getBoundingClientRect().width)||0;Object.assign(_.elements.floating.style,{width:`${We}px`,overflowY:"auto",maxWidth:`${ve}px`,minWidth:`${ve}px`,maxHeight:`${Math.min(250,_.availableHeight)}px`})}})]}),K=TM($,BM),{getReferenceProps:J,getFloatingProps:X,getItemProps:G}=Ro([Io($,{role:"listbox"}),Co($),xb($,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:A,selectedIndex:A,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:_=>N(ae=>_??ae)})]);w.useEffect(()=>{const _=D.reference.current;if(_)return Ui(_)},[]);const L=(_,ae)=>{R(_.value);const he=D.reference.current;if(!he)return;he==null||he.setAttribute("data-value",_.value),he.value=_.value;const ve=new Event("change",{bubbles:!1,cancelable:!0});he.dispatchEvent(ve),p.onChange&&p.onChange(ve),k(_.label??""),y(!1),S(""),N(ae)},B=_=>{var he;const ae=_.target.value;return S(ae),!b&&ae===""?y(!0):(_.target.name=p.name||"",ae?y(!0):(he=p.onChange)==null?void 0:he.call(p,_))},W=()=>{y(!0),S("")},U=()=>{var _;y(!0),(_=D.reference.current)==null||_.focus()},q=_=>{var ae;_.stopPropagation(),(ae=D.reference.current)==null||ae.setAttribute("data-value",""),$m(D.reference.current),S(""),R(""),k(""),y(!1)},te=p.id||p.name;return x.jsxs(pa,{...p,left:e,error:t,ref:j,form:p.form,name:p.name,feedback:u,hideLeft:d,required:f,title:p.title,container:o,rightLabel:s,disabled:p.disabled,interactive:i,id:p.name||p.id,optionalText:l,componentName:"autocomplete",labelClassName:c,placeholder:p.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{disabled:p.disabled,onClick:U,type:"button",className:"transition-colors disabled:link:text-disabled link:text-primary disabled:text-disabled",children:[x.jsx(Oy,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),E?x.jsxs("button",{type:"button",onClick:q,className:"isolate relative transition-colors link:text-danger",children:[x.jsx(na,{size:15}),x.jsx("span",{className:"sr-only",children:g.inputCloseValue})]}):null]}),children:[x.jsx("input",{...J({...p,onChange:B,onFocus:W,pattern:F,ref:D.setReference,name:`${te}-shadow`,id:`${te}-shadow`,onClick:_=>_.currentTarget.focus(),onKeyDown(_){if(_.key==="Escape")return _.currentTarget.blur(),y(!1);if(_.key==="Enter"){if(A!==null&&O[A])return _.preventDefault(),L(O[A],A);if(O.length===1)return _.preventDefault(),L(O[0],0)}}}),"data-value":E,"data-error":!!t,"data-name":te,"data-target":te,required:f,value:b?T:I||E,"aria-autocomplete":"list",autoComplete:"off",className:ke("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary line-clamp-1",p.className)}),x.jsx("input",{id:te,name:te,type:"hidden","data-origin":te,ref:m,required:f,defaultValue:p.value||E||void 0}),x.jsx(Eo,{preserveTabOrder:!0,children:b?x.jsx(As,{disabled:p.disabled,guards:!0,returnFocus:!1,context:$,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("ul",{...X({ref:D.setFloating,style:{position:z,left:(V??0)+(E?26:18),top:H??0,...K.styles}}),"data-floating":"true",className:"container 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:[O.map((_,ae)=>{const he=E===_.value||E===_.label;return x.jsx(Cb,{...G({onClick:()=>L(_,ae),ref:ve=>void(M.current[ae]=ve),selected:A===ae}),option:_,active:he,selected:A===ae},`${_.value}-option`)}),O.length===0?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-b-0",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:a||g.autocompleteEmpty})}):null]})}):null})]})}),Pb=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:ke("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:ke("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,x.jsx("span",{"data-name":"checkbox-label",className:ke("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Rb=(e,t,n,r)=>w.forwardRef(({type:s="text",feedback:i=null,info:a,labelClassName:l,next:c,interactive:u,rightLabel:d,optionalText:f,container:h,hideLeft:p=!1,right:m,left:g,error:v,...b},y)=>{const T=e,S=b.id??b.name,E=w.useRef(null);return w.useEffect(()=>{if(E.current===null)return;const R=E.current,I=Ui(E.current),k=r==null?void 0:r(R),A=N=>{const M=N;if(M.key==="Enter"&&R.enterKeyHint==="next"){const j=R.getAttribute("data-next");if(j){const P=document.getElementById(j);if(P)return P.focus(),void M.preventDefault()}}};return R.addEventListener("keydown",A),()=>{k==null||k(),I(),R.removeEventListener("keydown",A)}},[]),x.jsx(pa,{...n,componentName:t,info:a,container:h,error:v,feedback:i,hideLeft:p,left:g,optionalText:f,right:m,rightLabel:d,interactive:u,form:b.form,id:b.name||b.id,name:b.name,labelClassName:l,title:b.title,placeholder:b.placeholder,required:b.required,disabled:b.disabled,children:x.jsx(T,{...n,...b,id:S,name:S,type:s,"data-next":c,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:Yc(y,E),className:ke("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),Os=Rb(rv,"input",{type:"text"}),gp=new Date(1970,11,31),pl={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},yp={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},UM={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")},ml=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},GM=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||uv(),l=w.useId(),c=Ct(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=w.useState(e||void 0),[h,p]=w.useState(!1),m=ml(u,gp).flatMap(R=>bn.keyof(pl,R.type)?pl[R.type](R.value):[]),g=ml(u,gp).reduce((R,I)=>R+(bn.keyof(yp,I.type)?yp[I.type](I.value):""),""),[v,b]=w.useState(d?ml(u,d).reduce((R,I)=>R+(bn.keyof(pl,I.type)?UM[I.type](d,I.value):""),""):""),y=R=>{const I=R.target.value;if(b(I),m.length===I.length&&m.every((A,N)=>{const M=I.charAt(N);return typeof A=="string"?M===A:A.test(M)})){const A=eo(FI(I,g,new Date));return f(A),r==null?void 0:r(A)}return f(void 0),r==null?void 0:r(void 0)},T=R=>(f(R),r==null||r(R),b(R?jR(R,g):"")),S=Vy(d),E=S?d.toISOString():void 0;return x.jsx(Os,{...s,mask:m,value:v,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:y,required:s.required??!0,error:h?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(Ao,{open:h,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(bP,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(pv,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:S?d:void 0})})]})})}),YM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],KM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],qM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],XM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],vp=(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 bp(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?XM:qM:t.binary?KM:YM,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=vp(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=vp(Number(e),t.locale,i),c=n[a];return s+l+r+c}var Tc={exports:{}},Xs={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 xp;function QM(){if(xp)return
|
|
184
|
+
*/var xp;function QM(){if(xp)return Ie;xp=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,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=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,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case c:case r:case s:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case h:case i:return S;default:return E}}case n:return E}}}function T(S){return y(S)===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=h,Ie.Portal=n,Ie.Profiler=s,Ie.StrictMode=o,Ie.Suspense=d,Ie.isAsyncMode=function(S){return T(S)||y(S)===l},Ie.isConcurrentMode=T,Ie.isContextConsumer=function(S){return y(S)===a},Ie.isContextProvider=function(S){return y(S)===i},Ie.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Ie.isForwardRef=function(S){return y(S)===u},Ie.isFragment=function(S){return y(S)===r},Ie.isLazy=function(S){return y(S)===p},Ie.isMemo=function(S){return y(S)===h},Ie.isPortal=function(S){return y(S)===n},Ie.isProfiler=function(S){return y(S)===s},Ie.isStrictMode=function(S){return y(S)===o},Ie.isSuspense=function(S){return y(S)===d},Ie.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===s||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===h||S.$$typeof===i||S.$$typeof===a||S.$$typeof===u||S.$$typeof===g||S.$$typeof===v||S.$$typeof===b||S.$$typeof===m)},Ie.typeOf=y,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 wp;function ZM(){return wp||(wp=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,
|
|
191
|
+
*/var wp;function ZM(){return wp||(wp=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,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=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,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(_){return typeof _=="string"||typeof _=="function"||_===r||_===c||_===s||_===o||_===d||_===f||typeof _=="object"&&_!==null&&(_.$$typeof===p||_.$$typeof===h||_.$$typeof===i||_.$$typeof===a||_.$$typeof===u||_.$$typeof===g||_.$$typeof===v||_.$$typeof===b||_.$$typeof===m)}function T(_){if(typeof _=="object"&&_!==null){var ae=_.$$typeof;switch(ae){case t:var he=_.type;switch(he){case l:case c:case r:case s:case o:case d:return he;default:var ve=he&&he.$$typeof;switch(ve){case a:case u:case p:case h:case i:return ve;default:return ae}}case n:return ae}}}var S=l,E=c,R=a,I=i,k=t,A=u,N=r,M=p,j=h,P=n,O=s,F=o,V=d,H=!1;function z(_){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.")),D(_)||T(_)===l}function D(_){return T(_)===c}function $(_){return T(_)===a}function K(_){return T(_)===i}function J(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function X(_){return T(_)===u}function G(_){return T(_)===r}function L(_){return T(_)===p}function B(_){return T(_)===h}function W(_){return T(_)===n}function U(_){return T(_)===s}function q(_){return T(_)===o}function te(_){return T(_)===d}Ae.AsyncMode=S,Ae.ConcurrentMode=E,Ae.ContextConsumer=R,Ae.ContextProvider=I,Ae.Element=k,Ae.ForwardRef=A,Ae.Fragment=N,Ae.Lazy=M,Ae.Memo=j,Ae.Portal=P,Ae.Profiler=O,Ae.StrictMode=F,Ae.Suspense=V,Ae.isAsyncMode=z,Ae.isConcurrentMode=D,Ae.isContextConsumer=$,Ae.isContextProvider=K,Ae.isElement=J,Ae.isForwardRef=X,Ae.isFragment=G,Ae.isLazy=L,Ae.isMemo=B,Ae.isPortal=W,Ae.isProfiler=U,Ae.isStrictMode=q,Ae.isSuspense=te,Ae.isValidElementType=y,Ae.typeOf=T}()),Ae}var Tp;function Ib(){return Tp||(Tp=1,process.env.NODE_ENV==="production"?Xs.exports=QM():Xs.exports=ZM()),Xs.exports}/*
|
|
192
192
|
object-assign
|
|
193
193
|
(c) Sindre Sorhus
|
|
194
194
|
@license MIT
|
|
195
|
-
*/var
|
|
196
|
-
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var
|
|
197
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wk(e){if(Array.isArray(e))return
|
|
198
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kb(e,t){if(e){if(typeof e=="string")return
|
|
199
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yk(e){if(Array.isArray(e))return
|
|
200
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _b(e,t){if(e){if(typeof e=="string")return Ec(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 Ec(e,t)}}function Ec(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 qk(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 Xk(e){if(Array.isArray(e))return e}function Vp(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 He(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vp(Object(n),!0).forEach(function(r){Cc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vi(e,t){if(e==null)return{};var n=Qk(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 Qk(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 Qu=w.forwardRef(function(e,t){var n=e.children,r=Vi(e,$k),o=$b(r),s=o.open,i=Vi(o,Bk);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(He(He({},i),{},{open:s})))});Qu.displayName="Dropzone";var Vb={disabled:!1,getFilesFromEvent:ck,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};Qu.defaultProps=Vb;Qu.propTypes={children:ke.func,accept:ke.objectOf(ke.arrayOf(ke.string)),multiple:ke.bool,preventDropOnDocument:ke.bool,noClick:ke.bool,noKeyboard:ke.bool,noDrag:ke.bool,noDragEventsBubbling:ke.bool,minSize:ke.number,maxSize:ke.number,maxFiles:ke.number,disabled:ke.bool,getFilesFromEvent:ke.func,onFileDialogCancel:ke.func,onFileDialogOpen:ke.func,useFsAccessApi:ke.bool,autoFocus:ke.bool,onDragEnter:ke.func,onDragLeave:ke.func,onDragOver:ke.func,onDrop:ke.func,onDropAccepted:ke.func,onDropRejected:ke.func,onError:ke.func,validator:ke.func};var Pc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function $b(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=He(He({},Vb),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,R=t.noDragEventsBubbling,I=t.onError,M=t.validator,A=w.useMemo(function(){return Lk(n)},[n]),N=w.useMemo(function(){return Nk(n)},[n]),k=w.useMemo(function(){return typeof g=="function"?g:$p},[g]),j=w.useMemo(function(){return typeof m=="function"?m:$p},[m]),P=w.useRef(null),O=w.useRef(null),F=w.useReducer(Zk,Pc),_=wl(F,2),H=_[0],U=_[1],D=H.isFocused,$=H.isFileDialogActive,q=w.useRef(typeof window<"u"&&window.isSecureContext&&y&&jk()),J=function(){!q.current&&$&&setTimeout(function(){if(O.current){var re=O.current.files;re.length||(U({type:"closeDialog"}),j())}},300)};w.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[O,$,j,q]);var X=w.useRef([]),G=function(re){P.current&&P.current.contains(re.target)||(re.preventDefault(),X.current=[])};w.useEffect(function(){return v&&(document.addEventListener("dragover",_p,!1),document.addEventListener("drop",G,!1)),function(){v&&(document.removeEventListener("dragover",_p),document.removeEventListener("drop",G))}},[P,v]),w.useEffect(function(){return!r&&b&&P.current&&P.current.focus(),function(){}},[P,b,r]);var L=w.useCallback(function(Z){I?I(Z):console.error(Z)},[I]),B=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[].concat(zk(X.current),[Z.target]),Qs(Z)&&Promise.resolve(o(Z)).then(function(re){if(!(_i(Z)&&!R)){var xe=re.length,Ne=xe>0&&Dk({files:re,accept:A,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:M}),ht=xe>0&&!Ne;U({isDragAccept:Ne,isDragReject:ht,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(re){return L(re)})},[o,c,L,R,A,i,s,a,l,M]),z=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=Qs(Z);if(re&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return re&&f&&f(Z),!1},[f,R]),V=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=X.current.filter(function(Ne){return P.current&&P.current.contains(Ne)}),xe=re.indexOf(Z.target);xe!==-1&&re.splice(xe,1),X.current=re,!(re.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qs(Z)&&u&&u(Z))},[P,u,R]),Y=w.useCallback(function(Z,re){var xe=[],Ne=[];Z.forEach(function(ht){var vt=Fb(ht,A),Pt=wl(vt,2),Zn=Pt[0],Sr=Pt[1],Er=jb(ht,i,s),js=wl(Er,2),xa=js[0],wa=js[1],Ta=M?M(ht):null;if(Zn&&xa&&!Ta)xe.push(ht);else{var Sa=[Sr,wa];Ta&&(Sa=Sa.concat(Ta)),Ne.push({file:ht,errors:Sa.filter(function(O0){return O0})})}}),(!a&&xe.length>1||a&&l>=1&&xe.length>l)&&(xe.forEach(function(ht){Ne.push({file:ht,errors:[Ok]})}),xe.splice(0)),U({acceptedFiles:xe,fileRejections:Ne,type:"setFiles"}),h&&h(xe,Ne,re),Ne.length>0&&p&&p(Ne,re),xe.length>0&&d&&d(xe,re)},[U,a,A,i,s,l,h,d,p,M]),ee=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[],Qs(Z)&&Promise.resolve(o(Z)).then(function(re){_i(Z)&&!R||Y(re,Z)}).catch(function(re){return L(re)}),U({type:"reset"})},[o,Y,L,R]),W=w.useCallback(function(){if(q.current){U({type:"openDialog"}),k();var Z={multiple:a,types:N};window.showOpenFilePicker(Z).then(function(re){return o(re)}).then(function(re){Y(re,null),U({type:"closeDialog"})}).catch(function(re){_k(re)?(j(re),U({type:"closeDialog"})):Vk(re)?(q.current=!1,O.current?(O.current.value=null,O.current.click()):L(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."))):L(re)});return}O.current&&(U({type:"openDialog"}),k(),O.current.value=null,O.current.click())},[U,k,j,y,Y,L,N,a]),we=w.useCallback(function(Z){!P.current||!P.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),W())},[P,W]),Ue=w.useCallback(function(){U({type:"focus"})},[]),je=w.useCallback(function(){U({type:"blur"})},[]),Ge=w.useCallback(function(){S||(Fk()?setTimeout(W,0):W())},[S,W]),se=function(re){return r?null:re},me=function(re){return T?null:se(re)},oe=function(re){return E?null:se(re)},ye=function(re){R&&re.stopPropagation()},Qe=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,xe=re===void 0?"ref":re,Ne=Z.role,ht=Z.onKeyDown,vt=Z.onFocus,Pt=Z.onBlur,Zn=Z.onClick,Sr=Z.onDragEnter,Er=Z.onDragOver,js=Z.onDragLeave,xa=Z.onDrop,wa=Vi(Z,Hk);return He(He(Cc({onKeyDown:me(Xt(ht,we)),onFocus:me(Xt(vt,Ue)),onBlur:me(Xt(Pt,je)),onClick:se(Xt(Zn,Ge)),onDragEnter:oe(Xt(Sr,B)),onDragOver:oe(Xt(Er,z)),onDragLeave:oe(Xt(js,V)),onDrop:oe(Xt(xa,ee)),role:typeof Ne=="string"&&Ne!==""?Ne:"presentation"},xe,P),!r&&!T?{tabIndex:0}:{}),wa)}},[P,we,Ue,je,Ge,B,z,V,ee,T,E,r]),ve=w.useCallback(function(Z){Z.stopPropagation()},[]),ot=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,xe=re===void 0?"ref":re,Ne=Z.onChange,ht=Z.onClick,vt=Vi(Z,Wk),Pt=Cc({accept:A,multiple:a,type:"file",style:{display:"none"},onChange:se(Xt(Ne,ee)),onClick:se(Xt(ht,ve)),tabIndex:-1},xe,O);return He(He({},Pt),vt)}},[O,n,a,ee,r]);return He(He({},H),{},{isFocused:D&&!r,getRootProps:Qe,getInputProps:ot,rootRef:P,inputRef:O,open:se(W)})}function Zk(e,t){switch(t.type){case"focus":return He(He({},e),{},{isFocused:!0});case"blur":return He(He({},e),{},{isFocused:!1});case"openDialog":return He(He({},Pc),{},{isFileDialogActive:!0});case"closeDialog":return He(He({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return He(He({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return He(He({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return He({},Pc);default:return e}}function $p(){}const Jk={isImage:e=>e.type.includes("image")},eF=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(Jk.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:bp(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:bp(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(Gr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Zr,{})})]}):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(My,{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(Gr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Zr,{className:"text-danger"})})]})},tF=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(eF,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),nF=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(tF,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),rF=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(AP,{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"})]})]}),oF=({idle:e=rF,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}=$b({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(nF,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},sF=["INPUT","SELECT"],Rc=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{sF.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},iF=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})},aF=({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:De("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]}),br=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=Ct(),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=Ui(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(ha,{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(Oy,{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:Gc(m,y),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:De("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}`))]})})}),Ic=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},lF=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=Ic(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:De("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})]})}),cF=e=>{const[t,n]=lP();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:hP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},uF=Rb("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)}),pa=0,qn=1,Mo=2,Bb=4;function ds(e,t){return n=>e(t(n))}function fF(e,t){return t(e)}function Hb(e,t){return n=>e(t,n)}function Bp(e,t){return()=>e(t)}function ma(e,t){return t(e),e}function Be(...e){return e}function dF(e){e()}function Hp(e){return()=>e}function hF(...e){return()=>{e.map(dF)}}function Zu(e){return e!==void 0}function wr(){}function Oe(e,t){return e(qn,t)}function fe(e,t){e(pa,t)}function Ju(e){e(Mo)}function wt(e){return e(Bb)}function ie(e,t){return Oe(e,Hb(t,pa))}function hn(e,t){const n=e(qn,r=>{n(),t(r)});return n}function ge(){const e=[];return(t,n)=>{switch(t){case Mo:e.splice(0,e.length);return;case qn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case pa:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Q(e){let t=e;const n=ge();return(r,o)=>{switch(r){case qn:o(t);break;case pa:t=o;break;case Bb:return t}return n(r,o)}}function pF(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case qn:return s?n===s?void 0:(r(),n=s,t=Oe(e,s),t):(r(),wr);case Mo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function jt(e){return ma(ge(),t=>ie(e,t))}function Tt(e,t){return ma(Q(t),n=>ie(e,n))}function mF(...e){return t=>e.reduceRight(fF,t)}function K(e,...t){const n=mF(...t);return(r,o)=>{switch(r){case qn:return Oe(e,n(o));case Mo:Ju(e);return}}}function Wb(e,t){return e===t}function $e(e=Wb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function le(e){return t=>n=>{e(n)&&t(n)}}function ne(e){return t=>ds(t,e)}function en(e){return t=>()=>t(e)}function sn(e,t){return n=>r=>n(t=e(t,r))}function ao(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 Wp(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function de(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Oe(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 zp(...e){return function(t,n){switch(t){case qn:return hF(...e.map(r=>Oe(r,n)));case Mo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ce(e,t=Wb){return K(e,$e(t))}function dt(...e){const t=ge(),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);Oe(s,l=>{n[i]=l,r=r|a,r===o&&fe(t,n)})}),function(s,i){switch(s){case qn:return r===o&&i(n),Oe(t,i);case Mo:return Ju(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ce(e,t=[],{singleton:n}={singleton:!0}){return{id:gF(),constructor:e,dependencies:t,singleton:n}}const gF=()=>Symbol();function yF(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 vF(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 Zs=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ef(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&&fe(y.propsReady,!1);for(const v of r){const S=y[t.required[v]];fe(S,b[v])}for(const v of o)if(v in b){const S=y[t.optional[v]];fe(S,b[v])}y.propsReady&&fe(y.propsReady,!0)}function c(y){return s.reduce((b,v)=>(b[v]=S=>{const T=y[t.methods[v]];fe(T,S)},b),{})}function u(y){return i.reduce((b,v)=>(b[v]=pF(y[t.events[v]]),b),{})}const f=w.forwardRef((y,b)=>{const{children:v,...S}=y,[T]=w.useState(()=>ma(yF(e),R=>l(R,S))),[E]=w.useState(Bp(u,T));return Zs(()=>{for(const R of i)R in S&&Oe(E[R],S[R]);return()=>{Object.values(E).map(Ju)}},[S,E,T]),Zs(()=>{l(T,S)}),w.useImperativeHandle(b,Hp(c(T))),w.createElement(a.Provider,{value:T},n?w.createElement(n,vF([...r,...o,...i],S),v):v)}),h=y=>w.useCallback(Hb(fe,w.useContext(a)[y]),[y]),d=y=>{const v=w.useContext(a)[y],S=w.useCallback(T=>Oe(v,T),[v]);return w.useSyncExternalStore(S,()=>wt(v),()=>wt(v))},p=y=>{const v=w.useContext(a)[y],[S,T]=w.useState(Bp(wt,v));return Zs(()=>Oe(v,E=>{E!==S&&T(Hp(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];Zs(()=>Oe(S,b),[b,S])}}}const bF=typeof document<"u"?w.useLayoutEffect:w.useEffect,xF=bF;var Nt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Nt||{});const wF={0:"debug",1:"log",2:"warn",3:"error"},TF=()=>typeof globalThis>"u"?window:globalThis,Xn=Ce(()=>{const e=Q(3);return{log:Q((n,r,o=1)=>{var s;const i=(s=TF().VIRTUOSO_LOG_LEVEL)!=null?s:wt(e);o>=i&&console[wF[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function tf(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 tf(e,t).callbackRef}function zb(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=SF(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(EF("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return tf(a,n)}function SF(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},Nt.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 EF(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Nt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Kt(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ub(e,t){return Math.abs(e-t)<1.01}function Gb(e,t,n,r=wr,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():_c.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(Kt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=h.scrollHeight,p=Kt(h,"height"),g=h.scrollTop);const y=m-p;if(f.top=Math.ceil(Math.max(Math.min(y,f.top),0)),Ub(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 It=Ce(()=>{const e=ge(),t=ge(),n=Q(0),r=ge(),o=Q(0),s=ge(),i=ge(),a=Q(0),l=Q(0),c=Q(0),u=Q(0),f=ge(),h=ge(),d=Q(!1);return ie(K(e,ne(({scrollTop:p})=>p)),t),ie(K(e,ne(({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}),hs={lvl:0};function Yb(e,t,n,r=hs,o=hs){return{k:e,v:t,lvl:n,l:r,r:o}}function Fe(e){return e===hs}function Br(){return hs}function Ac(e,t){if(Fe(e))return hs;const{k:n,l:r,r:o}=e;if(t===n){if(Fe(r))return o;if(Fe(o))return r;{const[s,i]=Kb(r);return ci(it(e,{k:s,v:i,l:qb(r)}))}}else return t<n?ci(it(e,{l:Ac(r,t)})):ci(it(e,{r:Ac(o,t)}))}function ps(e,t){if(!Fe(e))return t===e.k?e.v:t<e.k?ps(e.l,t):ps(e.r,t)}function qt(e,t,n="k"){if(Fe(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=qt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return qt(e.l,t,n)}function Ft(e,t,n){return Fe(e)?Yb(t,n,1):t===e.k?it(e,{k:t,v:n}):t<e.k?Up(it(e,{l:Ft(e.l,t,n)})):Up(it(e,{r:Ft(e.r,t,n)}))}function Oc(e,t,n){if(Fe(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Oc(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Oc(i,t,n))),a}function ur(e){return Fe(e)?[]:[...ur(e.l),{k:e.k,v:e.v},...ur(e.r)]}function Kb(e){return Fe(e.r)?[e.k,e.v]:Kb(e.r)}function qb(e){return Fe(e.r)?e.l:ci(it(e,{r:qb(e.r)}))}function it(e,t){return Yb(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 Tl(e){return Fe(e)||e.lvl>e.r.lvl}function Up(e){return Dc(Qb(e))}function ci(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(Tl(t))return Qb(it(e,{lvl:r-1}));if(!Fe(t)&&!Fe(t.r))return it(t.r,{l:it(t,{r:t.r.l}),r:it(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Tl(e))return Dc(it(e,{lvl:r-1}));if(!Fe(n)&&!Fe(n.l)){const o=n.l,s=Tl(o)?n.lvl-1:n.lvl;return it(o,{l:it(e,{r:o.l,lvl:r-1}),r:Dc(it(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ga(e,t,n){if(Fe(e))return[];const r=qt(e,t)[0];return CF(Oc(e,r,n))}function Xb(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 CF(e){return Xb(e,({k:t,v:n})=>({index:t,value:n}))}function Dc(e){const{r:t,lvl:n}=e;return!Fe(t)&&!Fe(t.r)&&t.lvl===n&&t.r.lvl===n?it(t,{l:it(e,{r:t.l}),lvl:n+1}):e}function Qb(e){const{l:t}=e;return!Fe(t)&&t.lvl===e.lvl?it(t,{r:it(e,{l:t.r})}):e}function $i(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 Zb(e,t,n){return e[$i(e,t,n)]}function PF(e,t,n,r){const o=$i(e,t,r),s=$i(e,n,r,o);return e.slice(o,s+1)}const nf=Ce(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function RF(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 Gp(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 IF(e,t){let n=Fe(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Fe(e)){e=Ft(e,0,o);continue}const a=ga(e,s-1,i+1);if(a.some(RF(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:h}of a)l?(i>=u||o===h)&&(e=Ac(e,u)):(c=h!==o,l=!0),f>i&&i>=u&&h!==o&&(e=Ft(e,i+1,h));c&&(e=Ft(e,s,o))}return[e,n]}function AF(){return{offsetTree:[],sizeTree:Br(),groupOffsetTree:Br(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function rf({index:e},t){return t===e?0:t<e?-1:1}function OF({offset:e},t){return t===e?0:t<e?-1:1}function DF(e){return{index:e.index,value:e}}function MF(e,t,n,r=0){return r>0&&(t=Math.max(t,Zb(e,r,rf).offset)),Xb(PF(e,t,n,OF),DF)}function Mc(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=$i(o,t-1,rf),a=o[l].offset;const u=qt(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===qt(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of ga(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 kF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Nt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Fe(s)&&t.length===2){const h=t[0].size,d=t[1].size;i=n.reduce((p,m)=>Ft(Ft(p,m,h),m+1,d),i)}else[i,a]=IF(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Mc(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((h,d)=>Ft(h,d,ms(d,l,o)),Br()),groupIndices:n}}function ms(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=Zb(t,e,rf),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function FF(e){return typeof e.groupIndex<"u"}function Jb(e,t,n){if(FF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=e0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function e0(e,t){if(!ya(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function ya(e){return!Fe(e.groupOffsetTree)}function jF(e){return ur(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 NF={offsetHeight:"height",offsetWidth:"width"},gn=Ce(([{log:e},{recalcInProgress:t}])=>{const n=ge(),r=ge(),o=Tt(r,0),s=ge(),i=ge(),a=Q(0),l=Q([]),c=Q(void 0),u=Q(void 0),f=Q((T,E)=>Kt(T,NF[E])),h=Q(void 0),d=Q(0),p=AF(),m=Tt(K(n,de(l,e,d),sn(kF,p),$e()),p),g=Tt(K(l,$e(),sn((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),ne(({prev:T})=>T)),[]);ie(K(l,le(T=>T.length>0),de(m,d),ne(([T,E,R])=>{const I=T.reduce((M,A,N)=>Ft(M,A,ms(A,E.offsetTree,R)||N),Br());return{...E,groupIndices:T,groupOffsetTree:I}})),m),ie(K(r,de(m),le(([T,{lastIndex:E}])=>T<E),ne(([T,{lastIndex:E,lastSize:R}])=>[{startIndex:T,endIndex:E,size:R}])),n),ie(c,u);const y=Tt(K(c,ne(T=>T===void 0)),!0);ie(K(u,le(T=>T!==void 0&&Fe(wt(m).sizeTree)),ne(T=>[{startIndex:0,endIndex:0,size:T}])),n);const b=jt(K(n,de(m),sn(({sizes:T},[E,R])=>({changed:R!==T,sizes:R}),{changed:!1,sizes:p}),ne(T=>T.changed)));Oe(K(a,sn((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),ne(T=>T.diff)),T=>{const{groupIndices:E}=wt(m);if(T>0)fe(t,!0),fe(s,T+Gp(T,E));else if(T<0){const R=wt(g);R.length>0&&(T-=Gp(-T,R)),fe(i,T)}}),Oe(K(a,de(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},Nt.ERROR)});const v=jt(s);ie(K(s,de(m),ne(([T,E])=>{const R=E.groupIndices.length>0,I=[],M=E.lastSize;if(R){const A=ps(E.sizeTree,0);let N=0,k=0;for(;N<T;){const O=E.groupIndices[k],F=E.groupIndices.length===k+1?1/0:E.groupIndices[k+1]-O-1;I.push({startIndex:O,endIndex:O,size:A}),I.push({startIndex:O+1,endIndex:O+1+F-1,size:M}),k++,N+=F+1}const j=ur(E.sizeTree);return N!==T&&j.shift(),j.reduce((O,{k:F,v:_})=>{let H=O.ranges;return O.prevSize!==0&&(H=[...O.ranges,{startIndex:O.prevIndex,endIndex:F+T-1,size:O.prevSize}]),{ranges:H,prevIndex:F+T,prevSize:_}},{ranges:I,prevIndex:T,prevSize:0}).ranges}return ur(E.sizeTree).reduce((A,{k:N,v:k})=>({ranges:[...A.ranges,{startIndex:A.prevIndex,endIndex:N+T-1,size:A.prevSize}],prevIndex:N+T,prevSize:k}),{ranges:[],prevIndex:0,prevSize:M}).ranges})),n);const S=jt(K(i,de(m,d),ne(([T,{offsetTree:E},R])=>{const I=-T;return ms(I,E,R)})));return ie(K(i,de(m,d),ne(([T,E,R])=>{if(E.groupIndices.length>0){if(Fe(E.sizeTree))return E;let M=Br();const A=wt(g);let N=0,k=0,j=0;for(;N<-T;){j=A[k];const O=A[k+1]-j-1;k++,N+=O+1}if(M=ur(E.sizeTree).reduce((O,{k:F,v:_})=>Ft(O,Math.max(0,F+T),_),M),N!==-T){const O=ps(E.sizeTree,j);M=Ft(M,0,O);const F=qt(E.sizeTree,-T+1)[1];M=Ft(M,1,F)}return{...E,sizeTree:M,...Mc(E.offsetTree,0,M,R)}}else{const M=ur(E.sizeTree).reduce((A,{k:N,v:k})=>Ft(A,Math.max(0,N+T),k),Br());return{...E,sizeTree:M,...Mc(E.offsetTree,0,M,R)}}})),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}},Be(Xn,nf),{singleton:!0}),LF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function t0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!LF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ms=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=ge(),p=ge(),m=Q(0);let g=null,y=null,b=null;function v(){g&&(g(),g=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),fe(o,!1)}return ie(K(d,de(e,s,t,m,l,c,h),de(r,u,f),ne(([[S,T,E,R,I,M,A,N],k,j,P])=>{const O=t0(S),{align:F,behavior:_,offset:H}=O,U=R-1,D=Jb(O,T,U);let $=ms(D,T.offsetTree,k)+M;F==="end"?($+=j+qt(T.sizeTree,D)[1]-E+P,D===U&&($+=A)):F==="center"?$+=(j+qt(T.sizeTree,D)[1]-E+P)/2:$-=I,H&&($+=H);const q=J=>{v(),J?(N("retrying to scroll to",{location:S},Nt.DEBUG),fe(d,S)):(fe(p,!0),N("list did not change, scroll successful",{},Nt.DEBUG))};if(v(),_==="smooth"){let J=!1;b=Oe(n,X=>{J=J||X}),g=hn(a,()=>{q(J)})}else g=hn(K(n,_F(150)),q);return y=setTimeout(()=>{v()},1200),fe(o,!0),N("scrolling from index to",{index:D,top:$,behavior:_},Nt.DEBUG),{top:$,behavior:_}})),i),{scrollToIndex:d,scrollTargetReached:p,topListHeight:m}},Be(gn,It,Xn),{singleton:!0});function _F(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const gs="up",es="down",VF="none",$F={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},BF=0,ks=Ce(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=Q(!1),a=Q(!0),l=ge(),c=ge(),u=Q(4),f=Q(BF),h=Tt(K(zp(K(ce(t),ao(1),en(!0)),K(ce(t),ao(1),en(!1),Wp(100))),$e()),!1),d=Tt(K(zp(K(s,en(!0)),K(s,en(!1),Wp(200))),$e()),!1);ie(K(dt(ce(t),ce(f)),ne(([b,v])=>b<=v),$e()),a),ie(K(a,kn(50)),c);const p=jt(K(dt(e,ce(n),ce(r),ce(o),ce(u)),sn((b,[{scrollTop:v,scrollHeight:S},T,E,R,I])=>{const M=v+T-S>-I,A={viewportHeight:T,scrollTop:v,scrollHeight:S};if(M){let k,j;return v>b.state.scrollTop?(k="SCROLLED_DOWN",j=b.state.scrollTop-v):(k="SIZE_DECREASED",j=b.state.scrollTop-v||b.scrollTopDelta),{atBottom:!0,state:A,atBottomBecause:k,scrollTopDelta:j}}let N;return A.scrollHeight>b.state.scrollHeight?N="SIZE_INCREASED":T<b.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":v<b.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:A}},$F),$e((b,v)=>b&&b.atBottom===v.atBottom))),m=Tt(K(e,sn((b,{scrollTop:v,scrollHeight:S,viewportHeight:T})=>{if(Ub(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}),le(b=>b.changed),ne(b=>b.jump)),0);ie(K(p,ne(b=>b.atBottom)),i),ie(K(i,kn(50)),l);const g=Q(es);ie(K(e,ne(({scrollTop:b})=>b),$e(),sn((b,v)=>wt(d)?{direction:b.direction,prevScrollTop:v}:{direction:v<b.prevScrollTop?gs:es,prevScrollTop:v},{direction:es,prevScrollTop:0}),ne(b=>b.direction)),g),ie(K(e,kn(50),en(VF)),g);const y=Q(0);return ie(K(h,le(b=>!b),en(0)),y),ie(K(t,kn(100),de(h),le(([b,v])=>!!v),sn(([b,v],[S])=>[v,S],[0,0]),ne(([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}},Be(It)),Qn=Ce(([{log:e}])=>{const t=Q(!1),n=jt(K(t,le(r=>r),$e()));return Oe(t,r=>{r&&wt(e)("props updated",{},Nt.DEBUG)}),{propsReady:t,didMount:n}},Be(Xn),{singleton:!0});function of(e,t){e==0?t():requestAnimationFrame(()=>of(e-1,t))}function sf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Fs=Ce(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=Q(!0),l=Q(0),c=Q(!0);return ie(K(i,de(l),le(([u,f])=>!!f),en(!1)),a),ie(K(i,de(l),le(([u,f])=>!!f),en(!1)),c),Oe(K(dt(t,i),de(a,e,n,c),le(([[,u],f,{sizeTree:h},d,p])=>u&&(!Fe(h)||Zu(d))&&!f&&!p),de(l)),([,u])=>{hn(s,()=>{fe(c,!0)}),of(4,()=>{hn(r,()=>{fe(a,!0)}),fe(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Be(gn,It,Ms,Qn),{singleton:!0});function Yp(e){return e?e==="smooth"?"smooth":"auto":!1}const HF=(e,t)=>typeof e=="function"?Yp(e(t)):t&&Yp(e),WF=Ce(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=Q(!1),f=ge();let h=null;function d(m){fe(o,{index:"LAST",align:"end",behavior:m})}Oe(K(dt(K(ce(e),ao(1)),a),de(ce(u),n,s,c),ne(([[m,g],y,b,v,S])=>{let T=g&&v,E="auto";return T&&(E=HF(y,b||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),le(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{h&&(h(),h=null),h=hn(t,()=>{wt(l)("following output to ",{totalCount:m},Nt.DEBUG),d(g),h=null})});function p(m){const g=hn(r,y=>{m&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(wt(l)("scrolling to bottom due to increased size",{},Nt.DEBUG),d("auto"))});setTimeout(g,100)}return Oe(K(dt(ce(u),e,i),le(([m,,g])=>m&&g),sn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),le(({refreshed:m})=>m),de(u,e)),([,m])=>{wt(s)&&p(m!==!1)}),Oe(f,()=>{p(wt(u)!==!1)}),Oe(dt(ce(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&d("auto")}),{followOutput:u,autoscrollToBottom:f}},Be(gn,ks,Ms,Fs,Qn,Xn,It));function zF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const n0=Ce(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=ge(),i=ge(),a=jt(K(s,ne(zF)));return ie(K(a,ne(l=>l.totalCount)),e),ie(K(a,ne(l=>l.groupIndices)),t),ie(K(dt(r,n,o),le(([l,c])=>ya(c)),ne(([l,c,u])=>qt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),$e(),ne(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Be(gn,It));function ys(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function r0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Bi="top",Hi="bottom",Kp="none";function qp(e,t,n){return typeof e=="number"?n===gs&&t===Bi||n===es&&t===Hi?e:0:n===gs?t===Bi?e.main:e.reverse:t===Hi?e.main:e.reverse}function Xp(e,t){return typeof e=="number"?e:e[t]||0}const af=Ce(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=ge(),i=Q(0),a=Q(0),l=Q(0),c=Tt(K(dt(ce(e),ce(t),ce(r),ce(s,ys),ce(l),ce(i),ce(o),ce(n),ce(a)),ne(([u,f,h,[d,p],m,g,y,b,v])=>{const S=u-b,T=g+y,E=Math.max(h-S,0);let R=Kp;const I=Xp(v,Bi),M=Xp(v,Hi);return d-=b,d+=h+y,p+=h+y,p-=b,d>u+T-I&&(R=gs),p<u-E+f+M&&(R=es),R!==Kp?[Math.max(S-h-qp(m,Bi,R)-I,0),S-E-y+f+qp(m,Hi,R)+M]:null}),le(u=>u!=null),$e(ys)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Be(It),{singleton:!0});function UF(e,t,n){if(ya(t)){const r=e0(e,t);return[{index:qt(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 Sl={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Qp(e,t,n){if(e.length===0)return[];if(!ya(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=ga(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 ui(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:Qp(e,o,s),topItems:Qp(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 o0(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=sf(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:s[f+l]}));return ui(c,[],a,o,n,r)}const Tr=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=Q([]),g=Q(0),y=ge();ie(s.topItemsIndexes,m);const b=Tt(K(dt(d,p,ce(i,ys),ce(t),ce(e),ce(u),c,ce(m),ce(r),ce(o),n),le(([E,R,,I,,,,,,,M])=>{const A=M&&M.length!==I;return E&&!R&&!A}),ne(([,,[E,R],I,M,A,N,k,j,P,O])=>{const F=M,{sizeTree:_,offsetTree:H}=F,U=wt(g);if(I===0)return{...Sl,totalCount:I};if(E===0&&R===0)return U===0?{...Sl,totalCount:I}:o0(U,A,M,j,P,O||[]);if(Fe(_))return U>0?null:ui(UF(sf(A,I),F,O),[],I,P,F,j);const D=[];if(k.length>0){const G=k[0],L=k[k.length-1];let B=0;for(const z of ga(_,G,L)){const V=z.value,Y=Math.max(z.start,G),ee=Math.min(z.end,L);for(let W=Y;W<=ee;W++)D.push({index:W,size:V,offset:B,data:O&&O[W]}),B+=V}}if(!N)return ui([],D,I,P,F,j);const $=k.length>0?k[k.length-1]+1:0,q=MF(H,E,R,$);if(q.length===0)return null;const J=I-1,X=ma([],G=>{for(const L of q){const B=L.value;let z=B.offset,V=L.start;const Y=B.size;if(B.offset<E){V+=Math.floor((E-B.offset+P)/(Y+P));const W=V-L.start;z+=W*Y+W*P}V<$&&(z+=($-V)*Y,V=$);const ee=Math.min(L.end,J);for(let W=V;W<=ee&&!(z>=R);W++)G.push({index:W,size:Y,offset:z,data:O&&O[W]}),z+=Y+P}});return ui(X,D,I,P,F,j)}),le(E=>E!==null),$e()),Sl);ie(K(n,le(Zu),ne(E=>E==null?void 0:E.length)),t),ie(K(b,ne(E=>E.topListHeight)),f),ie(f,l),ie(K(b,ne(E=>[E.top,E.bottom])),a),ie(K(b,ne(E=>E.items)),y);const v=jt(K(b,le(({items:E})=>E.length>0),de(t,n),le(([{items:E},R])=>E[E.length-1].originalIndex===R-1),ne(([,E,R])=>[E-1,R]),$e(ys),ne(([E])=>E))),S=jt(K(b,kn(200),le(({items:E,topItems:R})=>E.length>0&&E[0].originalIndex===R.length),ne(({items:E})=>E[0].index),$e())),T=jt(K(b,le(({items:E})=>E.length>0),ne(({items:E})=>{let R=0,I=E.length-1;for(;E[R].type==="group"&&R<I;)R++;for(;E[I].type==="group"&&I>R;)I--;return{startIndex:E[R].index,endIndex:E[I].index}}),$e(r0)));return{listState:b,topItemsIndexes:m,endReached:v,startReached:S,rangeChanged:T,itemsRendered:y,initialItemCount:g,...h}},Be(gn,n0,af,Fs,Ms,ks,Qn,nf),{singleton:!0}),GF=Ce(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ie(K(a,de(s),le(([,l])=>l!==0),de(o,e,t,r,n),ne(([[,l],c,u,f,h,d=[]])=>o0(l,c,u,f,h,d))),i),{}),Be(gn,Fs,Tr,Qn),{singleton:!0}),s0=Ce(([{scrollVelocity:e}])=>{const t=Q(!1),n=ge(),r=Q(!1);return ie(K(e,de(r,t,n),le(([o,s])=>!!s),ne(([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}),$e()),t),Oe(K(dt(t,e,n),de(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Be(ks),{singleton:!0}),YF=Ce(([{topItemsIndexes:e}])=>{const t=Q(0);return ie(K(t,le(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Be(Tr)),i0=Ce(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=ge(),i=Tt(K(dt(e,r,t,n,o),ne(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ie(ce(i),s),{totalListHeight:i,totalListHeightChanged:s}},Be(It,Tr),{singleton:!0});function a0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const KF=a0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),qF=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=jt(K(l,de(a),sn(([,y,b,v],[{items:S,totalCount:T,bottom:E,offsetBottom:R},I])=>{const M=E+R;let A=0;return b===T&&y.length>0&&S.length>0&&(S[0].originalIndex===0&&y[0].originalIndex===0||(A=M-v,A!==0&&(A+=I))),[A,S,T,M]},[0,[],0,0]),le(([y])=>y!==0),de(t,i,r,s,d,p),le(([,y,b,v,,,S])=>!S&&!v&&y!==0&&b===gs),ne(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},Nt.DEBUG),y))));function g(y){y>0?(fe(e,{top:-y,behavior:"auto"}),fe(n,0)):(fe(n,0),fe(e,{top:-y,behavior:"auto"}))}return Oe(K(m,de(n,o)),([y,b,v])=>{v&&KF()?fe(n,b-y):g(-y)}),Oe(K(dt(Tt(o,!1),n,p),le(([y,b,v])=>!y&&!v&&b!==0),ne(([y,b])=>b),kn(1)),g),ie(K(u,ne(y=>({top:-y}))),e),Oe(K(c,de(f,h),ne(([y,{lastSize:b,groupIndices:v,sizeTree:S},T])=>{function E(R){return R*(b+T)}if(v.length===0)return E(y);{let R=0;const I=ps(S,0);let M=0,A=0;for(;M<y;){M++,R+=I;let N=v.length===A+1?1/0:v[A+1]-v[A]-1;M+N>y&&(R-=I,N=y-M+1),M+=N,R+=E(N),A++}return R}})),y=>{fe(n,y),requestAnimationFrame(()=>{fe(e,{top:y}),requestAnimationFrame(()=>{fe(n,0),fe(p,!1)})})}),{deviation:n}},Be(It,ks,Tr,gn,Xn,nf)),XF=Ce(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Q(0);return Oe(K(e,de(r),le(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{hn(K(n,ao(1),le(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{fe(t,o)})})}),{initialScrollTop:r}},Be(Qn,It,Tr),{singleton:!0}),QF=Ce(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Q(!1),r=Tt(K(dt(n,e,t),le(([o])=>o),ne(([,o,s])=>Math.max(0,o-s)),kn(0),$e()),0);return{alignToBottom:n,paddingTopAddition:r}},Be(It,i0),{singleton:!0}),lf=Ce(([{scrollTo:e,scrollContainerState:t}])=>{const n=ge(),r=ge(),o=ge(),s=Q(!1),i=Q(void 0);return ie(K(dt(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ie(K(e,de(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Be(It)),ZF=({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,JF=Ce(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=ge();return ie(K(u,de(e,o,t,s,i,a,r),de(n),ne(([[f,h,d,p,m,g,y,b],v])=>{const{done:S,behavior:T,align:E,calculateViewLocation:R=ZF,...I}=f,M=Jb(f,h,p-1),A=ms(M,h.offsetTree,v)+m+g,N=A+qt(h.sizeTree,M)[1],k=b+g,j=b+d-y,P=R({itemTop:A,itemBottom:N,viewportTop:k,viewportBottom:j,locationParams:{behavior:T,align:E,...I}});return P?S&&hn(K(l,le(O=>O===!1),ao(wt(l)?1:2)),S):S&&S(),P}),le(f=>f!==null)),c),{scrollIntoView:u}},Be(gn,It,Ms,Tr,Xn),{singleton:!0}),ej=Ce(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=ge(),u=Q(void 0),f=Q(null),h=Q(null);return ie(a,f),ie(l,h),Oe(K(c,de(e,n,i,f,h,r)),([d,p,m,g,y,b,v])=>{const S=jF(p.sizeTree);g&&y!==null&&b!==null&&(m=y.scrollTop-b.offsetTop),m-=v,d({ranges:S,scrollTop:m})}),ie(K(u,le(Zu),ne(tj)),o),ie(K(s,de(u),le(([,d])=>d!==void 0),$e(),ne(([,d])=>d.ranges)),t),{getState:c,restoreStateFrom:u}},Be(gn,It,Fs,Qn,lf));function tj(e){return{offset:e.scrollTop,index:0,align:"start"}}const nj=Ce(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Be(af,GF,Qn,s0,i0,XF,QF,lf,JF,Xn)),l0=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:R},{groupCounts:I},M])=>(ie(S.rangeChanged,M.scrollSeekRangeChanged),ie(K(M.windowViewportRect,ne(A=>A.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p,topItemsIndexes:v,topItemCount:R,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...y,statefulTotalCount:c,listState:b,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...M,...m,sizes:f,...g}),Be(gn,Fs,It,ej,WF,Tr,Ms,qF,YF,n0,nj)),El="-webkit-sticky",Zp="sticky",c0=a0(()=>{if(typeof document>"u")return Zp;const e=document.createElement("div");return e.style.position=El,e.style.position===El?El:Zp});function cf(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}=tf(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 va=w.createContext(void 0),u0=w.createContext(void 0);function uf(e){return e}const rj=Ce(()=>{const e=Q(l=>`Item ${l}`),t=Q(null),n=Q(l=>`Group ${l}`),r=Q({}),o=Q(uf),s=Q("div"),i=Q(wr),a=(l,c=null)=>Tt(K(r,ne(u=>u[l]),$e()),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")}}),oj=Ce(([e,t])=>({...e,...t}),Be(l0,rj)),sj=({height:e})=>w.createElement("div",{style:{height:e}}),ij={position:c0(),zIndex:1,overflowAnchor:"none"},aj={overflowAnchor:"none"},Jp=w.memo(function({showTopList:t=!1}){const n=pe("listState"),r=Wt("sizeRanges"),o=pe("useWindowScroll"),s=pe("customScrollParent"),i=Wt("windowScrollContainerState"),a=Wt("scrollContainerState"),l=s||o?i:a,c=pe("itemContent"),u=pe("context"),f=pe("groupContent"),h=pe("trackItemSizes"),d=pe("itemSize"),p=pe("log"),m=Wt("gap"),{callbackRef:g}=zb(r,d,h,t?wr:l,p,m,s),[y,b]=w.useState(0);hf("deviation",P=>{y!==P&&b(P)});const v=pe("EmptyPlaceholder"),S=pe("ScrollSeekPlaceholder")||sj,T=pe("ListComponent"),E=pe("ItemComponent"),R=pe("GroupComponent"),I=pe("computeItemKey"),M=pe("isSeeking"),A=pe("groupIndices").length>0,N=pe("alignToBottom"),k=pe("initialItemFinalLocationReached"),j=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:y!==0?y:N?"auto":0,...k?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&v?w.createElement(v,Ke(v,u)):w.createElement(T,{...Ke(T,u),ref:g,style:j,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const O=P.originalIndex,F=I(O+n.firstItemIndex,P.data,u);return M?w.createElement(S,{...Ke(S,u),key:F,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?w.createElement(R,{...Ke(R,u),key:F,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,style:ij},f(P.index,u)):w.createElement(E,{...Ke(E,u),...f0(E,P.data),key:F,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:aj},A?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),lj={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ko=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),cj={width:"100%",position:c0(),top:0,zIndex:1};function Ke(e,t){if(typeof e!="string")return{context:t}}function f0(e,t){return{item:typeof e=="string"?void 0:t}}const uj=w.memo(function(){const t=pe("HeaderComponent"),n=Wt("headerHeight"),r=pe("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Kt(i,"height")),[n])),s=pe("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null}),fj=w.memo(function(){const t=pe("FooterComponent"),n=Wt("footerHeight"),r=pe("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Kt(i,"height")),[n])),s=pe("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null});function ff({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}=Gb(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:d,style:{...lj,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Ke(c,h)},i)})}function df({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}=Gb(l,u,c,wr,d);return xF(()=>(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,...Ke(c,p)},i)})}const dj=({children:e})=>{const t=w.useContext(va),n=Wt("viewportHeight"),r=Wt("fixedItemHeight"),o=pe("alignToBottom"),s=pn(w.useMemo(()=>ds(n,i=>Kt(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:ko(o),ref:s,"data-viewport-type":"element"},e)},hj=({children:e})=>{const t=w.useContext(va),n=Wt("windowViewportRect"),r=Wt("fixedItemHeight"),o=pe("customScrollParent"),s=cf(n,o),i=pe("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:ko(i),"data-viewport-type":"window"},e)},pj=({children:e})=>{const t=pe("TopItemListComponent")||"div",n=pe("headerHeight"),r={...cj,marginTop:`${n}px`},o=pe("context");return w.createElement(t,{style:r,...Ke(t,o)},e)},mj=w.memo(function(t){const n=pe("useWindowScroll"),r=pe("topItemsIndexes").length>0,o=pe("customScrollParent"),s=o||n?vj:yj,i=o||n?hj:dj;return w.createElement(s,{...t},r&&w.createElement(pj,null,w.createElement(Jp,{showTopList:!0})),w.createElement(i,null,w.createElement(uj,null),w.createElement(Jp,null),w.createElement(fj,null)))}),{Component:gj,usePublisher:Wt,useEmitterValue:pe,useEmitter:hf}=ef(oj,{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"}},mj),yj=ff({usePublisher:Wt,useEmitterValue:pe,useEmitter:hf}),vj=df({usePublisher:Wt,useEmitterValue:pe,useEmitter:hf}),bj=gj,em={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},xj={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:tm,ceil:nm,floor:Wi,min:Cl,max:ts}=Math;function wj(e){return{...xj,items:e}}function rm(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 Tj(e,t){return e&&e.column===t.column&&e.row===t.row}function Js(e,t){return e&&e.width===t.width&&e.height===t.height}const Sj=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=Q(0),E=Q(0),R=Q(em),I=Q({height:0,width:0}),M=Q({height:0,width:0}),A=ge(),N=ge(),k=Q(0),j=Q(null),P=Q({row:0,column:0}),O=ge(),F=ge(),_=Q(!1),H=Q(0),U=Q(!0),D=Q(!1);Oe(K(p,de(H),le(([L,B])=>!!B)),()=>{fe(U,!1),fe(E,0)}),Oe(K(dt(p,U,M,I,H,D),le(([L,B,z,V,,Y])=>L&&!B&&z.height!==0&&V.height!==0&&!Y)),([,,,,L])=>{fe(D,!0),of(1,()=>{fe(A,L)}),hn(K(r),()=>{fe(n,[0,0]),fe(U,!0)})}),ie(K(F,le(L=>L!=null&&L.scrollTop>0),en(0)),E),Oe(K(p,de(F),le(([,L])=>L!=null)),([,L])=>{L&&(fe(I,L.viewport),fe(M,L==null?void 0:L.item),fe(P,L.gap),L.scrollTop>0&&(fe(_,!0),hn(K(r,ao(1)),B=>{fe(_,!1)}),fe(i,{top:L.scrollTop})))}),ie(K(I,ne(({height:L})=>L)),o),ie(K(dt(ce(I,Js),ce(M,Js),ce(P,(L,B)=>L&&L.column===B.column&&L.row===B.row),ce(r)),ne(([L,B,z,V])=>({viewport:L,item:B,gap:z,scrollTop:V}))),O),ie(K(dt(ce(T),t,ce(P,Tj),ce(M,Js),ce(I,Js),ce(j),ce(E),ce(_),ce(U),ce(H)),le(([,,,,,,,L])=>!L),ne(([L,[B,z],V,Y,ee,W,we,,Ue,je])=>{const{row:Ge,column:se}=V,{height:me,width:oe}=Y,{width:ye}=ee;if(we===0&&(L===0||ye===0))return em;if(oe===0){const Pt=sf(je,L),Zn=Pt===0?Math.max(we-1,0):Pt;return wj(rm(Pt,Zn,W))}const Qe=d0(ye,oe,se);let ve,ot;Ue?B===0&&z===0&&we>0?(ve=0,ot=we-1):(ve=Qe*Wi((B+Ge)/(me+Ge)),ot=Qe*nm((z+Ge)/(me+Ge))-1,ot=Cl(L-1,ts(ot,Qe-1)),ve=Cl(ot,ts(0,ve))):(ve=0,ot=-1);const Z=rm(ve,ot,W),{top:re,bottom:xe}=om(ee,V,Y,Z),Ne=nm(L/Qe),vt=Ne*me+(Ne-1)*Ge-xe;return{items:Z,offsetTop:re,offsetBottom:vt,top:re,bottom:xe,itemHeight:me,itemWidth:oe}})),R),ie(K(j,le(L=>L!==null),ne(L=>L.length)),T),ie(K(dt(I,M,R,P),le(([L,B,{items:z}])=>z.length>0&&B.height!==0&&L.height!==0),ne(([L,B,{items:z},V])=>{const{top:Y,bottom:ee}=om(L,V,B,z);return[Y,ee]}),$e(ys)),n);const $=Q(!1);ie(K(r,de($),ne(([L,B])=>B||L!==0)),$);const q=jt(K(ce(R),le(({items:L})=>L.length>0),de(T,$),le(([{items:L},B,z])=>z&&L[L.length-1].index===B-1),ne(([,L])=>L-1),$e())),J=jt(K(ce(R),le(({items:L})=>L.length>0&&L[0].index===0),en(0),$e())),X=jt(K(ce(R),de(_),le(([{items:L},B])=>L.length>0&&!B),ne(([{items:L}])=>({startIndex:L[0].index,endIndex:L[L.length-1].index})),$e(r0),kn(0)));ie(X,h.scrollSeekRangeChanged),ie(K(A,de(I,M,T,P),ne(([L,B,z,V,Y])=>{const ee=t0(L),{align:W,behavior:we,offset:Ue}=ee;let je=ee.index;je==="LAST"&&(je=V-1),je=ts(0,je,Cl(V-1,je));let Ge=kc(B,Y,z,je);return W==="end"?Ge=tm(Ge-B.height+z.height):W==="center"&&(Ge=tm(Ge-B.height/2+z.height/2)),Ue&&(Ge+=Ue),{top:Ge,behavior:we}})),i);const G=Tt(K(R,ne(L=>L.offsetBottom+L.bottom)),0);return ie(K(m,ne(L=>({width:L.visibleWidth,height:L.visibleHeight}))),I),{data:j,totalCount:T,viewportDimensions:I,itemDimensions:M,scrollTop:r,scrollHeight:N,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:A,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:v,useWindowScroll:g,customScrollParent:y,windowScrollContainerState:b,deviation:k,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:F,...h,initialTopMostItemIndex:H,gridState:R,totalListHeight:G,...f,startReached:J,endReached:q,rangeChanged:X,stateChanged:O,propsReady:d,stateRestoreInProgress:_,...S}},Be(af,It,ks,s0,Qn,lf,Xn));function om(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=kc(e,t,n,r[0].index),i=kc(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function kc(e,t,n,r){const o=d0(e.width,n.width,t.column),s=Wi(r/o),i=s*n.height+ts(0,s-1)*t.row;return i>0?i+t.row:i}function d0(e,t,n){return ts(1,Wi((e+n)/(Wi(t)+n)))}const Ej=Ce(()=>{const e=Q(c=>`Item ${c}`),t=Q({}),n=Q(null),r=Q("virtuoso-grid-item"),o=Q("virtuoso-grid-list"),s=Q(uf),i=Q("div"),a=Q(wr),l=(c,u=null)=>Tt(K(t,ne(f=>f[c]),$e()),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")}}),Cj=Ce(([e,t])=>({...e,...t}),Be(Sj,Ej)),Pj=w.memo(function(){const t=We("gridState"),n=We("listClassName"),r=We("itemClassName"),o=We("itemContent"),s=We("computeItemKey"),i=We("isSeeking"),a=Gt("scrollHeight"),l=We("ItemComponent"),c=We("ListComponent"),u=We("ScrollSeekPlaceholder"),f=We("context"),h=Gt("itemDimensions"),d=Gt("gap"),p=We("log"),m=We("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:sm("row-gap",getComputedStyle(y).rowGap,p),column:sm("column-gap",getComputedStyle(y).columnGap,p)})},[a,h,d,p]));return m?null:w.createElement(c,{ref:g,className:n,...Ke(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,...Ke(u,f),index:y.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...Ke(l,f),className:r,"data-index":y.index,key:b},o(y.index,y.data,f))}))}),Rj=w.memo(function(){const t=We("HeaderComponent"),n=Gt("headerHeight"),r=We("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Kt(i,"height")),[n])),s=We("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null}),Ij=w.memo(function(){const t=We("FooterComponent"),n=Gt("footerHeight"),r=We("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Kt(i,"height")),[n])),s=We("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null}),Aj=({children:e})=>{const t=w.useContext(u0),n=Gt("itemDimensions"),r=Gt("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:ko(!1),ref:o},e)},Oj=({children:e})=>{const t=w.useContext(u0),n=Gt("windowViewportRect"),r=Gt("itemDimensions"),o=We("customScrollParent"),s=cf(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:ko(!1)},e)},Dj=w.memo(function({...t}){const n=We("useWindowScroll"),r=We("customScrollParent"),o=r||n?kj:Mj,s=r||n?Oj:Aj;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(Rj,null),w.createElement(Pj,null),w.createElement(Ij,null)))}),{Component:_L,usePublisher:Gt,useEmitterValue:We,useEmitter:h0}=ef(Cj,{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"}},Dj),Mj=ff({usePublisher:Gt,useEmitterValue:We,useEmitter:h0}),kj=df({usePublisher:Gt,useEmitterValue:We,useEmitter:h0});function sm(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Nt.WARN),t==="normal"?0:parseInt(t??"0",10)}const Fj=Ce(()=>{const e=Q(l=>w.createElement("td",null,"Item $",l)),t=Q(null),n=Q(null),r=Q(null),o=Q({}),s=Q(uf),i=Q(wr),a=(l,c=null)=>Tt(K(o,ne(u=>u[l]),$e()),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")}}),jj=Ce(([e,t])=>({...e,...t}),Be(l0,Fj)),Nj=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),Lj=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),_j={overflowAnchor:"none"},Vj=w.memo(function(){const t=Ie("listState"),n=Yt("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),s=Yt("windowScrollContainerState"),i=Yt("scrollContainerState"),a=o||r?s:i,l=Ie("itemContent"),c=Ie("trackItemSizes"),u=Ie("itemSize"),f=Ie("log"),{callbackRef:h,ref:d}=zb(n,u,c,a,f,void 0,o),[p,m]=w.useState(0);pf("deviation",F=>{p!==F&&(d.current.style.marginTop=`${F}px`,m(F))});const g=Ie("EmptyPlaceholder"),y=Ie("ScrollSeekPlaceholder")||Nj,b=Ie("FillerRow")||Lj,v=Ie("TableBodyComponent"),S=Ie("TableRowComponent"),T=Ie("computeItemKey"),E=Ie("isSeeking"),R=Ie("paddingTopAddition"),I=Ie("firstItemIndex"),M=Ie("statefulTotalCount"),A=Ie("context");if(M===0&&g)return w.createElement(g,Ke(g,A));const N=t.offsetTop+R+p,k=t.offsetBottom,j=N>0?w.createElement(b,{height:N,key:"padding-top",context:A}):null,P=k>0?w.createElement(b,{height:k,key:"padding-bottom",context:A}):null,O=t.items.map(F=>{const _=F.originalIndex,H=T(_+I,F.data,A);return E?w.createElement(y,{...Ke(y,A),key:H,index:F.index,height:F.size,type:F.type||"item"}):w.createElement(S,{...Ke(S,A),...f0(S,F.data),key:H,"data-index":_,"data-known-size":F.size,"data-item-index":F.index,style:_j},l(F.index,F.data,A))});return w.createElement(v,{ref:h,"data-testid":"virtuoso-item-list",...Ke(v,A)},[j,...O,P])}),$j=({children:e})=>{const t=w.useContext(va),n=Yt("viewportHeight"),r=Yt("fixedItemHeight"),o=pn(w.useMemo(()=>ds(n,s=>Kt(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:ko(!1),ref:o,"data-viewport-type":"element"},e)},Bj=({children:e})=>{const t=w.useContext(va),n=Yt("windowViewportRect"),r=Yt("fixedItemHeight"),o=Ie("customScrollParent"),s=cf(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:ko(!1),"data-viewport-type":"window"},e)},Hj=w.memo(function(t){const n=Ie("useWindowScroll"),r=Ie("customScrollParent"),o=Yt("fixedHeaderHeight"),s=Yt("fixedFooterHeight"),i=Ie("fixedHeaderContent"),a=Ie("fixedFooterContent"),l=Ie("context"),c=pn(w.useMemo(()=>ds(o,b=>Kt(b,"height")),[o])),u=pn(w.useMemo(()=>ds(s,b=>Kt(b,"height")),[s])),f=r||n?Uj:zj,h=r||n?Bj:$j,d=Ie("TableComponent"),p=Ie("TableHeadComponent"),m=Ie("TableFooterComponent"),g=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Ke(p,l)},i()):null,y=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Ke(m,l)},a()):null;return w.createElement(f,{...t},w.createElement(h,null,w.createElement(d,{style:{borderSpacing:0,overflowAnchor:"none"},...Ke(d,l)},[g,w.createElement(Vj,{key:"TableBody"}),y])))}),{Component:Wj,usePublisher:Yt,useEmitterValue:Ie,useEmitter:pf}=ef(jj,{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"}},Hj),zj=ff({usePublisher:Yt,useEmitterValue:Ie,useEmitter:pf}),Uj=df({usePublisher:Yt,useEmitterValue:Ie,useEmitter:pf}),Gj=Wj,Yj=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},Kj={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"})})},qj=e=>{const t=w.useRef(null),n=Yj(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(Os,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(bj,{height:n,useWindowScroll:!0,data:e.source,components:Kj,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(Pb,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Gr,{children:x.jsx(Tu,{})})}),x.jsx("div",{})]})};var Xj=Object.defineProperty,im=Object.getOwnPropertySymbols,Qj=Object.prototype.hasOwnProperty,Zj=Object.prototype.propertyIsEnumerable,am=(e,t,n)=>t in e?Xj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jj=(e,t)=>{for(var n in t||(t={}))Qj.call(t,n)&&am(e,n,t[n]);if(im)for(var n of im(t))Zj.call(t,n)&&am(e,n,t[n]);return e},mf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},eN=(e,t,n,r)=>ba(mf,e,t,n,r),lo=e=>typeof e=="object",Nn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!lo(e)&&!lo(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=>Nn(e[r],t[r]))},tN=(e,t)=>(lo(e)||Array.isArray(e))&&t?e[t]:e,nN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,zi=e=>/[0-9.]+/.test(e),lm=e=>["string","number"].includes(typeof e),cm=e=>e==null||(e==null?void 0:e.length)===0||e==="",um={eq:Nn,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:cm,notEmpty:e=>!cm(e),in:(e,t)=>mf(t,n=>Nn(e,n)),notIn:(e,t)=>p0(t,n=>!Nn(e,n))},rN=e=>{if(e in um)return um[e];throw new Error("Linq - Symbol not found")},Hr=(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},ba=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=rN(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},oN=(e,t,n,r)=>ba(Hr,e,t,n,r),p0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},sN=(e,t,n,r)=>ba(p0,e,t,n,r),m0=e=>{if(e===null)return null;const t=Jj({},e);return Object.keys(t).forEach(n=>t[n]=lo(e[n])?m0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},fm=(e,t)=>{if(lo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Nn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Nn(t,r))return!0}return!1},iN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},aN=e=>Hr(e,(t,n,r)=>lo(t)?n===r.findIndex(o=>Nn(o,t)):n===r.indexOf(t)),lN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},g0=(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())},cN=(e,t)=>g0(e,n=>n[t]),dm=(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},uN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},fN=(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 zi(e)&&zi(t)?r.map(i=>Number.parseInt(i)):r},Pl=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&zi(e)&&zi(t)){const o=[],[s,i]=uN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return fN(e,t,r)},dN=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Pl(r,o,1):Pl(r,s,Number.parseInt(o,10))}return lm(e)&&lm(t)?Pl(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Rl=(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},hm=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},hN=(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)},pN=(e,t,n,r)=>ba(hN,e,t,n,r),pm=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(nN(t))},y0=(e=>(e.Asc="asc",e.Desc="desc",e))(y0||{}),mN=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),gN=(e,t)=>e.sort(mN(t)),yN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Hr(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},vN=class Fc{constructor(t=[]){this.array=t}static Range(...t){return dN(...t)}static New(t){return new Fc(t)}Where(t,n,r){return this.array=oN(this.array,t,n,r),this}Some(t,n,r){return eN(this.array,t,n,r)}All(t,n,r){return sN(this.array,t,n,r)}Reverse(){return this.array=hm(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=pN(this.array,t,n,r),this}Distinct(){return this.array=aN(this.array),this}First(t){return t===void 0?this.array[0]:lN(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?Rl((n,r)=>n+r,0,this.array):Rl((n,r)=>n+tN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return cN(this.array,t)}GroupWith(t){return g0(this.array,t)}Except(t){return Hr(this.array,n=>!fm(t,n))}Intersect(t){return Hr(this.array,n=>fm(t,n))}OrderBy(t,n){let r;return r=t?pm(this.array,t):this.array.toSorted(),this.array=n==="desc"?hm(r):r,this}Includes(t){return mf(this.array,n=>Nn(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 Rl(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(dm(this.array,n=>[t,n]))}Zip(t,n){return dm(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Hr(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Fc(m0(this.array))}ToObject(t){return iN(this.array,t)}Sort(t){return Array.isArray(t)?gN(this.array,t):pm(this.array,t)}Unique(t){return yN(this.array,t)}},v0=vN,jc={};(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 R=E.parse(b);return R===""?T:T.concat(R)},[`${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})(jc);const gf=e=>e.headerLabel??e.thead??e.id,yf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Wr=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Wr||{});const vf=e=>e.type==="number"?e.valueAsNumber:e.value,bN=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},xN={},wN=(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}})},TN=(e,t,n=xN)=>{const r=Pi()?null:jc.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=Au({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:wN(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Pi()||jc.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},Nc=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??Wr.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:Ps(),operation:l,label:gf(e),name:o,type:s,value:"",...r}},bf=()=>{const e=Ct(),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(()=>({[Wr.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Wr.Boolean]:[t.is,t.isNot],[Wr.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},SN=e=>{const t=Ct(),n=bf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Nc(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 Nc(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=vf(l.target);e.set(f=>f.map(h=>h.id===c?{...h,value:u}:h))};return x.jsx(w.Fragment,{children:x.jsx(Ao,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(EP,{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(br,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(br,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Os,{"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(Zr,{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(Su,{size:14})," ",t.tableFilterNewFilter]})})]})})})},EN=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=bf(),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=vf(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(br,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Os,{"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(Zr,{className:"text-danger",size:14})})]})},CN=({item:e,onPointerDown:t})=>{const n=mr(0);return x.jsxs(ta.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(SP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},PN=e=>{var l;const t=Ct(),n=yf(e.cols),r=fP(),[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 v0(e.rows).GroupBy(f),m=e.cols.find(y=>y.id===f);e.setGroups(Pw(p).map((y,b)=>{const v=p[y];return{...m,groupId:Ps(),groupKey:f,index:b,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(Ao,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(IP,{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(br,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(Gr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Zr,{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(MC,{children:x.jsx(ta.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(CN,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},RN=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),IN=(e,t)=>e.toSorted(RN(t)),b0=(e,t,n)=>({id:Ps(),type:n,value:e.id,label:t}),AN=e=>{const t=Ct(),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,b0(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(Ao,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Ay,{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(br,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(br,{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(Zr,{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(Su,{size:14})," ",t.tableSortAddButton]})})]})})})},ON=e=>{const t=Ct(),[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=b0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=gf(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(vP,{size:14}):null,n==="desc"?x.jsx(yP,{size:14}):null,n==="undefined"?x.jsx(Ay,{size:14}):null]})},DN=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(SN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(AN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(PN,{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=vf(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function MN(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 kN=e=>{const t=w.useId(),n=Ct(),r=e.asLink||"button",o=w.useMemo(()=>MN(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]})})]})},FN={top:0,left:0,right:0,bottom:-1},jN=e=>{var p;const t=Ct(),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=bf(),a=r?CP:PP,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===y0.Asc?"ascending":"descending":"none",h=gf(e.header),d=mr(void 0);return x.jsxs(ta.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(Ao,{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(EN,{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(Nc(e.header,i.options,i.operations))),children:[x.jsx(Su,{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(ON,{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:FN,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))}})]})},NN=e=>x.jsx(ta.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(vo,{children:e.headers.map(t=>x.jsx(jN,{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}`))})}),x0=w.createContext({}),LN=()=>w.useContext(x0),_N=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(vo,{children:n.children})})),VN=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??""}`})),$N=w.forwardRef(({context:e,...t},n)=>{const r=LN(),o={...t==null?void 0:t.style,top:bn.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})}),BN=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)??""}`})),HN=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),WN={TableHead:$N,Table:VN,TableBody:_N,TableRow:BN,TableFoot:HN},zN=[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"}),UN=(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(gv,{})}),GN=(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=Du(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:bn.nil(l)?"":l}))})})},YN=()=>x.jsx(w.Fragment,{}),KN=[{}],mm=({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=Ic(i),m=Ic(u.loadingMore),g=w.useMemo(()=>{if(u.loading)return zN;if(c)return u.rows;const y=new v0(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():IN(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(Gj,{useWindowScroll:!0,followOutput:"smooth",components:WN,totalCount:g.length,data:g.length===0?KN:g,fixedFooterContent:h?YN:null,itemContent:g.length===0?UN:GN,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(NN,{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(kN,{...l}):null]})},qN=(e,t)=>typeof t=="function"?t(e):t,ei=(e,t,n)=>e===t||n==null?void 0:n(t),XN=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>yf(e.cols),[e.cols]),[o,s]=Au({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:qN(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),ei((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),ei((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),ei((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),ei((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(x0.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(DN,{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(mm,{...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(mm,{...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 QN=String.prototype.replace,ZN=/%20/g,Il={RFC1738:"RFC1738",RFC3986:"RFC3986"},xf={default:Il.RFC3986,formatters:{RFC1738:function(e){return QN.call(e,ZN,"+")},RFC3986:function(e){return String(e)}},RFC1738:Il.RFC1738,RFC3986:Il.RFC3986},JN=xf,Al=Object.prototype.hasOwnProperty,ar=Array.isArray,Qt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),eL=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(ar(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},tL=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(ar(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Al.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 ar(t)&&!ar(n)&&(o=T0(t,r)),ar(t)&&ar(n)?(n.forEach(function(s,i){if(Al.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 Al.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},nL=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},rL=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}},Ol=1024,oL=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+=Ol){for(var c=i.length>=Ol?i.slice(l,l+Ol):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===JN.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(f);continue}if(h<128){u[u.length]=Qt[h];continue}if(h<2048){u[u.length]=Qt[192|h>>6]+Qt[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=Qt[224|h>>12]+Qt[128|h>>6&63]+Qt[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=Qt[240|h>>18]+Qt[128|h>>12&63]+Qt[128|h>>6&63]+Qt[128|h&63]}a+=u.join("")}return a},sL=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 eL(n),t},iL=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},aL=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},lL=function(t,n){return[].concat(t,n)},cL=function(t,n){if(ar(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:nL,combine:lL,compact:sL,decode:rL,encode:oL,isBuffer:aL,isRegExp:iL,maybeMap:cL,merge:tL},E0=ww,fi=S0,ns=xf,uL=Object.prototype.hasOwnProperty,C0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Zt=Array.isArray,fL=Array.prototype.push,P0=function(e,t){fL.apply(e,Zt(t)?t:[t])},dL=Date.prototype.toISOString,gm=ns.default,st={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:fi.encode,encodeValuesOnly:!1,format:gm,formatter:ns.formatters[gm],indices:!1,serializeDate:function(t){return dL.call(t)},skipNulls:!1,strictNullHandling:!1},hL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Dl={},pL=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(Dl))!==void 0&&!E;){var R=S.get(t);if(T+=1,typeof R<"u"){if(R===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Dl)>"u"&&(T=0)}if(typeof u=="function"?v=u(n,v):v instanceof Date?v=d(v):r==="comma"&&Zt(v)&&(v=fi.maybeMap(v,function(D){return D instanceof Date?d(D):D})),v===null){if(i)return c&&!g?c(n,st.encoder,y,"key",p):n;v=""}if(hL(v)||fi.isBuffer(v)){if(c){var I=g?n:c(n,st.encoder,y,"key",p);return[m(I)+"="+m(c(v,st.encoder,y,"value",p))]}return[m(n)+"="+m(String(v))]}var M=[];if(typeof v>"u")return M;var A;if(r==="comma"&&Zt(v))g&&c&&(v=fi.maybeMap(v,c)),A=[{value:v.length>0?v.join(",")||null:void 0}];else if(Zt(u))A=u;else{var N=Object.keys(v);A=f?N.sort(f):N}var k=l?n.replace(/\./g,"%2E"):n,j=o&&Zt(v)&&v.length===1?k+"[]":k;if(s&&Zt(v)&&v.length===0)return j+"[]";for(var P=0;P<A.length;++P){var O=A[P],F=typeof O=="object"&&typeof O.value<"u"?O.value:v[O];if(!(a&&F===null)){var _=h&&l?O.replace(/\./g,"%2E"):O,H=Zt(v)?typeof r=="function"?r(j,_):j:j+(h?"."+_:"["+_+"]");b.set(t,T);var U=E0();U.set(Dl,b),P0(M,e(F,H,r,o,s,i,a,l,r==="comma"&&g&&Zt(v)?null:c,u,f,h,d,p,m,g,y,U))}}return M},mL=function(t){if(!t)return st;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||st.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=ns.default;if(typeof t.format<"u"){if(!uL.call(ns.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ns.formatters[r],s=st.filter;(typeof t.filter=="function"||Zt(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in C0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=st.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:st.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:st.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:st.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:st.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?st.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:st.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:st.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:st.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:st.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:st.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:st.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:st.strictNullHandling}},gL=function(e,t){var n=e,r=mL(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):Zt(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,pL(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:""},co=S0,Lc=Object.prototype.hasOwnProperty,yL=Array.isArray,Ze={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:co.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},R0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},bL="utf8=%26%2310003%3B",xL="utf8=%E2%9C%93",wL=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]===xL?c="utf-8":i[l]===bL&&(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,Ze.decoder,c,"key"),p=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,h),Ze.decoder,c,"key"),p=co.maybeMap(R0(u.slice(h+1),n),function(g){return n.decoder(g,Ze.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=vL(p)),u.indexOf("[]=")>-1&&(p=yL(p)?[p]:p);var m=Lc.call(r,d);m&&n.duplicates==="combine"?r[d]=co.combine(r[d],p):(!m||n.duplicates==="last")&&(r[d]=p)}return r},TL=function(e,t,n,r){for(var o=r?t:R0(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},SL=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&&Lc.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&&Lc.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),TL(u,n,r,o)}},EL=function(t){if(!t)return Ze;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"?Ze.charset:t.charset,r=typeof t.duplicates>"u"?Ze.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:Ze.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ze.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ze.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ze.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ze.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ze.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ze.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Ze.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Ze.decoder,delimiter:typeof t.delimiter=="string"||co.isRegExp(t.delimiter)?t.delimiter:Ze.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ze.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ze.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ze.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ze.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ze.strictNullHandling}},CL=function(e,t){var n=EL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?wL(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=SL(a,r[a],n,typeof e=="string");o=co.merge(o,l,n)}return n.allowSparse===!0?o:co.compact(o)},PL=gL,RL=CL,IL=xf,AL={formats:IL,parse:RL,stringify:PL};const OL=(e,t)=>e.localeCompare(t),DL={sort:OL,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 AL.parse(n.toString(),DL)},A0=e=>e.replace("[",".").replace("]","").split("."),Wo=(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),$o=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),ML=(e,t)=>{const[n,r]=w.useState(null),o=w.useRef({}),[s,i]=w.useState({}),a=(p,m)=>{const g=Wo(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=Wo(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=Wo(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=Wo(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($o(y)),v=T=>{var M;const E=y.dataset.target||y.name;if(!E)return;const R=$o(T.target)||(T.relatedTarget?$o(T.relatedTarget):""),I=g.schema.safeParse(R);if(I.success)return y.setCustomValidity(""),i(A=>Fa(A,E,I.data)),r(A=>{const{[E]:N,...k}=A||{};return k===null||bn.empty(k)?null:k});if(y.required){const A=((M=I.error.issues[0])==null?void 0:M.message)||"";y.setCustomValidity(A),r(N=>({...N,[E]:A}))}},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 M;const T=S.element,E=S.schema.safeParse($o(T));if(T.dataset.ignore==="ignore"||E.success)return v;const R=(M=E.error.issues[0])==null?void 0:M.message;T.setAttribute("data-initialized","true");const I=T.dataset.name||T.name||"";return{...v,[I]:R}},{}),b=bn.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=Fa(y,T.name,T.value)}if(S.tagName==="INPUT"){const T=S;y=Fa(y,T.name,$o(T))}});const v=e.safeParse(s);return v.success?p({form:g,json:y,data:v.data,event:m,reset:()=>Rc(g),success:!0,errors:[]}):p({form:g,json:y,event:m,data:y,success:!1,reset:()=>Rc(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=>Du(s,p)||""}},kL=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=MP;exports.Autocomplete=zM;exports.Button=Gr;exports.Calendar=pv;exports.Card=mv;exports.Checkbox=Pb;exports.ColType=Wr;exports.Collapse=Fy;exports.ComponentsProvider=xA;exports.DatePicker=GM;exports.Dropdown=Ao;exports.Empty=gv;exports.Expand=PM;exports.FileUpload=oF;exports.Form=iF;exports.Input=Os;exports.InputFeedback=Eb;exports.InputField=ha;exports.Menu=AM;exports.MenuItem=IM;exports.Modal=_M;exports.Notifications=CO;exports.Option=Cb;exports.Polymorph=mo;exports.Radiobox=aF;exports.RenderOnView=u1;exports.Select=br;exports.Stats=PO;exports.Switch=lF;exports.Tab=AO;exports.Table=XN;exports.Tabs=RO;exports.Tag=h1;exports.TaskList=cF;exports.Textarea=uF;exports.Toolbar=VM;exports.Tooltip=Sb;exports.TransferList=qj;exports.convertPath=A0;exports.createColumns=bN;exports.createDesignTokens=av;exports.createOptionCols=yf;exports.createStyles=pA;exports.createTheme=mA;exports.css=De;exports.defaultDarkTheme=vA;exports.defaultLightTheme=bA;exports.dispatchInput=$m;exports.formReset=Rc;exports.formToJson=I0;exports.getSchemaShape=Wo;exports.initializeInputDataset=Ui;exports.isReactComponent=i1;exports.isReactFC=a1;exports.isSsr=Pi;exports.mergeRefs=Gc;exports.parsers=ra;exports.path=Du;exports.reduceTokens=Nr;exports.safeRegex=ac;exports.splitInto=fv;exports.useColorParser=wA;exports.useForm=ML;exports.useLocale=uv;exports.useNotification=SO;exports.usePrevious=kL;exports.useReactive=Vv;exports.useTablePreferences=TN;exports.useTranslations=Ct;exports.uuid=Ps;
|
|
195
|
+
*/var gl,Sp;function JM(){if(Sp)return gl;Sp=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 gl=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 d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},gl}var yl,Ep;function Xu(){if(Ep)return yl;Ep=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return yl=e,yl}var vl,Cp;function Ab(){return Cp||(Cp=1,vl=Function.call.bind(Object.prototype.hasOwnProperty)),vl}var bl,Pp;function ek(){if(Pp)return bl;Pp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Xu(),n={},r=Ab();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 d;try{if(typeof s[u]!="function"){var f=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 f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d 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 d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bl=o,bl}var xl,Rp;function tk(){if(Rp)return xl;Rp=1;var e=Ib(),t=JM(),n=Xu(),r=Ab(),o=ek(),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 xl=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var $=D&&(c&&D[c]||D[u]);if(typeof $=="function")return $}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:y,element:T(),elementType:S(),instanceOf:E,node:A(),objectOf:I,oneOf:R,oneOfType:k,shape:M,exact:j};function p(D,$){return D===$?D!==0||1/D===1/$:D!==D&&$!==$}function m(D,$){this.message=D,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function g(D){if(process.env.NODE_ENV!=="production")var $={},K=0;function J(G,L,B,W,U,q,te){if(W=W||f,q=q||B,te!==n){if(l){var _=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 _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=W+":"+B;!$[ae]&&K<3&&(s("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+W+"`. 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."),$[ae]=!0,K++)}}return L[B]==null?G?L[B]===null?new m("The "+U+" `"+q+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+U+" `"+q+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:D(L,B,W,U,q)}var X=J.bind(null,!1);return X.isRequired=J.bind(null,!0),X}function v(D){function $(K,J,X,G,L,B){var W=K[J],U=F(W);if(U!==D){var q=V(W);return new m("Invalid "+G+" `"+L+"` of type "+("`"+q+"` supplied to `"+X+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return g($)}function b(){return g(i)}function y(D){function $(K,J,X,G,L){if(typeof D!="function")return new m("Property `"+L+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var B=K[J];if(!Array.isArray(B)){var W=F(B);return new m("Invalid "+G+" `"+L+"` of type "+("`"+W+"` supplied to `"+X+"`, expected an array."))}for(var U=0;U<B.length;U++){var q=D(B,U,X,G,L+"["+U+"]",n);if(q instanceof Error)return q}return null}return g($)}function T(){function D($,K,J,X,G){var L=$[K];if(!a(L)){var B=F(L);return new m("Invalid "+X+" `"+G+"` of type "+("`"+B+"` supplied to `"+J+"`, expected a single ReactElement."))}return null}return g(D)}function S(){function D($,K,J,X,G){var L=$[K];if(!e.isValidElementType(L)){var B=F(L);return new m("Invalid "+X+" `"+G+"` of type "+("`"+B+"` supplied to `"+J+"`, expected a single ReactElement type."))}return null}return g(D)}function E(D){function $(K,J,X,G,L){if(!(K[J]instanceof D)){var B=D.name||f,W=z(K[J]);return new m("Invalid "+G+" `"+L+"` of type "+("`"+W+"` supplied to `"+X+"`, expected ")+("instance of `"+B+"`."))}return null}return g($)}function R(D){if(!Array.isArray(D))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 $(K,J,X,G,L){for(var B=K[J],W=0;W<D.length;W++)if(p(B,D[W]))return null;var U=JSON.stringify(D,function(te,_){var ae=V(_);return ae==="symbol"?String(_):_});return new m("Invalid "+G+" `"+L+"` of value `"+String(B)+"` "+("supplied to `"+X+"`, expected one of "+U+"."))}return g($)}function I(D){function $(K,J,X,G,L){if(typeof D!="function")return new m("Property `"+L+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var B=K[J],W=F(B);if(W!=="object")return new m("Invalid "+G+" `"+L+"` of type "+("`"+W+"` supplied to `"+X+"`, expected an object."));for(var U in B)if(r(B,U)){var q=D(B,U,X,G,L+"."+U,n);if(q instanceof Error)return q}return null}return g($)}function k(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var $=0;$<D.length;$++){var K=D[$];if(typeof K!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(K)+" at index "+$+"."),i}function J(X,G,L,B,W){for(var U=[],q=0;q<D.length;q++){var te=D[q],_=te(X,G,L,B,W,n);if(_==null)return null;_.data&&r(_.data,"expectedType")&&U.push(_.data.expectedType)}var ae=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new m("Invalid "+B+" `"+W+"` supplied to "+("`"+L+"`"+ae+"."))}return g(J)}function A(){function D($,K,J,X,G){return P($[K])?null:new m("Invalid "+X+" `"+G+"` supplied to "+("`"+J+"`, expected a ReactNode."))}return g(D)}function N(D,$,K,J,X){return new m((D||"React class")+": "+$+" type `"+K+"."+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function M(D){function $(K,J,X,G,L){var B=K[J],W=F(B);if(W!=="object")return new m("Invalid "+G+" `"+L+"` of type `"+W+"` "+("supplied to `"+X+"`, expected `object`."));for(var U in D){var q=D[U];if(typeof q!="function")return N(X,G,L,U,V(q));var te=q(B,U,X,G,L+"."+U,n);if(te)return te}return null}return g($)}function j(D){function $(K,J,X,G,L){var B=K[J],W=F(B);if(W!=="object")return new m("Invalid "+G+" `"+L+"` of type `"+W+"` "+("supplied to `"+X+"`, expected `object`."));var U=t({},K[J],D);for(var q in U){var te=D[q];if(r(D,q)&&typeof te!="function")return N(X,G,L,q,V(te));if(!te)return new m("Invalid "+G+" `"+L+"` key `"+q+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(K[J],null," ")+`
|
|
196
|
+
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var _=te(B,q,X,G,L+"."+q,n);if(_)return _}return null}return g($)}function P(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(P);if(D===null||a(D))return!0;var $=d(D);if($){var K=$.call(D),J;if($!==D.entries){for(;!(J=K.next()).done;)if(!P(J.value))return!1}else for(;!(J=K.next()).done;){var X=J.value;if(X&&!P(X[1]))return!1}}else return!1;return!0;default:return!1}}function O(D,$){return D==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function F(D){var $=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":O($,D)?"symbol":$}function V(D){if(typeof D>"u"||D===null)return""+D;var $=F(D);if($==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return $}function H(D){var $=V(D);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function z(D){return!D.constructor||!D.constructor.name?f:D.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},xl}var wl,Ip;function nk(){if(Ip)return wl;Ip=1;var e=Xu();function t(){}function n(){}return n.resetWarningCache=t,wl=function(){function r(i,a,l,c,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}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},wl}if(process.env.NODE_ENV!=="production"){var rk=Ib(),ok=!0;Tc.exports=tk()(rk.isElement,ok)}else Tc.exports=nk()();var sk=Tc.exports;const je=j0(sk);function Oo(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(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Do(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 Ap(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 Op(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))}var ik=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 Ds(e,t){var n=ak(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 ak(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=ik.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var lk=[".DS_Store","Thumbs.db"];function ck(e){return Oo(this,void 0,void 0,function(){return Do(this,function(t){return Li(e)&&uk(e.dataTransfer)?[2,pk(e.dataTransfer,e.type)]:dk(e)?[2,fk(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,hk(e)]:[2,[]]})})}function uk(e){return Li(e)}function dk(e){return Li(e)&&Li(e.target)}function Li(e){return typeof e=="object"&&e!==null}function fk(e){return Sc(e.target.files).map(function(t){return Ds(t)})}function hk(e){return Oo(this,void 0,void 0,function(){var t;return Do(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 Ds(r)})]}})})}function pk(e,t){return Oo(this,void 0,void 0,function(){var n,r;return Do(this,function(o){switch(o.label){case 0:return e.items?(n=Sc(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(mk))]):[3,2];case 1:return r=o.sent(),[2,Dp(Ob(r))];case 2:return[2,Dp(Sc(e.files).map(function(s){return Ds(s)}))]}})})}function Dp(e){return e.filter(function(t){return lk.indexOf(t.name)===-1})}function Sc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function mk(e){if(typeof e.webkitGetAsEntry!="function")return Mp(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Db(t):Mp(e)}function Ob(e){return e.reduce(function(t,n){return Op(Op([],Ap(t),!1),Ap(Array.isArray(n)?Ob(n):[n]),!1)},[])}function Mp(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Ds(t);return Promise.resolve(n)}function gk(e){return Oo(this,void 0,void 0,function(){return Do(this,function(t){return[2,e.isDirectory?Db(e):yk(e)]})})}function Db(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Oo(i,void 0,void 0,function(){var l,c,u;return Do(this,function(d){switch(d.label){case 0:if(a.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(gk)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function yk(e){return Oo(this,void 0,void 0,function(){return Do(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=Ds(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var vk=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 kp(e){return wk(e)||xk(e)||kb(e)||bk()}function bk(){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 xk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wk(e){if(Array.isArray(e))return Ec(e)}function Fp(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 jp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fp(Object(n),!0).forEach(function(r){Mb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ds(e,t){return Ek(e)||Sk(e,t)||kb(e,t)||Tk()}function Tk(){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 kb(e,t){if(e){if(typeof e=="string")return Ec(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 Ec(e,t)}}function Ec(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 Sk(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 Ek(e){if(Array.isArray(e))return e}var Ck="file-invalid-type",Pk="file-too-large",Rk="file-too-small",Ik="too-many-files",Ak=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:Ck,message:"File type must be ".concat(n)}},Np=function(t){return{code:Pk,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Lp=function(t){return{code:Rk,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ok={code:Ik,message:"Too many files"};function Fb(e,t){var n=e.type==="application/x-moz-file"||vk(e,t);return[n,n?null:Ak(t)]}function jb(e,t,n){if(ir(e.size))if(ir(t)&&ir(n)){if(e.size>n)return[!1,Np(n)];if(e.size<t)return[!1,Lp(t)]}else{if(ir(t)&&e.size<t)return[!1,Lp(t)];if(ir(n)&&e.size>n)return[!1,Np(n)]}return[!0,null]}function ir(e){return e!=null}function Dk(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=Fb(l,n),u=ds(c,1),d=u[0],f=jb(l,r,o),h=ds(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function _i(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Qs(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 _p(e){e.preventDefault()}function Mk(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function kk(e){return e.indexOf("Edge/")!==-1}function Fk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Mk(e)||kk(e)}function Xt(){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!_i(r)&&a&&a.apply(void 0,[r].concat(s)),_i(r)})}}function jk(){return"showOpenFilePicker"in window}function Nk(e){if(ir(e)){var t=Object.entries(e).filter(function(n){var r=ds(n,2),o=r[0],s=r[1],i=!0;return Nb(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(Lb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=ds(r,2),s=o[0],i=o[1];return jp(jp({},n),{},Mb({},s,i))},{});return[{description:"Files",accept:t}]}return e}function Lk(e){if(ir(e))return Object.entries(e).reduce(function(t,n){var r=ds(n,2),o=r[0],s=r[1];return[].concat(kp(t),[o],kp(s))},[]).filter(function(t){return Nb(t)||Lb(t)}).join(",")}function _k(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Vk(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Nb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Lb(e){return/^.*\.[\w]+$/.test(e)}var $k=["children"],Bk=["open"],Hk=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Wk=["refKey","onChange","onClick"];function zk(e){return Yk(e)||Gk(e)||_b(e)||Uk()}function Uk(){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 Gk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yk(e){if(Array.isArray(e))return Cc(e)}function Tl(e,t){return Xk(e)||qk(e,t)||_b(e,t)||Kk()}function Kk(){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 _b(e,t){if(e){if(typeof e=="string")return Cc(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 Cc(e,t)}}function Cc(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 qk(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 Xk(e){if(Array.isArray(e))return e}function Vp(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?Vp(Object(n),!0).forEach(function(r){Pc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vi(e,t){if(e==null)return{};var n=Qk(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 Qk(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 Qu=w.forwardRef(function(e,t){var n=e.children,r=Vi(e,$k),o=$b(r),s=o.open,i=Vi(o,Bk);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(ze(ze({},i),{},{open:s})))});Qu.displayName="Dropzone";var Vb={disabled:!1,getFilesFromEvent:ck,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};Qu.defaultProps=Vb;Qu.propTypes={children:je.func,accept:je.objectOf(je.arrayOf(je.string)),multiple:je.bool,preventDropOnDocument:je.bool,noClick:je.bool,noKeyboard:je.bool,noDrag:je.bool,noDragEventsBubbling:je.bool,minSize:je.number,maxSize:je.number,maxFiles:je.number,disabled:je.bool,getFilesFromEvent:je.func,onFileDialogCancel:je.func,onFileDialogOpen:je.func,useFsAccessApi:je.bool,autoFocus:je.bool,onDragEnter:je.func,onDragLeave:je.func,onDragOver:je.func,onDrop:je.func,onDropAccepted:je.func,onDropRejected:je.func,onError:je.func,validator:je.func};var Rc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function $b(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ze(ze({},Vb),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,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,y=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,R=t.noDragEventsBubbling,I=t.onError,k=t.validator,A=w.useMemo(function(){return Lk(n)},[n]),N=w.useMemo(function(){return Nk(n)},[n]),M=w.useMemo(function(){return typeof g=="function"?g:$p},[g]),j=w.useMemo(function(){return typeof m=="function"?m:$p},[m]),P=w.useRef(null),O=w.useRef(null),F=w.useReducer(Zk,Rc),V=Tl(F,2),H=V[0],z=V[1],D=H.isFocused,$=H.isFileDialogActive,K=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&jk()),J=function(){!K.current&&$&&setTimeout(function(){if(O.current){var re=O.current.files;re.length||(z({type:"closeDialog"}),j())}},300)};w.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[O,$,j,K]);var X=w.useRef([]),G=function(re){P.current&&P.current.contains(re.target)||(re.preventDefault(),X.current=[])};w.useEffect(function(){return y&&(document.addEventListener("dragover",_p,!1),document.addEventListener("drop",G,!1)),function(){y&&(document.removeEventListener("dragover",_p),document.removeEventListener("drop",G))}},[P,y]),w.useEffect(function(){return!r&&b&&P.current&&P.current.focus(),function(){}},[P,b,r]);var L=w.useCallback(function(Z){I?I(Z):console.error(Z)},[I]),B=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),xe(Z),X.current=[].concat(zk(X.current),[Z.target]),Qs(Z)&&Promise.resolve(o(Z)).then(function(re){if(!(_i(Z)&&!R)){var Se=re.length,Le=Se>0&&Dk({files:re,accept:A,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:k}),ht=Se>0&&!Le;z({isDragAccept:Le,isDragReject:ht,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(re){return L(re)})},[o,c,L,R,A,i,s,a,l,k]),W=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),xe(Z);var re=Qs(Z);if(re&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return re&&d&&d(Z),!1},[d,R]),U=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),xe(Z);var re=X.current.filter(function(Le){return P.current&&P.current.contains(Le)}),Se=re.indexOf(Z.target);Se!==-1&&re.splice(Se,1),X.current=re,!(re.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qs(Z)&&u&&u(Z))},[P,u,R]),q=w.useCallback(function(Z,re){var Se=[],Le=[];Z.forEach(function(ht){var vt=Fb(ht,A),Pt=Tl(vt,2),Zn=Pt[0],Sr=Pt[1],Er=jb(ht,i,s),js=Tl(Er,2),wa=js[0],Ta=js[1],Sa=k?k(ht):null;if(Zn&&wa&&!Sa)Se.push(ht);else{var Ea=[Sr,Ta];Sa&&(Ea=Ea.concat(Sa)),Le.push({file:ht,errors:Ea.filter(function(O0){return O0})})}}),(!a&&Se.length>1||a&&l>=1&&Se.length>l)&&(Se.forEach(function(ht){Le.push({file:ht,errors:[Ok]})}),Se.splice(0)),z({acceptedFiles:Se,fileRejections:Le,type:"setFiles"}),f&&f(Se,Le,re),Le.length>0&&p&&p(Le,re),Se.length>0&&h&&h(Se,re)},[z,a,A,i,s,l,f,h,p,k]),te=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),xe(Z),X.current=[],Qs(Z)&&Promise.resolve(o(Z)).then(function(re){_i(Z)&&!R||q(re,Z)}).catch(function(re){return L(re)}),z({type:"reset"})},[o,q,L,R]),_=w.useCallback(function(){if(K.current){z({type:"openDialog"}),M();var Z={multiple:a,types:N};window.showOpenFilePicker(Z).then(function(re){return o(re)}).then(function(re){q(re,null),z({type:"closeDialog"})}).catch(function(re){_k(re)?(j(re),z({type:"closeDialog"})):Vk(re)?(K.current=!1,O.current?(O.current.value=null,O.current.click()):L(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."))):L(re)});return}O.current&&(z({type:"openDialog"}),M(),O.current.value=null,O.current.click())},[z,M,j,v,q,L,N,a]),ae=w.useCallback(function(Z){!P.current||!P.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),_())},[P,_]),he=w.useCallback(function(){z({type:"focus"})},[]),ve=w.useCallback(function(){z({type:"blur"})},[]),We=w.useCallback(function(){T||(Fk()?setTimeout(_,0):_())},[T,_]),oe=function(re){return r?null:re},ye=function(re){return S?null:oe(re)},se=function(re){return E?null:oe(re)},xe=function(re){R&&re.stopPropagation()},Qe=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,Se=re===void 0?"ref":re,Le=Z.role,ht=Z.onKeyDown,vt=Z.onFocus,Pt=Z.onBlur,Zn=Z.onClick,Sr=Z.onDragEnter,Er=Z.onDragOver,js=Z.onDragLeave,wa=Z.onDrop,Ta=Vi(Z,Hk);return ze(ze(Pc({onKeyDown:ye(Xt(ht,ae)),onFocus:ye(Xt(vt,he)),onBlur:ye(Xt(Pt,ve)),onClick:oe(Xt(Zn,We)),onDragEnter:se(Xt(Sr,B)),onDragOver:se(Xt(Er,W)),onDragLeave:se(Xt(js,U)),onDrop:se(Xt(wa,te)),role:typeof Le=="string"&&Le!==""?Le:"presentation"},Se,P),!r&&!S?{tabIndex:0}:{}),Ta)}},[P,ae,he,ve,We,B,W,U,te,S,E,r]),we=w.useCallback(function(Z){Z.stopPropagation()},[]),ot=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,Se=re===void 0?"ref":re,Le=Z.onChange,ht=Z.onClick,vt=Vi(Z,Wk),Pt=Pc({accept:A,multiple:a,type:"file",style:{display:"none"},onChange:oe(Xt(Le,te)),onClick:oe(Xt(ht,we)),tabIndex:-1},Se,O);return ze(ze({},Pt),vt)}},[O,n,a,te,r]);return ze(ze({},H),{},{isFocused:D&&!r,getRootProps:Qe,getInputProps:ot,rootRef:P,inputRef:O,open:oe(_)})}function Zk(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({},Rc),{},{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({},Rc);default:return e}}function $p(){}const Jk={isImage:e=>e.type.includes("image")},eF=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(Jk.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:bp(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:bp(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(Gr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Zr,{})})]}):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(My,{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(Gr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Zr,{className:"text-danger"})})]})},tF=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(eF,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),nF=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(tF,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),rF=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(AP,{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"})]})]}),oF=({idle:e=rF,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=$b({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(nF,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},sF=["INPUT","SELECT"],Ic=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{sF.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},iF=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})},aF=({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:ke("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),br=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:d,left:f,error:h,...p},m)=>{const g=Ct(),v=w.useRef(null),b=p.id??p.name;w.useImperativeHandle(m,()=>v.current),w.useEffect(()=>{if(v.current===null)return;const T=v.current,S=Ui(v.current),E=()=>T.setAttribute("data-selected","true");return T.addEventListener("change",E),()=>{S(),T.removeEventListener("change",E)}},[]);const y=()=>{var T;return(T=v.current)==null?void 0:T.focus()};return x.jsx(pa,{info:n,left:f,error:h,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:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Oy,{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:Yc(m,v),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:ke("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(T=>x.jsx("option",{...T,children:T.label??T.value},`${b}-select-option-${T.value}`))]})})}),Ac=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},lF=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=Ac(r.onChange);w.useImperativeHandle(o,()=>c.current),w.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=()=>{var h,p;const f=!((h=c.current)!=null&&h.checked);a(f),(p=r==null?void 0:r.onCheck)==null||p.call(r,f),c.current!==null&&(c.current.checked=f,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:ke("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:f=>a(f.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:d,"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})]})}),cF=e=>{const[t,n]=lP();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:hP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},uF=Rb("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)}),ma=0,qn=1,Mo=2,Bb=4;function fs(e,t){return n=>e(t(n))}function dF(e,t){return t(e)}function Hb(e,t){return n=>e(t,n)}function Bp(e,t){return()=>e(t)}function ga(e,t){return t(e),e}function He(...e){return e}function fF(e){e()}function Hp(e){return()=>e}function hF(...e){return()=>{e.map(fF)}}function Zu(e){return e!==void 0}function wr(){}function Me(e,t){return e(qn,t)}function fe(e,t){e(ma,t)}function Ju(e){e(Mo)}function wt(e){return e(Bb)}function ie(e,t){return Me(e,Hb(t,ma))}function hn(e,t){const n=e(qn,r=>{n(),t(r)});return n}function be(){const e=[];return(t,n)=>{switch(t){case Mo:e.splice(0,e.length);return;case qn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ma:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Q(e){let t=e;const n=be();return(r,o)=>{switch(r){case qn:o(t);break;case ma:t=o;break;case Bb:return t}return n(r,o)}}function pF(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case qn:return s?n===s?void 0:(r(),n=s,t=Me(e,s),t):(r(),wr);case Mo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function jt(e){return ga(be(),t=>ie(e,t))}function Tt(e,t){return ga(Q(t),n=>ie(e,n))}function mF(...e){return t=>e.reduceRight(dF,t)}function Y(e,...t){const n=mF(...t);return(r,o)=>{switch(r){case qn:return Me(e,n(o));case Mo:Ju(e);return}}}function Wb(e,t){return e===t}function Be(e=Wb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ce(e){return t=>n=>{e(n)&&t(n)}}function ne(e){return t=>fs(t,e)}function en(e){return t=>()=>t(e)}function sn(e,t){return n=>r=>n(t=e(t,r))}function ao(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 Wp(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function pe(...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 zp(...e){return function(t,n){switch(t){case qn:return hF(...e.map(r=>Me(r,n)));case Mo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ue(e,t=Wb){return Y(e,Be(t))}function ft(...e){const t=be(),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&&fe(t,n)})}),function(s,i){switch(s){case qn:return r===o&&i(n),Me(t,i);case Mo:return Ju(t);default:throw new Error(`unrecognized action ${s}`)}}}function Re(e,t=[],{singleton:n}={singleton:!0}){return{id:gF(),constructor:e,dependencies:t,singleton:n}}const gF=()=>Symbol();function yF(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 vF(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 Zs=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ed(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(v,b){v.propsReady&&fe(v.propsReady,!1);for(const y of r){const T=v[t.required[y]];fe(T,b[y])}for(const y of o)if(y in b){const T=v[t.optional[y]];fe(T,b[y])}v.propsReady&&fe(v.propsReady,!0)}function c(v){return s.reduce((b,y)=>(b[y]=T=>{const S=v[t.methods[y]];fe(S,T)},b),{})}function u(v){return i.reduce((b,y)=>(b[y]=pF(v[t.events[y]]),b),{})}const d=w.forwardRef((v,b)=>{const{children:y,...T}=v,[S]=w.useState(()=>ga(yF(e),R=>l(R,T))),[E]=w.useState(Bp(u,S));return Zs(()=>{for(const R of i)R in T&&Me(E[R],T[R]);return()=>{Object.values(E).map(Ju)}},[T,E,S]),Zs(()=>{l(S,T)}),w.useImperativeHandle(b,Hp(c(S))),w.createElement(a.Provider,{value:S},n?w.createElement(n,vF([...r,...o,...i],T),y):y)}),f=v=>w.useCallback(Hb(fe,w.useContext(a)[v]),[v]),h=v=>{const y=w.useContext(a)[v],T=w.useCallback(S=>Me(y,S),[y]);return w.useSyncExternalStore(T,()=>wt(y),()=>wt(y))},p=v=>{const y=w.useContext(a)[v],[T,S]=w.useState(Bp(wt,y));return Zs(()=>Me(y,E=>{E!==T&&S(Hp(E))}),[y,T]),T},m=w.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(v,b)=>{const T=w.useContext(a)[v];Zs(()=>Me(T,b),[b,T])}}}const bF=typeof document<"u"?w.useLayoutEffect:w.useEffect,xF=bF;var Nt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Nt||{});const wF={0:"debug",1:"log",2:"warn",3:"error"},TF=()=>typeof globalThis>"u"?window:globalThis,Xn=Re(()=>{const e=Q(3);return{log:Q((n,r,o=1)=>{var s;const i=(s=TF().VIRTUOSO_LOG_LEVEL)!=null?s:wt(e);o>=i&&console[wF[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function td(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 td(e,t).callbackRef}function zb(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=SF(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(EF("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return td(a,n)}function SF(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},Nt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function EF(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Nt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Kt(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ub(e,t){return Math.abs(e-t)<1.01}function Gb(e,t,n,r=wr,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,g=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};d.suppressFlushSync?v():Vc.flushSync(v),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 d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,g;f===window?(m=Math.max(Kt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=f.scrollHeight,p=Kt(f,"height"),g=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),Ub(p,m)||d.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const It=Re(()=>{const e=be(),t=be(),n=Q(0),r=be(),o=Q(0),s=be(),i=be(),a=Q(0),l=Q(0),c=Q(0),u=Q(0),d=be(),f=be(),h=Q(!1);return ie(Y(e,ne(({scrollTop:p})=>p)),t),ie(Y(e,ne(({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:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),hs={lvl:0};function Yb(e,t,n,r=hs,o=hs){return{k:e,v:t,lvl:n,l:r,r:o}}function Ne(e){return e===hs}function Br(){return hs}function Oc(e,t){if(Ne(e))return hs;const{k:n,l:r,r:o}=e;if(t===n){if(Ne(r))return o;if(Ne(o))return r;{const[s,i]=Kb(r);return ci(it(e,{k:s,v:i,l:qb(r)}))}}else return t<n?ci(it(e,{l:Oc(r,t)})):ci(it(e,{r:Oc(o,t)}))}function ps(e,t){if(!Ne(e))return t===e.k?e.v:t<e.k?ps(e.l,t):ps(e.r,t)}function qt(e,t,n="k"){if(Ne(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=qt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return qt(e.l,t,n)}function Ft(e,t,n){return Ne(e)?Yb(t,n,1):t===e.k?it(e,{k:t,v:n}):t<e.k?Up(it(e,{l:Ft(e.l,t,n)})):Up(it(e,{r:Ft(e.r,t,n)}))}function Dc(e,t,n){if(Ne(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Dc(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Dc(i,t,n))),a}function ur(e){return Ne(e)?[]:[...ur(e.l),{k:e.k,v:e.v},...ur(e.r)]}function Kb(e){return Ne(e.r)?[e.k,e.v]:Kb(e.r)}function qb(e){return Ne(e.r)?e.l:ci(it(e,{r:qb(e.r)}))}function it(e,t){return Yb(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 Sl(e){return Ne(e)||e.lvl>e.r.lvl}function Up(e){return Mc(Qb(e))}function ci(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(Sl(t))return Qb(it(e,{lvl:r-1}));if(!Ne(t)&&!Ne(t.r))return it(t.r,{l:it(t,{r:t.r.l}),r:it(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Sl(e))return Mc(it(e,{lvl:r-1}));if(!Ne(n)&&!Ne(n.l)){const o=n.l,s=Sl(o)?n.lvl-1:n.lvl;return it(o,{l:it(e,{r:o.l,lvl:r-1}),r:Mc(it(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ya(e,t,n){if(Ne(e))return[];const r=qt(e,t)[0];return CF(Dc(e,r,n))}function Xb(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 CF(e){return Xb(e,({k:t,v:n})=>({index:t,value:n}))}function Mc(e){const{r:t,lvl:n}=e;return!Ne(t)&&!Ne(t.r)&&t.lvl===n&&t.r.lvl===n?it(t,{l:it(e,{r:t.l}),lvl:n+1}):e}function Qb(e){const{l:t}=e;return!Ne(t)&&t.lvl===e.lvl?it(t,{r:it(e,{l:t.r})}):e}function $i(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 Zb(e,t,n){return e[$i(e,t,n)]}function PF(e,t,n,r){const o=$i(e,t,r),s=$i(e,n,r,o);return e.slice(o,s+1)}const nd=Re(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function RF(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 Gp(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 IF(e,t){let n=Ne(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Ne(e)){e=Ft(e,0,o);continue}const a=ya(e,s-1,i+1);if(a.some(RF(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Oc(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Ft(e,i+1,f));c&&(e=Ft(e,s,o))}return[e,n]}function AF(){return{offsetTree:[],sizeTree:Br(),groupOffsetTree:Br(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function rd({index:e},t){return t===e?0:t<e?-1:1}function OF({offset:e},t){return t===e?0:t<e?-1:1}function DF(e){return{index:e.index,value:e}}function MF(e,t,n,r=0){return r>0&&(t=Math.max(t,Zb(e,r,rd).offset)),Xb(PF(e,t,n,OF),DF)}function kc(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=$i(o,t-1,rd),a=o[l].offset;const u=qt(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===qt(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of ya(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function kF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Nt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Ne(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Ft(Ft(p,m,f),m+1,h),i)}else[i,a]=IF(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=kc(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Ft(f,h,ms(h,l,o)),Br()),groupIndices:n}}function ms(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=Zb(t,e,rd),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function FF(e){return typeof e.groupIndex<"u"}function Jb(e,t,n){if(FF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=e0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function e0(e,t){if(!va(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function va(e){return!Ne(e.groupOffsetTree)}function jF(e){return ur(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 NF={offsetHeight:"height",offsetWidth:"width"},gn=Re(([{log:e},{recalcInProgress:t}])=>{const n=be(),r=be(),o=Tt(r,0),s=be(),i=be(),a=Q(0),l=Q([]),c=Q(void 0),u=Q(void 0),d=Q((S,E)=>Kt(S,NF[E])),f=Q(void 0),h=Q(0),p=AF(),m=Tt(Y(n,pe(l,e,h),sn(kF,p),Be()),p),g=Tt(Y(l,Be(),sn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),ne(({prev:S})=>S)),[]);ie(Y(l,ce(S=>S.length>0),pe(m,h),ne(([S,E,R])=>{const I=S.reduce((k,A,N)=>Ft(k,A,ms(A,E.offsetTree,R)||N),Br());return{...E,groupIndices:S,groupOffsetTree:I}})),m),ie(Y(r,pe(m),ce(([S,{lastIndex:E}])=>S<E),ne(([S,{lastIndex:E,lastSize:R}])=>[{startIndex:S,endIndex:E,size:R}])),n),ie(c,u);const v=Tt(Y(c,ne(S=>S===void 0)),!0);ie(Y(u,ce(S=>S!==void 0&&Ne(wt(m).sizeTree)),ne(S=>[{startIndex:0,endIndex:0,size:S}])),n);const b=jt(Y(n,pe(m),sn(({sizes:S},[E,R])=>({changed:R!==S,sizes:R}),{changed:!1,sizes:p}),ne(S=>S.changed)));Me(Y(a,sn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),ne(S=>S.diff)),S=>{const{groupIndices:E}=wt(m);if(S>0)fe(t,!0),fe(s,S+Gp(S,E));else if(S<0){const R=wt(g);R.length>0&&(S-=Gp(-S,R)),fe(i,S)}}),Me(Y(a,pe(e)),([S,E])=>{S<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},Nt.ERROR)});const y=jt(s);ie(Y(s,pe(m),ne(([S,E])=>{const R=E.groupIndices.length>0,I=[],k=E.lastSize;if(R){const A=ps(E.sizeTree,0);let N=0,M=0;for(;N<S;){const O=E.groupIndices[M],F=E.groupIndices.length===M+1?1/0:E.groupIndices[M+1]-O-1;I.push({startIndex:O,endIndex:O,size:A}),I.push({startIndex:O+1,endIndex:O+1+F-1,size:k}),M++,N+=F+1}const j=ur(E.sizeTree);return N!==S&&j.shift(),j.reduce((O,{k:F,v:V})=>{let H=O.ranges;return O.prevSize!==0&&(H=[...O.ranges,{startIndex:O.prevIndex,endIndex:F+S-1,size:O.prevSize}]),{ranges:H,prevIndex:F+S,prevSize:V}},{ranges:I,prevIndex:S,prevSize:0}).ranges}return ur(E.sizeTree).reduce((A,{k:N,v:M})=>({ranges:[...A.ranges,{startIndex:A.prevIndex,endIndex:N+S-1,size:A.prevSize}],prevIndex:N+S,prevSize:M}),{ranges:[],prevIndex:0,prevSize:k}).ranges})),n);const T=jt(Y(i,pe(m,h),ne(([S,{offsetTree:E},R])=>{const I=-S;return ms(I,E,R)})));return ie(Y(i,pe(m,h),ne(([S,E,R])=>{if(E.groupIndices.length>0){if(Ne(E.sizeTree))return E;let k=Br();const A=wt(g);let N=0,M=0,j=0;for(;N<-S;){j=A[M];const O=A[M+1]-j-1;M++,N+=O+1}if(k=ur(E.sizeTree).reduce((O,{k:F,v:V})=>Ft(O,Math.max(0,F+S),V),k),N!==-S){const O=ps(E.sizeTree,j);k=Ft(k,0,O);const F=qt(E.sizeTree,-S+1)[1];k=Ft(k,1,F)}return{...E,sizeTree:k,...kc(E.offsetTree,0,k,R)}}else{const k=ur(E.sizeTree).reduce((A,{k:N,v:M})=>Ft(A,Math.max(0,N+S),M),Br());return{...E,sizeTree:k,...kc(E.offsetTree,0,k,R)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:y,firstItemIndex:a,gap:h,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},He(Xn,nd),{singleton:!0}),LF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function t0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!LF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ms=Re(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=be(),p=be(),m=Q(0);let g=null,v=null,b=null;function y(){g&&(g(),g=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),fe(o,!1)}return ie(Y(h,pe(e,s,t,m,l,c,f),pe(r,u,d),ne(([[T,S,E,R,I,k,A,N],M,j,P])=>{const O=t0(T),{align:F,behavior:V,offset:H}=O,z=R-1,D=Jb(O,S,z);let $=ms(D,S.offsetTree,M)+k;F==="end"?($+=j+qt(S.sizeTree,D)[1]-E+P,D===z&&($+=A)):F==="center"?$+=(j+qt(S.sizeTree,D)[1]-E+P)/2:$-=I,H&&($+=H);const K=J=>{y(),J?(N("retrying to scroll to",{location:T},Nt.DEBUG),fe(h,T)):(fe(p,!0),N("list did not change, scroll successful",{},Nt.DEBUG))};if(y(),V==="smooth"){let J=!1;b=Me(n,X=>{J=J||X}),g=hn(a,()=>{K(J)})}else g=hn(Y(n,_F(150)),K);return v=setTimeout(()=>{y()},1200),fe(o,!0),N("scrolling from index to",{index:D,top:$,behavior:V},Nt.DEBUG),{top:$,behavior:V}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},He(gn,It,Xn),{singleton:!0});function _F(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const gs="up",es="down",VF="none",$F={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},BF=0,ks=Re(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=Q(!1),a=Q(!0),l=be(),c=be(),u=Q(4),d=Q(BF),f=Tt(Y(zp(Y(ue(t),ao(1),en(!0)),Y(ue(t),ao(1),en(!1),Wp(100))),Be()),!1),h=Tt(Y(zp(Y(s,en(!0)),Y(s,en(!1),Wp(200))),Be()),!1);ie(Y(ft(ue(t),ue(d)),ne(([b,y])=>b<=y),Be()),a),ie(Y(a,kn(50)),c);const p=jt(Y(ft(e,ue(n),ue(r),ue(o),ue(u)),sn((b,[{scrollTop:y,scrollHeight:T},S,E,R,I])=>{const k=y+S-T>-I,A={viewportHeight:S,scrollTop:y,scrollHeight:T};if(k){let M,j;return y>b.state.scrollTop?(M="SCROLLED_DOWN",j=b.state.scrollTop-y):(M="SIZE_DECREASED",j=b.state.scrollTop-y||b.scrollTopDelta),{atBottom:!0,state:A,atBottomBecause:M,scrollTopDelta:j}}let N;return A.scrollHeight>b.state.scrollHeight?N="SIZE_INCREASED":S<b.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":y<b.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:A}},$F),Be((b,y)=>b&&b.atBottom===y.atBottom))),m=Tt(Y(e,sn((b,{scrollTop:y,scrollHeight:T,viewportHeight:S})=>{if(Ub(b.scrollHeight,T))return{scrollTop:y,scrollHeight:T,jump:0,changed:!1};{const E=T-(y+S)<1;return b.scrollTop!==y&&E?{scrollHeight:T,scrollTop:y,jump:b.scrollTop-y,changed:!0}:{scrollHeight:T,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ce(b=>b.changed),ne(b=>b.jump)),0);ie(Y(p,ne(b=>b.atBottom)),i),ie(Y(i,kn(50)),l);const g=Q(es);ie(Y(e,ne(({scrollTop:b})=>b),Be(),sn((b,y)=>wt(h)?{direction:b.direction,prevScrollTop:y}:{direction:y<b.prevScrollTop?gs:es,prevScrollTop:y},{direction:es,prevScrollTop:0}),ne(b=>b.direction)),g),ie(Y(e,kn(50),en(VF)),g);const v=Q(0);return ie(Y(f,ce(b=>!b),en(0)),v),ie(Y(t,kn(100),pe(f),ce(([b,y])=>!!y),sn(([b,y],[T])=>[y,T],[0,0]),ne(([b,y])=>y-b)),v),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},He(It)),Qn=Re(([{log:e}])=>{const t=Q(!1),n=jt(Y(t,ce(r=>r),Be()));return Me(t,r=>{r&&wt(e)("props updated",{},Nt.DEBUG)}),{propsReady:t,didMount:n}},He(Xn),{singleton:!0});function od(e,t){e==0?t():requestAnimationFrame(()=>od(e-1,t))}function sd(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Fs=Re(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=Q(!0),l=Q(0),c=Q(!0);return ie(Y(i,pe(l),ce(([u,d])=>!!d),en(!1)),a),ie(Y(i,pe(l),ce(([u,d])=>!!d),en(!1)),c),Me(Y(ft(t,i),pe(a,e,n,c),ce(([[,u],d,{sizeTree:f},h,p])=>u&&(!Ne(f)||Zu(h))&&!d&&!p),pe(l)),([,u])=>{hn(s,()=>{fe(c,!0)}),od(4,()=>{hn(r,()=>{fe(a,!0)}),fe(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},He(gn,It,Ms,Qn),{singleton:!0});function Yp(e){return e?e==="smooth"?"smooth":"auto":!1}const HF=(e,t)=>typeof e=="function"?Yp(e(t)):t&&Yp(e),WF=Re(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=Q(!1),d=be();let f=null;function h(m){fe(o,{index:"LAST",align:"end",behavior:m})}Me(Y(ft(Y(ue(e),ao(1)),a),pe(ue(u),n,s,c),ne(([[m,g],v,b,y,T])=>{let S=g&&y,E="auto";return S&&(E=HF(v,b||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),ce(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{f&&(f(),f=null),f=hn(t,()=>{wt(l)("following output to ",{totalCount:m},Nt.DEBUG),h(g),f=null})});function p(m){const g=hn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(wt(l)("scrolling to bottom due to increased size",{},Nt.DEBUG),h("auto"))});setTimeout(g,100)}return Me(Y(ft(ue(u),e,i),ce(([m,,g])=>m&&g),sn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),ce(({refreshed:m})=>m),pe(u,e)),([,m])=>{wt(s)&&p(m!==!1)}),Me(d,()=>{p(wt(u)!==!1)}),Me(ft(ue(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},He(gn,ks,Ms,Fs,Qn,Xn,It));function zF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const n0=Re(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=be(),i=be(),a=jt(Y(s,ne(zF)));return ie(Y(a,ne(l=>l.totalCount)),e),ie(Y(a,ne(l=>l.groupIndices)),t),ie(Y(ft(r,n,o),ce(([l,c])=>va(c)),ne(([l,c,u])=>qt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Be(),ne(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},He(gn,It));function ys(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function r0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Bi="top",Hi="bottom",Kp="none";function qp(e,t,n){return typeof e=="number"?n===gs&&t===Bi||n===es&&t===Hi?e:0:n===gs?t===Bi?e.main:e.reverse:t===Hi?e.main:e.reverse}function Xp(e,t){return typeof e=="number"?e:e[t]||0}const id=Re(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=be(),i=Q(0),a=Q(0),l=Q(0),c=Tt(Y(ft(ue(e),ue(t),ue(r),ue(s,ys),ue(l),ue(i),ue(o),ue(n),ue(a)),ne(([u,d,f,[h,p],m,g,v,b,y])=>{const T=u-b,S=g+v,E=Math.max(f-T,0);let R=Kp;const I=Xp(y,Bi),k=Xp(y,Hi);return h-=b,h+=f+v,p+=f+v,p-=b,h>u+S-I&&(R=gs),p<u-E+d+k&&(R=es),R!==Kp?[Math.max(T-f-qp(m,Bi,R)-I,0),T-E-v+d+qp(m,Hi,R)+k]:null}),ce(u=>u!=null),Be(ys)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},He(It),{singleton:!0});function UF(e,t,n){if(va(t)){const r=e0(e,t);return[{index:qt(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 El={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Qp(e,t,n){if(e.length===0)return[];if(!va(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=ya(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 ui(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 d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:Qp(e,o,s),topItems:Qp(t,o,s),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function o0(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=sd(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return ui(c,[],a,o,n,r)}const Tr=Re(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=Q([]),g=Q(0),v=be();ie(s.topItemsIndexes,m);const b=Tt(Y(ft(h,p,ue(i,ys),ue(t),ue(e),ue(u),c,ue(m),ue(r),ue(o),n),ce(([E,R,,I,,,,,,,k])=>{const A=k&&k.length!==I;return E&&!R&&!A}),ne(([,,[E,R],I,k,A,N,M,j,P,O])=>{const F=k,{sizeTree:V,offsetTree:H}=F,z=wt(g);if(I===0)return{...El,totalCount:I};if(E===0&&R===0)return z===0?{...El,totalCount:I}:o0(z,A,k,j,P,O||[]);if(Ne(V))return z>0?null:ui(UF(sd(A,I),F,O),[],I,P,F,j);const D=[];if(M.length>0){const G=M[0],L=M[M.length-1];let B=0;for(const W of ya(V,G,L)){const U=W.value,q=Math.max(W.start,G),te=Math.min(W.end,L);for(let _=q;_<=te;_++)D.push({index:_,size:U,offset:B,data:O&&O[_]}),B+=U}}if(!N)return ui([],D,I,P,F,j);const $=M.length>0?M[M.length-1]+1:0,K=MF(H,E,R,$);if(K.length===0)return null;const J=I-1,X=ga([],G=>{for(const L of K){const B=L.value;let W=B.offset,U=L.start;const q=B.size;if(B.offset<E){U+=Math.floor((E-B.offset+P)/(q+P));const _=U-L.start;W+=_*q+_*P}U<$&&(W+=($-U)*q,U=$);const te=Math.min(L.end,J);for(let _=U;_<=te&&!(W>=R);_++)G.push({index:_,size:q,offset:W,data:O&&O[_]}),W+=q+P}});return ui(X,D,I,P,F,j)}),ce(E=>E!==null),Be()),El);ie(Y(n,ce(Zu),ne(E=>E==null?void 0:E.length)),t),ie(Y(b,ne(E=>E.topListHeight)),d),ie(d,l),ie(Y(b,ne(E=>[E.top,E.bottom])),a),ie(Y(b,ne(E=>E.items)),v);const y=jt(Y(b,ce(({items:E})=>E.length>0),pe(t,n),ce(([{items:E},R])=>E[E.length-1].originalIndex===R-1),ne(([,E,R])=>[E-1,R]),Be(ys),ne(([E])=>E))),T=jt(Y(b,kn(200),ce(({items:E,topItems:R})=>E.length>0&&E[0].originalIndex===R.length),ne(({items:E})=>E[0].index),Be())),S=jt(Y(b,ce(({items:E})=>E.length>0),ne(({items:E})=>{let R=0,I=E.length-1;for(;E[R].type==="group"&&R<I;)R++;for(;E[I].type==="group"&&I>R;)I--;return{startIndex:E[R].index,endIndex:E[I].index}}),Be(r0)));return{listState:b,topItemsIndexes:m,endReached:y,startReached:T,rangeChanged:S,itemsRendered:v,initialItemCount:g,...f}},He(gn,n0,id,Fs,Ms,ks,Qn,nd),{singleton:!0}),GF=Re(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ie(Y(a,pe(s),ce(([,l])=>l!==0),pe(o,e,t,r,n),ne(([[,l],c,u,d,f,h=[]])=>o0(l,c,u,d,f,h))),i),{}),He(gn,Fs,Tr,Qn),{singleton:!0}),s0=Re(([{scrollVelocity:e}])=>{const t=Q(!1),n=be(),r=Q(!1);return ie(Y(e,pe(r,t,n),ce(([o,s])=>!!s),ne(([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}),Be()),t),Me(Y(ft(t,e,n),pe(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},He(ks),{singleton:!0}),YF=Re(([{topItemsIndexes:e}])=>{const t=Q(0);return ie(Y(t,ce(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},He(Tr)),i0=Re(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=be(),i=Tt(Y(ft(e,r,t,n,o),ne(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ie(ue(i),s),{totalListHeight:i,totalListHeightChanged:s}},He(It,Tr),{singleton:!0});function a0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const KF=a0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),qF=Re(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=jt(Y(l,pe(a),sn(([,v,b,y],[{items:T,totalCount:S,bottom:E,offsetBottom:R},I])=>{const k=E+R;let A=0;return b===S&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(A=k-y,A!==0&&(A+=I))),[A,T,S,k]},[0,[],0,0]),ce(([v])=>v!==0),pe(t,i,r,s,h,p),ce(([,v,b,y,,,T])=>!T&&!y&&v!==0&&b===gs),ne(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},Nt.DEBUG),v))));function g(v){v>0?(fe(e,{top:-v,behavior:"auto"}),fe(n,0)):(fe(n,0),fe(e,{top:-v,behavior:"auto"}))}return Me(Y(m,pe(n,o)),([v,b,y])=>{y&&KF()?fe(n,b-v):g(-v)}),Me(Y(ft(Tt(o,!1),n,p),ce(([v,b,y])=>!v&&!y&&b!==0),ne(([v,b])=>b),kn(1)),g),ie(Y(u,ne(v=>({top:-v}))),e),Me(Y(c,pe(d,f),ne(([v,{lastSize:b,groupIndices:y,sizeTree:T},S])=>{function E(R){return R*(b+S)}if(y.length===0)return E(v);{let R=0;const I=ps(T,0);let k=0,A=0;for(;k<v;){k++,R+=I;let N=y.length===A+1?1/0:y[A+1]-y[A]-1;k+N>v&&(R-=I,N=v-k+1),k+=N,R+=E(N),A++}return R}})),v=>{fe(n,v),requestAnimationFrame(()=>{fe(e,{top:v}),requestAnimationFrame(()=>{fe(n,0),fe(p,!1)})})}),{deviation:n}},He(It,ks,Tr,gn,Xn,nd)),XF=Re(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Q(0);return Me(Y(e,pe(r),ce(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{hn(Y(n,ao(1),ce(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{fe(t,o)})})}),{initialScrollTop:r}},He(Qn,It,Tr),{singleton:!0}),QF=Re(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Q(!1),r=Tt(Y(ft(n,e,t),ce(([o])=>o),ne(([,o,s])=>Math.max(0,o-s)),kn(0),Be()),0);return{alignToBottom:n,paddingTopAddition:r}},He(It,i0),{singleton:!0}),ad=Re(([{scrollTo:e,scrollContainerState:t}])=>{const n=be(),r=be(),o=be(),s=Q(!1),i=Q(void 0);return ie(Y(ft(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ie(Y(e,pe(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},He(It)),ZF=({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,JF=Re(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=be();return ie(Y(u,pe(e,o,t,s,i,a,r),pe(n),ne(([[d,f,h,p,m,g,v,b],y])=>{const{done:T,behavior:S,align:E,calculateViewLocation:R=ZF,...I}=d,k=Jb(d,f,p-1),A=ms(k,f.offsetTree,y)+m+g,N=A+qt(f.sizeTree,k)[1],M=b+g,j=b+h-v,P=R({itemTop:A,itemBottom:N,viewportTop:M,viewportBottom:j,locationParams:{behavior:S,align:E,...I}});return P?T&&hn(Y(l,ce(O=>O===!1),ao(wt(l)?1:2)),T):T&&T(),P}),ce(d=>d!==null)),c),{scrollIntoView:u}},He(gn,It,Ms,Tr,Xn),{singleton:!0}),ej=Re(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=be(),u=Q(void 0),d=Q(null),f=Q(null);return ie(a,d),ie(l,f),Me(Y(c,pe(e,n,i,d,f,r)),([h,p,m,g,v,b,y])=>{const T=jF(p.sizeTree);g&&v!==null&&b!==null&&(m=v.scrollTop-b.offsetTop),m-=y,h({ranges:T,scrollTop:m})}),ie(Y(u,ce(Zu),ne(tj)),o),ie(Y(s,pe(u),ce(([,h])=>h!==void 0),Be(),ne(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},He(gn,It,Fs,Qn,ad));function tj(e){return{offset:e.scrollTop,index:0,align:"start"}}const nj=Re(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),He(id,GF,Qn,s0,i0,XF,QF,ad,JF,Xn)),l0=Re(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,g,v,{listState:b,topItemsIndexes:y,...T},{scrollToIndex:S},E,{topItemCount:R},{groupCounts:I},k])=>(ie(T.rangeChanged,k.scrollSeekRangeChanged),ie(Y(k.windowViewportRect,ne(A=>A.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:R,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:b,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...k,...m,sizes:d,...g}),He(gn,Fs,It,ej,WF,Tr,Ms,qF,YF,n0,nj)),Cl="-webkit-sticky",Zp="sticky",c0=a0(()=>{if(typeof document>"u")return Zp;const e=document.createElement("div");return e.style.position=Cl,e.style.position===Cl?Cl:Zp});function ld(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,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=td(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 ba=w.createContext(void 0),u0=w.createContext(void 0);function cd(e){return e}const rj=Re(()=>{const e=Q(l=>`Item ${l}`),t=Q(null),n=Q(l=>`Group ${l}`),r=Q({}),o=Q(cd),s=Q("div"),i=Q(wr),a=(l,c=null)=>Tt(Y(r,ne(u=>u[l]),Be()),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")}}),oj=Re(([e,t])=>({...e,...t}),He(l0,rj)),sj=({height:e})=>w.createElement("div",{style:{height:e}}),ij={position:c0(),zIndex:1,overflowAnchor:"none"},aj={overflowAnchor:"none"},Jp=w.memo(function({showTopList:t=!1}){const n=ge("listState"),r=Wt("sizeRanges"),o=ge("useWindowScroll"),s=ge("customScrollParent"),i=Wt("windowScrollContainerState"),a=Wt("scrollContainerState"),l=s||o?i:a,c=ge("itemContent"),u=ge("context"),d=ge("groupContent"),f=ge("trackItemSizes"),h=ge("itemSize"),p=ge("log"),m=Wt("gap"),{callbackRef:g}=zb(r,h,f,t?wr:l,p,m,s),[v,b]=w.useState(0);fd("deviation",P=>{v!==P&&b(P)});const y=ge("EmptyPlaceholder"),T=ge("ScrollSeekPlaceholder")||sj,S=ge("ListComponent"),E=ge("ItemComponent"),R=ge("GroupComponent"),I=ge("computeItemKey"),k=ge("isSeeking"),A=ge("groupIndices").length>0,N=ge("alignToBottom"),M=ge("initialItemFinalLocationReached"),j=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:N?"auto":0,...M?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?w.createElement(y,Ke(y,u)):w.createElement(S,{...Ke(S,u),ref:g,style:j,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const O=P.originalIndex,F=I(O+n.firstItemIndex,P.data,u);return k?w.createElement(T,{...Ke(T,u),key:F,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?w.createElement(R,{...Ke(R,u),key:F,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,style:ij},d(P.index,u)):w.createElement(E,{...Ke(E,u),...d0(E,P.data),key:F,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:aj},A?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),lj={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ko=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),cj={width:"100%",position:c0(),top:0,zIndex:1};function Ke(e,t){if(typeof e!="string")return{context:t}}function d0(e,t){return{item:typeof e=="string"?void 0:t}}const uj=w.memo(function(){const t=ge("HeaderComponent"),n=Wt("headerHeight"),r=ge("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Kt(i,"height")),[n])),s=ge("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null}),dj=w.memo(function(){const t=ge("FooterComponent"),n=Wt("footerHeight"),r=ge("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Kt(i,"height")),[n])),s=ge("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null});function ud({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"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=Gb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:h,style:{...lj,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Ke(c,f)},i)})}function dd({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"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:v}=Gb(l,u,c,wr,h);return xF(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",g),w.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...Ke(c,p)},i)})}const fj=({children:e})=>{const t=w.useContext(ba),n=Wt("viewportHeight"),r=Wt("fixedItemHeight"),o=ge("alignToBottom"),s=pn(w.useMemo(()=>fs(n,i=>Kt(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:ko(o),ref:s,"data-viewport-type":"element"},e)},hj=({children:e})=>{const t=w.useContext(ba),n=Wt("windowViewportRect"),r=Wt("fixedItemHeight"),o=ge("customScrollParent"),s=ld(n,o),i=ge("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:ko(i),"data-viewport-type":"window"},e)},pj=({children:e})=>{const t=ge("TopItemListComponent")||"div",n=ge("headerHeight"),r={...cj,marginTop:`${n}px`},o=ge("context");return w.createElement(t,{style:r,...Ke(t,o)},e)},mj=w.memo(function(t){const n=ge("useWindowScroll"),r=ge("topItemsIndexes").length>0,o=ge("customScrollParent"),s=o||n?vj:yj,i=o||n?hj:fj;return w.createElement(s,{...t},r&&w.createElement(pj,null,w.createElement(Jp,{showTopList:!0})),w.createElement(i,null,w.createElement(uj,null),w.createElement(Jp,null),w.createElement(dj,null)))}),{Component:gj,usePublisher:Wt,useEmitterValue:ge,useEmitter:fd}=ed(oj,{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"}},mj),yj=ud({usePublisher:Wt,useEmitterValue:ge,useEmitter:fd}),vj=dd({usePublisher:Wt,useEmitterValue:ge,useEmitter:fd}),bj=gj,em={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},xj={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:tm,ceil:nm,floor:Wi,min:Pl,max:ts}=Math;function wj(e){return{...xj,items:e}}function rm(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 Tj(e,t){return e&&e.column===t.column&&e.row===t.row}function Js(e,t){return e&&e.width===t.width&&e.height===t.height}const Sj=Re(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:b,windowScrollTo:y},T])=>{const S=Q(0),E=Q(0),R=Q(em),I=Q({height:0,width:0}),k=Q({height:0,width:0}),A=be(),N=be(),M=Q(0),j=Q(null),P=Q({row:0,column:0}),O=be(),F=be(),V=Q(!1),H=Q(0),z=Q(!0),D=Q(!1);Me(Y(p,pe(H),ce(([L,B])=>!!B)),()=>{fe(z,!1),fe(E,0)}),Me(Y(ft(p,z,k,I,H,D),ce(([L,B,W,U,,q])=>L&&!B&&W.height!==0&&U.height!==0&&!q)),([,,,,L])=>{fe(D,!0),od(1,()=>{fe(A,L)}),hn(Y(r),()=>{fe(n,[0,0]),fe(z,!0)})}),ie(Y(F,ce(L=>L!=null&&L.scrollTop>0),en(0)),E),Me(Y(p,pe(F),ce(([,L])=>L!=null)),([,L])=>{L&&(fe(I,L.viewport),fe(k,L==null?void 0:L.item),fe(P,L.gap),L.scrollTop>0&&(fe(V,!0),hn(Y(r,ao(1)),B=>{fe(V,!1)}),fe(i,{top:L.scrollTop})))}),ie(Y(I,ne(({height:L})=>L)),o),ie(Y(ft(ue(I,Js),ue(k,Js),ue(P,(L,B)=>L&&L.column===B.column&&L.row===B.row),ue(r)),ne(([L,B,W,U])=>({viewport:L,item:B,gap:W,scrollTop:U}))),O),ie(Y(ft(ue(S),t,ue(P,Tj),ue(k,Js),ue(I,Js),ue(j),ue(E),ue(V),ue(z),ue(H)),ce(([,,,,,,,L])=>!L),ne(([L,[B,W],U,q,te,_,ae,,he,ve])=>{const{row:We,column:oe}=U,{height:ye,width:se}=q,{width:xe}=te;if(ae===0&&(L===0||xe===0))return em;if(se===0){const Pt=sd(ve,L),Zn=Pt===0?Math.max(ae-1,0):Pt;return wj(rm(Pt,Zn,_))}const Qe=f0(xe,se,oe);let we,ot;he?B===0&&W===0&&ae>0?(we=0,ot=ae-1):(we=Qe*Wi((B+We)/(ye+We)),ot=Qe*nm((W+We)/(ye+We))-1,ot=Pl(L-1,ts(ot,Qe-1)),we=Pl(ot,ts(0,we))):(we=0,ot=-1);const Z=rm(we,ot,_),{top:re,bottom:Se}=om(te,U,q,Z),Le=nm(L/Qe),vt=Le*ye+(Le-1)*We-Se;return{items:Z,offsetTop:re,offsetBottom:vt,top:re,bottom:Se,itemHeight:ye,itemWidth:se}})),R),ie(Y(j,ce(L=>L!==null),ne(L=>L.length)),S),ie(Y(ft(I,k,R,P),ce(([L,B,{items:W}])=>W.length>0&&B.height!==0&&L.height!==0),ne(([L,B,{items:W},U])=>{const{top:q,bottom:te}=om(L,U,B,W);return[q,te]}),Be(ys)),n);const $=Q(!1);ie(Y(r,pe($),ne(([L,B])=>B||L!==0)),$);const K=jt(Y(ue(R),ce(({items:L})=>L.length>0),pe(S,$),ce(([{items:L},B,W])=>W&&L[L.length-1].index===B-1),ne(([,L])=>L-1),Be())),J=jt(Y(ue(R),ce(({items:L})=>L.length>0&&L[0].index===0),en(0),Be())),X=jt(Y(ue(R),pe(V),ce(([{items:L},B])=>L.length>0&&!B),ne(([{items:L}])=>({startIndex:L[0].index,endIndex:L[L.length-1].index})),Be(r0),kn(0)));ie(X,f.scrollSeekRangeChanged),ie(Y(A,pe(I,k,S,P),ne(([L,B,W,U,q])=>{const te=t0(L),{align:_,behavior:ae,offset:he}=te;let ve=te.index;ve==="LAST"&&(ve=U-1),ve=ts(0,ve,Pl(U-1,ve));let We=Fc(B,q,W,ve);return _==="end"?We=tm(We-B.height+W.height):_==="center"&&(We=tm(We-B.height/2+W.height/2)),he&&(We+=he),{top:We,behavior:ae}})),i);const G=Tt(Y(R,ne(L=>L.offsetBottom+L.bottom)),0);return ie(Y(m,ne(L=>({width:L.visibleWidth,height:L.visibleHeight}))),I),{data:j,totalCount:S,viewportDimensions:I,itemDimensions:k,scrollTop:r,scrollHeight:N,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:A,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:b,deviation:M,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:F,...f,initialTopMostItemIndex:H,gridState:R,totalListHeight:G,...d,startReached:J,endReached:K,rangeChanged:X,stateChanged:O,propsReady:h,stateRestoreInProgress:V,...T}},He(id,It,ks,s0,Qn,ad,Xn));function om(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Fc(e,t,n,r[0].index),i=Fc(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Fc(e,t,n,r){const o=f0(e.width,n.width,t.column),s=Wi(r/o),i=s*n.height+ts(0,s-1)*t.row;return i>0?i+t.row:i}function f0(e,t,n){return ts(1,Wi((e+n)/(Wi(t)+n)))}const Ej=Re(()=>{const e=Q(c=>`Item ${c}`),t=Q({}),n=Q(null),r=Q("virtuoso-grid-item"),o=Q("virtuoso-grid-list"),s=Q(cd),i=Q("div"),a=Q(wr),l=(c,u=null)=>Tt(Y(t,ne(d=>d[c]),Be()),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")}}),Cj=Re(([e,t])=>({...e,...t}),He(Sj,Ej)),Pj=w.memo(function(){const t=Ue("gridState"),n=Ue("listClassName"),r=Ue("itemClassName"),o=Ue("itemContent"),s=Ue("computeItemKey"),i=Ue("isSeeking"),a=Gt("scrollHeight"),l=Ue("ItemComponent"),c=Ue("ListComponent"),u=Ue("ScrollSeekPlaceholder"),d=Ue("context"),f=Gt("itemDimensions"),h=Gt("gap"),p=Ue("log"),m=Ue("stateRestoreInProgress"),g=pn(w.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const y=v.firstChild;if(y){const{width:T,height:S}=y.getBoundingClientRect();f({width:T,height:S})}h({row:sm("row-gap",getComputedStyle(v).rowGap,p),column:sm("column-gap",getComputedStyle(v).columnGap,p)})},[a,f,h,p]));return m?null:w.createElement(c,{ref:g,className:n,...Ke(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const b=s(v.index,v.data,d);return i?w.createElement(u,{key:b,...Ke(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...Ke(l,d),className:r,"data-index":v.index,key:b},o(v.index,v.data,d))}))}),Rj=w.memo(function(){const t=Ue("HeaderComponent"),n=Gt("headerHeight"),r=Ue("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Kt(i,"height")),[n])),s=Ue("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null}),Ij=w.memo(function(){const t=Ue("FooterComponent"),n=Gt("footerHeight"),r=Ue("headerFooterTag"),o=pn(w.useMemo(()=>i=>n(Kt(i,"height")),[n])),s=Ue("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null}),Aj=({children:e})=>{const t=w.useContext(u0),n=Gt("itemDimensions"),r=Gt("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:ko(!1),ref:o},e)},Oj=({children:e})=>{const t=w.useContext(u0),n=Gt("windowViewportRect"),r=Gt("itemDimensions"),o=Ue("customScrollParent"),s=ld(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:ko(!1)},e)},Dj=w.memo(function({...t}){const n=Ue("useWindowScroll"),r=Ue("customScrollParent"),o=r||n?kj:Mj,s=r||n?Oj:Aj;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(Rj,null),w.createElement(Pj,null),w.createElement(Ij,null)))}),{Component:_L,usePublisher:Gt,useEmitterValue:Ue,useEmitter:h0}=ed(Cj,{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"}},Dj),Mj=ud({usePublisher:Gt,useEmitterValue:Ue,useEmitter:h0}),kj=dd({usePublisher:Gt,useEmitterValue:Ue,useEmitter:h0});function sm(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Nt.WARN),t==="normal"?0:parseInt(t??"0",10)}const Fj=Re(()=>{const e=Q(l=>w.createElement("td",null,"Item $",l)),t=Q(null),n=Q(null),r=Q(null),o=Q({}),s=Q(cd),i=Q(wr),a=(l,c=null)=>Tt(Y(o,ne(u=>u[l]),Be()),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")}}),jj=Re(([e,t])=>({...e,...t}),He(l0,Fj)),Nj=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),Lj=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),_j={overflowAnchor:"none"},Vj=w.memo(function(){const t=Oe("listState"),n=Yt("sizeRanges"),r=Oe("useWindowScroll"),o=Oe("customScrollParent"),s=Yt("windowScrollContainerState"),i=Yt("scrollContainerState"),a=o||r?s:i,l=Oe("itemContent"),c=Oe("trackItemSizes"),u=Oe("itemSize"),d=Oe("log"),{callbackRef:f,ref:h}=zb(n,u,c,a,d,void 0,o),[p,m]=w.useState(0);hd("deviation",F=>{p!==F&&(h.current.style.marginTop=`${F}px`,m(F))});const g=Oe("EmptyPlaceholder"),v=Oe("ScrollSeekPlaceholder")||Nj,b=Oe("FillerRow")||Lj,y=Oe("TableBodyComponent"),T=Oe("TableRowComponent"),S=Oe("computeItemKey"),E=Oe("isSeeking"),R=Oe("paddingTopAddition"),I=Oe("firstItemIndex"),k=Oe("statefulTotalCount"),A=Oe("context");if(k===0&&g)return w.createElement(g,Ke(g,A));const N=t.offsetTop+R+p,M=t.offsetBottom,j=N>0?w.createElement(b,{height:N,key:"padding-top",context:A}):null,P=M>0?w.createElement(b,{height:M,key:"padding-bottom",context:A}):null,O=t.items.map(F=>{const V=F.originalIndex,H=S(V+I,F.data,A);return E?w.createElement(v,{...Ke(v,A),key:H,index:F.index,height:F.size,type:F.type||"item"}):w.createElement(T,{...Ke(T,A),...d0(T,F.data),key:H,"data-index":V,"data-known-size":F.size,"data-item-index":F.index,style:_j},l(F.index,F.data,A))});return w.createElement(y,{ref:f,"data-testid":"virtuoso-item-list",...Ke(y,A)},[j,...O,P])}),$j=({children:e})=>{const t=w.useContext(ba),n=Yt("viewportHeight"),r=Yt("fixedItemHeight"),o=pn(w.useMemo(()=>fs(n,s=>Kt(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:ko(!1),ref:o,"data-viewport-type":"element"},e)},Bj=({children:e})=>{const t=w.useContext(ba),n=Yt("windowViewportRect"),r=Yt("fixedItemHeight"),o=Oe("customScrollParent"),s=ld(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:ko(!1),"data-viewport-type":"window"},e)},Hj=w.memo(function(t){const n=Oe("useWindowScroll"),r=Oe("customScrollParent"),o=Yt("fixedHeaderHeight"),s=Yt("fixedFooterHeight"),i=Oe("fixedHeaderContent"),a=Oe("fixedFooterContent"),l=Oe("context"),c=pn(w.useMemo(()=>fs(o,b=>Kt(b,"height")),[o])),u=pn(w.useMemo(()=>fs(s,b=>Kt(b,"height")),[s])),d=r||n?Uj:zj,f=r||n?Bj:$j,h=Oe("TableComponent"),p=Oe("TableHeadComponent"),m=Oe("TableFooterComponent"),g=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Ke(p,l)},i()):null,v=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Ke(m,l)},a()):null;return w.createElement(d,{...t},w.createElement(f,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...Ke(h,l)},[g,w.createElement(Vj,{key:"TableBody"}),v])))}),{Component:Wj,usePublisher:Yt,useEmitterValue:Oe,useEmitter:hd}=ed(jj,{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"}},Hj),zj=ud({usePublisher:Yt,useEmitterValue:Oe,useEmitter:hd}),Uj=dd({usePublisher:Yt,useEmitterValue:Oe,useEmitter:hd}),Gj=Wj,Yj=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},Kj={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"})})},qj=e=>{const t=w.useRef(null),n=Yj(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(Os,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(bj,{height:n,useWindowScroll:!0,data:e.source,components:Kj,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(Pb,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Gr,{children:x.jsx(Su,{})})}),x.jsx("div",{})]})};var Xj=Object.defineProperty,im=Object.getOwnPropertySymbols,Qj=Object.prototype.hasOwnProperty,Zj=Object.prototype.propertyIsEnumerable,am=(e,t,n)=>t in e?Xj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jj=(e,t)=>{for(var n in t||(t={}))Qj.call(t,n)&&am(e,n,t[n]);if(im)for(var n of im(t))Zj.call(t,n)&&am(e,n,t[n]);return e},pd=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},eN=(e,t,n,r)=>xa(pd,e,t,n,r),lo=e=>typeof e=="object",Nn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!lo(e)&&!lo(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=>Nn(e[r],t[r]))},tN=(e,t)=>(lo(e)||Array.isArray(e))&&t?e[t]:e,nN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,zi=e=>/[0-9.]+/.test(e),lm=e=>["string","number"].includes(typeof e),cm=e=>e==null||(e==null?void 0:e.length)===0||e==="",um={eq:Nn,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:cm,notEmpty:e=>!cm(e),in:(e,t)=>pd(t,n=>Nn(e,n)),notIn:(e,t)=>p0(t,n=>!Nn(e,n))},rN=e=>{if(e in um)return um[e];throw new Error("Linq - Symbol not found")},Hr=(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},xa=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=rN(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},oN=(e,t,n,r)=>xa(Hr,e,t,n,r),p0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},sN=(e,t,n,r)=>xa(p0,e,t,n,r),m0=e=>{if(e===null)return null;const t=Jj({},e);return Object.keys(t).forEach(n=>t[n]=lo(e[n])?m0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},dm=(e,t)=>{if(lo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Nn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Nn(t,r))return!0}return!1},iN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},aN=e=>Hr(e,(t,n,r)=>lo(t)?n===r.findIndex(o=>Nn(o,t)):n===r.indexOf(t)),lN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},g0=(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())},cN=(e,t)=>g0(e,n=>n[t]),fm=(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},uN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},dN=(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 zi(e)&&zi(t)?r.map(i=>Number.parseInt(i)):r},Rl=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&zi(e)&&zi(t)){const o=[],[s,i]=uN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return dN(e,t,r)},fN=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Rl(r,o,1):Rl(r,s,Number.parseInt(o,10))}return lm(e)&&lm(t)?Rl(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Il=(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},hm=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},hN=(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)},pN=(e,t,n,r)=>xa(hN,e,t,n,r),pm=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(nN(t))},y0=(e=>(e.Asc="asc",e.Desc="desc",e))(y0||{}),mN=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),gN=(e,t)=>e.sort(mN(t)),yN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Hr(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},vN=class jc{constructor(t=[]){this.array=t}static Range(...t){return fN(...t)}static New(t){return new jc(t)}Where(t,n,r){return this.array=oN(this.array,t,n,r),this}Some(t,n,r){return eN(this.array,t,n,r)}All(t,n,r){return sN(this.array,t,n,r)}Reverse(){return this.array=hm(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=pN(this.array,t,n,r),this}Distinct(){return this.array=aN(this.array),this}First(t){return t===void 0?this.array[0]:lN(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?Il((n,r)=>n+r,0,this.array):Il((n,r)=>n+tN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return cN(this.array,t)}GroupWith(t){return g0(this.array,t)}Except(t){return Hr(this.array,n=>!dm(t,n))}Intersect(t){return Hr(this.array,n=>dm(t,n))}OrderBy(t,n){let r;return r=t?pm(this.array,t):this.array.toSorted(),this.array=n==="desc"?hm(r):r,this}Includes(t){return pd(this.array,n=>Nn(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 Il(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(fm(this.array,n=>[t,n]))}Zip(t,n){return fm(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Hr(this.array,t).length}Get(t){return this.array[t]}Clone(){return new jc(m0(this.array))}ToObject(t){return iN(this.array,t)}Sort(t){return Array.isArray(t)?gN(this.array,t):pm(this.array,t)}Unique(t){return yN(this.array,t)}},v0=vN,Nc={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,v)=>{try{Object.keys(g).forEach(v)}catch(b){window.console.log(b)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const b=v.getItem(g);try{return JSON.parse(b)}catch{return b??null}},s=g=>Object.keys(g).reduce((v,b)=>({...v,[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,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},d=[{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 v=g.domain??"";return v===""?"":`domain=${g.multiDomain?".":""}${v}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],f={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=f.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,b={})=>{const y=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((S,E)=>{const R=E.parse(b);return R===""?S:S.concat(R)},[`${encodeURIComponent(g)}=${y}`]).join(";");document.cookie=T,u()}},h=g=>{const v=new Set,b=y=>{g().removeItem(y);const T=s(g());v.forEach(S=>S(T))};return{delete:b,listener:y=>(v.add(y),()=>v.delete(y)),clearListeners:()=>v.clear(),json:(y=!1)=>y?s(g()):g(),has:y=>{const T=g().getItem(y);return!n(T)},deleteAll:()=>{t(g(),b),v.forEach(y=>y(g()))},get:y=>o(y,g()),set:(y,T)=>{g().setItem(y,JSON.stringify(T)),v.forEach(S=>S(g()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Nc);const md=e=>e.headerLabel??e.thead??e.id,gd=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Wr=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Wr||{});const yd=e=>e.type==="number"?e.valueAsNumber:e.value,bN=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},xN={},wN=(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}})},TN=(e,t,n=xN)=>{const r=Pi()?null:Nc.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=Au({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:wN(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Pi()||Nc.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},Lc=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??Wr.Text,i=t[s]??[],a=((c=i.find(d=>d["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:Ps(),operation:l,label:md(e),name:o,type:s,value:"",...r}},vd=()=>{const e=Ct(),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(()=>({[Wr.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Wr.Boolean]:[t.is,t.isNot],[Wr.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},SN=e=>{const t=Ct(),n=vd(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Lc(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(p=>u===p.id);return Lc(h,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=yd(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return x.jsx(w.Fragment,{children:x.jsx(Ao,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(EP,{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(br,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(br,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Os,{"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(Zr,{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(Eu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},EN=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=vd(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},i=a=>{const l=a.target.dataset.id||"",c=yd(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(br,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Os,{"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(Zr,{className:"text-danger",size:14})})]})},CN=({item:e,onPointerDown:t})=>{const n=mr(0);return x.jsxs(ta.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(SP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},PN=e=>{var l;const t=Ct(),n=gd(e.cols),r=dP(),[o,s]=w.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var g;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((g=u.options.item(f))==null?void 0:g.label)||"";s(h);const p=new v0(e.rows).GroupBy(d),m=e.cols.find(v=>v.id===d);e.setGroups(Pw(p).map((v,b)=>{const y=p[v];return{...m,groupId:Ps(),groupKey:d,index:b,rows:y,groupName:v}}))},a=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(Ao,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(IP,{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(br,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(Gr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Zr,{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(MC,{children:x.jsx(ta.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(CN,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},RN=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),IN=(e,t)=>e.toSorted(RN(t)),b0=(e,t,n)=>({id:Ps(),type:n,value:e.id,label:t}),AN=e=>{const t=Ct(),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,b0(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(w.Fragment,{children:x.jsx(Ao,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Ay,{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(br,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(br,{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(Zr,{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(Eu,{size:14})," ",t.tableSortAddButton]})})]})})})},ON=e=>{const t=Ct(),[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=b0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=md(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(vP,{size:14}):null,n==="desc"?x.jsx(yP,{size:14}):null,n==="undefined"?x.jsx(Ay,{size:14}):null]})},DN=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(SN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(AN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(PN,{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=yd(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function MN(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 kN=e=>{const t=w.useId(),n=Ct(),r=e.asLink||"button",o=w.useMemo(()=>MN(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]})})]})},FN={top:0,left:0,right:0,bottom:-1},jN=e=>{var p;const t=Ct(),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=vd(),a=r?CP:PP,l=m=>{const g=m.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==g))},c=w.useCallback(m=>{if(m===null)return;const g=new AbortController;return m.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:g.signal}),()=>g.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===y0.Asc?"ascending":"descending":"none",f=md(e.header),h=mr(void 0);return x.jsxs(ta.Item,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:h},role:"columnheader","aria-sort":d,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(Ao,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),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:f})]}),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(EN,{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(Lc(e.header,i.options,i.operations))),children:[x.jsx(Eu,{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(ON,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),x.jsx(dt.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:FN,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 v=m.target,b=h.get()||v.getBoundingClientRect().width,y=g.delta.x;return h.set(Math.abs(b+y))}})]})},NN=e=>x.jsx(ta.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(vo,{children:e.headers.map(t=>x.jsx(jN,{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}`))})}),x0=w.createContext({}),LN=()=>w.useContext(x0),_N=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(vo,{children:n.children})})),VN=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??""}`})),$N=w.forwardRef(({context:e,...t},n)=>{const r=LN(),o={...t==null?void 0:t.style,top:bn.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})}),BN=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)??""}`})),HN=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),WN={TableHead:$N,Table:VN,TableBody:_N,TableRow:BN,TableFoot:HN},zN=[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"}),UN=(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(gv,{})}),GN=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=Du(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.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:bn.nil(l)?"":l}))})})},YN=()=>x.jsx(w.Fragment,{}),KN=[{}],mm=({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 d=w.useRef(null),[f,h]=w.useState(!1),p=Ac(i),m=Ac(u.loadingMore),g=w.useMemo(()=>{if(u.loading)return zN;if(c)return u.rows;const v=new v0(u.rows);return t.length>0&&t.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:v.Where(b.name,b.operation.symbol,b.value)),r.length===0?v.Select():IN(v.Select(),r)},[u.rows,t,r,u.loading]);return w.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,b=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return b.observe(v),()=>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(Gj,{useWindowScroll:!0,followOutput:"smooth",components:WN,totalCount:g.length,data:g.length===0?KN:g,fixedFooterContent:f?YN:null,itemContent:g.length===0?UN:GN,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(NN,{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:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(kN,{...l}):null]})},qN=(e,t)=>typeof t=="function"?t(e):t,ei=(e,t,n)=>e===t||n==null?void 0:n(t),XN=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>gd(e.cols),[e.cols]),[o,s]=Au({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:qN(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),ei((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),ei((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),ei((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),ei((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(x0.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(DN,{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(mm,{...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(mm,{...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 QN=String.prototype.replace,ZN=/%20/g,Al={RFC1738:"RFC1738",RFC3986:"RFC3986"},bd={default:Al.RFC3986,formatters:{RFC1738:function(e){return QN.call(e,ZN,"+")},RFC3986:function(e){return String(e)}},RFC1738:Al.RFC1738,RFC3986:Al.RFC3986},JN=bd,Ol=Object.prototype.hasOwnProperty,ar=Array.isArray,Qt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),eL=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(ar(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},tL=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(ar(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Ol.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 ar(t)&&!ar(n)&&(o=T0(t,r)),ar(t)&&ar(n)?(n.forEach(function(s,i){if(Ol.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 Ol.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},nL=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},rL=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}},Dl=1024,oL=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(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Dl){for(var c=i.length>=Dl?i.slice(l,l+Dl):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===JN.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Qt[f];continue}if(f<2048){u[u.length]=Qt[192|f>>6]+Qt[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Qt[224|f>>12]+Qt[128|f>>6&63]+Qt[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Qt[240|f>>18]+Qt[128|f>>12&63]+Qt[128|f>>6&63]+Qt[128|f&63]}a+=u.join("")}return a},sL=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 eL(n),t},iL=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},aL=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},lL=function(t,n){return[].concat(t,n)},cL=function(t,n){if(ar(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:nL,combine:lL,compact:sL,decode:rL,encode:oL,isBuffer:aL,isRegExp:iL,maybeMap:cL,merge:tL},E0=ww,di=S0,ns=bd,uL=Object.prototype.hasOwnProperty,C0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Zt=Array.isArray,dL=Array.prototype.push,P0=function(e,t){dL.apply(e,Zt(t)?t:[t])},fL=Date.prototype.toISOString,gm=ns.default,st={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:di.encode,encodeValuesOnly:!1,format:gm,formatter:ns.formatters[gm],indices:!1,serializeDate:function(t){return fL.call(t)},skipNulls:!1,strictNullHandling:!1},hL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ml={},pL=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,g,v,b){for(var y=t,T=b,S=0,E=!1;(T=T.get(Ml))!==void 0&&!E;){var R=T.get(t);if(S+=1,typeof R<"u"){if(R===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(Ml)>"u"&&(S=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=h(y):r==="comma"&&Zt(y)&&(y=di.maybeMap(y,function(D){return D instanceof Date?h(D):D})),y===null){if(i)return c&&!g?c(n,st.encoder,v,"key",p):n;y=""}if(hL(y)||di.isBuffer(y)){if(c){var I=g?n:c(n,st.encoder,v,"key",p);return[m(I)+"="+m(c(y,st.encoder,v,"value",p))]}return[m(n)+"="+m(String(y))]}var k=[];if(typeof y>"u")return k;var A;if(r==="comma"&&Zt(y))g&&c&&(y=di.maybeMap(y,c)),A=[{value:y.length>0?y.join(",")||null:void 0}];else if(Zt(u))A=u;else{var N=Object.keys(y);A=d?N.sort(d):N}var M=l?n.replace(/\./g,"%2E"):n,j=o&&Zt(y)&&y.length===1?M+"[]":M;if(s&&Zt(y)&&y.length===0)return j+"[]";for(var P=0;P<A.length;++P){var O=A[P],F=typeof O=="object"&&typeof O.value<"u"?O.value:y[O];if(!(a&&F===null)){var V=f&&l?O.replace(/\./g,"%2E"):O,H=Zt(y)?typeof r=="function"?r(j,V):j:j+(f?"."+V:"["+V+"]");b.set(t,S);var z=E0();z.set(Ml,b),P0(k,e(F,H,r,o,s,i,a,l,r==="comma"&&g&&Zt(y)?null:c,u,d,f,h,p,m,g,v,z))}}return k},mL=function(t){if(!t)return st;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||st.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=ns.default;if(typeof t.format<"u"){if(!uL.call(ns.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ns.formatters[r],s=st.filter;(typeof t.filter=="function"||Zt(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in C0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=st.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:st.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:st.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:st.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:st.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?st.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:st.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:st.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:st.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:st.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:st.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:st.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:st.strictNullHandling}},gL=function(e,t){var n=e,r=mL(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):Zt(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 d=o[u];r.skipNulls&&n[d]===null||P0(i,pL(n[d],d,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 f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},co=S0,_c=Object.prototype.hasOwnProperty,yL=Array.isArray,Ze={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:co.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},R0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},bL="utf8=%26%2310003%3B",xL="utf8=%E2%9C%93",wL=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]===xL?c="utf-8":i[l]===bL&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,Ze.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),Ze.decoder,c,"key"),p=co.maybeMap(R0(u.slice(f+1),n),function(g){return n.decoder(g,Ze.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=vL(p)),u.indexOf("[]=")>-1&&(p=yL(p)?[p]:p);var m=_c.call(r,h);m&&n.duplicates==="combine"?r[h]=co.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},TL=function(e,t,n,r){for(var o=r?t:R0(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},SL=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&&_c.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&_c.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),TL(u,n,r,o)}},EL=function(t){if(!t)return Ze;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"?Ze.charset:t.charset,r=typeof t.duplicates>"u"?Ze.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:Ze.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ze.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ze.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ze.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ze.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ze.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ze.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Ze.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Ze.decoder,delimiter:typeof t.delimiter=="string"||co.isRegExp(t.delimiter)?t.delimiter:Ze.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ze.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ze.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ze.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ze.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ze.strictNullHandling}},CL=function(e,t){var n=EL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?wL(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=SL(a,r[a],n,typeof e=="string");o=co.merge(o,l,n)}return n.allowSparse===!0?o:co.compact(o)},PL=gL,RL=CL,IL=bd,AL={formats:IL,parse:RL,stringify:PL};const OL=(e,t)=>e.localeCompare(t),DL={sort:OL,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 AL.parse(n.toString(),DL)},A0=e=>e.replace("[",".").replace("]","").split("."),Wo=(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),$o=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),ML=(e,t)=>{const[n,r]=w.useState(null),o=w.useRef({}),[s,i]=w.useState({}),a=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:v=>{v!==null&&(o.current[p]={element:v,schema:g})}}},l=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:v=>{v!==null&&(o.current[p]={element:v,schema:g})}}},c=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:v=>{v!==null&&(o.current[p]={element:v,schema:g})}}},u=(p,m)=>{const g=Wo(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:v=>{v!==null&&(o.current[p]={element:v,schema:g})}}};w.useEffect(()=>{const p=Object.values(o.current).map(g=>{const v=g.element.dataset.origin?document.querySelector(`[data-target="${g.element.name}"]`):g.element,b=g.schema.safeParse($o(v)),y=S=>{var k;const E=v.dataset.target||v.name;if(!E)return;const R=$o(S.target)||(S.relatedTarget?$o(S.relatedTarget):""),I=g.schema.safeParse(R);if(I.success)return v.setCustomValidity(""),i(A=>ja(A,E,I.data)),r(A=>{const{[E]:N,...M}=A||{};return M===null||bn.empty(M)?null:M});if(v.required){const A=((k=I.error.issues[0])==null?void 0:k.message)||"";v.setCustomValidity(A),r(N=>({...N,[E]:A}))}},T=v.getAttribute("data-trigger")||"blur";return v.addEventListener(T,y),v.tagName==="SELECT"&&v.addEventListener("change",y),{input:g,hasInitialError:v.required?!b.success:!1,unsubscribe:()=>{v.removeEventListener(T,y),v.tagName==="SELECT"&&v.addEventListener("change",y)}}});return p.some(g=>g.hasInitialError)&&r(g=>g===null?{}:g),()=>p.forEach(g=>g.unsubscribe())});const d=w.useCallback(p=>m=>{const g=m.currentTarget,v=Object.values(o.current).reduce((y,T)=>{var k;const S=T.element,E=T.schema.safeParse($o(S));if(S.dataset.ignore==="ignore"||E.success)return y;const R=(k=E.error.issues[0])==null?void 0:k.message;S.setAttribute("data-initialized","true");const I=S.dataset.name||S.name||"";return{...y,[I]:R}},{}),b=bn.empty(v)?null:v;r(b),p==null||p({form:g,errors:b||{}})},[]),f=w.useCallback(p=>m=>{m.preventDefault();const g=m.currentTarget;let v=I0(g);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(g.elements)).forEach(T=>{if(T.tagName==="SELECT"){const S=T;v=ja(v,S.name,S.value)}if(T.tagName==="INPUT"){const S=T;v=ja(v,S.name,$o(S))}});const y=e.safeParse(s);return y.success?p({form:g,json:v,data:y.data,event:m,reset:()=>Ic(g),success:!0,errors:[]}):p({form:g,json:v,event:m,data:v,success:!1,reset:()=>Ic(g),errors:y.error.issues.map(T=>({message:T.message,path:T.path.map(S=>String(S))}))})},[t]);return{state:s,input:u,datepicker:a,checkbox:c,select:l,onSubmit:f,errors:n,onInvalid:d,disabled:n!==null,name:t,get:p=>Du(s,p)||""}},kL=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=MP;exports.Autocomplete=zM;exports.Button=Gr;exports.Calendar=pv;exports.Card=mv;exports.Checkbox=Pb;exports.ColType=Wr;exports.Collapse=Fy;exports.ComponentsProvider=xA;exports.DatePicker=GM;exports.Dropdown=Ao;exports.Empty=gv;exports.Expand=PM;exports.FileUpload=oF;exports.Form=iF;exports.Input=Os;exports.InputFeedback=Eb;exports.InputField=pa;exports.Menu=AM;exports.MenuItem=IM;exports.Modal=_M;exports.Notifications=CO;exports.Option=Cb;exports.Polymorph=mo;exports.Radiobox=aF;exports.RenderOnView=uT;exports.Select=br;exports.Stats=PO;exports.Switch=lF;exports.Tab=AO;exports.Table=XN;exports.Tabs=RO;exports.Tag=hT;exports.TaskList=cF;exports.Textarea=uF;exports.Toolbar=VM;exports.Tooltip=Sb;exports.TransferList=qj;exports.convertPath=A0;exports.createColumns=bN;exports.createDesignTokens=av;exports.createOptionCols=gd;exports.createStyles=pA;exports.createTheme=mA;exports.css=ke;exports.defaultDarkTheme=vA;exports.defaultLightTheme=bA;exports.dispatchInput=$m;exports.formReset=Ic;exports.formToJson=I0;exports.getSchemaShape=Wo;exports.initializeInputDataset=Ui;exports.isReactComponent=iT;exports.isReactFC=aT;exports.isSsr=Pi;exports.mergeRefs=Yc;exports.parsers=oa;exports.path=Du;exports.reduceTokens=Nr;exports.safeRegex=lc;exports.splitInto=dv;exports.useColorParser=wA;exports.useForm=ML;exports.useLocale=uv;exports.useNotification=SO;exports.usePrevious=kL;exports.useReactive=Vv;exports.useTablePreferences=TN;exports.useTranslations=Ct;exports.uuid=Ps;
|
|
202
202
|
//# sourceMappingURL=index.js.map
|