@g4rcez/components 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +24 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4216 -4206
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +24 -24
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/display/alert.js +1 -1
- package/dist/src/components/display/calendar.d.ts +6 -1
- package/dist/src/components/display/calendar.d.ts.map +1 -1
- package/dist/src/components/display/calendar.js +4 -4
- package/dist/src/components/display/notifications.d.ts.map +1 -1
- package/dist/src/components/display/notifications.js +1 -1
- package/dist/src/components/display/step.js +1 -1
- package/dist/src/components/form/autocomplete.js +1 -1
- package/dist/src/components/form/date-picker.d.ts +12 -2
- package/dist/src/components/form/date-picker.d.ts.map +1 -1
- package/dist/src/components/form/date-picker.js +4 -2
- package/dist/src/components/form/input-field.js +1 -1
- package/dist/src/components/form/select.js +1 -1
- package/dist/src/components/table/filter.js +1 -1
- package/dist/src/components/table/group.js +1 -1
- package/dist/src/components/table/pagination.js +1 -1
- package/dist/src/components/table/sort.js +1 -1
- package/dist/src/components/table/thead.js +1 -1
- package/dist/src/hooks/{use-translate-context.d.ts → use-components-provider.d.ts} +8 -5
- package/dist/src/hooks/use-components-provider.d.ts.map +1 -0
- package/dist/src/hooks/{use-translate-context.js → use-components-provider.js} +14 -2
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
- package/dist/src/hooks/use-translate-context.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var C0=Object.defineProperty;var P0=(e,t,n)=>t in e?C0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>P0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),w=require("react/jsx-runtime"),jc=require("react-dom");function gm(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=gm(b),yi=gm(jc);function ym(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=ym(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function R0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ym(e))&&(r&&(r+=" "),r+=t);return r}const bf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,xf=R0,lo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],f=i==null?void 0:i[l];if(u===null)return null;const h=bf(u)||bf(f);return o[l][h]}),a=n&&Object.entries(n).reduce((l,u)=>{let[f,h]=u;return h===void 0||(l[f]=h),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:f,className:h,...d}=u;return Object.entries(d).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...l,f,h]:l},[]);return xf(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)};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)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=vm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function I0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=vm(e))&&(r&&(r+=" "),r+=t);return r}var wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function A0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O0(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 D0=Error,M0=EvalError,k0=RangeError,F0=ReferenceError,bm=SyntaxError,vi=TypeError,j0=URIError,N0=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 i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},Tf=typeof Symbol<"u"&&Symbol,L0=N0,_0=function(){return typeof Tf!="function"||typeof Symbol!="function"||typeof Tf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:L0()},wa={__proto__:null,foo:{}},V0=Object,$0=function(){return{__proto__:wa}.foo===wa.foo&&!(wa instanceof V0)},B0="Function.prototype.bind called on incompatible ",W0=Object.prototype.toString,H0=Math.max,z0="[object Function]",Sf=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},U0=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},G0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Y0=function(t){var n=this;if(typeof n!="function"||W0.apply(n)!==z0)throw new TypeError(B0+n);for(var r=U0(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,Sf(r,arguments));return Object(u)===u?u:this}return n.apply(t,Sf(r,arguments))},s=H0(0,n.length-r.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(o=Function("binder","return function ("+G0(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o},K0=Y0,Nc=Function.prototype.bind||K0,q0=Function.prototype.call,X0=Object.prototype.hasOwnProperty,Q0=Nc,Z0=Q0.call(q0,X0),he,J0=D0,ex=M0,tx=k0,nx=F0,Br=bm,Nr=vi,rx=j0,xm=Function,Ta=function(e){try{return xm('"use strict"; return ('+e+").constructor;")()}catch{}},ur=Object.getOwnPropertyDescriptor;if(ur)try{ur({},"")}catch{ur=null}var Sa=function(){throw new Nr},ox=ur?function(){try{return arguments.callee,Sa}catch{try{return ur(arguments,"callee").get}catch{return Sa}}}():Sa,Sr=_0(),ix=$0(),ct=Object.getPrototypeOf||(ix?function(e){return e.__proto__}:null),Ar={},sx=typeof Uint8Array>"u"||!ct?he:ct(Uint8Array),fr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?he:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?he:ArrayBuffer,"%ArrayIteratorPrototype%":Sr&&ct?ct([][Symbol.iterator]()):he,"%AsyncFromSyncIteratorPrototype%":he,"%AsyncFunction%":Ar,"%AsyncGenerator%":Ar,"%AsyncGeneratorFunction%":Ar,"%AsyncIteratorPrototype%":Ar,"%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%":J0,"%eval%":eval,"%EvalError%":ex,"%Float32Array%":typeof Float32Array>"u"?he:Float32Array,"%Float64Array%":typeof Float64Array>"u"?he:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?he:FinalizationRegistry,"%Function%":xm,"%GeneratorFunction%":Ar,"%Int8Array%":typeof Int8Array>"u"?he:Int8Array,"%Int16Array%":typeof Int16Array>"u"?he:Int16Array,"%Int32Array%":typeof Int32Array>"u"?he:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Sr&&ct?ct(ct([][Symbol.iterator]())):he,"%JSON%":typeof JSON=="object"?JSON:he,"%Map%":typeof Map>"u"?he:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Sr||!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%":tx,"%ReferenceError%":nx,"%Reflect%":typeof Reflect>"u"?he:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?he:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Sr||!ct?he:ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?he:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Sr&&ct?ct(""[Symbol.iterator]()):he,"%Symbol%":Sr?Symbol:he,"%SyntaxError%":Br,"%ThrowTypeError%":ox,"%TypedArray%":sx,"%TypeError%":Nr,"%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%":rx,"%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 ax=ct(ct(e));fr["%Error.prototype%"]=ax}var lx=function e(t){var n;if(t==="%AsyncFunction%")n=Ta("async function () {}");else if(t==="%GeneratorFunction%")n=Ta("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ta("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},Ef={__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"]},bi=Nc,us=Z0,cx=bi.call(Function.call,Array.prototype.concat),ux=bi.call(Function.apply,Array.prototype.splice),Cf=bi.call(Function.call,String.prototype.replace),fs=bi.call(Function.call,String.prototype.slice),fx=bi.call(Function.call,RegExp.prototype.exec),dx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,hx=/\\(\\)?/g,px=function(t){var n=fs(t,0,1),r=fs(t,-1);if(n==="%"&&r!=="%")throw new Br("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Br("invalid intrinsic syntax, expected opening `%`");var o=[];return Cf(t,dx,function(i,s,a,c){o[o.length]=a?Cf(c,hx,"$1"):s||i}),o},mx=function(t,n){var r=t,o;if(us(Ef,r)&&(o=Ef[r],r="%"+o[0]+"%"),us(fr,r)){var i=fr[r];if(i===Ar&&(i=lx(r)),typeof i>"u"&&!n)throw new Nr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Br("intrinsic "+t+" does not exist!")},co=function(t,n){if(typeof t!="string"||t.length===0)throw new Nr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nr('"allowMissing" argument must be a boolean');if(fx(/^%?[^%]*%?$/,t)===null)throw new Br("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=px(t),o=r.length>0?r[0]:"",i=mx("%"+o+"%",n),s=i.name,a=i.value,c=!1,l=i.alias;l&&(o=l[0],ux(r,cx([0,1],l)));for(var u=1,f=!0;u<r.length;u+=1){var h=r[u],d=fs(h,0,1),p=fs(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new Br("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(c=!0),o+="."+h,s="%"+o+"%",us(fr,s))a=fr[s];else if(a!=null){if(!(h in a)){if(!n)throw new Nr("base intrinsic for "+t+" exists, but the property is not available.");return}if(ur&&u+1>=r.length){var m=ur(a,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else f=us(a,h),a=a[h];f&&!c&&(fr[s]=a)}}return a},wm={exports:{}},Ea,Pf;function Lc(){if(Pf)return Ea;Pf=1;var e=co,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ea=t,Ea}var gx=co,Ji=gx("%Object.getOwnPropertyDescriptor%",!0);if(Ji)try{Ji([],"length")}catch{Ji=null}var Tm=Ji,Rf=Lc(),yx=bm,Er=vi,If=Tm,vx=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Er("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Er("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Er("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Er("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Er("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Er("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!If&&If(t,n);if(Rf)Rf(t,n,{configurable:s===null&&c?c.configurable:!s,enumerable:o===null&&c?c.enumerable:!o,value:r,writable:i===null&&c?c.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new yx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Al=Lc(),Sm=function(){return!!Al};Sm.hasArrayLengthDefineBug=function(){if(!Al)return null;try{return Al([],"length",{value:1}).length!==1}catch{return!0}};var bx=Sm,xx=co,Af=vx,wx=bx(),Of=Tm,Df=vi,Tx=xx("%Math.floor%"),Sx=function(t,n){if(typeof t!="function")throw new Df("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Tx(n)!==n)throw new Df("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&Of){var s=Of(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(wx?Af(t,"length",n,!0,!0):Af(t,"length",n)),t};(function(e){var t=Nc,n=co,r=Sx,o=vi,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),c=Lc(),l=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var d=a(t,s,arguments);return r(d,1+l(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u})(wm);var Ex=wm.exports,Em=co,Cm=Ex,Cx=Cm(Em("String.prototype.indexOf")),Px=function(t,n){var r=Em(t,!!n);return typeof r=="function"&&Cx(t,".prototype.")>-1?Cm(r):r};const Rx={},Ix=Object.freeze(Object.defineProperty({__proto__:null,default:Rx},Symbol.toStringTag,{value:"Module"})),Ax=O0(Ix);var _c=typeof Map=="function"&&Map.prototype,Ca=Object.getOwnPropertyDescriptor&&_c?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ds=_c&&Ca&&typeof Ca.get=="function"?Ca.get:null,Mf=_c&&Map.prototype.forEach,Vc=typeof Set=="function"&&Set.prototype,Pa=Object.getOwnPropertyDescriptor&&Vc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,hs=Vc&&Pa&&typeof Pa.get=="function"?Pa.get:null,kf=Vc&&Set.prototype.forEach,Ox=typeof WeakMap=="function"&&WeakMap.prototype,Wo=Ox?WeakMap.prototype.has:null,Dx=typeof WeakSet=="function"&&WeakSet.prototype,Ho=Dx?WeakSet.prototype.has:null,Mx=typeof WeakRef=="function"&&WeakRef.prototype,Ff=Mx?WeakRef.prototype.deref:null,kx=Boolean.prototype.valueOf,Fx=Object.prototype.toString,jx=Function.prototype.toString,Nx=String.prototype.match,$c=String.prototype.slice,Dn=String.prototype.replace,Lx=String.prototype.toUpperCase,jf=String.prototype.toLowerCase,Pm=RegExp.prototype.test,Nf=Array.prototype.concat,Zt=Array.prototype.join,_x=Array.prototype.slice,Lf=Math.floor,Ol=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ra=Object.getOwnPropertySymbols,Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",St=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Wr||!0)?Symbol.toStringTag:null,Rm=Object.prototype.propertyIsEnumerable,_f=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Vf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Pm.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Lf(-e):Lf(e);if(r!==e){var o=String(r),i=$c.call(t,o.length+1);return Dn.call(o,n,"$&_")+"."+Dn.call(Dn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Dn.call(t,n,"$&_")}var Ml=Ax,$f=Ml.custom,Bf=Am($f)?$f:null,Vx=function e(t,n,r,o){var i=n||{};if(In(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(In(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=In(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(In(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(In(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.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 Dm(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return a?Vf(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return a?Vf(t,l):l}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return kl(t)?"[Array]":"[Object]";var f=rw(i,r);if(typeof o>"u")o=[];else if(Om(o,t)>=0)return"[Circular]";function h(L,P,M){if(P&&(o=_x.call(o),o.push(P)),M){var F={depth:i.depth};return In(i,"quoteStyle")&&(F.quoteStyle=i.quoteStyle),e(L,F,r+1,o)}return e(L,i,r+1,o)}if(typeof t=="function"&&!Wf(t)){var d=Kx(t),p=Fi(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+Zt.call(p,", ")+" }":"")}if(Am(t)){var m=Wr?Dn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Dl.call(t);return typeof t=="object"&&!Wr?Mo(m):m}if(ew(t)){for(var y="<"+jf.call(String(t.nodeName)),g=t.attributes||[],x=0;x<g.length;x++)y+=" "+g[x].name+"="+Im($x(g[x].value),"double",i);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+jf.call(String(t.nodeName))+">",y}if(kl(t)){if(t.length===0)return"[]";var v=Fi(t,h);return f&&!nw(v)?"["+Fl(v,f)+"]":"[ "+Zt.call(v,", ")+" ]"}if(Wx(t)){var S=Fi(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Rm.call(t,"cause")?"{ ["+String(t)+"] "+Zt.call(Nf.call("[cause]: "+h(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Zt.call(S,", ")+" }"}if(typeof t=="object"&&s){if(Bf&&typeof t[Bf]=="function"&&Ml)return Ml(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(qx(t)){var T=[];return Mf&&Mf.call(t,function(L,P){T.push(h(P,t,!0)+" => "+h(L,t))}),Hf("Map",ds.call(t),T,f)}if(Zx(t)){var E=[];return kf&&kf.call(t,function(L){E.push(h(L,t))}),Hf("Set",hs.call(t),E,f)}if(Xx(t))return Ia("WeakMap");if(Jx(t))return Ia("WeakSet");if(Qx(t))return Ia("WeakRef");if(zx(t))return Mo(h(Number(t)));if(Gx(t))return Mo(h(Ol.call(t)));if(Ux(t))return Mo(kx.call(t));if(Hx(t))return Mo(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof wf<"u"&&t===wf)return"{ [object globalThis] }";if(!Bx(t)&&!Wf(t)){var A=Fi(t,h),I=_f?_f(t)===Object.prototype:t instanceof Object||t.constructor===Object,O=t instanceof Object?"":"null prototype",R=!I&&St&&Object(t)===t&&St in t?$c.call(Wn(t),8,-1):O?"Object":"",j=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",k=j+(R||O?"["+Zt.call(Nf.call([],R||[],O||[]),": ")+"] ":"");return A.length===0?k+"{}":f?k+"{"+Fl(A,f)+"}":k+"{ "+Zt.call(A,", ")+" }"}return String(t)};function Im(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function $x(e){return Dn.call(String(e),/"/g,""")}function kl(e){return Wn(e)==="[object Array]"&&(!St||!(typeof e=="object"&&St in e))}function Bx(e){return Wn(e)==="[object Date]"&&(!St||!(typeof e=="object"&&St in e))}function Wf(e){return Wn(e)==="[object RegExp]"&&(!St||!(typeof e=="object"&&St in e))}function Wx(e){return Wn(e)==="[object Error]"&&(!St||!(typeof e=="object"&&St in e))}function Hx(e){return Wn(e)==="[object String]"&&(!St||!(typeof e=="object"&&St in e))}function zx(e){return Wn(e)==="[object Number]"&&(!St||!(typeof e=="object"&&St in e))}function Ux(e){return Wn(e)==="[object Boolean]"&&(!St||!(typeof e=="object"&&St in e))}function Am(e){if(Wr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Dl)return!1;try{return Dl.call(e),!0}catch{}return!1}function Gx(e){if(!e||typeof e!="object"||!Ol)return!1;try{return Ol.call(e),!0}catch{}return!1}var Yx=Object.prototype.hasOwnProperty||function(e){return e in this};function In(e,t){return Yx.call(e,t)}function Wn(e){return Fx.call(e)}function Kx(e){if(e.name)return e.name;var t=Nx.call(jx.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Om(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 qx(e){if(!ds||!e||typeof e!="object")return!1;try{ds.call(e);try{hs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Xx(e){if(!Wo||!e||typeof e!="object")return!1;try{Wo.call(e,Wo);try{Ho.call(e,Ho)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Qx(e){if(!Ff||!e||typeof e!="object")return!1;try{return Ff.call(e),!0}catch{}return!1}function Zx(e){if(!hs||!e||typeof e!="object")return!1;try{hs.call(e);try{ds.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Jx(e){if(!Ho||!e||typeof e!="object")return!1;try{Ho.call(e,Ho);try{Wo.call(e,Wo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ew(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Dm(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Dm($c.call(e,0,t.maxStringLength),t)+r}var o=Dn.call(Dn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,tw);return Im(o,"single",t)}function tw(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":"")+Lx.call(t.toString(16))}function Mo(e){return"Object("+e+")"}function Ia(e){return e+" { ? }"}function Hf(e,t,n,r){var o=r?Fl(n,r):Zt.call(n,", ");return e+" ("+t+") {"+o+"}"}function nw(e){for(var t=0;t<e.length;t++)if(Om(e[t],`
|
|
1
|
+
"use strict";var C0=Object.defineProperty;var P0=(e,t,n)=>t in e?C0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>P0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),w=require("react/jsx-runtime"),jc=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(b),yi=ym(jc);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 R0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=vm(e))&&(r&&(r+=" "),r+=t);return r}const xf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,wf=R0,lo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return wf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],f=i==null?void 0:i[l];if(u===null)return null;const h=xf(u)||xf(f);return o[l][h]}),a=n&&Object.entries(n).reduce((l,u)=>{let[f,h]=u;return h===void 0||(l[f]=h),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:f,className:h,...d}=u;return Object.entries(d).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...i,...a}[m]):{...i,...a}[m]===g})?[...l,f,h]:l},[]);return wf(e,s,c,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 I0(){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 Tf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function A0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O0(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 D0=Error,M0=EvalError,k0=RangeError,F0=ReferenceError,xm=SyntaxError,vi=TypeError,j0=URIError,N0=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 i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},Sf=typeof Symbol<"u"&&Symbol,L0=N0,_0=function(){return typeof Sf!="function"||typeof Symbol!="function"||typeof Sf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:L0()},wa={__proto__:null,foo:{}},V0=Object,$0=function(){return{__proto__:wa}.foo===wa.foo&&!(wa instanceof V0)},B0="Function.prototype.bind called on incompatible ",W0=Object.prototype.toString,H0=Math.max,z0="[object Function]",Ef=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},U0=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},G0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Y0=function(t){var n=this;if(typeof n!="function"||W0.apply(n)!==z0)throw new TypeError(B0+n);for(var r=U0(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,Ef(r,arguments));return Object(u)===u?u:this}return n.apply(t,Ef(r,arguments))},s=H0(0,n.length-r.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(o=Function("binder","return function ("+G0(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o},K0=Y0,Nc=Function.prototype.bind||K0,q0=Function.prototype.call,X0=Object.prototype.hasOwnProperty,Q0=Nc,Z0=Q0.call(q0,X0),he,J0=D0,ex=M0,tx=k0,nx=F0,Br=xm,Nr=vi,rx=j0,wm=Function,Ta=function(e){try{return wm('"use strict"; return ('+e+").constructor;")()}catch{}},ur=Object.getOwnPropertyDescriptor;if(ur)try{ur({},"")}catch{ur=null}var Sa=function(){throw new Nr},ox=ur?function(){try{return arguments.callee,Sa}catch{try{return ur(arguments,"callee").get}catch{return Sa}}}():Sa,Sr=_0(),ix=$0(),ct=Object.getPrototypeOf||(ix?function(e){return e.__proto__}:null),Ar={},sx=typeof Uint8Array>"u"||!ct?he:ct(Uint8Array),fr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?he:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?he:ArrayBuffer,"%ArrayIteratorPrototype%":Sr&&ct?ct([][Symbol.iterator]()):he,"%AsyncFromSyncIteratorPrototype%":he,"%AsyncFunction%":Ar,"%AsyncGenerator%":Ar,"%AsyncGeneratorFunction%":Ar,"%AsyncIteratorPrototype%":Ar,"%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%":J0,"%eval%":eval,"%EvalError%":ex,"%Float32Array%":typeof Float32Array>"u"?he:Float32Array,"%Float64Array%":typeof Float64Array>"u"?he:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?he:FinalizationRegistry,"%Function%":wm,"%GeneratorFunction%":Ar,"%Int8Array%":typeof Int8Array>"u"?he:Int8Array,"%Int16Array%":typeof Int16Array>"u"?he:Int16Array,"%Int32Array%":typeof Int32Array>"u"?he:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Sr&&ct?ct(ct([][Symbol.iterator]())):he,"%JSON%":typeof JSON=="object"?JSON:he,"%Map%":typeof Map>"u"?he:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Sr||!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%":tx,"%ReferenceError%":nx,"%Reflect%":typeof Reflect>"u"?he:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?he:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Sr||!ct?he:ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?he:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Sr&&ct?ct(""[Symbol.iterator]()):he,"%Symbol%":Sr?Symbol:he,"%SyntaxError%":Br,"%ThrowTypeError%":ox,"%TypedArray%":sx,"%TypeError%":Nr,"%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%":rx,"%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 ax=ct(ct(e));fr["%Error.prototype%"]=ax}var lx=function e(t){var n;if(t==="%AsyncFunction%")n=Ta("async function () {}");else if(t==="%GeneratorFunction%")n=Ta("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ta("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},Cf={__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"]},bi=Nc,us=Z0,cx=bi.call(Function.call,Array.prototype.concat),ux=bi.call(Function.apply,Array.prototype.splice),Pf=bi.call(Function.call,String.prototype.replace),fs=bi.call(Function.call,String.prototype.slice),fx=bi.call(Function.call,RegExp.prototype.exec),dx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,hx=/\\(\\)?/g,px=function(t){var n=fs(t,0,1),r=fs(t,-1);if(n==="%"&&r!=="%")throw new Br("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Br("invalid intrinsic syntax, expected opening `%`");var o=[];return Pf(t,dx,function(i,s,a,c){o[o.length]=a?Pf(c,hx,"$1"):s||i}),o},mx=function(t,n){var r=t,o;if(us(Cf,r)&&(o=Cf[r],r="%"+o[0]+"%"),us(fr,r)){var i=fr[r];if(i===Ar&&(i=lx(r)),typeof i>"u"&&!n)throw new Nr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Br("intrinsic "+t+" does not exist!")},co=function(t,n){if(typeof t!="string"||t.length===0)throw new Nr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nr('"allowMissing" argument must be a boolean');if(fx(/^%?[^%]*%?$/,t)===null)throw new Br("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=px(t),o=r.length>0?r[0]:"",i=mx("%"+o+"%",n),s=i.name,a=i.value,c=!1,l=i.alias;l&&(o=l[0],ux(r,cx([0,1],l)));for(var u=1,f=!0;u<r.length;u+=1){var h=r[u],d=fs(h,0,1),p=fs(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new Br("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(c=!0),o+="."+h,s="%"+o+"%",us(fr,s))a=fr[s];else if(a!=null){if(!(h in a)){if(!n)throw new Nr("base intrinsic for "+t+" exists, but the property is not available.");return}if(ur&&u+1>=r.length){var m=ur(a,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else f=us(a,h),a=a[h];f&&!c&&(fr[s]=a)}}return a},Tm={exports:{}},Ea,Rf;function Lc(){if(Rf)return Ea;Rf=1;var e=co,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ea=t,Ea}var gx=co,Ji=gx("%Object.getOwnPropertyDescriptor%",!0);if(Ji)try{Ji([],"length")}catch{Ji=null}var Sm=Ji,If=Lc(),yx=xm,Er=vi,Af=Sm,vx=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Er("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Er("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Er("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Er("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Er("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Er("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!Af&&Af(t,n);if(If)If(t,n,{configurable:s===null&&c?c.configurable:!s,enumerable:o===null&&c?c.enumerable:!o,value:r,writable:i===null&&c?c.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new yx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Al=Lc(),Em=function(){return!!Al};Em.hasArrayLengthDefineBug=function(){if(!Al)return null;try{return Al([],"length",{value:1}).length!==1}catch{return!0}};var bx=Em,xx=co,Of=vx,wx=bx(),Df=Sm,Mf=vi,Tx=xx("%Math.floor%"),Sx=function(t,n){if(typeof t!="function")throw new Mf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Tx(n)!==n)throw new Mf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&Df){var s=Df(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(wx?Of(t,"length",n,!0,!0):Of(t,"length",n)),t};(function(e){var t=Nc,n=co,r=Sx,o=vi,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),c=Lc(),l=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var d=a(t,s,arguments);return r(d,1+l(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u})(Tm);var Ex=Tm.exports,Cm=co,Pm=Ex,Cx=Pm(Cm("String.prototype.indexOf")),Px=function(t,n){var r=Cm(t,!!n);return typeof r=="function"&&Cx(t,".prototype.")>-1?Pm(r):r};const Rx={},Ix=Object.freeze(Object.defineProperty({__proto__:null,default:Rx},Symbol.toStringTag,{value:"Module"})),Ax=O0(Ix);var _c=typeof Map=="function"&&Map.prototype,Ca=Object.getOwnPropertyDescriptor&&_c?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ds=_c&&Ca&&typeof Ca.get=="function"?Ca.get:null,kf=_c&&Map.prototype.forEach,Vc=typeof Set=="function"&&Set.prototype,Pa=Object.getOwnPropertyDescriptor&&Vc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,hs=Vc&&Pa&&typeof Pa.get=="function"?Pa.get:null,Ff=Vc&&Set.prototype.forEach,Ox=typeof WeakMap=="function"&&WeakMap.prototype,Wo=Ox?WeakMap.prototype.has:null,Dx=typeof WeakSet=="function"&&WeakSet.prototype,Ho=Dx?WeakSet.prototype.has:null,Mx=typeof WeakRef=="function"&&WeakRef.prototype,jf=Mx?WeakRef.prototype.deref:null,kx=Boolean.prototype.valueOf,Fx=Object.prototype.toString,jx=Function.prototype.toString,Nx=String.prototype.match,$c=String.prototype.slice,Dn=String.prototype.replace,Lx=String.prototype.toUpperCase,Nf=String.prototype.toLowerCase,Rm=RegExp.prototype.test,Lf=Array.prototype.concat,Zt=Array.prototype.join,_x=Array.prototype.slice,_f=Math.floor,Ol=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ra=Object.getOwnPropertySymbols,Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",St=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Wr||!0)?Symbol.toStringTag:null,Im=Object.prototype.propertyIsEnumerable,Vf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function $f(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?-_f(-e):_f(e);if(r!==e){var o=String(r),i=$c.call(t,o.length+1);return Dn.call(o,n,"$&_")+"."+Dn.call(Dn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Dn.call(t,n,"$&_")}var Ml=Ax,Bf=Ml.custom,Wf=Om(Bf)?Bf:null,Vx=function e(t,n,r,o){var i=n||{};if(In(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(In(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=In(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(In(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(In(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.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,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return a?$f(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return a?$f(t,l):l}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return kl(t)?"[Array]":"[Object]";var f=rw(i,r);if(typeof o>"u")o=[];else if(Dm(o,t)>=0)return"[Circular]";function h(N,P,O){if(P&&(o=_x.call(o),o.push(P)),O){var F={depth:i.depth};return In(i,"quoteStyle")&&(F.quoteStyle=i.quoteStyle),e(N,F,r+1,o)}return e(N,i,r+1,o)}if(typeof t=="function"&&!Hf(t)){var d=Kx(t),p=Fi(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+Zt.call(p,", ")+" }":"")}if(Om(t)){var m=Wr?Dn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Dl.call(t);return typeof t=="object"&&!Wr?Mo(m):m}if(ew(t)){for(var g="<"+Nf.call(String(t.nodeName)),v=t.attributes||[],x=0;x<v.length;x++)g+=" "+v[x].name+"="+Am($x(v[x].value),"double",i);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Nf.call(String(t.nodeName))+">",g}if(kl(t)){if(t.length===0)return"[]";var y=Fi(t,h);return f&&!nw(y)?"["+Fl(y,f)+"]":"[ "+Zt.call(y,", ")+" ]"}if(Wx(t)){var T=Fi(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Im.call(t,"cause")?"{ ["+String(t)+"] "+Zt.call(Lf.call("[cause]: "+h(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Zt.call(T,", ")+" }"}if(typeof t=="object"&&s){if(Wf&&typeof t[Wf]=="function"&&Ml)return Ml(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(qx(t)){var S=[];return kf&&kf.call(t,function(N,P){S.push(h(P,t,!0)+" => "+h(N,t))}),zf("Map",ds.call(t),S,f)}if(Zx(t)){var E=[];return Ff&&Ff.call(t,function(N){E.push(h(N,t))}),zf("Set",hs.call(t),E,f)}if(Xx(t))return Ia("WeakMap");if(Jx(t))return Ia("WeakSet");if(Qx(t))return Ia("WeakRef");if(zx(t))return Mo(h(Number(t)));if(Gx(t))return Mo(h(Ol.call(t)));if(Ux(t))return Mo(kx.call(t));if(Hx(t))return Mo(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Tf<"u"&&t===Tf)return"{ [object globalThis] }";if(!Bx(t)&&!Hf(t)){var R=Fi(t,h),A=Vf?Vf(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",I=!A&&St&&Object(t)===t&&St in t?$c.call(Wn(t),8,-1):k?"Object":"",j=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",D=j+(I||k?"["+Zt.call(Lf.call([],I||[],k||[]),": ")+"] ":"");return R.length===0?D+"{}":f?D+"{"+Fl(R,f)+"}":D+"{ "+Zt.call(R,", ")+" }"}return String(t)};function Am(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function $x(e){return Dn.call(String(e),/"/g,""")}function kl(e){return Wn(e)==="[object Array]"&&(!St||!(typeof e=="object"&&St in e))}function Bx(e){return Wn(e)==="[object Date]"&&(!St||!(typeof e=="object"&&St in e))}function Hf(e){return Wn(e)==="[object RegExp]"&&(!St||!(typeof e=="object"&&St in e))}function Wx(e){return Wn(e)==="[object Error]"&&(!St||!(typeof e=="object"&&St in e))}function Hx(e){return Wn(e)==="[object String]"&&(!St||!(typeof e=="object"&&St in e))}function zx(e){return Wn(e)==="[object Number]"&&(!St||!(typeof e=="object"&&St in e))}function Ux(e){return Wn(e)==="[object Boolean]"&&(!St||!(typeof e=="object"&&St in e))}function Om(e){if(Wr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Dl)return!1;try{return Dl.call(e),!0}catch{}return!1}function Gx(e){if(!e||typeof e!="object"||!Ol)return!1;try{return Ol.call(e),!0}catch{}return!1}var Yx=Object.prototype.hasOwnProperty||function(e){return e in this};function In(e,t){return Yx.call(e,t)}function Wn(e){return Fx.call(e)}function Kx(e){if(e.name)return e.name;var t=Nx.call(jx.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 qx(e){if(!ds||!e||typeof e!="object")return!1;try{ds.call(e);try{hs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Xx(e){if(!Wo||!e||typeof e!="object")return!1;try{Wo.call(e,Wo);try{Ho.call(e,Ho)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Qx(e){if(!jf||!e||typeof e!="object")return!1;try{return jf.call(e),!0}catch{}return!1}function Zx(e){if(!hs||!e||typeof e!="object")return!1;try{hs.call(e);try{ds.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Jx(e){if(!Ho||!e||typeof e!="object")return!1;try{Ho.call(e,Ho);try{Wo.call(e,Wo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ew(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($c.call(e,0,t.maxStringLength),t)+r}var o=Dn.call(Dn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,tw);return Am(o,"single",t)}function tw(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":"")+Lx.call(t.toString(16))}function Mo(e){return"Object("+e+")"}function Ia(e){return e+" { ? }"}function zf(e,t,n,r){var o=r?Fl(n,r):Zt.call(n,", ");return e+" ("+t+") {"+o+"}"}function nw(e){for(var t=0;t<e.length;t++)if(Dm(e[t],`
|
|
2
2
|
`)>=0)return!1;return!0}function rw(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Zt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Zt.call(Array(t+1),n)}}function Fl(e,t){if(e.length===0)return"";var n=`
|
|
3
3
|
`+t.prev+t.base;return n+Zt.call(e,","+n)+`
|
|
4
|
-
`+t.prev}function Fi(e,t){var n=kl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=In(e,o)?t(e[o],e):""}var i=typeof Ra=="function"?Ra(e):[],s;if(Wr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var c in e)In(e,c)&&(n&&String(Number(c))===c&&c<e.length||Wr&&s["$"+c]instanceof Symbol||(Pm.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if(typeof Ra=="function")for(var l=0;l<i.length;l++)Rm.call(e,i[l])&&r.push("["+t(i[l])+"]: "+t(e[i[l]],e));return r}var Mm=co,uo=Px,ow=Vx,iw=vi,ji=Mm("%WeakMap%",!0),Ni=Mm("%Map%",!0),sw=uo("WeakMap.prototype.get",!0),aw=uo("WeakMap.prototype.set",!0),lw=uo("WeakMap.prototype.has",!0),cw=uo("Map.prototype.get",!0),uw=uo("Map.prototype.set",!0),fw=uo("Map.prototype.has",!0),Bc=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},dw=function(e,t){var n=Bc(e,t);return n&&n.value},hw=function(e,t,n){var r=Bc(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},pw=function(e,t){return!!Bc(e,t)},mw=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new iw("Side channel does not contain "+ow(i))},get:function(i){if(ji&&i&&(typeof i=="object"||typeof i=="function")){if(t)return sw(t,i)}else if(Ni){if(n)return cw(n,i)}else if(r)return dw(r,i)},has:function(i){if(ji&&i&&(typeof i=="object"||typeof i=="function")){if(t)return lw(t,i)}else if(Ni){if(n)return fw(n,i)}else if(r)return pw(r,i);return!1},set:function(i,s){ji&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new ji),aw(t,i,s)):Ni?(n||(n=new Ni),uw(n,i,s)):(r||(r={key:{},next:null}),hw(r,i,s))}};return o},zf=e=>Array.isArray(e),Aa=e=>e===void 0,Oa=e=>e===null,gw=Function.bind.call(Function.call,Object.prototype.toString),yw=e=>!!e&&gw(e)==="[object Error]"||e instanceof Error,km=(e,t)=>e instanceof t,vw=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},bw=e=>Object.prototype.toString.call(e)==="[object Date]"&&km(e,Date),vn={array:zf,date:bw,empty:e=>Oa(e)||Aa(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:km,isError:yw,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Oa(e)||Aa(e),null:Oa,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!zf(e)&&typeof e=="object",primitive:vw,string:e=>typeof e=="string",undefined:Aa},jl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const i=`${+o[0]}`===o[0];e[r]=i?[]:{}}if(typeof e[r]!="object"){const i=`${+o[0]}`===o[0];e[r]=jl(i?[]:{},o,n)}else e[r]=jl(e[r],o,n)}else e[r]=n;return e},xw=e=>Object.keys(e),ww=e=>e.replace("[",".").replace("]","").split("."),Da=(e,t,n)=>{const r=Array.isArray(t)?t:ww(t),o=structuredClone(e);return jl(o,r,n),o};const Wc="-";function Tw(e){const t=Ew(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(Wc);return a[0]===""&&a.length!==1&&a.shift(),Fm(a,t)||Sw(s)}function i(s,a){const c=n[s]||[];return a&&r[s]?[...c,...r[s]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function Fm(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Fm(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Wc);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Uf=/^\[(.+)\]$/;function Sw(e){if(Uf.test(e)){const t=Uf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Ew(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Pw(Object.entries(e.classGroups),n).forEach(([i,s])=>{Nl(s,r,i,t)}),r}function Nl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Gf(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Cw(o)){Nl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Nl(s,Gf(t,i),n,r)})})}function Gf(e,t){let n=e;return t.split(Wc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Cw(e){return e.isThemeGetter}function Pw(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function Rw(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const jm="!";function Iw(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const c=[];let l=0,u=0,f;for(let y=0;y<a.length;y++){let g=a[y];if(l===0){if(g===o&&(r||a.slice(y,y+i)===t)){c.push(a.slice(u,y)),u=y+i;continue}if(g==="/"){f=y;continue}}g==="["?l++:g==="]"&&l--}const h=c.length===0?a:a.substring(u),d=h.startsWith(jm),p=d?h.substring(1):h,m=f&&f>u?f-u:void 0;return{modifiers:c,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(c){return n({className:c,parseClassName:s})}:s}function Aw(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 Ow(e){return{cache:Rw(e.cacheSize),parseClassName:Iw(e),...Tw(e)}}const Dw=/\s+/;function Mw(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(Dw).map(s=>{const{modifiers:a,hasImportantModifier:c,baseClassName:l,maybePostfixModifierPosition:u}=n(s);let f=!!u,h=r(f?l.substring(0,u):l);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:s};if(h=r(l),!h)return{isTailwindClass:!1,originalClassName:s};f=!1}const d=Aw(a).join(":");return{isTailwindClass:!0,modifierId:c?d+jm:d,classGroupId:h,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:c,hasPostfixModifier:l}=s,u=a+c;return i.has(u)?!1:(i.add(u),o(c,l).forEach(f=>i.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function kw(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Nm(t))&&(r&&(r+=" "),r+=n);return r}function Nm(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Nm(e[r]))&&(n&&(n+=" "),n+=t);return n}function Fw(e,...t){let n,r,o,i=s;function s(c){const l=t.reduce((u,f)=>f(u),e());return n=Ow(l),r=n.cache.get,o=n.cache.set,i=a,a(c)}function a(c){const l=r(c);if(l)return l;const u=Mw(c,n);return o(c,u),u}return function(){return i(kw.apply(null,arguments))}}function Le(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Lm=/^\[(?:([a-z-]+):)?(.+)\]$/i,jw=/^\d+\/\d+$/,Nw=new Set(["px","full","screen"]),Lw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_w=/\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$/,Vw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$w=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function gn(e){return ar(e)||Nw.has(e)||jw.test(e)}function En(e){return fo(e,"length",qw)}function ar(e){return!!e&&!Number.isNaN(Number(e))}function Li(e){return fo(e,"number",ar)}function ko(e){return!!e&&Number.isInteger(Number(e))}function Ww(e){return e.endsWith("%")&&ar(e.slice(0,-1))}function ue(e){return Lm.test(e)}function Cn(e){return Lw.test(e)}const Hw=new Set(["length","size","percentage"]);function zw(e){return fo(e,Hw,_m)}function Uw(e){return fo(e,"position",_m)}const Gw=new Set(["image","url"]);function Yw(e){return fo(e,Gw,Qw)}function Kw(e){return fo(e,"",Xw)}function Fo(){return!0}function fo(e,t,n){const r=Lm.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function qw(e){return _w.test(e)&&!Vw.test(e)}function _m(){return!1}function Xw(e){return $w.test(e)}function Qw(e){return Bw.test(e)}function Zw(){const e=Le("colors"),t=Le("spacing"),n=Le("blur"),r=Le("brightness"),o=Le("borderColor"),i=Le("borderRadius"),s=Le("borderSpacing"),a=Le("borderWidth"),c=Le("contrast"),l=Le("grayscale"),u=Le("hueRotate"),f=Le("invert"),h=Le("gap"),d=Le("gradientColorStops"),p=Le("gradientColorStopPositions"),m=Le("inset"),y=Le("margin"),g=Le("opacity"),x=Le("padding"),v=Le("saturate"),S=Le("scale"),T=Le("sepia"),E=Le("skew"),A=Le("space"),I=Le("translate"),O=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ue,t],k=()=>[ue,t],L=()=>["",gn,En],P=()=>["auto",ar,ue],M=()=>["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"],W=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ue],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[ar,Li],q=()=>[ar,ue];return{cacheSize:500,separator:":",theme:{colors:[Fo],spacing:[gn,En],blur:["none","",Cn,ue],brightness:$(),borderColor:[e],borderRadius:["none","","full",Cn,ue],borderSpacing:k(),borderWidth:L(),contrast:$(),grayscale:U(),hueRotate:q(),invert:U(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Ww,En],inset:j(),margin:j(),opacity:$(),padding:k(),saturate:$(),scale:$(),sepia:U(),skew:q(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Cn]}],"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:[...M(),ue]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],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",ko,ue]}],basis:[{basis:j()}],"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",ko,ue]}],"grid-cols":[{"grid-cols":[Fo]}],"col-start-end":[{col:["auto",{span:["full",ko,ue]},ue]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Fo]}],"row-start-end":[{row:["auto",{span:[ko,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",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"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:[Cn]},Cn]}],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",Cn,En]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Li]}],"font-family":[{font:[Fo]}],"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",ar,Li]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gn,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":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gn,En]}],"underline-offset":[{"underline-offset":["auto",gn,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":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),Uw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yw]}],"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:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[g]}],"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":[g]}],"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":[gn,ue]}],"outline-w":[{outline:[gn,En]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[gn,En]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Cn,Kw]}],"shadow-color":[{shadow:[Fo]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Cn,ue]}],grayscale:[{grayscale:[l]}],"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":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["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:[ko,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:[gn,En,Li]}],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 Jw=Fw(Zw),Hc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},e1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),t1=e=>vn.function(e),ke=(...e)=>Jw(I0(e)),Vm=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Hs=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},ho=b.forwardRef(function({as:t,...n},r){const o=t||"span";return w.jsx(o,{...n,ref:r})}),n1=lo("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"}}),Hr=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...c},l){const u=r||c.disabled;return w.jsxs(ho,{...c,ref:l,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:c.as??"button",onClick:u?void 0:c.onClick,className:ke(n1({size:s,rounded:a,theme:o}),t),children:[n,c.children]})}),$m=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t};function r1(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const o1=({children:e,...t})=>{const n=$m(t.onIntersection),r=b.useRef(null),[o,i]=b.useState(()=>r.current===null?!1:r1(r.current));return b.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(c=>{var u;const l=c[0];return l.isIntersecting&&((u=n.current)==null||u.call(n)),i(f=>l.isIntersecting?!0:f)});return a.observe(s),()=>a.disconnect()},[]),w.jsx("div",{...t,ref:r,children:o?e:null})},i1=lo("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"}}}),s1=lo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),a1=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},c){return w.jsxs(ho,{...a,ref:c,"data-theme":i,as:a.as??"span",className:ke(s1({size:s,theme:i}),t),children:[n?w.jsx("span",{className:i1({theme:n})}):null,r,a.children]})}),zr=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),zs=b.createContext({}),Us=b.createContext(null),zc=typeof document<"u",Gs=zc?b.useLayoutEffect:b.useEffect,Bm=b.createContext({strict:!1}),Ys=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),l1="framerAppearId",Wm="data-"+Ys(l1),c1={skipAnimations:!1,useManualTiming:!1};function u1(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(l){i.has(l)&&(c.schedule(l),e()),l(s)}const c={schedule:(l,u=!1,f=!1)=>{const d=f&&r?t:n;return u&&i.add(l),d.has(l)||d.add(l),l},cancel:l=>{n.delete(l),i.delete(l)},process:l=>{if(s=l,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,c.process(l))}};return c}const _i=["read","resolveKeyframes","update","preRender","render","postRender"],f1=40;function Hm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=_i.reduce((g,x)=>(g[x]=u1(i),g),{}),{read:a,resolveKeyframes:c,update:l,preRender:u,render:f,postRender:h}=s,d=()=>{const g=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(g-o.timestamp,f1),1),o.timestamp=g,o.isProcessing=!0,a.process(o),c.process(o),l.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:_i.reduce((g,x)=>{const v=s[x];return g[x]=(S,T=!1,E=!1)=>(n||p(),v.schedule(S,T,E)),g},{}),cancel:g=>{for(let x=0;x<_i.length;x++)s[_i[x]].cancel(g)},state:o,steps:s}}const{schedule:Uc,cancel:PL}=Hm(queueMicrotask,!1);function Or(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const zm=b.createContext({});let Yf=!1;function d1(e,t,n,r,o){const{visualElement:i}=b.useContext(zs),s=b.useContext(Bm),a=b.useContext(Us),c=b.useContext(zr).reducedMotion,l=b.useRef();r=r||s.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,f=b.useContext(zm);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&p1(l.current,n,o,f),b.useInsertionEffect(()=>{u&&u.update(n,a)});const h=b.useRef(!!(n[Wm]&&!window.HandoffComplete));return Gs(()=>{u&&(u.updateFeatures(),Uc.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,Yf||(Yf=!0,queueMicrotask(h1))))}),u}function h1(){window.HandoffComplete=!0}function p1(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Um(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Or(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function Um(e){if(e)return e.options.allowProjection!==!1?e.projection:Um(e.parent)}function m1(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Or(n)&&(n.current=r))},[t])}function ni(e){return typeof e=="string"||Array.isArray(e)}function ri(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Gc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yc=["initial",...Gc];function Ks(e){return ri(e.animate)||Yc.some(t=>ni(e[t]))}function Gm(e){return!!(Ks(e)||e.variants)}function g1(e,t){if(Ks(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ni(n)?n:void 0,animate:ni(r)?r:void 0}}return e.inherit!==!1?t:{}}function y1(e){const{initial:t,animate:n}=g1(e,b.useContext(zs));return b.useMemo(()=>({initial:t,animate:n}),[Kf(t),Kf(n)])}function Kf(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"]},Ur={};for(const e in qf)Ur[e]={isEnabled:t=>qf[e].some(n=>!!t[n])};function v1(e){for(const t in e)Ur[t]={...Ur[t],...e[t]}}const oi=b.createContext({}),b1=Symbol.for("motionComponentSymbol"),yt=e=>e;let po=yt,Lt=yt;process.env.NODE_ENV!=="production"&&(po=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Lt=(e,t)=>{if(!e)throw new Error(t)});function x1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&v1(e);function i(a,c){let l;const u={...b.useContext(zr),...a,layoutId:w1(a)},{isStatic:f}=u,h=y1(a),d=r(a,f);if(!f&&zc){T1(u,e);const p=S1(u);l=p.MeasureLayout,h.visualElement=d1(o,d,u,t,p.ProjectionNode)}return w.jsxs(zs.Provider,{value:h,children:[l&&h.visualElement?w.jsx(l,{visualElement:h.visualElement,...u}):null,n(o,a,m1(d,h.visualElement,c),d,f,h.visualElement)]})}const s=b.forwardRef(i);return s[b1]=o,s}function w1({layoutId:e}){const t=b.useContext(oi).id;return t&&e!==void 0?t+"-"+e:e}function T1(e,t){const n=b.useContext(Bm).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?po(!1,r):Lt(!1,r)}}function S1(e){const{drag:t,layout:n}=Ur;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 E1(e){function t(r,o={}){return x1(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const C1=["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 Kc(e){return typeof e!="string"||e.includes("-")?!1:!!(C1.indexOf(e)>-1||/[A-Z]/u.test(e))}const ps={};function P1(e){Object.assign(ps,e)}const xi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hn=new Set(xi);function Ym(e,{layout:t,layoutId:n}){return Hn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ps[e]||e==="opacity")}const lt=e=>!!(e&&e.getVelocity),R1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},I1=xi.length;function A1(e,t,n){let r="";for(let o=0;o<I1;o++){const i=xi[o];if(e[i]!==void 0){const s=R1[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Km=e=>t=>typeof t=="string"&&t.startsWith(e),qm=Km("--"),O1=Km("var(--"),qc=e=>O1(e)?D1.test(e.split("/*")[0].trim()):!1,D1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,M1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Nn=(e,t,n)=>n>t?t:n<e?e:n,mo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},zo={...mo,transform:e=>Nn(0,1,e)},Vi={...mo,default:1},Uo=e=>Math.round(e*1e5)/1e5,Xc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,k1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,F1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function wi(e){return typeof e=="string"}function j1(e){return e==null}const Ti=e=>({test:t=>wi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Rn=Ti("deg"),sn=Ti("%"),ae=Ti("px"),N1=Ti("vh"),L1=Ti("vw"),Xf={...sn,parse:e=>sn.parse(e)/100,transform:e=>sn.transform(e*100)},Qf={...mo,transform:Math.round},Xm={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:Rn,rotateX:Rn,rotateY:Rn,rotateZ:Rn,scale:Vi,scaleX:Vi,scaleY:Vi,scaleZ:Vi,skew:Rn,skewX:Rn,skewY:Rn,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:zo,originX:Xf,originY:Xf,originZ:ae,zIndex:Qf,backgroundPositionX:ae,backgroundPositionY:ae,fillOpacity:zo,strokeOpacity:zo,numOctaves:Qf};function Qc(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,c=!1,l=!0;for(const u in t){const f=t[u];if(qm(u)){o[u]=f;continue}const h=Xm[u],d=M1(f,h);if(Hn.has(u)){if(a=!0,i[u]=d,!l)continue;f!==(h.default||0)&&(l=!1)}else u.startsWith("origin")?(c=!0,s[u]=d):r[u]=d}if(t.transform||(a||n?r.transform=A1(e.transform,l,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:f="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${f} ${h}`}}const Zc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qm(e,t,n){for(const r in t)!lt(t[r])&&!Ym(r,n)&&(e[r]=t[r])}function _1({transformTemplate:e},t){return b.useMemo(()=>{const n=Zc();return Qc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function V1(e,t){const n=e.style||{},r={};return Qm(r,n,e),Object.assign(r,_1(e,t)),r}function $1(e,t){const n={},r=V1(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 B1=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 ms(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||B1.has(e)}let Zm=e=>!ms(e);function Jm(e){e&&(Zm=t=>t.startsWith("on")?!ms(t):e(t))}try{Jm(require("@emotion/is-prop-valid").default)}catch{}function W1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Zm(o)||n===!0&&ms(o)||!t&&!ms(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Zf(e,t,n){return typeof e=="string"?e:ae.transform(t+n*e)}function H1(e,t,n){const r=Zf(t,e.x,e.width),o=Zf(n,e.y,e.height);return`${r} ${o}`}const z1={offset:"stroke-dashoffset",array:"stroke-dasharray"},U1={offset:"strokeDashoffset",array:"strokeDasharray"};function G1(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?z1:U1;e[i.offset]=ae.transform(-r);const s=ae.transform(t),a=ae.transform(n);e[i.array]=`${s} ${a}`}function Jc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...l},u,f){if(Qc(e,l,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||i!==void 0||d.transform)&&(d.transformOrigin=H1(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&G1(h,s,a,c,!1)}const eg=()=>({...Zc(),attrs:{}}),eu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Y1(e,t,n,r){const o=b.useMemo(()=>{const i=eg();return Jc(i,t,eu(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Qm(i,e.style,e),o.style={...i,...o.style}}return o}function K1(e=!1){return(n,r,o,{latestValues:i},s)=>{const c=(Kc(n)?Y1:$1)(r,i,s,n),l=W1(r,typeof n=="string",e),u=n!==b.Fragment?{...l,...c,ref:o}:{},{children:f}=r,h=b.useMemo(()=>lt(f)?f.get():f,[f]);return b.createElement(n,{...u,children:h})}}function tg(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const ng=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 rg(e,t,n,r){tg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ng.has(o)?o:Ys(o),t.attrs[o])}function tu(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(lt(o[s])||t.style&<(t.style[s])||Ym(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function og(e,t,n){const r=tu(e,t,n);for(const o in e)if(lt(e[o])||lt(t[o])){const i=xi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function Jf(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function nu(e,t,n,r){if(typeof t=="function"){const[o,i]=Jf(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Jf(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function cn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ll=e=>Array.isArray(e),q1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),X1=e=>Ll(e)?e[e.length-1]||0:e;function es(e){const t=lt(e)?e.get():e;return q1(t)?t.toValue():t}const ig=new Set(["opacity","clipPath","filter","transform"]);function sg(e){if(Hn.has(e))return"transform";if(ig.has(e))return Ys(e)}function qs(e,t){e.indexOf(t)===-1&&e.push(t)}function Si(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function Q1([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}function Z1({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const c={latestValues:eT(o,i,s,a?!1:e,t),renderState:n()};return r&&(c.mount=l=>r(o,l,c)),c}const ag=e=>(t,n)=>{const r=b.useContext(zs),o=b.useContext(Us),i=()=>Z1(e,t,r,o,n);return n?i():cn(i)};function J1(e,t){const n=sg(t);n&&qs(e,n)}function ed(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=nu(e,r[o]);if(i){const{transitionEnd:s,transition:a,...c}=i;n(c,s)}}}function eT(e,t,n,r,o){var i;const s={},a=[],c=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,l=o(e,{});for(const y in l)s[y]=es(l[y]);let{initial:u,animate:f}=e;const h=Ks(e),d=Gm(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"&&!ri(m)&&ed(e,m,(y,g)=>{for(const x in y){let v=y[x];if(Array.isArray(v)){const S=p?v.length-1:0;v=v[S]}v!==null&&(s[x]=v)}for(const x in g)s[x]=g[x]}),c&&(f&&u!==!1&&!ri(f)&&ed(e,f,y=>{for(const g in y)J1(a,g)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Te,cancel:un,state:pt,steps:Ma}=Hm(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),tT={useVisualState:ag({scrapeMotionValuesFromProps:og,createRenderState:eg,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(()=>{Jc(n,r,eu(t.tagName),e.transformTemplate),rg(t,n)})}})},nT={useVisualState:ag({applyWillChange:!0,scrapeMotionValuesFromProps:tu,createRenderState:Zc})};function rT(e,{forwardMotionProps:t=!1},n,r){return{...Kc(e)?tT:nT,preloadedFeatures:n,useRender:K1(t),createVisualElement:r,Component:e}}function yn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const lg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Xs(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const oT=e=>t=>lg(t)&&e(t,Xs(t));function bn(e,t,n,r){return yn(e,t,oT(n),r)}const iT=(e,t)=>n=>t(e(n)),xn=(...e)=>e.reduce(iT);function cg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const td=cg("dragHorizontal"),nd=cg("dragVertical");function ug(e){let t=!1;if(e==="y")t=nd();else if(e==="x")t=td();else{const n=td(),r=nd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function fg(){const e=ug(!0);return e?(e(),!1):!0}class zn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function rd(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||fg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const c=a[r];c&&Te.postRender(()=>c(i,s))};return bn(e.current,n,o,{passive:!e.getProps()[r]})}class sT extends zn{mount(){this.unmount=xn(rd(this.node,!0),rd(this.node,!1))}unmount(){}}class aT extends zn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xn(yn(this.node.current,"focus",()=>this.onFocus()),yn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dg=(e,t)=>t?e===t?!0:dg(e,t.parentElement):!1;function ka(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Xs(n))}class lT extends zn{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(),i=bn(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),h=!f&&!dg(this.node.current,a.target)?u:l;h&&Te.update(()=>h(a,c))},{passive:!(r.onTap||r.onPointerUp)}),s=bn(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=xn(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||ka("up",(c,l)=>{const{onTap:u}=this.node.getProps();u&&Te.postRender(()=>u(c,l))})};this.removeEndListeners(),this.removeEndListeners=yn(this.node.current,"keyup",s),ka("down",(a,c)=>{this.startPress(a,c)})},n=yn(this.node.current,"keydown",t),r=()=>{this.isPressing&&ka("cancel",(i,s)=>this.cancelPress(i,s))},o=yn(this.node.current,"blur",r);this.removeAccessibleListeners=xn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Te.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!fg()}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=bn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=yn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _l=new WeakMap,Fa=new WeakMap,cT=e=>{const t=_l.get(e.target);t&&t(e)},uT=e=>{e.forEach(cT)};function fT({root:e,...t}){const n=e||document;Fa.has(n)||Fa.set(n,{});const r=Fa.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(uT,{root:e,...t})),r[o]}function dT(e,t,n){const r=fT(t);return _l.set(e,n),r.observe(e),()=>{_l.delete(e),r.unobserve(e)}}const hT={some:0,all:1};class pT extends zn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:hT[o]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=l?u:f;h&&h(c)};return dT(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(mT(t,n))&&this.startObserver()}unmount(){}}function mT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gT={inView:{Feature:pT},tap:{Feature:lT},focus:{Feature:aT},hover:{Feature:sT}};function hg(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 Qs(e,t,n){const r=e.getProps();return nu(r,t,n!==void 0?n:r.custom,e)}const an=e=>e*1e3,ln=e=>e/1e3,yT={type:"spring",stiffness:500,damping:25,restSpeed:10},vT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bT={type:"keyframes",duration:.8},xT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wT=(e,{keyframes:t})=>t.length>2?bT:Hn.has(e)?e.startsWith("scale")?vT(t[1]):yT:xT;function TT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function ru(e,t){return e[t]||e.default||e}const ST=e=>e!==null;function Zs(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ST),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let ts;function ET(){ts=void 0}const kn={now:()=>(ts===void 0&&kn.set(pt.isProcessing||c1.useManualTiming?pt.timestamp:performance.now()),ts),set:e=>{ts=e,queueMicrotask(ET)}},pg=e=>/^0[^.\s]+$/u.test(e);function CT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||pg(e):!0}const mg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),PT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RT(e){const t=PT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const IT=4;function gg(e,t,n=1){Lt(n<=IT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=RT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return mg(s)?parseFloat(s):s}return qc(o)?gg(o,t,n+1):o}const AT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),od=e=>e===mo||e===ae,id=(e,t)=>parseFloat(e.split(", ")[t]),sd=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return id(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?id(i[1],e):0}},OT=new Set(["x","y","z"]),DT=xi.filter(e=>!OT.has(e));function MT(e){const t=[];return DT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Gr={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:sd(4,13),y:sd(5,14)};Gr.translateX=Gr.x;Gr.translateY=Gr.y;const yg=e=>t=>t.test(e),kT={test:e=>e==="auto",parse:e=>e},vg=[mo,ae,sn,Rn,L1,N1,kT],ad=e=>vg.find(yg(e)),dr=new Set;let Vl=!1,$l=!1;function bg(){if($l){const e=Array.from(dr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=MT(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}$l=!1,Vl=!1,dr.forEach(e=>e.complete()),dr.clear()}function xg(){dr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($l=!0)})}function FT(){xg(),bg()}class ou{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(dr.add(this),Vl||(Vl=!0,Te.read(xg),Te.resolveKeyframes(bg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),dr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,dr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const iu=(e,t)=>n=>!!(wi(n)&&F1.test(n)&&n.startsWith(e)||t&&!j1(n)&&Object.prototype.hasOwnProperty.call(n,t)),wg=(e,t,n)=>r=>{if(!wi(r))return r;const[o,i,s,a]=r.match(Xc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},jT=e=>Nn(0,255,e),ja={...mo,transform:e=>Math.round(jT(e))},lr={test:iu("rgb","red"),parse:wg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ja.transform(e)+", "+ja.transform(t)+", "+ja.transform(n)+", "+Uo(zo.transform(r))+")"};function NT(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Bl={test:iu("#"),parse:NT,transform:lr.transform},Dr={test:iu("hsl","hue"),parse:wg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+sn.transform(Uo(t))+", "+sn.transform(Uo(n))+", "+Uo(zo.transform(r))+")"},bt={test:e=>lr.test(e)||Bl.test(e)||Dr.test(e),parse:e=>lr.test(e)?lr.parse(e):Dr.test(e)?Dr.parse(e):Bl.parse(e),transform:e=>wi(e)?e:e.hasOwnProperty("red")?lr.transform(e):Dr.transform(e)};function LT(e){var t,n;return isNaN(e)&&wi(e)&&(((t=e.match(Xc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(k1))===null||n===void 0?void 0:n.length)||0)>0}const Tg="number",Sg="color",_T="var",VT="var(",ld="${}",$T=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ii(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace($T,c=>(bt.test(c)?(r.color.push(i),o.push(Sg),n.push(bt.parse(c))):c.startsWith(VT)?(r.var.push(i),o.push(_T),n.push(c)):(r.number.push(i),o.push(Tg),n.push(parseFloat(c))),++i,ld)).split(ld);return{values:n,split:a,indexes:r,types:o}}function Eg(e){return ii(e).values}function Cg(e){const{split:t,types:n}=ii(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Tg?i+=Uo(o[s]):a===Sg?i+=bt.transform(o[s]):i+=o[s]}return i}}const BT=e=>typeof e=="number"?0:e;function WT(e){const t=Eg(e);return Cg(e)(t.map(BT))}const Ln={test:LT,parse:Eg,createTransformer:Cg,getAnimatableNone:WT},HT=new Set(["brightness","contrast","saturate","opacity"]);function zT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Xc)||[];if(!r)return e;const o=n.replace(r,"");let i=HT.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const UT=/\b([a-z-]*)\(.*?\)/gu,Wl={...Ln,getAnimatableNone:e=>{const t=e.match(UT);return t?t.map(zT).join(" "):e}},GT={...Xm,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Wl,WebkitFilter:Wl},su=e=>GT[e];function Pg(e,t){let n=su(e);return n!==Wl&&(n=Ln),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const YT=new Set(["auto","none","0"]);function KT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!YT.has(i)&&ii(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Pg(n,o)}class Rg extends ou{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 c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),qc(l))){const u=gg(l,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!AT.has(r)||t.length!==2)return;const[o,i]=t,s=ad(o),a=ad(i);if(s!==a)if(od(s)&&od(a))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)CT(t[o])&&r.push(o);r.length&&KT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gr[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 i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=Gr[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(([c,l])=>{n.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function Ig(e){let t;return()=>(t===void 0&&(t=e()),t)}const cd=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ln.test(e)||e==="0")&&!e.startsWith("url("));function qT(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function XT(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=cd(o,t),a=cd(i,t);return po(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:qT(e)||n==="spring"&&r}class Ag{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&FT(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:c,isGenerator:l}=this.options;if(!l&&!XT(t,r,o,i))if(s)this.options.duration=0;else{c==null||c(Zs(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 Og(e,t){return t?e*(1e3/t):0}const QT=5;function Dg(e,t,n){const r=Math.max(t-QT,0);return Og(n-e(r),t-r)}const Na=.001,ZT=.01,ud=10,JT=.05,eS=1;function tS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;po(e<=an(ud),"Spring duration must be 10 seconds or less");let s=1-t;s=Nn(JT,eS,s),e=Nn(ZT,ud,ln(e)),s<1?(o=l=>{const u=l*s,f=u*e,h=u-n,d=Hl(l,s),p=Math.exp(-f);return Na-h/d*p},i=l=>{const f=l*s*e,h=f*n+n,d=Math.pow(s,2)*Math.pow(l,2)*e,p=Math.exp(-f),m=Hl(Math.pow(l,2),s);return(-o(l)+Na>0?-1:1)*((h-d)*p)/m}):(o=l=>{const u=Math.exp(-l*e),f=(l-n)*e+1;return-Na+u*f},i=l=>{const u=Math.exp(-l*e),f=(n-l)*(e*e);return u*f});const a=5/e,c=rS(o,i,a);if(e=an(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:e}}}const nS=12;function rS(e,t,n){let r=n;for(let o=1;o<nS;o++)r=r-e(r)/t(r);return r}function Hl(e,t){return e*Math.sqrt(1-t*t)}const oS=["duration","bounce"],iS=["stiffness","damping","mass"];function fd(e,t){return t.some(n=>e[n]!==void 0)}function sS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!fd(e,iS)&&fd(e,oS)){const n=tS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function au({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:c,mass:l,duration:u,velocity:f,isResolvedFromDuration:h}=sS({...r,velocity:-ln(r.velocity||0)}),d=f||0,p=c/(2*Math.sqrt(a*l)),m=i-o,y=ln(Math.sqrt(a/l)),g=Math.abs(m)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let x;if(p<1){const v=Hl(y,p);x=S=>{const T=Math.exp(-p*y*S);return i-T*((d+p*y*m)/v*Math.sin(v*S)+m*Math.cos(v*S))}}else if(p===1)x=v=>i-Math.exp(-y*v)*(m+(d+y*m)*v);else{const v=y*Math.sqrt(p*p-1);x=S=>{const T=Math.exp(-p*y*S),E=Math.min(v*S,300);return i-T*((d+p*y*m)*Math.sinh(E)+v*m*Math.cosh(E))/v}}return{calculatedDuration:h&&u||null,next:v=>{const S=x(v);if(h)s.done=v>=u;else{let T=d;v!==0&&(p<1?T=Dg(x,v,S):T=0);const E=Math.abs(T)<=n,A=Math.abs(i-S)<=t;s.done=E&&A}return s.value=s.done?i:S,s}}}function dd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},d=I=>a!==void 0&&I<a||c!==void 0&&I>c,p=I=>a===void 0?c:c===void 0||Math.abs(a-I)<Math.abs(c-I)?a:c;let m=n*t;const y=f+m,g=s===void 0?y:s(y);g!==y&&(m=g-f);const x=I=>-m*Math.exp(-I/r),v=I=>g+x(I),S=I=>{const O=x(I),R=v(I);h.done=Math.abs(O)<=l,h.value=h.done?g:R};let T,E;const A=I=>{d(h.value)&&(T=I,E=au({keyframes:[h.value,p(h.value)],velocity:Dg(v,I,h.value),damping:o,stiffness:i,restDelta:l,restSpeed:u}))};return A(0),{calculatedDuration:null,next:I=>{let O=!1;return!E&&T===void 0&&(O=!0,S(I),A(I)),T!==void 0&&I>=T?E.next(I-T):(!O&&S(I),h)}}}const Mg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,aS=1e-7,lS=12;function cS(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Mg(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>aS&&++a<lS);return s}function Ei(e,t,n,r){if(e===t&&n===r)return yt;const o=i=>cS(i,0,1,e,n);return i=>i===0||i===1?i:Mg(o(i),t,r)}const uS=Ei(.42,0,1,1),fS=Ei(0,0,.58,1),kg=Ei(.42,0,.58,1),Fg=e=>Array.isArray(e)&&typeof e[0]!="number",jg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ng=e=>t=>1-e(1-t),lu=e=>1-Math.sin(Math.acos(e)),Lg=Ng(lu),dS=jg(lu),_g=Ei(.33,1.53,.69,.99),cu=Ng(_g),hS=jg(cu),pS=e=>(e*=2)<1?.5*cu(e):.5*(2-Math.pow(2,-10*(e-1))),hd={linear:yt,easeIn:uS,easeInOut:kg,easeOut:fS,circIn:lu,circInOut:dS,circOut:Lg,backIn:cu,backInOut:hS,backOut:_g,anticipate:pS},zl=e=>{if(Array.isArray(e)){Lt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Ei(t,n,r,o)}else if(typeof e=="string")return Lt(hd[e]!==void 0,`Invalid easing type '${e}'`),hd[e];return e},Yr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ve=(e,t,n)=>e+(t-e)*n;function La(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 mS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;o=La(c,a,e+1/3),i=La(c,a,e),s=La(c,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function gs(e,t){return n=>n>0?t:e}const _a=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},gS=[Bl,lr,Dr],yS=e=>gS.find(t=>t.test(e));function pd(e){const t=yS(e);if(po(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Dr&&(n=mS(n)),n}const md=(e,t)=>{const n=pd(e),r=pd(t);if(!n||!r)return gs(e,t);const o={...n};return i=>(o.red=_a(n.red,r.red,i),o.green=_a(n.green,r.green,i),o.blue=_a(n.blue,r.blue,i),o.alpha=Ve(n.alpha,r.alpha,i),lr.transform(o))},Ul=new Set(["none","hidden"]);function vS(e,t){return Ul.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function bS(e,t){return n=>Ve(e,t,n)}function uu(e){return typeof e=="number"?bS:typeof e=="string"?qc(e)?gs:bt.test(e)?md:TS:Array.isArray(e)?Vg:typeof e=="object"?bt.test(e)?md:xS:gs}function Vg(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>uu(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function xS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=uu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function wS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],c=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=c,o[s]++}return r}const TS=(e,t)=>{const n=Ln.createTransformer(t),r=ii(e),o=ii(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?Ul.has(e)&&!o.values.length||Ul.has(t)&&!r.values.length?vS(e,t):xn(Vg(wS(r,o),o.values),n):(po(!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.`),gs(e,t))};function $g(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):uu(e)(e,t)}function SS(e,t,n){const r=[],o=n||$g,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||yt:t;a=xn(c,a)}r.push(a)}return r}function Bg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Lt(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=SS(t,r,o),a=s.length,c=l=>{let u=0;if(a>1)for(;u<e.length-2&&!(l<e[u+1]);u++);const f=Yr(e[u],e[u+1],l);return s[u](f)};return n?l=>c(Nn(e[0],e[i-1],l)):c}function Wg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Yr(0,t,r);e.push(Ve(n,1,o))}}function Hg(e){const t=[0];return Wg(t,e.length-1),t}function ES(e,t){return e.map(n=>n*t)}function CS(e,t){return e.map(()=>t||kg).splice(0,e.length-1)}function ys({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Fg(r)?r.map(zl):zl(r),i={done:!1,value:t[0]},s=ES(n&&n.length===t.length?n:Hg(t),e),a=Bg(s,t,{ease:Array.isArray(o)?o:CS(t,o)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const Gl=2e4;function zg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Gl;)t+=n,r=e.next(t);return t>=Gl?1/0:t}const PS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Te.update(t,!0),stop:()=>un(t),now:()=>pt.isProcessing?pt.timestamp:kn.now()}},RS={decay:dd,inertia:dd,tween:ys,keyframes:ys,spring:au},IS=e=>e/100;class fu extends Ag{constructor({KeyframeResolver:t=ou,...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:i}=this.options,s=(a,c)=>this.onKeyframesResolved(a,c);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new t(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=RS[n]||ys;let c,l;a!==ys&&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}`),c=xn(IS,$g(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(l=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=zg(u));const{calculatedDuration:f}=u,h=f+o,d=h*(r+1)-o;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:c,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:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:c,calculatedDuration:l,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:y}=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 g=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let v=this.currentTime,S=i;if(d){const I=Math.min(this.currentTime,u)/f;let O=Math.floor(I),R=I%1;!R&&I>=1&&(R=1),R===1&&O--,O=Math.min(O,d+1),!!(O%2)&&(p==="reverse"?(R=1-R,m&&(R-=m/f)):p==="mirror"&&(S=s)),v=Nn(0,1,R)*f}const T=x?{done:!1,value:c[0]}:S.next(v);a&&(T.value=a(T.value));let{done:E}=T;!x&&l!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return A&&o!==void 0&&(T.value=Zs(c,this.options,o)),y&&y(T.value),A&&this.finish(),T}get duration(){const{resolved:t}=this;return t?ln(t.calculatedDuration):0}get time(){return ln(this.currentTime)}set time(t){t=an(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=ln(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=PS,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 Ug=e=>Array.isArray(e)&&typeof e[0]=="number";function Gg(e){return!!(!e||typeof e=="string"&&e in du||Ug(e)||Array.isArray(e)&&e.every(Gg))}const Vo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,du={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vo([0,.65,.55,1]),circOut:Vo([.55,0,1,.45]),backIn:Vo([.31,.01,.66,-.59]),backOut:Vo([.33,1.53,.69,.99])};function AS(e){return Yg(e)||du.easeOut}function Yg(e){if(e)return Ug(e)?Vo(e):Array.isArray(e)?e.map(AS):du[e]}function OS(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:c}={}){const l={[t]:n};c&&(l.offset=c);const u=Yg(a);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const DS=Ig(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),vs=10,MS=2e4;function kS(e){return e.type==="spring"||!Gg(e.ease)}function FS(e,t){const n=new fu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<MS;)r=n.sample(i),o.push(r.value),i+=vs;return{times:void 0,keyframes:o,duration:i-vs,ease:"linear"}}class gd extends Ag{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new Rg(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:c,name:l}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(kS(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,...p}=this.options,m=FS(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=OS(c.owner.current,l,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=kn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;c.set(Zs(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ln(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ln(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=an(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:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:u,onComplete:f,...h}=this.options,d=new fu({...h,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=an(this.time);l.setWithVelocity(d.sample(p-vs).value,d.sample(p).value,vs)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return DS()&&r&&ig.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function jS(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Te.update(r,!0),()=>un(r)}const NS=Ig(()=>window.ScrollTimeline!==void 0);class hu{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(NS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),jS(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 pu=(e,t,n,r={},o,i,s)=>a=>{const c=ru(r,e)||{},l=c.delay||r.delay||0;let{elapsed:u=0}=r;u=u-an(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-u,onUpdate:d=>{t.set(d),c.onUpdate&&c.onUpdate(d)},onComplete:()=>{a(),c.onComplete&&c.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};TT(c)||(f={...f,...wT(e,f)}),f.duration&&(f.duration=an(f.duration)),f.repeatDelay&&(f.repeatDelay=an(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&&!i&&t.get()!==void 0){const d=Zs(f.keyframes,c);if(d!==void 0)return Te.update(()=>{f.onUpdate(d),f.onComplete()}),new hu([])}return!i&&gd.supports(f)?new gd(f):new fu(f)};class mu{constructor(){this.subscriptions=[]}add(t){return qs(this.subscriptions,t),()=>Si(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const yd=new Set;function gu(e,t,n){e||yd.has(t)||(console.warn(t),yd.add(t))}const vd=30,LS=e=>!isNaN(parseFloat(e)),Go={current:void 0};class Kg{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=kn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=LS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gu(!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 mu);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 Go.current&&Go.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vd);return Og(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 Kr(e,t){return new Kg(e,t)}function _S(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Kr(n))}function VS(e,t){const n=Qs(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=X1(i[s]);_S(e,s,a)}}function qg(e){return e.getProps()[Wm]}class $S extends Kg{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=sg(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 i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(Si(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function BS(e){return!!(lt(e)&&e.add)}function Yl(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 $S("auto"),e.addValue("willChange",r)),BS(r))return r.add(t)}function WS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function yu(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(s=r);const l=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in c){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),d=c[f];if(d===void 0||u&&WS(u,f))continue;const p={delay:n,elapsed:0,...ru(s||{},f)};let m=!1;if(window.HandoffAppearAnimations){const g=qg(e);if(g){const x=window.HandoffAppearAnimations(g,f,h,Te);x!==null&&(p.elapsed=x,m=!0)}}h.start(pu(f,h,d,e.shouldReduceMotion&&Hn.has(f)?{type:!1}:p,e,m,Yl(e,f)));const y=h.animation;y&&l.push(y)}return a&&Promise.all(l).then(()=>{Te.update(()=>{a&&VS(e,a)})}),l}function Kl(e,t,n={}){var r;const o=Qs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(yu(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=i;return HS(e,t,u+l,f,h,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[l,u]=c==="beforeChildren"?[s,a]:[a,s];return l().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function HS(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,c=o===1?(l=0)=>l*r:(l=0)=>a-l*r;return Array.from(e.variantChildren).sort(zS).forEach((l,u)=>{l.notify("AnimationStart",t),s.push(Kl(l,t,{...i,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(s)}function zS(e,t){return e.sortNodePosition(t)}function US(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Kl(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Kl(e,t,n);else{const o=typeof t=="function"?Qs(e,t,n.custom):t;r=Promise.all(yu(e,o,n))}return r.then(()=>{Te.postRender(()=>{e.notify("AnimationComplete",t)})})}const GS=[...Gc].reverse(),YS=Gc.length;function KS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>US(e,n,r)))}function qS(e){let t=KS(e),n=bd(),r=!0;const o=c=>(l,u)=>{var f;const h=Qs(e,u,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...m}=h;l={...l,...m,...p}}return l};function i(c){t=c(e)}function s(c){const l=e.getProps(),u=e.getVariantContext(!0)||{},f=[],h=new Set;let d={},p=1/0;for(let y=0;y<YS;y++){const g=GS[y],x=n[g],v=l[g]!==void 0?l[g]:u[g],S=ni(v),T=g===c?x.isActive:null;T===!1&&(p=y);let E=v===u[g]&&v!==l[g]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...d},!x.isActive&&T===null||!v&&!x.prevProp||ri(v)||typeof v=="boolean")continue;let I=XS(x.prevProp,v)||g===c&&x.isActive&&!E&&S||y>p&&S,O=!1;const R=Array.isArray(v)?v:[v];let j=R.reduce(o(g),{});T===!1&&(j={});const{prevResolvedValues:k={}}=x,L={...k,...j},P=M=>{I=!0,h.has(M)&&(O=!0,h.delete(M)),x.needsAnimating[M]=!0;const F=e.getValue(M);F&&(F.liveStyle=!1)};for(const M in L){const F=j[M],_=k[M];if(d.hasOwnProperty(M))continue;let W=!1;Ll(F)&&Ll(_)?W=!hg(F,_):W=F!==_,W?F!=null?P(M):h.add(M):F!==void 0&&h.has(M)?P(M):x.protectedKeys[M]=!0}x.prevProp=v,x.prevResolvedValues=j,x.isActive&&(d={...d,...j}),r&&e.blockInitialAnimation&&(I=!1),I&&(!E||O)&&f.push(...R.map(M=>({animation:M,options:{type:g}})))}if(h.size){const y={};h.forEach(g=>{const x=e.getBaseTarget(g),v=e.getValue(g);v&&(v.liveStyle=!0),y[g]=x??null}),f.push({animation:y})}let m=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function a(c,l){var u;if(n[c].isActive===l)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(c,l)}),n[c].isActive=l;const f=s(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=bd(),r=!0}}}function XS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hg(t,e):!1}function Zn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bd(){return{animate:Zn(!0),whileInView:Zn(),whileHover:Zn(),whileTap:Zn(),whileDrag:Zn(),whileFocus:Zn(),exit:Zn()}}class QS extends zn{constructor(t){super(t),t.animationState||(t.animationState=qS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ri(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 ZS=0;class JS extends zn{constructor(){super(...arguments),this.id=ZS++}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 eE={animation:{Feature:QS},exit:{Feature:JS}},xd=(e,t)=>Math.abs(e-t);function tE(e,t){const n=xd(e.x,t.x),r=xd(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xg{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=$a(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=tE(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:y,onMove:g}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Va(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 y=$a(f.type==="pointercancel"?this.lastMoveEventInfo:Va(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,y),p&&p(f,y)},!lg(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Xs(t),a=Va(s,this.transformPagePoint),{point:c}=a,{timestamp:l}=pt;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,$a(a,this.history)),this.removeListeners=xn(bn(this.contextWindow,"pointermove",this.handlePointerMove),bn(this.contextWindow,"pointerup",this.handlePointerUp),bn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),un(this.updatePoint)}}function Va(e,t){return t?{point:t(e.point)}:e}function wd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $a({point:e},t){return{point:e,delta:wd(e,Qg(t)),offset:wd(e,nE(t)),velocity:rE(t,.1)}}function nE(e){return e[0]}function Qg(e){return e[e.length-1]}function rE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Qg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>an(t)));)n--;if(!r)return{x:0,y:0};const i=ln(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const Zg=1e-4,oE=1-Zg,iE=1+Zg,Jg=.01,sE=0-Jg,aE=0+Jg;function _t(e){return e.max-e.min}function lE(e,t,n){return Math.abs(e-t)<=n}function Td(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>=oE&&e.scale<=iE||isNaN(e.scale))&&(e.scale=1),(e.translate>=sE&&e.translate<=aE||isNaN(e.translate))&&(e.translate=0)}function Yo(e,t,n,r){Td(e.x,t.x,n.x,r?r.originX:void 0),Td(e.y,t.y,n.y,r?r.originY:void 0)}function Sd(e,t,n){e.min=n.min+t.min,e.max=e.min+_t(t)}function cE(e,t,n){Sd(e.x,t.x,n.x),Sd(e.y,t.y,n.y)}function Ed(e,t,n){e.min=t.min-n.min,e.max=e.min+_t(t)}function Ko(e,t,n){Ed(e.x,t.x,n.x),Ed(e.y,t.y,n.y)}function uE(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 Cd(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 fE(e,{top:t,left:n,bottom:r,right:o}){return{x:Cd(e.x,n,o),y:Cd(e.y,t,r)}}function Pd(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 dE(e,t){return{x:Pd(e.x,t.x),y:Pd(e.y,t.y)}}function hE(e,t){let n=.5;const r=_t(e),o=_t(t);return o>r?n=Yr(t.min,t.max-r,e.min):r>o&&(n=Yr(e.min,e.max-o,t.min)),Nn(0,1,n)}function pE(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 ql=.35;function mE(e=ql){return e===!1?e=0:e===!0&&(e=ql),{x:Rd(e,"left","right"),y:Rd(e,"top","bottom")}}function Rd(e,t,n){return{min:Id(e,t),max:Id(e,n)}}function Id(e,t){return typeof e=="number"?e:e[t]||0}const Ad=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mr=()=>({x:Ad(),y:Ad()}),Od=()=>({min:0,max:0}),Je=()=>({x:Od(),y:Od()});function Bt(e){return[e("x"),e("y")]}function ey({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yE(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 Ba(e){return e===void 0||e===1}function Xl({scale:e,scaleX:t,scaleY:n}){return!Ba(e)||!Ba(t)||!Ba(n)}function er(e){return Xl(e)||ty(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ty(e){return Dd(e.x)||Dd(e.y)}function Dd(e){return e&&e!=="0%"}function bs(e,t,n){const r=e-n,o=t*r;return n+o}function Md(e,t,n,r,o){return o!==void 0&&(e=bs(e,o,r)),bs(e,n,r)+t}function Ql(e,t=0,n=1,r,o){e.min=Md(e.min,t,n,r,o),e.max=Md(e.max,t,n,r,o)}function ny(e,{x:t,y:n}){Ql(e.x,t.translate,t.scale,t.originPoint),Ql(e.y,n.translate,n.scale,n.originPoint)}const kd=.999999999999,Fd=1.0000000000001;function vE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&kr(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,ny(e,s)),r&&er(i.latestValues)&&kr(e,i.latestValues))}t.x<Fd&&t.x>kd&&(t.x=1),t.y<Fd&&t.y>kd&&(t.y=1)}function An(e,t){e.min=e.min+t,e.max=e.max+t}function jd(e,t,n,r,o=.5){const i=Ve(e.min,e.max,o);Ql(e,t,n,i,r)}function kr(e,t){jd(e.x,t.x,t.scaleX,t.scale,t.originX),jd(e.y,t.y,t.scaleY,t.scale,t.originY)}function ry(e,t){return ey(yE(e.getBoundingClientRect(),t))}function bE(e,t,n){const r=ry(e,n),{scroll:o}=t;return o&&(An(r.x,o.offset.x),An(r.y,o.offset.y)),r}const oy=({current:e})=>e?e.ownerDocument.defaultView:null,xE=new WeakMap;class wE{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=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(Xs(u,"page").point)},i=(u,f)=>{var h;const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ug(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),Bt(g=>{let x=this.getAxisMotionValue(g).get()||0;if(sn.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[g];S&&(x=_t(S)*(parseFloat(x)/100))}}this.originPoint[g]=x}),m&&Te.postRender(()=>m(u,f)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=Yl(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},s=(u,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:y}=f;if(d&&this.currentDirection===null){this.currentDirection=TE(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),c=()=>Bt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Xg(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:oy(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:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Te.postRender(()=>s(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||!$i(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=uE(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Or(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=fE(o.layoutBox,n):this.constraints=!1,this.elastic=mE(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Bt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=pE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Or(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 i=bE(r,o.root,this.visualElement.getTransformPagePoint());let s=dE(o.layout.layoutBox,i);if(n){const a=n(gE(s));this.hasMutatedConstraints=!!a,a&&(s=ey(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Bt(u=>{if(!$i(u,n,this.currentDirection))return;let f=c&&c[u]||{};s&&(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,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(pu(t,r,0,n,this.visualElement,!1,Yl(this.visualElement,t)))}stopAnimation(){Bt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Bt(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){Bt(n=>{const{drag:r}=this.getProps();if(!$i(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ve(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Or(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();o[s]=hE({min:c,max:c},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Bt(s=>{if(!$i(s,t,null))return;const a=this.getAxisMotionValue(s),{min:c,max:l}=this.constraints[s];a.set(Ve(c,l,o[s]))})}addListeners(){if(!this.visualElement.current)return;xE.set(this.visualElement,this);const t=this.visualElement.current,n=bn(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Or(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Te.read(r);const s=yn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(Bt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=ql,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function $i(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function TE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class SE extends zn{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new wE(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 Nd=e=>(t,n)=>{e&&Te.postRender(()=>e(t,n))};class EE extends zn{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new Xg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:oy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Nd(t),onStart:Nd(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Te.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=bn(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 CE(){const e=b.useContext(Us);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ld(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const jo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=Ld(e,t.target.x),r=Ld(e,t.target.y);return`${n}% ${r}%`}},PE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ln.parse(e);if(o.length>5)return r;const i=Ln.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=c;const l=Ve(a,c,.5);return typeof o[2+s]=="number"&&(o[2+s]/=l),typeof o[3+s]=="number"&&(o[3+s]/=l),i(o)}};class RE extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;P1(IE),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Te.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Uc.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]=CE(),r=b.useContext(oi);return w.jsx(RE,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(zm),isPresent:t,safeToRemove:n})}const IE={borderRadius:{...jo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:jo,borderTopRightRadius:jo,borderBottomLeftRadius:jo,borderBottomRightRadius:jo,boxShadow:PE},sy=["TopLeft","TopRight","BottomLeft","BottomRight"],AE=sy.length,_d=e=>typeof e=="string"?parseFloat(e):e,Vd=e=>typeof e=="number"||ae.test(e);function OE(e,t,n,r,o,i){o?(e.opacity=Ve(0,n.opacity!==void 0?n.opacity:1,DE(r)),e.opacityExit=Ve(t.opacity!==void 0?t.opacity:1,0,ME(r))):i&&(e.opacity=Ve(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<AE;s++){const a=`border${sy[s]}Radius`;let c=$d(t,a),l=$d(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||Vd(c)===Vd(l)?(e[a]=Math.max(Ve(_d(c),_d(l),r),0),(sn.test(l)||sn.test(c))&&(e[a]+="%")):e[a]=l}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,r))}function $d(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DE=ay(0,.5,Lg),ME=ay(.5,.95,yt);function ay(e,t,n){return r=>r<e?0:r>t?1:n(Yr(e,t,r))}function Bd(e,t){e.min=t.min,e.max=t.max}function $t(e,t){Bd(e.x,t.x),Bd(e.y,t.y)}function Wd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Hd(e,t,n,r,o){return e-=t,e=bs(e,1/n,r),o!==void 0&&(e=bs(e,1/o,r)),e}function kE(e,t=0,n=1,r=.5,o,i=e,s=e){if(sn.test(t)&&(t=parseFloat(t),t=Ve(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ve(i.min,i.max,r);e===i&&(a-=t),e.min=Hd(e.min,t,n,a,o),e.max=Hd(e.max,t,n,a,o)}function zd(e,t,[n,r,o],i,s){kE(e,t[n],t[r],t[o],t.scale,i,s)}const FE=["x","scaleX","originX"],jE=["y","scaleY","originY"];function Ud(e,t,n,r){zd(e.x,t,FE,n?n.x:void 0,r?r.x:void 0),zd(e.y,t,jE,n?n.y:void 0,r?r.y:void 0)}function Gd(e){return e.translate===0&&e.scale===1}function ly(e){return Gd(e.x)&&Gd(e.y)}function NE(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 cy(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 Yd(e){return _t(e.x)/_t(e.y)}function Kd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class LE{constructor(){this.members=[]}add(t){qs(this.members,t),t.scheduleRender()}remove(t){if(Si(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _E(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:p}=n;l&&(r=`perspective(${l}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,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const VE=(e,t)=>e.depth-t.depth;class $E{constructor(){this.children=[],this.isDirty=!1}add(t){qs(this.children,t),this.isDirty=!0}remove(t){Si(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(VE),this.isDirty=!1,this.children.forEach(t)}}function BE(e,t){const n=kn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(un(r),e(i-t))};return Te.read(r,!0),()=>un(r)}function uy(e){return e instanceof SVGElement&&e.tagName!=="svg"}function vu(e,t,n){const r=lt(e)?e:Kr(e);return r.start(pu("",r,t,n)),r.animation}const tr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Wa=["","X","Y","Z"],WE={visibility:"hidden"},qd=1e3;let HE=0;function Ha(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?qg(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?fy(e.parent):!1:!1}function dy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=HE++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(tr.totalNodes=tr.resolvedTargetDeltas=tr.recalculatedProjection=0),this.nodes.forEach(GE),this.nodes.forEach(QE),this.nodes.forEach(ZE),this.nodes.forEach(YE),window.MotionDebug&&window.MotionDebug.record(tr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new $E)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new mu),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=uy(s),this.instance=s;const{layoutId:c,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(l||c)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=BE(h,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Qd))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&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()||rC,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=u.getProps(),x=!this.targetLayout||!cy(this.targetLayout,p)||d,v=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const S={...ru(m,"layout"),onPlay:y,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||Qd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,un(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(JE),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.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 f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Xd);return}this.isUpdating||this.nodes.forEach(qE),this.isUpdating=!1,this.nodes.forEach(XE),this.nodes.forEach(zE),this.nodes.forEach(UE),this.clearAllSnapshots();const a=kn.now();pt.delta=Nn(0,1e3/60,a-pt.timestamp),pt.timestamp=a,pt.isProcessing=!0,Ma.update.process(pt),Ma.preRender.process(pt),Ma.render.process(pt),pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Uc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KE),this.sharedNodes.forEach(eC)}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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ly(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;s&&(a||er(this.latestValues)||u)&&(o(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),oC(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Je();const a=s.measureViewportBox(),{scroll:c}=this.root;return c&&(An(a.x,c.offset.x),An(a.y,c.offset.y)),a}removeElementScroll(s){const a=Je();$t(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:f}=l;if(l!==this.root&&u&&f.layoutScroll){if(u.isRoot){$t(a,s);const{scroll:h}=this.root;h&&(An(a.x,-h.offset.x),An(a.y,-h.offset.y))}An(a.x,u.offset.x),An(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const c=Je();$t(c,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&kr(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),er(u.latestValues)&&kr(c,u.latestValues)}return er(this.latestValues)&&kr(c,this.latestValues),c}removeTransform(s){const a=Je();$t(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!er(l.latestValues))continue;Xl(l.latestValues)&&l.updateSnapshot();const u=Je(),f=l.measurePageBox();$t(u,f),Ud(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return er(this.latestValues)&&Ud(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==c;if(!(s||l&&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(),Ko(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(),cE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),ny(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(),Ko(this.relativeTargetOrigin,this.target,d.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&tr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Xl(this.parent.latestValues)||ty(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 s;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(l=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===pt.timestamp&&(l=!1),l)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;vE(this.layoutCorrected,this.treeScale,this.path,c),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():(Wd(this.prevProjectionDelta.x,this.projectionDelta.x),Wd(this.prevProjectionDelta.y,this.projectionDelta.y)),Yo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Kd(this.projectionDelta.x,this.prevProjectionDelta.x)||!Kd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&tr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mr(),this.projectionDelta=Mr(),this.projectionDeltaWithTransform=Mr()}setAnimationOrigin(s,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=Mr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Je(),d=c?c.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,y=this.getStack(),g=!y||y.members.length<=1,x=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(nC));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const T=S/1e3;Zd(f.x,s.x,T),Zd(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ko(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),tC(this.relativeTarget,this.relativeTargetOrigin,h,T),v&&NE(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Je()),$t(v,this.relativeTarget)),m&&(this.animationValues=u,OE(u,l,this.latestValues,T,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Te.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=vu(0,qd,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(qd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=s;if(!(!a||!c||!l)){if(this!==s&&this.layout&&l&&hy(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Je();const f=_t(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const h=_t(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+h}$t(a,c),kr(a,u),Yo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new LE),this.sharedNodes.get(s).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Ha("z",s,l,this.animationValues);for(let u=0;u<Wa.length;u++)Ha(`rotate${Wa[u]}`,s,l,this.animationValues),Ha(`skew${Wa[u]}`,s,l,this.animationValues);s.render();for(const u in l)s.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);s.scheduleRender()}getProjectionStyles(s){var a,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return WE;const l={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=es(s==null?void 0:s.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none",l;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=es(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!er(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),l.transform=_E(this.projectionDeltaWithTransform,this.treeScale,h),u&&(l.transform=u(h,l.transform));const{x:d,y:p}=this.projectionDelta;l.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?l.opacity=f===this?(c=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in ps){if(h[m]===void 0)continue;const{correct:y,applyTo:g}=ps[m],x=l.transform==="none"?h[m]:y(h[m],f);if(g){const v=g.length;for(let S=0;S<v;S++)l[g[S]]=x}else l[m]=x}return this.options.layoutId&&(l.pointerEvents=f===this?es(s==null?void 0:s.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Xd),this.root.sharedNodes.clear()}}}function zE(e){e.updateLayout()}function UE(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?Bt(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],d=_t(h);h.min=r[f].min,h.max=h.min+d}):hy(i,n.layoutBox,r)&&Bt(f=>{const h=s?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=Mr();Yo(a,r,n.layoutBox);const c=Mr();s?Yo(c,e.applyTransform(o,!0),n.measuredBox):Yo(c,r,n.layoutBox);const l=!ly(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();Ko(p,n.layoutBox,h.layoutBox);const m=Je();Ko(m,r,d.layoutBox),cy(p,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function GE(e){window.MotionDebug&&tr.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 YE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function KE(e){e.clearSnapshot()}function Xd(e){e.clearMeasurements()}function qE(e){e.isLayoutDirty=!1}function XE(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Qd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function QE(e){e.resolveTargetDelta()}function ZE(e){e.calcProjection()}function JE(e){e.resetSkewAndRotation()}function eC(e){e.removeLeadSnapshot()}function Zd(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 Jd(e,t,n,r){e.min=Ve(t.min,n.min,r),e.max=Ve(t.max,n.max,r)}function tC(e,t,n,r){Jd(e.x,t.x,n.x,r),Jd(e.y,t.y,n.y,r)}function nC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const rC={duration:.45,ease:[.4,0,.1,1]},eh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),th=eh("applewebkit/")&&!eh("chrome/")?Math.round:yt;function nh(e){e.min=th(e.min),e.max=th(e.max)}function oC(e){nh(e.x),nh(e.y)}function hy(e,t,n){return e==="position"||e==="preserve-aspect"&&!lE(Yd(t),Yd(n),.2)}const iC=dy({attachResizeListener:(e,t)=>yn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),za={current:void 0},py=dy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!za.current){const e=new iC({});e.mount(window),e.setOptions({layoutScroll:!0}),za.current=e}return za.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),sC={pan:{Feature:EE},drag:{Feature:SE,ProjectionNode:py,MeasureLayout:iy}},Zl={current:null},my={current:!1};function aC(){if(my.current=!0,!!zc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zl.current=e.matches;e.addListener(t),t()}else Zl.current=!1}function lC(e,t,n){for(const r in t){const o=t[r],i=n[r];if(lt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&gu(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(i))e.addValue(r,Kr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,Kr(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const si=new WeakMap,cC=[...vg,bt,Ln],uC=e=>cC.find(yg(e)),rh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fC=Yc.length;class dC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},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=ou,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:c,renderState:l}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Ks(n),this.isVariantNode=Gm(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];c[h]!==void 0&<(d)&&d.set(c[h],!1)}}mount(t){this.current=t,si.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)),my.current||aC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zl.current,process.env.NODE_ENV!=="production"&&gu(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(){si.delete(this.current),this.projection&&this.projection.unmount(),un(this.notifyUpdate),un(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=Hn.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ur){const n=Ur[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):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<rh.length;r++){const o=rh[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=lC(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<fC;r++){const o=Yc[r],i=this.props[o];(ni(i)||i===!1)&&(n[o]=i)}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=Kr(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"&&(mg(o)||pg(o))?o=parseFloat(o):!uC(o)&&Ln.test(n)&&(o=Pg(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 s=nu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!lt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class gy extends dC{constructor(){super(...arguments),this.KeyframeResolver=Rg}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 hC(e){return window.getComputedStyle(e)}class yy extends gy{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=tg}readValueFromInstance(t,n){if(Hn.has(n)){const r=su(n);return r&&r.default||0}else{const r=hC(t),o=(qm(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ry(t,n)}build(t,n,r){Qc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tu(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 vy extends gy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Hn.has(n)){const r=su(n);return r&&r.default||0}return n=ng.has(n)?n:Ys(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return og(t,n,r)}build(t,n,r){Jc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){rg(t,n,r,o)}mount(t){this.isSVGTag=eu(t.tagName),super.mount(t)}}const pC=(e,t)=>Kc(e)?new vy(t):new yy(t,{allowProjection:e!==b.Fragment}),mC={layout:{ProjectionNode:py,MeasureLayout:iy}},gC={...eE,...gT,...sC,...mC},ft=E1((e,t)=>rT(e,t,gC,pC));function by(){const e=b.useRef(!1);return Gs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xy(){const e=by(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Te.postRender(r),[r]),t]}class yC 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 vC({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(zr);return b.useInsertionEffect(()=>{const{width:s,height:a,top:c,left:l}=o.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
4
|
+
`+t.prev}function Fi(e,t){var n=kl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=In(e,o)?t(e[o],e):""}var i=typeof Ra=="function"?Ra(e):[],s;if(Wr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var c in e)In(e,c)&&(n&&String(Number(c))===c&&c<e.length||Wr&&s["$"+c]instanceof Symbol||(Rm.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if(typeof Ra=="function")for(var l=0;l<i.length;l++)Im.call(e,i[l])&&r.push("["+t(i[l])+"]: "+t(e[i[l]],e));return r}var km=co,uo=Px,ow=Vx,iw=vi,ji=km("%WeakMap%",!0),Ni=km("%Map%",!0),sw=uo("WeakMap.prototype.get",!0),aw=uo("WeakMap.prototype.set",!0),lw=uo("WeakMap.prototype.has",!0),cw=uo("Map.prototype.get",!0),uw=uo("Map.prototype.set",!0),fw=uo("Map.prototype.has",!0),Bc=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},dw=function(e,t){var n=Bc(e,t);return n&&n.value},hw=function(e,t,n){var r=Bc(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},pw=function(e,t){return!!Bc(e,t)},mw=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new iw("Side channel does not contain "+ow(i))},get:function(i){if(ji&&i&&(typeof i=="object"||typeof i=="function")){if(t)return sw(t,i)}else if(Ni){if(n)return cw(n,i)}else if(r)return dw(r,i)},has:function(i){if(ji&&i&&(typeof i=="object"||typeof i=="function")){if(t)return lw(t,i)}else if(Ni){if(n)return fw(n,i)}else if(r)return pw(r,i);return!1},set:function(i,s){ji&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new ji),aw(t,i,s)):Ni?(n||(n=new Ni),uw(n,i,s)):(r||(r={key:{},next:null}),hw(r,i,s))}};return o},Uf=e=>Array.isArray(e),Aa=e=>e===void 0,Oa=e=>e===null,gw=Function.bind.call(Function.call,Object.prototype.toString),yw=e=>!!e&&gw(e)==="[object Error]"||e instanceof Error,Fm=(e,t)=>e instanceof t,vw=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},bw=e=>Object.prototype.toString.call(e)==="[object Date]"&&Fm(e,Date),vn={array:Uf,date:bw,empty:e=>Oa(e)||Aa(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:yw,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Oa(e)||Aa(e),null:Oa,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Uf(e)&&typeof e=="object",primitive:vw,string:e=>typeof e=="string",undefined:Aa},jl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const i=`${+o[0]}`===o[0];e[r]=i?[]:{}}if(typeof e[r]!="object"){const i=`${+o[0]}`===o[0];e[r]=jl(i?[]:{},o,n)}else e[r]=jl(e[r],o,n)}else e[r]=n;return e},xw=e=>Object.keys(e),ww=e=>e.replace("[",".").replace("]","").split("."),Da=(e,t,n)=>{const r=Array.isArray(t)?t:ww(t),o=structuredClone(e);return jl(o,r,n),o};const Wc="-";function Tw(e){const t=Ew(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(Wc);return a[0]===""&&a.length!==1&&a.shift(),jm(a,t)||Sw(s)}function i(s,a){const c=n[s]||[];return a&&r[s]?[...c,...r[s]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function jm(e,t){var s;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 i=e.join(Wc);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Gf=/^\[(.+)\]$/;function Sw(e){if(Gf.test(e)){const t=Gf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Ew(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Pw(Object.entries(e.classGroups),n).forEach(([i,s])=>{Nl(s,r,i,t)}),r}function Nl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Yf(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Cw(o)){Nl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Nl(s,Yf(t,i),n,r)})})}function Yf(e,t){let n=e;return t.split(Wc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Cw(e){return e.isThemeGetter}function Pw(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function Rw(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Nm="!";function Iw(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const c=[];let l=0,u=0,f;for(let g=0;g<a.length;g++){let v=a[g];if(l===0){if(v===o&&(r||a.slice(g,g+i)===t)){c.push(a.slice(u,g)),u=g+i;continue}if(v==="/"){f=g;continue}}v==="["?l++:v==="]"&&l--}const h=c.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:c,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(c){return n({className:c,parseClassName:s})}:s}function Aw(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 Ow(e){return{cache:Rw(e.cacheSize),parseClassName:Iw(e),...Tw(e)}}const Dw=/\s+/;function Mw(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(Dw).map(s=>{const{modifiers:a,hasImportantModifier:c,baseClassName:l,maybePostfixModifierPosition:u}=n(s);let f=!!u,h=r(f?l.substring(0,u):l);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:s};if(h=r(l),!h)return{isTailwindClass:!1,originalClassName:s};f=!1}const d=Aw(a).join(":");return{isTailwindClass:!0,modifierId:c?d+Nm:d,classGroupId:h,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:c,hasPostfixModifier:l}=s,u=a+c;return i.has(u)?!1:(i.add(u),o(c,l).forEach(f=>i.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function kw(){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 Fw(e,...t){let n,r,o,i=s;function s(c){const l=t.reduce((u,f)=>f(u),e());return n=Ow(l),r=n.cache.get,o=n.cache.set,i=a,a(c)}function a(c){const l=r(c);if(l)return l;const u=Mw(c,n);return o(c,u),u}return function(){return i(kw.apply(null,arguments))}}function Le(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const _m=/^\[(?:([a-z-]+):)?(.+)\]$/i,jw=/^\d+\/\d+$/,Nw=new Set(["px","full","screen"]),Lw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_w=/\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$/,Vw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$w=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function gn(e){return ar(e)||Nw.has(e)||jw.test(e)}function En(e){return fo(e,"length",qw)}function ar(e){return!!e&&!Number.isNaN(Number(e))}function Li(e){return fo(e,"number",ar)}function ko(e){return!!e&&Number.isInteger(Number(e))}function Ww(e){return e.endsWith("%")&&ar(e.slice(0,-1))}function ue(e){return _m.test(e)}function Cn(e){return Lw.test(e)}const Hw=new Set(["length","size","percentage"]);function zw(e){return fo(e,Hw,Vm)}function Uw(e){return fo(e,"position",Vm)}const Gw=new Set(["image","url"]);function Yw(e){return fo(e,Gw,Qw)}function Kw(e){return fo(e,"",Xw)}function Fo(){return!0}function fo(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 qw(e){return _w.test(e)&&!Vw.test(e)}function Vm(){return!1}function Xw(e){return $w.test(e)}function Qw(e){return Bw.test(e)}function Zw(){const e=Le("colors"),t=Le("spacing"),n=Le("blur"),r=Le("brightness"),o=Le("borderColor"),i=Le("borderRadius"),s=Le("borderSpacing"),a=Le("borderWidth"),c=Le("contrast"),l=Le("grayscale"),u=Le("hueRotate"),f=Le("invert"),h=Le("gap"),d=Le("gradientColorStops"),p=Le("gradientColorStopPositions"),m=Le("inset"),g=Le("margin"),v=Le("opacity"),x=Le("padding"),y=Le("saturate"),T=Le("scale"),S=Le("sepia"),E=Le("skew"),R=Le("space"),A=Le("translate"),k=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ue,t],D=()=>[ue,t],N=()=>["",gn,En],P=()=>["auto",ar,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"],W=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ue],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[ar,Li],q=()=>[ar,ue];return{cacheSize:500,separator:":",theme:{colors:[Fo],spacing:[gn,En],blur:["none","",Cn,ue],brightness:V(),borderColor:[e],borderRadius:["none","","full",Cn,ue],borderSpacing:D(),borderWidth:N(),contrast:V(),grayscale:U(),hueRotate:q(),invert:U(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[Ww,En],inset:j(),margin:j(),opacity:V(),padding:D(),saturate:V(),scale:V(),sepia:U(),skew:q(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Cn]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),ue]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],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",ko,ue]}],basis:[{basis:j()}],"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",ko,ue]}],"grid-cols":[{"grid-cols":[Fo]}],"col-start-end":[{col:["auto",{span:["full",ko,ue]},ue]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Fo]}],"row-start-end":[{row:["auto",{span:[ko,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",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],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:[Cn]},Cn]}],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",Cn,En]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Li]}],"font-family":[{font:[Fo]}],"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",ar,Li]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gn,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":[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",gn,En]}],"underline-offset":[{"underline-offset":["auto",gn,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:D()}],"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":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),Uw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yw]}],"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:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[gn,ue]}],"outline-w":[{outline:[gn,En]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[gn,En]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Cn,Kw]}],"shadow-color":[{shadow:[Fo]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Cn,ue]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],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":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["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:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ko,ue]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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:[gn,En,Li]}],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 Jw=Fw(Zw),Hc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},e1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),t1=e=>vn.function(e),ke=(...e)=>Jw(I0(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})},Hs=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},ho=b.forwardRef(function({as:t,...n},r){const o=t||"span";return w.jsx(o,{...n,ref:r})}),n1=lo("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"}}),Hr=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...c},l){const u=r||c.disabled;return w.jsxs(ho,{...c,ref:l,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:c.as??"button",onClick:u?void 0:c.onClick,className:ke(n1({size:s,rounded:a,theme:o}),t),children:[n,c.children]})}),Bm=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t};function r1(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const o1=({children:e,...t})=>{const n=Bm(t.onIntersection),r=b.useRef(null),[o,i]=b.useState(()=>r.current===null?!1:r1(r.current));return b.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(c=>{var u;const l=c[0];return l.isIntersecting&&((u=n.current)==null||u.call(n)),i(f=>l.isIntersecting?!0:f)});return a.observe(s),()=>a.disconnect()},[]),w.jsx("div",{...t,ref:r,children:o?e:null})},i1=lo("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"}}}),s1=lo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),a1=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},c){return w.jsxs(ho,{...a,ref:c,"data-theme":i,as:a.as??"span",className:ke(s1({size:s,theme:i}),t),children:[n?w.jsx("span",{className:i1({theme:n})}):null,r,a.children]})}),zr=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),zs=b.createContext({}),Us=b.createContext(null),zc=typeof document<"u",Gs=zc?b.useLayoutEffect:b.useEffect,Wm=b.createContext({strict:!1}),Ys=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),l1="framerAppearId",Hm="data-"+Ys(l1),c1={skipAnimations:!1,useManualTiming:!1};function u1(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(l){i.has(l)&&(c.schedule(l),e()),l(s)}const c={schedule:(l,u=!1,f=!1)=>{const d=f&&r?t:n;return u&&i.add(l),d.has(l)||d.add(l),l},cancel:l=>{n.delete(l),i.delete(l)},process:l=>{if(s=l,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,c.process(l))}};return c}const _i=["read","resolveKeyframes","update","preRender","render","postRender"],f1=40;function zm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=_i.reduce((v,x)=>(v[x]=u1(i),v),{}),{read:a,resolveKeyframes:c,update:l,preRender:u,render:f,postRender:h}=s,d=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,f1),1),o.timestamp=v,o.isProcessing=!0,a.process(o),c.process(o),l.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:_i.reduce((v,x)=>{const y=s[x];return v[x]=(T,S=!1,E=!1)=>(n||p(),y.schedule(T,S,E)),v},{}),cancel:v=>{for(let x=0;x<_i.length;x++)s[_i[x]].cancel(v)},state:o,steps:s}}const{schedule:Uc,cancel:RL}=zm(queueMicrotask,!1);function Or(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Um=b.createContext({});let Kf=!1;function d1(e,t,n,r,o){const{visualElement:i}=b.useContext(zs),s=b.useContext(Wm),a=b.useContext(Us),c=b.useContext(zr).reducedMotion,l=b.useRef();r=r||s.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,f=b.useContext(Um);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&p1(l.current,n,o,f),b.useInsertionEffect(()=>{u&&u.update(n,a)});const h=b.useRef(!!(n[Hm]&&!window.HandoffComplete));return Gs(()=>{u&&(u.updateFeatures(),Uc.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,Kf||(Kf=!0,queueMicrotask(h1))))}),u}function h1(){window.HandoffComplete=!0}function p1(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Gm(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Or(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function Gm(e){if(e)return e.options.allowProjection!==!1?e.projection:Gm(e.parent)}function m1(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Or(n)&&(n.current=r))},[t])}function ni(e){return typeof e=="string"||Array.isArray(e)}function ri(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Gc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yc=["initial",...Gc];function Ks(e){return ri(e.animate)||Yc.some(t=>ni(e[t]))}function Ym(e){return!!(Ks(e)||e.variants)}function g1(e,t){if(Ks(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ni(n)?n:void 0,animate:ni(r)?r:void 0}}return e.inherit!==!1?t:{}}function y1(e){const{initial:t,animate:n}=g1(e,b.useContext(zs));return b.useMemo(()=>({initial:t,animate:n}),[qf(t),qf(n)])}function qf(e){return Array.isArray(e)?e.join(" "):e}const Xf={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"]},Ur={};for(const e in Xf)Ur[e]={isEnabled:t=>Xf[e].some(n=>!!t[n])};function v1(e){for(const t in e)Ur[t]={...Ur[t],...e[t]}}const oi=b.createContext({}),b1=Symbol.for("motionComponentSymbol"),yt=e=>e;let po=yt,Lt=yt;process.env.NODE_ENV!=="production"&&(po=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Lt=(e,t)=>{if(!e)throw new Error(t)});function x1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&v1(e);function i(a,c){let l;const u={...b.useContext(zr),...a,layoutId:w1(a)},{isStatic:f}=u,h=y1(a),d=r(a,f);if(!f&&zc){T1(u,e);const p=S1(u);l=p.MeasureLayout,h.visualElement=d1(o,d,u,t,p.ProjectionNode)}return w.jsxs(zs.Provider,{value:h,children:[l&&h.visualElement?w.jsx(l,{visualElement:h.visualElement,...u}):null,n(o,a,m1(d,h.visualElement,c),d,f,h.visualElement)]})}const s=b.forwardRef(i);return s[b1]=o,s}function w1({layoutId:e}){const t=b.useContext(oi).id;return t&&e!==void 0?t+"-"+e:e}function T1(e,t){const n=b.useContext(Wm).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?po(!1,r):Lt(!1,r)}}function S1(e){const{drag:t,layout:n}=Ur;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 E1(e){function t(r,o={}){return x1(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const C1=["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 Kc(e){return typeof e!="string"||e.includes("-")?!1:!!(C1.indexOf(e)>-1||/[A-Z]/u.test(e))}const ps={};function P1(e){Object.assign(ps,e)}const xi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hn=new Set(xi);function Km(e,{layout:t,layoutId:n}){return Hn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ps[e]||e==="opacity")}const lt=e=>!!(e&&e.getVelocity),R1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},I1=xi.length;function A1(e,t,n){let r="";for(let o=0;o<I1;o++){const i=xi[o];if(e[i]!==void 0){const s=R1[i]||i;r+=`${s}(${e[i]}) `}}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("--"),O1=qm("var(--"),qc=e=>O1(e)?D1.test(e.split("/*")[0].trim()):!1,D1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,M1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Nn=(e,t,n)=>n>t?t:n<e?e:n,mo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},zo={...mo,transform:e=>Nn(0,1,e)},Vi={...mo,default:1},Uo=e=>Math.round(e*1e5)/1e5,Xc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,k1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,F1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function wi(e){return typeof e=="string"}function j1(e){return e==null}const Ti=e=>({test:t=>wi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Rn=Ti("deg"),sn=Ti("%"),ae=Ti("px"),N1=Ti("vh"),L1=Ti("vw"),Qf={...sn,parse:e=>sn.parse(e)/100,transform:e=>sn.transform(e*100)},Zf={...mo,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:Rn,rotateX:Rn,rotateY:Rn,rotateZ:Rn,scale:Vi,scaleX:Vi,scaleY:Vi,scaleZ:Vi,skew:Rn,skewX:Rn,skewY:Rn,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:zo,originX:Qf,originY:Qf,originZ:ae,zIndex:Zf,backgroundPositionX:ae,backgroundPositionY:ae,fillOpacity:zo,strokeOpacity:zo,numOctaves:Zf};function Qc(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,c=!1,l=!0;for(const u in t){const f=t[u];if(Xm(u)){o[u]=f;continue}const h=Qm[u],d=M1(f,h);if(Hn.has(u)){if(a=!0,i[u]=d,!l)continue;f!==(h.default||0)&&(l=!1)}else u.startsWith("origin")?(c=!0,s[u]=d):r[u]=d}if(t.transform||(a||n?r.transform=A1(e.transform,l,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:f="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${f} ${h}`}}const Zc=()=>({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 _1({transformTemplate:e},t){return b.useMemo(()=>{const n=Zc();return Qc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function V1(e,t){const n=e.style||{},r={};return Zm(r,n,e),Object.assign(r,_1(e,t)),r}function $1(e,t){const n={},r=V1(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 B1=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 ms(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||B1.has(e)}let Jm=e=>!ms(e);function eg(e){e&&(Jm=t=>t.startsWith("on")?!ms(t):e(t))}try{eg(require("@emotion/is-prop-valid").default)}catch{}function W1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Jm(o)||n===!0&&ms(o)||!t&&!ms(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Jf(e,t,n){return typeof e=="string"?e:ae.transform(t+n*e)}function H1(e,t,n){const r=Jf(t,e.x,e.width),o=Jf(n,e.y,e.height);return`${r} ${o}`}const z1={offset:"stroke-dashoffset",array:"stroke-dasharray"},U1={offset:"strokeDashoffset",array:"strokeDasharray"};function G1(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?z1:U1;e[i.offset]=ae.transform(-r);const s=ae.transform(t),a=ae.transform(n);e[i.array]=`${s} ${a}`}function Jc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...l},u,f){if(Qc(e,l,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||i!==void 0||d.transform)&&(d.transformOrigin=H1(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&G1(h,s,a,c,!1)}const tg=()=>({...Zc(),attrs:{}}),eu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Y1(e,t,n,r){const o=b.useMemo(()=>{const i=tg();return Jc(i,t,eu(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Zm(i,e.style,e),o.style={...i,...o.style}}return o}function K1(e=!1){return(n,r,o,{latestValues:i},s)=>{const c=(Kc(n)?Y1:$1)(r,i,s,n),l=W1(r,typeof n=="string",e),u=n!==b.Fragment?{...l,...c,ref:o}:{},{children:f}=r,h=b.useMemo(()=>lt(f)?f.get():f,[f]);return b.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 i in n)e.style.setProperty(i,n[i])}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:Ys(o),t.attrs[o])}function tu(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(lt(o[s])||t.style&<(t.style[s])||Km(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function ig(e,t,n){const r=tu(e,t,n);for(const o in e)if(lt(e[o])||lt(t[o])){const i=xi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function ed(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function nu(e,t,n,r){if(typeof t=="function"){const[o,i]=ed(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=ed(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function cn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ll=e=>Array.isArray(e),q1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),X1=e=>Ll(e)?e[e.length-1]||0:e;function es(e){const t=lt(e)?e.get():e;return q1(t)?t.toValue():t}const sg=new Set(["opacity","clipPath","filter","transform"]);function ag(e){if(Hn.has(e))return"transform";if(sg.has(e))return Ys(e)}function qs(e,t){e.indexOf(t)===-1&&e.push(t)}function Si(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function Q1([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}function Z1({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const c={latestValues:eT(o,i,s,a?!1:e,t),renderState:n()};return r&&(c.mount=l=>r(o,l,c)),c}const lg=e=>(t,n)=>{const r=b.useContext(zs),o=b.useContext(Us),i=()=>Z1(e,t,r,o,n);return n?i():cn(i)};function J1(e,t){const n=ag(t);n&&qs(e,n)}function td(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=nu(e,r[o]);if(i){const{transitionEnd:s,transition:a,...c}=i;n(c,s)}}}function eT(e,t,n,r,o){var i;const s={},a=[],c=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,l=o(e,{});for(const g in l)s[g]=es(l[g]);let{initial:u,animate:f}=e;const h=Ks(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"&&!ri(m)&&td(e,m,(g,v)=>{for(const x in g){let y=g[x];if(Array.isArray(y)){const T=p?y.length-1:0;y=y[T]}y!==null&&(s[x]=y)}for(const x in v)s[x]=v[x]}),c&&(f&&u!==!1&&!ri(f)&&td(e,f,g=>{for(const v in g)J1(a,v)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Te,cancel:un,state:pt,steps:Ma}=zm(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),tT={useVisualState:lg({scrapeMotionValuesFromProps:ig,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(()=>{Jc(n,r,eu(t.tagName),e.transformTemplate),og(t,n)})}})},nT={useVisualState:lg({applyWillChange:!0,scrapeMotionValuesFromProps:tu,createRenderState:Zc})};function rT(e,{forwardMotionProps:t=!1},n,r){return{...Kc(e)?tT:nT,preloadedFeatures:n,useRender:K1(t),createVisualElement:r,Component:e}}function yn(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 Xs(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const oT=e=>t=>cg(t)&&e(t,Xs(t));function bn(e,t,n,r){return yn(e,t,oT(n),r)}const iT=(e,t)=>n=>t(e(n)),xn=(...e)=>e.reduce(iT);function ug(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const nd=ug("dragHorizontal"),rd=ug("dragVertical");function fg(e){let t=!1;if(e==="y")t=rd();else if(e==="x")t=nd();else{const n=nd(),r=rd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function dg(){const e=fg(!0);return e?(e(),!1):!0}class zn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function od(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||dg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const c=a[r];c&&Te.postRender(()=>c(i,s))};return bn(e.current,n,o,{passive:!e.getProps()[r]})}class sT extends zn{mount(){this.unmount=xn(od(this.node,!0),od(this.node,!1))}unmount(){}}class aT extends zn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xn(yn(this.node.current,"focus",()=>this.onFocus()),yn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const hg=(e,t)=>t?e===t?!0:hg(e,t.parentElement):!1;function ka(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Xs(n))}class lT extends zn{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(),i=bn(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),h=!f&&!hg(this.node.current,a.target)?u:l;h&&Te.update(()=>h(a,c))},{passive:!(r.onTap||r.onPointerUp)}),s=bn(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=xn(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||ka("up",(c,l)=>{const{onTap:u}=this.node.getProps();u&&Te.postRender(()=>u(c,l))})};this.removeEndListeners(),this.removeEndListeners=yn(this.node.current,"keyup",s),ka("down",(a,c)=>{this.startPress(a,c)})},n=yn(this.node.current,"keydown",t),r=()=>{this.isPressing&&ka("cancel",(i,s)=>this.cancelPress(i,s))},o=yn(this.node.current,"blur",r);this.removeAccessibleListeners=xn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Te.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!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=bn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=yn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _l=new WeakMap,Fa=new WeakMap,cT=e=>{const t=_l.get(e.target);t&&t(e)},uT=e=>{e.forEach(cT)};function fT({root:e,...t}){const n=e||document;Fa.has(n)||Fa.set(n,{});const r=Fa.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(uT,{root:e,...t})),r[o]}function dT(e,t,n){const r=fT(t);return _l.set(e,n),r.observe(e),()=>{_l.delete(e),r.unobserve(e)}}const hT={some:0,all:1};class pT extends zn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:hT[o]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=l?u:f;h&&h(c)};return dT(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(mT(t,n))&&this.startObserver()}unmount(){}}function mT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gT={inView:{Feature:pT},tap:{Feature:lT},focus:{Feature:aT},hover:{Feature:sT}};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 Qs(e,t,n){const r=e.getProps();return nu(r,t,n!==void 0?n:r.custom,e)}const an=e=>e*1e3,ln=e=>e/1e3,yT={type:"spring",stiffness:500,damping:25,restSpeed:10},vT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bT={type:"keyframes",duration:.8},xT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wT=(e,{keyframes:t})=>t.length>2?bT:Hn.has(e)?e.startsWith("scale")?vT(t[1]):yT:xT;function TT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function ru(e,t){return e[t]||e.default||e}const ST=e=>e!==null;function Zs(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ST),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let ts;function ET(){ts=void 0}const kn={now:()=>(ts===void 0&&kn.set(pt.isProcessing||c1.useManualTiming?pt.timestamp:performance.now()),ts),set:e=>{ts=e,queueMicrotask(ET)}},mg=e=>/^0[^.\s]+$/u.test(e);function CT(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),PT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RT(e){const t=PT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const IT=4;function yg(e,t,n=1){Lt(n<=IT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=RT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return gg(s)?parseFloat(s):s}return qc(o)?yg(o,t,n+1):o}const AT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),id=e=>e===mo||e===ae,sd=(e,t)=>parseFloat(e.split(", ")[t]),ad=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return sd(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?sd(i[1],e):0}},OT=new Set(["x","y","z"]),DT=xi.filter(e=>!OT.has(e));function MT(e){const t=[];return DT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Gr={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:ad(4,13),y:ad(5,14)};Gr.translateX=Gr.x;Gr.translateY=Gr.y;const vg=e=>t=>t.test(e),kT={test:e=>e==="auto",parse:e=>e},bg=[mo,ae,sn,Rn,L1,N1,kT],ld=e=>bg.find(vg(e)),dr=new Set;let Vl=!1,$l=!1;function xg(){if($l){const e=Array.from(dr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=MT(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}$l=!1,Vl=!1,dr.forEach(e=>e.complete()),dr.clear()}function wg(){dr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($l=!0)})}function FT(){wg(),xg()}class ou{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(dr.add(this),Vl||(Vl=!0,Te.read(wg),Te.resolveKeyframes(xg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),dr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,dr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const iu=(e,t)=>n=>!!(wi(n)&&F1.test(n)&&n.startsWith(e)||t&&!j1(n)&&Object.prototype.hasOwnProperty.call(n,t)),Tg=(e,t,n)=>r=>{if(!wi(r))return r;const[o,i,s,a]=r.match(Xc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},jT=e=>Nn(0,255,e),ja={...mo,transform:e=>Math.round(jT(e))},lr={test:iu("rgb","red"),parse:Tg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ja.transform(e)+", "+ja.transform(t)+", "+ja.transform(n)+", "+Uo(zo.transform(r))+")"};function NT(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Bl={test:iu("#"),parse:NT,transform:lr.transform},Dr={test:iu("hsl","hue"),parse:Tg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+sn.transform(Uo(t))+", "+sn.transform(Uo(n))+", "+Uo(zo.transform(r))+")"},bt={test:e=>lr.test(e)||Bl.test(e)||Dr.test(e),parse:e=>lr.test(e)?lr.parse(e):Dr.test(e)?Dr.parse(e):Bl.parse(e),transform:e=>wi(e)?e:e.hasOwnProperty("red")?lr.transform(e):Dr.transform(e)};function LT(e){var t,n;return isNaN(e)&&wi(e)&&(((t=e.match(Xc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(k1))===null||n===void 0?void 0:n.length)||0)>0}const Sg="number",Eg="color",_T="var",VT="var(",cd="${}",$T=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ii(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace($T,c=>(bt.test(c)?(r.color.push(i),o.push(Eg),n.push(bt.parse(c))):c.startsWith(VT)?(r.var.push(i),o.push(_T),n.push(c)):(r.number.push(i),o.push(Sg),n.push(parseFloat(c))),++i,cd)).split(cd);return{values:n,split:a,indexes:r,types:o}}function Cg(e){return ii(e).values}function Pg(e){const{split:t,types:n}=ii(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Sg?i+=Uo(o[s]):a===Eg?i+=bt.transform(o[s]):i+=o[s]}return i}}const BT=e=>typeof e=="number"?0:e;function WT(e){const t=Cg(e);return Pg(e)(t.map(BT))}const Ln={test:LT,parse:Cg,createTransformer:Pg,getAnimatableNone:WT},HT=new Set(["brightness","contrast","saturate","opacity"]);function zT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Xc)||[];if(!r)return e;const o=n.replace(r,"");let i=HT.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const UT=/\b([a-z-]*)\(.*?\)/gu,Wl={...Ln,getAnimatableNone:e=>{const t=e.match(UT);return t?t.map(zT).join(" "):e}},GT={...Qm,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Wl,WebkitFilter:Wl},su=e=>GT[e];function Rg(e,t){let n=su(e);return n!==Wl&&(n=Ln),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const YT=new Set(["auto","none","0"]);function KT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!YT.has(i)&&ii(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Rg(n,o)}class Ig extends ou{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 c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),qc(l))){const u=yg(l,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!AT.has(r)||t.length!==2)return;const[o,i]=t,s=ld(o),a=ld(i);if(s!==a)if(id(s)&&id(a))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)CT(t[o])&&r.push(o);r.length&&KT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gr[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 i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=Gr[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(([c,l])=>{n.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function Ag(e){let t;return()=>(t===void 0&&(t=e()),t)}const ud=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ln.test(e)||e==="0")&&!e.startsWith("url("));function qT(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function XT(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=ud(o,t),a=ud(i,t);return po(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:qT(e)||n==="spring"&&r}class Og{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&FT(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:c,isGenerator:l}=this.options;if(!l&&!XT(t,r,o,i))if(s)this.options.duration=0;else{c==null||c(Zs(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 QT=5;function Mg(e,t,n){const r=Math.max(t-QT,0);return Dg(n-e(r),t-r)}const Na=.001,ZT=.01,fd=10,JT=.05,eS=1;function tS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;po(e<=an(fd),"Spring duration must be 10 seconds or less");let s=1-t;s=Nn(JT,eS,s),e=Nn(ZT,fd,ln(e)),s<1?(o=l=>{const u=l*s,f=u*e,h=u-n,d=Hl(l,s),p=Math.exp(-f);return Na-h/d*p},i=l=>{const f=l*s*e,h=f*n+n,d=Math.pow(s,2)*Math.pow(l,2)*e,p=Math.exp(-f),m=Hl(Math.pow(l,2),s);return(-o(l)+Na>0?-1:1)*((h-d)*p)/m}):(o=l=>{const u=Math.exp(-l*e),f=(l-n)*e+1;return-Na+u*f},i=l=>{const u=Math.exp(-l*e),f=(n-l)*(e*e);return u*f});const a=5/e,c=rS(o,i,a);if(e=an(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:e}}}const nS=12;function rS(e,t,n){let r=n;for(let o=1;o<nS;o++)r=r-e(r)/t(r);return r}function Hl(e,t){return e*Math.sqrt(1-t*t)}const oS=["duration","bounce"],iS=["stiffness","damping","mass"];function dd(e,t){return t.some(n=>e[n]!==void 0)}function sS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!dd(e,iS)&&dd(e,oS)){const n=tS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function au({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:c,mass:l,duration:u,velocity:f,isResolvedFromDuration:h}=sS({...r,velocity:-ln(r.velocity||0)}),d=f||0,p=c/(2*Math.sqrt(a*l)),m=i-o,g=ln(Math.sqrt(a/l)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let x;if(p<1){const y=Hl(g,p);x=T=>{const S=Math.exp(-p*g*T);return i-S*((d+p*g*m)/y*Math.sin(y*T)+m*Math.cos(y*T))}}else if(p===1)x=y=>i-Math.exp(-g*y)*(m+(d+g*m)*y);else{const y=g*Math.sqrt(p*p-1);x=T=>{const S=Math.exp(-p*g*T),E=Math.min(y*T,300);return i-S*((d+p*g*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:h&&u||null,next:y=>{const T=x(y);if(h)s.done=y>=u;else{let S=d;y!==0&&(p<1?S=Mg(x,y,T):S=0);const E=Math.abs(S)<=n,R=Math.abs(i-T)<=t;s.done=E&&R}return s.value=s.done?i:T,s}}}function hd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},d=A=>a!==void 0&&A<a||c!==void 0&&A>c,p=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let m=n*t;const g=f+m,v=s===void 0?g:s(g);v!==g&&(m=v-f);const x=A=>-m*Math.exp(-A/r),y=A=>v+x(A),T=A=>{const k=x(A),I=y(A);h.done=Math.abs(k)<=l,h.value=h.done?v:I};let S,E;const R=A=>{d(h.value)&&(S=A,E=au({keyframes:[h.value,p(h.value)],velocity:Mg(y,A,h.value),damping:o,stiffness:i,restDelta:l,restSpeed:u}))};return R(0),{calculatedDuration:null,next:A=>{let k=!1;return!E&&S===void 0&&(k=!0,T(A),R(A)),S!==void 0&&A>=S?E.next(A-S):(!k&&T(A),h)}}}const kg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,aS=1e-7,lS=12;function cS(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=kg(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>aS&&++a<lS);return s}function Ei(e,t,n,r){if(e===t&&n===r)return yt;const o=i=>cS(i,0,1,e,n);return i=>i===0||i===1?i:kg(o(i),t,r)}const uS=Ei(.42,0,1,1),fS=Ei(0,0,.58,1),Fg=Ei(.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),lu=e=>1-Math.sin(Math.acos(e)),_g=Lg(lu),dS=Ng(lu),Vg=Ei(.33,1.53,.69,.99),cu=Lg(Vg),hS=Ng(cu),pS=e=>(e*=2)<1?.5*cu(e):.5*(2-Math.pow(2,-10*(e-1))),pd={linear:yt,easeIn:uS,easeInOut:Fg,easeOut:fS,circIn:lu,circInOut:dS,circOut:_g,backIn:cu,backInOut:hS,backOut:Vg,anticipate:pS},zl=e=>{if(Array.isArray(e)){Lt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Ei(t,n,r,o)}else if(typeof e=="string")return Lt(pd[e]!==void 0,`Invalid easing type '${e}'`),pd[e];return e},Yr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ve=(e,t,n)=>e+(t-e)*n;function La(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 mS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;o=La(c,a,e+1/3),i=La(c,a,e),s=La(c,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function gs(e,t){return n=>n>0?t:e}const _a=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},gS=[Bl,lr,Dr],yS=e=>gS.find(t=>t.test(e));function md(e){const t=yS(e);if(po(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Dr&&(n=mS(n)),n}const gd=(e,t)=>{const n=md(e),r=md(t);if(!n||!r)return gs(e,t);const o={...n};return i=>(o.red=_a(n.red,r.red,i),o.green=_a(n.green,r.green,i),o.blue=_a(n.blue,r.blue,i),o.alpha=Ve(n.alpha,r.alpha,i),lr.transform(o))},Ul=new Set(["none","hidden"]);function vS(e,t){return Ul.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function bS(e,t){return n=>Ve(e,t,n)}function uu(e){return typeof e=="number"?bS:typeof e=="string"?qc(e)?gs:bt.test(e)?gd:TS:Array.isArray(e)?$g:typeof e=="object"?bt.test(e)?gd:xS:gs}function $g(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>uu(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function xS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=uu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function wS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],c=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=c,o[s]++}return r}const TS=(e,t)=>{const n=Ln.createTransformer(t),r=ii(e),o=ii(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?Ul.has(e)&&!o.values.length||Ul.has(t)&&!r.values.length?vS(e,t):xn($g(wS(r,o),o.values),n):(po(!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.`),gs(e,t))};function Bg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):uu(e)(e,t)}function SS(e,t,n){const r=[],o=n||Bg,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||yt:t;a=xn(c,a)}r.push(a)}return r}function Wg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Lt(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=SS(t,r,o),a=s.length,c=l=>{let u=0;if(a>1)for(;u<e.length-2&&!(l<e[u+1]);u++);const f=Yr(e[u],e[u+1],l);return s[u](f)};return n?l=>c(Nn(e[0],e[i-1],l)):c}function Hg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Yr(0,t,r);e.push(Ve(n,1,o))}}function zg(e){const t=[0];return Hg(t,e.length-1),t}function ES(e,t){return e.map(n=>n*t)}function CS(e,t){return e.map(()=>t||Fg).splice(0,e.length-1)}function ys({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=jg(r)?r.map(zl):zl(r),i={done:!1,value:t[0]},s=ES(n&&n.length===t.length?n:zg(t),e),a=Wg(s,t,{ease:Array.isArray(o)?o:CS(t,o)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const Gl=2e4;function Ug(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Gl;)t+=n,r=e.next(t);return t>=Gl?1/0:t}const PS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Te.update(t,!0),stop:()=>un(t),now:()=>pt.isProcessing?pt.timestamp:kn.now()}},RS={decay:hd,inertia:hd,tween:ys,keyframes:ys,spring:au},IS=e=>e/100;class fu extends Og{constructor({KeyframeResolver:t=ou,...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:i}=this.options,s=(a,c)=>this.onKeyframesResolved(a,c);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new t(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=RS[n]||ys;let c,l;a!==ys&&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}`),c=xn(IS,Bg(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(l=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=Ug(u));const{calculatedDuration:f}=u,h=f+o,d=h*(r+1)-o;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:d}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:c,calculatedDuration:l,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.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 v=this.currentTime-h*(this.speed>=0?1:-1),x=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=i;if(d){const A=Math.min(this.currentTime,u)/f;let k=Math.floor(A),I=A%1;!I&&A>=1&&(I=1),I===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(p==="reverse"?(I=1-I,m&&(I-=m/f)):p==="mirror"&&(T=s)),y=Nn(0,1,I)*f}const S=x?{done:!1,value:c[0]}:T.next(y);a&&(S.value=a(S.value));let{done:E}=S;!x&&l!==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=Zs(c,this.options,o)),g&&g(S.value),R&&this.finish(),S}get duration(){const{resolved:t}=this;return t?ln(t.calculatedDuration):0}get time(){return ln(this.currentTime)}set time(t){t=an(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=ln(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=PS,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 du||Gg(e)||Array.isArray(e)&&e.every(Yg))}const Vo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,du={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vo([0,.65,.55,1]),circOut:Vo([.55,0,1,.45]),backIn:Vo([.31,.01,.66,-.59]),backOut:Vo([.33,1.53,.69,.99])};function AS(e){return Kg(e)||du.easeOut}function Kg(e){if(e)return Gg(e)?Vo(e):Array.isArray(e)?e.map(AS):du[e]}function OS(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:c}={}){const l={[t]:n};c&&(l.offset=c);const u=Kg(a);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const DS=Ag(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),vs=10,MS=2e4;function kS(e){return e.type==="spring"||!Yg(e.ease)}function FS(e,t){const n=new fu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<MS;)r=n.sample(i),o.push(r.value),i+=vs;return{times:void 0,keyframes:o,duration:i-vs,ease:"linear"}}class yd extends Og{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new Ig(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:c,name:l}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(kS(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,...p}=this.options,m=FS(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=OS(c.owner.current,l,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=kn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;c.set(Zs(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ln(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ln(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=an(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:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:u,onComplete:f,...h}=this.options,d=new fu({...h,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=an(this.time);l.setWithVelocity(d.sample(p-vs).value,d.sample(p).value,vs)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return DS()&&r&&sg.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function jS(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Te.update(r,!0),()=>un(r)}const NS=Ag(()=>window.ScrollTimeline!==void 0);class hu{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(NS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),jS(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 pu=(e,t,n,r={},o,i,s)=>a=>{const c=ru(r,e)||{},l=c.delay||r.delay||0;let{elapsed:u=0}=r;u=u-an(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-u,onUpdate:d=>{t.set(d),c.onUpdate&&c.onUpdate(d)},onComplete:()=>{a(),c.onComplete&&c.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};TT(c)||(f={...f,...wT(e,f)}),f.duration&&(f.duration=an(f.duration)),f.repeatDelay&&(f.repeatDelay=an(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&&!i&&t.get()!==void 0){const d=Zs(f.keyframes,c);if(d!==void 0)return Te.update(()=>{f.onUpdate(d),f.onComplete()}),new hu([])}return!i&&yd.supports(f)?new yd(f):new fu(f)};class mu{constructor(){this.subscriptions=[]}add(t){return qs(this.subscriptions,t),()=>Si(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const vd=new Set;function gu(e,t,n){e||vd.has(t)||(console.warn(t),vd.add(t))}const bd=30,LS=e=>!isNaN(parseFloat(e)),Go={current:void 0};class qg{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=kn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=LS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gu(!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 mu);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 Go.current&&Go.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bd);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 Kr(e,t){return new qg(e,t)}function _S(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Kr(n))}function VS(e,t){const n=Qs(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=X1(i[s]);_S(e,s,a)}}function Xg(e){return e.getProps()[Hm]}class $S 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 i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(Si(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function BS(e){return!!(lt(e)&&e.add)}function Yl(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 $S("auto"),e.addValue("willChange",r)),BS(r))return r.add(t)}function WS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function yu(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(s=r);const l=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in c){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),d=c[f];if(d===void 0||u&&WS(u,f))continue;const p={delay:n,elapsed:0,...ru(s||{},f)};let m=!1;if(window.HandoffAppearAnimations){const v=Xg(e);if(v){const x=window.HandoffAppearAnimations(v,f,h,Te);x!==null&&(p.elapsed=x,m=!0)}}h.start(pu(f,h,d,e.shouldReduceMotion&&Hn.has(f)?{type:!1}:p,e,m,Yl(e,f)));const g=h.animation;g&&l.push(g)}return a&&Promise.all(l).then(()=>{Te.update(()=>{a&&VS(e,a)})}),l}function Kl(e,t,n={}){var r;const o=Qs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(yu(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=i;return HS(e,t,u+l,f,h,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[l,u]=c==="beforeChildren"?[s,a]:[a,s];return l().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function HS(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,c=o===1?(l=0)=>l*r:(l=0)=>a-l*r;return Array.from(e.variantChildren).sort(zS).forEach((l,u)=>{l.notify("AnimationStart",t),s.push(Kl(l,t,{...i,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(s)}function zS(e,t){return e.sortNodePosition(t)}function US(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Kl(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Kl(e,t,n);else{const o=typeof t=="function"?Qs(e,t,n.custom):t;r=Promise.all(yu(e,o,n))}return r.then(()=>{Te.postRender(()=>{e.notify("AnimationComplete",t)})})}const GS=[...Gc].reverse(),YS=Gc.length;function KS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>US(e,n,r)))}function qS(e){let t=KS(e),n=xd(),r=!0;const o=c=>(l,u)=>{var f;const h=Qs(e,u,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...m}=h;l={...l,...m,...p}}return l};function i(c){t=c(e)}function s(c){const l=e.getProps(),u=e.getVariantContext(!0)||{},f=[],h=new Set;let d={},p=1/0;for(let g=0;g<YS;g++){const v=GS[g],x=n[v],y=l[v]!==void 0?l[v]:u[v],T=ni(y),S=v===c?x.isActive:null;S===!1&&(p=g);let E=y===u[v]&&y!==l[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...d},!x.isActive&&S===null||!y&&!x.prevProp||ri(y)||typeof y=="boolean")continue;let A=XS(x.prevProp,y)||v===c&&x.isActive&&!E&&T||g>p&&T,k=!1;const I=Array.isArray(y)?y:[y];let j=I.reduce(o(v),{});S===!1&&(j={});const{prevResolvedValues:D={}}=x,N={...D,...j},P=O=>{A=!0,h.has(O)&&(k=!0,h.delete(O)),x.needsAnimating[O]=!0;const F=e.getValue(O);F&&(F.liveStyle=!1)};for(const O in N){const F=j[O],_=D[O];if(d.hasOwnProperty(O))continue;let W=!1;Ll(F)&&Ll(_)?W=!pg(F,_):W=F!==_,W?F!=null?P(O):h.add(O):F!==void 0&&h.has(O)?P(O):x.protectedKeys[O]=!0}x.prevProp=y,x.prevResolvedValues=j,x.isActive&&(d={...d,...j}),r&&e.blockInitialAnimation&&(A=!1),A&&(!E||k)&&f.push(...I.map(O=>({animation:O,options:{type:v}})))}if(h.size){const g={};h.forEach(v=>{const x=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),g[v]=x??null}),f.push({animation:g})}let m=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function a(c,l){var u;if(n[c].isActive===l)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(c,l)}),n[c].isActive=l;const f=s(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=xd(),r=!0}}}function XS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pg(t,e):!1}function Zn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xd(){return{animate:Zn(!0),whileInView:Zn(),whileHover:Zn(),whileTap:Zn(),whileDrag:Zn(),whileFocus:Zn(),exit:Zn()}}class QS extends zn{constructor(t){super(t),t.animationState||(t.animationState=qS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ri(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 ZS=0;class JS extends zn{constructor(){super(...arguments),this.id=ZS++}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 eE={animation:{Feature:QS},exit:{Feature:JS}},wd=(e,t)=>Math.abs(e-t);function tE(e,t){const n=wd(e.x,t.x),r=wd(e.y,t.y);return Math.sqrt(n**2+r**2)}class Qg{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=$a(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=tE(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:v}=this.handlers;h||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Va(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=$a(f.type==="pointercancel"?this.lastMoveEventInfo:Va(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,g),p&&p(f,g)},!cg(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Xs(t),a=Va(s,this.transformPagePoint),{point:c}=a,{timestamp:l}=pt;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,$a(a,this.history)),this.removeListeners=xn(bn(this.contextWindow,"pointermove",this.handlePointerMove),bn(this.contextWindow,"pointerup",this.handlePointerUp),bn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),un(this.updatePoint)}}function Va(e,t){return t?{point:t(e.point)}:e}function Td(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $a({point:e},t){return{point:e,delta:Td(e,Zg(t)),offset:Td(e,nE(t)),velocity:rE(t,.1)}}function nE(e){return e[0]}function Zg(e){return e[e.length-1]}function rE(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>an(t)));)n--;if(!r)return{x:0,y:0};const i=ln(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const Jg=1e-4,oE=1-Jg,iE=1+Jg,ey=.01,sE=0-ey,aE=0+ey;function _t(e){return e.max-e.min}function lE(e,t,n){return Math.abs(e-t)<=n}function Sd(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>=oE&&e.scale<=iE||isNaN(e.scale))&&(e.scale=1),(e.translate>=sE&&e.translate<=aE||isNaN(e.translate))&&(e.translate=0)}function Yo(e,t,n,r){Sd(e.x,t.x,n.x,r?r.originX:void 0),Sd(e.y,t.y,n.y,r?r.originY:void 0)}function Ed(e,t,n){e.min=n.min+t.min,e.max=e.min+_t(t)}function cE(e,t,n){Ed(e.x,t.x,n.x),Ed(e.y,t.y,n.y)}function Cd(e,t,n){e.min=t.min-n.min,e.max=e.min+_t(t)}function Ko(e,t,n){Cd(e.x,t.x,n.x),Cd(e.y,t.y,n.y)}function uE(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 Pd(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 fE(e,{top:t,left:n,bottom:r,right:o}){return{x:Pd(e.x,n,o),y:Pd(e.y,t,r)}}function Rd(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 dE(e,t){return{x:Rd(e.x,t.x),y:Rd(e.y,t.y)}}function hE(e,t){let n=.5;const r=_t(e),o=_t(t);return o>r?n=Yr(t.min,t.max-r,e.min):r>o&&(n=Yr(e.min,e.max-o,t.min)),Nn(0,1,n)}function pE(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 ql=.35;function mE(e=ql){return e===!1?e=0:e===!0&&(e=ql),{x:Id(e,"left","right"),y:Id(e,"top","bottom")}}function Id(e,t,n){return{min:Ad(e,t),max:Ad(e,n)}}function Ad(e,t){return typeof e=="number"?e:e[t]||0}const Od=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mr=()=>({x:Od(),y:Od()}),Dd=()=>({min:0,max:0}),Je=()=>({x:Dd(),y:Dd()});function Bt(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 gE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yE(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 Ba(e){return e===void 0||e===1}function Xl({scale:e,scaleX:t,scaleY:n}){return!Ba(e)||!Ba(t)||!Ba(n)}function er(e){return Xl(e)||ny(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ny(e){return Md(e.x)||Md(e.y)}function Md(e){return e&&e!=="0%"}function bs(e,t,n){const r=e-n,o=t*r;return n+o}function kd(e,t,n,r,o){return o!==void 0&&(e=bs(e,o,r)),bs(e,n,r)+t}function Ql(e,t=0,n=1,r,o){e.min=kd(e.min,t,n,r,o),e.max=kd(e.max,t,n,r,o)}function ry(e,{x:t,y:n}){Ql(e.x,t.translate,t.scale,t.originPoint),Ql(e.y,n.translate,n.scale,n.originPoint)}const Fd=.999999999999,jd=1.0000000000001;function vE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&kr(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,ry(e,s)),r&&er(i.latestValues)&&kr(e,i.latestValues))}t.x<jd&&t.x>Fd&&(t.x=1),t.y<jd&&t.y>Fd&&(t.y=1)}function An(e,t){e.min=e.min+t,e.max=e.max+t}function Nd(e,t,n,r,o=.5){const i=Ve(e.min,e.max,o);Ql(e,t,n,i,r)}function kr(e,t){Nd(e.x,t.x,t.scaleX,t.scale,t.originX),Nd(e.y,t.y,t.scaleY,t.scale,t.originY)}function oy(e,t){return ty(yE(e.getBoundingClientRect(),t))}function bE(e,t,n){const r=oy(e,n),{scroll:o}=t;return o&&(An(r.x,o.offset.x),An(r.y,o.offset.y)),r}const iy=({current:e})=>e?e.ownerDocument.defaultView:null,xE=new WeakMap;class wE{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=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(Xs(u,"page").point)},i=(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),Bt(v=>{let x=this.getAxisMotionValue(v).get()||0;if(sn.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[v];T&&(x=_t(T)*(parseFloat(x)/100))}}this.originPoint[v]=x}),m&&Te.postRender(()=>m(u,f)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=Yl(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(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=TE(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),c=()=>Bt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Qg(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:iy(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:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Te.postRender(()=>s(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||!$i(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=uE(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Or(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=fE(o.layoutBox,n):this.constraints=!1,this.elastic=mE(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Bt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=pE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Or(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 i=bE(r,o.root,this.visualElement.getTransformPagePoint());let s=dE(o.layout.layoutBox,i);if(n){const a=n(gE(s));this.hasMutatedConstraints=!!a,a&&(s=ty(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Bt(u=>{if(!$i(u,n,this.currentDirection))return;let f=c&&c[u]||{};s&&(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,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(pu(t,r,0,n,this.visualElement,!1,Yl(this.visualElement,t)))}stopAnimation(){Bt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Bt(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){Bt(n=>{const{drag:r}=this.getProps();if(!$i(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ve(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Or(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();o[s]=hE({min:c,max:c},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Bt(s=>{if(!$i(s,t,null))return;const a=this.getAxisMotionValue(s),{min:c,max:l}=this.constraints[s];a.set(Ve(c,l,o[s]))})}addListeners(){if(!this.visualElement.current)return;xE.set(this.visualElement,this);const t=this.visualElement.current,n=bn(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Or(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Te.read(r);const s=yn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(Bt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=ql,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function $i(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function TE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class SE extends zn{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new wE(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 Ld=e=>(t,n)=>{e&&Te.postRender(()=>e(t,n))};class EE extends zn{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new Qg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ld(t),onStart:Ld(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Te.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=bn(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 CE(){const e=b.useContext(Us);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _d(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const jo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=_d(e,t.target.x),r=_d(e,t.target.y);return`${n}% ${r}%`}},PE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ln.parse(e);if(o.length>5)return r;const i=Ln.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=c;const l=Ve(a,c,.5);return typeof o[2+s]=="number"&&(o[2+s]/=l),typeof o[3+s]=="number"&&(o[3+s]/=l),i(o)}};class RE extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;P1(IE),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Te.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Uc.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 sy(e){const[t,n]=CE(),r=b.useContext(oi);return w.jsx(RE,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(Um),isPresent:t,safeToRemove:n})}const IE={borderRadius:{...jo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:jo,borderTopRightRadius:jo,borderBottomLeftRadius:jo,borderBottomRightRadius:jo,boxShadow:PE},ay=["TopLeft","TopRight","BottomLeft","BottomRight"],AE=ay.length,Vd=e=>typeof e=="string"?parseFloat(e):e,$d=e=>typeof e=="number"||ae.test(e);function OE(e,t,n,r,o,i){o?(e.opacity=Ve(0,n.opacity!==void 0?n.opacity:1,DE(r)),e.opacityExit=Ve(t.opacity!==void 0?t.opacity:1,0,ME(r))):i&&(e.opacity=Ve(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<AE;s++){const a=`border${ay[s]}Radius`;let c=Bd(t,a),l=Bd(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||$d(c)===$d(l)?(e[a]=Math.max(Ve(Vd(c),Vd(l),r),0),(sn.test(l)||sn.test(c))&&(e[a]+="%")):e[a]=l}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,r))}function Bd(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DE=ly(0,.5,_g),ME=ly(.5,.95,yt);function ly(e,t,n){return r=>r<e?0:r>t?1:n(Yr(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 Hd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zd(e,t,n,r,o){return e-=t,e=bs(e,1/n,r),o!==void 0&&(e=bs(e,1/o,r)),e}function kE(e,t=0,n=1,r=.5,o,i=e,s=e){if(sn.test(t)&&(t=parseFloat(t),t=Ve(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ve(i.min,i.max,r);e===i&&(a-=t),e.min=zd(e.min,t,n,a,o),e.max=zd(e.max,t,n,a,o)}function Ud(e,t,[n,r,o],i,s){kE(e,t[n],t[r],t[o],t.scale,i,s)}const FE=["x","scaleX","originX"],jE=["y","scaleY","originY"];function Gd(e,t,n,r){Ud(e.x,t,FE,n?n.x:void 0,r?r.x:void 0),Ud(e.y,t,jE,n?n.y:void 0,r?r.y:void 0)}function Yd(e){return e.translate===0&&e.scale===1}function cy(e){return Yd(e.x)&&Yd(e.y)}function NE(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 Kd(e){return _t(e.x)/_t(e.y)}function qd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class LE{constructor(){this.members=[]}add(t){qs(this.members,t),t.scheduleRender()}remove(t){if(Si(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _E(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:p}=n;l&&(r=`perspective(${l}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,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const VE=(e,t)=>e.depth-t.depth;class $E{constructor(){this.children=[],this.isDirty=!1}add(t){qs(this.children,t),this.isDirty=!0}remove(t){Si(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(VE),this.isDirty=!1,this.children.forEach(t)}}function BE(e,t){const n=kn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(un(r),e(i-t))};return Te.read(r,!0),()=>un(r)}function fy(e){return e instanceof SVGElement&&e.tagName!=="svg"}function vu(e,t,n){const r=lt(e)?e:Kr(e);return r.start(pu("",r,t,n)),r.animation}const tr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Wa=["","X","Y","Z"],WE={visibility:"hidden"},Xd=1e3;let HE=0;function Ha(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(s={},a=t==null?void 0:t()){this.id=HE++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(tr.totalNodes=tr.resolvedTargetDeltas=tr.recalculatedProjection=0),this.nodes.forEach(GE),this.nodes.forEach(QE),this.nodes.forEach(ZE),this.nodes.forEach(YE),window.MotionDebug&&window.MotionDebug.record(tr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new $E)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new mu),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fy(s),this.instance=s;const{layoutId:c,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(l||c)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=BE(h,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Zd))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&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()||rC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!uy(this.targetLayout,p)||d,y=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const T={...ru(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else h||Zd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,un(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(JE),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.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:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Qd);return}this.isUpdating||this.nodes.forEach(qE),this.isUpdating=!1,this.nodes.forEach(XE),this.nodes.forEach(zE),this.nodes.forEach(UE),this.clearAllSnapshots();const a=kn.now();pt.delta=Nn(0,1e3/60,a-pt.timestamp),pt.timestamp=a,pt.isProcessing=!0,Ma.update.process(pt),Ma.preRender.process(pt),Ma.render.process(pt),pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Uc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KE),this.sharedNodes.forEach(eC)}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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!cy(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;s&&(a||er(this.latestValues)||u)&&(o(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),oC(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Je();const a=s.measureViewportBox(),{scroll:c}=this.root;return c&&(An(a.x,c.offset.x),An(a.y,c.offset.y)),a}removeElementScroll(s){const a=Je();$t(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:f}=l;if(l!==this.root&&u&&f.layoutScroll){if(u.isRoot){$t(a,s);const{scroll:h}=this.root;h&&(An(a.x,-h.offset.x),An(a.y,-h.offset.y))}An(a.x,u.offset.x),An(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const c=Je();$t(c,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&kr(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),er(u.latestValues)&&kr(c,u.latestValues)}return er(this.latestValues)&&kr(c,this.latestValues),c}removeTransform(s){const a=Je();$t(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!er(l.latestValues))continue;Xl(l.latestValues)&&l.updateSnapshot();const u=Je(),f=l.measurePageBox();$t(u,f),Gd(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return er(this.latestValues)&&Gd(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==c;if(!(s||l&&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(),Ko(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(),cE(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(),Ko(this.relativeTargetOrigin,this.target,d.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&tr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Xl(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 s;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(l=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===pt.timestamp&&(l=!1),l)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;vE(this.layoutCorrected,this.treeScale,this.path,c),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():(Hd(this.prevProjectionDelta.x,this.projectionDelta.x),Hd(this.prevProjectionDelta.y,this.projectionDelta.y)),Yo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!qd(this.projectionDelta.x,this.prevProjectionDelta.x)||!qd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&tr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mr(),this.projectionDelta=Mr(),this.projectionDeltaWithTransform=Mr()}setAnimationOrigin(s,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=Mr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Je(),d=c?c.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,g=this.getStack(),v=!g||g.members.length<=1,x=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(nC));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/1e3;Jd(f.x,s.x,S),Jd(f.y,s.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ko(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),tC(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&NE(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Je()),$t(y,this.relativeTarget)),m&&(this.animationValues=u,OE(u,l,this.latestValues,S,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Te.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=vu(0,Xd,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=s;if(!(!a||!c||!l)){if(this!==s&&this.layout&&l&&py(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Je();const f=_t(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const h=_t(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+h}$t(a,c),kr(a,u),Yo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new LE),this.sharedNodes.get(s).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Ha("z",s,l,this.animationValues);for(let u=0;u<Wa.length;u++)Ha(`rotate${Wa[u]}`,s,l,this.animationValues),Ha(`skew${Wa[u]}`,s,l,this.animationValues);s.render();for(const u in l)s.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);s.scheduleRender()}getProjectionStyles(s){var a,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return WE;const l={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=es(s==null?void 0:s.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none",l;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=es(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!er(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),l.transform=_E(this.projectionDeltaWithTransform,this.treeScale,h),u&&(l.transform=u(h,l.transform));const{x:d,y:p}=this.projectionDelta;l.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?l.opacity=f===this?(c=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in ps){if(h[m]===void 0)continue;const{correct:g,applyTo:v}=ps[m],x=l.transform==="none"?h[m]:g(h[m],f);if(v){const y=v.length;for(let T=0;T<y;T++)l[v[T]]=x}else l[m]=x}return this.options.layoutId&&(l.pointerEvents=f===this?es(s==null?void 0:s.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Qd),this.root.sharedNodes.clear()}}}function zE(e){e.updateLayout()}function UE(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?Bt(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],d=_t(h);h.min=r[f].min,h.max=h.min+d}):py(i,n.layoutBox,r)&&Bt(f=>{const h=s?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=Mr();Yo(a,r,n.layoutBox);const c=Mr();s?Yo(c,e.applyTransform(o,!0),n.measuredBox):Yo(c,r,n.layoutBox);const l=!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();Ko(p,n.layoutBox,h.layoutBox);const m=Je();Ko(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:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function GE(e){window.MotionDebug&&tr.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 YE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function KE(e){e.clearSnapshot()}function Qd(e){e.clearMeasurements()}function qE(e){e.isLayoutDirty=!1}function XE(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Zd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function QE(e){e.resolveTargetDelta()}function ZE(e){e.calcProjection()}function JE(e){e.resetSkewAndRotation()}function eC(e){e.removeLeadSnapshot()}function Jd(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 eh(e,t,n,r){e.min=Ve(t.min,n.min,r),e.max=Ve(t.max,n.max,r)}function tC(e,t,n,r){eh(e.x,t.x,n.x,r),eh(e.y,t.y,n.y,r)}function nC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const rC={duration:.45,ease:[.4,0,.1,1]},th=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nh=th("applewebkit/")&&!th("chrome/")?Math.round:yt;function rh(e){e.min=nh(e.min),e.max=nh(e.max)}function oC(e){rh(e.x),rh(e.y)}function py(e,t,n){return e==="position"||e==="preserve-aspect"&&!lE(Kd(t),Kd(n),.2)}const iC=hy({attachResizeListener:(e,t)=>yn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),za={current:void 0},my=hy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!za.current){const e=new iC({});e.mount(window),e.setOptions({layoutScroll:!0}),za.current=e}return za.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),sC={pan:{Feature:EE},drag:{Feature:SE,ProjectionNode:my,MeasureLayout:sy}},Zl={current:null},gy={current:!1};function aC(){if(gy.current=!0,!!zc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zl.current=e.matches;e.addListener(t),t()}else Zl.current=!1}function lC(e,t,n){for(const r in t){const o=t[r],i=n[r];if(lt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&gu(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(i))e.addValue(r,Kr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,Kr(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const si=new WeakMap,cC=[...bg,bt,Ln],uC=e=>cC.find(vg(e)),oh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fC=Yc.length;class dC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},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=ou,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:c,renderState:l}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Ks(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];c[h]!==void 0&<(d)&&d.set(c[h],!1)}}mount(t){this.current=t,si.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||aC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zl.current,process.env.NODE_ENV!=="production"&&gu(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(){si.delete(this.current),this.projection&&this.projection.unmount(),un(this.notifyUpdate),un(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=Hn.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ur){const n=Ur[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):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<oh.length;r++){const o=oh[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=lC(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<fC;r++){const o=Yc[r],i=this.props[o];(ni(i)||i===!1)&&(n[o]=i)}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=Kr(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):!uC(o)&&Ln.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 s=nu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!lt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class yy extends dC{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 hC(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(Hn.has(n)){const r=su(n);return r&&r.default||0}else{const r=hC(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){Qc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tu(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(Hn.has(n)){const r=su(n);return r&&r.default||0}return n=rg.has(n)?n:Ys(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ig(t,n,r)}build(t,n,r){Jc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){og(t,n,r,o)}mount(t){this.isSVGTag=eu(t.tagName),super.mount(t)}}const pC=(e,t)=>Kc(e)?new by(t):new vy(t,{allowProjection:e!==b.Fragment}),mC={layout:{ProjectionNode:my,MeasureLayout:sy}},gC={...eE,...gT,...sC,...mC},ft=E1((e,t)=>rT(e,t,gC,pC));function xy(){const e=b.useRef(!1);return Gs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function wy(){const e=xy(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Te.postRender(r),[r]),t]}class yC 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 vC({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(zr);return b.useInsertionEffect(()=>{const{width:s,height:a,top:c,left:l}=o.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
5
5
|
[data-motion-pop-id="${n}"] {
|
|
6
6
|
position: absolute !important;
|
|
7
7
|
width: ${s}px !important;
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
top: ${c}px !important;
|
|
10
10
|
left: ${l}px !important;
|
|
11
11
|
}
|
|
12
|
-
`),()=>{document.head.removeChild(u)}},[t]),w.jsx(yC,{isPresent:t,childRef:r,sizeRef:o,children:C.cloneElement(e,{ref:r})})}const Ua=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=cn(bC),c=b.useId(),l=b.useMemo(()=>({id:c,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))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),C.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=w.jsx(vC,{isPresent:n,children:e})),w.jsx(Us.Provider,{value:l,children:e})};function bC(){return new Map}function wy(e){return b.useEffect(()=>()=>e(),[])}const nr=e=>e.key||"";function xC(e,t){e.forEach(n=>{const r=nr(n);t.set(r,n)})}function wC(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const go=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Lt(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(oi).forceRender||xy()[0],c=by(),l=wC(e);let u=l;const f=b.useRef(new Map).current,h=b.useRef(u),d=b.useRef(new Map).current,p=b.useRef(!0);if(Gs(()=>{p.current=!1,xC(l,d),h.current=u}),wy(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return w.jsx(w.Fragment,{children:u.map(x=>w.jsx(Ua,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:x},nr(x)))});u=[...u];const m=h.current.map(nr),y=l.map(nr),g=m.length;for(let x=0;x<g;x++){const v=m[x];y.indexOf(v)===-1&&!f.has(v)&&f.set(v,void 0)}return s==="wait"&&f.size&&(u=[]),f.forEach((x,v)=>{if(y.indexOf(v)!==-1)return;const S=d.get(v);if(!S)return;const T=m.indexOf(v);let E=x;if(!E){const A=()=>{f.delete(v);const I=Array.from(d.keys()).filter(O=>!y.includes(O));if(I.forEach(O=>d.delete(O)),h.current=l.filter(O=>{const R=nr(O);return R===v||I.includes(R)}),!f.size){if(c.current===!1)return;a(),r&&r()}};E=w.jsx(Ua,{isPresent:!1,onExitComplete:A,custom:t,presenceAffectsLayout:i,mode:s,children:S},nr(S)),f.set(v,E)}u.splice(T,0,E)}),u=u.map(x=>{const v=x.key;return f.has(v)?x:w.jsx(Ua,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:x},nr(x))}),process.env.NODE_ENV!=="production"&&s==="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.`),w.jsx(w.Fragment,{children:f.size?u:u.map(x=>b.cloneElement(x))})};function TC({children:e,isValidProp:t,...n}){t&&Jm(t),n={...b.useContext(zr),...n},n.isStatic=cn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(zr.Provider,{value:r,children:e})}const SC=b.createContext(null),EC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function oh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(EC);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 Ty=e=>e===!0,CC=e=>Ty(e===!0)||e==="id",PC=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(oi),o=b.useContext(SC),[i,s]=xy(),a=b.useRef(null),c=r.id||o;a.current===null&&(CC(n)&&c&&(t=t?c+"-"+t:c),a.current={id:t,group:Ty(n)&&r.group||oh()});const l=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return w.jsx(oi.Provider,{value:l,children:e})},Sy=b.createContext(null);function RC(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],c=s.layout,l=Ve(c.min,c.max,.5);return i===1&&a.layout.max+n>l||i===-1&&a.layout.min+n<l?Q1(e,o,o+i):e}function IC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=cn(()=>ft(t)),c=[],l=b.useRef(!1);Lt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,h)=>{const d=c.findIndex(p=>f===p.value);d!==-1?c[d].layout=h[n]:c.push({value:f,layout:h[n]}),c.sort(DC)},updateOrder:(f,h,d)=>{if(l.current)return;const p=RC(c,f,h,d);c!==p&&(l.current=!0,r(p.map(OC).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{l.current=!1}),w.jsx(a,{...i,ref:s,ignoreStrict:!0,children:w.jsx(Sy.Provider,{value:u,children:e})})}const AC=b.forwardRef(IC);function OC(e){return e.value}function DC(e,t){return e.layout.min-t.layout.min}function qr(e){const t=cn(()=>Kr(e)),{isStatic:n}=b.useContext(zr);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const MC=e=>e&&typeof e=="object"&&e.mix,kC=e=>MC(e)?e.mix:void 0;function FC(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=Bg(o,i,{mixer:kC(i[0]),...s});return t?a(r):a}function Ey(e,t){const n=qr(t()),r=()=>n.set(t());return r(),Gs(()=>{const o=()=>Te.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),un(r)}}),n}function jC(e){Go.current=[],e();const t=Ey(Go.current,e);return Go.current=void 0,t}function NC(e,t,n,r){if(typeof e=="function")return jC(e);const o=typeof t=="function"?t:FC(t,n,r);return Array.isArray(e)?ih(e,o):ih([e],([i])=>o(i))}function ih(e,t){const n=cn(()=>[]);return Ey(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function sh(e,t=0){return lt(e)?e:qr(t)}function LC({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const c=cn(()=>ft(r)),l=b.useContext(Sy),u={x:sh(t.x),y:sh(t.y)},f=NC([u.x,u.y],([m,y])=>m||y?1:"unset");Lt(!!l,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:d,updateOrder:p}=l;return w.jsx(c,{drag:h,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:f},layout:i,onDrag:(m,y)=>{const{velocity:g}=y;g[h]&&p(n,u[h].get(),g[h]),o&&o(m,y)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:e})}const _C=b.forwardRef(LC),Js={Group:AC,Item:_C};function Cy(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 VC(e){return typeof e=="object"&&!Array.isArray(e)}function $C(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=uy(e)?new vy(t):new yy(t);n.mount(e),si.set(e,n)}function BC(e,t=100){const n=au({keyframes:[0,t],...e}),r=Math.min(zg(n),Gl);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:ln(r)}}function ah(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 WC=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function HC(e,t){return Fg(e)?e[WC(0,e.length,t)]:e}function zC(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Si(e,o),r--)}}function UC(e,t,n,r,o,i){zC(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Ve(o,i,r[s]),easing:HC(n,s)})}function GC(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const YC="easeInOut";function KC(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,i=new Map,s=new Map,a={},c=new Map;let l=0,u=0,f=0;for(let h=0;h<e.length;h++){const d=e[h];if(typeof d=="string"){c.set(d,u);continue}else if(!Array.isArray(d)){c.set(d.name,ah(u,d.at,l,c));continue}let[p,m,y={}]=d;y.at!==void 0&&(u=ah(u,y.at,l,c));let g=0;const x=(v,S,T,E=0,A=0)=>{const I=qC(v),{delay:O=0,times:R=Hg(I),type:j="keyframes",...k}=S;let{ease:L=t.ease||"easeOut",duration:P}=S;const M=typeof O=="function"?O(E,A):O,F=I.length;if(F<=2&&j==="spring"){let D=100;if(F===2&&ZC(I)){const J=I[1]-I[0];D=Math.abs(J)}const $={...k};P!==void 0&&($.duration=an(P));const q=BC($,D);L=q.ease,P=q.duration}P??(P=o);const _=u+M,W=_+P;R.length===1&&R[0]===0&&(R[1]=1);const U=R.length-I.length;U>0&&Wg(R,U),I.length===1&&I.unshift(null),UC(T,I,L,R,_,W),g=Math.max(M+P,g),f=Math.max(W,f)};if(lt(p)){const v=lh(p,s);x(m,y,ch("default",v))}else{const v=Cy(p,r,a),S=v.length;for(let T=0;T<S;T++){m=m,y=y;const E=v[T],A=lh(E,s);for(const I in m)x(m[I],XC(y,I),ch(I,A),T,S)}}l=u,u+=g}return s.forEach((h,d)=>{for(const p in h){const m=h[p];m.sort(GC);const y=[],g=[],x=[];for(let S=0;S<m.length;S++){const{at:T,value:E,easing:A}=m[S];y.push(E),g.push(Yr(0,f,T)),x.push(A||"easeOut")}g[0]!==0&&(g.unshift(0),y.unshift(y[0]),x.unshift(YC)),g[g.length-1]!==1&&(g.push(1),y.push(null)),i.has(d)||i.set(d,{keyframes:{},transition:{}});const v=i.get(d);v.keyframes[p]=y,v.transition[p]={...t,duration:f,ease:x,times:g,...n}}}),i}function lh(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ch(e,t){return t[e]||(t[e]=[]),t[e]}function qC(e){return Array.isArray(e)?e:[e]}function XC(e,t){return e[t]?{...e,...e[t]}:{...e}}const QC=e=>typeof e=="number",ZC=e=>e.every(QC);function Py(e,t,n,r){const o=Cy(e,r),i=o.length;Lt(!!i,"No valid element provided.");const s=[];for(let a=0;a<i;a++){const c=o[a];si.has(c)||$C(c);const l=si.get(c),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,i)),s.push(...yu(l,{...t,transition:u},{}))}return new hu(s)}const JC=e=>Array.isArray(e)&&Array.isArray(e[0]);function eP(e,t,n){const r=[];return KC(e,t,n).forEach(({keyframes:i,transition:s},a)=>{let c;lt(a)?c=vu(a,i.default,s.default):c=Py(a,i,s),r.push(c)}),new hu(r)}const tP=e=>{function t(n,r,o){let i;return JC(n)?i=eP(n,r,e):VC(r)?i=Py(n,r,o,e):i=vu(n,r,o),e&&e.animations.push(i),i}return t};function nP(){const e=cn(()=>({current:null,animations:[]})),t=cn(()=>tP(e));return wy(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class rP{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 oP=()=>new rP;function iP(){return cn(oP)}function sP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function aP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:sP(n,i),a=Math.abs(s-o);let c=e*a;if(r){const l=i*e;c=zl(r)(c/l)*l}return t+c}}/**
|
|
12
|
+
`),()=>{document.head.removeChild(u)}},[t]),w.jsx(yC,{isPresent:t,childRef:r,sizeRef:o,children:C.cloneElement(e,{ref:r})})}const Ua=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=cn(bC),c=b.useId(),l=b.useMemo(()=>({id:c,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))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),C.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=w.jsx(vC,{isPresent:n,children:e})),w.jsx(Us.Provider,{value:l,children:e})};function bC(){return new Map}function Ty(e){return b.useEffect(()=>()=>e(),[])}const nr=e=>e.key||"";function xC(e,t){e.forEach(n=>{const r=nr(n);t.set(r,n)})}function wC(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const go=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Lt(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(oi).forceRender||wy()[0],c=xy(),l=wC(e);let u=l;const f=b.useRef(new Map).current,h=b.useRef(u),d=b.useRef(new Map).current,p=b.useRef(!0);if(Gs(()=>{p.current=!1,xC(l,d),h.current=u}),Ty(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return w.jsx(w.Fragment,{children:u.map(x=>w.jsx(Ua,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:x},nr(x)))});u=[...u];const m=h.current.map(nr),g=l.map(nr),v=m.length;for(let x=0;x<v;x++){const y=m[x];g.indexOf(y)===-1&&!f.has(y)&&f.set(y,void 0)}return s==="wait"&&f.size&&(u=[]),f.forEach((x,y)=>{if(g.indexOf(y)!==-1)return;const T=d.get(y);if(!T)return;const S=m.indexOf(y);let E=x;if(!E){const R=()=>{f.delete(y);const A=Array.from(d.keys()).filter(k=>!g.includes(k));if(A.forEach(k=>d.delete(k)),h.current=l.filter(k=>{const I=nr(k);return I===y||A.includes(I)}),!f.size){if(c.current===!1)return;a(),r&&r()}};E=w.jsx(Ua,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:i,mode:s,children:T},nr(T)),f.set(y,E)}u.splice(S,0,E)}),u=u.map(x=>{const y=x.key;return f.has(y)?x:w.jsx(Ua,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:x},nr(x))}),process.env.NODE_ENV!=="production"&&s==="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.`),w.jsx(w.Fragment,{children:f.size?u:u.map(x=>b.cloneElement(x))})};function TC({children:e,isValidProp:t,...n}){t&&eg(t),n={...b.useContext(zr),...n},n.isStatic=cn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(zr.Provider,{value:r,children:e})}const SC=b.createContext(null),EC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function ih(){const e=new Set,t=new WeakMap,n=()=>e.forEach(EC);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,CC=e=>Sy(e===!0)||e==="id",PC=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(oi),o=b.useContext(SC),[i,s]=wy(),a=b.useRef(null),c=r.id||o;a.current===null&&(CC(n)&&c&&(t=t?c+"-"+t:c),a.current={id:t,group:Sy(n)&&r.group||ih()});const l=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return w.jsx(oi.Provider,{value:l,children:e})},Ey=b.createContext(null);function RC(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],c=s.layout,l=Ve(c.min,c.max,.5);return i===1&&a.layout.max+n>l||i===-1&&a.layout.min+n<l?Q1(e,o,o+i):e}function IC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=cn(()=>ft(t)),c=[],l=b.useRef(!1);Lt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,h)=>{const d=c.findIndex(p=>f===p.value);d!==-1?c[d].layout=h[n]:c.push({value:f,layout:h[n]}),c.sort(DC)},updateOrder:(f,h,d)=>{if(l.current)return;const p=RC(c,f,h,d);c!==p&&(l.current=!0,r(p.map(OC).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{l.current=!1}),w.jsx(a,{...i,ref:s,ignoreStrict:!0,children:w.jsx(Ey.Provider,{value:u,children:e})})}const AC=b.forwardRef(IC);function OC(e){return e.value}function DC(e,t){return e.layout.min-t.layout.min}function qr(e){const t=cn(()=>Kr(e)),{isStatic:n}=b.useContext(zr);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const MC=e=>e&&typeof e=="object"&&e.mix,kC=e=>MC(e)?e.mix:void 0;function FC(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=Wg(o,i,{mixer:kC(i[0]),...s});return t?a(r):a}function Cy(e,t){const n=qr(t()),r=()=>n.set(t());return r(),Gs(()=>{const o=()=>Te.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),un(r)}}),n}function jC(e){Go.current=[],e();const t=Cy(Go.current,e);return Go.current=void 0,t}function NC(e,t,n,r){if(typeof e=="function")return jC(e);const o=typeof t=="function"?t:FC(t,n,r);return Array.isArray(e)?sh(e,o):sh([e],([i])=>o(i))}function sh(e,t){const n=cn(()=>[]);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 ah(e,t=0){return lt(e)?e:qr(t)}function LC({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const c=cn(()=>ft(r)),l=b.useContext(Ey),u={x:ah(t.x),y:ah(t.y)},f=NC([u.x,u.y],([m,g])=>m||g?1:"unset");Lt(!!l,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:d,updateOrder:p}=l;return w.jsx(c,{drag:h,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:f},layout:i,onDrag:(m,g)=>{const{velocity:v}=g;v[h]&&p(n,u[h].get(),v[h]),o&&o(m,g)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:e})}const _C=b.forwardRef(LC),Js={Group:AC,Item:_C};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 VC(e){return typeof e=="object"&&!Array.isArray(e)}function $C(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=fy(e)?new by(t):new vy(t);n.mount(e),si.set(e,n)}function BC(e,t=100){const n=au({keyframes:[0,t],...e}),r=Math.min(Ug(n),Gl);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:ln(r)}}function lh(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 WC=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function HC(e,t){return jg(e)?e[WC(0,e.length,t)]:e}function zC(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Si(e,o),r--)}}function UC(e,t,n,r,o,i){zC(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Ve(o,i,r[s]),easing:HC(n,s)})}function GC(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const YC="easeInOut";function KC(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,i=new Map,s=new Map,a={},c=new Map;let l=0,u=0,f=0;for(let h=0;h<e.length;h++){const d=e[h];if(typeof d=="string"){c.set(d,u);continue}else if(!Array.isArray(d)){c.set(d.name,lh(u,d.at,l,c));continue}let[p,m,g={}]=d;g.at!==void 0&&(u=lh(u,g.at,l,c));let v=0;const x=(y,T,S,E=0,R=0)=>{const A=qC(y),{delay:k=0,times:I=zg(A),type:j="keyframes",...D}=T;let{ease:N=t.ease||"easeOut",duration:P}=T;const O=typeof k=="function"?k(E,R):k,F=A.length;if(F<=2&&j==="spring"){let M=100;if(F===2&&ZC(A)){const J=A[1]-A[0];M=Math.abs(J)}const V={...D};P!==void 0&&(V.duration=an(P));const q=BC(V,M);N=q.ease,P=q.duration}P??(P=o);const _=u+O,W=_+P;I.length===1&&I[0]===0&&(I[1]=1);const U=I.length-A.length;U>0&&Hg(I,U),A.length===1&&A.unshift(null),UC(S,A,N,I,_,W),v=Math.max(O+P,v),f=Math.max(W,f)};if(lt(p)){const y=ch(p,s);x(m,g,uh("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=ch(E,s);for(const A in m)x(m[A],XC(g,A),uh(A,R),S,T)}}l=u,u+=v}return s.forEach((h,d)=>{for(const p in h){const m=h[p];m.sort(GC);const g=[],v=[],x=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:R}=m[T];g.push(E),v.push(Yr(0,f,S)),x.push(R||"easeOut")}v[0]!==0&&(v.unshift(0),g.unshift(g[0]),x.unshift(YC)),v[v.length-1]!==1&&(v.push(1),g.push(null)),i.has(d)||i.set(d,{keyframes:{},transition:{}});const y=i.get(d);y.keyframes[p]=g,y.transition[p]={...t,duration:f,ease:x,times:v,...n}}}),i}function ch(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function uh(e,t){return t[e]||(t[e]=[]),t[e]}function qC(e){return Array.isArray(e)?e:[e]}function XC(e,t){return e[t]?{...e,...e[t]}:{...e}}const QC=e=>typeof e=="number",ZC=e=>e.every(QC);function Ry(e,t,n,r){const o=Py(e,r),i=o.length;Lt(!!i,"No valid element provided.");const s=[];for(let a=0;a<i;a++){const c=o[a];si.has(c)||$C(c);const l=si.get(c),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,i)),s.push(...yu(l,{...t,transition:u},{}))}return new hu(s)}const JC=e=>Array.isArray(e)&&Array.isArray(e[0]);function eP(e,t,n){const r=[];return KC(e,t,n).forEach(({keyframes:i,transition:s},a)=>{let c;lt(a)?c=vu(a,i.default,s.default):c=Ry(a,i,s),r.push(c)}),new hu(r)}const tP=e=>{function t(n,r,o){let i;return JC(n)?i=eP(n,r,e):VC(r)?i=Ry(n,r,o,e):i=vu(n,r,o),e&&e.animations.push(i),i}return t};function nP(){const e=cn(()=>({current:null,animations:[]})),t=cn(()=>tP(e));return Ty(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class rP{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 oP=()=>new rP;function iP(){return cn(oP)}function sP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function aP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:sP(n,i),a=Math.abs(s-o);let c=e*a;if(r){const l=i*e;c=zl(r)(c/l)*l}return t+c}}/**
|
|
13
13
|
* @license lucide-react v0.414.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
16
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const lP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),
|
|
17
|
+
*/const lP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Iy=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
18
18
|
* @license lucide-react v0.414.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const uP=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},c)=>b.createElement("svg",{ref:c,...cP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:
|
|
27
|
+
*/const uP=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},c)=>b.createElement("svg",{ref:c,...cP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Iy("lucide",o),...a},[...s.map(([l,u])=>b.createElement(l,u)),...Array.isArray(i)?i:[i]]));/**
|
|
28
28
|
* @license lucide-react v0.414.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const Xe=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(uP,{ref:i,iconNode:t,className:
|
|
32
|
+
*/const Xe=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(uP,{ref:i,iconNode:t,className:Iy(`lucide-${lP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
33
33
|
* @license lucide-react v0.414.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const Ay=Xe("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
48
48
|
* @license lucide-react v0.414.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const Oy=Xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
63
63
|
* @license lucide-react v0.414.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const Dy=Xe("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
78
78
|
* @license lucide-react v0.414.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
97
|
+
*/const My=Xe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
98
98
|
* @license lucide-react v0.414.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
@@ -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 wu=Xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),uh={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},CP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},My=e=>w.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:ke("aria-hidden:pointer-events-none",e.className),exit:uh.false,transition:CP,variants:uh,children:e.children}),PP=lo("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"}}),RP=b.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const c=()=>o==null?void 0:o(!1);return w.jsx("div",{"data-open":!!i,"aria-hidden":!i,className:"pointer-events-none w-full isolate aria-hidden:pointer-events-auto",children:w.jsx(My,{"data-open":!!i,open:!!i,children:w.jsxs(ho,{...s,className:ke(PP({theme:n}),t),ref:a,"data-theme":n,role:"alert",as:s.as??"div",children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?w.jsx(Oy,{size:20}):null,!r&&n==="info"?w.jsx(Dy,{size:20}):null,!r&&n==="danger"?w.jsx(TP,{size:20}):null,r,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:s.title})]}),s.children,o!==void 0?w.jsx("button",{type:"button",onClick:c,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:w.jsx(wu,{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 yo(e,t){const n=Se(e);return isNaN(t)?_e(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ea(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 i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const ky=6048e5,IP=864e5,AP=6e4,OP=36e5,DP=1e3;let MP={};function vr(){return MP}function fn(e,t){var a,c,l,u;const n=vr(),r=(t==null?void 0:t.weekStartsOn)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.weekStartsOn)??0,o=Se(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Qr(e){return fn(e,{weekStartsOn:1})}function Fy(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=Qr(r),i=_e(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=Qr(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Zr(e){const t=Se(e);return t.setHours(0,0,0,0),t}function xs(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 kP(e,t){const n=Zr(e),r=Zr(t),o=+n-xs(n),i=+r-xs(r);return Math.round((o-i)/IP)}function FP(e){const t=Fy(e),n=_e(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Qr(n)}function jy(e,t){const n=t*7;return yo(e,n)}function Ny(e,t){return ea(e,t*12)}function jP(e){return _e(e,Date.now())}function NP(e,t){const n=Zr(e),r=Zr(t);return+n==+r}function LP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ly(e){if(!LP(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 i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const c=[];for(;+s<=i;)c.push(Se(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?c.reverse():c}function Vy(e){const t=Se(e);return t.setDate(1),t.setHours(0,0,0,0),t}function _P(e){const t=Se(e),n=_e(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function VP(e,t){var a,c;const n=vr(),r=n.weekStartsOn??((c=(a=n.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??0,o=Se(e),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const $P={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"}},BP=(e,t,n)=>{let r;const o=$P[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 Ga(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const WP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},UP={date:Ga({formats:WP,defaultWidth:"full"}),time:Ga({formats:HP,defaultWidth:"full"}),dateTime:Ga({formats:zP,defaultWidth:"full"})},GP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},YP=(e,t,n,r)=>GP[e];function No(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const KP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},XP={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"]},QP={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"]},ZP={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"}},JP={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"}},eR=(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"},tR={ordinalNumber:eR,era:No({values:KP,defaultWidth:"wide"}),quarter:No({values:qP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:No({values:XP,defaultWidth:"wide"}),day:No({values:QP,defaultWidth:"wide"}),dayPeriod:No({values:ZP,defaultWidth:"wide",formattingValues:JP,defaultFormattingWidth:"wide"})};function Lo(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?rR(a,f=>f.test(s)):nR(a,f=>f.test(s));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(s.length);return{value:l,rest:u}}}function nR(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function rR(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oR(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const iR=/^(\d+)(th|st|nd|rd)?/i,sR=/\d+/i,aR={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},lR={any:[/^b/i,/^(a|c)/i]},cR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},uR={any:[/1/i,/2/i,/3/i,/4/i]},fR={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},dR={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]},hR={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},pR={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]},mR={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},gR={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}},yR={ordinalNumber:oR({matchPattern:iR,parsePattern:sR,valueCallback:e=>parseInt(e,10)}),era:Lo({matchPatterns:aR,defaultMatchWidth:"wide",parsePatterns:lR,defaultParseWidth:"any"}),quarter:Lo({matchPatterns:cR,defaultMatchWidth:"wide",parsePatterns:uR,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Lo({matchPatterns:fR,defaultMatchWidth:"wide",parsePatterns:dR,defaultParseWidth:"any"}),day:Lo({matchPatterns:hR,defaultMatchWidth:"wide",parsePatterns:pR,defaultParseWidth:"any"}),dayPeriod:Lo({matchPatterns:mR,defaultMatchWidth:"any",parsePatterns:gR,defaultParseWidth:"any"})},$y={code:"en-US",formatDistance:BP,formatLong:UP,formatRelative:YP,localize:tR,match:yR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vR(e){const t=Se(e);return kP(t,_P(t))+1}function By(e){const t=Se(e),n=+Qr(t)-+FP(t);return Math.round(n/ky)+1}function Tu(e,t){var u,f,h,d;const n=Se(e),r=n.getFullYear(),o=vr(),i=(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,s=_e(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=fn(s,t),c=_e(e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const l=fn(c,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function bR(e,t){var a,c,l,u;const n=vr(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.firstWeekContainsDate)??1,o=Tu(e,t),i=_e(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),fn(i,t)}function Wy(e,t){const n=Se(e),r=+fn(n,t)-+bR(n,t);return Math.round(r/ky)+1}function Ae(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Pn={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)}},Cr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},fh={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 Pn.y(e,t)},Y:function(e,t,n,r){const o=Tu(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return Ae(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ae(i,t.length)},R:function(e,t){const n=Fy(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 Pn.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=Wy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ae(o,t.length)},I:function(e,t,n){const r=By(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"}):Pn.d(e,t)},D:function(e,t,n){const r=vR(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(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ae(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ae(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return 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=Cr.noon:r===0?o=Cr.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=Cr.evening:r>=12?o=Cr.afternoon:r>=4?o=Cr.morning:o=Cr.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 Pn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Pn.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"}):Pn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Pn.s(e,t)},S:function(e,t){return Pn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return hh(r);case"XXXX":case"XX":return rr(r);case"XXXXX":case"XXX":default:return rr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return hh(r);case"xxxx":case"xx":return rr(r);case"xxxxx":case"xxx":default:return rr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+dh(r,":");case"OOOO":default:return"GMT"+rr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+dh(r,":");case"zzzz":default:return"GMT"+rr(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 dh(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+Ae(i,2)}function hh(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):rr(e,t)}function rr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ae(Math.trunc(r/60),2),i=Ae(r%60,2);return n+o+t+i}const ph=(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"})}},Hy=(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"})}},xR=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ph(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",ph(r,t)).replace("{{time}}",Hy(o,t))},Jl={p:Hy,P:xR},wR=/^D+$/,TR=/^Y+$/,SR=["D","DD","YY","YYYY"];function zy(e){return wR.test(e)}function Uy(e){return TR.test(e)}function ec(e,t,n){const r=ER(e,t,n);if(console.warn(r),SR.includes(e))throw new RangeError(r)}function ER(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 CR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,PR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RR=/^'([^]*?)'?$/,IR=/''/g,AR=/[a-zA-Z]/;function OR(e,t,n){var u,f,h,d;const r=vr(),o=r.locale??$y,i=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=r.weekStartsOn??((d=(h=r.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,a=Se(e);if(!Ly(a))throw new RangeError("Invalid time value");let c=t.match(PR).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=Jl[m];return y(p,o.formatLong)}return p}).join("").match(CR).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:DR(p)};if(fh[m])return{isToken:!0,value:p};if(m.match(AR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const l={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return c.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Uy(m)||zy(m))&&ec(m,t,String(e));const y=fh[m[0]];return y(a,m,o.localize,l)}).join("")}function DR(e){const t=e.match(RR);return t?t[1].replace(IR,"'"):e}function MR(){return Object.assign({},vr())}function kR(e){let n=Se(e).getDay();return n===0&&(n=7),n}function FR(e,t){const n=Se(e),r=Se(t);return n.getTime()>r.getTime()}function jR(e,t){const n=Se(e),r=Se(t);return+n<+r}function NR(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 LR=10;class Gy{constructor(){te(this,"subPriority",0)}validate(t,n){return!0}}class _R extends Gy{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class VR extends Gy{constructor(){super(...arguments);te(this,"priority",LR);te(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:_e(n,NR(n,Date))}}class Ee{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new _R(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class $R 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}/},en={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 tn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*OP+i*AP+s*DP),rest:t.slice(n[0].length)}}function Yy(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 ws(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 Su(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 Ky(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function qy(e){return e%400===0||e%4===0&&e%100!==0}class BR 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 i=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return nt(qe(4,n),i);case"yo":return nt(o.ordinalNumber(n,{unit:"year"}),i);default:return nt(qe(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const a=Ky(o.year,i);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}}class WR 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 i=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return nt(qe(4,n),i);case"Yo":return nt(o.ordinalNumber(n,{unit:"year"}),i);default:return nt(qe(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=Tu(n,i);if(o.isTwoDigitYear){const c=Ky(o.year,s);return n.setFullYear(c,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),fn(n,i)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),fn(n,i)}}class HR 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 ws(r==="R"?4:r.length,n)}set(n,r,o){const i=_e(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Qr(i)}}class zR 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 ws(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class UR 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 GR 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 YR 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 i=s=>s-1;switch(r){case"M":return nt(ze(tt.month,n),i);case"MM":return nt(qe(2,n),i);case"Mo":return nt(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class KR 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 i=s=>s-1;switch(r){case"L":return nt(ze(tt.month,n),i);case"LL":return nt(qe(2,n),i);case"Lo":return nt(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function qR(e,t,n){const r=Se(e),o=Wy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class XR 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,i){return fn(qR(n,o,i),i)}}function QR(e,t){const n=Se(e),r=By(n)-t;return n.setDate(n.getDate()-r*7),n}class ZR 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 Qr(QR(n,o))}}const JR=[31,28,31,30,31,30,31,31,30,31,30,31],eI=[31,29,31,30,31,30,31,31,30,31,30,31];class tI 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(),i=qy(o),s=n.getMonth();return i?r>=1&&r<=eI[s]:r>=1&&r<=JR[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class nI 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 Eu(e,t,n){var f,h,d,p;const r=vr(),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,i=Se(e),s=i.getDay(),c=(t%7+7)%7,l=7-o,u=t<0||t>6?t-(s+l)%7:(c+l)%7-(s+l)%7;return yo(i,u)}class rI 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,i){return n=Eu(n,o,i),n.setHours(0,0,0,0),n}}class oI 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,i){const s=a=>{const c=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+c};switch(r){case"e":case"ee":return nt(qe(r.length,n),s);case"eo":return nt(o.ordinalNumber(n,{unit:"day"}),s);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Eu(n,o,i),n.setHours(0,0,0,0),n}}class iI 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,i){const s=a=>{const c=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+c};switch(r){case"c":case"cc":return nt(qe(r.length,n),s);case"co":return nt(o.ordinalNumber(n,{unit:"day"}),s);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Eu(n,o,i),n.setHours(0,0,0,0),n}}function sI(e,t){const n=Se(e),r=kR(n),o=t-r;return yo(n,o)}class aI 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 i=s=>s===0?7:s;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"}),i);case"iiiii":return nt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return nt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);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"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=sI(n,o),n.setHours(0,0,0,0),n}}class lI 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(Su(o),0,0,0),n}}class cI 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(Su(o),0,0,0),n}}class uI 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(Su(o),0,0,0),n}}class fI 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 i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class dI 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 hI 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 pI 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 i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class mI 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 gI 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 yI extends Ee{constructor(){super(...arguments);te(this,"priority",30);te(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return nt(qe(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class vI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return tn(en.basicOptionalMinutes,n);case"XX":return tn(en.basic,n);case"XXXX":return tn(en.basicOptionalSeconds,n);case"XXXXX":return tn(en.extendedOptionalSeconds,n);case"XXX":default:return tn(en.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-xs(n)-o)}}class bI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return tn(en.basicOptionalMinutes,n);case"xx":return tn(en.basic,n);case"xxxx":return tn(en.basicOptionalSeconds,n);case"xxxxx":return tn(en.extendedOptionalSeconds,n);case"xxx":default:return tn(en.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-xs(n)-o)}}class xI extends Ee{constructor(){super(...arguments);te(this,"priority",40);te(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[_e(n,o*1e3),{timestampIsSet:!0}]}}class wI extends Ee{constructor(){super(...arguments);te(this,"priority",20);te(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[_e(n,o),{timestampIsSet:!0}]}}const TI={G:new $R,y:new BR,Y:new WR,R:new HR,u:new zR,Q:new UR,q:new GR,M:new YR,L:new KR,w:new XR,I:new ZR,d:new tI,D:new nI,E:new rI,e:new oI,c:new iI,i:new aI,a:new lI,b:new cI,B:new uI,h:new fI,H:new dI,K:new hI,k:new pI,m:new mI,s:new gI,S:new yI,X:new vI,x:new bI,t:new xI,T:new wI},SI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CI=/^'([^]*?)'?$/,PI=/''/g,RI=/\S/,II=/[a-zA-Z]/;function AI(e,t,n,r){var m,y,g,x;const o=MR(),i=o.locale??$y,s=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((x=(g=o.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??0;if(t==="")return e===""?Se(n):_e(n,NaN);const c={firstWeekContainsDate:s,weekStartsOn:a,locale:i},l=[new VR],u=t.match(EI).map(v=>{const S=v[0];if(S in Jl){const T=Jl[S];return T(v,i.formatLong)}return v}).join("").match(SI),f=[];for(let v of u){Uy(v)&&ec(v,t,e),zy(v)&&ec(v,t,e);const S=v[0],T=TI[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const I=f.find(O=>E.includes(O.token)||O.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 A=T.run(e,v,i.match,c);if(!A)return _e(n,NaN);l.push(A.setter),e=A.rest}else{if(S.match(II))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(v==="''"?v="'":S==="'"&&(v=OI(v)),e.indexOf(v)===0)e=e.slice(v.length);else return _e(n,NaN)}}if(e.length>0&&RI.test(e))return _e(n,NaN);const h=l.map(v=>v.priority).sort((v,S)=>S-v).filter((v,S,T)=>T.indexOf(v)===S).map(v=>l.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,c))return _e(n,NaN);const S=v.set(d,p,c);Array.isArray(S)?(d=S[0],Object.assign(p,S[1])):d=S}return _e(n,d)}function OI(e){return e.match(CI)[1].replace(PI,"'")}function DI(e,t){const n=Se(e),r=Se(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function MI(e){return NP(e,jP(e))}function kI(e,t){return yo(e,-t)}function Xy(e,t){return ea(e,-t)}function FI(e,t){return jy(e,-t)}function jI(e,t){return Ny(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 i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},rt.apply(this,arguments)};function Cu(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 tc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}var ai=function(e){return e.replace(new RegExp(" ","g")," ")},Qy=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)},NI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Zy=function(e,t,n){var r=e.length-2,o=NI(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Jy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ts=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},LI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ya=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},_I=function(e){return e==="money"||e==="currency"},VI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return rt(rt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Bi=function(e,t){var n=Qy(Jy(e),t.fraction.length),r="".concat(t.currency).concat(Zy(n,t.group,t.decimal));return ai(r)},$I=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var c=e.onChange,l=Cu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var f=b.useMemo(function(){var p=VI(r,i,a);return p.currency=ai("".concat(p.currency.trim()," ")),p.literal=ai(p.literal.trim()),p},[r,i]),h=function(p){var m=Bi(p.target.value,f),y=Ts(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),c==null||c(p),y!==0&&(u.current.selectionEnd=m.length)};b.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Bi(p,f),y=Ts(m);u.current.value=m,u.current.setAttribute("data-number",y.toString());var g=new InputEvent("change",{});c==null||c(rt(rt({},g),{target:u.current,currentTarget:u.current})),y!==0&&(u.current.selectionEnd=m.length)}}},[f]);var d=l.defaultValue?Bi(l.defaultValue,f):void 0;return b.createElement("input",rt({},l,{value:typeof l.value=="string"?Bi(l.value,f):l.value,defaultValue:d,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),BI=1,WI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},HI=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:""})},Wi=function(e,t){var n=Qy(Jy(e),t.fraction.length),r="".concat(Zy(n,t.group,t.decimal)," ").concat(t.percentSign);return ai(r)},zI=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Cu(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),c=tc(b.useState(function(){var g,x;return(x=(g=s.value)===null||g===void 0?void 0:g.toString())!==null&&x!==void 0?x:""}),2),l=c[0],u=c[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var g,x=Number.parseFloat("".concat((g=s.value)!==null&&g!==void 0?g:"0")).toFixed(f.fraction.length);u(Wi(x,f))},[s.value]);var f=b.useMemo(function(){var g=HI(r);return g.percentSign=ai("".concat(g.percentSign)),g},[r]),h=l.length-f.percentSign.length-BI,d=function(g){var x,v=a.current;v&&(v.setSelectionRange(h,h),g&&((x=s.onFocus)===null||x===void 0||x.call(s,g)))},p=function(g){var x=g.currentTarget;if(x.selectionStart!==null){var v=x.selectionStart,S=x.selectionEnd,T=v!==S,E=h<v;!T&&E&&d()}i==null||i(g)},m=function(g){var x=Wi(g.target.value,f),v=Ts(x);u(x),g.target.value=x,g.target.setAttribute("data-number",v.toString()),o==null||o(g)};b.useEffect(function(){if(a.current!==null){var g=a.current.value;if(g!==""){var x=Wi(g,f),v=Ts(x);u(x),a.current.value=x,a.current.setAttribute("data-number",v.toString());var S=new InputEvent("change",{});o==null||o(rt(rt({},S),{target:a.current,currentTarget:a.current}))}}},[]),b.useEffect(function(){return d()},[l]);var y=s.defaultValue?Wi(s.defaultValue,f):void 0;return b.createElement("input",rt({},s,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:d,onKeyUp:p,ref:a,type:"text"}))}),$o={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},UI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=Ss[i];s===void 0?r.push(i.replace($o.dots,"\\.").replace($o.openParenthesis,"\\(").replace($o.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace($o.leadingBars,"\\")},qo=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return nc(o,n);var i=UI(o);return n?"^".concat(i,"$"):i},GI=function(e){return e.replace($o.escape,"\\$&")},nc=function(e,t){var n=e.map(function(r){return typeof r=="string"?GI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ss={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]/}},YI=/\d/,mh="(dd) 9dddd-dddd",gh="(dd) dddd-dddd",yh="ddd.ddd.ddd-dd",vh="dd.ddd.ddd/dddd-dd",rs=function(e){return e.replace(/\D/g,"")},KI=["2",/[0-3]/,":",/[0-5]/,/\d/],qI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],It={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:yh,isoDate:"dddd-dd-dd",cnpj:vh,telephone:gh,cellphone:mh,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return rs(e).length<=11?yh:vh},int:function(e){return e===void 0&&(e=""),YI.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=rs(e);return t.length<11?gh:mh},time:function(e){var t=rs(e),n=t[0];return n==="2"?KI:qI}},At=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:At(It.cellTelephone,"tel"),cellphone:At(It.cellphone,"tel"),cep:At(It.cep,"decimal"),cnpj:At(It.cnpj,"decimal"),color:At(It.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:At(It.cpf,"decimal"),cpfCnpj:At(It.cpfCnpj,"decimal",{transform:rs}),creditCard:At(It.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:At(It.date,"decimal"),int:At(It.int,"decimal",{pattern:"[0-9]+"}),isoDate:At(It.isoDate,"decimal"),telephone:At(It.telephone,"tel"),time:At(It.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:At(It.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function bh(e,t,n,r){var o,i;r===void 0&&(r=Ss);for(var s=n(e),a="",c=0,l=0;c<t.length&&l<s.length;){var u=t[c],f=u instanceof RegExp?u:r[u],h=s[l];if(f===void 0){a+=u,h===u&&(l+=1),c+=1;continue}var d=f instanceof RegExp?{regex:f}:f;d.regex.test(h)&&(a+=(i=(o=d.parse)===null||o===void 0?void 0:o.call(d,h))!==null&&i!==void 0?i:h),l+=1,c+=1}return a}var xh=function(e){return e},XI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(qo(e,n,t));return r.test(n)};function QI(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var ZI=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,c=e.pattern,l=e.tokens,u=e.mask,f=e.onChangeText,h=e.as,d=Cu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Ya(a),y=Ya(f),g=Ya(u),x=b.useRef(XI(u,i,d.value||d.defaultValue)),v=h??"input",S=tc(b.useState(""),2),T=S[0],E=S[1],A=QI(T),I=b.useCallback(function(M,F){var _,W,U=(_=M??F)!==null&&_!==void 0?_:"";if(u===void 0)return U;var D=(W=U==null?void 0:U.toString())!==null&&W!==void 0?W:"";return bh(D,typeof u=="function"?u(D):u,s??xh,l??Ss)},[s,u,l]),O=tc(b.useState(function(){return I(d.value,d.defaultValue)}),2),R=O[0],j=O[1],k=I(d.defaultValue,d.defaultValue),L=b.useMemo(function(){if(c||u===void 0)return c;if(typeof u=="function"){var M=u(R);return Array.isArray(M)?nc(M,i):qo(u,R,i)}return typeof u=="string"?qo(u,R,i):nc(u,i)},[c,R,i,u]);b.useEffect(function(){if(d.value!==void 0){var M=I(d.value,d.defaultValue);j(M),p.current!==null&&(p.current.value=M)}},[d.value,u,s,d.defaultValue]);var P=function(M){var F,_,W,U,D,$=M.currentTarget,q=M.target.value;if(g.current===void 0)return j(q),(F=y.current)===null||F===void 0||F.call(y,q),(_=m.current)===null||_===void 0||_.call(m,M),f==null?void 0:f(q);var J=new RegExp(qo(g.current,q,i)),X=(W=$.selectionEnd)!==null&&W!==void 0?W:0,G=function(Y,ee,H){if(Y.type!=="number")return Y.setSelectionRange(ee,H)};if(r&&x.current&&q.length>=R.length)return $.value=R,G($,X-1,X-1);var N=!1;q.length<A.length&&(x.current=!1,N=!0),J.test(q)&&(x.current=!0);var B=X,z=q[B-1],V=bh(q,typeof g.current=="function"?g.current(q):g.current,s??xh,l??Ss);for($.value=V,j(V);B<V.length&&V.charAt(B-1)!==z;)B+=1;N?G($,X,X):G($,B,B),M.target.value=V,E(V),(U=y.current)===null||U===void 0||U.call(y,V),(D=m.current)===null||D===void 0||D.call(m,M)};return b.createElement(v,rt({},d,{ref:p,pattern:L,onChange:P,defaultValue:wh(d.defaultValue)?k:void 0,value:wh(d.value)?I(d.value,d.value):d.value}))}),wh=function(e){return typeof e=="string"},ev=b.forwardRef(function(e,t){return _I(e.mask)?b.createElement($I,rt({},e,{mask:void 0,ref:t})):WI(e.mask)?b.createElement(zI,rt({},e,{mask:void 0,ref:t})):b.createElement(ZI,rt({},e,{ref:t}))}),Ot=function(e){return function(t){return b.createElement(ev,rt({},e,t))}};Ot(Et.cellTelephone);Ot(Et.cellphone);Ot(Et.cep);Ot(Et.cnpj);Ot(Et.color);Ot(Et.cpf);Ot(Et.cpfCnpj);Ot(Et.creditCard);Ot(Et.date);Ot(Et.int);Ot(Et.isoDate);Ot(Et.telephone);Ot(Et.time);Ot(Et.uuid);var tv=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&LI(Et,t.mask)?Et[t.mask]:{mask:t.mask}},[t.mask]),o=rt(rt({},t),r);return b.createElement(ev,rt({},o,{ref:n}))}),Ka={},qa={exports:{}},Xa={};/**
|
|
142
|
+
*/const wu=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}},CP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},ky=e=>w.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:fh,exit:fh.false,transition:CP,"aria-hidden":!e.open,animate:e.open.toString(),className:ke("aria-hidden:pointer-events-none",e.className),children:e.children}),PP=lo("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"}}),RP=b.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const c=()=>o==null?void 0:o(!1);return w.jsx("div",{"data-open":!!i,"aria-hidden":!i,className:"pointer-events-none w-full isolate aria-hidden:pointer-events-auto",children:w.jsx(ky,{"data-open":!!i,open:!!i,children:w.jsxs(ho,{...s,className:ke(PP({theme:n}),t),ref:a,"data-theme":n,role:"alert",as:s.as??"div",children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?w.jsx(Dy,{size:20}):null,!r&&n==="info"?w.jsx(My,{size:20}):null,!r&&n==="danger"?w.jsx(TP,{size:20}):null,r,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:s.title})]}),s.children,o!==void 0?w.jsx("button",{type:"button",onClick:c,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:w.jsx(wu,{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 yo(e,t){const n=Se(e);return isNaN(t)?_e(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ea(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 i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Fy=6048e5,IP=864e5,AP=6e4,OP=36e5,DP=1e3;let MP={};function vr(){return MP}function fn(e,t){var a,c,l,u;const n=vr(),r=(t==null?void 0:t.weekStartsOn)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.weekStartsOn)??0,o=Se(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Qr(e){return fn(e,{weekStartsOn:1})}function jy(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=Qr(r),i=_e(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=Qr(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Zr(e){const t=Se(e);return t.setHours(0,0,0,0),t}function xs(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 kP(e,t){const n=Zr(e),r=Zr(t),o=+n-xs(n),i=+r-xs(r);return Math.round((o-i)/IP)}function FP(e){const t=jy(e),n=_e(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Qr(n)}function Ny(e,t){const n=t*7;return yo(e,n)}function Ly(e,t){return ea(e,t*12)}function jP(e){return _e(e,Date.now())}function NP(e,t){const n=Zr(e),r=Zr(t);return+n==+r}function LP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _y(e){if(!LP(e)&&typeof e!="number")return!1;const t=Se(e);return!isNaN(Number(t))}function Vy(e,t){const n=Se(e.start),r=Se(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const c=[];for(;+s<=i;)c.push(Se(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?c.reverse():c}function $y(e){const t=Se(e);return t.setDate(1),t.setHours(0,0,0,0),t}function _P(e){const t=Se(e),n=_e(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function VP(e,t){var a,c;const n=vr(),r=n.weekStartsOn??((c=(a=n.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??0,o=Se(e),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const $P={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"}},BP=(e,t,n)=>{let r;const o=$P[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 Ga(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const WP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},UP={date:Ga({formats:WP,defaultWidth:"full"}),time:Ga({formats:HP,defaultWidth:"full"}),dateTime:Ga({formats:zP,defaultWidth:"full"})},GP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},YP=(e,t,n,r)=>GP[e];function No(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const KP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},XP={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"]},QP={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"]},ZP={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"}},JP={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"}},eR=(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"},tR={ordinalNumber:eR,era:No({values:KP,defaultWidth:"wide"}),quarter:No({values:qP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:No({values:XP,defaultWidth:"wide"}),day:No({values:QP,defaultWidth:"wide"}),dayPeriod:No({values:ZP,defaultWidth:"wide",formattingValues:JP,defaultFormattingWidth:"wide"})};function Lo(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?rR(a,f=>f.test(s)):nR(a,f=>f.test(s));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(s.length);return{value:l,rest:u}}}function nR(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function rR(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oR(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const iR=/^(\d+)(th|st|nd|rd)?/i,sR=/\d+/i,aR={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},lR={any:[/^b/i,/^(a|c)/i]},cR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},uR={any:[/1/i,/2/i,/3/i,/4/i]},fR={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},dR={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]},hR={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},pR={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]},mR={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},gR={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}},yR={ordinalNumber:oR({matchPattern:iR,parsePattern:sR,valueCallback:e=>parseInt(e,10)}),era:Lo({matchPatterns:aR,defaultMatchWidth:"wide",parsePatterns:lR,defaultParseWidth:"any"}),quarter:Lo({matchPatterns:cR,defaultMatchWidth:"wide",parsePatterns:uR,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Lo({matchPatterns:fR,defaultMatchWidth:"wide",parsePatterns:dR,defaultParseWidth:"any"}),day:Lo({matchPatterns:hR,defaultMatchWidth:"wide",parsePatterns:pR,defaultParseWidth:"any"}),dayPeriod:Lo({matchPatterns:mR,defaultMatchWidth:"any",parsePatterns:gR,defaultParseWidth:"any"})},By={code:"en-US",formatDistance:BP,formatLong:UP,formatRelative:YP,localize:tR,match:yR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vR(e){const t=Se(e);return kP(t,_P(t))+1}function Wy(e){const t=Se(e),n=+Qr(t)-+FP(t);return Math.round(n/Fy)+1}function Tu(e,t){var u,f,h,d;const n=Se(e),r=n.getFullYear(),o=vr(),i=(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,s=_e(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=fn(s,t),c=_e(e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const l=fn(c,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function bR(e,t){var a,c,l,u;const n=vr(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.firstWeekContainsDate)??1,o=Tu(e,t),i=_e(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),fn(i,t)}function Hy(e,t){const n=Se(e),r=+fn(n,t)-+bR(n,t);return Math.round(r/Fy)+1}function Ae(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Pn={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)}},Cr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dh={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 Pn.y(e,t)},Y:function(e,t,n,r){const o=Tu(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return Ae(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ae(i,t.length)},R:function(e,t){const n=jy(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 Pn.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=Hy(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"}):Pn.d(e,t)},D:function(e,t,n){const r=vR(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(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ae(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ae(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return 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=Cr.noon:r===0?o=Cr.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=Cr.evening:r>=12?o=Cr.afternoon:r>=4?o=Cr.morning:o=Cr.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 Pn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Pn.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"}):Pn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Pn.s(e,t)},S:function(e,t){return Pn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ph(r);case"XXXX":case"XX":return rr(r);case"XXXXX":case"XXX":default:return rr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ph(r);case"xxxx":case"xx":return rr(r);case"xxxxx":case"xxx":default:return rr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hh(r,":");case"OOOO":default:return"GMT"+rr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hh(r,":");case"zzzz":default:return"GMT"+rr(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 hh(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+Ae(i,2)}function ph(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):rr(e,t)}function rr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ae(Math.trunc(r/60),2),i=Ae(r%60,2);return n+o+t+i}const mh=(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"})}},zy=(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"})}},xR=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return mh(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",mh(r,t)).replace("{{time}}",zy(o,t))},Jl={p:zy,P:xR},wR=/^D+$/,TR=/^Y+$/,SR=["D","DD","YY","YYYY"];function Uy(e){return wR.test(e)}function Gy(e){return TR.test(e)}function ec(e,t,n){const r=ER(e,t,n);if(console.warn(r),SR.includes(e))throw new RangeError(r)}function ER(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 CR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,PR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RR=/^'([^]*?)'?$/,IR=/''/g,AR=/[a-zA-Z]/;function OR(e,t,n){var u,f,h,d;const r=vr(),o=r.locale??By,i=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=r.weekStartsOn??((d=(h=r.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,a=Se(e);if(!_y(a))throw new RangeError("Invalid time value");let c=t.match(PR).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=Jl[m];return g(p,o.formatLong)}return p}).join("").match(CR).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:DR(p)};if(dh[m])return{isToken:!0,value:p};if(m.match(AR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const l={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return c.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Gy(m)||Uy(m))&&ec(m,t,String(e));const g=dh[m[0]];return g(a,m,o.localize,l)}).join("")}function DR(e){const t=e.match(RR);return t?t[1].replace(IR,"'"):e}function MR(){return Object.assign({},vr())}function kR(e){let n=Se(e).getDay();return n===0&&(n=7),n}function FR(e,t){const n=Se(e),r=Se(t);return n.getTime()>r.getTime()}function jR(e,t){const n=Se(e),r=Se(t);return+n<+r}function NR(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 LR=10;class Yy{constructor(){te(this,"subPriority",0)}validate(t,n){return!0}}class _R extends Yy{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class VR extends Yy{constructor(){super(...arguments);te(this,"priority",LR);te(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:_e(n,NR(n,Date))}}class Ee{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new _R(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class $R 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}/},en={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 tn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*OP+i*AP+s*DP),rest:t.slice(n[0].length)}}function Ky(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 ws(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 Su(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 qy(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function Xy(e){return e%400===0||e%4===0&&e%100!==0}class BR 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 i=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return nt(qe(4,n),i);case"yo":return nt(o.ordinalNumber(n,{unit:"year"}),i);default:return nt(qe(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const a=qy(o.year,i);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}}class WR 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 i=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return nt(qe(4,n),i);case"Yo":return nt(o.ordinalNumber(n,{unit:"year"}),i);default:return nt(qe(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=Tu(n,i);if(o.isTwoDigitYear){const c=qy(o.year,s);return n.setFullYear(c,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),fn(n,i)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),fn(n,i)}}class HR 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 ws(r==="R"?4:r.length,n)}set(n,r,o){const i=_e(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Qr(i)}}class zR 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 ws(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class UR 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 GR 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 YR 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 i=s=>s-1;switch(r){case"M":return nt(ze(tt.month,n),i);case"MM":return nt(qe(2,n),i);case"Mo":return nt(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class KR 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 i=s=>s-1;switch(r){case"L":return nt(ze(tt.month,n),i);case"LL":return nt(qe(2,n),i);case"Lo":return nt(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function qR(e,t,n){const r=Se(e),o=Hy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class XR 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,i){return fn(qR(n,o,i),i)}}function QR(e,t){const n=Se(e),r=Wy(n)-t;return n.setDate(n.getDate()-r*7),n}class ZR 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 Qr(QR(n,o))}}const JR=[31,28,31,30,31,30,31,31,30,31,30,31],eI=[31,29,31,30,31,30,31,31,30,31,30,31];class tI 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(),i=Xy(o),s=n.getMonth();return i?r>=1&&r<=eI[s]:r>=1&&r<=JR[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class nI 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 Xy(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 Eu(e,t,n){var f,h,d,p;const r=vr(),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,i=Se(e),s=i.getDay(),c=(t%7+7)%7,l=7-o,u=t<0||t>6?t-(s+l)%7:(c+l)%7-(s+l)%7;return yo(i,u)}class rI 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,i){return n=Eu(n,o,i),n.setHours(0,0,0,0),n}}class oI 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,i){const s=a=>{const c=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+c};switch(r){case"e":case"ee":return nt(qe(r.length,n),s);case"eo":return nt(o.ordinalNumber(n,{unit:"day"}),s);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Eu(n,o,i),n.setHours(0,0,0,0),n}}class iI 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,i){const s=a=>{const c=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+c};switch(r){case"c":case"cc":return nt(qe(r.length,n),s);case"co":return nt(o.ordinalNumber(n,{unit:"day"}),s);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Eu(n,o,i),n.setHours(0,0,0,0),n}}function sI(e,t){const n=Se(e),r=kR(n),o=t-r;return yo(n,o)}class aI 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 i=s=>s===0?7:s;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"}),i);case"iiiii":return nt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return nt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);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"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=sI(n,o),n.setHours(0,0,0,0),n}}class lI 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(Su(o),0,0,0),n}}class cI 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(Su(o),0,0,0),n}}class uI 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(Su(o),0,0,0),n}}class fI 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 i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class dI 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 hI 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 pI 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 i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class mI 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 gI 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 yI extends Ee{constructor(){super(...arguments);te(this,"priority",30);te(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return nt(qe(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class vI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return tn(en.basicOptionalMinutes,n);case"XX":return tn(en.basic,n);case"XXXX":return tn(en.basicOptionalSeconds,n);case"XXXXX":return tn(en.extendedOptionalSeconds,n);case"XXX":default:return tn(en.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-xs(n)-o)}}class bI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return tn(en.basicOptionalMinutes,n);case"xx":return tn(en.basic,n);case"xxxx":return tn(en.basicOptionalSeconds,n);case"xxxxx":return tn(en.extendedOptionalSeconds,n);case"xxx":default:return tn(en.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-xs(n)-o)}}class xI extends Ee{constructor(){super(...arguments);te(this,"priority",40);te(this,"incompatibleTokens","*")}parse(n){return Ky(n)}set(n,r,o){return[_e(n,o*1e3),{timestampIsSet:!0}]}}class wI extends Ee{constructor(){super(...arguments);te(this,"priority",20);te(this,"incompatibleTokens","*")}parse(n){return Ky(n)}set(n,r,o){return[_e(n,o),{timestampIsSet:!0}]}}const TI={G:new $R,y:new BR,Y:new WR,R:new HR,u:new zR,Q:new UR,q:new GR,M:new YR,L:new KR,w:new XR,I:new ZR,d:new tI,D:new nI,E:new rI,e:new oI,c:new iI,i:new aI,a:new lI,b:new cI,B:new uI,h:new fI,H:new dI,K:new hI,k:new pI,m:new mI,s:new gI,S:new yI,X:new vI,x:new bI,t:new xI,T:new wI},SI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CI=/^'([^]*?)'?$/,PI=/''/g,RI=/\S/,II=/[a-zA-Z]/;function AI(e,t,n,r){var m,g,v,x;const o=MR(),i=o.locale??By,s=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((x=(v=o.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0;if(t==="")return e===""?Se(n):_e(n,NaN);const c={firstWeekContainsDate:s,weekStartsOn:a,locale:i},l=[new VR],u=t.match(EI).map(y=>{const T=y[0];if(T in Jl){const S=Jl[T];return S(y,i.formatLong)}return y}).join("").match(SI),f=[];for(let y of u){Gy(y)&&ec(y,t,e),Uy(y)&&ec(y,t,e);const T=y[0],S=TI[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const A=f.find(k=>E.includes(k.token)||k.token===T);if(A)throw new RangeError(`The format string mustn't contain \`${A.fullToken}\` and \`${y}\` at the same time`)}else if(S.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);f.push({token:T,fullToken:y});const R=S.run(e,y,i.match,c);if(!R)return _e(n,NaN);l.push(R.setter),e=R.rest}else{if(T.match(II))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(y==="''"?y="'":T==="'"&&(y=OI(y)),e.indexOf(y)===0)e=e.slice(y.length);else return _e(n,NaN)}}if(e.length>0&&RI.test(e))return _e(n,NaN);const h=l.map(y=>y.priority).sort((y,T)=>T-y).filter((y,T,S)=>S.indexOf(y)===T).map(y=>l.filter(T=>T.priority===y).sort((T,S)=>S.subPriority-T.subPriority)).map(y=>y[0]);let d=Se(n);if(isNaN(d.getTime()))return _e(n,NaN);const p={};for(const y of h){if(!y.validate(d,c))return _e(n,NaN);const T=y.set(d,p,c);Array.isArray(T)?(d=T[0],Object.assign(p,T[1])):d=T}return _e(n,d)}function OI(e){return e.match(CI)[1].replace(PI,"'")}function DI(e,t){const n=Se(e),r=Se(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function MI(e){return NP(e,jP(e))}function kI(e,t){return yo(e,-t)}function Qy(e,t){return ea(e,-t)}function FI(e,t){return Ny(e,-t)}function jI(e,t){return Ly(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 i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},rt.apply(this,arguments)};function Cu(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 tc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}var ai=function(e){return e.replace(new RegExp(" ","g")," ")},Zy=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)},NI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Jy=function(e,t,n){var r=e.length-2,o=NI(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},ev=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ts=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},LI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ya=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},_I=function(e){return e==="money"||e==="currency"},VI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return rt(rt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Bi=function(e,t){var n=Zy(ev(e),t.fraction.length),r="".concat(t.currency).concat(Jy(n,t.group,t.decimal));return ai(r)},$I=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var c=e.onChange,l=Cu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var f=b.useMemo(function(){var p=VI(r,i,a);return p.currency=ai("".concat(p.currency.trim()," ")),p.literal=ai(p.literal.trim()),p},[r,i]),h=function(p){var m=Bi(p.target.value,f),g=Ts(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),c==null||c(p),g!==0&&(u.current.selectionEnd=m.length)};b.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Bi(p,f),g=Ts(m);u.current.value=m,u.current.setAttribute("data-number",g.toString());var v=new InputEvent("change",{});c==null||c(rt(rt({},v),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=m.length)}}},[f]);var d=l.defaultValue?Bi(l.defaultValue,f):void 0;return b.createElement("input",rt({},l,{value:typeof l.value=="string"?Bi(l.value,f):l.value,defaultValue:d,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),BI=1,WI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},HI=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:""})},Wi=function(e,t){var n=Zy(ev(e),t.fraction.length),r="".concat(Jy(n,t.group,t.decimal)," ").concat(t.percentSign);return ai(r)},zI=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Cu(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),c=tc(b.useState(function(){var v,x;return(x=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&x!==void 0?x:""}),2),l=c[0],u=c[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var v,x=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(Wi(x,f))},[s.value]);var f=b.useMemo(function(){var v=HI(r);return v.percentSign=ai("".concat(v.percentSign)),v},[r]),h=l.length-f.percentSign.length-BI,d=function(v){var x,y=a.current;y&&(y.setSelectionRange(h,h),v&&((x=s.onFocus)===null||x===void 0||x.call(s,v)))},p=function(v){var x=v.currentTarget;if(x.selectionStart!==null){var y=x.selectionStart,T=x.selectionEnd,S=y!==T,E=h<y;!S&&E&&d()}i==null||i(v)},m=function(v){var x=Wi(v.target.value,f),y=Ts(x);u(x),v.target.value=x,v.target.setAttribute("data-number",y.toString()),o==null||o(v)};b.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var x=Wi(v,f),y=Ts(x);u(x),a.current.value=x,a.current.setAttribute("data-number",y.toString());var T=new InputEvent("change",{});o==null||o(rt(rt({},T),{target:a.current,currentTarget:a.current}))}}},[]),b.useEffect(function(){return d()},[l]);var g=s.defaultValue?Wi(s.defaultValue,f):void 0;return b.createElement("input",rt({},s,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:d,onKeyUp:p,ref:a,type:"text"}))}),$o={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},UI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=Ss[i];s===void 0?r.push(i.replace($o.dots,"\\.").replace($o.openParenthesis,"\\(").replace($o.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace($o.leadingBars,"\\")},qo=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return nc(o,n);var i=UI(o);return n?"^".concat(i,"$"):i},GI=function(e){return e.replace($o.escape,"\\$&")},nc=function(e,t){var n=e.map(function(r){return typeof r=="string"?GI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ss={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]/}},YI=/\d/,gh="(dd) 9dddd-dddd",yh="(dd) dddd-dddd",vh="ddd.ddd.ddd-dd",bh="dd.ddd.ddd/dddd-dd",rs=function(e){return e.replace(/\D/g,"")},KI=["2",/[0-3]/,":",/[0-5]/,/\d/],qI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],It={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:vh,isoDate:"dddd-dd-dd",cnpj:bh,telephone:yh,cellphone:gh,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return rs(e).length<=11?vh:bh},int:function(e){return e===void 0&&(e=""),YI.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=rs(e);return t.length<11?yh:gh},time:function(e){var t=rs(e),n=t[0];return n==="2"?KI:qI}},At=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:At(It.cellTelephone,"tel"),cellphone:At(It.cellphone,"tel"),cep:At(It.cep,"decimal"),cnpj:At(It.cnpj,"decimal"),color:At(It.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:At(It.cpf,"decimal"),cpfCnpj:At(It.cpfCnpj,"decimal",{transform:rs}),creditCard:At(It.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:At(It.date,"decimal"),int:At(It.int,"decimal",{pattern:"[0-9]+"}),isoDate:At(It.isoDate,"decimal"),telephone:At(It.telephone,"tel"),time:At(It.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:At(It.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function xh(e,t,n,r){var o,i;r===void 0&&(r=Ss);for(var s=n(e),a="",c=0,l=0;c<t.length&&l<s.length;){var u=t[c],f=u instanceof RegExp?u:r[u],h=s[l];if(f===void 0){a+=u,h===u&&(l+=1),c+=1;continue}var d=f instanceof RegExp?{regex:f}:f;d.regex.test(h)&&(a+=(i=(o=d.parse)===null||o===void 0?void 0:o.call(d,h))!==null&&i!==void 0?i:h),l+=1,c+=1}return a}var wh=function(e){return e},XI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(qo(e,n,t));return r.test(n)};function QI(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var ZI=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,c=e.pattern,l=e.tokens,u=e.mask,f=e.onChangeText,h=e.as,d=Cu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Ya(a),g=Ya(f),v=Ya(u),x=b.useRef(XI(u,i,d.value||d.defaultValue)),y=h??"input",T=tc(b.useState(""),2),S=T[0],E=T[1],R=QI(S),A=b.useCallback(function(O,F){var _,W,U=(_=O??F)!==null&&_!==void 0?_:"";if(u===void 0)return U;var M=(W=U==null?void 0:U.toString())!==null&&W!==void 0?W:"";return xh(M,typeof u=="function"?u(M):u,s??wh,l??Ss)},[s,u,l]),k=tc(b.useState(function(){return A(d.value,d.defaultValue)}),2),I=k[0],j=k[1],D=A(d.defaultValue,d.defaultValue),N=b.useMemo(function(){if(c||u===void 0)return c;if(typeof u=="function"){var O=u(I);return Array.isArray(O)?nc(O,i):qo(u,I,i)}return typeof u=="string"?qo(u,I,i):nc(u,i)},[c,I,i,u]);b.useEffect(function(){if(d.value!==void 0){var O=A(d.value,d.defaultValue);j(O),p.current!==null&&(p.current.value=O)}},[d.value,u,s,d.defaultValue]);var P=function(O){var F,_,W,U,M,V=O.currentTarget,q=O.target.value;if(v.current===void 0)return j(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(v.current,q,i)),X=(W=V.selectionEnd)!==null&&W!==void 0?W:0,G=function(Y,ee,H){if(Y.type!=="number")return Y.setSelectionRange(ee,H)};if(r&&x.current&&q.length>=I.length)return V.value=I,G(V,X-1,X-1);var L=!1;q.length<R.length&&(x.current=!1,L=!0),J.test(q)&&(x.current=!0);var B=X,z=q[B-1],$=xh(q,typeof v.current=="function"?v.current(q):v.current,s??wh,l??Ss);for(V.value=$,j($);B<$.length&&$.charAt(B-1)!==z;)B+=1;L?G(V,X,X):G(V,B,B),O.target.value=$,E($),(U=g.current)===null||U===void 0||U.call(g,$),(M=m.current)===null||M===void 0||M.call(m,O)};return b.createElement(y,rt({},d,{ref:p,pattern:N,onChange:P,defaultValue:Th(d.defaultValue)?D:void 0,value:Th(d.value)?A(d.value,d.value):d.value}))}),Th=function(e){return typeof e=="string"},tv=b.forwardRef(function(e,t){return _I(e.mask)?b.createElement($I,rt({},e,{mask:void 0,ref:t})):WI(e.mask)?b.createElement(zI,rt({},e,{mask:void 0,ref:t})):b.createElement(ZI,rt({},e,{ref:t}))}),Ot=function(e){return function(t){return b.createElement(tv,rt({},e,t))}};Ot(Et.cellTelephone);Ot(Et.cellphone);Ot(Et.cep);Ot(Et.cnpj);Ot(Et.color);Ot(Et.cpf);Ot(Et.cpfCnpj);Ot(Et.creditCard);Ot(Et.date);Ot(Et.int);Ot(Et.isoDate);Ot(Et.telephone);Ot(Et.time);Ot(Et.uuid);var nv=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&LI(Et,t.mask)?Et[t.mask]:{mask:t.mask}},[t.mask]),o=rt(rt({},t),r);return b.createElement(tv,rt({},o,{ref:n}))}),Ka={},qa={exports:{}},Xa={};/**
|
|
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
|
|
150
|
+
*/var Sh;function JI(){if(Sh)return Xa;Sh=1;var e=b;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,h){var d=h(),p=r({inst:{value:d,getSnapshot:h}}),m=p[0].inst,g=p[1];return i(function(){m.value=d,m.getSnapshot=h,c(m)&&g({inst:m})},[f,d,h]),o(function(){return c(m)&&g({inst:m}),f(function(){c(m)&&g({inst:m})})},[f]),s(d),d}function c(f){var h=f.getSnapshot;f=f.value;try{var d=h();return!n(f,d)}catch{return!0}}function l(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:a;return Xa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Xa}var Eh={};/**
|
|
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
|
|
158
|
+
*/var Ch;function eA(){return Ch||(Ch=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=b,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 A=S.map(function(k){return String(k)});A.unshift("Warning: "+T),Function.prototype.apply.call(console[y],console,A)}}function o(y,T){return y===T&&(y!==0||1/y===1/T)||y!==y&&T!==T}var i=typeof Object.is=="function"?Object.is:o,s=e.useState,a=e.useEffect,c=e.useLayoutEffect,l=e.useDebugValue,u=!1,f=!1;function h(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(!f){var R=T();i(E,R)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var A=s({inst:{value:E,getSnapshot:T}}),k=A[0].inst,I=A[1];return c(function(){k.value=E,k.getSnapshot=T,d(k)&&I({inst:k})},[y,E,T]),a(function(){d(k)&&I({inst:k});var j=function(){d(k)&&I({inst:k})};return y(j)},[y]),l(E),E}function d(y){var T=y.getSnapshot,S=y.value;try{var E=T();return!i(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:h,x=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;Eh.useSyncExternalStore=x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Eh}var Ph;function rv(){return Ph||(Ph=1,process.env.NODE_ENV==="production"?qa.exports=JI():qa.exports=eA()),qa.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
|
|
166
|
+
*/var Rh;function tA(){if(Rh)return Ka;Rh=1;var e=b,t=rv();function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,c=e.useDebugValue;return Ka.useSyncExternalStoreWithSelector=function(l,u,f,h,d){var p=i(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(!x){if(x=!0,y=E,E=h(E),d!==void 0&&m.hasValue){var R=m.value;if(d(R,E))return T=R}return T=E}if(R=T,r(y,E))return R;var A=h(E);return d!==void 0&&d(R,A)?R:(y=E,T=A)}var x=!1,y,T,S=f===void 0?null:f;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,f,h,d]);var g=o(l,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),c(g),g},Ka}var Ih={};/**
|
|
167
167
|
* @license React
|
|
168
168
|
* use-sync-external-store-shim/with-selector.development.js
|
|
169
169
|
*
|
|
@@ -171,31 +171,31 @@
|
|
|
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 Ih;function nA(){return Ih||(Ih=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=b,t=nv();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,i=e.useRef,s=e.useEffect,a=e.useMemo,c=e.useDebugValue;function l(u,f,h,d,p){var m=i(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var g=a(function(){var T=!1,E,A,I=function(k){if(!T){T=!0,E=k;var L=d(k);if(p!==void 0&&y.hasValue){var P=y.value;if(p(P,L))return A=P,P}return A=L,L}var M=E,F=A;if(r(M,k))return F;var _=d(k);return p!==void 0&&p(F,_)?F:(E=k,A=_,_)},O=h===void 0?null:h,R=function(){return I(f())},j=O===null?void 0:function(){return I(O())};return[R,j]},[f,h,d,p]),x=g[0],v=g[1],S=o(u,x,v);return s(function(){y.hasValue=!0,y.value=S},[S]),c(S),S}Rh.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Rh}process.env.NODE_ENV==="production"?tA():nA();const Pr=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},rA=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},oA=e=>Object.entries(e),rv=e=>e instanceof Promise,ov=(e,t,n,r)=>t===e?n.reduce((o,i)=>i(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,i)=>i(o,t,r),{...t,...e}):n.reduce((o,i)=>i(o,t,r),e),iA=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),c=t(...s),l=(u,f)=>n(h=>ov(u,h,i,f));return rv(c)?c.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},l(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void l(c,o.current))},sA=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),c=l=>n(u=>ov(l,u,i,o.current));return rv(a)?a.then(l=>c(l)):c(a)},Pu=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=Pr(r),s=Pr((n==null?void 0:n.props)??{}),a=Pr(t),c=Pr((n==null?void 0:n.postMiddleware)??[]),l=Pr((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),f=rA(r),h=Pr(f),d=b.useRef(null);b.useEffect(()=>{if(d.current===null)return;const m=d.current;c.current.forEach(y=>{y(r,f,m)})},[r,c,f]);const[p]=b.useState(()=>{const m=()=>s.current,y=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>h.current});return oA(y).reduce((g,[x,v])=>({...g,[x]:n!=null&&n.debug?iA(x,v,o,m,d,l.current):sA(x,v,o,m,d,l.current)}),{})});return[r,p,s.current]},aA=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function lA(e,t){return b.useRef(aA(e,t)).current}const Ru={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>)`},Xo=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const c=r===""?`${n}${i}`:i;return o.concat(t(s,c,a))}return o.concat(Xo(s,t,n,a))},[]),iv=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const c=r===""?`${n}${i}`:i;return{...o,[c]:t(s,i,a)}}return{...o,[i]:iv(s,t,n,a)}},{}),Ah={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},rc=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},cA={default:e=>rc(e,{result:Ah.default}),dark:e=>rc(e,{result:Ah.dark})},uA=(e,t)=>{const n=(s,a,c)=>({key:`--${c}`,value:`${s}`}),r=Xo(e.colors,n),o=Xo(e.spacing,n),i=Xo(e.rounded,n);return rc(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})},sv={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},av={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"},fA={name:"dark",rounded:sv,spacing:av,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%)",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:{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%)"}}}},dA={name:"light",rounded:sv,spacing:av,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%)",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:{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%)"}}}},hA=fA,pA=dA,Iu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",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",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=>w.jsxs(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To"},lv=b.createContext({translations:Iu,colorTokenParser:Ru.hsla}),mA=e=>{const t=b.useMemo(()=>({translations:{...Iu,...e.map},colorTokenParser:e.parser||Ru.hsla}),[e.map]);return w.jsx(lv.Provider,{value:t,children:e.children})},Dt=()=>{const e=b.useContext(lv);return e?e.translations:Iu},ta=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),Oh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Dh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Au=(e,t)=>{const n=Oh(t,Dh.basic,e)||Oh(t,Dh.extend,e);return n===void 0||n===e?void 0:n},Es=()=>typeof window>"u",oc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),cv=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},gA={type:"spring",bounce:.3,duration:.6},Mh=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),kh={middle:{x:"0%",opacity:1},enter:Mh(1),exit:Mh(-1)},Fh={exit:{visibility:"hidden"}},yA=e=>{const t=fn(Vy(e));return _y({start:t,end:yo(t,41)})},uv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),vA=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=Vy(new Date(e).setMonth(r)),i=uv(o,t);return w.jsx("option",{value:i,"data-index":r,children:i},i)}),Qa={ArrowLeft:(e,t)=>t==="days"?kI(e,1):Xy(e,1),ArrowRight:(e,t)=>t==="days"?yo(e,1):ea(e,1),ArrowUp:(e,t)=>t==="days"?FI(e,1):jI(e,1),ArrowDown:(e,t)=>t==="days"?jy(e,1):Ny(e,1)},jh=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var s;if(e!=null&&e.dataset.focustrap){const a=(s=t.current)==null?void 0:s.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&&i(),setTimeout(i,r)},Jn=e=>e.getFullYear().toString().padStart(4,"0"),bA=(e,t,n)=>e===void 0||n===void 0?!1:FR(t,e)&&jR(t,n),fv=({RenderOnDay:e,changeOnlyOnClick:t=!1,disabledDate:n,locale:r,markToday:o=!0,onChangeMonth:i,onChangeYear:s,rangeMode:a=!1,onChange:c,styles:l,...u})=>{const f=Dt(),h=b.useRef(null),{date:d,range:p}=u,m=d||new Date,y=b.useRef(null),[g,x]=Pu({date:m,isAnimating:!1,year:Jn(m),months:vA(m,r),direction:void 0,range:{from:p==null?void 0:p.from,to:p==null?void 0:p.to},selectMode:a?"from":void 0,week:_y({start:fn(m),end:VP(m)})},I=>({onChangeYear:O=>({year:O}),setToday:()=>({date:Zr(new Date)}),onExitComplete:()=>(jh(y.current||null,h,I.state().date,200),y.current=null,{isAnimating:!1}),date:O=>{const R=O(I.state().date);return{date:R,year:Jn(R)}},nextMonth:O=>{y.current=O.currentTarget;const R=I.state();if(R.isAnimating)return R;const j=ea(R.date,1);return{date:j,isAnimating:!0,direction:1,year:Jn(j)}},previousMonth:O=>{y.current=O.currentTarget;const R=I.state();if(R.isAnimating)return R;const j=Xy(R.date,1);return{date:j,isAnimating:!0,direction:-1,year:Jn(j)}},onSelectDate:O=>{const R=I.state(),j=O.currentTarget.dataset.range==="true",k=O.currentTarget.dataset.date||"",L=new Date(k);return{date:L,year:Jn(L),selectMode:R.selectMode===void 0?void 0:R.selectMode==="from"?"to":"from",range:j?{from:R.selectMode==="from"?L:R.range.from,to:R.selectMode==="to"?L:R.range.to}:R.range}},onChangeMonth:O=>{const R=O.target.value,k=Array.from(O.target.options).find(P=>P.value===R),L=I.state();if(k){const P=k.dataset.index||"",M=new Date(I.state().date);return M.setMonth(+P),{...L,date:M,year:Jn(M)}}return L},onKeyDown:O=>{const R=O.key,j=I.state();if(R in Qa){(R==="ArrowUp"||R==="ArrowDown")&&O.preventDefault();const k=I.state().date,L=vn.keyof(Qa,R)?Qa[R](k,O.shiftKey?"month":"days"):null;if(L!==null)return jh(O.target,h,L),{...j,date:L,year:Jn(L)}}return I.state()}}),{props:{onChangeMonth:i,onChangeYear:s},postMiddleware:[(I,O,R)=>{var k,L;return(R.method==="onChangeMonth"||R.method==="previousMonth"||R.method==="nextMonth")&&((L=(k=R.props).onChangeMonth)==null||L.call(k,I.date)),I},(I,O,R)=>{var k,L;return R.method==="onChangeYear"&&((L=(k=R.props).onChangeYear)==null||L.call(k,I.date)),I},(I,O,R)=>{const j=R.method==="onSelectDate"||R.method==="setToday"||R.method==="onKeyDown";return a&&j&&t?(c==null||c(I.range),I):(j&&t&&(c==null||c(I.date)),I)}]}),v=cv(yA(g.date),7),S=g.date.toISOString(),T=uv(g.date,r);b.useEffect(()=>{t||c==null||c(g.date)},[S]);const E=lA(I=>{x.date(O=>{const R=new Date(O);return R.setFullYear(+I),R})},1200),A=I=>{const O=I.currentTarget.value;x.onChangeYear(O),s==null||s(new Date(O)),E(O)};return w.jsx(TC,{transition:gA,children:w.jsxs("div",{ref:h,className:ke("relative overflow-hidden",l==null?void 0:l.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(go,{initial:!1,mode:"popLayout",custom:g.direction,onExitComplete:x.onExitComplete,children:w.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(ft.button,{layout:!0,"data-focustrap":"prev",variants:Fh,onClick:x.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:w.jsx(mP,{className:"h-4 w-4"})}),w.jsx(ft.span,{layout:!0,variants:kh,custom:g.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:w.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[w.jsx("select",{style:{width:`${T.length}ch`},value:T,onChange:x.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:g.months}),w.jsx(tv,{mask:"int",value:g.year,maxLength:4,placeholder:"YYYY",onChange:A,style:{width:`${g.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(ft.button,{layout:!0,"data-focustrap":"next",variants:Fh,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:x.nextMonth,children:w.jsx(bu,{className:"h-4 w-4"})}),w.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%)"}})]}),w.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:g.week.map(I=>w.jsx("th",{className:ke("py-2 text-sm font-medium capitalize",l==null?void 0:l.weekDay),children:I.toLocaleDateString(r,{weekday:"short"})},I.toString()))})}),w.jsx(ft.tbody,{layout:!0,variants:kh,custom:g.direction,onKeyDown:x.onKeyDown,className:ke(l==null?void 0:l.week),children:v.map((I,O)=>w.jsx("tr",{className:l==null?void 0:l.week,children:I.map(R=>{var _,W,U,D;const j=R.toISOString(),k=a?j===((_=p==null?void 0:p.to)==null?void 0:_.toISOString())||j===((W=p==null?void 0:p.from)==null?void 0:W.toISOString()):j===(d==null?void 0:d.toISOString()),L=MI(R)&&o,P=(n==null?void 0:n(R))||!1,M=!DI(R,g.date)||P,F=a?bA(p==null?void 0:p.from,R,p==null?void 0:p.to):!1;return w.jsxs("td",{align:"center",className:ke("relative",l==null?void 0:l.dayFrame),children:[w.jsxs("button",{type:"button","data-date":j,disabled:P,"data-range":a,onClick:x.onSelectDate,"data-view":g.date.getMonth().toString(),className:ke(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${L?"text-primary":""} ${M?"text-disabled":""} ${k?"bg-primary text-primary-foreground":""}`,l==null?void 0:l.day,F?"size-10 border border-dashed border-card-border":""),children:[R.getDate(),k&&((U=g.range.from)==null?void 0:U.toISOString())===j?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:f.calendarFromDate})}):null,k&&((D=g.range.to)==null?void 0:D.toISOString())===j?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:f.calendarToDate})}):null]}),e?w.jsx(e,{date:R}):null]},j)})},`week-${I.length}-${O}`))})]})]},T)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"duration-300 transition-transform hover:scale-105",type:"button",onClick:x.setToday,children:"Today"})})]})})},dv=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>w.jsxs(ho,{...s,as:n,className:ke("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?w.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,w.jsx("div",{className:ke("min-w-full px-8",i),children:e})]});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 xA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function hv(...e){return t=>e.forEach(n=>xA(n,t))}function pr(...e){return C.useCallback(hv(...e),e)}function pv(e,t=[]){let n=[];function r(i,s){const a=C.createContext(s),c=n.length;n=[...n,s];function l(f){const{scope:h,children:d,...p}=f,m=(h==null?void 0:h[e][c])||a,y=C.useMemo(()=>p,Object.values(p));return w.jsx(m.Provider,{value:y,children:d})}function u(f,h){const d=(h==null?void 0:h[e][c])||a,p=C.useContext(d);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(s=>C.createContext(s));return function(a){const c=(a==null?void 0:a[e])||i;return C.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,wA(o,...t)]}function wA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...a,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Jr=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(SA);if(i){const s=i.props.children,a=o.map(c=>c===i?C.Children.count(s)>1?C.Children.only(null):C.isValidElement(s)?s.props.children:null:c);return w.jsx(ic,{...r,ref:t,children:C.isValidElement(s)?C.cloneElement(s,void 0,a):null})}return w.jsx(ic,{...r,ref:t,children:n})});Jr.displayName="Slot";var ic=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=CA(n);return C.cloneElement(n,{...EA(r,n.props),ref:t?hv(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});ic.displayName="SlotClone";var TA=({children:e})=>w.jsx(w.Fragment,{children:e});function SA(e){return C.isValidElement(e)&&e.type===TA}function EA(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function CA(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 PA(e){const t=e+"CollectionProvider",[n,r]=pv(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=d=>{const{scope:p,children:m}=d,y=b.useRef(null),g=b.useRef(new Map).current;return w.jsx(o,{scope:p,itemMap:g,collectionRef:y,children:m})};s.displayName=t;const a=e+"CollectionSlot",c=b.forwardRef((d,p)=>{const{scope:m,children:y}=d,g=i(a,m),x=pr(p,g.collectionRef);return w.jsx(Jr,{ref:x,children:y})});c.displayName=a;const l=e+"CollectionItemSlot",u="data-radix-collection-item",f=b.forwardRef((d,p)=>{const{scope:m,children:y,...g}=d,x=b.useRef(null),v=pr(p,x),S=i(l,m);return b.useEffect(()=>(S.itemMap.set(x,{ref:x,...g}),()=>void S.itemMap.delete(x))),w.jsx(Jr,{[u]:"",ref:v,children:y})});f.displayName=l;function h(d){const p=i(e+"CollectionConsumer",d);return b.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const g=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,T)=>g.indexOf(S.ref.current)-g.indexOf(T.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:s,Slot:c,ItemSlot:f},h,r]}var RA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pn=RA.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?Jr:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mv(e,t){e&&yi.flushSync(()=>e.dispatchEvent(t))}function wn(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 IA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(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 AA="DismissableLayer",sc="dismissableLayer.update",OA="dismissableLayer.pointerDownOutside",DA="dismissableLayer.focusOutside",Nh,gv=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yv=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...c}=e,l=C.useContext(gv),[u,f]=C.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),p=pr(t,A=>f(A)),m=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),x=u?m.indexOf(u):-1,v=l.layersWithOutsidePointerEventsDisabled.size>0,S=x>=g,T=kA(A=>{const I=A.target,O=[...l.branches].some(R=>R.contains(I));!S||O||(o==null||o(A),s==null||s(A),A.defaultPrevented||a==null||a())},h),E=FA(A=>{const I=A.target;[...l.branches].some(R=>R.contains(I))||(i==null||i(A),s==null||s(A),A.defaultPrevented||a==null||a())},h);return IA(A=>{x===l.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&a&&(A.preventDefault(),a()))},h),C.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Nh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Lh(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Nh)}},[u,h,n,l]),C.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Lh())},[u,l]),C.useEffect(()=>{const A=()=>d({});return document.addEventListener(sc,A),()=>document.removeEventListener(sc,A)},[]),w.jsx(pn.div,{...c,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)})});yv.displayName=AA;var MA="DismissableLayerBranch",vv=C.forwardRef((e,t)=>{const n=C.useContext(gv),r=C.useRef(null),o=pr(t,r);return C.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),w.jsx(pn.div,{...e,ref:o})});vv.displayName=MA;function kA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){bv(OA,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function FA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e),r=C.useRef(!1);return C.useEffect(()=>{const o=i=>{i.target&&!r.current&&bv(DA,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Lh(){const e=new CustomEvent(sc);document.dispatchEvent(e)}function bv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mv(o,i):o.dispatchEvent(i)}var jA=yv,NA=vv,Cs=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},LA="Portal",xv=C.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=C.useState(!1);Cs(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?jc.createPortal(w.jsx(pn.div,{...r,ref:t}),s):null});xv.displayName=LA;function _A(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var wv=e=>{const{present:t,children:n}=e,r=VA(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),i=pr(r.ref,$A(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:i}):null};wv.displayName="Presence";function VA(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),i=C.useRef("none"),s=e?"mounted":"unmounted",[a,c]=_A(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=Hi(r.current);i.current=a==="mounted"?l:"none"},[a]),Cs(()=>{const l=r.current,u=o.current;if(u!==e){const h=i.current,d=Hi(l);e?c("MOUNT"):d==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Cs(()=>{if(t){const l=f=>{const d=Hi(r.current).includes(f.animationName);f.target===t&&d&&yi.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=Hi(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Hi(e){return(e==null?void 0:e.animationName)||"none"}function $A(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 BA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=WA({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=wn(n),c=C.useCallback(l=>{if(i){const f=typeof l=="function"?l(e):l;f!==e&&a(f)}else o(l)},[i,e,o,a]);return[s,c]}function WA({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),i=wn(t);return C.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var HA="VisuallyHidden",Ou=C.forwardRef((e,t)=>w.jsx(pn.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}}));Ou.displayName=HA;var Du="ToastProvider",[Mu,zA,UA]=PA("Toast"),[Tv,IL]=pv("Toast",[UA]),[GA,na]=Tv(Du),Sv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,c]=C.useState(null),[l,u]=C.useState(0),f=C.useRef(!1),h=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Du}\`. Expected non-empty \`string\`.`),w.jsx(Mu.Provider,{scope:t,children:w.jsx(GA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:l,viewport:a,onViewportChange:c,onToastAdd:C.useCallback(()=>u(d=>d+1),[]),onToastRemove:C.useCallback(()=>u(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:s})})};Sv.displayName=Du;var Ev="ToastViewport",YA=["F8"],ac="toast.viewportPause",lc="toast.viewportResume",Cv=C.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=YA,label:o="Notifications ({hotkey})",...i}=e,s=na(Ev,n),a=zA(n),c=C.useRef(null),l=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=pr(t,f,s.onViewportChange),d=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=s.toastCount>0;C.useEffect(()=>{const y=g=>{var v;r.every(S=>g[S]||g.code===S)&&((v=f.current)==null||v.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),C.useEffect(()=>{const y=c.current,g=f.current;if(p&&y&&g){const x=()=>{if(!s.isClosePausedRef.current){const E=new CustomEvent(ac);g.dispatchEvent(E),s.isClosePausedRef.current=!0}},v=()=>{if(s.isClosePausedRef.current){const E=new CustomEvent(lc);g.dispatchEvent(E),s.isClosePausedRef.current=!1}},S=E=>{!y.contains(E.relatedTarget)&&v()},T=()=>{y.contains(document.activeElement)||v()};return y.addEventListener("focusin",x),y.addEventListener("focusout",S),y.addEventListener("pointermove",x),y.addEventListener("pointerleave",T),window.addEventListener("blur",x),window.addEventListener("focus",v),()=>{y.removeEventListener("focusin",x),y.removeEventListener("focusout",S),y.removeEventListener("pointermove",x),y.removeEventListener("pointerleave",T),window.removeEventListener("blur",x),window.removeEventListener("focus",v)}}},[p,s.isClosePausedRef]);const m=C.useCallback(({tabbingDirection:y})=>{const x=a().map(v=>{const S=v.ref.current,T=[S,...aO(S)];return y==="forwards"?T:T.reverse()});return(y==="forwards"?x.reverse():x).flat()},[a]);return C.useEffect(()=>{const y=f.current;if(y){const g=x=>{var T,E,A;const v=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!v){const I=document.activeElement,O=x.shiftKey;if(x.target===y&&O){(T=l.current)==null||T.focus();return}const k=m({tabbingDirection:O?"backwards":"forwards"}),L=k.findIndex(P=>P===I);Za(k.slice(L+1))?x.preventDefault():O?(E=l.current)==null||E.focus():(A=u.current)==null||A.focus()}};return y.addEventListener("keydown",g),()=>y.removeEventListener("keydown",g)}},[a,m]),w.jsxs(NA,{ref:c,role:"region","aria-label":o.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&w.jsx(cc,{ref:l,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});Za(y)}}),w.jsx(Mu.Slot,{scope:n,children:w.jsx(pn.ol,{tabIndex:-1,...i,ref:h})}),p&&w.jsx(cc,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});Za(y)}})]})});Cv.displayName=Ev;var Pv="ToastFocusProxy",cc=C.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=na(Pv,n);return w.jsx(Ou,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var l;const a=s.relatedTarget;!((l=i.viewport)!=null&&l.contains(a))&&r()}})});cc.displayName=Pv;var ra="Toast",KA="toast.swipeStart",qA="toast.swipeMove",XA="toast.swipeCancel",QA="toast.swipeEnd",Rv=C.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a=!0,c]=BA({prop:r,defaultProp:o,onChange:i});return w.jsx(wv,{present:n||a,children:w.jsx(eO,{open:a,...s,ref:t,onClose:()=>c(!1),onPause:wn(e.onPause),onResume:wn(e.onResume),onSwipeStart:kt(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:kt(e.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:kt(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:kt(e.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});Rv.displayName=ra;var[ZA,JA]=Tv(ra,{onClose(){}}),eO=C.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:d,...p}=e,m=na(ra,n),[y,g]=C.useState(null),x=pr(t,P=>g(P)),v=C.useRef(null),S=C.useRef(null),T=o||m.duration,E=C.useRef(0),A=C.useRef(T),I=C.useRef(0),{onToastAdd:O,onToastRemove:R}=m,j=wn(()=>{var M;(y==null?void 0:y.contains(document.activeElement))&&((M=m.viewport)==null||M.focus()),s()}),k=C.useCallback(P=>{!P||P===1/0||(window.clearTimeout(I.current),E.current=new Date().getTime(),I.current=window.setTimeout(j,P))},[j]);C.useEffect(()=>{const P=m.viewport;if(P){const M=()=>{k(A.current),l==null||l()},F=()=>{const _=new Date().getTime()-E.current;A.current=A.current-_,window.clearTimeout(I.current),c==null||c()};return P.addEventListener(ac,F),P.addEventListener(lc,M),()=>{P.removeEventListener(ac,F),P.removeEventListener(lc,M)}}},[m.viewport,T,c,l,k]),C.useEffect(()=>{i&&!m.isClosePausedRef.current&&k(T)},[i,T,m.isClosePausedRef,k]),C.useEffect(()=>(O(),()=>R()),[O,R]);const L=C.useMemo(()=>y?kv(y):null,[y]);return m.viewport?w.jsxs(w.Fragment,{children:[L&&w.jsx(tO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),w.jsx(ZA,{scope:n,onClose:j,children:yi.createPortal(w.jsx(Mu.ItemSlot,{scope:n,children:w.jsx(jA,{asChild:!0,onEscapeKeyDown:kt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||j(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(pn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:x,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,j()))}),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 M=P.clientX-v.current.x,F=P.clientY-v.current.y,_=!!S.current,W=["left","right"].includes(m.swipeDirection),U=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=W?U(0,M):0,$=W?0:U(0,F),q=P.pointerType==="touch"?10:2,J={x:D,y:$},X={originalEvent:P,delta:J};_?(S.current=J,zi(qA,f,X,{discrete:!1})):_h(J,m.swipeDirection,q)?(S.current=J,zi(KA,u,X,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(M)>q||Math.abs(F)>q)&&(v.current=null)}),onPointerUp:kt(e.onPointerUp,P=>{const M=S.current,F=P.target;if(F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),S.current=null,v.current=null,M){const _=P.currentTarget,W={originalEvent:P,delta:M};_h(M,m.swipeDirection,m.swipeThreshold)?zi(QA,d,W,{discrete:!0}):zi(XA,h,W,{discrete:!0}),_.addEventListener("click",U=>U.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),tO=e=>{const{__scopeToast:t,children:n,...r}=e,o=na(ra,t),[i,s]=C.useState(!1),[a,c]=C.useState(!1);return iO(()=>s(!0)),C.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:w.jsx(xv,{asChild:!0,children:w.jsx(Ou,{...r,children:i&&w.jsxs(w.Fragment,{children:[o.label," ",n]})})})},nO="ToastTitle",Iv=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(pn.div,{...r,ref:t})});Iv.displayName=nO;var rO="ToastDescription",Av=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(pn.div,{...r,ref:t})});Av.displayName=rO;var Ov="ToastAction",oO=C.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(Mv,{altText:n,asChild:!0,children:w.jsx(ku,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ov}\`. Expected non-empty \`string\`.`),null)});oO.displayName=Ov;var Dv="ToastClose",ku=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=JA(Dv,n);return w.jsx(Mv,{asChild:!0,children:w.jsx(pn.button,{type:"button",...r,ref:t,onClick:kt(e.onClick,o.onClose)})})});ku.displayName=Dv;var Mv=C.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return w.jsx(pn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function kv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),sO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...kv(r))}}),t}function zi(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mv(o,i):o.dispatchEvent(i)}var _h=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function iO(e=()=>{}){const t=wn(e);Cs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function sO(e){return e.nodeType===e.ELEMENT_NODE}function aO(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 Za(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var lO=Sv,cO=Cv,uO=Rv,fO=Iv,dO=Av,hO=ku;const pO=e=>{const[t,n]=b.useState(!1),r=()=>n(!0),o=()=>n(!1);return b.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},mO=lo("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"}}),Fv=b.createContext(()=>{throw new Error("Not implemented")}),gO=()=>b.useContext(Fv),Vh={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]}},yO=b.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",s=mO({theme:t.theme||"default"});return w.jsx(uO,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:w.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Vh[t.reversedIndex]||Vh.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:w.jsxs("div",{className:s,children:[w.jsxs("div",{className:"flex flex-col p-4",children:[t.title?w.jsx(fO,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,w.jsxs(dO,{className:"select-text truncate",children:[t.text,t.index]})]}),r?w.jsx(hO,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:w.jsx(wu,{className:"h-5 w-5"})}):null]})})})});function vO({children:e,max:t=5,duration:n=5e3}){const r=b.useRef(null),o=pO(r),[i,s]=b.useState([]),a=b.useCallback(()=>s([]),[]);b.useEffect(()=>()=>a(),[a]);const c=b.useCallback((l,u)=>{const f=window.crypto.randomUUID();return s(d=>{const p=[...d,{...u,id:f,text:l}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>s(d=>d.filter(p=>p.id!==f))}},[t]);return w.jsxs(lO,{duration:n,swipeThreshold:150,children:[w.jsx(Fv.Provider,{value:c,children:e}),w.jsx(go,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((l,u,f)=>{const h=()=>s(d=>d.filter(p=>p.id!==l.id));return b.createElement(yO,{...l,key:l.id,hover:o,index:u,onClose:h,isLast:f.length-1===u,reversedIndex:f.length-(u+1)})})}),w.jsx(cO,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const bO=e=>w.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[w.jsxs("header",{className:"p-6 items-start flex gap-4",children:[w.jsx("div",{className:ke("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:w.jsx("div",{children:w.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx("header",{children:w.jsx("h3",{className:"text-base leading-none",children:e.title})}),w.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?w.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),jv=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},Nv=b.createContext(""),xO=e=>{const[t,n]=jv(e.active),r=qr(0),o=qr(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=i.current;if(u===null)return;const f=m=>{if(!m)return;const y=m.getBoundingClientRect();o.set(y.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=$m(e.onChange);b.useEffect(()=>{a.current&&a.current(t)},[a,t]);const c=b.Children.toArray(e.children),l=u=>{const f=u.currentTarget,h=f.getBoundingClientRect();o.set(h.width),r.set(f.offsetLeft),n(f.dataset.id||"")};return w.jsx(Nv.Provider,{value:t,children:w.jsx(dv,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:w.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:w.jsx("nav",{className:"min-w-0",children:w.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:c.map(u=>{const f=u.props;return w.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:w.jsx(s,{"data-id":f.id,onClick:l,"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})})},wO=()=>b.useContext(Nv),TO=e=>{const t=wO();return w.jsx(b.Fragment,{children:e.id===t?e.children:null})};function Un(e){return Lv(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sn(e){var t;return(t=(Lv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lv(e){return e instanceof Node||e instanceof Pt(e).Node}function De(e){return e instanceof Element||e instanceof Pt(e).Element}function et(e){return e instanceof HTMLElement||e instanceof Pt(e).HTMLElement}function uc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function Ci(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 SO(e){return["table","td","th"].includes(Un(e))}function oa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fu(e){const t=ju(),n=De(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 EO(e){let t=Tn(e);for(;et(t)&&!_n(t);){if(Fu(t))return t;if(oa(t))return null;t=Tn(t)}return null}function ju(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _n(e){return["html","body","#document"].includes(Un(e))}function Vt(e){return Pt(e).getComputedStyle(e)}function ia(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(Un(e)==="html")return e;const t=e.assignedSlot||e.parentNode||uc(e)&&e.host||Sn(e);return uc(t)?t.host:t}function _v(e){const t=Tn(e);return _n(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&Ci(t)?t:_v(t)}function Fn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_v(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Pt(o);if(i){const a=fc(s);return t.concat(s,s.visualViewport||[],Ci(o)?o:[],a&&n?Fn(a):[])}return t.concat(o,Fn(o,[],n))}function fc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ht(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&&uc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Nu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Vv(){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 $v(e){return e.mozInputSource===0&&e.isTrusted?!0:dc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Lu(e){return CO()?!1:!dc()&&e.width===0&&e.height===0||dc()&&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 dc(){const e=/android/i;return e.test(Nu())||e.test(Vv())}function Bv(){return Nu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function CO(){return Vv().includes("jsdom/")}function eo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function PO(e){return"nativeEvent"in e}function RO(e){return e.matches("html,body")}function ut(e){return(e==null?void 0:e.ownerDocument)||document}function Ja(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 nn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const IO="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Vu(e){return et(e)&&e.matches(IO)}function mt(e){e.preventDefault(),e.stopPropagation()}function Wv(e){return e?e.getAttribute("role")==="combobox"&&Vu(e):!1}const rn=Math.min,Mt=Math.max,Ps=Math.round,Fr=Math.floor,Vn=e=>({x:e,y:e}),AO={left:"right",right:"left",bottom:"top",top:"bottom"},OO={start:"end",end:"start"};function hc(e,t,n){return Mt(e,rn(t,n))}function vo(e,t){return typeof e=="function"?e(t):e}function $n(e){return e.split("-")[0]}function bo(e){return e.split("-")[1]}function Hv(e){return e==="x"?"y":"x"}function $u(e){return e==="y"?"height":"width"}function mr(e){return["top","bottom"].includes($n(e))?"y":"x"}function Bu(e){return Hv(mr(e))}function DO(e,t,n){n===void 0&&(n=!1);const r=bo(e),o=Bu(e),i=$u(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Rs(s)),[s,Rs(s)]}function MO(e){const t=Rs(e);return[pc(e),t,pc(t)]}function pc(e){return e.replace(/start|end/g,t=>OO[t])}function kO(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function FO(e,t,n,r){const o=bo(e);let i=kO($n(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(pc)))),i}function Rs(e){return e.replace(/left|right|bottom|top/g,t=>AO[t])}function jO(e){return{top:0,right:0,bottom:0,left:0,...e}}function zv(e){return typeof e!="number"?jO(e):{top:e,right:e,bottom:e,left:e}}function Is(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 Ah;function nA(){return Ah||(Ah=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=b,t=rv();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,i=e.useRef,s=e.useEffect,a=e.useMemo,c=e.useDebugValue;function l(u,f,h,d,p){var m=i(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,A=function(D){if(!S){S=!0,E=D;var N=d(D);if(p!==void 0&&g.hasValue){var P=g.value;if(p(P,N))return R=P,P}return R=N,N}var O=E,F=R;if(r(O,D))return F;var _=d(D);return p!==void 0&&p(F,_)?F:(E=D,R=_,_)},k=h===void 0?null:h,I=function(){return A(f())},j=k===null?void 0:function(){return A(k())};return[I,j]},[f,h,d,p]),x=v[0],y=v[1],T=o(u,x,y);return s(function(){g.hasValue=!0,g.value=T},[T]),c(T),T}Ih.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ih}process.env.NODE_ENV==="production"?tA():nA();const Pr=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},rA=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},oA=e=>Object.entries(e),ov=e=>e instanceof Promise,iv=(e,t,n,r)=>t===e?n.reduce((o,i)=>i(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,i)=>i(o,t,r),{...t,...e}):n.reduce((o,i)=>i(o,t,r),e),iA=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),c=t(...s),l=(u,f)=>n(h=>iv(u,h,i,f));return ov(c)?c.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},l(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void l(c,o.current))},sA=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),c=l=>n(u=>iv(l,u,i,o.current));return ov(a)?a.then(l=>c(l)):c(a)},Pu=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=Pr(r),s=Pr((n==null?void 0:n.props)??{}),a=Pr(t),c=Pr((n==null?void 0:n.postMiddleware)??[]),l=Pr((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),f=rA(r),h=Pr(f),d=b.useRef(null);b.useEffect(()=>{if(d.current===null)return;const m=d.current;c.current.forEach(g=>{g(r,f,m)})},[r,c,f]);const[p]=b.useState(()=>{const m=()=>s.current,g=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>h.current});return oA(g).reduce((v,[x,y])=>({...v,[x]:n!=null&&n.debug?iA(x,y,o,m,d,l.current):sA(x,y,o,m,d,l.current)}),{})});return[r,p,s.current]},aA=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function lA(e,t){return b.useRef(aA(e,t)).current}const Ru={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>)`},Xo=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const c=r===""?`${n}${i}`:i;return o.concat(t(s,c,a))}return o.concat(Xo(s,t,n,a))},[]),sv=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const c=r===""?`${n}${i}`:i;return{...o,[c]:t(s,i,a)}}return{...o,[i]:sv(s,t,n,a)}},{}),Oh={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},rc=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},cA={default:e=>rc(e,{result:Oh.default}),dark:e=>rc(e,{result:Oh.dark})},uA=(e,t)=>{const n=(s,a,c)=>({key:`--${c}`,value:`${s}`}),r=Xo(e.colors,n),o=Xo(e.spacing,n),i=Xo(e.rounded,n);return rc(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})},av={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},lv={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"},fA={name:"dark",rounded:av,spacing:lv,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%)",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:{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%)"}}}},dA={name:"light",rounded:av,spacing:lv,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%)",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:{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%)"}}}},hA=fA,pA=dA,Iu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",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",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=>w.jsxs(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To"},Au=b.createContext({colorTokenParser:Ru.hsla,translations:Iu,locale:void 0}),mA=e=>{const t=b.useMemo(()=>({locale:e.locale,translations:{...Iu,...e.map},colorTokenParser:e.parser||Ru.hsla}),[e]);return w.jsx(Au.Provider,{value:t,children:e.children})},gA=()=>{const e=b.useContext(Au);if(e)return e.locale},Dt=()=>{const e=b.useContext(Au);return e?e.translations:Iu},ta=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),Dh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Mh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ou=(e,t)=>{const n=Dh(t,Mh.basic,e)||Dh(t,Mh.extend,e);return n===void 0||n===e?void 0:n},Es=()=>typeof window>"u",oc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),cv=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},yA={type:"spring",bounce:.3,duration:.6},kh=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Fh={middle:{x:"0%",opacity:1},enter:kh(1),exit:kh(-1)},jh={exit:{visibility:"hidden"}},vA=e=>{const t=fn($y(e));return Vy({start:t,end:yo(t,41)})},uv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),bA=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=$y(new Date(e).setMonth(r)),i=uv(o,t);return w.jsx("option",{value:i,"data-index":r,children:i},i)}),Qa={ArrowLeft:(e,t)=>t==="days"?kI(e,1):Qy(e,1),ArrowRight:(e,t)=>t==="days"?yo(e,1):ea(e,1),ArrowUp:(e,t)=>t==="days"?FI(e,1):jI(e,1),ArrowDown:(e,t)=>t==="days"?Ny(e,1):Ly(e,1)},Nh=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var s;if(e!=null&&e.dataset.focustrap){const a=(s=t.current)==null?void 0:s.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&&i(),setTimeout(i,r)},Jn=e=>e.getFullYear().toString().padStart(4,"0"),xA=(e,t,n)=>e===void 0||n===void 0?!1:FR(t,e)&&jR(t,n),fv=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:s,onChangeYear:a,rangeMode:c=!1,onChange:l,styles:u,markRange:f=!0,...h})=>{const d=Dt(),p=b.useRef(null),{date:m,range:g}=h,v=m||new Date,x=b.useRef(null),[y,T]=Pu({date:v,isAnimating:!1,year:Jn(v),months:bA(v,o),direction:void 0,range:{from:g==null?void 0:g.from,to:g==null?void 0:g.to},selectMode:c?"from":void 0,week:Vy({start:fn(v),end:VP(v)})},I=>({onChangeYear:j=>({year:j}),setToday:()=>({date:Zr(new Date)}),onExitComplete:()=>(Nh(x.current||null,p,I.state().date,200),x.current=null,{isAnimating:!1}),date:j=>{const D=j(I.state().date);return{date:D,year:Jn(D)}},nextMonth:j=>{x.current=j.currentTarget;const D=I.state();if(D.isAnimating)return D;const N=ea(D.date,1);return{date:N,isAnimating:!0,direction:1,year:Jn(N)}},previousMonth:j=>{x.current=j.currentTarget;const D=I.state();if(D.isAnimating)return D;const N=Qy(D.date,1);return{date:N,isAnimating:!0,direction:-1,year:Jn(N)}},onSelectDate:j=>{const D=I.state(),N=j.currentTarget.dataset.range==="true",P=j.currentTarget.dataset.date||"",O=new Date(P);return{date:O,year:Jn(O),selectMode:D.selectMode===void 0?void 0:D.selectMode==="from"?"to":"from",range:N?{from:D.selectMode==="from"?O:D.range.from,to:D.selectMode==="to"?O:D.range.to}:D.range}},onChangeMonth:j=>{const D=j.target.value,P=Array.from(j.target.options).find(F=>F.value===D),O=I.state();if(P){const F=P.dataset.index||"",_=new Date(I.state().date);return _.setMonth(+F),{...O,date:_,year:Jn(_)}}return O},onKeyDown:j=>{const D=j.key,N=I.state();if(D in Qa){(D==="ArrowUp"||D==="ArrowDown")&&j.preventDefault();const P=I.state().date,O=vn.keyof(Qa,D)?Qa[D](P,j.shiftKey?"month":"days"):null;if(O!==null)return Nh(j.target,p,O),{...N,date:O,year:Jn(O)}}return I.state()}}),{props:{onChangeMonth:s,onChangeYear:a},postMiddleware:[(I,j,D)=>{var P,O;return(D.method==="onChangeMonth"||D.method==="previousMonth"||D.method==="nextMonth")&&((O=(P=D.props).onChangeMonth)==null||O.call(P,I.date)),I},(I,j,D)=>{var P,O;return D.method==="onChangeYear"&&((O=(P=D.props).onChangeYear)==null||O.call(P,I.date)),I},(I,j,D)=>{const N=D.method==="onSelectDate"||D.method==="setToday"||D.method==="onKeyDown";return c&&N&&t?(l==null||l(I.range),I):(N&&t&&(l==null||l(I.date)),I)}]}),S=cv(vA(y.date),7),E=y.date.toISOString(),R=uv(y.date,o);b.useEffect(()=>{t||l==null||l(y.date)},[E]);const A=lA(I=>{T.date(j=>{const D=new Date(j);return D.setFullYear(+I),D})},1200),k=I=>{const j=I.currentTarget.value;T.onChangeYear(j),a==null||a(new Date(j)),A(j)};return w.jsx(TC,{transition:yA,children:w.jsxs("div",{ref:p,className:ke("relative overflow-hidden",u==null?void 0:u.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(go,{initial:!1,mode:"popLayout",custom:y.direction,onExitComplete:T.onExitComplete,children:w.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.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:w.jsx(mP,{className:"h-4 w-4"})}),w.jsx(ft.span,{layout:!0,variants:Fh,custom:y.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:w.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[w.jsx("select",{style:{width:`${R.length}ch`},value:R,onChange:T.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:y.months}),w.jsx(nv,{mask:"int",value:y.year,maxLength:4,placeholder:"YYYY",onChange:k,style:{width:`${y.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.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:w.jsx(bu,{className:"h-4 w-4"})}),w.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%)"}})]}),w.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:y.week.map(I=>w.jsx("th",{className:ke("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:I.toLocaleDateString(o,{weekday:"short"})},I.toString()))})}),w.jsx(ft.tbody,{layout:!0,variants:Fh,custom:y.direction,onKeyDown:T.onKeyDown,className:ke(u==null?void 0:u.week),children:S.map((I,j)=>w.jsx("tr",{className:u==null?void 0:u.week,children:I.map(D=>{var U,M,V,q;const N=D.toISOString(),P=c?N===((U=g==null?void 0:g.to)==null?void 0:U.toISOString())||N===((M=g==null?void 0:g.from)==null?void 0:M.toISOString()):N===(m==null?void 0:m.toISOString()),O=MI(D)&&i,F=(r==null?void 0:r(D))||!1,_=!DI(D,y.date)||F,W=c?xA(g==null?void 0:g.from,D,g==null?void 0:g.to):!1;return w.jsxs("td",{align:"center",className:ke("relative",u==null?void 0:u.dayFrame),children:[w.jsxs("button",{type:"button","data-date":N,disabled:F,"data-range":c,onClick:T.onSelectDate,"data-view":y.date.getMonth().toString(),className:ke(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${O?"text-primary":""} ${_?"text-disabled":""} ${P?"bg-primary text-primary-foreground":""}`,u==null?void 0:u.day,W&&f?"size-10 border border-dashed border-card-border":""),children:[D.getDate(),P&&((V=y.range.from)==null?void 0:V.toISOString())===N?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:(n==null?void 0:n.from)??d.calendarFromDate})}):null,P&&((q=y.range.to)==null?void 0:q.toISOString())===N?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:(n==null?void 0:n.to)??d.calendarToDate})}):null]}),e?w.jsx(e,{date:D}):null]},N)})},`week-${I.length}-${j}`))})]})]},R)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:T.setToday,children:"Today"})})]})})},dv=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>w.jsxs(ho,{...s,as:n,className:ke("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?w.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,w.jsx("div",{className:ke("min-w-full px-8",i),children:e})]});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 wA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function hv(...e){return t=>e.forEach(n=>wA(n,t))}function pr(...e){return C.useCallback(hv(...e),e)}function pv(e,t=[]){let n=[];function r(i,s){const a=C.createContext(s),c=n.length;n=[...n,s];function l(f){const{scope:h,children:d,...p}=f,m=(h==null?void 0:h[e][c])||a,g=C.useMemo(()=>p,Object.values(p));return w.jsx(m.Provider,{value:g,children:d})}function u(f,h){const d=(h==null?void 0:h[e][c])||a,p=C.useContext(d);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(s=>C.createContext(s));return function(a){const c=(a==null?void 0:a[e])||i;return C.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,TA(o,...t)]}function TA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...a,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Jr=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(EA);if(i){const s=i.props.children,a=o.map(c=>c===i?C.Children.count(s)>1?C.Children.only(null):C.isValidElement(s)?s.props.children:null:c);return w.jsx(ic,{...r,ref:t,children:C.isValidElement(s)?C.cloneElement(s,void 0,a):null})}return w.jsx(ic,{...r,ref:t,children:n})});Jr.displayName="Slot";var ic=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=PA(n);return C.cloneElement(n,{...CA(r,n.props),ref:t?hv(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});ic.displayName="SlotClone";var SA=({children:e})=>w.jsx(w.Fragment,{children:e});function EA(e){return C.isValidElement(e)&&e.type===SA}function CA(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function PA(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 RA(e){const t=e+"CollectionProvider",[n,r]=pv(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=d=>{const{scope:p,children:m}=d,g=b.useRef(null),v=b.useRef(new Map).current;return w.jsx(o,{scope:p,itemMap:v,collectionRef:g,children:m})};s.displayName=t;const a=e+"CollectionSlot",c=b.forwardRef((d,p)=>{const{scope:m,children:g}=d,v=i(a,m),x=pr(p,v.collectionRef);return w.jsx(Jr,{ref:x,children:g})});c.displayName=a;const l=e+"CollectionItemSlot",u="data-radix-collection-item",f=b.forwardRef((d,p)=>{const{scope:m,children:g,...v}=d,x=b.useRef(null),y=pr(p,x),T=i(l,m);return b.useEffect(()=>(T.itemMap.set(x,{ref:x,...v}),()=>void T.itemMap.delete(x))),w.jsx(Jr,{[u]:"",ref:y,children:g})});f.displayName=l;function h(d){const p=i(e+"CollectionConsumer",d);return b.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:s,Slot:c,ItemSlot:f},h,r]}var IA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pn=IA.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?Jr:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mv(e,t){e&&yi.flushSync(()=>e.dispatchEvent(t))}function wn(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 AA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(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 OA="DismissableLayer",sc="dismissableLayer.update",DA="dismissableLayer.pointerDownOutside",MA="dismissableLayer.focusOutside",Lh,gv=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yv=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...c}=e,l=C.useContext(gv),[u,f]=C.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),p=pr(t,R=>f(R)),m=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),x=u?m.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=v,S=FA(R=>{const A=R.target,k=[...l.branches].some(I=>I.contains(A));!T||k||(o==null||o(R),s==null||s(R),R.defaultPrevented||a==null||a())},h),E=jA(R=>{const A=R.target;[...l.branches].some(I=>I.contains(A))||(i==null||i(R),s==null||s(R),R.defaultPrevented||a==null||a())},h);return AA(R=>{x===l.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},h),C.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Lh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),_h(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Lh)}},[u,h,n,l]),C.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),_h())},[u,l]),C.useEffect(()=>{const R=()=>d({});return document.addEventListener(sc,R),()=>document.removeEventListener(sc,R)},[]),w.jsx(pn.div,{...c,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)})});yv.displayName=OA;var kA="DismissableLayerBranch",vv=C.forwardRef((e,t)=>{const n=C.useContext(gv),r=C.useRef(null),o=pr(t,r);return C.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),w.jsx(pn.div,{...e,ref:o})});vv.displayName=kA;function FA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){bv(DA,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function jA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e),r=C.useRef(!1);return C.useEffect(()=>{const o=i=>{i.target&&!r.current&&bv(MA,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _h(){const e=new CustomEvent(sc);document.dispatchEvent(e)}function bv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mv(o,i):o.dispatchEvent(i)}var NA=yv,LA=vv,Cs=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},_A="Portal",xv=C.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=C.useState(!1);Cs(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?jc.createPortal(w.jsx(pn.div,{...r,ref:t}),s):null});xv.displayName=_A;function VA(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var wv=e=>{const{present:t,children:n}=e,r=$A(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),i=pr(r.ref,BA(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:i}):null};wv.displayName="Presence";function $A(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),i=C.useRef("none"),s=e?"mounted":"unmounted",[a,c]=VA(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=Hi(r.current);i.current=a==="mounted"?l:"none"},[a]),Cs(()=>{const l=r.current,u=o.current;if(u!==e){const h=i.current,d=Hi(l);e?c("MOUNT"):d==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Cs(()=>{if(t){const l=f=>{const d=Hi(r.current).includes(f.animationName);f.target===t&&d&&yi.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=Hi(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Hi(e){return(e==null?void 0:e.animationName)||"none"}function BA(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 WA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=HA({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=wn(n),c=C.useCallback(l=>{if(i){const f=typeof l=="function"?l(e):l;f!==e&&a(f)}else o(l)},[i,e,o,a]);return[s,c]}function HA({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),i=wn(t);return C.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var zA="VisuallyHidden",Du=C.forwardRef((e,t)=>w.jsx(pn.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}}));Du.displayName=zA;var Mu="ToastProvider",[ku,UA,GA]=RA("Toast"),[Tv,AL]=pv("Toast",[GA]),[YA,na]=Tv(Mu),Sv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,c]=C.useState(null),[l,u]=C.useState(0),f=C.useRef(!1),h=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Mu}\`. Expected non-empty \`string\`.`),w.jsx(ku.Provider,{scope:t,children:w.jsx(YA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:l,viewport:a,onViewportChange:c,onToastAdd:C.useCallback(()=>u(d=>d+1),[]),onToastRemove:C.useCallback(()=>u(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:s})})};Sv.displayName=Mu;var Ev="ToastViewport",KA=["F8"],ac="toast.viewportPause",lc="toast.viewportResume",Cv=C.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=KA,label:o="Notifications ({hotkey})",...i}=e,s=na(Ev,n),a=UA(n),c=C.useRef(null),l=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=pr(t,f,s.onViewportChange),d=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=s.toastCount>0;C.useEffect(()=>{const g=v=>{var y;r.every(T=>v[T]||v.code===T)&&((y=f.current)==null||y.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),C.useEffect(()=>{const g=c.current,v=f.current;if(p&&g&&v){const x=()=>{if(!s.isClosePausedRef.current){const E=new CustomEvent(ac);v.dispatchEvent(E),s.isClosePausedRef.current=!0}},y=()=>{if(s.isClosePausedRef.current){const E=new CustomEvent(lc);v.dispatchEvent(E),s.isClosePausedRef.current=!1}},T=E=>{!g.contains(E.relatedTarget)&&y()},S=()=>{g.contains(document.activeElement)||y()};return g.addEventListener("focusin",x),g.addEventListener("focusout",T),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",S),window.addEventListener("blur",x),window.addEventListener("focus",y),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",T),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",S),window.removeEventListener("blur",x),window.removeEventListener("focus",y)}}},[p,s.isClosePausedRef]);const m=C.useCallback(({tabbingDirection:g})=>{const x=a().map(y=>{const T=y.ref.current,S=[T,...lO(T)];return g==="forwards"?S:S.reverse()});return(g==="forwards"?x.reverse():x).flat()},[a]);return C.useEffect(()=>{const g=f.current;if(g){const v=x=>{var S,E,R;const y=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!y){const A=document.activeElement,k=x.shiftKey;if(x.target===g&&k){(S=l.current)==null||S.focus();return}const D=m({tabbingDirection:k?"backwards":"forwards"}),N=D.findIndex(P=>P===A);Za(D.slice(N+1))?x.preventDefault():k?(E=l.current)==null||E.focus():(R=u.current)==null||R.focus()}};return g.addEventListener("keydown",v),()=>g.removeEventListener("keydown",v)}},[a,m]),w.jsxs(LA,{ref:c,role:"region","aria-label":o.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&w.jsx(cc,{ref:l,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Za(g)}}),w.jsx(ku.Slot,{scope:n,children:w.jsx(pn.ol,{tabIndex:-1,...i,ref:h})}),p&&w.jsx(cc,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Za(g)}})]})});Cv.displayName=Ev;var Pv="ToastFocusProxy",cc=C.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=na(Pv,n);return w.jsx(Du,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var l;const a=s.relatedTarget;!((l=i.viewport)!=null&&l.contains(a))&&r()}})});cc.displayName=Pv;var ra="Toast",qA="toast.swipeStart",XA="toast.swipeMove",QA="toast.swipeCancel",ZA="toast.swipeEnd",Rv=C.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a=!0,c]=WA({prop:r,defaultProp:o,onChange:i});return w.jsx(wv,{present:n||a,children:w.jsx(tO,{open:a,...s,ref:t,onClose:()=>c(!1),onPause:wn(e.onPause),onResume:wn(e.onResume),onSwipeStart:kt(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:kt(e.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:kt(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:kt(e.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});Rv.displayName=ra;var[JA,eO]=Tv(ra,{onClose(){}}),tO=C.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:d,...p}=e,m=na(ra,n),[g,v]=C.useState(null),x=pr(t,P=>v(P)),y=C.useRef(null),T=C.useRef(null),S=o||m.duration,E=C.useRef(0),R=C.useRef(S),A=C.useRef(0),{onToastAdd:k,onToastRemove:I}=m,j=wn(()=>{var O;(g==null?void 0:g.contains(document.activeElement))&&((O=m.viewport)==null||O.focus()),s()}),D=C.useCallback(P=>{!P||P===1/0||(window.clearTimeout(A.current),E.current=new Date().getTime(),A.current=window.setTimeout(j,P))},[j]);C.useEffect(()=>{const P=m.viewport;if(P){const O=()=>{D(R.current),l==null||l()},F=()=>{const _=new Date().getTime()-E.current;R.current=R.current-_,window.clearTimeout(A.current),c==null||c()};return P.addEventListener(ac,F),P.addEventListener(lc,O),()=>{P.removeEventListener(ac,F),P.removeEventListener(lc,O)}}},[m.viewport,S,c,l,D]),C.useEffect(()=>{i&&!m.isClosePausedRef.current&&D(S)},[i,S,m.isClosePausedRef,D]),C.useEffect(()=>(k(),()=>I()),[k,I]);const N=C.useMemo(()=>g?kv(g):null,[g]);return m.viewport?w.jsxs(w.Fragment,{children:[N&&w.jsx(nO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:N}),w.jsx(JA,{scope:n,onClose:j,children:yi.createPortal(w.jsx(ku.ItemSlot,{scope:n,children:w.jsx(NA,{asChild:!0,onEscapeKeyDown:kt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||j(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(pn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:x,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,j()))}),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,_=!!T.current,W=["left","right"].includes(m.swipeDirection),U=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,M=W?U(0,O):0,V=W?0:U(0,F),q=P.pointerType==="touch"?10:2,J={x:M,y:V},X={originalEvent:P,delta:J};_?(T.current=J,zi(XA,f,X,{discrete:!1})):Vh(J,m.swipeDirection,q)?(T.current=J,zi(qA,u,X,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(O)>q||Math.abs(F)>q)&&(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 _=P.currentTarget,W={originalEvent:P,delta:O};Vh(O,m.swipeDirection,m.swipeThreshold)?zi(ZA,d,W,{discrete:!0}):zi(QA,h,W,{discrete:!0}),_.addEventListener("click",U=>U.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),nO=e=>{const{__scopeToast:t,children:n,...r}=e,o=na(ra,t),[i,s]=C.useState(!1),[a,c]=C.useState(!1);return sO(()=>s(!0)),C.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:w.jsx(xv,{asChild:!0,children:w.jsx(Du,{...r,children:i&&w.jsxs(w.Fragment,{children:[o.label," ",n]})})})},rO="ToastTitle",Iv=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(pn.div,{...r,ref:t})});Iv.displayName=rO;var oO="ToastDescription",Av=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(pn.div,{...r,ref:t})});Av.displayName=oO;var Ov="ToastAction",iO=C.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(Mv,{altText:n,asChild:!0,children:w.jsx(Fu,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ov}\`. Expected non-empty \`string\`.`),null)});iO.displayName=Ov;var Dv="ToastClose",Fu=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=eO(Dv,n);return w.jsx(Mv,{asChild:!0,children:w.jsx(pn.button,{type:"button",...r,ref:t,onClick:kt(e.onClick,o.onClose)})})});Fu.displayName=Dv;var Mv=C.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return w.jsx(pn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function kv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),aO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...kv(r))}}),t}function zi(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mv(o,i):o.dispatchEvent(i)}var Vh=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function sO(e=()=>{}){const t=wn(e);Cs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function aO(e){return e.nodeType===e.ELEMENT_NODE}function lO(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 Za(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var cO=Sv,uO=Cv,fO=Rv,dO=Iv,hO=Av,pO=Fu;const mO=e=>{const[t,n]=b.useState(!1),r=()=>n(!0),o=()=>n(!1);return b.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},gO=lo("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"}}),Fv=b.createContext(()=>{throw new Error("Not implemented")}),yO=()=>b.useContext(Fv),$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]}},vO=b.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",s=gO({theme:t.theme||"default"});return w.jsx(fO,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:w.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:$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:w.jsxs("div",{className:s,children:[w.jsxs("div",{className:"flex flex-col p-4",children:[t.title?w.jsx(dO,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,w.jsx(hO,{className:"select-text truncate",children:t.text})]}),r?w.jsx(pO,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:w.jsx(wu,{className:"h-5 w-5"})}):null]})})})});function bO({children:e,max:t=5,duration:n=5e3}){const r=b.useRef(null),o=mO(r),[i,s]=b.useState([]),a=b.useCallback(()=>s([]),[]);b.useEffect(()=>()=>a(),[a]);const c=b.useCallback((l,u)=>{const f=window.crypto.randomUUID();return s(d=>{const p=[...d,{...u,id:f,text:l}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>s(d=>d.filter(p=>p.id!==f))}},[t]);return w.jsxs(cO,{duration:n,swipeThreshold:150,children:[w.jsx(Fv.Provider,{value:c,children:e}),w.jsx(go,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((l,u,f)=>{const h=()=>s(d=>d.filter(p=>p.id!==l.id));return b.createElement(vO,{...l,key:l.id,hover:o,index:u,onClose:h,isLast:f.length-1===u,reversedIndex:f.length-(u+1)})})}),w.jsx(uO,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const xO=e=>w.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[w.jsxs("header",{className:"p-6 items-start flex gap-4",children:[w.jsx("div",{className:ke("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:w.jsx("div",{children:w.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx("header",{children:w.jsx("h3",{className:"text-base leading-none",children:e.title})}),w.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?w.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),jv=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},Nv=b.createContext(""),wO=e=>{const[t,n]=jv(e.active),r=qr(0),o=qr(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=i.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);b.useEffect(()=>{a.current&&a.current(t)},[a,t]);const c=b.Children.toArray(e.children),l=u=>{const f=u.currentTarget,h=f.getBoundingClientRect();o.set(h.width),r.set(f.offsetLeft),n(f.dataset.id||"")};return w.jsx(Nv.Provider,{value:t,children:w.jsx(dv,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:w.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:w.jsx("nav",{className:"min-w-0",children:w.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:c.map(u=>{const f=u.props;return w.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:w.jsx(s,{"data-id":f.id,onClick:l,"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})})},TO=()=>b.useContext(Nv),SO=e=>{const t=TO();return w.jsx(b.Fragment,{children:e.id===t?e.children:null})};function Un(e){return Lv(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sn(e){var t;return(t=(Lv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lv(e){return e instanceof Node||e instanceof Pt(e).Node}function De(e){return e instanceof Element||e instanceof Pt(e).Element}function et(e){return e instanceof HTMLElement||e instanceof Pt(e).HTMLElement}function uc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function Ci(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 EO(e){return["table","td","th"].includes(Un(e))}function oa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ju(e){const t=Nu(),n=De(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 CO(e){let t=Tn(e);for(;et(t)&&!_n(t);){if(ju(t))return t;if(oa(t))return null;t=Tn(t)}return null}function Nu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _n(e){return["html","body","#document"].includes(Un(e))}function Vt(e){return Pt(e).getComputedStyle(e)}function ia(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(Un(e)==="html")return e;const t=e.assignedSlot||e.parentNode||uc(e)&&e.host||Sn(e);return uc(t)?t.host:t}function _v(e){const t=Tn(e);return _n(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&Ci(t)?t:_v(t)}function Fn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_v(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Pt(o);if(i){const a=fc(s);return t.concat(s,s.visualViewport||[],Ci(o)?o:[],a&&n?Fn(a):[])}return t.concat(o,Fn(o,[],n))}function fc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ht(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&&uc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Lu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Vv(){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 $v(e){return e.mozInputSource===0&&e.isTrusted?!0:dc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function _u(e){return PO()?!1:!dc()&&e.width===0&&e.height===0||dc()&&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 Vu(){return/apple/i.test(navigator.vendor)}function dc(){const e=/android/i;return e.test(Lu())||e.test(Vv())}function Bv(){return Lu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function PO(){return Vv().includes("jsdom/")}function eo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function RO(e){return"nativeEvent"in e}function IO(e){return e.matches("html,body")}function ut(e){return(e==null?void 0:e.ownerDocument)||document}function Ja(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 nn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const AO="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function $u(e){return et(e)&&e.matches(AO)}function mt(e){e.preventDefault(),e.stopPropagation()}function Wv(e){return e?e.getAttribute("role")==="combobox"&&$u(e):!1}const rn=Math.min,Mt=Math.max,Ps=Math.round,Fr=Math.floor,Vn=e=>({x:e,y:e}),OO={left:"right",right:"left",bottom:"top",top:"bottom"},DO={start:"end",end:"start"};function hc(e,t,n){return Mt(e,rn(t,n))}function vo(e,t){return typeof e=="function"?e(t):e}function $n(e){return e.split("-")[0]}function bo(e){return e.split("-")[1]}function Hv(e){return e==="x"?"y":"x"}function Bu(e){return e==="y"?"height":"width"}function mr(e){return["top","bottom"].includes($n(e))?"y":"x"}function Wu(e){return Hv(mr(e))}function MO(e,t,n){n===void 0&&(n=!1);const r=bo(e),o=Wu(e),i=Bu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Rs(s)),[s,Rs(s)]}function kO(e){const t=Rs(e);return[pc(e),t,pc(t)]}function pc(e){return e.replace(/start|end/g,t=>DO[t])}function FO(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function jO(e,t,n,r){const o=bo(e);let i=FO($n(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(pc)))),i}function Rs(e){return e.replace(/left|right|bottom|top/g,t=>OO[t])}function NO(e){return{top:0,right:0,bottom:0,left:0,...e}}function zv(e){return typeof e!="number"?NO(e):{top:e,right:e,bottom:e,left:e}}function Is(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 NO=["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])"],As=NO.join(","),Uv=typeof Element>"u",to=Uv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Os=!Uv&&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},Ds=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},LO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},_O=function(t,n,r){if(Ds(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(As));return n&&to.call(t,As)&&o.unshift(t),o=o.filter(r),o},VO=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Ds(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),c=a.length?a:s.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:s,candidates:l})}else{var u=to.call(s,As);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!Ds(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&h){var d=e(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else i.unshift.apply(i,s.children)}}return o},Gv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Yv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||LO(t))&&!Gv(t)?0:t.tabIndex},$O=function(t,n){var r=Yv(t);return r<0&&n&&!Gv(t)?0:r},BO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Kv=function(t){return t.tagName==="INPUT"},WO=function(t){return Kv(t)&&t.type==="hidden"},HO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},zO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},UO=function(t){if(!t.name)return!0;var n=t.form||Os(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=zO(o,t.form);return!i||i===t},GO=function(t){return Kv(t)&&t.type==="radio"},YO=function(t){return GO(t)&&!UO(t)},KO=function(t){var n,r=t&&Os(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,c;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,f;r=Os(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},$h=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},qO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=to.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(to.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var c=t.parentElement,l=Os(t);if(c&&!c.shadowRoot&&o(c)===!0)return $h(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=a}if(KO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return $h(t);return!1},XO=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 to.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},QO=function(t,n){return!(n.disabled||Ds(n)||WO(n)||qO(n,t)||HO(n)||XO(n))},mc=function(t,n){return!(YO(n)||Yv(n)<0||!QO(t,n))},ZO=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},JO=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,c=$O(a,s),l=s?e(o.candidates):a;c===0?s?n.push.apply(n,l):n.push(a):r.push({documentOrder:i,tabIndex:c,item:o,isScope:s,content:l})}),r.sort(BO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},li=function(t,n){n=n||{};var r;return n.getShadowRoot?r=VO([t],n.includeContainer,{filter:mc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ZO}):r=_O(t,n.includeContainer,mc.bind(null,n)),JO(r)},eD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return to.call(t,As)===!1?!1:mc(n,t)};function Bh(e,t,n){let{reference:r,floating:o}=e;const i=mr(t),s=Bu(t),a=$u(s),c=$n(t),l=i==="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(c){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(bo(t)){case"start":d[s]-=h*(n&&l?-1:1);break;case"end":d[s]+=h*(n&&l?-1:1);break}return d}const tD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Bh(l,r,c),h=r,d={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:g}=a[m],{x,y:v,data:S,reset:T}=await g({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:l,platform:s,elements:{reference:e,floating:t}});u=x??u,f=v??f,d={...d,[y]:{...d[y],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(l=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:f}=Bh(l,h,c)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Wu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=vo(t,e),p=zv(d),y=a[h?f==="floating"?"reference":"floating":f],g=Is(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),x=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},T=Is(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:v,strategy:c}):x);return{top:(g.top-T.top+p.top)/S.y,bottom:(T.bottom-g.bottom+p.bottom)/S.y,left:(g.left-T.left+p.left)/S.x,right:(T.right-g.right+p.right)/S.x}}const nD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=vo(e,t)||{};if(l==null)return{};const f=zv(u),h={x:n,y:r},d=Bu(o),p=$u(d),m=await s.getDimensions(l),y=d==="y",g=y?"top":"left",x=y?"bottom":"right",v=y?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[d]-h[d]-i.floating[p],T=h[d]-i.reference[d],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let A=E?E[v]:0;(!A||!await(s.isElement==null?void 0:s.isElement(E)))&&(A=a.floating[v]||i.floating[p]);const I=S/2-T/2,O=A/2-m[p]/2-1,R=rn(f[g],O),j=rn(f[x],O),k=R,L=A-m[p]-j,P=A/2-m[p]/2+I,M=hc(k,P,L),F=!c.arrow&&bo(o)!=null&&P!==M&&i.reference[p]/2-(P<k?R:j)-m[p]/2<0,_=F?P<k?P-k:P-L:0;return{[d]:h[d]+_,data:{[d]:M,centerOffset:P-M-_,...F&&{alignmentOffset:_}},reset:F}}}),rD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=vo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=$n(o),x=mr(a),v=$n(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),T=h||(v||!m?[Rs(a)]:MO(a)),E=p!=="none";!h&&E&&T.push(...FO(a,m,p,S));const A=[a,...T],I=await Wu(t,y),O=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&O.push(I[g]),f){const P=DO(o,s,S);O.push(I[P[0]],I[P[1]])}if(R=[...R,{placement:o,overflows:O}],!O.every(P=>P<=0)){var j,k;const P=(((j=i.flip)==null?void 0:j.index)||0)+1,M=A[P];if(M)return{data:{index:P,overflows:R},reset:{placement:M}};let F=(k=R.filter(_=>_.overflows[0]<=0).sort((_,W)=>_.overflows[1]-W.overflows[1])[0])==null?void 0:k.placement;if(!F)switch(d){case"bestFit":{var L;const _=(L=R.filter(W=>{if(E){const U=mr(W.placement);return U===x||U==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(U=>U>0).reduce((U,D)=>U+D,0)]).sort((W,U)=>W[1]-U[1])[0])==null?void 0:L[0];_&&(F=_);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function oD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=$n(n),a=bo(n),c=mr(n)==="y",l=["left","top"].includes(s)?-1:1,u=i&&c?-1:1,f=vo(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),c?{x:d*u,y:h*l}:{x:h*l,y:d*u}}const iD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,c=await oD(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},sD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:g,y:x}=y;return{x:g,y:x}}},...c}=vo(e,t),l={x:n,y:r},u=await Wu(t,c),f=mr($n(o)),h=Hv(f);let d=l[h],p=l[f];if(i){const y=h==="y"?"top":"left",g=h==="y"?"bottom":"right",x=d+u[y],v=d-u[g];d=hc(x,d,v)}if(s){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=p+u[y],v=p-u[g];p=hc(x,p,v)}const m=a.fn({...t,[h]:d,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},aD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=vo(e,t),c=await Wu(t,a),l=$n(n),u=bo(n),f=mr(n)==="y",{width:h,height:d}=r.floating;let p,m;l==="top"||l==="bottom"?(p=l,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=l,p=u==="end"?"top":"bottom");const y=d-c.top-c.bottom,g=h-c.left-c.right,x=rn(d-c[p],y),v=rn(h-c[m],g),S=!t.middlewareData.shift;let T=x,E=v;if(f?E=u||S?rn(v,g):g:T=u||S?rn(x,y):y,S&&!u){const I=Mt(c.left,0),O=Mt(c.right,0),R=Mt(c.top,0),j=Mt(c.bottom,0);f?E=h-2*(I!==0||O!==0?I+O:Mt(c.left,c.right)):T=d-2*(R!==0||j!==0?R+j:Mt(c.top,c.bottom))}await s({...t,availableWidth:E,availableHeight:T});const A=await o.getDimensions(i.floating);return h!==A.width||d!==A.height?{reset:{rects:!0}}:{}}}};function qv(e){const t=Vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ps(n)!==i||Ps(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Hu(e){return De(e)?e:e.contextElement}function Lr(e){const t=Hu(e);if(!et(t))return Vn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=qv(t);let s=(i?Ps(n.width):n.width)/r,a=(i?Ps(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const lD=Vn(0);function Xv(e){const t=Pt(e);return!ju()||!t.visualViewport?lD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Hu(e);let s=Vn(1);t&&(r?De(r)&&(s=Lr(r)):s=Lr(e));const a=cD(i,n,r)?Xv(i):Vn(0);let c=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const h=Pt(i),d=r&&De(r)?Pt(r):r;let p=h,m=fc(p);for(;m&&r&&d!==p;){const y=Lr(m),g=m.getBoundingClientRect(),x=Vt(m),v=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*y.x,S=g.top+(m.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,f*=y.y,c+=v,l+=S,p=Pt(m),m=fc(p)}}return Is({width:u,height:f,x:c,y:l})}function uD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Sn(r),a=t?oa(t.floating):!1;if(r===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=Vn(1);const u=Vn(0),f=et(r);if((f||!f&&!i)&&((Un(r)!=="body"||Ci(s))&&(c=ia(r)),et(r))){const h=gr(r);l=Lr(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function fD(e){return Array.from(e.getClientRects())}function Qv(e){return gr(Sn(e)).left+ia(e).scrollLeft}function dD(e){const t=Sn(e),n=ia(e),r=e.ownerDocument.body,o=Mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Qv(e);const a=-n.scrollTop;return Vt(r).direction==="rtl"&&(s+=Mt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function hD(e,t){const n=Pt(e),r=Sn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const l=ju();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function pD(e,t){const n=gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=et(e)?Lr(e):Vn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:s,height:a,x:c,y:l}}function Wh(e,t,n){let r;if(t==="viewport")r=hD(e,n);else if(t==="document")r=dD(Sn(e));else if(De(t))r=pD(t,n);else{const o=Xv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Is(r)}function Zv(e,t){const n=Tn(e);return n===t||!De(n)||_n(n)?!1:Vt(n).position==="fixed"||Zv(n,t)}function mD(e,t){const n=t.get(e);if(n)return n;let r=Fn(e,[],!1).filter(a=>De(a)&&Un(a)!=="body"),o=null;const i=Vt(e).position==="fixed";let s=i?Tn(e):e;for(;De(s)&&!_n(s);){const a=Vt(s),c=Fu(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ci(s)&&!c&&Zv(e,s))?r=r.filter(u=>u!==s):o=a,s=Tn(s)}return t.set(e,r),r}function gD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?oa(t)?[]:mD(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((l,u)=>{const f=Wh(t,u,o);return l.top=Mt(f.top,l.top),l.right=rn(f.right,l.right),l.bottom=rn(f.bottom,l.bottom),l.left=Mt(f.left,l.left),l},Wh(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yD(e){const{width:t,height:n}=qv(e);return{width:t,height:n}}function vD(e,t,n){const r=et(t),o=Sn(t),i=n==="fixed",s=gr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=Vn(0);if(r||!r&&!i)if((Un(t)!=="body"||Ci(o))&&(a=ia(t)),r){const f=gr(t,!0,i,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else o&&(c.x=Qv(o));const l=s.left+a.scrollLeft-c.x,u=s.top+a.scrollTop-c.y;return{x:l,y:u,width:s.width,height:s.height}}function el(e){return Vt(e).position==="static"}function Hh(e,t){return!et(e)||Vt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Jv(e,t){const n=Pt(e);if(oa(e))return n;if(!et(e)){let o=Tn(e);for(;o&&!_n(o);){if(De(o)&&!el(o))return o;o=Tn(o)}return n}let r=Hh(e,t);for(;r&&SO(r)&&el(r);)r=Hh(r,t);return r&&_n(r)&&el(r)&&!Fu(r)?n:r||EO(e)||n}const bD=async function(e){const t=this.getOffsetParent||Jv,n=this.getDimensions,r=await n(e.floating);return{reference:vD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xD(e){return Vt(e).direction==="rtl"}const wD={convertOffsetParentRelativeRectToViewportRelativeRect:uD,getDocumentElement:Sn,getClippingRect:gD,getOffsetParent:Jv,getElementRects:bD,getClientRects:fD,getDimensions:yD,getScale:Lr,isElement:De,isRTL:xD};function TD(e,t){let n=null,r;const o=Sn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const d=Fr(u),p=Fr(o.clientWidth-(l+f)),m=Fr(o.clientHeight-(u+h)),y=Fr(l),x={rootMargin:-d+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Mt(0,rn(1,c))||1};let v=!0;function S(T){const E=T[0].intersectionRatio;if(E!==c){if(!v)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),i}function sa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Hu(e),u=o||i?[...l?Fn(l):[],...Fn(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const f=l&&a?TD(l,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(t)})),n()}),l&&!c&&d.observe(l),d.observe(t));let p,m=c?gr(e):null;c&&y();function y(){const g=gr(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,p=requestAnimationFrame(y)}return n(),()=>{var g;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f==null||f(),(g=d)==null||g.disconnect(),d=null,c&&cancelAnimationFrame(p)}}const SD=iD,ED=sD,CD=rD,PD=aD,zh=nD,RD=(e,t,n)=>{const r=new Map,o={platform:wD,...n},i={...o.platform,_c:r};return tD(e,t,{...o,platform:i})};var os=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Ms(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(!Ms(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ms(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function eb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uh(e,t){const n=eb(e);return Math.round(t*n)/n}function Gh(e){const t=C.useRef(e);return os(()=>{t.current=e}),t}function ID(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=C.useState(r);Ms(h,r)||d(r);const[p,m]=C.useState(null),[y,g]=C.useState(null),x=C.useCallback(_=>{_!==E.current&&(E.current=_,m(_))},[]),v=C.useCallback(_=>{_!==A.current&&(A.current=_,g(_))},[]),S=i||p,T=s||y,E=C.useRef(null),A=C.useRef(null),I=C.useRef(u),O=c!=null,R=Gh(c),j=Gh(o),k=C.useCallback(()=>{if(!E.current||!A.current)return;const _={placement:t,strategy:n,middleware:h};j.current&&(_.platform=j.current),RD(E.current,A.current,_).then(W=>{const U={...W,isPositioned:!0};L.current&&!Ms(I.current,U)&&(I.current=U,yi.flushSync(()=>{f(U)}))})},[h,t,n,j]);os(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[l]);const L=C.useRef(!1);os(()=>(L.current=!0,()=>{L.current=!1}),[]),os(()=>{if(S&&(E.current=S),T&&(A.current=T),S&&T){if(R.current)return R.current(S,T,k);k()}},[S,T,k,R,O]);const P=C.useMemo(()=>({reference:E,floating:A,setReference:x,setFloating:v}),[x,v]),M=C.useMemo(()=>({reference:S,floating:T}),[S,T]),F=C.useMemo(()=>{const _={position:n,left:0,top:0};if(!M.floating)return _;const W=Uh(M.floating,u.x),U=Uh(M.floating,u.y);return a?{..._,transform:"translate("+W+"px, "+U+"px)",...eb(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:U}},[n,a,M.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:k,refs:P,elements:M,floatingStyles:F}),[u,k,P,M,F])}const AD=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?zh({element:r.current,padding:o}).fn(n):{}:r?zh({element:r,padding:o}).fn(n):{}}}},aa=(e,t)=>({...SD(e),options:[e,t]}),zu=(e,t)=>({...ED(e),options:[e,t]}),Uu=(e,t)=>({...CD(e),options:[e,t]}),OD=(e,t)=>({...PD(e),options:[e,t]}),tb=(e,t)=>({...AD(e),options:[e,t]});function gc(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 nb={...C},DD=nb.useInsertionEffect,MD=DD||(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 MD(()=>{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 Gu="ArrowUp",Pi="ArrowDown",no="ArrowLeft",xo="ArrowRight";function Ui(e,t,n){return Math.floor(e/t)!==n}function Qo(e,t){return t<0||t>=e.current.length}function tl(e,t){return xt(e,{disabledIndices:t})}function Yh(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:i=1}=t===void 0?{}:t;const s=e.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&is(s,a,o));return a}function kD(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,f=l;if(n.key===Gu){if(u&&mt(n),l===-1)f=c;else if(f=xt(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(l-i<a||f<0)){const h=l%i,d=c%i,p=c-(d-h);d===h?f=c:f=d>h?p:p-i}Qo(e,f)&&(f=l)}if(n.key===Pi&&(u&&mt(n),l===-1?f=a:(f=xt(e,{startingIndex:l,amount:i,disabledIndices:s}),o&&l+i>c&&(f=xt(e,{startingIndex:l%i-i,amount:i,disabledIndices:s}))),Qo(e,f)&&(f=l)),r==="both"){const h=Fr(l/i);n.key===xo&&(u&&mt(n),l%i!==i-1?(f=xt(e,{startingIndex:l,disabledIndices:s}),o&&Ui(f,i,h)&&(f=xt(e,{startingIndex:l-l%i-1,disabledIndices:s}))):o&&(f=xt(e,{startingIndex:l-l%i-1,disabledIndices:s})),Ui(f,i,h)&&(f=l)),n.key===no&&(u&&mt(n),l%i!==0?(f=xt(e,{startingIndex:l,decrement:!0,disabledIndices:s}),o&&Ui(f,i,h)&&(f=xt(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:s}))):o&&(f=xt(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:s})),Ui(f,i,h)&&(f=l));const d=Fr(c/i)===h;Qo(e,f)&&(o&&d?f=n.key===no?c:xt(e,{startingIndex:l-l%i-1,disabledIndices:s}):f=l)}return f}function FD(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:c}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let l=!1;for(n&&(o=0);!l;){const u=[];for(let f=0;f<a;f++)for(let h=0;h<c;h++)u.push(o+f+h*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=s}),l=!0):o++}}),[...r]}function jD(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function ND(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function is(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Kh=0;function On(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Kh);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Kh=requestAnimationFrame(i)}var be=typeof document<"u"?b.useLayoutEffect:b.useEffect;function LD(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 _D(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 rb=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function VD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=C.useState(()=>new Map),s=C.useCallback(c=>{i(l=>new Map(l).set(c,null))},[]),a=C.useCallback(c=>{i(l=>{const u=new Map(l);return u.delete(c),u})},[]);return be(()=>{const c=new Map(o);Array.from(c.keys()).sort(LD).forEach((u,f)=>{c.set(u,f)}),_D(o,c)||i(c)},[o]),C.createElement(rb.Provider,{value:C.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function ob(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=C.useContext(rb),[a,c]=C.useState(null),l=C.useRef(null),u=C.useCallback(f=>{if(l.current=f,a!==null&&(i.current[a]=f,s)){var h;const d=t!==void 0;s.current[a]=d?t:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,i,s,t]);return be(()=>{const f=l.current;if(f)return n(f),()=>{r(f)}},[n,r]),be(()=>{const f=l.current?o.get(l.current):null;f!=null&&c(f)},[o]),C.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function ro(){return ro=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},ro.apply(this,arguments)}let qh=!1,$D=0;const Xh=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+$D++;function BD(){const[e,t]=C.useState(()=>qh?Xh():void 0);return be(()=>{e==null&&t(Xh())},[]),C.useEffect(()=>{qh=!0},[]),e}const WD=nb.useId,wo=WD||BD;let ci;process.env.NODE_ENV!=="production"&&(ci=new Set);function ss(){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=ci)!=null&&e.has(o))){var i;(i=ci)==null||i.add(o),console.warn(o)}}function HD(){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=ci)!=null&&e.has(o))){var i;(i=ci)==null||i.add(o),console.error(o)}}const ib=C.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:c=0,strokeWidth:l=0,staticOffset:u,stroke:f,d:h,style:{transform:d,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||ss("The `ref` prop is required for `FloatingArrow`."));const y=wo(),[g,x]=C.useState(!1);if(be(()=>{if(!o)return;Vt(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const v=l*2,S=v/2,T=s/2*(c/-8+1),E=a/2*c/4,[A,I]=r.split("-"),O=!!h,R=A==="top"||A==="bottom",j=u&&I==="end"?"bottom":"top";let k=u&&I==="end"?"right":"left";u&&g&&(k=I==="end"?"left":"right");const L=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",M=h||"M0,0"+(" H"+s)+(" L"+(s-T)+","+(a-E))+(" Q"+s/2+","+a+" "+T+","+(a-E))+" Z",F={top:O?"rotate(180deg)":"",left:O?"rotate(90deg)":"rotate(-90deg)",bottom:O?"":"rotate(180deg)",right:O?"rotate(-90deg)":"rotate(90deg)"}[A];return C.createElement("svg",ro({},m,{"aria-hidden":!0,ref:n,width:O?s:s+v,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[k]:L,[j]:P,[A]:R||O?"100%":"calc(100% - "+v/2+"px)",transform:""+F+(d??""),...p}}),v>0&&C.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:v+(h?0:1),d:M}),C.createElement("path",{stroke:v&&!h?m.fill:"none",d:M}),C.createElement("clipPath",{id:y},C.createElement("rect",{x:-S,y:S*(O?-1:1),width:s+v,height:s})))});function sb(){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 ab=C.createContext(null),lb=C.createContext(null),Gn=()=>{var e;return((e=C.useContext(ab))==null?void 0:e.id)||null},Yn=()=>C.useContext(lb);function zD(e){const t=wo(),n=Yn(),o=Gn();return be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function UD(e){const{children:t,id:n}=e,r=Gn();return C.createElement(ab.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function GD(e){const{children:t}=e,n=C.useRef([]),r=C.useCallback(s=>{n.current=[...n.current,s]},[]),o=C.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=C.useState(()=>sb())[0];return C.createElement(lb.Provider,{value:C.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function Bn(e){return"data-floating-ui-"+e}function gt(e){const t=b.useRef(e);return be(()=>{t.current=e}),t}const Qh=Bn("safe-polygon");function nl(e,t,n){return n&&!eo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function cb(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=Yn(),p=Gn(),m=gt(l),y=gt(c),g=gt(n),x=C.useRef(),v=C.useRef(-1),S=C.useRef(),T=C.useRef(-1),E=C.useRef(!0),A=C.useRef(!1),I=C.useRef(()=>{}),O=C.useCallback(()=>{var M;const F=(M=o.current.openEvent)==null?void 0:M.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);C.useEffect(()=>{if(!a)return;function M(F){let{open:_}=F;_||(clearTimeout(v.current),clearTimeout(T.current),E.current=!0)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[a,i]),C.useEffect(()=>{if(!a||!m.current||!n)return;function M(_){O()&&r(!1,_,"hover")}const F=ut(s.floating).documentElement;return F.addEventListener("mouseleave",M),()=>{F.removeEventListener("mouseleave",M)}},[s.floating,n,r,a,m,O]);const R=C.useCallback(function(M,F,_){F===void 0&&(F=!0),_===void 0&&(_="hover");const W=nl(y.current,"close",x.current);W&&!S.current?(clearTimeout(v.current),v.current=window.setTimeout(()=>r(!1,M,_),W)):F&&(clearTimeout(v.current),r(!1,M,_))},[y,r]),j=at(()=>{I.current(),S.current=void 0}),k=at(()=>{if(A.current){const M=ut(s.floating).body;M.style.pointerEvents="",M.removeAttribute(Qh),A.current=!1}});C.useEffect(()=>{if(!a)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(D){if(clearTimeout(v.current),E.current=!1,u&&!eo(x.current)||f>0&&!nl(y.current,"open"))return;const $=nl(y.current,"open",x.current);$?v.current=window.setTimeout(()=>{g.current||r(!0,D,"hover")},$):r(!0,D,"hover")}function _(D){if(M())return;I.current();const $=ut(s.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(),j(),R(D,!0,"safe-polygon")}});const J=S.current;$.addEventListener("mousemove",J),I.current=()=>{$.removeEventListener("mousemove",J)};return}(x.current==="touch"?!Ye(s.floating,D.relatedTarget):!0)&&R(D)}function W(D){M()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:D.clientX,y:D.clientY,onClose(){k(),j(),R(D)}})(D))}if(De(s.domReference)){var U;const D=s.domReference;return n&&D.addEventListener("mouseleave",W),(U=s.floating)==null||U.addEventListener("mouseleave",W),h&&D.addEventListener("mousemove",F,{once:!0}),D.addEventListener("mouseenter",F),D.addEventListener("mouseleave",_),()=>{var $;n&&D.removeEventListener("mouseleave",W),($=s.floating)==null||$.removeEventListener("mouseleave",W),h&&D.removeEventListener("mousemove",F),D.removeEventListener("mouseenter",F),D.removeEventListener("mouseleave",_)}}},[s,a,e,u,f,h,R,j,k,r,n,g,d,y,m,o]),be(()=>{var M;if(a&&n&&(M=m.current)!=null&&M.__options.blockPointerEvents&&O()){const _=ut(s.floating).body;_.setAttribute(Qh,""),_.style.pointerEvents="none",A.current=!0;const W=s.floating;if(De(s.domReference)&&W){var F;const U=s.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",W.style.pointerEvents="auto",()=>{U.style.pointerEvents="",W.style.pointerEvents=""}}}},[a,n,p,s,d,m,O]),be(()=>{n||(x.current=void 0,j(),k())},[n,j,k]),C.useEffect(()=>()=>{j(),clearTimeout(v.current),clearTimeout(T.current),k()},[a,s.domReference,j,k]);const L=C.useMemo(()=>{function M(F){x.current=F.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(F){const{nativeEvent:_}=F;function W(){!E.current&&!g.current&&r(!0,_,"hover")}u&&!eo(x.current)||n||f===0||(clearTimeout(T.current),x.current==="touch"?W():T.current=window.setTimeout(W,f))}}},[u,r,n,g,f]),P=C.useMemo(()=>({onMouseEnter(){clearTimeout(v.current)},onMouseLeave(M){R(M.nativeEvent,!1)}}),[R]);return C.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function YD(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function hr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function KD(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),hr(e,i).forEach(c=>{o(c.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let Rr=new WeakMap,Gi=new WeakSet,Yi={},rl=0;const qD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ub=e=>e&&(e.host||ub(e.parentNode)),XD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ub(n);return e.contains(r)?r:null}).filter(n=>n!=null);function QD(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=XD(t,e),a=new Set,c=new Set(s),l=[];Yi[o]||(Yi[o]=new WeakMap);const u=Yi[o];s.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||c.has(d)||[].forEach.call(d.children,p=>{if(Un(p)!=="script")if(a.has(p))h(p);else{const m=i?p.getAttribute(i):null,y=m!==null&&m!=="false",g=(Rr.get(p)||0)+1,x=(u.get(p)||0)+1;Rr.set(p,g),u.set(p,x),l.push(p),g===1&&y&&Gi.add(p),x===1&&p.setAttribute(o,""),!y&&i&&p.setAttribute(i,"true")}})}return rl++,()=>{l.forEach(d=>{const p=(Rr.get(d)||0)-1,m=(u.get(d)||0)-1;Rr.set(d,p),u.set(d,m),p||(!Gi.has(d)&&i&&d.removeAttribute(i),Gi.delete(d)),m||d.removeAttribute(o)}),rl--,rl||(Rr=new WeakMap,Rr=new WeakMap,Gi=new WeakSet,Yi={})}}function Zh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ut(e[0]).body;return QD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const oo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function fb(e,t){const n=li(e,oo());t==="prev"&&n.reverse();const r=n.indexOf(Ht(ut(e)));return n.slice(r+1)[0]}function db(){return fb(document.body,"next")}function hb(){return fb(document.body,"prev")}function Zo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ye(n,r)}function ZD(e){li(e,oo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function JD(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 eM(e,t,n){const r=e.indexOf(t);function o(s){const a=Bn("focus-guard");let c=r+(s?1:0),l=e[c];for(;l&&(!l.isConnected||l.hasAttribute(a)||Ye(n,l));)s?c++:c--,l=e[c];return l}const i=o(!0);return i||o(!1)}const Yu={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 tM;function Jh(e){e.key==="Tab"&&(e.target,clearTimeout(tM))}const ks=C.forwardRef(function(t,n){const[r,o]=C.useState();be(()=>(_u()&&o("button"),document.addEventListener("keydown",Jh),()=>{document.removeEventListener("keydown",Jh)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Bn("focus-guard")]:"",style:Yu};return C.createElement("span",ro({},t,i))}),pb=C.createContext(null),ep=Bn("portal");function nM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=wo(),o=mb(),[i,s]=C.useState(null),a=C.useRef(null);return be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),be(()=>{if(!r||a.current)return;const c=t?document.getElementById(t):null;if(!c)return;const l=document.createElement("div");l.id=r,l.setAttribute(ep,""),c.appendChild(l),a.current=l,s(l)},[t,r]),be(()=>{if(!r||a.current)return;let c=n||(o==null?void 0:o.portalNode);c&&!De(c)&&(c=c.current),c=c||document.body;let l=null;t&&(l=document.createElement("div"),l.id=t,c.appendChild(l));const u=document.createElement("div");u.id=r,u.setAttribute(ep,""),c=l||c,c.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function To(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=nM({id:n,root:r}),[s,a]=C.useState(null),c=C.useRef(null),l=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return C.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function d(p){i&&Zo(p)&&(p.type==="focusin"?JD:ZD)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,s==null?void 0:s.modal]),C.createElement(pb.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i])},h&&i&&C.createElement(ks,{"data-type":"outside",ref:c,onFocus:d=>{if(Zo(d,i)){var p;(p=u.current)==null||p.focus()}else{const m=hb()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),h&&i&&C.createElement("span",{"aria-owns":i.id,style:Yu}),i&&yi.createPortal(t,i),h&&i&&C.createElement(ks,{"data-type":"outside",ref:l,onFocus:d=>{if(Zo(d,i)){var p;(p=f.current)==null||p.focus()}else{const m=db()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,d.nativeEvent))}}}))}const mb=()=>C.useContext(pb),tp=20;let or=[];function ol(e){or=or.filter(n=>n.isConnected);let t=e;if(!(!t||Un(t)==="body")){if(!eD(t,oo())){const n=li(t,oo())[0];n&&(t=n)}or.push(t),or.length>tp&&(or=or.slice(-tp))}}function np(){return or.slice().reverse().find(e=>e.isConnected)}const rM=C.forwardRef(function(t,n){return C.createElement("button",ro({},t,{type:"button",ref:n,tabIndex:-1,style:Yu}))});function Ri(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:h,refs:d,nodeId:p,onOpenChange:m,events:y,dataRef:g,floatingId:x,elements:{domReference:v,floating:S}}=t,T=typeof s=="number"&&s<0,E=Wv(v)&&T,A=qD()?i:!0,I=gt(o),O=gt(s),R=gt(a),j=Yn(),k=mb(),L=C.useRef(null),P=C.useRef(null),M=C.useRef(!1),F=C.useRef(!1),_=C.useRef(-1),W=k!=null,U=S==null?void 0:S.firstElementChild,D=(U==null?void 0:U.id)===x?U:S,$=at(function(G){return G===void 0&&(G=D),G?li(G,oo()):[]}),q=at(G=>{const N=$(G);return I.current.map(B=>v&&B==="reference"?v:D&&B==="floating"?D:N).filter(Boolean).flat()});C.useEffect(()=>{if(r||!l)return;function G(B){if(B.key==="Tab"){Ye(D,Ht(ut(D)))&&$().length===0&&!E&&mt(B);const z=q(),V=nn(B);I.current[0]==="reference"&&V===v&&(mt(B),B.shiftKey?On(z[z.length-1]):On(z[1])),I.current[1]==="floating"&&V===D&&B.shiftKey&&(mt(B),On(z[0]))}}const N=ut(D);return N.addEventListener("keydown",G),()=>{N.removeEventListener("keydown",G)}},[r,v,D,l,I,E,$,q]),C.useEffect(()=>{if(r||!S)return;function G(N){const B=nn(N),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 N(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(Bn("focus-guard"))||j&&(hr(j.nodesRef.current,p).find(Y=>{var ee,H;return Ye((ee=Y.context)==null?void 0:ee.elements.floating,z)||Ye((H=Y.context)==null?void 0:H.elements.domReference,z)})||YD(j.nodesRef.current,p).find(Y=>{var ee,H;return((ee=Y.context)==null?void 0:ee.elements.floating)===z||((H=Y.context)==null?void 0:H.elements.domReference)===z})));if(c&&V&&Ht(ut(D))===ut(D).body){et(D)&&(D==null||D.focus());const Y=_.current,ee=$(),H=ee[Y]||ee[ee.length-1]||D;et(H)&&H.focus()}(E||!l)&&z&&V&&!F.current&&z!==np()&&(M.current=!0,m(!1,B))})}if(S&&et(v))return v.addEventListener("focusout",N),v.addEventListener("pointerdown",G),S.addEventListener("focusout",N),()=>{v.removeEventListener("focusout",N),v.removeEventListener("pointerdown",G),S.removeEventListener("focusout",N)}},[r,v,S,D,l,p,j,k,m,f,c,$,E]),C.useEffect(()=>{var G;if(r)return;const N=Array.from((k==null||(G=k.portalNode)==null?void 0:G.querySelectorAll("["+Bn("portal")+"]"))||[]);if(S){const B=[S,...N,L.current,P.current,I.current.includes("reference")||E?v:null].filter(V=>V!=null),z=l||E?Zh(B,A,!A):Zh(B);return()=>{z()}}},[r,v,S,l,I,k,E,A]),be(()=>{if(r||!et(D))return;const G=ut(D),N=Ht(G);queueMicrotask(()=>{const B=q(D),z=O.current,V=(typeof z=="number"?B[z]:z.current)||D,Y=Ye(D,N);!T&&!Y&&h&&On(V,{preventScroll:V===D})})},[r,h,D,T,q,O]),be(()=>{if(r||!D)return;let G=!1;const N=ut(D),B=Ht(N);let V=g.current.openEvent;const Y=d.domReference.current;ol(B);function ee(H){let{open:we,reason:Ue,event:je,nested:Ge}=H;we&&(V=je),Ue==="escape-key"&&d.domReference.current&&ol(d.domReference.current),Ue==="hover"&&je.type==="mouseleave"&&(M.current=!0),Ue==="outside-press"&&(Ge?(M.current=!1,G=!0):M.current=!($v(je)||Lu(je)))}return y.on("openchange",ee),()=>{y.off("openchange",ee);const H=Ht(N),we=Ye(S,H)||j&&hr(j.nodesRef.current,p).some(ie=>{var me;return Ye((me=ie.context)==null?void 0:me.elements.floating,H)});(we||V&&["click","mousedown"].includes(V.type))&&d.domReference.current&&ol(d.domReference.current);const je=Y||B,Ge=li(ut(je).body,oo());queueMicrotask(()=>{let ie=np();!ie&&et(je)&&S&&(ie=eM(Ge,je,S)),R.current&&!M.current&&et(ie)&&(!(ie!==H&&H!==N.body)||we)&&ie.focus({preventScroll:G})})}},[r,S,D,R,g,d,y,j,p]),be(()=>{if(!r&&k)return k.setFocusManagerState({modal:l,closeOnFocusOut:f,open:h,onOpenChange:m,refs:d}),()=>{k.setFocusManagerState(null)}},[r,k,l,h,m,d,f]),be(()=>{if(r||!D||typeof MutationObserver!="function"||T)return;const G=()=>{const B=D.getAttribute("tabindex"),z=$(),V=Ht(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 N=new MutationObserver(G);return N.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}},[r,S,D,d,I,$,T]);function J(G){return r||!u||!l?null:C.createElement(rM,{ref:G==="start"?L:P,onClick:N=>m(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&A&&(l?!E:!0)&&(W||l);return C.createElement(C.Fragment,null,X&&C.createElement(ks,{"data-type":"inside",ref:k==null?void 0:k.beforeInsideRef,onFocus:G=>{if(l){const B=q();On(o[0]==="reference"?B[0]:B[B.length-1])}else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(M.current=!1,Zo(G,k.portalNode)){const B=db()||v;B==null||B.focus()}else{var N;(N=k.beforeOutsideRef.current)==null||N.focus()}}}),!E&&J("start"),n,J("end"),X&&C.createElement(ks,{"data-type":"inside",ref:k==null?void 0:k.afterInsideRef,onFocus:G=>{if(l)On(q()[0]);else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(f&&(M.current=!0),Zo(G,k.portalNode)){const B=hb()||v;B==null||B.focus()}else{var N;(N=k.afterOutsideRef.current)==null||N.focus()}}}))}const il=new Set,oM=C.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=wo();return be(()=>{if(!r)return;il.add(i);const s=/iP(hone|ad|od)|iOS/.test(Nu()),a=document.body.style,l=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[l]=u+"px"),s){var d,p;const m=((d=window.visualViewport)==null?void 0:d.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(y))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{il.delete(i),il.size===0&&(Object.assign(a,{overflow:"",[l]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,h)))}},[i,r]),C.createElement("div",ro({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function rp(e){return et(e.target)&&e.target.tagName==="BUTTON"}function op(e){return Vu(e)}function la(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:c=!0,ignoreMouse:l=!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"&&(eo(m,!0)&&l||(n&&c&&(!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}eo(m,!0)&&l||(n&&c&&(!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||rp(p))&&(p.key===" "&&!op(i)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&c),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||rp(p)||op(i)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&c),p.nativeEvent,"click"))}}),[o,i,a,l,u,r,n,c]);return C.useMemo(()=>s?{reference:d}:{},[s,d])}function iM(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,f=s.height,h=s.x,d=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&c&&(r=s.y-t.y),h-=n||0,d-=r||0,u=0,f=0,!o||l?(u=t.axis==="y"?s.width:0,f=t.axis==="x"?s.height:0,h=a&&t.x!=null?t.x:h,d=c&&t.y!=null?t.y:d):o&&!l&&(f=t.axis==="x"?s.height:f,u=t.axis==="y"?s.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 sM(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:c="both",x:l=null,y:u=null}=t,f=C.useRef(!1),h=C.useRef(null),[d,p]=C.useState(),[m,y]=C.useState([]),g=at((E,A)=>{f.current||r.current.openEvent&&!ip(r.current.openEvent)||s.setPositionReference(iM(i,{x:E,y:A,axis:c,dataRef:r,pointerType:d}))}),x=at(E=>{l!=null||u!=null||(n?h.current||y([]):g(E.clientX,E.clientY))}),v=eo(d)?o:n,S=C.useCallback(()=>{if(!v||!a||l!=null||u!=null)return;const E=Pt(o);function A(I){const O=nn(I);Ye(o,O)?(E.removeEventListener("mousemove",A),h.current=null):g(I.clientX,I.clientY)}if(!r.current.openEvent||ip(r.current.openEvent)){E.addEventListener("mousemove",A);const I=()=>{E.removeEventListener("mousemove",A),h.current=null};return h.current=I,I}s.setPositionReference(i)},[v,a,l,u,o,r,s,i,g]);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&&(l!=null||u!=null)&&(f.current=!1,g(l,u))},[a,l,u,g]);const T=C.useMemo(()=>{function E(A){let{pointerType:I}=A;p(I)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:x,onMouseEnter:x}},[x]);return C.useMemo(()=>a?{reference:T}:{},[a,T])}const aM={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},lM={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},sp=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 So(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:l="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:p}=t,m=Yn(),y=at(typeof c=="function"?c:()=>!1),g=typeof c=="function"?y:c,x=C.useRef(!1),v=C.useRef(!1),{escapeKey:S,outsidePress:T}=sp(d),{escapeKey:E,outsidePress:A}=sp(p),I=at(P=>{var M;if(!n||!s||!a||P.key!=="Escape")return;const F=(M=i.current.floatingContext)==null?void 0:M.nodeId,_=m?hr(m.nodesRef.current,F):[];if(!S&&(P.stopPropagation(),_.length>0)){let W=!0;if(_.forEach(U=>{var D;if((D=U.context)!=null&&D.open&&!U.context.dataRef.current.__escapeKeyBubbles){W=!1;return}}),!W)return}r(!1,PO(P)?P.nativeEvent:P,"escape-key")}),O=at(P=>{var M;const F=()=>{var _;I(P),(_=nn(P))==null||_.removeEventListener("keydown",F)};(M=nn(P))==null||M.addEventListener("keydown",F)}),R=at(P=>{var M;const F=x.current;x.current=!1;const _=v.current;if(v.current=!1,l==="click"&&_||F||typeof g=="function"&&!g(P))return;const W=nn(P),U="["+Bn("inert")+"]",D=ut(o.floating).querySelectorAll(U);let $=De(W)?W:null;for(;$&&!_n($);){const G=Tn($);if(_n(G)||!De(G))break;$=G}if(D.length&&De(W)&&!RO(W)&&!Ye(W,o.floating)&&Array.from(D).every(G=>!Ye($,G)))return;if(et(W)&&L){const G=W.clientWidth>0&&W.scrollWidth>W.clientWidth,N=W.clientHeight>0&&W.scrollHeight>W.clientHeight;let B=N&&P.offsetX>W.clientWidth;if(N&&Vt(W).direction==="rtl"&&(B=P.offsetX<=W.offsetWidth-W.clientWidth),B||G&&P.offsetY>W.clientHeight)return}const q=(M=i.current.floatingContext)==null?void 0:M.nodeId,J=m&&hr(m.nodesRef.current,q).some(G=>{var N;return Ja(P,(N=G.context)==null?void 0:N.elements.floating)});if(Ja(P,o.floating)||Ja(P,o.domReference)||J)return;const X=m?hr(m.nodesRef.current,q):[];if(X.length>0){let G=!0;if(X.forEach(N=>{var B;if((B=N.context)!=null&&B.open&&!N.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),j=at(P=>{var M;const F=()=>{var _;R(P),(_=nn(P))==null||_.removeEventListener(l,F)};(M=nn(P))==null||M.addEventListener(l,F)});C.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function P(_){r(!1,_,"ancestor-scroll")}const M=ut(o.floating);a&&M.addEventListener("keydown",E?O:I,E),g&&M.addEventListener(l,A?j:R,A);let F=[];return h&&(De(o.domReference)&&(F=Fn(o.domReference)),De(o.floating)&&(F=F.concat(Fn(o.floating))),!De(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(Fn(o.reference.contextElement)))),F=F.filter(_=>{var W;return _!==((W=M.defaultView)==null?void 0:W.visualViewport)}),F.forEach(_=>{_.addEventListener("scroll",P,{passive:!0})}),()=>{a&&M.removeEventListener("keydown",E?O:I,E),g&&M.removeEventListener(l,A?j:R,A),F.forEach(_=>{_.removeEventListener("scroll",P)})}},[i,o,a,g,l,n,r,h,s,S,T,I,E,O,R,A,j]),C.useEffect(()=>{x.current=!1},[g,l]);const k=C.useMemo(()=>({onKeyDown:I,[aM[f]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[I,r,u,f]),L=C.useMemo(()=>({onKeyDown:I,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[lM[l]]:()=>{x.current=!0}}),[I,l]);return C.useMemo(()=>s?{reference:k,floating:L}:{},[s,k,L])}function cM(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=wo(),i=C.useRef({}),[s]=C.useState(()=>sb()),a=Gn()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!De(d)&&HD("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=C.useState(r.reference),u=at((d,p,m)=>{i.current.openEvent=d?p:void 0,s.emit("openchange",{open:d,event:p,reason:m,nested:a}),n==null||n(d,p,m)}),f=C.useMemo(()=>({setPositionReference:l}),[]),h=C.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return C.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:f}),[t,u,h,s,o,f])}function Eo(e){e===void 0&&(e={});const{nodeId:t}=e,n=cM({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=C.useState(null),[a,c]=C.useState(null),u=(o==null?void 0:o.reference)||i,f=C.useRef(null),h=Yn();be(()=>{u&&(f.current=u)},[u]);const d=ID({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(v=>{const S=De(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;c(S),d.refs.setReference(S)},[d.refs]),m=C.useCallback(v=>{(De(v)||v===null)&&(f.current=v,s(v)),(De(d.refs.reference.current)||d.refs.reference.current===null||v!==null&&!De(v))&&d.refs.setReference(v)},[d.refs]),y=C.useMemo(()=>({...d.refs,setReference:m,setPositionReference:p,domReference:f}),[d.refs,m,p]),g=C.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),x=C.useMemo(()=>({...d,...r,refs:y,elements:g,nodeId:t}),[d,y,g,t,r]);return be(()=>{r.dataRef.current.floatingContext=x;const v=h==null?void 0:h.nodesRef.current.find(S=>S.id===t);v&&(v.context=x)}),C.useMemo(()=>({...d,context:x,refs:y,elements:g}),[d,y,g,x])}function uM(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:c=!0}=t,l=C.useRef(!1),u=C.useRef(),f=C.useRef(!0);C.useEffect(()=>{if(!a)return;const d=Pt(s.domReference);function p(){!n&&et(s.domReference)&&s.domReference===Ht(ut(s.domReference))&&(l.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)}},[s.domReference,n,a]),C.useEffect(()=>{if(!a)return;function d(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(l.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,a]),C.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=C.useMemo(()=>({onPointerDown(d){Lu(d.nativeEvent)||(f.current=!1)},onMouseLeave(){l.current=!1},onFocus(d){if(l.current)return;const p=nn(d.nativeEvent);if(c&&De(p))try{if(_u()&&Bv())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!Vu(p))return}r(!0,d.nativeEvent,"focus")},onBlur(d){l.current=!1;const p=d.relatedTarget,m=d.nativeEvent,y=De(p)&&p.hasAttribute(Bn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var g;const x=Ht(s.domReference?s.domReference.ownerDocument:document);!p&&x===s.domReference||Ye((g=i.current.floatingContext)==null?void 0:g.refs.floating.current,x)||Ye(s.domReference,x)||y||r(!1,m,"focus")})}}),[i,s.domReference,r,c]);return C.useMemo(()=>a?{reference:h}:{},[a,h])}const ap="active",lp="selected";function sl(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ap]:s,[lp]:a,...c}=e;i=c}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(c=>{let[l,u]=c;if(!(o&&[ap,lp].includes(l)))if(l.indexOf("on")===0){if(r.has(l)||r.set(l,[]),typeof u=="function"){var f;(f=r.get(l))==null||f.push(u),s[l]=function(){for(var h,d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];return(h=r.get(l))==null?void 0:h.map(y=>y(...p)).find(y=>y!==void 0)}}}else s[l]=u}),s),{})}}function Co(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=>sl(a,e,"reference"),t),i=C.useCallback(a=>sl(a,e,"floating"),n),s=C.useCallback(a=>sl(a,e,"item"),r);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let cp=!1;function ca(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function up(e,t){return ca(t,e===Gu||e===Pi,e===no||e===xo)}function al(e,t,n){return ca(t,e===Pi,n?e===no:e===xo)||e==="Enter"||e===" "||e===""}function fM(e,t,n){return ca(t,n?e===no:e===xo,e===Pi)}function fp(e,t,n){return ca(t,n?e===xo:e===no,e===Gu)}function gb(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:c=!0,selectedIndex:l=null,allowEscape:u=!1,loop:f=!1,nested:h=!1,rtl:d=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:g=!0,disabledIndices:x=void 0,orientation:v="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:A,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||ss("`useListNavigation` looping must be enabled to allow escaping."),p||ss("`useListNavigation` must be virtual to allow escaping.")),v==="vertical"&&S>1&&ss("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const O=Gn(),R=Yn(),j=at(a),k=C.useRef(m),L=C.useRef(l??-1),P=C.useRef(null),M=C.useRef(!0),F=C.useRef(j),_=C.useRef(!!o.floating),W=C.useRef(n),U=C.useRef(!1),D=C.useRef(!1),$=gt(x),q=gt(n),J=gt(T),X=gt(o.floating),G=gt(l),[N,B]=C.useState(),[z,V]=C.useState(),Y=at(function(ie,me,oe){oe===void 0&&(oe=!1);function ye(ve){p?(B(ve.id),R==null||R.events.emit("virtualfocus",ve),E&&(E.current=ve)):On(ve,{preventScroll:!0,sync:Bv()&&_u()?cp||U.current:!1})}const Qe=ie.current[me.current];Qe&&ye(Qe),requestAnimationFrame(()=>{const ve=ie.current[me.current]||Qe;if(!ve)return;Qe||ye(ve);const ot=J.current;ot&&H&&(oe||!M.current)&&(ve.scrollIntoView==null||ve.scrollIntoView(typeof ot=="boolean"?{block:"nearest",inline:"nearest"}:ot))})});be(()=>{document.createElement("div").focus({get preventScroll(){return cp=!0,!1}})},[]),be(()=>{c&&(n&&o.floating?k.current&&l!=null&&(D.current=!0,L.current=l,j(l)):_.current&&(L.current=-1,F.current(null)))},[c,n,o.floating,l,j]),be(()=>{if(c&&n&&o.floating)if(s==null){if(U.current=!1,G.current!=null)return;if(_.current&&(L.current=-1,Y(i,L)),(!W.current||!_.current)&&k.current&&(P.current!=null||k.current===!0&&P.current==null)){let ie=0;const me=()=>{i.current[0]==null?(ie<2&&(ie?requestAnimationFrame:queueMicrotask)(me),ie++):(L.current=P.current==null||al(P.current,v,d)||h?tl(i,$.current):Yh(i,$.current),P.current=null,j(L.current))};me()}}else Qo(i,s)||(L.current=s,Y(i,L,D.current),D.current=!1)},[c,n,o.floating,s,G,h,i,v,d,j,Y,$]),be(()=>{var ie;if(!c||o.floating||!R||p||!_.current)return;const me=R.nodesRef.current,oe=(ie=me.find(ve=>ve.id===O))==null||(ie=ie.context)==null?void 0:ie.elements.floating,ye=Ht(ut(o.floating)),Qe=me.some(ve=>ve.context&&Ye(ve.context.elements.floating,ye));oe&&!Qe&&M.current&&oe.focus({preventScroll:!0})},[c,o.floating,R,O,p]),be(()=>{if(!c||!R||!p||O)return;function ie(me){V(me.id),E&&(E.current=me)}return R.events.on("virtualfocus",ie),()=>{R.events.off("virtualfocus",ie)}},[c,R,p,O,E]),be(()=>{F.current=j,_.current=!!o.floating}),be(()=>{n||(P.current=null)},[n]),be(()=>{W.current=n},[n]);const ee=s!=null,H=C.useMemo(()=>{function ie(oe){if(!n)return;const ye=i.current.indexOf(oe);ye!==-1&&j(ye)}return{onFocus(oe){let{currentTarget:ye}=oe;ie(ye)},onClick:oe=>{let{currentTarget:ye}=oe;return ye.focus({preventScroll:!0})},...y&&{onMouseMove(oe){let{currentTarget:ye}=oe;ie(ye)},onPointerLeave(oe){let{pointerType:ye}=oe;!M.current||ye==="touch"||(L.current=-1,Y(i,L),j(null),p||On(X.current,{preventScroll:!0}))}}}},[n,X,Y,y,i,j,p]),we=at(ie=>{if(M.current=!1,U.current=!0,!q.current&&ie.currentTarget===X.current)return;if(h&&fp(ie.key,v,d)){mt(ie),r(!1,ie.nativeEvent,"list-navigation"),et(o.domReference)&&!p&&o.domReference.focus();return}const me=L.current,oe=tl(i,x),ye=Yh(i,x);if(ie.key==="Home"&&(mt(ie),L.current=oe,j(L.current)),ie.key==="End"&&(mt(ie),L.current=ye,j(L.current)),S>1){const Qe=A||Array.from({length:i.current.length},()=>({width:1,height:1})),ve=FD(Qe,S,I),ot=ve.findIndex(re=>re!=null&&!is(i.current,re,x)),Z=ve.reduce((re,xe,Ne)=>xe!=null&&!is(i.current,xe,x)?Ne:re,-1);if(L.current=ve[kD({current:ve.map(re=>re!=null?i.current[re]:null)},{event:ie,orientation:v,loop:f,cols:S,disabledIndices:ND([...x||i.current.map((re,xe)=>is(i.current,xe)?xe:void 0),void 0],ve),minIndex:ot,maxIndex:Z,prevIndex:jD(L.current>ye?oe:L.current,Qe,ve,S,ie.key===Pi?"bl":ie.key===xo?"tr":"tl"),stopEvent:!0})],j(L.current),v==="both")return}if(up(ie.key,v)){if(mt(ie),n&&!p&&Ht(ie.currentTarget.ownerDocument)===ie.currentTarget){L.current=al(ie.key,v,d)?oe:ye,j(L.current);return}al(ie.key,v,d)?f?L.current=me>=ye?u&&me!==i.current.length?-1:oe:xt(i,{startingIndex:me,disabledIndices:x}):L.current=Math.min(ye,xt(i,{startingIndex:me,disabledIndices:x})):f?L.current=me<=oe?u&&me!==-1?i.current.length:ye:xt(i,{startingIndex:me,decrement:!0,disabledIndices:x}):L.current=Math.max(oe,xt(i,{startingIndex:me,decrement:!0,disabledIndices:x})),Qo(i,L.current)?j(null):j(L.current)}}),Ue=C.useMemo(()=>p&&n&&ee&&{"aria-activedescendant":z||N},[p,n,ee,z,N]),je=C.useMemo(()=>({"aria-orientation":v==="both"?void 0:v,...!Wv(o.domReference)&&Ue,onKeyDown:we,onPointerMove(){M.current=!0}}),[Ue,we,o.domReference,v]),Ge=C.useMemo(()=>{function ie(oe){m==="auto"&&$v(oe.nativeEvent)&&(k.current=!0)}function me(oe){k.current=m,m==="auto"&&Lu(oe.nativeEvent)&&(k.current=!0)}return{...Ue,onKeyDown(oe){M.current=!1;const ye=oe.key.indexOf("Arrow")===0,Qe=fM(oe.key,v,d),ve=fp(oe.key,v,d),ot=up(oe.key,v),Z=(h?Qe:ot)||oe.key==="Enter"||oe.key.trim()==="";if(p&&n){const ht=R==null?void 0:R.nodesRef.current.find(Ct=>Ct.parentId==null),vt=R&&ht?KD(R.nodesRef.current,ht.id):null;if(ye&&vt&&E){const Ct=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(Qe||ve){var re,xe;const Qn=((re=vt.context)==null?void 0:re.elements.domReference)===oe.currentTarget,wr=ve&&!Qn?(xe=vt.context)==null?void 0:xe.elements.domReference:Qe?i.current.find(Tr=>(Tr==null?void 0:Tr.id)===N):null;wr&&(mt(oe),wr.dispatchEvent(Ct),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(Ct);return}}return we(oe)}if(!(!n&&!g&&ye)){if(Z&&(P.current=h&&ot?null:oe.key),h){Qe&&(mt(oe),n?(L.current=tl(i,$.current),j(L.current)):r(!0,oe.nativeEvent,"list-navigation"));return}ot&&(l!=null&&(L.current=l),mt(oe),!n&&g?r(!0,oe.nativeEvent,"list-navigation"):we(oe),n&&j(L.current))}},onFocus(){n&&!p&&j(null)},onPointerDown:me,onMouseDown:ie,onClick:ie}},[N,Ue,we,$,m,i,h,j,r,n,g,v,d,l,R,p,E]);return C.useMemo(()=>c?{reference:Ge,floating:je,item:H}:{},[c,Ge,je,H])}const dM=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Po(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=dM.get(s))!=null?n:s,c=wo(),u=Gn()!=null,f=C.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="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:c},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,c,s]),h=C.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":c}}},[a,o,c,s]),d=C.useCallback(p=>{let{active:m,selected:y}=p;const g={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...g,"aria-selected":m&&y};case"combobox":return{...g,...m&&{"aria-selected":!0}}}return{}},[o,s]);return C.useMemo(()=>i?{reference:f,floating:h,item:d}:{},[i,f,h,d])}const dp=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ir(e,t){return typeof e=="function"?e(t):e}function hM(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 pM(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,c]=C.useState("unmounted"),l=hM(n,s);return!l&&a==="close"&&c("unmounted"),be(()=>{if(r){if(n){c("initial");const u=requestAnimationFrame(()=>{c("open")});return()=>{cancelAnimationFrame(u)}}c("close")}},[n,r]),{isMounted:l,status:a}}function mM(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,c=a.split("-")[0],l=C.useMemo(()=>({side:c,placement:a}),[c,a]),u=typeof s=="number",f=(u?s:s.open)||0,h=(u?s:s.close)||0,[d,p]=C.useState(()=>({...Ir(i,l),...Ir(n,l)})),{isMounted:m,status:y}=pM(e,{duration:s}),g=gt(n),x=gt(r),v=gt(o),S=gt(i);return be(()=>{const T=Ir(g.current,l),E=Ir(v.current,l),A=Ir(S.current,l),I=Ir(x.current,l)||Object.keys(T).reduce((O,R)=>(O[R]="",O),{});if(y==="initial"&&p(O=>({transitionProperty:O.transitionProperty,...A,...T})),y==="open"&&p({transitionProperty:Object.keys(I).map(dp).join(","),transitionDuration:f+"ms",...A,...I}),y==="close"){const O=E||T;p({transitionProperty:Object.keys(O).map(dp).join(","),transitionDuration:h+"ms",...A,...O})}},[h,v,g,x,S,f,y,l]),{isMounted:m,styles:d}}function gM(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:h=[],selectedIndex:d=null}=t,p=C.useRef(),m=C.useRef(""),y=C.useRef((n=d??s)!=null?n:-1),g=C.useRef(null),x=at(a),v=at(c),S=gt(u),T=gt(h);be(()=>{r&&(clearTimeout(p.current),g.current=null,m.current="")},[r]),be(()=>{if(r&&m.current===""){var R;y.current=(R=d??s)!=null?R:-1}},[r,d,s]);const E=at(R=>{R?o.current.typing||(o.current.typing=R,v(R)):o.current.typing&&(o.current.typing=R,v(R))}),A=at(R=>{function j(F,_,W){const U=S.current?S.current(_,W):_.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(W.toLocaleLowerCase()))===0);return U?F.indexOf(U):-1}const k=i.current;if(m.current.length>0&&m.current[0]!==" "&&(j(k,k,m.current)===-1?E(!1):R.key===" "&&mt(R)),k==null||T.current.includes(R.key)||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;r&&R.key!==" "&&(mt(R),E(!0)),k.every(F=>{var _,W;return F?((_=F[0])==null?void 0:_.toLocaleLowerCase())!==((W=F[1])==null?void 0:W.toLocaleLowerCase()):!0})&&m.current===R.key&&(m.current="",y.current=g.current),m.current+=R.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",y.current=g.current,E(!1)},f);const P=y.current,M=j(k,[...k.slice((P||0)+1),...k.slice(0,(P||0)+1)],m.current);M!==-1?(x(M),g.current=M):R.key!==" "&&(m.current="",E(!1))}),I=C.useMemo(()=>({onKeyDown:A}),[A]),O=C.useMemo(()=>({onKeyDown:A,onKeyUp(R){R.key===" "&&E(!1)}}),[A,E]);return C.useMemo(()=>l?{reference:I,floating:O}:{},[l,I,O])}function hp(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[c,l]=t[s]||[0,0],[u,f]=t[a]||[0,0];l>=r!=f>=r&&n<=(u-c)*(r-l)/(f-l)+c&&(o=!o)}return o}function yM(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function vM(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,c=performance.now();function l(f,h){const d=performance.now(),p=d-c;if(s===null||a===null||p===0)return s=f,a=h,c=d,null;const m=f-s,y=h-a,x=Math.sqrt(m*m+y*y)/p;return s=f,a=h,c=d,x}const u=f=>{let{x:h,y:d,placement:p,elements:m,onClose:y,nodeId:g,tree:x}=f;return function(S){function T(){clearTimeout(o),y()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||d==null)return;const{clientX:E,clientY:A}=S,I=[E,A],O=nn(S),R=S.type==="mouseleave",j=Ye(m.floating,O),k=Ye(m.domReference,O),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),M=p.split("-")[0],F=h>P.right-P.width/2,_=d>P.bottom-P.height/2,W=yM(I,L),U=P.width>L.width,D=P.height>L.height,$=(U?L:P).left,q=(U?L:P).right,J=(D?L:P).top,X=(D?L:P).bottom;if(j&&(i=!0,!R))return;if(k&&(i=!1),k&&!R){i=!0;return}if(R&&De(S.relatedTarget)&&Ye(m.floating,S.relatedTarget)||x&&hr(x.nodesRef.current,g).some(B=>{let{context:z}=B;return z==null?void 0:z.open}))return;if(M==="top"&&d>=L.bottom-1||M==="bottom"&&d<=L.top+1||M==="left"&&h>=L.right-1||M==="right"&&h<=L.left+1)return T();let G=[];switch(M){case"top":G=[[$,L.top+1],[$,P.bottom-1],[q,P.bottom-1],[q,L.top+1]];break;case"bottom":G=[[$,P.top+1],[$,L.bottom-1],[q,L.bottom-1],[q,P.top+1]];break;case"left":G=[[P.right-1,X],[P.right-1,J],[L.left+1,J],[L.left+1,X]];break;case"right":G=[[L.right-1,X],[L.right-1,J],[P.left+1,J],[P.left+1,X]];break}function N(B){let[z,V]=B;switch(M){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],H=[[P.left,F||U?P.bottom-t:P.top],[P.right,F?U?P.bottom-t:P.top:P.bottom-t]];return[Y,ee,...H]}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],H=[[P.left,F||U?P.top+t:P.bottom],[P.right,F?U?P.top+t:P.bottom:P.top+t]];return[Y,ee,...H]}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],H=[[_||D?P.left+t:P.right,P.top],[_?D?P.left+t:P.right:P.left+t,P.bottom]];return[Y,ee,...H]}}}if(!hp([E,A],G)){if(i&&!W)return T();if(!R&&r){const B=l(S.clientX,S.clientY);if(B!==null&&B<.1)return T()}hp([E,A],N([h,d]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Ro=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[aa(10),Uu({fallbackAxisSideDirection:"end"}),zu(),tb({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:c}=Eo({open:n,middleware:i,transform:!0,whileElementsMounted:sa,onOpenChange:(p,m)=>{var g;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(g=e.onChange)==null||g.call(e,p))}}),l=la(c),u=So(c),f=Po(c),{getReferenceProps:h,getFloatingProps:d}=Co([l,u,f]);return w.jsxs(b.Fragment,{children:[w.jsx("button",{ref:s.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(To,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx(Ri,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:c,modal:!1,children:w.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:s.setFloating,style:a,"aria-labelledby":t,...d(),children:[w.jsx(ib,{ref:o,context:c,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),w.jsx("header",{className:"mb-2",children:w.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},bM=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=b.useState(!1),{context:a,refs:c}=Eo({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),l=la(a),u=Po(a),f=So(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:d}=Co([l,u,f]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(Hr,{...d(e),as:ft.button,layoutId:r,ref:c.setReference,size:"small",onClick:()=>s(!0),children:w.jsx(ft.span,{layoutId:o,children:e.trigger})}),w.jsx(go,{children:i?w.jsx(To,{root:t,children:w.jsx(Ri,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(ft.div,{...h(),ref:c.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},yb=300,xM=500,vb=(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),yc=b.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),pp=b.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:i,...s},a)=>{const c=Gn(),l=c!==null,[u,f]=b.useState(!1),[h,d]=b.useState(!1),[p,m]=b.useState(null),y=b.useRef([]),g=b.useRef([]),x=b.useContext(yc),v=Yn(),S=zD(),T=ob(),{floatingStyles:E,refs:A,context:I}=Eo({nodeId:S,open:u,transform:!0,onOpenChange:f,whileElementsMounted:sa,placement:l?"right":"bottom-start",strategy:"absolute",middleware:[aa({mainAxis:l?0:4,alignmentAxis:l?-4:0}),Uu(),zu()]}),O=Po(I,{role:"menu",enabled:!0}),R=So(I,{bubbles:!0}),j=cb(I,{enabled:n,delay:{open:yb},handleClose:vM({blockPointerEvents:!0})}),k=la(I,{event:"mousedown",toggle:!l,ignoreMouse:l,keyboardHandlers:!0}),L=gb(I,{loop:!0,activeIndex:p,virtual:!0,nested:l,allowEscape:!0,listRef:y,scrollItemIntoView:!0,onNavigate:m}),P=gM(I,{activeIndex:p,listRef:g,resetMs:xM,onMatch:u?m:void 0}),{getReferenceProps:M,getFloatingProps:F,getItemProps:_}=Co([j,k,O,R,L,P]);b.useEffect(()=>{if(!v)return;const U=()=>f(!1),D=$=>{$.nodeId!==S&&$.parentId===c&&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,c]),b.useEffect(()=>{u&&v&&v.events.emit("menuopen",{parentId:c,nodeId:S})},[v,u,S,c]);const W=r?s.className:ke(vb(s.className));return w.jsxs(UD,{id:S,children:[w.jsx(b.Fragment,{children:s.asChild?w.jsx(Jr,{children:i,ref:gc([A.setReference,T.ref,a]),tabIndex:l?x.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":l?"":void 0,role:l?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:W,...M(x.getItemProps({...s,onFocus(U){var D;(D=s.onFocus)==null||D.call(s,U),d(!1),x.setHasFocusInside(!0)}}))}):w.jsxs("button",{type:"button",ref:gc([A.setReference,T.ref,a]),tabIndex:l?x.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":l?"":void 0,role:l?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:W,...M(x.getItemProps({...s,onFocus(U){var D;(D=s.onFocus)==null||D.call(s,U),d(!1),x.setHasFocusInside(!0)}})),children:[i,l&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(bu,{size:14})]})]})}),w.jsx(yc.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:_,setHasFocusInside:d,isOpen:u},children:w.jsx(VD,{elementsRef:y,labelsRef:g,children:u&&w.jsx(To,{preserveTabOrder:!0,children:w.jsx(Ri,{context:I,modal:!1,initialFocus:l?-1:0,returnFocus:!l,children:w.jsx(t,{...F(),ref:A.setFloating,style:{...s.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})})})})})]})}),wM=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(yc),a=ob({label:r?null:typeof e=="string"?e:t}),c=Yn(),l=a.index===s.activeIndex;return w.jsxs("button",{...o,ref:gc([a.ref,i]),"data-active":l,type:"button",role:"menuitem",disabled:r,tabIndex:l?0:-1,className:vb(o.className),...s.getItemProps({onClick(u){var f;(f=o.onClick)==null||f.call(o,u),c==null||c.events.emit("click")},onFocus(u){var f;(f=o.onFocus)==null||f.call(o,u),s.setHasFocusInside(!0)}}),children:[e,n?w.jsx(n,{size:16}):null]})}),TM=b.forwardRef((e,t)=>Gn()!==null?w.jsx(pp,{...e,isParent:!1,ref:t}):w.jsx(GD,{children:w.jsx(pp,{...e,isParent:!0,ref:t})})),SM=(e,t)=>Es()?t:window.matchMedia(e).matches,EM=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(SM(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},zt="600ms",CM={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:zt},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:zt},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:zt}},PM={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:zt},exit:{translateX:["0%","30%"],opacity:0,animationDuration:zt}},ll={drawer:e=>e==="left"?CM:PM,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:zt,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:zt,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:zt,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:zt},enter:{opacity:1,scale:[1.05,1],animationDuration:zt},exit:{opacity:0,scale:.97,animationDuration:zt}}},RM=lo("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"}}),IM={top:0,left:0,right:0,bottom:-1},AM=e=>e*.62,OM=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const l=e.parent.current,u=e.value.get()||l.getBoundingClientRect().width,f=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+f))}const i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),c=AM(window.outerHeight);return a<c?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.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:IM,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?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},cl={drawer:"right",sheet:"none",dialog:"none"},DM=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),c=EM("(min-width: 64rem)"),l=e!=="dialog",u=c?e==="drawer"?i.position:cl[e]:r?cl[e]:cl.sheet,f=c||r?ll[e]:ll.sheet,h=typeof f=="function"?f(u):f,d=c||r?e:"sheet",{refs:p,context:m}=Eo({open:i.open,onOpenChange:i.onChange}),y=la(m),g=Po(m),x=So(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:v,getFloatingProps:S}=Co([y,g,x]),T=i.trigger,E=qr(void 0),A=()=>i.onChange(!1);return w.jsxs(b.Fragment,{children:[i.trigger?w.jsx(b.Fragment,{children:i.asChild?w.jsx(Jr,{ref:p.setReference,...v({layoutId:i.layoutId}),children:T}):w.jsx(ft.button,{ref:p.setReference,...v(),layoutId:i.layoutId,type:"button",children:T})}):null,w.jsx(To,{children:w.jsx(go,{presenceAffectsLayout:!0,children:i.open?w.jsx(oM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${d==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:w.jsx(Ri,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:w.jsxs(ft.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:RM({position:u,type:d}),exit:"exit",layoutId:i.layoutId,initial:"initial",ref:p.setFloating,style:d==="drawer"?{width:E}:{height:E},variants:h,...S(),children:[i.title?w.jsx("header",{className:"relative w-full",children:i.title?w.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:i.title}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i.children}),i.footer?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:i.footer}):null,o?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:A,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(wu,{})})}):null,l&&t?w.jsx(OM,{onChange:i.onChange,parent:p.floating,position:u,sheet:d==="sheet",value:E}):null]})})}):null})})]})},MM=e=>w.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}),bb=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:i,...s})=>{const[a,c]=b.useState(!1),l=b.useRef(null),u=o||"span",{refs:f,floatingStyles:h,context:d}=Eo({open:a,placement:n,transform:!0,onOpenChange:c,whileElementsMounted:sa,middleware:[aa(5),Uu({fallbackAxisSideDirection:"start"}),zu(),tb({element:l,padding:5})]}),p=cb(d,{move:!0,enabled:r,delay:{open:yb}}),m=uM(d,{enabled:r}),y=So(d,{enabled:r}),g=Po(d,{role:"tooltip",enabled:r}),x=sM(d,{enabled:!!r&&!!t}),{getReferenceProps:v,getFloatingProps:S}=Co([p,m,y,g,x]);return w.jsxs(b.Fragment,{children:[w.jsx(u,{ref:f.setReference,...v(s),children:i}),w.jsx(To,{children:a&&w.jsxs(ho,{...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:[w.jsx(ib,{ref:l,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class Fs{static getDescendantProperty(t,n,r=[]){let o,i,s,a,c,l;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=t[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(c=0,l=a.length;c<l;c++)Fs.getDescendantProperty(a[c],i,r);else i&&Fs.getDescendantProperty(a,i,r)}else r.push(t);return r}}class jr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=jr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=Fs.getDescendantProperty(o,this.keys[i]);let a=!1;for(let c=0;c<s.length;c++){const l=jr.isMatch(s[c],t,this.options.caseSensitive);if(l){a=!0,n.push({item:o,score:l});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=jr.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 jr.indexesOfFirstLetter(t,n).forEach((s,a)=>{let c=s+1;o[a]=[s];for(let l=1;l<r.length;l++){const u=r[l];if(c=t.indexOf(u,c),c===-1){o[a]=!1;break}o[a].push(c),c++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const xb=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>w.jsxs("div",{className:ke("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:w.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[i,e||r?w.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?w.jsx(bb,{title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(Dy,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?w.jsxs(b.Fragment,{children:[w.jsx(Oy,{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}),w.jsx(gP,{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]}),ua=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:c,error:l,form:u,id:f,labelClassName:h="",name:d,title:p,placeholder:m,hideLeft:y,required:g})=>{const x=f??d,v=Dt(),S=e??v.inputOptionalLabel;return w.jsxs("fieldset",{form:u,"data-error":!!l,"data-interactive":!!i,className:ke("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[w.jsxs("label",{form:u,htmlFor:x,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[!y&&!n?w.jsx(xb,{info:a,hideLeft:y,reportStatus:!0,title:p,placeholder:m,children:S||n?w.jsxs(b.Fragment,{children:[g?null:w.jsx("span",{className:"text-opacity-70",children:S}),n?w.jsx(b.Fragment,{children:n}):null]}):null}):null,w.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?w.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,c,s?w.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),w.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:l}),w.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})]})},kM=e=>w.jsx(b.Fragment,{children:e.children}),wb=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>{const s=r.Render??kM,a=r.label??r.value;return w.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsxs("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":t,"aria-checked":t,"aria-current":t,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary/70 text-primary-foreground":""}`,children:[w.jsx(s,{...o,label:r.label,value:r.value,children:a}),t?w.jsx("span",{children:w.jsx(pP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),FM={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},jM={caseSensitive:!1,sort:!1},NM=[],LM=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:c=!1,right:l,left:u,error:f,required:h=!1,...d},p)=>{const m=d.value??d.defaultValue??"",y=Dt(),[g,x]=b.useState(!1),[v,S]=b.useState(""),[T,E]=b.useState(m),[A,I]=b.useState(m),[O,R]=b.useState(null),j=b.useRef(NM),k=t&&v!==""?[{value:v,label:v,"data-dynamic":"true"},...e]:e,L=new jr(k,["value","label"],jM).search(v),P=t?void 0:`^(${e.map(V=>`${oc(V.value)}${V.label?"|"+oc(V.label):""}`).join("|")})$`;b.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:M,y:F,strategy:_,refs:W,context:U}=Eo({open:g,transform:!0,strategy:"absolute",onOpenChange:x,whileElementsMounted:sa,middleware:[aa(4),OD({elementContext:"reference",padding:10,apply(V){const ee=V.elements.reference.parentElement,H=ee==null?void 0:ee.getBoundingClientRect().width;Object.assign(V.elements.floating.style,{width:`${H}px`,maxWidth:`${H}px`,minWidth:"max-content",maxHeight:`${Math.min(480,V.availableHeight)}px`})}})]}),D=mM(U,FM),{getReferenceProps:$,getFloatingProps:q,getItemProps:J}=Co([Po(U,{role:"listbox"}),So(U),gb(U,{activeIndex:O,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:j,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:O,virtual:!0,onNavigate:V=>R(Y=>V??Y)})]);b.useEffect(()=>{const V=W.reference.current;if(V)return Hs(V)},[]);const X=(V,Y)=>{E(V.value);const ee=W.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",V.value),ee.value=V.value;const H=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(H),d.onChange&&d.onChange(H),I(V.label??""),x(!1),S(""),R(Y)},G=V=>{var ee;const Y=V.target.value;return S(Y),!g&&Y===""?x(!0):(V.target.name=d.name||"",Y?x(!0):(ee=d.onChange)==null?void 0:ee.call(d,V))},N=()=>{x(!0),S("")},B=()=>{var V;S(""),E(""),(V=W.reference.current)==null||V.setAttribute("data-value",""),I(""),Vm(W.reference.current),x(!1)},z=d.id||d.name;return w.jsxs(ua,{...d,container:a,error:f,feedback:n,form:d.form,hideLeft:c,id:d.name||d.id,interactive:o,labelClassName:r,left:u,name:d.name,optionalText:s,placeholder:d.placeholder,required:h,rightLabel:i,title:d.title,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[w.jsx(Ay,{size:20}),w.jsx("span",{className:"sr-only",children:y.inputCaretDown})]}),T?w.jsx("button",{type:"button",onClick:B,className:"transition-colors link:text-danger",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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:[w.jsx("input",{...$({...d,onChange:G,onFocus:N,pattern:P,ref:W.setReference,name:`${z}-shadow`,id:`${z}-shadow`,onClick:V=>V.currentTarget.focus(),onKeyDown(V){if(V.key==="Escape")return V.currentTarget.blur(),x(!1);if(V.key==="Enter"){if(O!==null&&L[O])return V.preventDefault(),X(L[O],O);if(L.length===1)return V.preventDefault(),X(L[0],0)}}}),"data-value":T,"data-error":!!f,"data-name":z,"data-target":z,required:h,value:g?v:A||T,"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",d.className)}),w.jsx("input",{id:z,name:z,type:"hidden","data-origin":z,ref:p,required:h,defaultValue:d.value||T||void 0}),w.jsx(To,{preserveTabOrder:!0,children:g?w.jsx(Ri,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsx("ul",{...q({ref:W.setFloating,style:{position:_,left:(M??0)+16,top:F??0,...D.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:L.map((V,Y)=>b.createElement(wb,{...J({onClick:()=>X(V,Y),ref:ee=>void(j.current[Y]=ee),selected:O===Y,active:T===V.value}),key:`${V.value}-option`,option:V,selected:O===Y,active:T===V.value}))})}):null})]})}),Tb=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:s,...a},c)=>w.jsxs("label",{"data-task":t,"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":"",s),children:[w.jsx("input",{...a,ref:c,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,w.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})]})),Ii=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:c,hideLeft:l=!1,right:u,left:f,error:h,...d},p)=>{const m=d.id??d.name,y=b.useRef(null);return b.useEffect(()=>{if(y.current===null)return;const g=y.current,x=Hs(y.current),v=S=>{const T=S;if(T.key==="Enter"&&g.enterKeyHint==="next"){const E=g.getAttribute("data-next");if(E){const A=document.getElementById(E);if(A)return A.focus(),void T.preventDefault()}}};return g.addEventListener("keydown",v),()=>{x(),g.removeEventListener("keydown",v)}},[]),w.jsx(ua,{info:n,container:c,error:h,feedback:t,hideLeft:l,left:f,optionalText:a,right:u,rightLabel:s,interactive:i,form:d.form,id:d.name||d.id,name:d.name,labelClassName:r,title:d.title,placeholder:d.placeholder,required:d.required,children:w.jsx(tv,{...d,type:e,"data-next":o,ref:Hc(p,y),id:m,name:m,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",d.className)})})}),mp=new Date(1970,11,31),ul={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},gp={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},_M={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")},fl=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},VM=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},s)=>{const a=b.useId(),c=Dt(),l=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,f]=b.useState(e||void 0),[h,d]=b.useState(!1),p=fl(l,mp).flatMap(E=>vn.keyof(ul,E.type)?ul[E.type](E.value):[]),m=fl(l,mp).reduce((E,A)=>E+(vn.keyof(gp,A.type)?gp[A.type](A.value):""),""),[y,g]=b.useState(u?fl(l,u).reduce((E,A)=>E+(vn.keyof(ul,A.type)?_M[A.type](u,A.value):""),""):""),x=E=>{const A=E.target.value;if(g(A),p.length===A.length&&p.every((O,R)=>{const j=A.charAt(R);return typeof O=="string"?j===O:O.test(j)})){const O=Zr(AI(A,m,new Date));return f(O),r==null?void 0:r(O)}return f(void 0),r==null?void 0:r(void 0)},v=E=>(f(E),r==null||r(E),g(E?OR(E,m):"")),S=Ly(u),T=S?u.toISOString():void 0;return w.jsx(Ii,{...i,mask:p,value:y,"data-value":T,"data-target":i.name,className:"uppercase",formNoValidate:!h,placeholder:m,onChange:x,required:i.required??!0,error:h?void 0:i.error,name:void 0,id:void 0,right:w.jsxs(b.Fragment,{children:[w.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:s,type:"date"}),w.jsx(Ro,{open:h,onChange:d,trigger:w.jsxs("span",{"aria-labelledby":a,children:[w.jsx("span",{id:a,className:"sr-only",children:c.datePickerCalendarButtonLabel}),w.jsx(hP,{})]}),buttonProps:{"aria-describedby":a},children:w.jsx(fv,{...i,locale:t,changeOnlyOnClick:!0,markToday:o,onChange:v,disabledDate:n,date:S?u:void 0})})]})})}),$M=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],BM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],WM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],HM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],yp=(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 vp(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?HM:WM:t.binary?BM:$M,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=yp(e,t.locale,s);return i+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,s||(e=e.toPrecision(3));const c=yp(Number(e),t.locale,s),l=n[a];return i+c+r+l}var vc={exports:{}},Ki={exports:{}},Pe={};/** @license React v16.13.1
|
|
177
|
+
*/var LO=["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])"],As=LO.join(","),Uv=typeof Element>"u",to=Uv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Os=!Uv&&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},Ds=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},_O=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},VO=function(t,n,r){if(Ds(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(As));return n&&to.call(t,As)&&o.unshift(t),o=o.filter(r),o},$O=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Ds(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),c=a.length?a:s.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:s,candidates:l})}else{var u=to.call(s,As);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!Ds(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&h){var d=e(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else i.unshift.apply(i,s.children)}}return o},Gv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Yv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||_O(t))&&!Gv(t)?0:t.tabIndex},BO=function(t,n){var r=Yv(t);return r<0&&n&&!Gv(t)?0:r},WO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Kv=function(t){return t.tagName==="INPUT"},HO=function(t){return Kv(t)&&t.type==="hidden"},zO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},UO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},GO=function(t){if(!t.name)return!0;var n=t.form||Os(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=UO(o,t.form);return!i||i===t},YO=function(t){return Kv(t)&&t.type==="radio"},KO=function(t){return YO(t)&&!GO(t)},qO=function(t){var n,r=t&&Os(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,c;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,f;r=Os(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Bh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},XO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=to.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(to.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var c=t.parentElement,l=Os(t);if(c&&!c.shadowRoot&&o(c)===!0)return Bh(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=a}if(qO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Bh(t);return!1},QO=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 to.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ZO=function(t,n){return!(n.disabled||Ds(n)||HO(n)||XO(n,t)||zO(n)||QO(n))},mc=function(t,n){return!(KO(n)||Yv(n)<0||!ZO(t,n))},JO=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},eD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,c=BO(a,s),l=s?e(o.candidates):a;c===0?s?n.push.apply(n,l):n.push(a):r.push({documentOrder:i,tabIndex:c,item:o,isScope:s,content:l})}),r.sort(WO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},li=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$O([t],n.includeContainer,{filter:mc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:JO}):r=VO(t,n.includeContainer,mc.bind(null,n)),eD(r)},tD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return to.call(t,As)===!1?!1:mc(n,t)};function Wh(e,t,n){let{reference:r,floating:o}=e;const i=mr(t),s=Wu(t),a=Bu(s),c=$n(t),l=i==="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(c){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(bo(t)){case"start":d[s]-=h*(n&&l?-1:1);break;case"end":d[s]+=h*(n&&l?-1:1);break}return d}const nD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Wh(l,r,c),h=r,d={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x,y,data:T,reset:S}=await v({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:l,platform:s,elements:{reference:e,floating:t}});u=x??u,f=y??f,d={...d,[g]:{...d[g],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(l=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=Wh(l,h,c)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Hu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=vo(t,e),p=zv(d),g=a[h?f==="floating"?"reference":"floating":f],v=Is(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),x=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},S=Is(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:y,strategy:c}):x);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 rD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=vo(e,t)||{};if(l==null)return{};const f=zv(u),h={x:n,y:r},d=Wu(o),p=Bu(d),m=await s.getDimensions(l),g=d==="y",v=g?"top":"left",x=g?"bottom":"right",y=g?"clientHeight":"clientWidth",T=i.reference[p]+i.reference[d]-h[d]-i.floating[p],S=h[d]-i.reference[d],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let R=E?E[y]:0;(!R||!await(s.isElement==null?void 0:s.isElement(E)))&&(R=a.floating[y]||i.floating[p]);const A=T/2-S/2,k=R/2-m[p]/2-1,I=rn(f[v],k),j=rn(f[x],k),D=I,N=R-m[p]-j,P=R/2-m[p]/2+A,O=hc(D,P,N),F=!c.arrow&&bo(o)!=null&&P!==O&&i.reference[p]/2-(P<D?I:j)-m[p]/2<0,_=F?P<D?P-D:P-N:0;return{[d]:h[d]+_,data:{[d]:O,centerOffset:P-O-_,...F&&{alignmentOffset:_}},reset:F}}}),oD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=vo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=$n(o),x=mr(a),y=$n(a)===a,T=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=h||(y||!m?[Rs(a)]:kO(a)),E=p!=="none";!h&&E&&S.push(...jO(a,m,p,T));const R=[a,...S],A=await Hu(t,g),k=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&k.push(A[v]),f){const P=MO(o,s,T);k.push(A[P[0]],A[P[1]])}if(I=[...I,{placement:o,overflows:k}],!k.every(P=>P<=0)){var j,D;const P=(((j=i.flip)==null?void 0:j.index)||0)+1,O=R[P];if(O)return{data:{index:P,overflows:I},reset:{placement:O}};let F=(D=I.filter(_=>_.overflows[0]<=0).sort((_,W)=>_.overflows[1]-W.overflows[1])[0])==null?void 0:D.placement;if(!F)switch(d){case"bestFit":{var N;const _=(N=I.filter(W=>{if(E){const U=mr(W.placement);return U===x||U==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(U=>U>0).reduce((U,M)=>U+M,0)]).sort((W,U)=>W[1]-U[1])[0])==null?void 0:N[0];_&&(F=_);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function iD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=$n(n),a=bo(n),c=mr(n)==="y",l=["left","top"].includes(s)?-1:1,u=i&&c?-1:1,f=vo(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),c?{x:d*u,y:h*l}:{x:h*l,y:d*u}}const sD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,c=await iD(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},aD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:v,y:x}=g;return{x:v,y:x}}},...c}=vo(e,t),l={x:n,y:r},u=await Hu(t,c),f=mr($n(o)),h=Hv(f);let d=l[h],p=l[f];if(i){const g=h==="y"?"top":"left",v=h==="y"?"bottom":"right",x=d+u[g],y=d-u[v];d=hc(x,d,y)}if(s){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=p+u[g],y=p-u[v];p=hc(x,p,y)}const m=a.fn({...t,[h]:d,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},lD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=vo(e,t),c=await Hu(t,a),l=$n(n),u=bo(n),f=mr(n)==="y",{width:h,height:d}=r.floating;let p,m;l==="top"||l==="bottom"?(p=l,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=l,p=u==="end"?"top":"bottom");const g=d-c.top-c.bottom,v=h-c.left-c.right,x=rn(d-c[p],g),y=rn(h-c[m],v),T=!t.middlewareData.shift;let S=x,E=y;if(f?E=u||T?rn(y,v):v:S=u||T?rn(x,g):g,T&&!u){const A=Mt(c.left,0),k=Mt(c.right,0),I=Mt(c.top,0),j=Mt(c.bottom,0);f?E=h-2*(A!==0||k!==0?A+k:Mt(c.left,c.right)):S=d-2*(I!==0||j!==0?I+j:Mt(c.top,c.bottom))}await s({...t,availableWidth:E,availableHeight:S});const R=await o.getDimensions(i.floating);return h!==R.width||d!==R.height?{reset:{rects:!0}}:{}}}};function qv(e){const t=Vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ps(n)!==i||Ps(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function zu(e){return De(e)?e:e.contextElement}function Lr(e){const t=zu(e);if(!et(t))return Vn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=qv(t);let s=(i?Ps(n.width):n.width)/r,a=(i?Ps(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const cD=Vn(0);function Xv(e){const t=Pt(e);return!Nu()||!t.visualViewport?cD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=zu(e);let s=Vn(1);t&&(r?De(r)&&(s=Lr(r)):s=Lr(e));const a=uD(i,n,r)?Xv(i):Vn(0);let c=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const h=Pt(i),d=r&&De(r)?Pt(r):r;let p=h,m=fc(p);for(;m&&r&&d!==p;){const g=Lr(m),v=m.getBoundingClientRect(),x=Vt(m),y=v.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,T=v.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;c*=g.x,l*=g.y,u*=g.x,f*=g.y,c+=y,l+=T,p=Pt(m),m=fc(p)}}return Is({width:u,height:f,x:c,y:l})}function fD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Sn(r),a=t?oa(t.floating):!1;if(r===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=Vn(1);const u=Vn(0),f=et(r);if((f||!f&&!i)&&((Un(r)!=="body"||Ci(s))&&(c=ia(r)),et(r))){const h=gr(r);l=Lr(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function dD(e){return Array.from(e.getClientRects())}function Qv(e){return gr(Sn(e)).left+ia(e).scrollLeft}function hD(e){const t=Sn(e),n=ia(e),r=e.ownerDocument.body,o=Mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Qv(e);const a=-n.scrollTop;return Vt(r).direction==="rtl"&&(s+=Mt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function pD(e,t){const n=Pt(e),r=Sn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const l=Nu();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function mD(e,t){const n=gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=et(e)?Lr(e):Vn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:s,height:a,x:c,y:l}}function Hh(e,t,n){let r;if(t==="viewport")r=pD(e,n);else if(t==="document")r=hD(Sn(e));else if(De(t))r=mD(t,n);else{const o=Xv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Is(r)}function Zv(e,t){const n=Tn(e);return n===t||!De(n)||_n(n)?!1:Vt(n).position==="fixed"||Zv(n,t)}function gD(e,t){const n=t.get(e);if(n)return n;let r=Fn(e,[],!1).filter(a=>De(a)&&Un(a)!=="body"),o=null;const i=Vt(e).position==="fixed";let s=i?Tn(e):e;for(;De(s)&&!_n(s);){const a=Vt(s),c=ju(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ci(s)&&!c&&Zv(e,s))?r=r.filter(u=>u!==s):o=a,s=Tn(s)}return t.set(e,r),r}function yD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?oa(t)?[]:gD(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((l,u)=>{const f=Hh(t,u,o);return l.top=Mt(f.top,l.top),l.right=rn(f.right,l.right),l.bottom=rn(f.bottom,l.bottom),l.left=Mt(f.left,l.left),l},Hh(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function vD(e){const{width:t,height:n}=qv(e);return{width:t,height:n}}function bD(e,t,n){const r=et(t),o=Sn(t),i=n==="fixed",s=gr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=Vn(0);if(r||!r&&!i)if((Un(t)!=="body"||Ci(o))&&(a=ia(t)),r){const f=gr(t,!0,i,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else o&&(c.x=Qv(o));const l=s.left+a.scrollLeft-c.x,u=s.top+a.scrollTop-c.y;return{x:l,y:u,width:s.width,height:s.height}}function el(e){return Vt(e).position==="static"}function zh(e,t){return!et(e)||Vt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Jv(e,t){const n=Pt(e);if(oa(e))return n;if(!et(e)){let o=Tn(e);for(;o&&!_n(o);){if(De(o)&&!el(o))return o;o=Tn(o)}return n}let r=zh(e,t);for(;r&&EO(r)&&el(r);)r=zh(r,t);return r&&_n(r)&&el(r)&&!ju(r)?n:r||CO(e)||n}const xD=async function(e){const t=this.getOffsetParent||Jv,n=this.getDimensions,r=await n(e.floating);return{reference:bD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wD(e){return Vt(e).direction==="rtl"}const TD={convertOffsetParentRelativeRectToViewportRelativeRect:fD,getDocumentElement:Sn,getClippingRect:yD,getOffsetParent:Jv,getElementRects:xD,getClientRects:dD,getDimensions:vD,getScale:Lr,isElement:De,isRTL:wD};function SD(e,t){let n=null,r;const o=Sn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const d=Fr(u),p=Fr(o.clientWidth-(l+f)),m=Fr(o.clientHeight-(u+h)),g=Fr(l),x={rootMargin:-d+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Mt(0,rn(1,c))||1};let y=!0;function T(S){const E=S[0].intersectionRatio;if(E!==c){if(!y)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(T,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return s(!0),i}function sa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=zu(e),u=o||i?[...l?Fn(l):[],...Fn(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=l&&a?SD(l,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(v=>{let[x]=v;x&&x.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=d)==null||y.observe(t)})),n()}),l&&!c&&d.observe(l),d.observe(t));let p,m=c?gr(e):null;c&&g();function g(){const v=gr(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(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f==null||f(),(v=d)==null||v.disconnect(),d=null,c&&cancelAnimationFrame(p)}}const ED=sD,CD=aD,PD=oD,RD=lD,Uh=rD,ID=(e,t,n)=>{const r=new Map,o={platform:TD,...n},i={...o.platform,_c:r};return nD(e,t,{...o,platform:i})};var os=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Ms(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(!Ms(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ms(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function eb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gh(e,t){const n=eb(e);return Math.round(t*n)/n}function Yh(e){const t=C.useRef(e);return os(()=>{t.current=e}),t}function AD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=C.useState(r);Ms(h,r)||d(r);const[p,m]=C.useState(null),[g,v]=C.useState(null),x=C.useCallback(_=>{_!==E.current&&(E.current=_,m(_))},[]),y=C.useCallback(_=>{_!==R.current&&(R.current=_,v(_))},[]),T=i||p,S=s||g,E=C.useRef(null),R=C.useRef(null),A=C.useRef(u),k=c!=null,I=Yh(c),j=Yh(o),D=C.useCallback(()=>{if(!E.current||!R.current)return;const _={placement:t,strategy:n,middleware:h};j.current&&(_.platform=j.current),ID(E.current,R.current,_).then(W=>{const U={...W,isPositioned:!0};N.current&&!Ms(A.current,U)&&(A.current=U,yi.flushSync(()=>{f(U)}))})},[h,t,n,j]);os(()=>{l===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[l]);const N=C.useRef(!1);os(()=>(N.current=!0,()=>{N.current=!1}),[]),os(()=>{if(T&&(E.current=T),S&&(R.current=S),T&&S){if(I.current)return I.current(T,S,D);D()}},[T,S,D,I,k]);const P=C.useMemo(()=>({reference:E,floating:R,setReference:x,setFloating:y}),[x,y]),O=C.useMemo(()=>({reference:T,floating:S}),[T,S]),F=C.useMemo(()=>{const _={position:n,left:0,top:0};if(!O.floating)return _;const W=Gh(O.floating,u.x),U=Gh(O.floating,u.y);return a?{..._,transform:"translate("+W+"px, "+U+"px)",...eb(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:U}},[n,a,O.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:D,refs:P,elements:O,floatingStyles:F}),[u,D,P,O,F])}const OD=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):{}}}},aa=(e,t)=>({...ED(e),options:[e,t]}),Uu=(e,t)=>({...CD(e),options:[e,t]}),Gu=(e,t)=>({...PD(e),options:[e,t]}),DD=(e,t)=>({...RD(e),options:[e,t]}),tb=(e,t)=>({...OD(e),options:[e,t]});function gc(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 nb={...C},MD=nb.useInsertionEffect,kD=MD||(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 kD(()=>{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 Yu="ArrowUp",Pi="ArrowDown",no="ArrowLeft",xo="ArrowRight";function Ui(e,t,n){return Math.floor(e/t)!==n}function Qo(e,t){return t<0||t>=e.current.length}function tl(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:i=1}=t===void 0?{}:t;const s=e.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&is(s,a,o));return a}function FD(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,f=l;if(n.key===Yu){if(u&&mt(n),l===-1)f=c;else if(f=xt(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(l-i<a||f<0)){const h=l%i,d=c%i,p=c-(d-h);d===h?f=c:f=d>h?p:p-i}Qo(e,f)&&(f=l)}if(n.key===Pi&&(u&&mt(n),l===-1?f=a:(f=xt(e,{startingIndex:l,amount:i,disabledIndices:s}),o&&l+i>c&&(f=xt(e,{startingIndex:l%i-i,amount:i,disabledIndices:s}))),Qo(e,f)&&(f=l)),r==="both"){const h=Fr(l/i);n.key===xo&&(u&&mt(n),l%i!==i-1?(f=xt(e,{startingIndex:l,disabledIndices:s}),o&&Ui(f,i,h)&&(f=xt(e,{startingIndex:l-l%i-1,disabledIndices:s}))):o&&(f=xt(e,{startingIndex:l-l%i-1,disabledIndices:s})),Ui(f,i,h)&&(f=l)),n.key===no&&(u&&mt(n),l%i!==0?(f=xt(e,{startingIndex:l,decrement:!0,disabledIndices:s}),o&&Ui(f,i,h)&&(f=xt(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:s}))):o&&(f=xt(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:s})),Ui(f,i,h)&&(f=l));const d=Fr(c/i)===h;Qo(e,f)&&(o&&d?f=n.key===no?c:xt(e,{startingIndex:l-l%i-1,disabledIndices:s}):f=l)}return f}function jD(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:c}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let l=!1;for(n&&(o=0);!l;){const u=[];for(let f=0;f<a;f++)for(let h=0;h<c;h++)u.push(o+f+h*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=s}),l=!0):o++}}),[...r]}function ND(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function LD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function is(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let qh=0;function On(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qh);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():qh=requestAnimationFrame(i)}var be=typeof document<"u"?b.useLayoutEffect:b.useEffect;function _D(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 VD(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 rb=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function $D(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=C.useState(()=>new Map),s=C.useCallback(c=>{i(l=>new Map(l).set(c,null))},[]),a=C.useCallback(c=>{i(l=>{const u=new Map(l);return u.delete(c),u})},[]);return be(()=>{const c=new Map(o);Array.from(c.keys()).sort(_D).forEach((u,f)=>{c.set(u,f)}),VD(o,c)||i(c)},[o]),C.createElement(rb.Provider,{value:C.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function ob(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=C.useContext(rb),[a,c]=C.useState(null),l=C.useRef(null),u=C.useCallback(f=>{if(l.current=f,a!==null&&(i.current[a]=f,s)){var h;const d=t!==void 0;s.current[a]=d?t:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,i,s,t]);return be(()=>{const f=l.current;if(f)return n(f),()=>{r(f)}},[n,r]),be(()=>{const f=l.current?o.get(l.current):null;f!=null&&c(f)},[o]),C.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function ro(){return ro=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},ro.apply(this,arguments)}let Xh=!1,BD=0;const Qh=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+BD++;function WD(){const[e,t]=C.useState(()=>Xh?Qh():void 0);return be(()=>{e==null&&t(Qh())},[]),C.useEffect(()=>{Xh=!0},[]),e}const HD=nb.useId,wo=HD||WD;let ci;process.env.NODE_ENV!=="production"&&(ci=new Set);function ss(){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=ci)!=null&&e.has(o))){var i;(i=ci)==null||i.add(o),console.warn(o)}}function zD(){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=ci)!=null&&e.has(o))){var i;(i=ci)==null||i.add(o),console.error(o)}}const ib=C.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:c=0,strokeWidth:l=0,staticOffset:u,stroke:f,d:h,style:{transform:d,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||ss("The `ref` prop is required for `FloatingArrow`."));const g=wo(),[v,x]=C.useState(!1);if(be(()=>{if(!o)return;Vt(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const y=l*2,T=y/2,S=s/2*(c/-8+1),E=a/2*c/4,[R,A]=r.split("-"),k=!!h,I=R==="top"||R==="bottom",j=u&&A==="end"?"bottom":"top";let D=u&&A==="end"?"right":"left";u&&v&&(D=A==="end"?"left":"right");const N=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",O=h||"M0,0"+(" H"+s)+(" L"+(s-S)+","+(a-E))+(" Q"+s/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",ro({},m,{"aria-hidden":!0,ref:n,width:k?s:s+y,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[D]:N,[j]:P,[R]:I||k?"100%":"calc(100% - "+y/2+"px)",transform:""+F+(d??""),...p}}),y>0&&C.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:y+(h?0:1),d:O}),C.createElement("path",{stroke:y&&!h?m.fill:"none",d:O}),C.createElement("clipPath",{id:g},C.createElement("rect",{x:-T,y:T*(k?-1:1),width:s+y,height:s})))});function sb(){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 ab=C.createContext(null),lb=C.createContext(null),Gn=()=>{var e;return((e=C.useContext(ab))==null?void 0:e.id)||null},Yn=()=>C.useContext(lb);function UD(e){const t=wo(),n=Yn(),o=Gn();return be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function GD(e){const{children:t,id:n}=e,r=Gn();return C.createElement(ab.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function YD(e){const{children:t}=e,n=C.useRef([]),r=C.useCallback(s=>{n.current=[...n.current,s]},[]),o=C.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=C.useState(()=>sb())[0];return C.createElement(lb.Provider,{value:C.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function Bn(e){return"data-floating-ui-"+e}function gt(e){const t=b.useRef(e);return be(()=>{t.current=e}),t}const Zh=Bn("safe-polygon");function nl(e,t,n){return n&&!eo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function cb(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=Yn(),p=Gn(),m=gt(l),g=gt(c),v=gt(n),x=C.useRef(),y=C.useRef(-1),T=C.useRef(),S=C.useRef(-1),E=C.useRef(!0),R=C.useRef(!1),A=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:_}=F;_||(clearTimeout(y.current),clearTimeout(S.current),E.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[a,i]),C.useEffect(()=>{if(!a||!m.current||!n)return;function O(_){k()&&r(!1,_,"hover")}const F=ut(s.floating).documentElement;return F.addEventListener("mouseleave",O),()=>{F.removeEventListener("mouseleave",O)}},[s.floating,n,r,a,m,k]);const I=C.useCallback(function(O,F,_){F===void 0&&(F=!0),_===void 0&&(_="hover");const W=nl(g.current,"close",x.current);W&&!T.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,O,_),W)):F&&(clearTimeout(y.current),r(!1,O,_))},[g,r]),j=at(()=>{A.current(),T.current=void 0}),D=at(()=>{if(R.current){const O=ut(s.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(M){if(clearTimeout(y.current),E.current=!1,u&&!eo(x.current)||f>0&&!nl(g.current,"open"))return;const V=nl(g.current,"open",x.current);V?y.current=window.setTimeout(()=>{v.current||r(!0,M,"hover")},V):r(!0,M,"hover")}function _(M){if(O())return;A.current();const V=ut(s.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),T.current=m.current({...o.current.floatingContext,tree:d,x:M.clientX,y:M.clientY,onClose(){D(),j(),I(M,!0,"safe-polygon")}});const J=T.current;V.addEventListener("mousemove",J),A.current=()=>{V.removeEventListener("mousemove",J)};return}(x.current==="touch"?!Ye(s.floating,M.relatedTarget):!0)&&I(M)}function W(M){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:M.clientX,y:M.clientY,onClose(){D(),j(),I(M)}})(M))}if(De(s.domReference)){var U;const M=s.domReference;return n&&M.addEventListener("mouseleave",W),(U=s.floating)==null||U.addEventListener("mouseleave",W),h&&M.addEventListener("mousemove",F,{once:!0}),M.addEventListener("mouseenter",F),M.addEventListener("mouseleave",_),()=>{var V;n&&M.removeEventListener("mouseleave",W),(V=s.floating)==null||V.removeEventListener("mouseleave",W),h&&M.removeEventListener("mousemove",F),M.removeEventListener("mouseenter",F),M.removeEventListener("mouseleave",_)}}},[s,a,e,u,f,h,I,j,D,r,n,v,d,g,m,o]),be(()=>{var O;if(a&&n&&(O=m.current)!=null&&O.__options.blockPointerEvents&&k()){const _=ut(s.floating).body;_.setAttribute(Zh,""),_.style.pointerEvents="none",R.current=!0;const W=s.floating;if(De(s.domReference)&&W){var F;const U=s.domReference,M=d==null||(F=d.nodesRef.current.find(V=>V.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return M&&(M.style.pointerEvents=""),U.style.pointerEvents="auto",W.style.pointerEvents="auto",()=>{U.style.pointerEvents="",W.style.pointerEvents=""}}}},[a,n,p,s,d,m,k]),be(()=>{n||(x.current=void 0,j(),D())},[n,j,D]),C.useEffect(()=>()=>{j(),clearTimeout(y.current),clearTimeout(S.current),D()},[a,s.domReference,j,D]);const N=C.useMemo(()=>{function O(F){x.current=F.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(F){const{nativeEvent:_}=F;function W(){!E.current&&!v.current&&r(!0,_,"hover")}u&&!eo(x.current)||n||f===0||(clearTimeout(S.current),x.current==="touch"?W():S.current=window.setTimeout(W,f))}}},[u,r,n,v,f]),P=C.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(O){I(O.nativeEvent,!1)}}),[I]);return C.useMemo(()=>a?{reference:N,floating:P}:{},[a,N,P])}function KD(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function hr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function qD(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),hr(e,i).forEach(c=>{o(c.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let Rr=new WeakMap,Gi=new WeakSet,Yi={},rl=0;const XD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ub=e=>e&&(e.host||ub(e.parentNode)),QD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ub(n);return e.contains(r)?r:null}).filter(n=>n!=null);function ZD(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=QD(t,e),a=new Set,c=new Set(s),l=[];Yi[o]||(Yi[o]=new WeakMap);const u=Yi[o];s.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||c.has(d)||[].forEach.call(d.children,p=>{if(Un(p)!=="script")if(a.has(p))h(p);else{const m=i?p.getAttribute(i):null,g=m!==null&&m!=="false",v=(Rr.get(p)||0)+1,x=(u.get(p)||0)+1;Rr.set(p,v),u.set(p,x),l.push(p),v===1&&g&&Gi.add(p),x===1&&p.setAttribute(o,""),!g&&i&&p.setAttribute(i,"true")}})}return rl++,()=>{l.forEach(d=>{const p=(Rr.get(d)||0)-1,m=(u.get(d)||0)-1;Rr.set(d,p),u.set(d,m),p||(!Gi.has(d)&&i&&d.removeAttribute(i),Gi.delete(d)),m||d.removeAttribute(o)}),rl--,rl||(Rr=new WeakMap,Rr=new WeakMap,Gi=new WeakSet,Yi={})}}function Jh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ut(e[0]).body;return ZD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const oo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function fb(e,t){const n=li(e,oo());t==="prev"&&n.reverse();const r=n.indexOf(Ht(ut(e)));return n.slice(r+1)[0]}function db(){return fb(document.body,"next")}function hb(){return fb(document.body,"prev")}function Zo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ye(n,r)}function JD(e){li(e,oo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function eM(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 tM(e,t,n){const r=e.indexOf(t);function o(s){const a=Bn("focus-guard");let c=r+(s?1:0),l=e[c];for(;l&&(!l.isConnected||l.hasAttribute(a)||Ye(n,l));)s?c++:c--,l=e[c];return l}const i=o(!0);return i||o(!1)}const Ku={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 nM;function ep(e){e.key==="Tab"&&(e.target,clearTimeout(nM))}const ks=C.forwardRef(function(t,n){const[r,o]=C.useState();be(()=>(Vu()&&o("button"),document.addEventListener("keydown",ep),()=>{document.removeEventListener("keydown",ep)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Bn("focus-guard")]:"",style:Ku};return C.createElement("span",ro({},t,i))}),pb=C.createContext(null),tp=Bn("portal");function rM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=wo(),o=mb(),[i,s]=C.useState(null),a=C.useRef(null);return be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),be(()=>{if(!r||a.current)return;const c=t?document.getElementById(t):null;if(!c)return;const l=document.createElement("div");l.id=r,l.setAttribute(tp,""),c.appendChild(l),a.current=l,s(l)},[t,r]),be(()=>{if(!r||a.current)return;let c=n||(o==null?void 0:o.portalNode);c&&!De(c)&&(c=c.current),c=c||document.body;let l=null;t&&(l=document.createElement("div"),l.id=t,c.appendChild(l));const u=document.createElement("div");u.id=r,u.setAttribute(tp,""),c=l||c,c.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function To(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=rM({id:n,root:r}),[s,a]=C.useState(null),c=C.useRef(null),l=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return C.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function d(p){i&&Zo(p)&&(p.type==="focusin"?eM:JD)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,s==null?void 0:s.modal]),C.createElement(pb.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i])},h&&i&&C.createElement(ks,{"data-type":"outside",ref:c,onFocus:d=>{if(Zo(d,i)){var p;(p=u.current)==null||p.focus()}else{const m=hb()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),h&&i&&C.createElement("span",{"aria-owns":i.id,style:Ku}),i&&yi.createPortal(t,i),h&&i&&C.createElement(ks,{"data-type":"outside",ref:l,onFocus:d=>{if(Zo(d,i)){var p;(p=f.current)==null||p.focus()}else{const m=db()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,d.nativeEvent))}}}))}const mb=()=>C.useContext(pb),np=20;let or=[];function ol(e){or=or.filter(n=>n.isConnected);let t=e;if(!(!t||Un(t)==="body")){if(!tD(t,oo())){const n=li(t,oo())[0];n&&(t=n)}or.push(t),or.length>np&&(or=or.slice(-np))}}function rp(){return or.slice().reverse().find(e=>e.isConnected)}const oM=C.forwardRef(function(t,n){return C.createElement("button",ro({},t,{type:"button",ref:n,tabIndex:-1,style:Ku}))});function Ri(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:h,refs:d,nodeId:p,onOpenChange:m,events:g,dataRef:v,floatingId:x,elements:{domReference:y,floating:T}}=t,S=typeof s=="number"&&s<0,E=Wv(y)&&S,R=XD()?i:!0,A=gt(o),k=gt(s),I=gt(a),j=Yn(),D=mb(),N=C.useRef(null),P=C.useRef(null),O=C.useRef(!1),F=C.useRef(!1),_=C.useRef(-1),W=D!=null,U=T==null?void 0:T.firstElementChild,M=(U==null?void 0:U.id)===x?U:T,V=at(function(G){return G===void 0&&(G=M),G?li(G,oo()):[]}),q=at(G=>{const L=V(G);return A.current.map(B=>y&&B==="reference"?y:M&&B==="floating"?M:L).filter(Boolean).flat()});C.useEffect(()=>{if(r||!l)return;function G(B){if(B.key==="Tab"){Ye(M,Ht(ut(M)))&&V().length===0&&!E&&mt(B);const z=q(),$=nn(B);A.current[0]==="reference"&&$===y&&(mt(B),B.shiftKey?On(z[z.length-1]):On(z[1])),A.current[1]==="floating"&&$===M&&B.shiftKey&&(mt(B),On(z[0]))}}const L=ut(M);return L.addEventListener("keydown",G),()=>{L.removeEventListener("keydown",G)}},[r,y,M,l,A,E,V,q]),C.useEffect(()=>{if(r||!T)return;function G(L){const B=nn(L),$=V().indexOf(B);$!==-1&&(_.current=$)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,V]),C.useEffect(()=>{if(r||!f)return;function G(){F.current=!0,setTimeout(()=>{F.current=!1})}function L(B){const z=B.relatedTarget;queueMicrotask(()=>{const $=!(Ye(y,z)||Ye(T,z)||Ye(z,T)||Ye(D==null?void 0:D.portalNode,z)||z!=null&&z.hasAttribute(Bn("focus-guard"))||j&&(hr(j.nodesRef.current,p).find(Y=>{var ee,H;return Ye((ee=Y.context)==null?void 0:ee.elements.floating,z)||Ye((H=Y.context)==null?void 0:H.elements.domReference,z)})||KD(j.nodesRef.current,p).find(Y=>{var ee,H;return((ee=Y.context)==null?void 0:ee.elements.floating)===z||((H=Y.context)==null?void 0:H.elements.domReference)===z})));if(c&&$&&Ht(ut(M))===ut(M).body){et(M)&&(M==null||M.focus());const Y=_.current,ee=V(),H=ee[Y]||ee[ee.length-1]||M;et(H)&&H.focus()}(E||!l)&&z&&$&&!F.current&&z!==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,M,l,p,j,D,m,f,c,V,E]),C.useEffect(()=>{var G;if(r)return;const L=Array.from((D==null||(G=D.portalNode)==null?void 0:G.querySelectorAll("["+Bn("portal")+"]"))||[]);if(T){const B=[T,...L,N.current,P.current,A.current.includes("reference")||E?y:null].filter($=>$!=null),z=l||E?Jh(B,R,!R):Jh(B);return()=>{z()}}},[r,y,T,l,A,D,E,R]),be(()=>{if(r||!et(M))return;const G=ut(M),L=Ht(G);queueMicrotask(()=>{const B=q(M),z=k.current,$=(typeof z=="number"?B[z]:z.current)||M,Y=Ye(M,L);!S&&!Y&&h&&On($,{preventScroll:$===M})})},[r,h,M,S,q,k]),be(()=>{if(r||!M)return;let G=!1;const L=ut(M),B=Ht(L);let $=v.current.openEvent;const Y=d.domReference.current;ol(B);function ee(H){let{open:we,reason:Ue,event:je,nested:Ge}=H;we&&($=je),Ue==="escape-key"&&d.domReference.current&&ol(d.domReference.current),Ue==="hover"&&je.type==="mouseleave"&&(O.current=!0),Ue==="outside-press"&&(Ge?(O.current=!1,G=!0):O.current=!($v(je)||_u(je)))}return g.on("openchange",ee),()=>{g.off("openchange",ee);const H=Ht(L),we=Ye(T,H)||j&&hr(j.nodesRef.current,p).some(ie=>{var me;return Ye((me=ie.context)==null?void 0:me.elements.floating,H)});(we||$&&["click","mousedown"].includes($.type))&&d.domReference.current&&ol(d.domReference.current);const je=Y||B,Ge=li(ut(je).body,oo());queueMicrotask(()=>{let ie=rp();!ie&&et(je)&&T&&(ie=tM(Ge,je,T)),I.current&&!O.current&&et(ie)&&(!(ie!==H&&H!==L.body)||we)&&ie.focus({preventScroll:G})})}},[r,T,M,I,v,d,g,j,p]),be(()=>{if(!r&&D)return D.setFocusManagerState({modal:l,closeOnFocusOut:f,open:h,onOpenChange:m,refs:d}),()=>{D.setFocusManagerState(null)}},[r,D,l,h,m,d,f]),be(()=>{if(r||!M||typeof MutationObserver!="function"||S)return;const G=()=>{const B=M.getAttribute("tabindex"),z=V(),$=Ht(ut(T)),Y=z.indexOf($);Y!==-1&&(_.current=Y),A.current.includes("floating")||$!==d.domReference.current&&z.length===0?B!=="0"&&M.setAttribute("tabindex","0"):B!=="-1"&&M.setAttribute("tabindex","-1")};G();const L=new MutationObserver(G);return L.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{L.disconnect()}},[r,T,M,d,A,V,S]);function J(G){return r||!u||!l?null:C.createElement(oM,{ref:G==="start"?N:P,onClick:L=>m(!1,L.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&R&&(l?!E:!0)&&(W||l);return C.createElement(C.Fragment,null,X&&C.createElement(ks,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:G=>{if(l){const B=q();On(o[0]==="reference"?B[0]:B[B.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(O.current=!1,Zo(G,D.portalNode)){const B=db()||y;B==null||B.focus()}else{var L;(L=D.beforeOutsideRef.current)==null||L.focus()}}}),!E&&J("start"),n,J("end"),X&&C.createElement(ks,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:G=>{if(l)On(q()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(f&&(O.current=!0),Zo(G,D.portalNode)){const B=hb()||y;B==null||B.focus()}else{var L;(L=D.afterOutsideRef.current)==null||L.focus()}}}))}const il=new Set,iM=C.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=wo();return be(()=>{if(!r)return;il.add(i);const s=/iP(hone|ad|od)|iOS/.test(Lu()),a=document.body.style,l=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[l]=u+"px"),s){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()=>{il.delete(i),il.size===0&&(Object.assign(a,{overflow:"",[l]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,h)))}},[i,r]),C.createElement("div",ro({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 ip(e){return $u(e)}function la(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:c=!0,ignoreMouse:l=!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"&&(eo(m,!0)&&l||(n&&c&&(!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}eo(m,!0)&&l||(n&&c&&(!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===" "&&!ip(i)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&c),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||op(p)||ip(i)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&c),p.nativeEvent,"click"))}}),[o,i,a,l,u,r,n,c]);return C.useMemo(()=>s?{reference:d}:{},[s,d])}function sM(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,f=s.height,h=s.x,d=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&c&&(r=s.y-t.y),h-=n||0,d-=r||0,u=0,f=0,!o||l?(u=t.axis==="y"?s.width:0,f=t.axis==="x"?s.height:0,h=a&&t.x!=null?t.x:h,d=c&&t.y!=null?t.y:d):o&&!l&&(f=t.axis==="x"?s.height:f,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:f,x:h,y:d,top:d,right:h+u,bottom:d+f,left:h}}}}function sp(e){return e!=null&&e.clientX!=null}function aM(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:c="both",x:l=null,y:u=null}=t,f=C.useRef(!1),h=C.useRef(null),[d,p]=C.useState(),[m,g]=C.useState([]),v=at((E,R)=>{f.current||r.current.openEvent&&!sp(r.current.openEvent)||s.setPositionReference(sM(i,{x:E,y:R,axis:c,dataRef:r,pointerType:d}))}),x=at(E=>{l!=null||u!=null||(n?h.current||g([]):v(E.clientX,E.clientY))}),y=eo(d)?o:n,T=C.useCallback(()=>{if(!y||!a||l!=null||u!=null)return;const E=Pt(o);function R(A){const k=nn(A);Ye(o,k)?(E.removeEventListener("mousemove",R),h.current=null):v(A.clientX,A.clientY)}if(!r.current.openEvent||sp(r.current.openEvent)){E.addEventListener("mousemove",R);const A=()=>{E.removeEventListener("mousemove",R),h.current=null};return h.current=A,A}s.setPositionReference(i)},[y,a,l,u,o,r,s,i,v]);C.useEffect(()=>T(),[T,m]),C.useEffect(()=>{a&&!o&&(f.current=!1)},[a,o]),C.useEffect(()=>{!a&&n&&(f.current=!0)},[a,n]),be(()=>{a&&(l!=null||u!=null)&&(f.current=!1,v(l,u))},[a,l,u,v]);const S=C.useMemo(()=>{function E(R){let{pointerType:A}=R;p(A)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:x,onMouseEnter:x}},[x]);return C.useMemo(()=>a?{reference:S}:{},[a,S])}const lM={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},cM={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 So(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:l="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:p}=t,m=Yn(),g=at(typeof c=="function"?c:()=>!1),v=typeof c=="function"?g:c,x=C.useRef(!1),y=C.useRef(!1),{escapeKey:T,outsidePress:S}=ap(d),{escapeKey:E,outsidePress:R}=ap(p),A=at(P=>{var O;if(!n||!s||!a||P.key!=="Escape")return;const F=(O=i.current.floatingContext)==null?void 0:O.nodeId,_=m?hr(m.nodesRef.current,F):[];if(!T&&(P.stopPropagation(),_.length>0)){let W=!0;if(_.forEach(U=>{var M;if((M=U.context)!=null&&M.open&&!U.context.dataRef.current.__escapeKeyBubbles){W=!1;return}}),!W)return}r(!1,RO(P)?P.nativeEvent:P,"escape-key")}),k=at(P=>{var O;const F=()=>{var _;A(P),(_=nn(P))==null||_.removeEventListener("keydown",F)};(O=nn(P))==null||O.addEventListener("keydown",F)}),I=at(P=>{var O;const F=x.current;x.current=!1;const _=y.current;if(y.current=!1,l==="click"&&_||F||typeof v=="function"&&!v(P))return;const W=nn(P),U="["+Bn("inert")+"]",M=ut(o.floating).querySelectorAll(U);let V=De(W)?W:null;for(;V&&!_n(V);){const G=Tn(V);if(_n(G)||!De(G))break;V=G}if(M.length&&De(W)&&!IO(W)&&!Ye(W,o.floating)&&Array.from(M).every(G=>!Ye(V,G)))return;if(et(W)&&N){const G=W.clientWidth>0&&W.scrollWidth>W.clientWidth,L=W.clientHeight>0&&W.scrollHeight>W.clientHeight;let B=L&&P.offsetX>W.clientWidth;if(L&&Vt(W).direction==="rtl"&&(B=P.offsetX<=W.offsetWidth-W.clientWidth),B||G&&P.offsetY>W.clientHeight)return}const q=(O=i.current.floatingContext)==null?void 0:O.nodeId,J=m&&hr(m.nodesRef.current,q).some(G=>{var L;return Ja(P,(L=G.context)==null?void 0:L.elements.floating)});if(Ja(P,o.floating)||Ja(P,o.domReference)||J)return;const X=m?hr(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")}),j=at(P=>{var O;const F=()=>{var _;I(P),(_=nn(P))==null||_.removeEventListener(l,F)};(O=nn(P))==null||O.addEventListener(l,F)});C.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=S;function P(_){r(!1,_,"ancestor-scroll")}const O=ut(o.floating);a&&O.addEventListener("keydown",E?k:A,E),v&&O.addEventListener(l,R?j:I,R);let F=[];return h&&(De(o.domReference)&&(F=Fn(o.domReference)),De(o.floating)&&(F=F.concat(Fn(o.floating))),!De(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(Fn(o.reference.contextElement)))),F=F.filter(_=>{var W;return _!==((W=O.defaultView)==null?void 0:W.visualViewport)}),F.forEach(_=>{_.addEventListener("scroll",P,{passive:!0})}),()=>{a&&O.removeEventListener("keydown",E?k:A,E),v&&O.removeEventListener(l,R?j:I,R),F.forEach(_=>{_.removeEventListener("scroll",P)})}},[i,o,a,v,l,n,r,h,s,T,S,A,E,k,I,R,j]),C.useEffect(()=>{x.current=!1},[v,l]);const D=C.useMemo(()=>({onKeyDown:A,[lM[f]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[A,r,u,f]),N=C.useMemo(()=>({onKeyDown:A,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[cM[l]]:()=>{x.current=!0}}),[A,l]);return C.useMemo(()=>s?{reference:D,floating:N}:{},[s,D,N])}function uM(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=wo(),i=C.useRef({}),[s]=C.useState(()=>sb()),a=Gn()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!De(d)&&zD("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=C.useState(r.reference),u=at((d,p,m)=>{i.current.openEvent=d?p:void 0,s.emit("openchange",{open:d,event:p,reason:m,nested:a}),n==null||n(d,p,m)}),f=C.useMemo(()=>({setPositionReference:l}),[]),h=C.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return C.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:f}),[t,u,h,s,o,f])}function Eo(e){e===void 0&&(e={});const{nodeId:t}=e,n=uM({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=C.useState(null),[a,c]=C.useState(null),u=(o==null?void 0:o.reference)||i,f=C.useRef(null),h=Yn();be(()=>{u&&(f.current=u)},[u]);const d=AD({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(y=>{const T=De(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;c(T),d.refs.setReference(T)},[d.refs]),m=C.useCallback(y=>{(De(y)||y===null)&&(f.current=y,s(y)),(De(d.refs.reference.current)||d.refs.reference.current===null||y!==null&&!De(y))&&d.refs.setReference(y)},[d.refs]),g=C.useMemo(()=>({...d.refs,setReference:m,setPositionReference:p,domReference:f}),[d.refs,m,p]),v=C.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),x=C.useMemo(()=>({...d,...r,refs:g,elements:v,nodeId:t}),[d,g,v,t,r]);return be(()=>{r.dataRef.current.floatingContext=x;const y=h==null?void 0:h.nodesRef.current.find(T=>T.id===t);y&&(y.context=x)}),C.useMemo(()=>({...d,context:x,refs:g,elements:v}),[d,g,v,x])}function fM(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:c=!0}=t,l=C.useRef(!1),u=C.useRef(),f=C.useRef(!0);C.useEffect(()=>{if(!a)return;const d=Pt(s.domReference);function p(){!n&&et(s.domReference)&&s.domReference===Ht(ut(s.domReference))&&(l.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)}},[s.domReference,n,a]),C.useEffect(()=>{if(!a)return;function d(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(l.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,a]),C.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=C.useMemo(()=>({onPointerDown(d){_u(d.nativeEvent)||(f.current=!1)},onMouseLeave(){l.current=!1},onFocus(d){if(l.current)return;const p=nn(d.nativeEvent);if(c&&De(p))try{if(Vu()&&Bv())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!$u(p))return}r(!0,d.nativeEvent,"focus")},onBlur(d){l.current=!1;const p=d.relatedTarget,m=d.nativeEvent,g=De(p)&&p.hasAttribute(Bn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const x=Ht(s.domReference?s.domReference.ownerDocument:document);!p&&x===s.domReference||Ye((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,x)||Ye(s.domReference,x)||g||r(!1,m,"focus")})}}),[i,s.domReference,r,c]);return C.useMemo(()=>a?{reference:h}:{},[a,h])}const lp="active",cp="selected";function sl(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[lp]:s,[cp]:a,...c}=e;i=c}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(c=>{let[l,u]=c;if(!(o&&[lp,cp].includes(l)))if(l.indexOf("on")===0){if(r.has(l)||r.set(l,[]),typeof u=="function"){var f;(f=r.get(l))==null||f.push(u),s[l]=function(){for(var h,d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];return(h=r.get(l))==null?void 0:h.map(g=>g(...p)).find(g=>g!==void 0)}}}else s[l]=u}),s),{})}}function Co(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=>sl(a,e,"reference"),t),i=C.useCallback(a=>sl(a,e,"floating"),n),s=C.useCallback(a=>sl(a,e,"item"),r);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let up=!1;function ca(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function fp(e,t){return ca(t,e===Yu||e===Pi,e===no||e===xo)}function al(e,t,n){return ca(t,e===Pi,n?e===no:e===xo)||e==="Enter"||e===" "||e===""}function dM(e,t,n){return ca(t,n?e===no:e===xo,e===Pi)}function dp(e,t,n){return ca(t,n?e===xo:e===no,e===Yu)}function gb(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:c=!0,selectedIndex:l=null,allowEscape:u=!1,loop:f=!1,nested:h=!1,rtl:d=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:x=void 0,orientation:y="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:R,dense:A=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||ss("`useListNavigation` looping must be enabled to allow escaping."),p||ss("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&T>1&&ss("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const k=Gn(),I=Yn(),j=at(a),D=C.useRef(m),N=C.useRef(l??-1),P=C.useRef(null),O=C.useRef(!0),F=C.useRef(j),_=C.useRef(!!o.floating),W=C.useRef(n),U=C.useRef(!1),M=C.useRef(!1),V=gt(x),q=gt(n),J=gt(S),X=gt(o.floating),G=gt(l),[L,B]=C.useState(),[z,$]=C.useState(),Y=at(function(ie,me,oe){oe===void 0&&(oe=!1);function ye(ve){p?(B(ve.id),I==null||I.events.emit("virtualfocus",ve),E&&(E.current=ve)):On(ve,{preventScroll:!0,sync:Bv()&&Vu()?up||U.current:!1})}const Qe=ie.current[me.current];Qe&&ye(Qe),requestAnimationFrame(()=>{const ve=ie.current[me.current]||Qe;if(!ve)return;Qe||ye(ve);const ot=J.current;ot&&H&&(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(()=>{c&&(n&&o.floating?D.current&&l!=null&&(M.current=!0,N.current=l,j(l)):_.current&&(N.current=-1,F.current(null)))},[c,n,o.floating,l,j]),be(()=>{if(c&&n&&o.floating)if(s==null){if(U.current=!1,G.current!=null)return;if(_.current&&(N.current=-1,Y(i,N)),(!W.current||!_.current)&&D.current&&(P.current!=null||D.current===!0&&P.current==null)){let ie=0;const me=()=>{i.current[0]==null?(ie<2&&(ie?requestAnimationFrame:queueMicrotask)(me),ie++):(N.current=P.current==null||al(P.current,y,d)||h?tl(i,V.current):Kh(i,V.current),P.current=null,j(N.current))};me()}}else Qo(i,s)||(N.current=s,Y(i,N,M.current),M.current=!1)},[c,n,o.floating,s,G,h,i,y,d,j,Y,V]),be(()=>{var ie;if(!c||o.floating||!I||p||!_.current)return;const me=I.nodesRef.current,oe=(ie=me.find(ve=>ve.id===k))==null||(ie=ie.context)==null?void 0:ie.elements.floating,ye=Ht(ut(o.floating)),Qe=me.some(ve=>ve.context&&Ye(ve.context.elements.floating,ye));oe&&!Qe&&O.current&&oe.focus({preventScroll:!0})},[c,o.floating,I,k,p]),be(()=>{if(!c||!I||!p||k)return;function ie(me){$(me.id),E&&(E.current=me)}return I.events.on("virtualfocus",ie),()=>{I.events.off("virtualfocus",ie)}},[c,I,p,k,E]),be(()=>{F.current=j,_.current=!!o.floating}),be(()=>{n||(P.current=null)},[n]),be(()=>{W.current=n},[n]);const ee=s!=null,H=C.useMemo(()=>{function ie(oe){if(!n)return;const ye=i.current.indexOf(oe);ye!==-1&&j(ye)}return{onFocus(oe){let{currentTarget:ye}=oe;ie(ye)},onClick:oe=>{let{currentTarget:ye}=oe;return ye.focus({preventScroll:!0})},...g&&{onMouseMove(oe){let{currentTarget:ye}=oe;ie(ye)},onPointerLeave(oe){let{pointerType:ye}=oe;!O.current||ye==="touch"||(N.current=-1,Y(i,N),j(null),p||On(X.current,{preventScroll:!0}))}}}},[n,X,Y,g,i,j,p]),we=at(ie=>{if(O.current=!1,U.current=!0,!q.current&&ie.currentTarget===X.current)return;if(h&&dp(ie.key,y,d)){mt(ie),r(!1,ie.nativeEvent,"list-navigation"),et(o.domReference)&&!p&&o.domReference.focus();return}const me=N.current,oe=tl(i,x),ye=Kh(i,x);if(ie.key==="Home"&&(mt(ie),N.current=oe,j(N.current)),ie.key==="End"&&(mt(ie),N.current=ye,j(N.current)),T>1){const Qe=R||Array.from({length:i.current.length},()=>({width:1,height:1})),ve=jD(Qe,T,A),ot=ve.findIndex(re=>re!=null&&!is(i.current,re,x)),Z=ve.reduce((re,xe,Ne)=>xe!=null&&!is(i.current,xe,x)?Ne:re,-1);if(N.current=ve[FD({current:ve.map(re=>re!=null?i.current[re]:null)},{event:ie,orientation:y,loop:f,cols:T,disabledIndices:LD([...x||i.current.map((re,xe)=>is(i.current,xe)?xe:void 0),void 0],ve),minIndex:ot,maxIndex:Z,prevIndex:ND(N.current>ye?oe:N.current,Qe,ve,T,ie.key===Pi?"bl":ie.key===xo?"tr":"tl"),stopEvent:!0})],j(N.current),y==="both")return}if(fp(ie.key,y)){if(mt(ie),n&&!p&&Ht(ie.currentTarget.ownerDocument)===ie.currentTarget){N.current=al(ie.key,y,d)?oe:ye,j(N.current);return}al(ie.key,y,d)?f?N.current=me>=ye?u&&me!==i.current.length?-1:oe:xt(i,{startingIndex:me,disabledIndices:x}):N.current=Math.min(ye,xt(i,{startingIndex:me,disabledIndices:x})):f?N.current=me<=oe?u&&me!==-1?i.current.length:ye:xt(i,{startingIndex:me,decrement:!0,disabledIndices:x}):N.current=Math.max(oe,xt(i,{startingIndex:me,decrement:!0,disabledIndices:x})),Qo(i,N.current)?j(null):j(N.current)}}),Ue=C.useMemo(()=>p&&n&&ee&&{"aria-activedescendant":z||L},[p,n,ee,z,L]),je=C.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!Wv(o.domReference)&&Ue,onKeyDown:we,onPointerMove(){O.current=!0}}),[Ue,we,o.domReference,y]),Ge=C.useMemo(()=>{function ie(oe){m==="auto"&&$v(oe.nativeEvent)&&(D.current=!0)}function me(oe){D.current=m,m==="auto"&&_u(oe.nativeEvent)&&(D.current=!0)}return{...Ue,onKeyDown(oe){O.current=!1;const ye=oe.key.indexOf("Arrow")===0,Qe=dM(oe.key,y,d),ve=dp(oe.key,y,d),ot=fp(oe.key,y),Z=(h?Qe:ot)||oe.key==="Enter"||oe.key.trim()==="";if(p&&n){const ht=I==null?void 0:I.nodesRef.current.find(Ct=>Ct.parentId==null),vt=I&&ht?qD(I.nodesRef.current,ht.id):null;if(ye&&vt&&E){const Ct=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(Qe||ve){var re,xe;const Qn=((re=vt.context)==null?void 0:re.elements.domReference)===oe.currentTarget,wr=ve&&!Qn?(xe=vt.context)==null?void 0:xe.elements.domReference:Qe?i.current.find(Tr=>(Tr==null?void 0:Tr.id)===L):null;wr&&(mt(oe),wr.dispatchEvent(Ct),$(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(Ct);return}}return we(oe)}if(!(!n&&!v&&ye)){if(Z&&(P.current=h&&ot?null:oe.key),h){Qe&&(mt(oe),n?(N.current=tl(i,V.current),j(N.current)):r(!0,oe.nativeEvent,"list-navigation"));return}ot&&(l!=null&&(N.current=l),mt(oe),!n&&v?r(!0,oe.nativeEvent,"list-navigation"):we(oe),n&&j(N.current))}},onFocus(){n&&!p&&j(null)},onPointerDown:me,onMouseDown:ie,onClick:ie}},[L,Ue,we,V,m,i,h,j,r,n,v,y,d,l,I,p,E]);return C.useMemo(()=>c?{reference:Ge,floating:je,item:H}:{},[c,Ge,je,H])}const hM=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Po(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=hM.get(s))!=null?n:s,c=wo(),u=Gn()!=null,f=C.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="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:c},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,c,s]),h=C.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":c}}},[a,o,c,s]),d=C.useCallback(p=>{let{active:m,selected:g}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...v,"aria-selected":m&&g};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,s]);return C.useMemo(()=>i?{reference:f,floating:h,item:d}:{},[i,f,h,d])}const hp=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ir(e,t){return typeof e=="function"?e(t):e}function pM(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 mM(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,c]=C.useState("unmounted"),l=pM(n,s);return!l&&a==="close"&&c("unmounted"),be(()=>{if(r){if(n){c("initial");const u=requestAnimationFrame(()=>{c("open")});return()=>{cancelAnimationFrame(u)}}c("close")}},[n,r]),{isMounted:l,status:a}}function gM(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,c=a.split("-")[0],l=C.useMemo(()=>({side:c,placement:a}),[c,a]),u=typeof s=="number",f=(u?s:s.open)||0,h=(u?s:s.close)||0,[d,p]=C.useState(()=>({...Ir(i,l),...Ir(n,l)})),{isMounted:m,status:g}=mM(e,{duration:s}),v=gt(n),x=gt(r),y=gt(o),T=gt(i);return be(()=>{const S=Ir(v.current,l),E=Ir(y.current,l),R=Ir(T.current,l),A=Ir(x.current,l)||Object.keys(S).reduce((k,I)=>(k[I]="",k),{});if(g==="initial"&&p(k=>({transitionProperty:k.transitionProperty,...R,...S})),g==="open"&&p({transitionProperty:Object.keys(A).map(hp).join(","),transitionDuration:f+"ms",...R,...A}),g==="close"){const k=E||S;p({transitionProperty:Object.keys(k).map(hp).join(","),transitionDuration:h+"ms",...R,...k})}},[h,y,v,x,T,f,g,l]),{isMounted:m,styles:d}}function yM(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:h=[],selectedIndex:d=null}=t,p=C.useRef(),m=C.useRef(""),g=C.useRef((n=d??s)!=null?n:-1),v=C.useRef(null),x=at(a),y=at(c),T=gt(u),S=gt(h);be(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),be(()=>{if(r&&m.current===""){var I;g.current=(I=d??s)!=null?I:-1}},[r,d,s]);const E=at(I=>{I?o.current.typing||(o.current.typing=I,y(I)):o.current.typing&&(o.current.typing=I,y(I))}),R=at(I=>{function j(F,_,W){const U=T.current?T.current(_,W):_.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(W.toLocaleLowerCase()))===0);return U?F.indexOf(U):-1}const D=i.current;if(m.current.length>0&&m.current[0]!==" "&&(j(D,D,m.current)===-1?E(!1):I.key===" "&&mt(I)),D==null||S.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(mt(I),E(!0)),D.every(F=>{var _,W;return F?((_=F[0])==null?void 0:_.toLocaleLowerCase())!==((W=F[1])==null?void 0:W.toLocaleLowerCase()):!0})&&m.current===I.key&&(m.current="",g.current=v.current),m.current+=I.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=v.current,E(!1)},f);const P=g.current,O=j(D,[...D.slice((P||0)+1),...D.slice(0,(P||0)+1)],m.current);O!==-1?(x(O),v.current=O):I.key!==" "&&(m.current="",E(!1))}),A=C.useMemo(()=>({onKeyDown:R}),[R]),k=C.useMemo(()=>({onKeyDown:R,onKeyUp(I){I.key===" "&&E(!1)}}),[R,E]);return C.useMemo(()=>l?{reference:A,floating:k}:{},[l,A,k])}function pp(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[c,l]=t[s]||[0,0],[u,f]=t[a]||[0,0];l>=r!=f>=r&&n<=(u-c)*(r-l)/(f-l)+c&&(o=!o)}return o}function vM(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function bM(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,c=performance.now();function l(f,h){const d=performance.now(),p=d-c;if(s===null||a===null||p===0)return s=f,a=h,c=d,null;const m=f-s,g=h-a,x=Math.sqrt(m*m+g*g)/p;return s=f,a=h,c=d,x}const u=f=>{let{x:h,y:d,placement:p,elements:m,onClose:g,nodeId:v,tree:x}=f;return function(T){function S(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||d==null)return;const{clientX:E,clientY:R}=T,A=[E,R],k=nn(T),I=T.type==="mouseleave",j=Ye(m.floating,k),D=Ye(m.domReference,k),N=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),O=p.split("-")[0],F=h>P.right-P.width/2,_=d>P.bottom-P.height/2,W=vM(A,N),U=P.width>N.width,M=P.height>N.height,V=(U?N:P).left,q=(U?N:P).right,J=(M?N:P).top,X=(M?N:P).bottom;if(j&&(i=!0,!I))return;if(D&&(i=!1),D&&!I){i=!0;return}if(I&&De(T.relatedTarget)&&Ye(m.floating,T.relatedTarget)||x&&hr(x.nodesRef.current,v).some(B=>{let{context:z}=B;return z==null?void 0:z.open}))return;if(O==="top"&&d>=N.bottom-1||O==="bottom"&&d<=N.top+1||O==="left"&&h>=N.right-1||O==="right"&&h<=N.left+1)return S();let G=[];switch(O){case"top":G=[[V,N.top+1],[V,P.bottom-1],[q,P.bottom-1],[q,N.top+1]];break;case"bottom":G=[[V,P.top+1],[V,N.bottom-1],[q,N.bottom-1],[q,P.top+1]];break;case"left":G=[[P.right-1,X],[P.right-1,J],[N.left+1,J],[N.left+1,X]];break;case"right":G=[[N.right-1,X],[N.right-1,J],[P.left+1,J],[P.left+1,X]];break}function L(B){let[z,$]=B;switch(O){case"top":{const Y=[U?z+t/2:F?z+t*4:z-t*4,$+t+1],ee=[U?z-t/2:F?z+t*4:z-t*4,$+t+1],H=[[P.left,F||U?P.bottom-t:P.top],[P.right,F?U?P.bottom-t:P.top:P.bottom-t]];return[Y,ee,...H]}case"bottom":{const Y=[U?z+t/2:F?z+t*4:z-t*4,$-t],ee=[U?z-t/2:F?z+t*4:z-t*4,$-t],H=[[P.left,F||U?P.top+t:P.bottom],[P.right,F?U?P.top+t:P.bottom:P.top+t]];return[Y,ee,...H]}case"left":{const Y=[z+t+1,M?$+t/2:_?$+t*4:$-t*4],ee=[z+t+1,M?$-t/2:_?$+t*4:$-t*4];return[...[[_||M?P.right-t:P.left,P.top],[_?M?P.right-t:P.left:P.right-t,P.bottom]],Y,ee]}case"right":{const Y=[z-t,M?$+t/2:_?$+t*4:$-t*4],ee=[z-t,M?$-t/2:_?$+t*4:$-t*4],H=[[_||M?P.left+t:P.right,P.top],[_?M?P.left+t:P.right:P.left+t,P.bottom]];return[Y,ee,...H]}}}if(!pp([E,R],G)){if(i&&!W)return S();if(!I&&r){const B=l(T.clientX,T.clientY);if(B!==null&&B<.1)return S()}pp([E,R],L([h,d]))?!i&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const Ro=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[aa(10),Gu({fallbackAxisSideDirection:"end"}),Uu(),tb({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:c}=Eo({open:n,middleware:i,transform:!0,whileElementsMounted:sa,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))}}),l=la(c),u=So(c),f=Po(c),{getReferenceProps:h,getFloatingProps:d}=Co([l,u,f]);return w.jsxs(b.Fragment,{children:[w.jsx("button",{ref:s.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(To,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx(Ri,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:c,modal:!1,children:w.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:s.setFloating,style:a,"aria-labelledby":t,...d(),children:[w.jsx(ib,{ref:o,context:c,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),w.jsx("header",{className:"mb-2",children:w.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},xM=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=b.useState(!1),{context:a,refs:c}=Eo({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),l=la(a),u=Po(a),f=So(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:d}=Co([l,u,f]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(Hr,{...d(e),as:ft.button,layoutId:r,ref:c.setReference,size:"small",onClick:()=>s(!0),children:w.jsx(ft.span,{layoutId:o,children:e.trigger})}),w.jsx(go,{children:i?w.jsx(To,{root:t,children:w.jsx(Ri,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(ft.div,{...h(),ref:c.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},yb=300,wM=500,vb=(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),yc=b.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),mp=b.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:i,...s},a)=>{const c=Gn(),l=c!==null,[u,f]=b.useState(!1),[h,d]=b.useState(!1),[p,m]=b.useState(null),g=b.useRef([]),v=b.useRef([]),x=b.useContext(yc),y=Yn(),T=UD(),S=ob(),{floatingStyles:E,refs:R,context:A}=Eo({nodeId:T,open:u,transform:!0,onOpenChange:f,whileElementsMounted:sa,placement:l?"right":"bottom-start",strategy:"absolute",middleware:[aa({mainAxis:l?0:4,alignmentAxis:l?-4:0}),Gu(),Uu()]}),k=Po(A,{role:"menu",enabled:!0}),I=So(A,{bubbles:!0}),j=cb(A,{enabled:n,delay:{open:yb},handleClose:bM({blockPointerEvents:!0})}),D=la(A,{event:"mousedown",toggle:!l,ignoreMouse:l,keyboardHandlers:!0}),N=gb(A,{loop:!0,activeIndex:p,virtual:!0,nested:l,allowEscape:!0,listRef:g,scrollItemIntoView:!0,onNavigate:m}),P=yM(A,{activeIndex:p,listRef:v,resetMs:wM,onMatch:u?m:void 0}),{getReferenceProps:O,getFloatingProps:F,getItemProps:_}=Co([j,D,k,I,N,P]);b.useEffect(()=>{if(!y)return;const U=()=>f(!1),M=V=>{V.nodeId!==T&&V.parentId===c&&f(!1)};return y.events.on("click",U),y.events.on("menuopen",M),()=>{y.events.off("click",U),y.events.off("menuopen",M)}},[y,T,c]),b.useEffect(()=>{u&&y&&y.events.emit("menuopen",{parentId:c,nodeId:T})},[y,u,T,c]);const W=r?s.className:ke(vb(s.className));return w.jsxs(GD,{id:T,children:[w.jsx(b.Fragment,{children:s.asChild?w.jsx(Jr,{children:i,ref:gc([R.setReference,S.ref,a]),tabIndex:l?x.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":l?"":void 0,role:l?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:W,...O(x.getItemProps({...s,onFocus(U){var M;(M=s.onFocus)==null||M.call(s,U),d(!1),x.setHasFocusInside(!0)}}))}):w.jsxs("button",{type:"button",ref:gc([R.setReference,S.ref,a]),tabIndex:l?x.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":l?"":void 0,role:l?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:W,...O(x.getItemProps({...s,onFocus(U){var M;(M=s.onFocus)==null||M.call(s,U),d(!1),x.setHasFocusInside(!0)}})),children:[i,l&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(bu,{size:14})]})]})}),w.jsx(yc.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:_,setHasFocusInside:d,isOpen:u},children:w.jsx($D,{elementsRef:g,labelsRef:v,children:u&&w.jsx(To,{preserveTabOrder:!0,children:w.jsx(Ri,{context:A,modal:!1,initialFocus:l?-1:0,returnFocus:!l,children:w.jsx(t,{...F(),ref:R.setFloating,style:{...s.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})})})})})]})}),TM=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(yc),a=ob({label:r?null:typeof e=="string"?e:t}),c=Yn(),l=a.index===s.activeIndex;return w.jsxs("button",{...o,ref:gc([a.ref,i]),"data-active":l,type:"button",role:"menuitem",disabled:r,tabIndex:l?0:-1,className:vb(o.className),...s.getItemProps({onClick(u){var f;(f=o.onClick)==null||f.call(o,u),c==null||c.events.emit("click")},onFocus(u){var f;(f=o.onFocus)==null||f.call(o,u),s.setHasFocusInside(!0)}}),children:[e,n?w.jsx(n,{size:16}):null]})}),SM=b.forwardRef((e,t)=>Gn()!==null?w.jsx(mp,{...e,isParent:!1,ref:t}):w.jsx(YD,{children:w.jsx(mp,{...e,isParent:!0,ref:t})})),EM=(e,t)=>Es()?t:window.matchMedia(e).matches,CM=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(EM(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},zt="600ms",PM={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:zt},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:zt},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:zt}},RM={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:zt},exit:{translateX:["0%","30%"],opacity:0,animationDuration:zt}},ll={drawer:e=>e==="left"?PM:RM,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:zt,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:zt,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:zt,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:zt},enter:{opacity:1,scale:[1.05,1],animationDuration:zt},exit:{opacity:0,scale:.97,animationDuration:zt}}},IM=lo("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"}}),AM={top:0,left:0,right:0,bottom:-1},OM=e=>e*.62,DM=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const l=e.parent.current,u=e.value.get()||l.getBoundingClientRect().width,f=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+f))}const i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),c=OM(window.outerHeight);return a<c?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.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:AM,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?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},cl={drawer:"right",sheet:"none",dialog:"none"},MM=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),c=CM("(min-width: 64rem)"),l=e!=="dialog",u=c?e==="drawer"?i.position:cl[e]:r?cl[e]:cl.sheet,f=c||r?ll[e]:ll.sheet,h=typeof f=="function"?f(u):f,d=c||r?e:"sheet",{refs:p,context:m}=Eo({open:i.open,onOpenChange:i.onChange}),g=la(m),v=Po(m),x=So(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:T}=Co([g,v,x]),S=i.trigger,E=qr(void 0),R=()=>i.onChange(!1);return w.jsxs(b.Fragment,{children:[i.trigger?w.jsx(b.Fragment,{children:i.asChild?w.jsx(Jr,{ref:p.setReference,...y({layoutId:i.layoutId}),children:S}):w.jsx(ft.button,{ref:p.setReference,...y(),layoutId:i.layoutId,type:"button",children:S})}):null,w.jsx(To,{children:w.jsx(go,{presenceAffectsLayout:!0,children:i.open?w.jsx(iM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${d==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:w.jsx(Ri,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:w.jsxs(ft.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:IM({position:u,type:d}),exit:"exit",layoutId:i.layoutId,initial:"initial",ref:p.setFloating,style:d==="drawer"?{width:E}:{height:E},variants:h,...T(),children:[i.title?w.jsx("header",{className:"relative w-full",children:i.title?w.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:i.title}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i.children}),i.footer?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:i.footer}):null,o?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:R,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(wu,{})})}):null,l&&t?w.jsx(DM,{onChange:i.onChange,parent:p.floating,position:u,sheet:d==="sheet",value:E}):null]})})}):null})})]})},kM=e=>w.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}),bb=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:i,...s})=>{const[a,c]=b.useState(!1),l=b.useRef(null),u=o||"span",{refs:f,floatingStyles:h,context:d}=Eo({open:a,placement:n,transform:!0,onOpenChange:c,whileElementsMounted:sa,middleware:[aa(5),Gu({fallbackAxisSideDirection:"start"}),Uu(),tb({element:l,padding:5})]}),p=cb(d,{move:!0,enabled:r,delay:{open:yb}}),m=fM(d,{enabled:r}),g=So(d,{enabled:r}),v=Po(d,{role:"tooltip",enabled:r}),x=aM(d,{enabled:!!r&&!!t}),{getReferenceProps:y,getFloatingProps:T}=Co([p,m,g,v,x]);return w.jsxs(b.Fragment,{children:[w.jsx(u,{ref:f.setReference,...y(s),children:i}),w.jsx(To,{children:a&&w.jsxs(ho,{...T(),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:[w.jsx(ib,{ref:l,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class Fs{static getDescendantProperty(t,n,r=[]){let o,i,s,a,c,l;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=t[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(c=0,l=a.length;c<l;c++)Fs.getDescendantProperty(a[c],i,r);else i&&Fs.getDescendantProperty(a,i,r)}else r.push(t);return r}}class jr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=jr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=Fs.getDescendantProperty(o,this.keys[i]);let a=!1;for(let c=0;c<s.length;c++){const l=jr.isMatch(s[c],t,this.options.caseSensitive);if(l){a=!0,n.push({item:o,score:l});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=jr.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 jr.indexesOfFirstLetter(t,n).forEach((s,a)=>{let c=s+1;o[a]=[s];for(let l=1;l<r.length;l++){const u=r[l];if(c=t.indexOf(u,c),c===-1){o[a]=!1;break}o[a].push(c),c++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const xb=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>w.jsxs("div",{className:ke("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:w.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[i,e||r?w.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?w.jsx(bb,{title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(My,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?w.jsxs(b.Fragment,{children:[w.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}),w.jsx(gP,{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]}),ua=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:c,error:l,form:u,id:f,labelClassName:h="",name:d,title:p,placeholder:m,hideLeft:g,required:v})=>{const x=f??d,y=Dt(),T=e??y.inputOptionalLabel;return w.jsxs("fieldset",{form:u,"data-error":!!l,"data-interactive":!!i,className:ke("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[w.jsxs("label",{form:u,htmlFor:x,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[!g&&!n?w.jsx(xb,{info:a,hideLeft:g,reportStatus:!0,title:p,placeholder:m,children:T||n?w.jsxs(b.Fragment,{children:[v?null:w.jsx("span",{className:"text-opacity-70",children:T}),n?w.jsx(b.Fragment,{children:n}):null]}):null}):null,w.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?w.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,c,s?w.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),w.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:l}),w.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})]})},FM=e=>w.jsx(b.Fragment,{children:e.children}),wb=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>{const s=r.Render??FM,a=r.label??r.value;return w.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsxs("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":t,"aria-checked":t,"aria-current":t,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary/70 text-primary-foreground":""}`,children:[w.jsx(s,{...o,label:r.label,value:r.value,children:a}),t?w.jsx("span",{children:w.jsx(pP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),jM={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},NM={caseSensitive:!1,sort:!1},LM=[],_M=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:c=!1,right:l,left:u,error:f,required:h=!1,...d},p)=>{const m=d.value??d.defaultValue??"",g=Dt(),[v,x]=b.useState(!1),[y,T]=b.useState(""),[S,E]=b.useState(m),[R,A]=b.useState(m),[k,I]=b.useState(null),j=b.useRef(LM),D=t&&y!==""?[{value:y,label:y,"data-dynamic":"true"},...e]:e,N=new jr(D,["value","label"],NM).search(y),P=t?void 0:`^(${e.map($=>`${oc($.value)}${$.label?"|"+oc($.label):""}`).join("|")})$`;b.useEffect(()=>{if(d.value){const $=e.find(Y=>Y.value===d.value);E(($==null?void 0:$.label)??d.value)}},[d.value]);const{x:O,y:F,strategy:_,refs:W,context:U}=Eo({open:v,transform:!0,strategy:"absolute",onOpenChange:x,whileElementsMounted:sa,middleware:[aa(4),DD({elementContext:"reference",padding:10,apply($){const ee=$.elements.reference.parentElement,H=ee==null?void 0:ee.getBoundingClientRect().width;Object.assign($.elements.floating.style,{width:`${H}px`,maxWidth:`${H}px`,minWidth:"max-content",maxHeight:`${Math.min(480,$.availableHeight)}px`})}})]}),M=gM(U,jM),{getReferenceProps:V,getFloatingProps:q,getItemProps:J}=Co([Po(U,{role:"listbox"}),So(U),gb(U,{activeIndex:k,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:j,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:k,virtual:!0,onNavigate:$=>I(Y=>$??Y)})]);b.useEffect(()=>{const $=W.reference.current;if($)return Hs($)},[]);const X=($,Y)=>{E($.value);const ee=W.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",$.value),ee.value=$.value;const H=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(H),d.onChange&&d.onChange(H),A($.label??""),x(!1),T(""),I(Y)},G=$=>{var ee;const Y=$.target.value;return T(Y),!v&&Y===""?x(!0):($.target.name=d.name||"",Y?x(!0):(ee=d.onChange)==null?void 0:ee.call(d,$))},L=()=>{x(!0),T("")},B=()=>{var $;T(""),E(""),($=W.reference.current)==null||$.setAttribute("data-value",""),A(""),$m(W.reference.current),x(!1)},z=d.id||d.name;return w.jsxs(ua,{...d,container:a,error:f,feedback:n,form:d.form,hideLeft:c,id:d.name||d.id,interactive:o,labelClassName:r,left:u,name:d.name,optionalText:s,placeholder:d.placeholder,required:h,rightLabel:i,title:d.title,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[w.jsx(Oy,{size:20}),w.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),S?w.jsx("button",{type:"button",onClick:B,className:"transition-colors link:text-danger",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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:[w.jsx("input",{...V({...d,onChange:G,onFocus:L,pattern:P,ref:W.setReference,name:`${z}-shadow`,id:`${z}-shadow`,onClick:$=>$.currentTarget.focus(),onKeyDown($){if($.key==="Escape")return $.currentTarget.blur(),x(!1);if($.key==="Enter"){if(k!==null&&N[k])return $.preventDefault(),X(N[k],k);if(N.length===1)return $.preventDefault(),X(N[0],0)}}}),"data-value":S,"data-error":!!f,"data-name":z,"data-target":z,required:h,value:v?y:R||S,"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",d.className)}),w.jsx("input",{id:z,name:z,type:"hidden","data-origin":z,ref:p,required:h,defaultValue:d.value||S||void 0}),w.jsx(To,{preserveTabOrder:!0,children:v?w.jsx(Ri,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsx("ul",{...q({ref:W.setFloating,style:{position:_,left:(O??0)+16,top:F??0,...M.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:N.map(($,Y)=>b.createElement(wb,{...J({onClick:()=>X($,Y),ref:ee=>void(j.current[Y]=ee),selected:k===Y,active:S===$.value}),key:`${$.value}-option`,option:$,selected:k===Y,active:S===$.value}))})}):null})]})}),Tb=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:s,...a},c)=>w.jsxs("label",{"data-task":t,"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":"",s),children:[w.jsx("input",{...a,ref:c,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,w.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})]})),Ii=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:c,hideLeft:l=!1,right:u,left:f,error:h,...d},p)=>{const m=d.id??d.name,g=b.useRef(null);return b.useEffect(()=>{if(g.current===null)return;const v=g.current,x=Hs(g.current),y=T=>{const S=T;if(S.key==="Enter"&&v.enterKeyHint==="next"){const E=v.getAttribute("data-next");if(E){const R=document.getElementById(E);if(R)return R.focus(),void S.preventDefault()}}};return v.addEventListener("keydown",y),()=>{x(),v.removeEventListener("keydown",y)}},[]),w.jsx(ua,{info:n,container:c,error:h,feedback:t,hideLeft:l,left:f,optionalText:a,right:u,rightLabel:s,interactive:i,form:d.form,id:d.name||d.id,name:d.name,labelClassName:r,title:d.title,placeholder:d.placeholder,required:d.required,children:w.jsx(nv,{...d,type:e,"data-next":o,ref:Hc(p,g),id:m,name:m,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",d.className)})})}),gp=new Date(1970,11,31),ul={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},VM={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")},fl=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},$M=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},s)=>{const a=t||gA(),c=b.useId(),l=Dt(),u=b.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[f,h]=b.useState(e||void 0),[d,p]=b.useState(!1),m=fl(u,gp).flatMap(R=>vn.keyof(ul,R.type)?ul[R.type](R.value):[]),g=fl(u,gp).reduce((R,A)=>R+(vn.keyof(yp,A.type)?yp[A.type](A.value):""),"");console.log({locale:a,datetimeFormat:u,placeholder:g});const[v,x]=b.useState(f?fl(u,f).reduce((R,A)=>R+(vn.keyof(ul,A.type)?VM[A.type](f,A.value):""),""):""),y=R=>{const A=R.target.value;if(x(A),m.length===A.length&&m.every((I,j)=>{const D=A.charAt(j);return typeof I=="string"?D===I:I.test(D)})){const I=Zr(AI(A,g,new Date));return h(I),r==null?void 0:r(I)}return h(void 0),r==null?void 0:r(void 0)},T=R=>(h(R),r==null||r(R),x(R?OR(R,g):"")),S=_y(f),E=S?f.toISOString():void 0;return w.jsx(Ii,{...i,mask:m,value:v,"data-value":E,"data-target":i.name,className:"uppercase",formNoValidate:!d,placeholder:g,onChange:y,required:i.required??!0,error:d?void 0:i.error,name:void 0,id:void 0,right:w.jsxs(b.Fragment,{children:[w.jsx("input",{"data-origin":i.name,defaultValue:E,form:i.form,hidden:!0,id:i.name,name:i.name,ref:s,type:"date"}),w.jsx(Ro,{open:d,onChange:p,trigger:w.jsxs("span",{"aria-labelledby":c,children:[w.jsx("span",{id:c,className:"sr-only",children:l.datePickerCalendarButtonLabel}),w.jsx(hP,{})]}),buttonProps:{"aria-describedby":c},children:w.jsx(fv,{...i,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:S?f:void 0})})]})})}),BM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],WM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],HM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],zM=["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?zM:HM:t.binary?WM:BM,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=vp(e,t.locale,s);return i+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,s||(e=e.toPrecision(3));const c=vp(Number(e),t.locale,s),l=n[a];return i+c+r+l}var vc={exports:{}},Ki={exports:{}},Pe={};/** @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
|
|
184
|
+
*/var xp;function UM(){if(xp)return Pe;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,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,x=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 c:case l:case r:case i:case o:case f:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case d:case s:return S;default:return E}}case n:return E}}}function T(S){return y(S)===l}return Pe.AsyncMode=c,Pe.ConcurrentMode=l,Pe.ContextConsumer=a,Pe.ContextProvider=s,Pe.Element=t,Pe.ForwardRef=u,Pe.Fragment=r,Pe.Lazy=p,Pe.Memo=d,Pe.Portal=n,Pe.Profiler=i,Pe.StrictMode=o,Pe.Suspense=f,Pe.isAsyncMode=function(S){return T(S)||y(S)===c},Pe.isConcurrentMode=T,Pe.isContextConsumer=function(S){return y(S)===a},Pe.isContextProvider=function(S){return y(S)===s},Pe.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Pe.isForwardRef=function(S){return y(S)===u},Pe.isFragment=function(S){return y(S)===r},Pe.isLazy=function(S){return y(S)===p},Pe.isMemo=function(S){return y(S)===d},Pe.isPortal=function(S){return y(S)===n},Pe.isProfiler=function(S){return y(S)===i},Pe.isStrictMode=function(S){return y(S)===o},Pe.isSuspense=function(S){return y(S)===f},Pe.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===l||S===i||S===o||S===f||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===d||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===g||S.$$typeof===v||S.$$typeof===x||S.$$typeof===m)},Pe.typeOf=y,Pe}var Re={};/** @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
|
|
191
|
+
*/var wp;function GM(){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,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function y(H){return typeof H=="string"||typeof H=="function"||H===r||H===l||H===i||H===o||H===f||H===h||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===d||H.$$typeof===s||H.$$typeof===a||H.$$typeof===u||H.$$typeof===g||H.$$typeof===v||H.$$typeof===x||H.$$typeof===m)}function T(H){if(typeof H=="object"&&H!==null){var we=H.$$typeof;switch(we){case t:var Ue=H.type;switch(Ue){case c:case l:case r:case i:case o:case f:return Ue;default:var je=Ue&&Ue.$$typeof;switch(je){case a:case u:case p:case d:case s:return je;default:return we}}case n:return we}}}var S=c,E=l,R=a,A=s,k=t,I=u,j=r,D=p,N=d,P=n,O=i,F=o,_=f,W=!1;function U(H){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(H)||T(H)===c}function M(H){return T(H)===l}function V(H){return T(H)===a}function q(H){return T(H)===s}function J(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function X(H){return T(H)===u}function G(H){return T(H)===r}function L(H){return T(H)===p}function B(H){return T(H)===d}function z(H){return T(H)===n}function $(H){return T(H)===i}function Y(H){return T(H)===o}function ee(H){return T(H)===f}Re.AsyncMode=S,Re.ConcurrentMode=E,Re.ContextConsumer=R,Re.ContextProvider=A,Re.Element=k,Re.ForwardRef=I,Re.Fragment=j,Re.Lazy=D,Re.Memo=N,Re.Portal=P,Re.Profiler=O,Re.StrictMode=F,Re.Suspense=_,Re.isAsyncMode=U,Re.isConcurrentMode=M,Re.isContextConsumer=V,Re.isContextProvider=q,Re.isElement=J,Re.isForwardRef=X,Re.isFragment=G,Re.isLazy=L,Re.isMemo=B,Re.isPortal=z,Re.isProfiler=$,Re.isStrictMode=Y,Re.isSuspense=ee,Re.isValidElementType=y,Re.typeOf=T}()),Re}var Tp;function Sb(){return Tp||(Tp=1,process.env.NODE_ENV==="production"?Ki.exports=UM():Ki.exports=GM()),Ki.exports}/*
|
|
192
192
|
object-assign
|
|
193
193
|
(c) Sindre Sorhus
|
|
194
194
|
@license MIT
|
|
195
|
-
*/var dl,
|
|
196
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
197
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
198
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ib(e,t){if(e){if(typeof e=="string")return xc(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 xc(e,t)}}function xc(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
|
|
199
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
200
|
-
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 wc(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 wc(e,t)}}function wc(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 Wk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Hk(e){if(Array.isArray(e))return e}function _p(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 We(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_p(Object(n),!0).forEach(function(r){Tc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_p(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ls(e,t){if(e==null)return{};var n=zk(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var qu=b.forwardRef(function(e,t){var n=e.children,r=Ls(e,kk),o=jb(r),i=o.open,s=Ls(o,Fk);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(We(We({},s),{},{open:i})))});qu.displayName="Dropzone";var Fb={disabled:!1,getFilesFromEvent:nk,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=Fb;qu.propTypes={children:Me.func,accept:Me.objectOf(Me.arrayOf(Me.string)),multiple:Me.bool,preventDropOnDocument:Me.bool,noClick:Me.bool,noKeyboard:Me.bool,noDrag:Me.bool,noDragEventsBubbling:Me.bool,minSize:Me.number,maxSize:Me.number,maxFiles:Me.number,disabled:Me.bool,getFilesFromEvent:Me.func,onFileDialogCancel:Me.func,onFileDialogOpen:Me.func,useFsAccessApi:Me.bool,autoFocus:Me.bool,onDragEnter:Me.func,onDragLeave:Me.func,onDragOver:Me.func,onDrop:Me.func,onDropAccepted:Me.func,onDropRejected:Me.func,onError:Me.func,validator:Me.func};var Sc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function jb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=We(We({},Fb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,h=t.onDrop,d=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,g=t.useFsAccessApi,x=t.autoFocus,v=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,A=t.noDragEventsBubbling,I=t.onError,O=t.validator,R=b.useMemo(function(){return Ok(n)},[n]),j=b.useMemo(function(){return Ak(n)},[n]),k=b.useMemo(function(){return typeof y=="function"?y:Vp},[y]),L=b.useMemo(function(){return typeof m=="function"?m:Vp},[m]),P=b.useRef(null),M=b.useRef(null),F=b.useReducer(Uk,Sc),_=vl(F,2),W=_[0],U=_[1],D=W.isFocused,$=W.isFileDialogActive,q=b.useRef(typeof window<"u"&&window.isSecureContext&&g&&Ik()),J=function(){!q.current&&$&&setTimeout(function(){if(M.current){var re=M.current.files;re.length||(U({type:"closeDialog"}),L())}},300)};b.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[M,$,L,q]);var X=b.useRef([]),G=function(re){P.current&&P.current.contains(re.target)||(re.preventDefault(),X.current=[])};b.useEffect(function(){return v&&(document.addEventListener("dragover",Lp,!1),document.addEventListener("drop",G,!1)),function(){v&&(document.removeEventListener("dragover",Lp),document.removeEventListener("drop",G))}},[P,v]),b.useEffect(function(){return!r&&x&&P.current&&P.current.focus(),function(){}},[P,x,r]);var N=b.useCallback(function(Z){I?I(Z):console.error(Z)},[I]),B=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[].concat(Lk(X.current),[Z.target]),qi(Z)&&Promise.resolve(o(Z)).then(function(re){if(!(Ns(Z)&&!A)){var xe=re.length,Ne=xe>0&&Ek({files:re,accept:R,minSize:s,maxSize:i,multiple:a,maxFiles:c,validator:O}),ht=xe>0&&!Ne;U({isDragAccept:Ne,isDragReject:ht,isDragActive:!0,type:"setDraggedFiles"}),l&&l(Z)}}).catch(function(re){return N(re)})},[o,l,N,A,R,s,i,a,c,O]),z=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=qi(Z);if(re&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return re&&f&&f(Z),!1},[f,A]),V=b.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}),qi(Z)&&u&&u(Z))},[P,u,A]),Y=b.useCallback(function(Z,re){var xe=[],Ne=[];Z.forEach(function(ht){var vt=Ab(ht,R),Ct=vl(vt,2),Qn=Ct[0],wr=Ct[1],Tr=Ob(ht,s,i),ki=vl(Tr,2),ya=ki[0],va=ki[1],ba=O?O(ht):null;if(Qn&&ya&&!ba)xe.push(ht);else{var xa=[wr,va];ba&&(xa=xa.concat(ba)),Ne.push({file:ht,errors:xa.filter(function(E0){return E0})})}}),(!a&&xe.length>1||a&&c>=1&&xe.length>c)&&(xe.forEach(function(ht){Ne.push({file:ht,errors:[Sk]})}),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,R,s,i,c,h,d,p,O]),ee=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[],qi(Z)&&Promise.resolve(o(Z)).then(function(re){Ns(Z)&&!A||Y(re,Z)}).catch(function(re){return N(re)}),U({type:"reset"})},[o,Y,N,A]),H=b.useCallback(function(){if(q.current){U({type:"openDialog"}),k();var Z={multiple:a,types:j};window.showOpenFilePicker(Z).then(function(re){return o(re)}).then(function(re){Y(re,null),U({type:"closeDialog"})}).catch(function(re){Dk(re)?(L(re),U({type:"closeDialog"})):Mk(re)?(q.current=!1,M.current?(M.current.value=null,M.current.click()):N(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."))):N(re)});return}M.current&&(U({type:"openDialog"}),k(),M.current.value=null,M.current.click())},[U,k,L,g,Y,N,j,a]),we=b.useCallback(function(Z){!P.current||!P.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),H())},[P,H]),Ue=b.useCallback(function(){U({type:"focus"})},[]),je=b.useCallback(function(){U({type:"blur"})},[]),Ge=b.useCallback(function(){S||(Rk()?setTimeout(H,0):H())},[S,H]),ie=function(re){return r?null:re},me=function(re){return T?null:ie(re)},oe=function(re){return E?null:ie(re)},ye=function(re){A&&re.stopPropagation()},Qe=b.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,Ct=Z.onBlur,Qn=Z.onClick,wr=Z.onDragEnter,Tr=Z.onDragOver,ki=Z.onDragLeave,ya=Z.onDrop,va=Ls(Z,jk);return We(We(Tc({onKeyDown:me(qt(ht,we)),onFocus:me(qt(vt,Ue)),onBlur:me(qt(Ct,je)),onClick:ie(qt(Qn,Ge)),onDragEnter:oe(qt(wr,B)),onDragOver:oe(qt(Tr,z)),onDragLeave:oe(qt(ki,V)),onDrop:oe(qt(ya,ee)),role:typeof Ne=="string"&&Ne!==""?Ne:"presentation"},xe,P),!r&&!T?{tabIndex:0}:{}),va)}},[P,we,Ue,je,Ge,B,z,V,ee,T,E,r]),ve=b.useCallback(function(Z){Z.stopPropagation()},[]),ot=b.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=Ls(Z,Nk),Ct=Tc({accept:R,multiple:a,type:"file",style:{display:"none"},onChange:ie(qt(Ne,ee)),onClick:ie(qt(ht,ve)),tabIndex:-1},xe,M);return We(We({},Ct),vt)}},[M,n,a,ee,r]);return We(We({},W),{},{isFocused:D&&!r,getRootProps:Qe,getInputProps:ot,rootRef:P,inputRef:M,open:ie(H)})}function Uk(e,t){switch(t.type){case"focus":return We(We({},e),{},{isFocused:!0});case"blur":return We(We({},e),{},{isFocused:!1});case"openDialog":return We(We({},Sc),{},{isFileDialogActive:!0});case"closeDialog":return We(We({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return We(We({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return We(We({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return We({},Sc);default:return e}}function Vp(){}const Gk={isImage:e=>e.type.includes("image")},Yk=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(Gk.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:vp(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:vp(e.file.size)})},[e.file]),t.type==="img"?w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[w.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),w.jsxs("div",{className:"flex flex-col",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Hr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Xr,{})})]}):w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[w.jsx(yP,{size:48}),w.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Hr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Xr,{className:"text-danger"})})]})},Kk=e=>w.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>w.jsx(Yk,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),qk=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(Kk,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(b.Fragment,{children:e.idle}),Xk=w.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[w.jsx(EP,{size:64}),w.jsxs("p",{children:["You can drag your files or"," ",w.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),Qk=({idle:e=Xk,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:c,isDragActive:l}=jb({onDrop:s});return w.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[w.jsx("input",{...c(r),name:r.name,id:r.name}),w.jsx(qk,{onDeleteFile:t,isDragActive:l,idle:e,files:r.files??o})]})},Zk=["INPUT","SELECT"],Ec=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{Zk.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},Jk=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return w.jsx("form",{...e,onSubmit:t})},eF=({children:e,className:t="",size:n,...r})=>w.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[w.jsx("input",{...r,type:"radio",className:ke("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),yr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:c,container:l,hideLeft:u=!1,right:f,left:h,error:d,...p},m)=>{const y=Dt(),g=b.useRef(null),x=p.id??p.name;b.useImperativeHandle(m,()=>g.current),b.useEffect(()=>{if(g.current===null)return;const S=g.current,T=Hs(g.current),E=()=>S.setAttribute("data-selected","true");return S.addEventListener("change",E),()=>{T(),S.removeEventListener("change",E)}},[]);const v=()=>{var S;return(S=g.current)==null?void 0:S.focus()};return w.jsx(ua,{container:l,error:d,feedback:o,hideLeft:u,left:h,info:n,optionalText:c,rightLabel:a,interactive:s,form:p.form,id:p.name||p.id,name:p.name,labelClassName:i,title:p.title,placeholder:p.placeholder,required:e,right:w.jsx("label",{htmlFor:x,children:w.jsxs("button",{onClick:v,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(Ay,{size:20}),w.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:x,name:x,value:p.value,required:e,ref:Hc(m,g),"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:[w.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(S=>w.jsx("option",{...S,children:S.label??S.value},`${x}-select-option-${S.value}`))]})})}),Cc=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},tF=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),c=s,l=b.useRef(null),u=Cc(r.onChange);b.useImperativeHandle(o,()=>l.current),b.useEffect(()=>{if(l.current!==null&&u.current){const h=d=>{d.target.checked=!d.target.checked,u.current&&u.current(d)};return l.current.addEventListener("change",h),()=>{var d;return(d=l.current)==null?void 0:d.removeEventListener("change",h)}}},[]);const f=()=>{var d,p;const h=!((d=l.current)!=null&&d.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),l.current!==null&&(l.current.checked=h,l.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:ke("flex flex-wrap items-center",t),children:[w.jsx("input",{...r,checked:c,"data-checked":c,"data-trigger":"change",hidden:!0,id:r.id||i,onChange:h=>a(h.target.checked),ref:l,type:"checkbox"}),w.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${i}-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:w.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),w.jsx("label",{htmlFor:r.id||i,className:"ml-3 inline-block text-sm",id:`${i}-label`,children:w.jsx("span",{className:"font-medium text-foreground",children:e})}),w.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),nF=e=>{const[t,n]=nP();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input")),c=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),l=a.indexOf(s);c&&l!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:aP(.075,{from:l})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,ref:t})},fa=0,Kn=1,Oo=2,Nb=4;function fi(e,t){return n=>e(t(n))}function rF(e,t){return t(e)}function Lb(e,t){return n=>e(t,n)}function $p(e,t){return()=>e(t)}function da(e,t){return t(e),e}function Be(...e){return e}function oF(e){e()}function Bp(e){return()=>e}function iF(...e){return()=>{e.map(oF)}}function Xu(e){return e!==void 0}function br(){}function Oe(e,t){return e(Kn,t)}function fe(e,t){e(fa,t)}function Qu(e){e(Oo)}function wt(e){return e(Nb)}function se(e,t){return Oe(e,Lb(t,fa))}function dn(e,t){const n=e(Kn,r=>{n(),t(r)});return n}function ge(){const e=[];return(t,n)=>{switch(t){case Oo:e.splice(0,e.length);return;case Kn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case fa: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 Kn:o(t);break;case fa:t=o;break;case Nb:return t}return n(r,o)}}function sF(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case Kn:return i?n===i?void 0:(r(),n=i,t=Oe(e,i),t):(r(),br);case Oo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function jt(e){return da(ge(),t=>se(e,t))}function Tt(e,t){return da(Q(t),n=>se(e,n))}function aF(...e){return t=>e.reduceRight(rF,t)}function K(e,...t){const n=aF(...t);return(r,o)=>{switch(r){case Kn:return Oe(e,n(o));case Oo:Qu(e);return}}}function _b(e,t){return e===t}function $e(e=_b){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=>fi(t,e)}function Jt(e){return t=>()=>t(e)}function on(e,t){return n=>r=>n(t=e(t,r))}function io(e){return t=>n=>{e>0?e--:t(n)}}function Mn(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((i,s)=>{const a=Math.pow(2,s);Oe(i,c=>{const l=n;n=n|a,t[s]=c,l!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function Hp(...e){return function(t,n){switch(t){case Kn:return iF(...e.map(r=>Oe(r,n)));case Oo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ce(e,t=_b){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((i,s)=>{const a=Math.pow(2,s);Oe(i,c=>{n[s]=c,r=r|a,r===o&&fe(t,n)})}),function(i,s){switch(i){case Kn:return r===o&&s(n),Oe(t,s);case Oo:return Qu(t);default:throw new Error(`unrecognized action ${i}`)}}}function Ce(e,t=[],{singleton:n}={singleton:!0}){return{id:lF(),constructor:e,dependencies:t,singleton:n}}const lF=()=>Symbol();function cF(e){const t=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=o(i.map(c=>n(c)));return s&&t.set(r,a),a};return n(e)}function uF(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n}const Xi=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Zu(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=b.createContext({});function c(g,x){g.propsReady&&fe(g.propsReady,!1);for(const v of r){const S=g[t.required[v]];fe(S,x[v])}for(const v of o)if(v in x){const S=g[t.optional[v]];fe(S,x[v])}g.propsReady&&fe(g.propsReady,!0)}function l(g){return i.reduce((x,v)=>(x[v]=S=>{const T=g[t.methods[v]];fe(T,S)},x),{})}function u(g){return s.reduce((x,v)=>(x[v]=sF(g[t.events[v]]),x),{})}const f=b.forwardRef((g,x)=>{const{children:v,...S}=g,[T]=b.useState(()=>da(cF(e),A=>c(A,S))),[E]=b.useState($p(u,T));return Xi(()=>{for(const A of s)A in S&&Oe(E[A],S[A]);return()=>{Object.values(E).map(Qu)}},[S,E,T]),Xi(()=>{c(T,S)}),b.useImperativeHandle(x,Bp(l(T))),b.createElement(a.Provider,{value:T},n?b.createElement(n,uF([...r,...o,...s],S),v):v)}),h=g=>b.useCallback(Lb(fe,b.useContext(a)[g]),[g]),d=g=>{const v=b.useContext(a)[g],S=b.useCallback(T=>Oe(v,T),[v]);return b.useSyncExternalStore(S,()=>wt(v),()=>wt(v))},p=g=>{const v=b.useContext(a)[g],[S,T]=b.useState($p(wt,v));return Xi(()=>Oe(v,E=>{E!==S&&T(Bp(E))}),[v,S]),S},m=b.version.startsWith("18")?d:p;return{Component:f,usePublisher:h,useEmitterValue:m,useEmitter:(g,x)=>{const S=b.useContext(a)[g];Xi(()=>Oe(S,x),[x,S])}}}const fF=typeof document<"u"?b.useLayoutEffect:b.useEffect,dF=fF;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 hF={0:"debug",1:"log",2:"warn",3:"error"},pF=()=>typeof globalThis>"u"?window:globalThis,qn=Ce(()=>{const e=Q(3);return{log:Q((n,r,o=1)=>{var i;const s=(i=pF().VIRTUOSO_LOG_LEVEL)!=null?i:wt(e);o>=s&&console[hF[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Ju(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&e(s)})}),[e]);r=i=>{i&&t?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function hn(e,t=!0){return Ju(e,t).callbackRef}function Vb(e,t,n,r,o,i,s){const a=b.useCallback(c=>{const l=mF(c.children,t,"offsetHeight",o);let u=c.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",h=s?s.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,d=s?s.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:d,viewportHeight:p}),i==null||i(gF("row-gap",getComputedStyle(c).rowGap,o)),l!==null&&e(l)},[e,t,o,i,s,r]);return Ju(a,n)}function mF(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(!a||a.dataset.index===void 0)continue;const c=parseInt(a.dataset.index),l=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Nt.ERROR),u===l)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==c-1?i.push({startIndex:c,endIndex:c,size:u}):i[i.length-1].endIndex++}return i}function gF(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 Yt(e,t){return Math.round(e.getBoundingClientRect()[t])}function $b(e,t){return Math.abs(e-t)<1.01}function Bb(e,t,n,r=br,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),c=b.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,y=d?window.innerHeight:h.offsetHeight,g=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};f.suppressFlushSync?g():jc.flushSync(g),s.current!==null&&(p===s.current||p<=0||p===m-y)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const f=o||i.current;return r(o||i.current),c({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[i,c,n,r,o]);function l(f){const h=i.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const d=f.behavior==="smooth";let p,m,y;h===window?(m=Math.max(Yt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=h.scrollHeight,p=Yt(h,"height"),y=h.scrollTop);const g=m-p;if(f.top=Math.ceil(Math.max(Math.min(g,f.top),0)),$b(p,m)||f.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),d&&t(!0);return}d?(s.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,h.scrollTo(f)}function u(f){i.current.scrollBy(f)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:l}}const Rt=Ce(()=>{const e=ge(),t=ge(),n=Q(0),r=ge(),o=Q(0),i=ge(),s=ge(),a=Q(0),c=Q(0),l=Q(0),u=Q(0),f=ge(),h=ge(),d=Q(!1);return se(K(e,ne(({scrollTop:p})=>p)),t),se(K(e,ne(({scrollHeight:p})=>p)),s),se(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:c,fixedFooterHeight:l,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:f,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:d}},[],{singleton:!0}),di={lvl:0};function Wb(e,t,n,r=di,o=di){return{k:e,v:t,lvl:n,l:r,r:o}}function Fe(e){return e===di}function _r(){return di}function Pc(e,t){if(Fe(e))return di;const{k:n,l:r,r:o}=e;if(t===n){if(Fe(r))return o;if(Fe(o))return r;{const[i,s]=Hb(r);return as(st(e,{k:i,v:s,l:zb(r)}))}}else return t<n?as(st(e,{l:Pc(r,t)})):as(st(e,{r:Pc(o,t)}))}function hi(e,t){if(!Fe(e))return t===e.k?e.v:t<e.k?hi(e.l,t):hi(e.r,t)}function Kt(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=Kt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Kt(e.l,t,n)}function Ft(e,t,n){return Fe(e)?Wb(t,n,1):t===e.k?st(e,{k:t,v:n}):t<e.k?zp(st(e,{l:Ft(e.l,t,n)})):zp(st(e,{r:Ft(e.r,t,n)}))}function Rc(e,t,n){if(Fe(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(Rc(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Rc(s,t,n))),a}function cr(e){return Fe(e)?[]:[...cr(e.l),{k:e.k,v:e.v},...cr(e.r)]}function Hb(e){return Fe(e.r)?[e.k,e.v]:Hb(e.r)}function zb(e){return Fe(e.r)?e.l:as(st(e,{r:zb(e.r)}))}function st(e,t){return Wb(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function bl(e){return Fe(e)||e.lvl>e.r.lvl}function zp(e){return Ic(Gb(e))}function as(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(bl(t))return Gb(st(e,{lvl:r-1}));if(!Fe(t)&&!Fe(t.r))return st(t.r,{l:st(t,{r:t.r.l}),r:st(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(bl(e))return Ic(st(e,{lvl:r-1}));if(!Fe(n)&&!Fe(n.l)){const o=n.l,i=bl(o)?n.lvl-1:n.lvl;return st(o,{l:st(e,{r:o.l,lvl:r-1}),r:Ic(st(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ha(e,t,n){if(Fe(e))return[];const r=Kt(e,t)[0];return yF(Rc(e,r,n))}function Ub(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:c}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=c}return i.push({start:r,end:1/0,value:o}),i}function yF(e){return Ub(e,({k:t,v:n})=>({index:t,value:n}))}function Ic(e){const{r:t,lvl:n}=e;return!Fe(t)&&!Fe(t.r)&&t.lvl===n&&t.r.lvl===n?st(t,{l:st(e,{r:t.l}),lvl:n+1}):e}function Gb(e){const{l:t}=e;return!Fe(t)&&t.lvl===e.lvl?st(t,{r:st(e,{l:t.r})}):e}function _s(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Yb(e,t,n){return e[_s(e,t,n)]}function vF(e,t,n,r){const o=_s(e,t,r),i=_s(e,n,r,o);return e.slice(o,i+1)}const ef=Ce(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function bF(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 Up(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 xF(e,t){let n=Fe(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),Fe(e)){e=Ft(e,0,o);continue}const a=ha(e,i-1,s+1);if(a.some(bF(r)))continue;let c=!1,l=!1;for(const{start:u,end:f,value:h}of a)c?(s>=u||o===h)&&(e=Pc(e,u)):(l=h!==o,c=!0),f>s&&s>=u&&h!==o&&(e=Ft(e,s+1,h));l&&(e=Ft(e,i,o))}return[e,n]}function wF(){return{offsetTree:[],sizeTree:_r(),groupOffsetTree:_r(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function tf({index:e},t){return t===e?0:t<e?-1:1}function TF({offset:e},t){return t===e?0:t<e?-1:1}function SF(e){return{index:e.index,value:e}}function EF(e,t,n,r=0){return r>0&&(t=Math.max(t,Yb(e,r,tf).offset)),Ub(vF(e,t,n,TF),SF)}function Ac(e,t,n,r){let o=e,i=0,s=0,a=0,c=0;if(t!==0){c=_s(o,t-1,tf),a=o[c].offset;const u=Kt(n,t-1);i=u[0],s=u[1],o.length&&o[c].size===Kt(n,t)[1]&&(c-=1),o=o.slice(0,c+1)}else o=[];for(const{start:l,value:u}of ha(n,t,1/0)){const f=l-i,h=f*s+a+f*r;o.push({offset:h,size:u,index:l}),i=l,a=h,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function CF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Nt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&Fe(i)&&t.length===2){const h=t[0].size,d=t[1].size;s=n.reduce((p,m)=>Ft(Ft(p,m,h),m+1,d),s)}else[s,a]=xF(s,t);if(s===i)return e;const{offsetTree:c,lastIndex:l,lastSize:u,lastOffset:f}=Ac(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:c,lastIndex:l,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((h,d)=>Ft(h,d,pi(d,c,o)),_r()),groupIndices:n}}function pi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=Yb(t,e,tf),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function PF(e){return typeof e.groupIndex<"u"}function Kb(e,t,n){if(PF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=qb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function qb(e,t){if(!pa(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function pa(e){return!Fe(e.groupOffsetTree)}function RF(e){return cr(e).map(({k:t,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const IF={offsetHeight:"height",offsetWidth:"width"},mn=Ce(([{log:e},{recalcInProgress:t}])=>{const n=ge(),r=ge(),o=Tt(r,0),i=ge(),s=ge(),a=Q(0),c=Q([]),l=Q(void 0),u=Q(void 0),f=Q((T,E)=>Yt(T,IF[E])),h=Q(void 0),d=Q(0),p=wF(),m=Tt(K(n,de(c,e,d),on(CF,p),$e()),p),y=Tt(K(c,$e(),on((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),ne(({prev:T})=>T)),[]);se(K(c,le(T=>T.length>0),de(m,d),ne(([T,E,A])=>{const I=T.reduce((O,R,j)=>Ft(O,R,pi(R,E.offsetTree,A)||j),_r());return{...E,groupIndices:T,groupOffsetTree:I}})),m),se(K(r,de(m),le(([T,{lastIndex:E}])=>T<E),ne(([T,{lastIndex:E,lastSize:A}])=>[{startIndex:T,endIndex:E,size:A}])),n),se(l,u);const g=Tt(K(l,ne(T=>T===void 0)),!0);se(K(u,le(T=>T!==void 0&&Fe(wt(m).sizeTree)),ne(T=>[{startIndex:0,endIndex:0,size:T}])),n);const x=jt(K(n,de(m),on(({sizes:T},[E,A])=>({changed:A!==T,sizes:A}),{changed:!1,sizes:p}),ne(T=>T.changed)));Oe(K(a,on((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(i,T+Up(T,E));else if(T<0){const A=wt(y);A.length>0&&(T-=Up(-T,A)),fe(s,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(i);se(K(i,de(m),ne(([T,E])=>{const A=E.groupIndices.length>0,I=[],O=E.lastSize;if(A){const R=hi(E.sizeTree,0);let j=0,k=0;for(;j<T;){const M=E.groupIndices[k],F=E.groupIndices.length===k+1?1/0:E.groupIndices[k+1]-M-1;I.push({startIndex:M,endIndex:M,size:R}),I.push({startIndex:M+1,endIndex:M+1+F-1,size:O}),k++,j+=F+1}const L=cr(E.sizeTree);return j!==T&&L.shift(),L.reduce((M,{k:F,v:_})=>{let W=M.ranges;return M.prevSize!==0&&(W=[...M.ranges,{startIndex:M.prevIndex,endIndex:F+T-1,size:M.prevSize}]),{ranges:W,prevIndex:F+T,prevSize:_}},{ranges:I,prevIndex:T,prevSize:0}).ranges}return cr(E.sizeTree).reduce((R,{k:j,v:k})=>({ranges:[...R.ranges,{startIndex:R.prevIndex,endIndex:j+T-1,size:R.prevSize}],prevIndex:j+T,prevSize:k}),{ranges:[],prevIndex:0,prevSize:O}).ranges})),n);const S=jt(K(s,de(m,d),ne(([T,{offsetTree:E},A])=>{const I=-T;return pi(I,E,A)})));return se(K(s,de(m,d),ne(([T,E,A])=>{if(E.groupIndices.length>0){if(Fe(E.sizeTree))return E;let O=_r();const R=wt(y);let j=0,k=0,L=0;for(;j<-T;){L=R[k];const M=R[k+1]-L-1;k++,j+=M+1}if(O=cr(E.sizeTree).reduce((M,{k:F,v:_})=>Ft(M,Math.max(0,F+T),_),O),j!==-T){const M=hi(E.sizeTree,L);O=Ft(O,0,M);const F=Kt(E.sizeTree,-T+1)[1];O=Ft(O,1,F)}return{...E,sizeTree:O,...Ac(E.offsetTree,0,O,A)}}else{const O=cr(E.sizeTree).reduce((R,{k:j,v:k})=>Ft(R,Math.max(0,j+T),k),_r());return{...E,sizeTree:O,...Ac(E.offsetTree,0,O,A)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:u,fixedItemSize:l,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:v,firstItemIndex:a,gap:d,sizes:m,listRefresh:x,statefulTotalCount:o,trackItemSizes:g,itemSize:f}},Be(qn,ef),{singleton:!0}),AF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Xb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!AF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oi=Ce(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:c,footerHeight:l,fixedHeaderHeight:u,fixedFooterHeight:f},{log:h}])=>{const d=ge(),p=ge(),m=Q(0);let y=null,g=null,x=null;function v(){y&&(y(),y=null),x&&(x(),x=null),g&&(clearTimeout(g),g=null),fe(o,!1)}return se(K(d,de(e,i,t,m,c,l,h),de(r,u,f),ne(([[S,T,E,A,I,O,R,j],k,L,P])=>{const M=Xb(S),{align:F,behavior:_,offset:W}=M,U=A-1,D=Kb(M,T,U);let $=pi(D,T.offsetTree,k)+O;F==="end"?($+=L+Kt(T.sizeTree,D)[1]-E+P,D===U&&($+=R)):F==="center"?$+=(L+Kt(T.sizeTree,D)[1]-E+P)/2:$-=I,W&&($+=W);const q=J=>{v(),J?(j("retrying to scroll to",{location:S},Nt.DEBUG),fe(d,S)):(fe(p,!0),j("list did not change, scroll successful",{},Nt.DEBUG))};if(v(),_==="smooth"){let J=!1;x=Oe(n,X=>{J=J||X}),y=dn(a,()=>{q(J)})}else y=dn(K(n,OF(150)),q);return g=setTimeout(()=>{v()},1200),fe(o,!0),j("scrolling from index to",{index:D,top:$,behavior:_},Nt.DEBUG),{top:$,behavior:_}})),s),{scrollToIndex:d,scrollTargetReached:p,topListHeight:m}},Be(mn,Rt,qn),{singleton:!0});function OF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const mi="up",Jo="down",DF="none",MF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},kF=0,Di=Ce(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=Q(!1),a=Q(!0),c=ge(),l=ge(),u=Q(4),f=Q(kF),h=Tt(K(Hp(K(ce(t),io(1),Jt(!0)),K(ce(t),io(1),Jt(!1),Wp(100))),$e()),!1),d=Tt(K(Hp(K(i,Jt(!0)),K(i,Jt(!1),Wp(200))),$e()),!1);se(K(dt(ce(t),ce(f)),ne(([x,v])=>x<=v),$e()),a),se(K(a,Mn(50)),l);const p=jt(K(dt(e,ce(n),ce(r),ce(o),ce(u)),on((x,[{scrollTop:v,scrollHeight:S},T,E,A,I])=>{const O=v+T-S>-I,R={viewportHeight:T,scrollTop:v,scrollHeight:S};if(O){let k,L;return v>x.state.scrollTop?(k="SCROLLED_DOWN",L=x.state.scrollTop-v):(k="SIZE_DECREASED",L=x.state.scrollTop-v||x.scrollTopDelta),{atBottom:!0,state:R,atBottomBecause:k,scrollTopDelta:L}}let j;return R.scrollHeight>x.state.scrollHeight?j="SIZE_INCREASED":T<x.state.viewportHeight?j="VIEWPORT_HEIGHT_DECREASING":v<x.state.scrollTop?j="SCROLLING_UPWARDS":j="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:j,state:R}},MF),$e((x,v)=>x&&x.atBottom===v.atBottom))),m=Tt(K(e,on((x,{scrollTop:v,scrollHeight:S,viewportHeight:T})=>{if($b(x.scrollHeight,S))return{scrollTop:v,scrollHeight:S,jump:0,changed:!1};{const E=S-(v+T)<1;return x.scrollTop!==v&&E?{scrollHeight:S,scrollTop:v,jump:x.scrollTop-v,changed:!0}:{scrollHeight:S,scrollTop:v,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),le(x=>x.changed),ne(x=>x.jump)),0);se(K(p,ne(x=>x.atBottom)),s),se(K(s,Mn(50)),c);const y=Q(Jo);se(K(e,ne(({scrollTop:x})=>x),$e(),on((x,v)=>wt(d)?{direction:x.direction,prevScrollTop:v}:{direction:v<x.prevScrollTop?mi:Jo,prevScrollTop:v},{direction:Jo,prevScrollTop:0}),ne(x=>x.direction)),y),se(K(e,Mn(50),Jt(DF)),y);const g=Q(0);return se(K(h,le(x=>!x),Jt(0)),g),se(K(t,Mn(100),de(h),le(([x,v])=>!!v),on(([x,v],[S])=>[v,S],[0,0]),ne(([x,v])=>v-x)),g),{isScrolling:h,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:l,atBottomStateChange:c,scrollDirection:y,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:g,lastJumpDueToItemResize:m}},Be(Rt)),Xn=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(qn),{singleton:!0});function nf(e,t){e==0?t():requestAnimationFrame(()=>nf(e-1,t))}function rf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Mi=Ce(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=Q(!0),c=Q(0),l=Q(!0);return se(K(s,de(c),le(([u,f])=>!!f),Jt(!1)),a),se(K(s,de(c),le(([u,f])=>!!f),Jt(!1)),l),Oe(K(dt(t,s),de(a,e,n,l),le(([[,u],f,{sizeTree:h},d,p])=>u&&(!Fe(h)||Xu(d))&&!f&&!p),de(c)),([,u])=>{dn(i,()=>{fe(l,!0)}),nf(4,()=>{dn(r,()=>{fe(a,!0)}),fe(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:c,initialItemFinalLocationReached:l}},Be(mn,Rt,Oi,Xn),{singleton:!0});function Gp(e){return e?e==="smooth"?"smooth":"auto":!1}const FF=(e,t)=>typeof e=="function"?Gp(e(t)):t&&Gp(e),jF=Ce(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:c},{scrollingInProgress:l}])=>{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),io(1)),a),de(ce(u),n,i,l),ne(([[m,y],g,x,v,S])=>{let T=y&&v,E="auto";return T&&(E=FF(g,x||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),le(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{h&&(h(),h=null),h=dn(t,()=>{wt(c)("following output to ",{totalCount:m},Nt.DEBUG),d(y),h=null})});function p(m){const y=dn(r,g=>{m&&!g.atBottom&&g.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(wt(c)("scrolling to bottom due to increased size",{},Nt.DEBUG),d("auto"))});setTimeout(y,100)}return Oe(K(dt(ce(u),e,s),le(([m,,y])=>m&&y),on(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),le(({refreshed:m})=>m),de(u,e)),([,m])=>{wt(i)&&p(m!==!1)}),Oe(f,()=>{p(wt(u)!==!1)}),Oe(dt(ce(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&d("auto")}),{followOutput:u,autoscrollToBottom:f}},Be(mn,Di,Oi,Mi,Xn,qn,Rt));function NF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Qb=Ce(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=ge(),s=ge(),a=jt(K(i,ne(NF)));return se(K(a,ne(c=>c.totalCount)),e),se(K(a,ne(c=>c.groupIndices)),t),se(K(dt(r,n,o),le(([c,l])=>pa(l)),ne(([c,l,u])=>Kt(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),$e(),ne(c=>[c])),s),{groupCounts:i,topItemsIndexes:s}},Be(mn,Rt));function gi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Zb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Vs="top",$s="bottom",Yp="none";function Kp(e,t,n){return typeof e=="number"?n===mi&&t===Vs||n===Jo&&t===$s?e:0:n===mi?t===Vs?e.main:e.reverse:t===$s?e.main:e.reverse}function qp(e,t){return typeof e=="number"?e:e[t]||0}const of=Ce(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=ge(),s=Q(0),a=Q(0),c=Q(0),l=Tt(K(dt(ce(e),ce(t),ce(r),ce(i,gi),ce(c),ce(s),ce(o),ce(n),ce(a)),ne(([u,f,h,[d,p],m,y,g,x,v])=>{const S=u-x,T=y+g,E=Math.max(h-S,0);let A=Yp;const I=qp(v,Vs),O=qp(v,$s);return d-=x,d+=h+g,p+=h+g,p-=x,d>u+T-I&&(A=mi),p<u-E+f+O&&(A=Jo),A!==Yp?[Math.max(S-h-Kp(m,Vs,A)-I,0),S-E-g+f+Kp(m,$s,A)+O]:null}),le(u=>u!=null),$e(gi)),[0,0]);return{listBoundary:i,overscan:c,topListHeight:s,increaseViewportBy:a,visibleRange:l}},Be(Rt),{singleton:!0});function LF(e,t,n){if(pa(t)){const r=qb(e,t);return[{index:Kt(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const xl={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Xp(e,t,n){if(e.length===0)return[];if(!pa(t))return e.map(l=>({...l,index:l.index+n,originalIndex:l.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=ha(t.groupOffsetTree,r,o);let a,c=0;for(const l of e){(!a||a.end<l.index)&&(a=s.shift(),c=t.groupIndices.indexOf(a.start));let u;l.index===a.start?u={type:"group",index:c}:u={index:l.index-(c+1)+n,groupIndex:c},i.push({...u,size:l.size,offset:l.offset,originalIndex:l.index,data:l.data})}return i}function ls(e,t,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:c}=o;let l=0,u=0;if(e.length>0){l=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const f=n-c,h=a+f*s+(f-1)*r,d=l,p=h-u;return{items:Xp(e,o,i),topItems:Xp(t,o,i),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:l,offsetBottom:p,top:d,bottom:u,totalCount:n,firstItemIndex:i}}function Jb(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,c=rf(t,a),l=Array.from({length:a}).map((u,f)=>({index:f+c,size:0,offset:0,data:i[f+c]}));return ls(l,[],a,o,n,r)}const xr=Ce(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:c},{scrolledToInitialItem:l,initialTopMostItemIndex:u},{topListHeight:f},h,{didMount:d},{recalcInProgress:p}])=>{const m=Q([]),y=Q(0),g=ge();se(i.topItemsIndexes,m);const x=Tt(K(dt(d,p,ce(s,gi),ce(t),ce(e),ce(u),l,ce(m),ce(r),ce(o),n),le(([E,A,,I,,,,,,,O])=>{const R=O&&O.length!==I;return E&&!A&&!R}),ne(([,,[E,A],I,O,R,j,k,L,P,M])=>{const F=O,{sizeTree:_,offsetTree:W}=F,U=wt(y);if(I===0)return{...xl,totalCount:I};if(E===0&&A===0)return U===0?{...xl,totalCount:I}:Jb(U,R,O,L,P,M||[]);if(Fe(_))return U>0?null:ls(LF(rf(R,I),F,M),[],I,P,F,L);const D=[];if(k.length>0){const G=k[0],N=k[k.length-1];let B=0;for(const z of ha(_,G,N)){const V=z.value,Y=Math.max(z.start,G),ee=Math.min(z.end,N);for(let H=Y;H<=ee;H++)D.push({index:H,size:V,offset:B,data:M&&M[H]}),B+=V}}if(!j)return ls([],D,I,P,F,L);const $=k.length>0?k[k.length-1]+1:0,q=EF(W,E,A,$);if(q.length===0)return null;const J=I-1,X=da([],G=>{for(const N of q){const B=N.value;let z=B.offset,V=N.start;const Y=B.size;if(B.offset<E){V+=Math.floor((E-B.offset+P)/(Y+P));const H=V-N.start;z+=H*Y+H*P}V<$&&(z+=($-V)*Y,V=$);const ee=Math.min(N.end,J);for(let H=V;H<=ee&&!(z>=A);H++)G.push({index:H,size:Y,offset:z,data:M&&M[H]}),z+=Y+P}});return ls(X,D,I,P,F,L)}),le(E=>E!==null),$e()),xl);se(K(n,le(Xu),ne(E=>E==null?void 0:E.length)),t),se(K(x,ne(E=>E.topListHeight)),f),se(f,c),se(K(x,ne(E=>[E.top,E.bottom])),a),se(K(x,ne(E=>E.items)),g);const v=jt(K(x,le(({items:E})=>E.length>0),de(t,n),le(([{items:E},A])=>E[E.length-1].originalIndex===A-1),ne(([,E,A])=>[E-1,A]),$e(gi),ne(([E])=>E))),S=jt(K(x,Mn(200),le(({items:E,topItems:A})=>E.length>0&&E[0].originalIndex===A.length),ne(({items:E})=>E[0].index),$e())),T=jt(K(x,le(({items:E})=>E.length>0),ne(({items:E})=>{let A=0,I=E.length-1;for(;E[A].type==="group"&&A<I;)A++;for(;E[I].type==="group"&&I>A;)I--;return{startIndex:E[A].index,endIndex:E[I].index}}),$e(Zb)));return{listState:x,topItemsIndexes:m,endReached:v,startReached:S,rangeChanged:T,itemsRendered:g,initialItemCount:y,...h}},Be(mn,Qb,of,Mi,Oi,Di,Xn,ef),{singleton:!0}),_F=Ce(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(se(K(a,de(i),le(([,c])=>c!==0),de(o,e,t,r,n),ne(([[,c],l,u,f,h,d=[]])=>Jb(c,l,u,f,h,d))),s),{}),Be(mn,Mi,xr,Xn),{singleton:!0}),e0=Ce(([{scrollVelocity:e}])=>{const t=Q(!1),n=ge(),r=Q(!1);return se(K(e,de(r,t,n),le(([o,i])=>!!i),ne(([o,i,s,a])=>{const{exit:c,enter:l}=i;if(s){if(c(o,a))return!1}else if(l(o,a))return!0;return s}),$e()),t),Oe(K(dt(t,e,n),de(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Be(Di),{singleton:!0}),VF=Ce(([{topItemsIndexes:e}])=>{const t=Q(0);return se(K(t,le(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Be(xr)),t0=Ce(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=ge(),s=Tt(K(dt(e,r,t,n,o),ne(([a,c,l,u,f])=>a+c+l+u+f.offsetBottom+f.bottom)),0);return se(ce(s),i),{totalListHeight:s,totalListHeightChanged:i}},Be(Rt,xr),{singleton:!0});function n0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const $F=n0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),BF=Ce(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:c},{beforeUnshiftWith:l,shiftWithOffset:u,sizes:f,gap:h},{log:d},{recalcInProgress:p}])=>{const m=jt(K(c,de(a),on(([,g,x,v],[{items:S,totalCount:T,bottom:E,offsetBottom:A},I])=>{const O=E+A;let R=0;return x===T&&g.length>0&&S.length>0&&(S[0].originalIndex===0&&g[0].originalIndex===0||(R=O-v,R!==0&&(R+=I))),[R,S,T,O]},[0,[],0,0]),le(([g])=>g!==0),de(t,s,r,i,d,p),le(([,g,x,v,,,S])=>!S&&!v&&g!==0&&x===mi),ne(([[g],,,,,x])=>(x("Upward scrolling compensation",{amount:g},Nt.DEBUG),g))));function y(g){g>0?(fe(e,{top:-g,behavior:"auto"}),fe(n,0)):(fe(n,0),fe(e,{top:-g,behavior:"auto"}))}return Oe(K(m,de(n,o)),([g,x,v])=>{v&&$F()?fe(n,x-g):y(-g)}),Oe(K(dt(Tt(o,!1),n,p),le(([g,x,v])=>!g&&!v&&x!==0),ne(([g,x])=>x),Mn(1)),y),se(K(u,ne(g=>({top:-g}))),e),Oe(K(l,de(f,h),ne(([g,{lastSize:x,groupIndices:v,sizeTree:S},T])=>{function E(A){return A*(x+T)}if(v.length===0)return E(g);{let A=0;const I=hi(S,0);let O=0,R=0;for(;O<g;){O++,A+=I;let j=v.length===R+1?1/0:v[R+1]-v[R]-1;O+j>g&&(A-=I,j=g-O+1),O+=j,A+=E(j),R++}return A}})),g=>{fe(n,g),requestAnimationFrame(()=>{fe(e,{top:g}),requestAnimationFrame(()=>{fe(n,0),fe(p,!1)})})}),{deviation:n}},Be(Rt,Di,xr,mn,qn,ef)),WF=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=>{dn(K(n,io(1),le(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{fe(t,o)})})}),{initialScrollTop:r}},Be(Xn,Rt,xr),{singleton:!0}),HF=Ce(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Q(!1),r=Tt(K(dt(n,e,t),le(([o])=>o),ne(([,o,i])=>Math.max(0,o-i)),Mn(0),$e()),0);return{alignToBottom:n,paddingTopAddition:r}},Be(Rt,t0),{singleton:!0}),sf=Ce(([{scrollTo:e,scrollContainerState:t}])=>{const n=ge(),r=ge(),o=ge(),i=Q(!1),s=Q(void 0);return se(K(dt(n,r),ne(([{viewportHeight:a,scrollTop:c,scrollHeight:l},{offsetTop:u}])=>({scrollTop:Math.max(0,c-u),scrollHeight:l,viewportHeight:a}))),t),se(K(e,de(r),ne(([a,{offsetTop:c}])=>({...a,top:a.top+c}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Be(Rt)),zF=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>e<n?{...s,behavior:o,align:i??"start"}:t>r?{...s,behavior:o,align:i??"end"}:null,UF=Ce(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:c},{scrollToIndex:l}])=>{const u=ge();return se(K(u,de(e,o,t,i,s,a,r),de(n),ne(([[f,h,d,p,m,y,g,x],v])=>{const{done:S,behavior:T,align:E,calculateViewLocation:A=zF,...I}=f,O=Kb(f,h,p-1),R=pi(O,h.offsetTree,v)+m+y,j=R+Kt(h.sizeTree,O)[1],k=x+y,L=x+d-g,P=A({itemTop:R,itemBottom:j,viewportTop:k,viewportBottom:L,locationParams:{behavior:T,align:E,...I}});return P?S&&dn(K(c,le(M=>M===!1),io(wt(c)?1:2)),S):S&&S(),P}),le(f=>f!==null)),l),{scrollIntoView:u}},Be(mn,Rt,Oi,xr,qn),{singleton:!0}),GF=Ce(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:c}])=>{const l=ge(),u=Q(void 0),f=Q(null),h=Q(null);return se(a,f),se(c,h),Oe(K(l,de(e,n,s,f,h,r)),([d,p,m,y,g,x,v])=>{const S=RF(p.sizeTree);y&&g!==null&&x!==null&&(m=g.scrollTop-x.offsetTop),m-=v,d({ranges:S,scrollTop:m})}),se(K(u,le(Xu),ne(YF)),o),se(K(i,de(u),le(([,d])=>d!==void 0),$e(),ne(([,d])=>d.ranges)),t),{getState:l,restoreStateFrom:u}},Be(mn,Rt,Mi,Xn,sf));function YF(e){return{offset:e.scrollTop,index:0,align:"start"}}const KF=Ce(([e,t,n,r,o,i,s,a,c,l])=>({...e,...t,...n,...r,...o,...i,...s,...a,...c,...l}),Be(of,_F,Xn,e0,t0,WF,HF,sf,UF,qn)),r0=Ce(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:c,statefulTotalCount:l,gap:u,sizes:f},{initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p},m,y,g,{listState:x,topItemsIndexes:v,...S},{scrollToIndex:T},E,{topItemCount:A},{groupCounts:I},O])=>(se(S.rangeChanged,O.scrollSeekRangeChanged),se(K(O.windowViewportRect,ne(R=>R.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p,topItemsIndexes:v,topItemCount:A,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...g,statefulTotalCount:l,listState:x,scrollToIndex:T,trackItemSizes:o,itemSize:i,groupIndices:c,...S,...O,...m,sizes:f,...y}),Be(mn,Mi,Rt,GF,jF,xr,Oi,BF,VF,Qb,KF)),wl="-webkit-sticky",Qp="sticky",o0=n0(()=>{if(typeof document>"u")return Qp;const e=document.createElement("div");return e.style.position=wl,e.style.position===wl?wl:Qp});function af(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const c=a.getBoundingClientRect(),l=c.width;let u,f;if(t){const h=t.getBoundingClientRect(),d=c.top-h.top;u=h.height-Math.max(0,d),f=d+t.scrollTop}else u=window.innerHeight-Math.max(0,c.top),f=c.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:l},e(n.current)},[e,t]),{callbackRef:o,ref:i}=Ju(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),o}const ma=b.createContext(void 0),i0=b.createContext(void 0);function lf(e){return e}const qF=Ce(()=>{const e=Q(c=>`Item ${c}`),t=Q(null),n=Q(c=>`Group ${c}`),r=Q({}),o=Q(lf),i=Q("div"),s=Q(br),a=(c,l=null)=>Tt(K(r,ne(u=>u[c]),$e()),l);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,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")}}),XF=Ce(([e,t])=>({...e,...t}),Be(r0,qF)),QF=({height:e})=>b.createElement("div",{style:{height:e}}),ZF={position:o0(),zIndex:1,overflowAnchor:"none"},JF={overflowAnchor:"none"},Zp=b.memo(function({showTopList:t=!1}){const n=pe("listState"),r=Wt("sizeRanges"),o=pe("useWindowScroll"),i=pe("customScrollParent"),s=Wt("windowScrollContainerState"),a=Wt("scrollContainerState"),c=i||o?s:a,l=pe("itemContent"),u=pe("context"),f=pe("groupContent"),h=pe("trackItemSizes"),d=pe("itemSize"),p=pe("log"),m=Wt("gap"),{callbackRef:y}=Vb(r,d,h,t?br:c,p,m,i),[g,x]=b.useState(0);ff("deviation",P=>{g!==P&&x(P)});const v=pe("EmptyPlaceholder"),S=pe("ScrollSeekPlaceholder")||QF,T=pe("ListComponent"),E=pe("ItemComponent"),A=pe("GroupComponent"),I=pe("computeItemKey"),O=pe("isSeeking"),R=pe("groupIndices").length>0,j=pe("alignToBottom"),k=pe("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:g!==0?g:j?"auto":0,...k?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&v?b.createElement(v,Ke(v,u)):b.createElement(T,{...Ke(T,u),ref:y,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const M=P.originalIndex,F=I(M+n.firstItemIndex,P.data,u);return O?b.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"?b.createElement(A,{...Ke(A,u),key:F,"data-index":M,"data-known-size":P.size,"data-item-index":P.index,style:ZF},f(P.index,u)):b.createElement(E,{...Ke(E,u),...s0(E,P.data),key:F,"data-index":M,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:JF},R?l(P.index,P.groupIndex,P.data,u):l(P.index,P.data,u))}))}),ej={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Do=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),tj={width:"100%",position:o0(),top:0,zIndex:1};function Ke(e,t){if(typeof e!="string")return{context:t}}function s0(e,t){return{item:typeof e=="string"?void 0:t}}const nj=b.memo(function(){const t=pe("HeaderComponent"),n=Wt("headerHeight"),r=pe("headerFooterTag"),o=hn(b.useMemo(()=>s=>n(Yt(s,"height")),[n])),i=pe("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null}),rj=b.memo(function(){const t=pe("FooterComponent"),n=Wt("footerHeight"),r=pe("headerFooterTag"),o=hn(b.useMemo(()=>s=>n(Yt(s,"height")),[n])),i=pe("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null});function cf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const c=e("scrollContainerState"),l=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),h=n("context"),{scrollerRef:d,scrollByCallback:p,scrollToCallback:m}=Bb(c,u,l,f);return t("scrollTo",m),t("scrollBy",p),b.createElement(l,{ref:d,style:{...ej,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Ke(l,h)},s)})}function uf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const c=e("windowScrollContainerState"),l=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),d=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:g}=Bb(c,u,l,br,d);return dF(()=>(m.current=d||window,()=>{m.current=null}),[m,d]),t("windowScrollTo",g),t("scrollBy",y),b.createElement(l,{style:{position:"relative",...i,...f!==0?{height:f+h}:{}},"data-virtuoso-scroller":!0,...a,...Ke(l,p)},s)})}const oj=({children:e})=>{const t=b.useContext(ma),n=Wt("viewportHeight"),r=Wt("fixedItemHeight"),o=pe("alignToBottom"),i=hn(b.useMemo(()=>fi(n,s=>Yt(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Do(o),ref:i,"data-viewport-type":"element"},e)},ij=({children:e})=>{const t=b.useContext(ma),n=Wt("windowViewportRect"),r=Wt("fixedItemHeight"),o=pe("customScrollParent"),i=af(n,o),s=pe("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Do(s),"data-viewport-type":"window"},e)},sj=({children:e})=>{const t=pe("TopItemListComponent")||"div",n=pe("headerHeight"),r={...tj,marginTop:`${n}px`},o=pe("context");return b.createElement(t,{style:r,...Ke(t,o)},e)},aj=b.memo(function(t){const n=pe("useWindowScroll"),r=pe("topItemsIndexes").length>0,o=pe("customScrollParent"),i=o||n?uj:cj,s=o||n?ij:oj;return b.createElement(i,{...t},r&&b.createElement(sj,null,b.createElement(Zp,{showTopList:!0})),b.createElement(s,null,b.createElement(nj,null),b.createElement(Zp,null),b.createElement(rj,null)))}),{Component:lj,usePublisher:Wt,useEmitterValue:pe,useEmitter:ff}=Zu(XF,{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"}},aj),cj=cf({usePublisher:Wt,useEmitterValue:pe,useEmitter:ff}),uj=uf({usePublisher:Wt,useEmitterValue:pe,useEmitter:ff}),fj=lj,Jp={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},dj={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:em,ceil:tm,floor:Bs,min:Tl,max:ei}=Math;function hj(e){return{...dj,items:e}}function nm(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const i=n===null?null:n[o+e];return{index:o+e,data:i}})}function pj(e,t){return e&&e.column===t.column&&e.row===t.row}function Qi(e,t){return e&&e.width===t.width&&e.height===t.height}const mj=Ce(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:c,footerHeight:l,headerHeight:u},f,h,{propsReady:d,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:g,windowScrollContainerState:x,windowScrollTo:v},S])=>{const T=Q(0),E=Q(0),A=Q(Jp),I=Q({height:0,width:0}),O=Q({height:0,width:0}),R=ge(),j=ge(),k=Q(0),L=Q(null),P=Q({row:0,column:0}),M=ge(),F=ge(),_=Q(!1),W=Q(0),U=Q(!0),D=Q(!1);Oe(K(p,de(W),le(([N,B])=>!!B)),()=>{fe(U,!1),fe(E,0)}),Oe(K(dt(p,U,O,I,W,D),le(([N,B,z,V,,Y])=>N&&!B&&z.height!==0&&V.height!==0&&!Y)),([,,,,N])=>{fe(D,!0),nf(1,()=>{fe(R,N)}),dn(K(r),()=>{fe(n,[0,0]),fe(U,!0)})}),se(K(F,le(N=>N!=null&&N.scrollTop>0),Jt(0)),E),Oe(K(p,de(F),le(([,N])=>N!=null)),([,N])=>{N&&(fe(I,N.viewport),fe(O,N==null?void 0:N.item),fe(P,N.gap),N.scrollTop>0&&(fe(_,!0),dn(K(r,io(1)),B=>{fe(_,!1)}),fe(s,{top:N.scrollTop})))}),se(K(I,ne(({height:N})=>N)),o),se(K(dt(ce(I,Qi),ce(O,Qi),ce(P,(N,B)=>N&&N.column===B.column&&N.row===B.row),ce(r)),ne(([N,B,z,V])=>({viewport:N,item:B,gap:z,scrollTop:V}))),M),se(K(dt(ce(T),t,ce(P,pj),ce(O,Qi),ce(I,Qi),ce(L),ce(E),ce(_),ce(U),ce(W)),le(([,,,,,,,N])=>!N),ne(([N,[B,z],V,Y,ee,H,we,,Ue,je])=>{const{row:Ge,column:ie}=V,{height:me,width:oe}=Y,{width:ye}=ee;if(we===0&&(N===0||ye===0))return Jp;if(oe===0){const Ct=rf(je,N),Qn=Ct===0?Math.max(we-1,0):Ct;return hj(nm(Ct,Qn,H))}const Qe=a0(ye,oe,ie);let ve,ot;Ue?B===0&&z===0&&we>0?(ve=0,ot=we-1):(ve=Qe*Bs((B+Ge)/(me+Ge)),ot=Qe*tm((z+Ge)/(me+Ge))-1,ot=Tl(N-1,ei(ot,Qe-1)),ve=Tl(ot,ei(0,ve))):(ve=0,ot=-1);const Z=nm(ve,ot,H),{top:re,bottom:xe}=rm(ee,V,Y,Z),Ne=tm(N/Qe),vt=Ne*me+(Ne-1)*Ge-xe;return{items:Z,offsetTop:re,offsetBottom:vt,top:re,bottom:xe,itemHeight:me,itemWidth:oe}})),A),se(K(L,le(N=>N!==null),ne(N=>N.length)),T),se(K(dt(I,O,A,P),le(([N,B,{items:z}])=>z.length>0&&B.height!==0&&N.height!==0),ne(([N,B,{items:z},V])=>{const{top:Y,bottom:ee}=rm(N,V,B,z);return[Y,ee]}),$e(gi)),n);const $=Q(!1);se(K(r,de($),ne(([N,B])=>B||N!==0)),$);const q=jt(K(ce(A),le(({items:N})=>N.length>0),de(T,$),le(([{items:N},B,z])=>z&&N[N.length-1].index===B-1),ne(([,N])=>N-1),$e())),J=jt(K(ce(A),le(({items:N})=>N.length>0&&N[0].index===0),Jt(0),$e())),X=jt(K(ce(A),de(_),le(([{items:N},B])=>N.length>0&&!B),ne(([{items:N}])=>({startIndex:N[0].index,endIndex:N[N.length-1].index})),$e(Zb),Mn(0)));se(X,h.scrollSeekRangeChanged),se(K(R,de(I,O,T,P),ne(([N,B,z,V,Y])=>{const ee=Xb(N),{align:H,behavior:we,offset:Ue}=ee;let je=ee.index;je==="LAST"&&(je=V-1),je=ei(0,je,Tl(V-1,je));let Ge=Oc(B,Y,z,je);return H==="end"?Ge=em(Ge-B.height+z.height):H==="center"&&(Ge=em(Ge-B.height/2+z.height/2)),Ue&&(Ge+=Ue),{top:Ge,behavior:we}})),s);const G=Tt(K(A,ne(N=>N.offsetBottom+N.bottom)),0);return se(K(m,ne(N=>({width:N.visibleWidth,height:N.visibleHeight}))),I),{data:L,totalCount:T,viewportDimensions:I,itemDimensions:O,scrollTop:r,scrollHeight:j,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:R,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:v,useWindowScroll:y,customScrollParent:g,windowScrollContainerState:x,deviation:k,scrollContainerState:c,footerHeight:l,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:F,...h,initialTopMostItemIndex:W,gridState:A,totalListHeight:G,...f,startReached:J,endReached:q,rangeChanged:X,stateChanged:M,propsReady:d,stateRestoreInProgress:_,...S}},Be(of,Rt,Di,e0,Xn,sf,qn));function rm(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=Oc(e,t,n,r[0].index),s=Oc(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function Oc(e,t,n,r){const o=a0(e.width,n.width,t.column),i=Bs(r/o),s=i*n.height+ei(0,i-1)*t.row;return s>0?s+t.row:s}function a0(e,t,n){return ei(1,Bs((e+n)/(Bs(t)+n)))}const gj=Ce(()=>{const e=Q(l=>`Item ${l}`),t=Q({}),n=Q(null),r=Q("virtuoso-grid-item"),o=Q("virtuoso-grid-list"),i=Q(lf),s=Q("div"),a=Q(br),c=(l,u=null)=>Tt(K(t,ne(f=>f[l]),$e()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),yj=Ce(([e,t])=>({...e,...t}),Be(mj,gj)),vj=b.memo(function(){const t=He("gridState"),n=He("listClassName"),r=He("itemClassName"),o=He("itemContent"),i=He("computeItemKey"),s=He("isSeeking"),a=Ut("scrollHeight"),c=He("ItemComponent"),l=He("ListComponent"),u=He("ScrollSeekPlaceholder"),f=He("context"),h=Ut("itemDimensions"),d=Ut("gap"),p=He("log"),m=He("stateRestoreInProgress"),y=hn(b.useMemo(()=>g=>{const x=g.parentElement.parentElement.scrollHeight;a(x);const v=g.firstChild;if(v){const{width:S,height:T}=v.getBoundingClientRect();h({width:S,height:T})}d({row:om("row-gap",getComputedStyle(g).rowGap,p),column:om("column-gap",getComputedStyle(g).columnGap,p)})},[a,h,d,p]));return m?null:b.createElement(l,{ref:y,className:n,...Ke(l,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(g=>{const x=i(g.index,g.data,f);return s?b.createElement(u,{key:x,...Ke(u,f),index:g.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(c,{...Ke(c,f),className:r,"data-index":g.index,key:x},o(g.index,g.data,f))}))}),bj=b.memo(function(){const t=He("HeaderComponent"),n=Ut("headerHeight"),r=He("headerFooterTag"),o=hn(b.useMemo(()=>s=>n(Yt(s,"height")),[n])),i=He("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null}),xj=b.memo(function(){const t=He("FooterComponent"),n=Ut("footerHeight"),r=He("headerFooterTag"),o=hn(b.useMemo(()=>s=>n(Yt(s,"height")),[n])),i=He("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null}),wj=({children:e})=>{const t=b.useContext(i0),n=Ut("itemDimensions"),r=Ut("viewportDimensions"),o=hn(b.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:Do(!1),ref:o},e)},Tj=({children:e})=>{const t=b.useContext(i0),n=Ut("windowViewportRect"),r=Ut("itemDimensions"),o=He("customScrollParent"),i=af(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:i,style:Do(!1)},e)},Sj=b.memo(function({...t}){const n=He("useWindowScroll"),r=He("customScrollParent"),o=r||n?Cj:Ej,i=r||n?Tj:wj;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(bj,null),b.createElement(vj,null),b.createElement(xj,null)))}),{Component:AL,usePublisher:Ut,useEmitterValue:He,useEmitter:l0}=Zu(yj,{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"}},Sj),Ej=cf({usePublisher:Ut,useEmitterValue:He,useEmitter:l0}),Cj=uf({usePublisher:Ut,useEmitterValue:He,useEmitter:l0});function om(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 Pj=Ce(()=>{const e=Q(c=>b.createElement("td",null,"Item $",c)),t=Q(null),n=Q(null),r=Q(null),o=Q({}),i=Q(lf),s=Q(br),a=(c,l=null)=>Tt(K(o,ne(u=>u[c]),$e()),l);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,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")}}),Rj=Ce(([e,t])=>({...e,...t}),Be(r0,Pj)),Ij=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),Aj=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),Oj={overflowAnchor:"none"},Dj=b.memo(function(){const t=Ie("listState"),n=Gt("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=Gt("windowScrollContainerState"),s=Gt("scrollContainerState"),a=o||r?i:s,c=Ie("itemContent"),l=Ie("trackItemSizes"),u=Ie("itemSize"),f=Ie("log"),{callbackRef:h,ref:d}=Vb(n,u,l,a,f,void 0,o),[p,m]=b.useState(0);df("deviation",F=>{p!==F&&(d.current.style.marginTop=`${F}px`,m(F))});const y=Ie("EmptyPlaceholder"),g=Ie("ScrollSeekPlaceholder")||Ij,x=Ie("FillerRow")||Aj,v=Ie("TableBodyComponent"),S=Ie("TableRowComponent"),T=Ie("computeItemKey"),E=Ie("isSeeking"),A=Ie("paddingTopAddition"),I=Ie("firstItemIndex"),O=Ie("statefulTotalCount"),R=Ie("context");if(O===0&&y)return b.createElement(y,Ke(y,R));const j=t.offsetTop+A+p,k=t.offsetBottom,L=j>0?b.createElement(x,{height:j,key:"padding-top",context:R}):null,P=k>0?b.createElement(x,{height:k,key:"padding-bottom",context:R}):null,M=t.items.map(F=>{const _=F.originalIndex,W=T(_+I,F.data,R);return E?b.createElement(g,{...Ke(g,R),key:W,index:F.index,height:F.size,type:F.type||"item"}):b.createElement(S,{...Ke(S,R),...s0(S,F.data),key:W,"data-index":_,"data-known-size":F.size,"data-item-index":F.index,style:Oj},c(F.index,F.data,R))});return b.createElement(v,{ref:h,"data-testid":"virtuoso-item-list",...Ke(v,R)},[L,...M,P])}),Mj=({children:e})=>{const t=b.useContext(ma),n=Gt("viewportHeight"),r=Gt("fixedItemHeight"),o=hn(b.useMemo(()=>fi(n,i=>Yt(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Do(!1),ref:o,"data-viewport-type":"element"},e)},kj=({children:e})=>{const t=b.useContext(ma),n=Gt("windowViewportRect"),r=Gt("fixedItemHeight"),o=Ie("customScrollParent"),i=af(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Do(!1),"data-viewport-type":"window"},e)},Fj=b.memo(function(t){const n=Ie("useWindowScroll"),r=Ie("customScrollParent"),o=Gt("fixedHeaderHeight"),i=Gt("fixedFooterHeight"),s=Ie("fixedHeaderContent"),a=Ie("fixedFooterContent"),c=Ie("context"),l=hn(b.useMemo(()=>fi(o,x=>Yt(x,"height")),[o])),u=hn(b.useMemo(()=>fi(i,x=>Yt(x,"height")),[i])),f=r||n?Lj:Nj,h=r||n?kj:Mj,d=Ie("TableComponent"),p=Ie("TableHeadComponent"),m=Ie("TableFooterComponent"),y=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:l,...Ke(p,c)},s()):null,g=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Ke(m,c)},a()):null;return b.createElement(f,{...t},b.createElement(h,null,b.createElement(d,{style:{borderSpacing:0,overflowAnchor:"none"},...Ke(d,c)},[y,b.createElement(Dj,{key:"TableBody"}),g])))}),{Component:jj,usePublisher:Gt,useEmitterValue:Ie,useEmitter:df}=Zu(Rj,{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"}},Fj),Nj=cf({usePublisher:Gt,useEmitterValue:Ie,useEmitter:df}),Lj=uf({usePublisher:Gt,useEmitterValue:Ie,useEmitter:df}),_j=jj,Vj=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},$j={Item:b.forwardRef(function(t,n){return w.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return w.jsx("ul",{...t,ref:n,className:"space-y-3"})})},Bj=e=>{const t=b.useRef(null),n=Vj(t);return w.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[w.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:[w.jsx("header",{className:"border-b border-card-border pb-2"}),w.jsxs("div",{className:"px-8 space-y-2",children:[w.jsx(Ii,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(fj,{height:n,useWindowScroll:!0,data:e.source,components:$j,itemContent:(r,o)=>w.jsx(b.Fragment,{children:w.jsx(Tb,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(Hr,{children:w.jsx(bu,{})})}),w.jsx("div",{})]})};var Wj=Object.defineProperty,im=Object.getOwnPropertySymbols,Hj=Object.prototype.hasOwnProperty,zj=Object.prototype.propertyIsEnumerable,sm=(e,t,n)=>t in e?Wj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uj=(e,t)=>{for(var n in t||(t={}))Hj.call(t,n)&&sm(e,n,t[n]);if(im)for(var n of im(t))zj.call(t,n)&&sm(e,n,t[n]);return e},hf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Gj=(e,t,n,r)=>ga(hf,e,t,n,r),so=e=>typeof e=="object",jn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!so(e)&&!so(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=>jn(e[r],t[r]))},Yj=(e,t)=>(so(e)||Array.isArray(e))&&t?e[t]:e,Kj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ws=e=>/[0-9.]+/.test(e),am=e=>["string","number"].includes(typeof e),lm=e=>e==null||(e==null?void 0:e.length)===0||e==="",cm={eq:jn,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:lm,notEmpty:e=>!lm(e),in:(e,t)=>hf(t,n=>jn(e,n)),notIn:(e,t)=>c0(t,n=>!jn(e,n))},qj=e=>{if(e in cm)return cm[e];throw new Error("Linq - Symbol not found")},Vr=(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},ga=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=qj(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},Xj=(e,t,n,r)=>ga(Vr,e,t,n,r),c0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Qj=(e,t,n,r)=>ga(c0,e,t,n,r),u0=e=>{if(e===null)return null;const t=Uj({},e);return Object.keys(t).forEach(n=>t[n]=so(e[n])?u0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},um=(e,t)=>{if(so(t)){for(let n=0;n<e.length;n++){const r=e[n];if(jn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(jn(t,r))return!0}return!1},Zj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},Jj=e=>Vr(e,(t,n,r)=>so(t)?n===r.findIndex(o=>jn(o,t)):n===r.indexOf(t)),eN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},f0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},tN=(e,t)=>f0(e,n=>n[t]),fm=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},nN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},rN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Ws(e)&&Ws(t)?r.map(s=>Number.parseInt(s)):r},Sl=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ws(e)&&Ws(t)){const o=[],[i,s]=nN(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return rN(e,t,r)},oN=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Sl(r,o,1):Sl(r,i,Number.parseInt(o,10))}return am(e)&&am(t)?Sl(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},El=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},dm=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},iN=(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)},sN=(e,t,n,r)=>ga(iN,e,t,n,r),hm=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Kj(t))},d0=(e=>(e.Asc="asc",e.Desc="desc",e))(d0||{}),aN=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),lN=(e,t)=>e.sort(aN(t)),cN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Vr(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},uN=class Dc{constructor(t=[]){this.array=t}static Range(...t){return oN(...t)}static New(t){return new Dc(t)}Where(t,n,r){return this.array=Xj(this.array,t,n,r),this}Some(t,n,r){return Gj(this.array,t,n,r)}All(t,n,r){return Qj(this.array,t,n,r)}Reverse(){return this.array=dm(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=sN(this.array,t,n,r),this}Distinct(){return this.array=Jj(this.array),this}First(t){return t===void 0?this.array[0]:eN(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?El((n,r)=>n+r,0,this.array):El((n,r)=>n+Yj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return tN(this.array,t)}GroupWith(t){return f0(this.array,t)}Except(t){return Vr(this.array,n=>!um(t,n))}Intersect(t){return Vr(this.array,n=>um(t,n))}OrderBy(t,n){let r;return r=t?hm(this.array,t):this.array.toSorted(),this.array=n==="desc"?dm(r):r,this}Includes(t){return hf(this.array,n=>jn(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 El(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:Vr(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Dc(u0(this.array))}ToObject(t){return Zj(this.array,t)}Sort(t){return Array.isArray(t)?lN(this.array,t):hm(this.array,t)}Unique(t){return cN(this.array,t)}},h0=uN,Mc={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,g)=>{try{Object.keys(y).forEach(g)}catch(x){window.console.log(x)}},n=y=>y==null,r=y=>{const g=typeof y;return g==="string"||g==="number"||g==="boolean"||n(y)},o=(y,g)=>{const x=g.getItem(y);try{return JSON.parse(x)}catch{return x??null}},i=y=>Object.keys(y).reduce((g,x)=>({...g,[x]:o(x,y)}),{}),s=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",c=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,g)=>(y[decodeURIComponent(g[0].trim())]=decodeURIComponent(g[1].trim()),y),{}),l=new Set,u=()=>{const y=c();l.forEach(g=>g(y))},f=[{name:"expires",parse:y=>`expires=${s(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${s(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const g=y.domain??"";return g===""?"":`domain=${y.multiDomain?".":""}${g}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],h={json:c,listener:y=>(l.add(y),()=>l.delete(y)),clearListeners:()=>l.clear(),has:y=>document.cookie.split(";").some(g=>g.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const g=h.json()[y];if(n(g))return null;try{return JSON.parse(decodeURIComponent(g))}catch{return g}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,g,x={})=>{const v=r(g)?g:encodeURIComponent(JSON.stringify(g)),S=f.reduce((T,E)=>{const A=E.parse(x);return A===""?T:T.concat(A)},[`${encodeURIComponent(y)}=${v}`]).join(";");document.cookie=S,u()}},d=y=>{const g=new Set,x=v=>{y().removeItem(v);const S=i(y());g.forEach(T=>T(S))};return{delete:x,listener:v=>(g.add(v),()=>g.delete(v)),clearListeners:()=>g.clear(),json:(v=!1)=>v?i(y()):y(),has:v=>{const S=y().getItem(v);return!n(S)},deleteAll:()=>{t(y(),x),g.forEach(v=>v(y()))},get:v=>o(v,y()),set:(v,S)=>{y().setItem(v,JSON.stringify(S)),g.forEach(T=>T(y()))}}},p=d(()=>window.sessionStorage),m=d(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=d})(Mc);const pf=e=>e.headerLabel??e.thead??e.id,mf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var $r=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))($r||{});const gf=e=>e.type==="number"?e.valueAsNumber:e.value,fN=e=>{let t=[];return e({add:(o,i,s)=>t.push({...s,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},dN={},hN=(e,t=dN)=>{const n=Es()?null:Mc.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Pu({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},i=>{const s=a=>{const c=i.state(),l={...c,...a};return Es()||Mc.LocalStorage.set(`@unamed/table-${c.name}`,l),l};return{set:a=>s(a)}});return{...r,...o,name:e}},kc=(e,t,n,r={})=>{var c;const o=e.id,i=e.type??$r.Text,s=(c=t[i])==null?void 0:c[0].value,a=n[s];return{id:ta(),operation:a,label:pf(e),name:o,type:i,value:"",...r}},yf=()=>{const e=Dt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},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{operationOptions:b.useMemo(()=>({[$r.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[$r.Boolean]:[t.is,t.isNot],[$r.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},pN=e=>{const t=Dt(),{operationOptions:n,operations:r}=yf(),o=()=>{const l=e.cols.at(0);e.set(u=>[...u,kc(l,n,r)])},i=l=>{const u=l.target.dataset.id||"",f=l.target.value;e.set(h=>h.map(d=>{if(u!==d.id)return d;const p=e.cols.find(m=>f===m.id);return kc(p,n,r,{value:""})}))},s=l=>{const u=l.target.dataset.id||"",f=l.target.value;e.set(h=>h.map(d=>d.id===u?{...d,operation:r[f]}:d))},a=l=>{const u=l.currentTarget.dataset.id||"";e.set(f=>f.filter(h=>h.id!==u))},c=l=>{const u=l.target.dataset.id||"",f=gf(l.target);e.set(h=>h.map(d=>d.id===u?{...d,value:f}:d))};return w.jsx(b.Fragment,{children:w.jsx(Ro,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(bP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const u=n[l.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(yr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:i}),w.jsx(yr,{"data-id":l.id,onChange:s,value:l.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(Ii,{"data-id":l.id,onChange:c,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),w.jsx("div",{className:"flex items-center justify-center mt-5",children:w.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:w.jsx(Xr,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},mN=({filter:e,onDelete:t,set:n})=>{const r=Dt(),{operationOptions:o,operations:i}=yf(),s=c=>{const l=c.target.value,u=c.target.dataset.id||"";n(f=>f.map(h=>h.id===u?{...h,operation:i[l]}:h))},a=c=>{const l=c.target.dataset.id||"",u=gf(c.target);n(f=>f.map(h=>h.id===l?{...h,value:u}:h))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(yr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),w.jsx(Ii,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),w.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:w.jsx(Xr,{className:"text-danger",size:14})})]})},gN=({item:e,onPointerDown:t})=>{const n=qr(0);return w.jsxs(Js.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[w.jsx("button",{type:"button",className:"cursor-grab",children:w.jsx(vP,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},yN=e=>{var c;const t=Dt(),n=mf(e.cols),r=iP(),[o,i]=b.useState(((c=e.groups[0])==null?void 0:c.thead)||""),s=l=>{var y;const u=l.target,f=u.value,h=u.options.selectedIndex,d=((y=u.options.item(h))==null?void 0:y.label)||"";i(d);const p=new h0(e.rows).GroupBy(f),m=e.cols.find(g=>g.id===f);e.setGroups(xw(p).map((g,x)=>{const v=p[g];return{...m,groupId:ta(),groupKey:f,index:x,rows:v,groupName:g}}))},a=()=>e.setGroups([]);return w.jsx(b.Fragment,{children:w.jsxs(Ro,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(SP,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[w.jsxs("div",{className:"flex flex-nowrap items-center",children:[w.jsx(yr,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),w.jsx(Hr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx(Xr,{size:16,className:"text-danger"})})]}),e.groups.length>0?w.jsxs("section",{className:"my-4",children:[w.jsx("header",{children:w.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),w.jsx(PC,{children:w.jsx(Js.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(l=>w.jsx(gN,{item:l,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},vN=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),bN=(e,t)=>e.toSorted(vN(t)),p0=(e,t,n)=>({id:ta(),type:n,value:e.id,label:t}),xN=e=>{const t=Dt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const c=e.cols[0];c&&e.set(l=>[...l,p0(c,n.asc.label,n.asc.value)])},i=c=>l=>{const u=l.target.value;e.set(f=>f.map(h=>h.id===c?{...h,value:u}:h))},s=c=>l=>{const u=l.target.value;e.set(f=>f.map(h=>h.id===c?{...h,type:u}:h))},a=c=>{const l=c.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==l))};return w.jsx(b.Fragment,{children:w.jsx(Ro,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Iy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(c=>w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(yr,{options:e.options,value:c.value,onChange:i(c.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(yr,{onChange:s(c.id),value:c.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),w.jsx("button",{className:"mt-4","data-id":c.id,onClick:a,children:w.jsx(Xr,{className:"text-danger",size:14})})]},`sorter-select-${c.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(xu,{size:14})," ",t.tableSortAddButton]})})]})})})},wN=e=>{const t=Dt(),[n,r]=b.useState(()=>{const a=e.sorters.find(c=>c.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const c=a.findIndex(u=>u.value===e.col.id),l=p0(e.col,n,n);return c===-1?[...a,l]:(a[c]=l,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=pf(e.col);return w.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[w.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?w.jsx(dP,{size:14}):null,n==="desc"?w.jsx(fP,{size:14}):null,n==="undefined"?w.jsx(Iy,{size:14}):null]})},TN=e=>w.jsx("header",{className:"min-w-full mb-1",children:w.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[w.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[w.jsx("span",{children:w.jsx(pN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(xN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(yN,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),w.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=>w.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[w.jsxs("span",{children:[w.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),w.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[w.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),w.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=gf(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function SN(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,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const EN=e=>{const t=b.useId(),n=Dt(),r=e.asLink||"button",o=b.useMemo(()=>SN(e.current,e.pages),[e.current,e.pages]),i=e.current<e.pages;return w.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[w.jsx("p",{children:w.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?w.jsxs(b.Fragment,{children:[w.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),w.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:s=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(s.target.value))},children:e.sizes.map(s=>w.jsx("option",{value:s,children:s},`pagination-opt-${s}`))})," "]}):null})}),w.jsx("nav",{children:w.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?w.jsx("li",{children:w.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(s=>s===null?null:w.jsx(b.Fragment,{children:typeof s=="string"?w.jsx("li",{children:"..."}):w.jsx("li",{children:w.jsx(r,{href:s,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${s===e.current?"text-primary border-primary":"border-transparent"}`,children:s})})},`pagination-${s}`)),i?w.jsx("li",{children:w.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},CN={opacity:1},PN={opacity:.75,backgroundColor:"var(--table-border)"},RN={opacity:0,transition:{duration:.4,type:"spring"}},IN=e=>{var f;const t=Dt(),n=e.filters.filter(h=>h.name===e.header.id),o=n.length>0?xP:wP,{operationOptions:i,operations:s}=yf(),a=h=>{const d=h.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==d))},c=e.sorters.find(h=>e.header.id===h.value),l=c!=null&&c.type?c.type===d0.Asc?"ascending":"descending":"none",u=pf(e.header);return w.jsx(Js.Item,{...e.header.thProps,as:"th",layout:!0,exit:RN,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:PN,"aria-sort":l,"aria-busy":e.loading,animate:CN,className:`hidden px-2 py-4 font-medium first:table-cell md:table-cell ${((f=e.header.thProps)==null?void 0:f.className)??""}`,children:w.jsx("span",{className:"flex items-center justify-between",children:w.jsxs("span",{className:"flex items-center gap-1",children:[w.jsx(Ro,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),e.inlineFilter?w.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14}):null]}),title:w.jsxs("span",{className:"font-medium text-lg",children:[t.tableFilterDropdownTitleUnique," ",w.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:w.jsxs("ul",{className:"font-medium",children:[n.map(h=>w.jsx("li",{className:"my-1",children:w.jsx(mN,{onDelete:a,filter:h,set:e.setFilters})},`thead-filter-${h.id}`)),w.jsx("li",{children:w.jsxs("button",{onClick:()=>e.setFilters(h=>h.concat(kc(e.header,i,s))),type:"button",className:"flex items-center gap-1 text-primary",children:[w.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})}),w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter?w.jsx(wN,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})})})},AN=e=>w.jsx(Js.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"border-none bg-table-background text-lg",children:w.jsx(go,{children:e.headers.map(t=>w.jsx(IN,{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}`))})}),m0=b.createContext({}),ON=()=>b.useContext(m0),DN=b.forwardRef((e,t)=>w.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:w.jsx(go,{children:e.children})})),MN=b.forwardRef((e,t)=>w.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${e.className??""}`})),kN=b.forwardRef(({context:e,...t},n)=>{var i;const r=ON(),o={...t==null?void 0:t.style,sticky:vn.number(r.sticky)?`${r.sticky}px`:(i=t==null?void 0:t.style)==null?void 0:i.sticky};return w.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),FN=b.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),jN=b.forwardRef((e,t)=>e.context.loadingMore?w.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:w.jsx("tr",{role:"row",className:"bg-card-background",children:w.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:w.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),NN={TableHead:kN,Table:MN,TableBody:DN,TableRow:FN,TableFoot:jN},LN=[0,0,0,0,0,0,0,0,0,0],_N=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(b.Fragment,{children:r.map((i,s)=>{var f;const a=`${s},${e}`,c=Au(t,i.id),l=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"";return b.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`hidden h-14 border-none px-2 first:table-cell md:table-cell ${u}`},o?w.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}):l?w.jsx(l,{row:t,matrix:a,col:i,rowIndex:e,value:c}):w.jsx(b.Fragment,{children:vn.nil(c)?"":c}))})})},VN=()=>w.jsx(b.Fragment,{}),pm=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:c=!1,setSorters:l,...u})=>{const f=b.useRef(null),[h,d]=b.useState(!1),p=Cc(n),m=Cc(u.loadingMore),y=b.useMemo(()=>{if(u.loading)return LN;if(r)return u.rows;const g=new h0(u.rows);return e.length>0&&e.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:g.Where(x.name,x.operation.symbol,x.value)),s.length===0?g.Select():bN(g.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(f.current===null)return()=>{};const g=f.current,x=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 x.observe(g),()=>x.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg px-1 ${c?"border border-table-border":""}`,children:[w.jsx(_j,{data:y,useWindowScroll:!0,components:NN,totalCount:y.length,itemContent:_N,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?VN:null,fixedHeaderContent:()=>w.jsx(AN,{filters:e,headers:a,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter,loading:!!u.loading,setCols:o,setFilters:i,setSorters:l,sorters:s})}),w.jsx("div",{"aria-hidden":"true",ref:f,className:"h-0.5 w-full"})]}),t!==null?w.jsx(EN,{...t}):null]})},$N=(e,t)=>typeof t=="function"?t(e):t,Zi=(e,t,n)=>e===t||n==null?void 0:n(t),BN=e=>{const t=b.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=b.useMemo(()=>mf(e.cols),[e.cols]),[o,i]=Pu({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const a=c=>l=>{const u=s.state();return{...u,[c]:$N(u[c],l)}};return{cols:a("cols"),filters:a("filters"),groups:a("groups"),sorters:a("sorters")}},{postMiddleware:[(s,a)=>{var c;return console.log("->",s,a),(c=e.set)==null||c.call(e,s),Zi((a==null?void 0:a.filters)??[],s.filters??[],e.setFilters),Zi((a==null?void 0:a.sorters)??[],s.sorters??[],e.setSorters),Zi((a==null?void 0:a.groups)??[],s.groups??[],e.setGroups),Zi((a==null?void 0:a.cols)??[],s.cols??[],e.setCols),s}]});return w.jsx(m0.Provider,{value:t,children:w.jsxs("div",{className:"relative min-w-full",children:[n?w.jsx(TN,{cols:o.cols,filters:o.filters,groups:o.groups,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,options:r,pagination:e.pagination??null,rows:e.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters}):null,o.groups.length===0?w.jsx(pm,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,groups:o.groups,index:0,optionCols:r,options:r,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters,pagination:e.pagination??null}):w.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((s,a)=>w.jsx(ft.div,{className:"min-w-full",children:w.jsx(pm,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,pagination:null,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,group:s,groups:o.groups,index:a,optionCols:r,options:r,rows:s.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters})},`group-${s.groupId}`))})]})})};var WN=String.prototype.replace,HN=/%20/g,Cl={RFC1738:"RFC1738",RFC3986:"RFC3986"},vf={default:Cl.RFC3986,formatters:{RFC1738:function(e){return WN.call(e,HN,"+")},RFC3986:function(e){return String(e)}},RFC1738:Cl.RFC1738,RFC3986:Cl.RFC3986},zN=vf,Pl=Object.prototype.hasOwnProperty,sr=Array.isArray,Xt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),UN=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(sr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},g0=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},GN=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(sr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Pl.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 sr(t)&&!sr(n)&&(o=g0(t,r)),sr(t)&&sr(n)?(n.forEach(function(i,s){if(Pl.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Pl.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},YN=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},KN=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}},Rl=1024,qN=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",c=0;c<s.length;c+=Rl){for(var l=s.length>=Rl?s.slice(c,c+Rl):s,u=[],f=0;f<l.length;++f){var h=l.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===zN.RFC1738&&(h===40||h===41)){u[u.length]=l.charAt(f);continue}if(h<128){u[u.length]=Xt[h];continue}if(h<2048){u[u.length]=Xt[192|h>>6]+Xt[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=Xt[224|h>>12]+Xt[128|h>>6&63]+Xt[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|l.charCodeAt(f)&1023),u[u.length]=Xt[240|h>>18]+Xt[128|h>>12&63]+Xt[128|h>>6&63]+Xt[128|h&63]}a+=u.join("")}return a},XN=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),c=0;c<a.length;++c){var l=a[c],u=s[l];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:l}),r.push(u))}return UN(n),t},QN=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ZN=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},JN=function(t,n){return[].concat(t,n)},eL=function(t,n){if(sr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},y0={arrayToObject:g0,assign:YN,combine:JN,compact:XN,decode:KN,encode:qN,isBuffer:ZN,isRegExp:QN,maybeMap:eL,merge:GN},v0=mw,cs=y0,ti=vf,tL=Object.prototype.hasOwnProperty,b0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Qt=Array.isArray,nL=Array.prototype.push,x0=function(e,t){nL.apply(e,Qt(t)?t:[t])},rL=Date.prototype.toISOString,mm=ti.default,it={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:cs.encode,encodeValuesOnly:!1,format:mm,formatter:ti.formatters[mm],indices:!1,serializeDate:function(t){return rL.call(t)},skipNulls:!1,strictNullHandling:!1},oL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Il={},iL=function e(t,n,r,o,i,s,a,c,l,u,f,h,d,p,m,y,g,x){for(var v=t,S=x,T=0,E=!1;(S=S.get(Il))!==void 0&&!E;){var A=S.get(t);if(T+=1,typeof A<"u"){if(A===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Il)>"u"&&(T=0)}if(typeof u=="function"?v=u(n,v):v instanceof Date?v=d(v):r==="comma"&&Qt(v)&&(v=cs.maybeMap(v,function(D){return D instanceof Date?d(D):D})),v===null){if(s)return l&&!y?l(n,it.encoder,g,"key",p):n;v=""}if(oL(v)||cs.isBuffer(v)){if(l){var I=y?n:l(n,it.encoder,g,"key",p);return[m(I)+"="+m(l(v,it.encoder,g,"value",p))]}return[m(n)+"="+m(String(v))]}var O=[];if(typeof v>"u")return O;var R;if(r==="comma"&&Qt(v))y&&l&&(v=cs.maybeMap(v,l)),R=[{value:v.length>0?v.join(",")||null:void 0}];else if(Qt(u))R=u;else{var j=Object.keys(v);R=f?j.sort(f):j}var k=c?n.replace(/\./g,"%2E"):n,L=o&&Qt(v)&&v.length===1?k+"[]":k;if(i&&Qt(v)&&v.length===0)return L+"[]";for(var P=0;P<R.length;++P){var M=R[P],F=typeof M=="object"&&typeof M.value<"u"?M.value:v[M];if(!(a&&F===null)){var _=h&&c?M.replace(/\./g,"%2E"):M,W=Qt(v)?typeof r=="function"?r(L,_):L:L+(h?"."+_:"["+_+"]");x.set(t,T);var U=v0();U.set(Il,x),x0(O,e(F,W,r,o,i,s,a,c,r==="comma"&&y&&Qt(v)?null:l,u,f,h,d,p,m,y,g,U))}}return O},sL=function(t){if(!t)return it;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||it.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=ti.default;if(typeof t.format<"u"){if(!tL.call(ti.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ti.formatters[r],i=it.filter;(typeof t.filter=="function"||Qt(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in b0?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=it.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:it.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:it.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:it.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:it.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?it.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:it.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:it.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:it.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:it.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:it.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:it.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:it.strictNullHandling}},aL=function(e,t){var n=e,r=sL(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Qt(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=b0[r.arrayFormat],c=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var l=v0(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||x0(s,iL(n[f],f,a,c,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,l))}var h=s.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:""},ao=y0,Fc=Object.prototype.hasOwnProperty,lL=Array.isArray,Ze={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ao.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},cL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},w0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},uL="utf8=%26%2310003%3B",fL="utf8=%E2%9C%93",dL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,c,l=n.charset;if(n.charsetSentinel)for(c=0;c<s.length;++c)s[c].indexOf("utf8=")===0&&(s[c]===fL?l="utf-8":s[c]===uL&&(l="iso-8859-1"),a=c,c=s.length);for(c=0;c<s.length;++c)if(c!==a){var u=s[c],f=u.indexOf("]="),h=f===-1?u.indexOf("="):f+1,d,p;h===-1?(d=n.decoder(u,Ze.decoder,l,"key"),p=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,h),Ze.decoder,l,"key"),p=ao.maybeMap(w0(u.slice(h+1),n),function(y){return n.decoder(y,Ze.decoder,l,"value")})),p&&n.interpretNumericEntities&&l==="iso-8859-1"&&(p=cL(p)),u.indexOf("[]=")>-1&&(p=lL(p)?[p]:p);var m=Fc.call(r,d);m&&n.duplicates==="combine"?r[d]=ao.combine(r[d],p):(!m||n.duplicates==="last")&&(r[d]=p)}return r},hL=function(e,t,n,r){for(var o=r?t:w0(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,l=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,u=parseInt(l,10);!n.parseArrays&&l===""?s={0:o}:!isNaN(u)&&a!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):l!=="__proto__"&&(s[l]=o)}o=s}return o},pL=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=r.depth>0&&s.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!r.plainObjects&&Fc.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var f=0;r.depth>0&&(c=a.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Fc.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),hL(u,n,r,o)}},mL=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"||ao.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}},gL=function(e,t){var n=mL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?dL(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],c=pL(a,r[a],n,typeof e=="string");o=ao.merge(o,c,n)}return n.allowSparse===!0?o:ao.compact(o)},yL=aL,vL=gL,bL=vf,xL={formats:bL,parse:vL,stringify:yL};const wL=(e,t)=>e.localeCompare(t),TL={sort:wL,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},T0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return xL.parse(n.toString(),TL)},S0=e=>e.replace("[",".").replace("]","").split("."),Bo=(e,t)=>S0(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),_o=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),SL=(e,t)=>{const[n,r]=b.useState(null),o=b.useRef({}),[i,s]=b.useState({}),a=(p,m)=>{const y=Bo(p,e);return{...m,name:p,id:p,form:t,required:!y.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:y})}}},c=(p,m)=>{const y=Bo(p,e);return{...m,name:p,id:p,form:t,required:!y.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:y})}}},l=(p,m)=>{const y=Bo(p,e);return{...m,name:p,id:p,form:t,required:!y.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:y})}}},u=(p,m)=>{const y=Bo(p,e);return{...m,name:p,id:p,required:!y.isOptional(),form:t,type:y._def.typeName==="ZodNumber"?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:y})}}};b.useEffect(()=>{const p=Object.values(o.current).map(y=>{const g=y.element.dataset.origin?document.querySelector(`[data-target="${y.element.name}"]`):y.element,x=y.schema.safeParse(_o(g)),v=T=>{var O;const E=g.dataset.target||g.name;if(!E)return;const A=_o(T.target)||(T.relatedTarget?_o(T.relatedTarget):""),I=y.schema.safeParse(A);if(I.success)return g.setCustomValidity(""),s(R=>Da(R,E,I.data)),r(R=>{const{[E]:j,...k}=R||{};return k===null||vn.empty(k)?null:k});if(g.required){const R=((O=I.error.issues[0])==null?void 0:O.message)||"";g.setCustomValidity(R),r(j=>({...j,[E]:R}))}},S=g.getAttribute("data-trigger")||"blur";return g.addEventListener(S,v),g.tagName==="SELECT"&&g.addEventListener("change",v),{input:y,hasInitialError:g.required?!x.success:!1,unsubscribe:()=>{g.removeEventListener(S,v),g.tagName==="SELECT"&&g.addEventListener("change",v)}}});return p.some(y=>y.hasInitialError)&&r(y=>y===null?{}:y),()=>p.forEach(y=>y.unsubscribe())});const f=b.useCallback(p=>m=>{const y=m.currentTarget,g=Object.values(o.current).reduce((v,S)=>{var O;const T=S.element,E=S.schema.safeParse(_o(T));if(T.dataset.ignore==="ignore"||E.success)return v;const A=(O=E.error.issues[0])==null?void 0:O.message;T.setAttribute("data-initialized","true");const I=T.dataset.name||T.name||"";return{...v,[I]:A}},{}),x=vn.empty(g)?null:g;r(x),p==null||p({form:y,errors:x||{}})},[]),h=b.useCallback(p=>m=>{m.preventDefault();const y=m.currentTarget;let g=T0(y);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(y.elements)).forEach(S=>{if(S.tagName==="SELECT"){const T=S;g=Da(g,T.name,T.value)}if(S.tagName==="INPUT"){const T=S;g=Da(g,T.name,_o(T))}});const v=e.safeParse(i);return v.success?p({form:y,json:g,data:v.data,event:m,reset:()=>Ec(y),success:!0,errors:[]}):p({form:y,json:g,event:m,data:g,success:!1,reset:()=>Ec(y),errors:v.error.issues.map(S=>({message:S.message,path:S.path.map(T=>String(T))}))})},[t]);return{state:i,input:u,datepicker:a,checkbox:l,select:c,onSubmit:h,errors:n,onInvalid:f,disabled:n!==null,name:t,get:p=>Au(i,p)||""}},EL=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=RP;exports.Autocomplete=LM;exports.Button=Hr;exports.Calendar=fv;exports.Card=dv;exports.Checkbox=Tb;exports.ColType=$r;exports.Collapse=My;exports.ComponentsProvider=mA;exports.DatePicker=VM;exports.Dropdown=Ro;exports.Expand=bM;exports.FileUpload=Qk;exports.Form=Jk;exports.Input=Ii;exports.InputFeedback=xb;exports.InputField=ua;exports.Menu=TM;exports.MenuItem=wM;exports.Modal=DM;exports.Notifications=vO;exports.Option=wb;exports.Polymorph=ho;exports.Radiobox=eF;exports.RenderOnView=o1;exports.Select=yr;exports.Stats=bO;exports.Switch=tF;exports.Tab=TO;exports.Table=BN;exports.Tabs=xO;exports.Tag=a1;exports.TaskList=nF;exports.Toolbar=MM;exports.Tooltip=bb;exports.TransferList=Bj;exports.convertPath=S0;exports.createColumns=fN;exports.createDesignTokens=iv;exports.createOptionCols=mf;exports.createStyles=cA;exports.createTheme=uA;exports.css=ke;exports.defaultDarkTheme=hA;exports.defaultLightTheme=pA;exports.dispatchInput=Vm;exports.formReset=Ec;exports.formToJson=T0;exports.getSchemaShape=Bo;exports.initializeInputDataset=Hs;exports.isReactComponent=e1;exports.isReactFC=t1;exports.isSsr=Es;exports.mergeRefs=Hc;exports.parsers=Ru;exports.path=Au;exports.reduceTokens=Xo;exports.safeRegex=oc;exports.splitInto=cv;exports.useForm=SL;exports.useNotification=gO;exports.usePrevious=EL;exports.useReactive=jv;exports.useTablePreferences=hN;exports.useTranslations=Dt;exports.uuid=ta;
|
|
195
|
+
*/var dl,Sp;function YM(){if(Sp)return dl;Sp=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return dl=o()?Object.assign:function(i,s){for(var a,c=r(i),l,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){l=e(a);for(var h=0;h<l.length;h++)n.call(a,l[h])&&(c[l[h]]=a[l[h]])}}return c},dl}var hl,Ep;function qu(){if(Ep)return hl;Ep=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hl=e,hl}var pl,Cp;function Eb(){return Cp||(Cp=1,pl=Function.call.bind(Object.prototype.hasOwnProperty)),pl}var ml,Pp;function KM(){if(Pp)return ml;Pp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=qu(),n={},r=Eb();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,c,l){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var h=Error((c||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[u](s,u,c,a,null,t)}catch(p){f=p}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=l?l():"";e("Failed "+a+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ml=o,ml}var gl,Rp;function qM(){if(Rp)return gl;Rp=1;var e=Sb(),t=YM(),n=qu(),r=Eb(),o=KM(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return gl=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(M){var V=M&&(l&&M[l]||M[u]);if(typeof V=="function")return V}var h="<<anonymous>>",d={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:x(),arrayOf:y,element:T(),elementType:S(),instanceOf:E,node:I(),objectOf:A,oneOf:R,oneOfType:k,shape:D,exact:N};function p(M,V){return M===V?M!==0||1/M===1/V:M!==M&&V!==V}function m(M,V){this.message=M,this.data=V&&typeof V=="object"?V:{},this.stack=""}m.prototype=Error.prototype;function g(M){if(process.env.NODE_ENV!=="production")var V={},q=0;function J(G,L,B,z,$,Y,ee){if(z=z||h,Y=Y||B,ee!==n){if(c){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=z+":"+B;!V[we]&&q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[we]=!0,q++)}}return L[B]==null?G?L[B]===null?new m("The "+$+" `"+Y+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+$+" `"+Y+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:M(L,B,z,$,Y)}var X=J.bind(null,!1);return X.isRequired=J.bind(null,!0),X}function v(M){function V(q,J,X,G,L,B){var z=q[J],$=F(z);if($!==M){var Y=_(z);return new m("Invalid "+G+" `"+L+"` of type "+("`"+Y+"` supplied to `"+X+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return g(V)}function x(){return g(s)}function y(M){function V(q,J,X,G,L){if(typeof M!="function")return new m("Property `"+L+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var B=q[J];if(!Array.isArray(B)){var z=F(B);return new m("Invalid "+G+" `"+L+"` of type "+("`"+z+"` supplied to `"+X+"`, expected an array."))}for(var $=0;$<B.length;$++){var Y=M(B,$,X,G,L+"["+$+"]",n);if(Y instanceof Error)return Y}return null}return g(V)}function T(){function M(V,q,J,X,G){var L=V[q];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(M)}function S(){function M(V,q,J,X,G){var L=V[q];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(M)}function E(M){function V(q,J,X,G,L){if(!(q[J]instanceof M)){var B=M.name||h,z=U(q[J]);return new m("Invalid "+G+" `"+L+"` of type "+("`"+z+"` supplied to `"+X+"`, expected ")+("instance of `"+B+"`."))}return null}return g(V)}function R(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function V(q,J,X,G,L){for(var B=q[J],z=0;z<M.length;z++)if(p(B,M[z]))return null;var $=JSON.stringify(M,function(ee,H){var we=_(H);return we==="symbol"?String(H):H});return new m("Invalid "+G+" `"+L+"` of value `"+String(B)+"` "+("supplied to `"+X+"`, expected one of "+$+"."))}return g(V)}function A(M){function V(q,J,X,G,L){if(typeof M!="function")return new m("Property `"+L+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var B=q[J],z=F(B);if(z!=="object")return new m("Invalid "+G+" `"+L+"` of type "+("`"+z+"` supplied to `"+X+"`, expected an object."));for(var $ in B)if(r(B,$)){var Y=M(B,$,X,G,L+"."+$,n);if(Y instanceof Error)return Y}return null}return g(V)}function k(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var V=0;V<M.length;V++){var q=M[V];if(typeof q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(q)+" at index "+V+"."),s}function J(X,G,L,B,z){for(var $=[],Y=0;Y<M.length;Y++){var ee=M[Y],H=ee(X,G,L,B,z,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&$.push(H.data.expectedType)}var we=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new m("Invalid "+B+" `"+z+"` supplied to "+("`"+L+"`"+we+"."))}return g(J)}function I(){function M(V,q,J,X,G){return P(V[q])?null:new m("Invalid "+X+" `"+G+"` supplied to "+("`"+J+"`, expected a ReactNode."))}return g(M)}function j(M,V,q,J,X){return new m((M||"React class")+": "+V+" type `"+q+"."+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function D(M){function V(q,J,X,G,L){var B=q[J],z=F(B);if(z!=="object")return new m("Invalid "+G+" `"+L+"` of type `"+z+"` "+("supplied to `"+X+"`, expected `object`."));for(var $ in M){var Y=M[$];if(typeof Y!="function")return j(X,G,L,$,_(Y));var ee=Y(B,$,X,G,L+"."+$,n);if(ee)return ee}return null}return g(V)}function N(M){function V(q,J,X,G,L){var B=q[J],z=F(B);if(z!=="object")return new m("Invalid "+G+" `"+L+"` of type `"+z+"` "+("supplied to `"+X+"`, expected `object`."));var $=t({},q[J],M);for(var Y in $){var ee=M[Y];if(r(M,Y)&&typeof ee!="function")return j(X,G,L,Y,_(ee));if(!ee)return new m("Invalid "+G+" `"+L+"` key `"+Y+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(q[J],null," ")+`
|
|
196
|
+
Valid keys: `+JSON.stringify(Object.keys(M),null," "));var H=ee(B,Y,X,G,L+"."+Y,n);if(H)return H}return null}return g(V)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||a(M))return!0;var V=f(M);if(V){var q=V.call(M),J;if(V!==M.entries){for(;!(J=q.next()).done;)if(!P(J.value))return!1}else for(;!(J=q.next()).done;){var X=J.value;if(X&&!P(X[1]))return!1}}else return!1;return!0;default:return!1}}function O(M,V){return M==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function F(M){var V=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":O(V,M)?"symbol":V}function _(M){if(typeof M>"u"||M===null)return""+M;var V=F(M);if(V==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return V}function W(M){var V=_(M);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function U(M){return!M.constructor||!M.constructor.name?h:M.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},gl}var yl,Ip;function XM(){if(Ip)return yl;Ip=1;var e=qu();function t(){}function n(){}return n.resetWarningCache=t,yl=function(){function r(s,a,c,l,u,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yl}if(process.env.NODE_ENV!=="production"){var QM=Sb(),ZM=!0;vc.exports=qM()(QM.isElement,ZM)}else vc.exports=XM()();var JM=vc.exports;const Me=A0(JM);function Io(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(f){s(f)}}function c(u){try{l(r.throw(u))}catch(f){s(f)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(e,t||[])).next())})}function Ao(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[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,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Op(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var ek=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 Ai(e,t){var n=tk(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 tk(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=ek.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var nk=[".DS_Store","Thumbs.db"];function rk(e){return Io(this,void 0,void 0,function(){return Ao(this,function(t){return js(e)&&ok(e.dataTransfer)?[2,lk(e.dataTransfer,e.type)]:ik(e)?[2,sk(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ak(e)]:[2,[]]})})}function ok(e){return js(e)}function ik(e){return js(e)&&js(e.target)}function js(e){return typeof e=="object"&&e!==null}function sk(e){return bc(e.target.files).map(function(t){return Ai(t)})}function ak(e){return Io(this,void 0,void 0,function(){var t;return Ao(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 Ai(r)})]}})})}function lk(e,t){return Io(this,void 0,void 0,function(){var n,r;return Ao(this,function(o){switch(o.label){case 0:return e.items?(n=bc(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(ck))]):[3,2];case 1:return r=o.sent(),[2,Dp(Cb(r))];case 2:return[2,Dp(bc(e.files).map(function(i){return Ai(i)}))]}})})}function Dp(e){return e.filter(function(t){return nk.indexOf(t.name)===-1})}function bc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function ck(e){if(typeof e.webkitGetAsEntry!="function")return Mp(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Pb(t):Mp(e)}function Cb(e){return e.reduce(function(t,n){return Op(Op([],Ap(t),!1),Ap(Array.isArray(n)?Cb(n):[n]),!1)},[])}function Mp(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Ai(t);return Promise.resolve(n)}function uk(e){return Io(this,void 0,void 0,function(){return Ao(this,function(t){return[2,e.isDirectory?Pb(e):fk(e)]})})}function Pb(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return Io(s,void 0,void 0,function(){var c,l,u;return Ao(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return c=f.sent(),n(c),[3,4];case 3:return l=f.sent(),r(l),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(uk)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function fk(e){return Io(this,void 0,void 0,function(){return Ao(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=Ai(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var dk=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function kp(e){return mk(e)||pk(e)||Ib(e)||hk()}function hk(){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 pk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mk(e){if(Array.isArray(e))return xc(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){Rb(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 Rb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ui(e,t){return vk(e)||yk(e,t)||Ib(e,t)||gk()}function gk(){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 Ib(e,t){if(e){if(typeof e=="string")return xc(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 xc(e,t)}}function xc(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 yk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function vk(e){if(Array.isArray(e))return e}var bk="file-invalid-type",xk="file-too-large",wk="file-too-small",Tk="too-many-files",Sk=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:bk,message:"File type must be ".concat(n)}},Np=function(t){return{code:xk,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Lp=function(t){return{code:wk,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ek={code:Tk,message:"Too many files"};function Ab(e,t){var n=e.type==="application/x-moz-file"||dk(e,t);return[n,n?null:Sk(t)]}function Ob(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 Ck(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(c){var l=Ab(c,n),u=ui(l,1),f=u[0],h=Ob(c,r,o),d=ui(h,1),p=d[0],m=a?a(c):null;return f&&p&&!m})}function Ns(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function qi(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 Pk(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Rk(e){return e.indexOf("Edge/")!==-1}function Ik(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Pk(e)||Rk(e)}function qt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!Ns(r)&&a&&a.apply(void 0,[r].concat(i)),Ns(r)})}}function Ak(){return"showOpenFilePicker"in window}function Ok(e){if(ir(e)){var t=Object.entries(e).filter(function(n){var r=ui(n,2),o=r[0],i=r[1],s=!0;return Db(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(Mb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=ui(r,2),i=o[0],s=o[1];return jp(jp({},n),{},Rb({},i,s))},{});return[{description:"Files",accept:t}]}return e}function Dk(e){if(ir(e))return Object.entries(e).reduce(function(t,n){var r=ui(n,2),o=r[0],i=r[1];return[].concat(kp(t),[o],kp(i))},[]).filter(function(t){return Db(t)||Mb(t)}).join(",")}function Mk(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function kk(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Db(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Mb(e){return/^.*\.[\w]+$/.test(e)}var Fk=["children"],jk=["open"],Nk=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Lk=["refKey","onChange","onClick"];function _k(e){return Bk(e)||$k(e)||kb(e)||Vk()}function Vk(){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 $k(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bk(e){if(Array.isArray(e))return wc(e)}function vl(e,t){return zk(e)||Hk(e,t)||kb(e,t)||Wk()}function Wk(){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 kb(e,t){if(e){if(typeof e=="string")return wc(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 wc(e,t)}}function wc(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 Hk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function zk(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 We(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){Tc(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 Tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ls(e,t){if(e==null)return{};var n=Uk(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Uk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Xu=b.forwardRef(function(e,t){var n=e.children,r=Ls(e,Fk),o=jb(r),i=o.open,s=Ls(o,jk);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(We(We({},s),{},{open:i})))});Xu.displayName="Dropzone";var Fb={disabled:!1,getFilesFromEvent:rk,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};Xu.defaultProps=Fb;Xu.propTypes={children:Me.func,accept:Me.objectOf(Me.arrayOf(Me.string)),multiple:Me.bool,preventDropOnDocument:Me.bool,noClick:Me.bool,noKeyboard:Me.bool,noDrag:Me.bool,noDragEventsBubbling:Me.bool,minSize:Me.number,maxSize:Me.number,maxFiles:Me.number,disabled:Me.bool,getFilesFromEvent:Me.func,onFileDialogCancel:Me.func,onFileDialogOpen:Me.func,useFsAccessApi:Me.bool,autoFocus:Me.bool,onDragEnter:Me.func,onDragLeave:Me.func,onDragOver:Me.func,onDrop:Me.func,onDropAccepted:Me.func,onDropRejected:Me.func,onError:Me.func,validator:Me.func};var Sc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function jb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=We(We({},Fb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,h=t.onDrop,d=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,x=t.autoFocus,y=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,R=t.noDragEventsBubbling,A=t.onError,k=t.validator,I=b.useMemo(function(){return Dk(n)},[n]),j=b.useMemo(function(){return Ok(n)},[n]),D=b.useMemo(function(){return typeof g=="function"?g:$p},[g]),N=b.useMemo(function(){return typeof m=="function"?m:$p},[m]),P=b.useRef(null),O=b.useRef(null),F=b.useReducer(Gk,Sc),_=vl(F,2),W=_[0],U=_[1],M=W.isFocused,V=W.isFileDialogActive,q=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&Ak()),J=function(){!q.current&&V&&setTimeout(function(){if(O.current){var re=O.current.files;re.length||(U({type:"closeDialog"}),N())}},300)};b.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[O,V,N,q]);var X=b.useRef([]),G=function(re){P.current&&P.current.contains(re.target)||(re.preventDefault(),X.current=[])};b.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]),b.useEffect(function(){return!r&&x&&P.current&&P.current.focus(),function(){}},[P,x,r]);var L=b.useCallback(function(Z){A?A(Z):console.error(Z)},[A]),B=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[].concat(_k(X.current),[Z.target]),qi(Z)&&Promise.resolve(o(Z)).then(function(re){if(!(Ns(Z)&&!R)){var xe=re.length,Ne=xe>0&&Ck({files:re,accept:I,minSize:s,maxSize:i,multiple:a,maxFiles:c,validator:k}),ht=xe>0&&!Ne;U({isDragAccept:Ne,isDragReject:ht,isDragActive:!0,type:"setDraggedFiles"}),l&&l(Z)}}).catch(function(re){return L(re)})},[o,l,L,R,I,s,i,a,c,k]),z=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=qi(Z);if(re&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return re&&f&&f(Z),!1},[f,R]),$=b.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}),qi(Z)&&u&&u(Z))},[P,u,R]),Y=b.useCallback(function(Z,re){var xe=[],Ne=[];Z.forEach(function(ht){var vt=Ab(ht,I),Ct=vl(vt,2),Qn=Ct[0],wr=Ct[1],Tr=Ob(ht,s,i),ki=vl(Tr,2),ya=ki[0],va=ki[1],ba=k?k(ht):null;if(Qn&&ya&&!ba)xe.push(ht);else{var xa=[wr,va];ba&&(xa=xa.concat(ba)),Ne.push({file:ht,errors:xa.filter(function(E0){return E0})})}}),(!a&&xe.length>1||a&&c>=1&&xe.length>c)&&(xe.forEach(function(ht){Ne.push({file:ht,errors:[Ek]})}),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,I,s,i,c,h,d,p,k]),ee=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[],qi(Z)&&Promise.resolve(o(Z)).then(function(re){Ns(Z)&&!R||Y(re,Z)}).catch(function(re){return L(re)}),U({type:"reset"})},[o,Y,L,R]),H=b.useCallback(function(){if(q.current){U({type:"openDialog"}),D();var Z={multiple:a,types:j};window.showOpenFilePicker(Z).then(function(re){return o(re)}).then(function(re){Y(re,null),U({type:"closeDialog"})}).catch(function(re){Mk(re)?(N(re),U({type:"closeDialog"})):kk(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"}),D(),O.current.value=null,O.current.click())},[U,D,N,v,Y,L,j,a]),we=b.useCallback(function(Z){!P.current||!P.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),H())},[P,H]),Ue=b.useCallback(function(){U({type:"focus"})},[]),je=b.useCallback(function(){U({type:"blur"})},[]),Ge=b.useCallback(function(){T||(Ik()?setTimeout(H,0):H())},[T,H]),ie=function(re){return r?null:re},me=function(re){return S?null:ie(re)},oe=function(re){return E?null:ie(re)},ye=function(re){R&&re.stopPropagation()},Qe=b.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,Ct=Z.onBlur,Qn=Z.onClick,wr=Z.onDragEnter,Tr=Z.onDragOver,ki=Z.onDragLeave,ya=Z.onDrop,va=Ls(Z,Nk);return We(We(Tc({onKeyDown:me(qt(ht,we)),onFocus:me(qt(vt,Ue)),onBlur:me(qt(Ct,je)),onClick:ie(qt(Qn,Ge)),onDragEnter:oe(qt(wr,B)),onDragOver:oe(qt(Tr,z)),onDragLeave:oe(qt(ki,$)),onDrop:oe(qt(ya,ee)),role:typeof Ne=="string"&&Ne!==""?Ne:"presentation"},xe,P),!r&&!S?{tabIndex:0}:{}),va)}},[P,we,Ue,je,Ge,B,z,$,ee,S,E,r]),ve=b.useCallback(function(Z){Z.stopPropagation()},[]),ot=b.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=Ls(Z,Lk),Ct=Tc({accept:I,multiple:a,type:"file",style:{display:"none"},onChange:ie(qt(Ne,ee)),onClick:ie(qt(ht,ve)),tabIndex:-1},xe,O);return We(We({},Ct),vt)}},[O,n,a,ee,r]);return We(We({},W),{},{isFocused:M&&!r,getRootProps:Qe,getInputProps:ot,rootRef:P,inputRef:O,open:ie(H)})}function Gk(e,t){switch(t.type){case"focus":return We(We({},e),{},{isFocused:!0});case"blur":return We(We({},e),{},{isFocused:!1});case"openDialog":return We(We({},Sc),{},{isFileDialogActive:!0});case"closeDialog":return We(We({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return We(We({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return We(We({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return We({},Sc);default:return e}}function $p(){}const Yk={isImage:e=>e.type.includes("image")},Kk=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(Yk.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"?w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[w.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),w.jsxs("div",{className:"flex flex-col",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Hr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Xr,{})})]}):w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[w.jsx(yP,{size:48}),w.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Hr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Xr,{className:"text-danger"})})]})},qk=e=>w.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>w.jsx(Kk,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),Xk=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(qk,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(b.Fragment,{children:e.idle}),Qk=w.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[w.jsx(EP,{size:64}),w.jsxs("p",{children:["You can drag your files or"," ",w.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),Zk=({idle:e=Qk,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:c,isDragActive:l}=jb({onDrop:s});return w.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[w.jsx("input",{...c(r),name:r.name,id:r.name}),w.jsx(Xk,{onDeleteFile:t,isDragActive:l,idle:e,files:r.files??o})]})},Jk=["INPUT","SELECT"],Ec=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{Jk.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},eF=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return w.jsx("form",{...e,onSubmit:t})},tF=({children:e,className:t="",size:n,...r})=>w.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[w.jsx("input",{...r,type:"radio",className:ke("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),yr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:c,container:l,hideLeft:u=!1,right:f,left:h,error:d,...p},m)=>{const g=Dt(),v=b.useRef(null),x=p.id??p.name;b.useImperativeHandle(m,()=>v.current),b.useEffect(()=>{if(v.current===null)return;const T=v.current,S=Hs(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 w.jsx(ua,{container:l,error:d,feedback:o,hideLeft:u,left:h,info:n,optionalText:c,rightLabel:a,interactive:s,form:p.form,id:p.name||p.id,name:p.name,labelClassName:i,title:p.title,placeholder:p.placeholder,required:e,right:w.jsx("label",{htmlFor:x,children:w.jsxs("button",{onClick:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(Oy,{size:20}),w.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:x,name:x,value:p.value,required:e,ref:Hc(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:[w.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>w.jsx("option",{...T,children:T.label??T.value},`${x}-select-option-${T.value}`))]})})}),Cc=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},nF=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),c=s,l=b.useRef(null),u=Cc(r.onChange);b.useImperativeHandle(o,()=>l.current),b.useEffect(()=>{if(l.current!==null&&u.current){const h=d=>{d.target.checked=!d.target.checked,u.current&&u.current(d)};return l.current.addEventListener("change",h),()=>{var d;return(d=l.current)==null?void 0:d.removeEventListener("change",h)}}},[]);const f=()=>{var d,p;const h=!((d=l.current)!=null&&d.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),l.current!==null&&(l.current.checked=h,l.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:ke("flex flex-wrap items-center",t),children:[w.jsx("input",{...r,checked:c,"data-checked":c,"data-trigger":"change",hidden:!0,id:r.id||i,onChange:h=>a(h.target.checked),ref:l,type:"checkbox"}),w.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${i}-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:w.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),w.jsx("label",{htmlFor:r.id||i,className:"ml-3 inline-block text-sm",id:`${i}-label`,children:w.jsx("span",{className:"font-medium text-foreground",children:e})}),w.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),rF=e=>{const[t,n]=nP();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input")),c=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),l=a.indexOf(s);c&&l!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:aP(.075,{from:l})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,ref:t})},fa=0,Kn=1,Oo=2,Nb=4;function fi(e,t){return n=>e(t(n))}function oF(e,t){return t(e)}function Lb(e,t){return n=>e(t,n)}function Bp(e,t){return()=>e(t)}function da(e,t){return t(e),e}function Be(...e){return e}function iF(e){e()}function Wp(e){return()=>e}function sF(...e){return()=>{e.map(iF)}}function Qu(e){return e!==void 0}function br(){}function Oe(e,t){return e(Kn,t)}function fe(e,t){e(fa,t)}function Zu(e){e(Oo)}function wt(e){return e(Nb)}function se(e,t){return Oe(e,Lb(t,fa))}function dn(e,t){const n=e(Kn,r=>{n(),t(r)});return n}function ge(){const e=[];return(t,n)=>{switch(t){case Oo:e.splice(0,e.length);return;case Kn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case fa: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 Kn:o(t);break;case fa:t=o;break;case Nb:return t}return n(r,o)}}function aF(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case Kn:return i?n===i?void 0:(r(),n=i,t=Oe(e,i),t):(r(),br);case Oo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function jt(e){return da(ge(),t=>se(e,t))}function Tt(e,t){return da(Q(t),n=>se(e,n))}function lF(...e){return t=>e.reduceRight(oF,t)}function K(e,...t){const n=lF(...t);return(r,o)=>{switch(r){case Kn:return Oe(e,n(o));case Oo:Zu(e);return}}}function _b(e,t){return e===t}function $e(e=_b){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=>fi(t,e)}function Jt(e){return t=>()=>t(e)}function on(e,t){return n=>r=>n(t=e(t,r))}function io(e){return t=>n=>{e>0?e--:t(n)}}function Mn(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Hp(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((i,s)=>{const a=Math.pow(2,s);Oe(i,c=>{const l=n;n=n|a,t[s]=c,l!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function zp(...e){return function(t,n){switch(t){case Kn:return sF(...e.map(r=>Oe(r,n)));case Oo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ce(e,t=_b){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((i,s)=>{const a=Math.pow(2,s);Oe(i,c=>{n[s]=c,r=r|a,r===o&&fe(t,n)})}),function(i,s){switch(i){case Kn:return r===o&&s(n),Oe(t,s);case Oo:return Zu(t);default:throw new Error(`unrecognized action ${i}`)}}}function Ce(e,t=[],{singleton:n}={singleton:!0}){return{id:cF(),constructor:e,dependencies:t,singleton:n}}const cF=()=>Symbol();function uF(e){const t=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=o(i.map(c=>n(c)));return s&&t.set(r,a),a};return n(e)}function fF(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n}const Xi=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Ju(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=b.createContext({});function c(v,x){v.propsReady&&fe(v.propsReady,!1);for(const y of r){const T=v[t.required[y]];fe(T,x[y])}for(const y of o)if(y in x){const T=v[t.optional[y]];fe(T,x[y])}v.propsReady&&fe(v.propsReady,!0)}function l(v){return i.reduce((x,y)=>(x[y]=T=>{const S=v[t.methods[y]];fe(S,T)},x),{})}function u(v){return s.reduce((x,y)=>(x[y]=aF(v[t.events[y]]),x),{})}const f=b.forwardRef((v,x)=>{const{children:y,...T}=v,[S]=b.useState(()=>da(uF(e),R=>c(R,T))),[E]=b.useState(Bp(u,S));return Xi(()=>{for(const R of s)R in T&&Oe(E[R],T[R]);return()=>{Object.values(E).map(Zu)}},[T,E,S]),Xi(()=>{c(S,T)}),b.useImperativeHandle(x,Wp(l(S))),b.createElement(a.Provider,{value:S},n?b.createElement(n,fF([...r,...o,...s],T),y):y)}),h=v=>b.useCallback(Lb(fe,b.useContext(a)[v]),[v]),d=v=>{const y=b.useContext(a)[v],T=b.useCallback(S=>Oe(y,S),[y]);return b.useSyncExternalStore(T,()=>wt(y),()=>wt(y))},p=v=>{const y=b.useContext(a)[v],[T,S]=b.useState(Bp(wt,y));return Xi(()=>Oe(y,E=>{E!==T&&S(Wp(E))}),[y,T]),T},m=b.version.startsWith("18")?d:p;return{Component:f,usePublisher:h,useEmitterValue:m,useEmitter:(v,x)=>{const T=b.useContext(a)[v];Xi(()=>Oe(T,x),[x,T])}}}const dF=typeof document<"u"?b.useLayoutEffect:b.useEffect,hF=dF;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 pF={0:"debug",1:"log",2:"warn",3:"error"},mF=()=>typeof globalThis>"u"?window:globalThis,qn=Ce(()=>{const e=Q(3);return{log:Q((n,r,o=1)=>{var i;const s=(i=mF().VIRTUOSO_LOG_LEVEL)!=null?i:wt(e);o>=s&&console[pF[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function ef(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&e(s)})}),[e]);r=i=>{i&&t?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function hn(e,t=!0){return ef(e,t).callbackRef}function Vb(e,t,n,r,o,i,s){const a=b.useCallback(c=>{const l=gF(c.children,t,"offsetHeight",o);let u=c.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",h=s?s.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,d=s?s.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:d,viewportHeight:p}),i==null||i(yF("row-gap",getComputedStyle(c).rowGap,o)),l!==null&&e(l)},[e,t,o,i,s,r]);return ef(a,n)}function gF(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(!a||a.dataset.index===void 0)continue;const c=parseInt(a.dataset.index),l=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Nt.ERROR),u===l)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==c-1?i.push({startIndex:c,endIndex:c,size:u}):i[i.length-1].endIndex++}return i}function yF(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 Yt(e,t){return Math.round(e.getBoundingClientRect()[t])}function $b(e,t){return Math.abs(e-t)<1.01}function Bb(e,t,n,r=br,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),c=b.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,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};f.suppressFlushSync?v():jc.flushSync(v),s.current!==null&&(p===s.current||p<=0||p===m-g)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const f=o||i.current;return r(o||i.current),c({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[i,c,n,r,o]);function l(f){const h=i.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const d=f.behavior==="smooth";let p,m,g;h===window?(m=Math.max(Yt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=h.scrollHeight,p=Yt(h,"height"),g=h.scrollTop);const v=m-p;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),$b(p,m)||f.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),d&&t(!0);return}d?(s.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,h.scrollTo(f)}function u(f){i.current.scrollBy(f)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:l}}const Rt=Ce(()=>{const e=ge(),t=ge(),n=Q(0),r=ge(),o=Q(0),i=ge(),s=ge(),a=Q(0),c=Q(0),l=Q(0),u=Q(0),f=ge(),h=ge(),d=Q(!1);return se(K(e,ne(({scrollTop:p})=>p)),t),se(K(e,ne(({scrollHeight:p})=>p)),s),se(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:c,fixedFooterHeight:l,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:f,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:d}},[],{singleton:!0}),di={lvl:0};function Wb(e,t,n,r=di,o=di){return{k:e,v:t,lvl:n,l:r,r:o}}function Fe(e){return e===di}function _r(){return di}function Pc(e,t){if(Fe(e))return di;const{k:n,l:r,r:o}=e;if(t===n){if(Fe(r))return o;if(Fe(o))return r;{const[i,s]=Hb(r);return as(st(e,{k:i,v:s,l:zb(r)}))}}else return t<n?as(st(e,{l:Pc(r,t)})):as(st(e,{r:Pc(o,t)}))}function hi(e,t){if(!Fe(e))return t===e.k?e.v:t<e.k?hi(e.l,t):hi(e.r,t)}function Kt(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=Kt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Kt(e.l,t,n)}function Ft(e,t,n){return Fe(e)?Wb(t,n,1):t===e.k?st(e,{k:t,v:n}):t<e.k?Up(st(e,{l:Ft(e.l,t,n)})):Up(st(e,{r:Ft(e.r,t,n)}))}function Rc(e,t,n){if(Fe(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(Rc(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Rc(s,t,n))),a}function cr(e){return Fe(e)?[]:[...cr(e.l),{k:e.k,v:e.v},...cr(e.r)]}function Hb(e){return Fe(e.r)?[e.k,e.v]:Hb(e.r)}function zb(e){return Fe(e.r)?e.l:as(st(e,{r:zb(e.r)}))}function st(e,t){return Wb(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function bl(e){return Fe(e)||e.lvl>e.r.lvl}function Up(e){return Ic(Gb(e))}function as(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(bl(t))return Gb(st(e,{lvl:r-1}));if(!Fe(t)&&!Fe(t.r))return st(t.r,{l:st(t,{r:t.r.l}),r:st(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(bl(e))return Ic(st(e,{lvl:r-1}));if(!Fe(n)&&!Fe(n.l)){const o=n.l,i=bl(o)?n.lvl-1:n.lvl;return st(o,{l:st(e,{r:o.l,lvl:r-1}),r:Ic(st(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ha(e,t,n){if(Fe(e))return[];const r=Kt(e,t)[0];return vF(Rc(e,r,n))}function Ub(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:c}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=c}return i.push({start:r,end:1/0,value:o}),i}function vF(e){return Ub(e,({k:t,v:n})=>({index:t,value:n}))}function Ic(e){const{r:t,lvl:n}=e;return!Fe(t)&&!Fe(t.r)&&t.lvl===n&&t.r.lvl===n?st(t,{l:st(e,{r:t.l}),lvl:n+1}):e}function Gb(e){const{l:t}=e;return!Fe(t)&&t.lvl===e.lvl?st(t,{r:st(e,{l:t.r})}):e}function _s(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Yb(e,t,n){return e[_s(e,t,n)]}function bF(e,t,n,r){const o=_s(e,t,r),i=_s(e,n,r,o);return e.slice(o,i+1)}const tf=Ce(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function xF(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 wF(e,t){let n=Fe(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),Fe(e)){e=Ft(e,0,o);continue}const a=ha(e,i-1,s+1);if(a.some(xF(r)))continue;let c=!1,l=!1;for(const{start:u,end:f,value:h}of a)c?(s>=u||o===h)&&(e=Pc(e,u)):(l=h!==o,c=!0),f>s&&s>=u&&h!==o&&(e=Ft(e,s+1,h));l&&(e=Ft(e,i,o))}return[e,n]}function TF(){return{offsetTree:[],sizeTree:_r(),groupOffsetTree:_r(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function nf({index:e},t){return t===e?0:t<e?-1:1}function SF({offset:e},t){return t===e?0:t<e?-1:1}function EF(e){return{index:e.index,value:e}}function CF(e,t,n,r=0){return r>0&&(t=Math.max(t,Yb(e,r,nf).offset)),Ub(bF(e,t,n,SF),EF)}function Ac(e,t,n,r){let o=e,i=0,s=0,a=0,c=0;if(t!==0){c=_s(o,t-1,nf),a=o[c].offset;const u=Kt(n,t-1);i=u[0],s=u[1],o.length&&o[c].size===Kt(n,t)[1]&&(c-=1),o=o.slice(0,c+1)}else o=[];for(const{start:l,value:u}of ha(n,t,1/0)){const f=l-i,h=f*s+a+f*r;o.push({offset:h,size:u,index:l}),i=l,a=h,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function PF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Nt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&Fe(i)&&t.length===2){const h=t[0].size,d=t[1].size;s=n.reduce((p,m)=>Ft(Ft(p,m,h),m+1,d),s)}else[s,a]=wF(s,t);if(s===i)return e;const{offsetTree:c,lastIndex:l,lastSize:u,lastOffset:f}=Ac(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:c,lastIndex:l,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((h,d)=>Ft(h,d,pi(d,c,o)),_r()),groupIndices:n}}function pi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=Yb(t,e,nf),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function RF(e){return typeof e.groupIndex<"u"}function Kb(e,t,n){if(RF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=qb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function qb(e,t){if(!pa(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function pa(e){return!Fe(e.groupOffsetTree)}function IF(e){return cr(e).map(({k:t,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const AF={offsetHeight:"height",offsetWidth:"width"},mn=Ce(([{log:e},{recalcInProgress:t}])=>{const n=ge(),r=ge(),o=Tt(r,0),i=ge(),s=ge(),a=Q(0),c=Q([]),l=Q(void 0),u=Q(void 0),f=Q((S,E)=>Yt(S,AF[E])),h=Q(void 0),d=Q(0),p=TF(),m=Tt(K(n,de(c,e,d),on(PF,p),$e()),p),g=Tt(K(c,$e(),on((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),ne(({prev:S})=>S)),[]);se(K(c,le(S=>S.length>0),de(m,d),ne(([S,E,R])=>{const A=S.reduce((k,I,j)=>Ft(k,I,pi(I,E.offsetTree,R)||j),_r());return{...E,groupIndices:S,groupOffsetTree:A}})),m),se(K(r,de(m),le(([S,{lastIndex:E}])=>S<E),ne(([S,{lastIndex:E,lastSize:R}])=>[{startIndex:S,endIndex:E,size:R}])),n),se(l,u);const v=Tt(K(l,ne(S=>S===void 0)),!0);se(K(u,le(S=>S!==void 0&&Fe(wt(m).sizeTree)),ne(S=>[{startIndex:0,endIndex:0,size:S}])),n);const x=jt(K(n,de(m),on(({sizes:S},[E,R])=>({changed:R!==S,sizes:R}),{changed:!1,sizes:p}),ne(S=>S.changed)));Oe(K(a,on((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(i,S+Gp(S,E));else if(S<0){const R=wt(g);R.length>0&&(S-=Gp(-S,R)),fe(s,S)}}),Oe(K(a,de(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(i);se(K(i,de(m),ne(([S,E])=>{const R=E.groupIndices.length>0,A=[],k=E.lastSize;if(R){const I=hi(E.sizeTree,0);let j=0,D=0;for(;j<S;){const O=E.groupIndices[D],F=E.groupIndices.length===D+1?1/0:E.groupIndices[D+1]-O-1;A.push({startIndex:O,endIndex:O,size:I}),A.push({startIndex:O+1,endIndex:O+1+F-1,size:k}),D++,j+=F+1}const N=cr(E.sizeTree);return j!==S&&N.shift(),N.reduce((O,{k:F,v:_})=>{let W=O.ranges;return O.prevSize!==0&&(W=[...O.ranges,{startIndex:O.prevIndex,endIndex:F+S-1,size:O.prevSize}]),{ranges:W,prevIndex:F+S,prevSize:_}},{ranges:A,prevIndex:S,prevSize:0}).ranges}return cr(E.sizeTree).reduce((I,{k:j,v:D})=>({ranges:[...I.ranges,{startIndex:I.prevIndex,endIndex:j+S-1,size:I.prevSize}],prevIndex:j+S,prevSize:D}),{ranges:[],prevIndex:0,prevSize:k}).ranges})),n);const T=jt(K(s,de(m,d),ne(([S,{offsetTree:E},R])=>{const A=-S;return pi(A,E,R)})));return se(K(s,de(m,d),ne(([S,E,R])=>{if(E.groupIndices.length>0){if(Fe(E.sizeTree))return E;let k=_r();const I=wt(g);let j=0,D=0,N=0;for(;j<-S;){N=I[D];const O=I[D+1]-N-1;D++,j+=O+1}if(k=cr(E.sizeTree).reduce((O,{k:F,v:_})=>Ft(O,Math.max(0,F+S),_),k),j!==-S){const O=hi(E.sizeTree,N);k=Ft(k,0,O);const F=Kt(E.sizeTree,-S+1)[1];k=Ft(k,1,F)}return{...E,sizeTree:k,...Ac(E.offsetTree,0,k,R)}}else{const k=cr(E.sizeTree).reduce((I,{k:j,v:D})=>Ft(I,Math.max(0,j+S),D),_r());return{...E,sizeTree:k,...Ac(E.offsetTree,0,k,R)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:u,fixedItemSize:l,unshiftWith:i,shiftWith:s,shiftWithOffset:T,beforeUnshiftWith:y,firstItemIndex:a,gap:d,sizes:m,listRefresh:x,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},Be(qn,tf),{singleton:!0}),OF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Xb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!OF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oi=Ce(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:c,footerHeight:l,fixedHeaderHeight:u,fixedFooterHeight:f},{log:h}])=>{const d=ge(),p=ge(),m=Q(0);let g=null,v=null,x=null;function y(){g&&(g(),g=null),x&&(x(),x=null),v&&(clearTimeout(v),v=null),fe(o,!1)}return se(K(d,de(e,i,t,m,c,l,h),de(r,u,f),ne(([[T,S,E,R,A,k,I,j],D,N,P])=>{const O=Xb(T),{align:F,behavior:_,offset:W}=O,U=R-1,M=Kb(O,S,U);let V=pi(M,S.offsetTree,D)+k;F==="end"?(V+=N+Kt(S.sizeTree,M)[1]-E+P,M===U&&(V+=I)):F==="center"?V+=(N+Kt(S.sizeTree,M)[1]-E+P)/2:V-=A,W&&(V+=W);const q=J=>{y(),J?(j("retrying to scroll to",{location:T},Nt.DEBUG),fe(d,T)):(fe(p,!0),j("list did not change, scroll successful",{},Nt.DEBUG))};if(y(),_==="smooth"){let J=!1;x=Oe(n,X=>{J=J||X}),g=dn(a,()=>{q(J)})}else g=dn(K(n,DF(150)),q);return v=setTimeout(()=>{y()},1200),fe(o,!0),j("scrolling from index to",{index:M,top:V,behavior:_},Nt.DEBUG),{top:V,behavior:_}})),s),{scrollToIndex:d,scrollTargetReached:p,topListHeight:m}},Be(mn,Rt,qn),{singleton:!0});function DF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const mi="up",Jo="down",MF="none",kF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},FF=0,Di=Ce(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=Q(!1),a=Q(!0),c=ge(),l=ge(),u=Q(4),f=Q(FF),h=Tt(K(zp(K(ce(t),io(1),Jt(!0)),K(ce(t),io(1),Jt(!1),Hp(100))),$e()),!1),d=Tt(K(zp(K(i,Jt(!0)),K(i,Jt(!1),Hp(200))),$e()),!1);se(K(dt(ce(t),ce(f)),ne(([x,y])=>x<=y),$e()),a),se(K(a,Mn(50)),l);const p=jt(K(dt(e,ce(n),ce(r),ce(o),ce(u)),on((x,[{scrollTop:y,scrollHeight:T},S,E,R,A])=>{const k=y+S-T>-A,I={viewportHeight:S,scrollTop:y,scrollHeight:T};if(k){let D,N;return y>x.state.scrollTop?(D="SCROLLED_DOWN",N=x.state.scrollTop-y):(D="SIZE_DECREASED",N=x.state.scrollTop-y||x.scrollTopDelta),{atBottom:!0,state:I,atBottomBecause:D,scrollTopDelta:N}}let j;return I.scrollHeight>x.state.scrollHeight?j="SIZE_INCREASED":S<x.state.viewportHeight?j="VIEWPORT_HEIGHT_DECREASING":y<x.state.scrollTop?j="SCROLLING_UPWARDS":j="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:j,state:I}},kF),$e((x,y)=>x&&x.atBottom===y.atBottom))),m=Tt(K(e,on((x,{scrollTop:y,scrollHeight:T,viewportHeight:S})=>{if($b(x.scrollHeight,T))return{scrollTop:y,scrollHeight:T,jump:0,changed:!1};{const E=T-(y+S)<1;return x.scrollTop!==y&&E?{scrollHeight:T,scrollTop:y,jump:x.scrollTop-y,changed:!0}:{scrollHeight:T,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),le(x=>x.changed),ne(x=>x.jump)),0);se(K(p,ne(x=>x.atBottom)),s),se(K(s,Mn(50)),c);const g=Q(Jo);se(K(e,ne(({scrollTop:x})=>x),$e(),on((x,y)=>wt(d)?{direction:x.direction,prevScrollTop:y}:{direction:y<x.prevScrollTop?mi:Jo,prevScrollTop:y},{direction:Jo,prevScrollTop:0}),ne(x=>x.direction)),g),se(K(e,Mn(50),Jt(MF)),g);const v=Q(0);return se(K(h,le(x=>!x),Jt(0)),v),se(K(t,Mn(100),de(h),le(([x,y])=>!!y),on(([x,y],[T])=>[y,T],[0,0]),ne(([x,y])=>y-x)),v),{isScrolling:h,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:l,atBottomStateChange:c,scrollDirection:g,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},Be(Rt)),Xn=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(qn),{singleton:!0});function rf(e,t){e==0?t():requestAnimationFrame(()=>rf(e-1,t))}function of(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Mi=Ce(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=Q(!0),c=Q(0),l=Q(!0);return se(K(s,de(c),le(([u,f])=>!!f),Jt(!1)),a),se(K(s,de(c),le(([u,f])=>!!f),Jt(!1)),l),Oe(K(dt(t,s),de(a,e,n,l),le(([[,u],f,{sizeTree:h},d,p])=>u&&(!Fe(h)||Qu(d))&&!f&&!p),de(c)),([,u])=>{dn(i,()=>{fe(l,!0)}),rf(4,()=>{dn(r,()=>{fe(a,!0)}),fe(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:c,initialItemFinalLocationReached:l}},Be(mn,Rt,Oi,Xn),{singleton:!0});function Yp(e){return e?e==="smooth"?"smooth":"auto":!1}const jF=(e,t)=>typeof e=="function"?Yp(e(t)):t&&Yp(e),NF=Ce(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:c},{scrollingInProgress:l}])=>{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),io(1)),a),de(ce(u),n,i,l),ne(([[m,g],v,x,y,T])=>{let S=g&&y,E="auto";return S&&(E=jF(v,x||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),le(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{h&&(h(),h=null),h=dn(t,()=>{wt(c)("following output to ",{totalCount:m},Nt.DEBUG),d(g),h=null})});function p(m){const g=dn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(wt(c)("scrolling to bottom due to increased size",{},Nt.DEBUG),d("auto"))});setTimeout(g,100)}return Oe(K(dt(ce(u),e,s),le(([m,,g])=>m&&g),on(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),le(({refreshed:m})=>m),de(u,e)),([,m])=>{wt(i)&&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(mn,Di,Oi,Mi,Xn,qn,Rt));function LF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Qb=Ce(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=ge(),s=ge(),a=jt(K(i,ne(LF)));return se(K(a,ne(c=>c.totalCount)),e),se(K(a,ne(c=>c.groupIndices)),t),se(K(dt(r,n,o),le(([c,l])=>pa(l)),ne(([c,l,u])=>Kt(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),$e(),ne(c=>[c])),s),{groupCounts:i,topItemsIndexes:s}},Be(mn,Rt));function gi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Zb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Vs="top",$s="bottom",Kp="none";function qp(e,t,n){return typeof e=="number"?n===mi&&t===Vs||n===Jo&&t===$s?e:0:n===mi?t===Vs?e.main:e.reverse:t===$s?e.main:e.reverse}function Xp(e,t){return typeof e=="number"?e:e[t]||0}const sf=Ce(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=ge(),s=Q(0),a=Q(0),c=Q(0),l=Tt(K(dt(ce(e),ce(t),ce(r),ce(i,gi),ce(c),ce(s),ce(o),ce(n),ce(a)),ne(([u,f,h,[d,p],m,g,v,x,y])=>{const T=u-x,S=g+v,E=Math.max(h-T,0);let R=Kp;const A=Xp(y,Vs),k=Xp(y,$s);return d-=x,d+=h+v,p+=h+v,p-=x,d>u+S-A&&(R=mi),p<u-E+f+k&&(R=Jo),R!==Kp?[Math.max(T-h-qp(m,Vs,R)-A,0),T-E-v+f+qp(m,$s,R)+k]:null}),le(u=>u!=null),$e(gi)),[0,0]);return{listBoundary:i,overscan:c,topListHeight:s,increaseViewportBy:a,visibleRange:l}},Be(Rt),{singleton:!0});function _F(e,t,n){if(pa(t)){const r=qb(e,t);return[{index:Kt(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const xl={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(!pa(t))return e.map(l=>({...l,index:l.index+n,originalIndex:l.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=ha(t.groupOffsetTree,r,o);let a,c=0;for(const l of e){(!a||a.end<l.index)&&(a=s.shift(),c=t.groupIndices.indexOf(a.start));let u;l.index===a.start?u={type:"group",index:c}:u={index:l.index-(c+1)+n,groupIndex:c},i.push({...u,size:l.size,offset:l.offset,originalIndex:l.index,data:l.data})}return i}function ls(e,t,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:c}=o;let l=0,u=0;if(e.length>0){l=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const f=n-c,h=a+f*s+(f-1)*r,d=l,p=h-u;return{items:Qp(e,o,i),topItems:Qp(t,o,i),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:l,offsetBottom:p,top:d,bottom:u,totalCount:n,firstItemIndex:i}}function Jb(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,c=of(t,a),l=Array.from({length:a}).map((u,f)=>({index:f+c,size:0,offset:0,data:i[f+c]}));return ls(l,[],a,o,n,r)}const xr=Ce(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:c},{scrolledToInitialItem:l,initialTopMostItemIndex:u},{topListHeight:f},h,{didMount:d},{recalcInProgress:p}])=>{const m=Q([]),g=Q(0),v=ge();se(i.topItemsIndexes,m);const x=Tt(K(dt(d,p,ce(s,gi),ce(t),ce(e),ce(u),l,ce(m),ce(r),ce(o),n),le(([E,R,,A,,,,,,,k])=>{const I=k&&k.length!==A;return E&&!R&&!I}),ne(([,,[E,R],A,k,I,j,D,N,P,O])=>{const F=k,{sizeTree:_,offsetTree:W}=F,U=wt(g);if(A===0)return{...xl,totalCount:A};if(E===0&&R===0)return U===0?{...xl,totalCount:A}:Jb(U,I,k,N,P,O||[]);if(Fe(_))return U>0?null:ls(_F(of(I,A),F,O),[],A,P,F,N);const M=[];if(D.length>0){const G=D[0],L=D[D.length-1];let B=0;for(const z of ha(_,G,L)){const $=z.value,Y=Math.max(z.start,G),ee=Math.min(z.end,L);for(let H=Y;H<=ee;H++)M.push({index:H,size:$,offset:B,data:O&&O[H]}),B+=$}}if(!j)return ls([],M,A,P,F,N);const V=D.length>0?D[D.length-1]+1:0,q=CF(W,E,R,V);if(q.length===0)return null;const J=A-1,X=da([],G=>{for(const L of q){const B=L.value;let z=B.offset,$=L.start;const Y=B.size;if(B.offset<E){$+=Math.floor((E-B.offset+P)/(Y+P));const H=$-L.start;z+=H*Y+H*P}$<V&&(z+=(V-$)*Y,$=V);const ee=Math.min(L.end,J);for(let H=$;H<=ee&&!(z>=R);H++)G.push({index:H,size:Y,offset:z,data:O&&O[H]}),z+=Y+P}});return ls(X,M,A,P,F,N)}),le(E=>E!==null),$e()),xl);se(K(n,le(Qu),ne(E=>E==null?void 0:E.length)),t),se(K(x,ne(E=>E.topListHeight)),f),se(f,c),se(K(x,ne(E=>[E.top,E.bottom])),a),se(K(x,ne(E=>E.items)),v);const y=jt(K(x,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(gi),ne(([E])=>E))),T=jt(K(x,Mn(200),le(({items:E,topItems:R})=>E.length>0&&E[0].originalIndex===R.length),ne(({items:E})=>E[0].index),$e())),S=jt(K(x,le(({items:E})=>E.length>0),ne(({items:E})=>{let R=0,A=E.length-1;for(;E[R].type==="group"&&R<A;)R++;for(;E[A].type==="group"&&A>R;)A--;return{startIndex:E[R].index,endIndex:E[A].index}}),$e(Zb)));return{listState:x,topItemsIndexes:m,endReached:y,startReached:T,rangeChanged:S,itemsRendered:v,initialItemCount:g,...h}},Be(mn,Qb,sf,Mi,Oi,Di,Xn,tf),{singleton:!0}),VF=Ce(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(se(K(a,de(i),le(([,c])=>c!==0),de(o,e,t,r,n),ne(([[,c],l,u,f,h,d=[]])=>Jb(c,l,u,f,h,d))),s),{}),Be(mn,Mi,xr,Xn),{singleton:!0}),e0=Ce(([{scrollVelocity:e}])=>{const t=Q(!1),n=ge(),r=Q(!1);return se(K(e,de(r,t,n),le(([o,i])=>!!i),ne(([o,i,s,a])=>{const{exit:c,enter:l}=i;if(s){if(c(o,a))return!1}else if(l(o,a))return!0;return s}),$e()),t),Oe(K(dt(t,e,n),de(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Be(Di),{singleton:!0}),$F=Ce(([{topItemsIndexes:e}])=>{const t=Q(0);return se(K(t,le(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Be(xr)),t0=Ce(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=ge(),s=Tt(K(dt(e,r,t,n,o),ne(([a,c,l,u,f])=>a+c+l+u+f.offsetBottom+f.bottom)),0);return se(ce(s),i),{totalListHeight:s,totalListHeightChanged:i}},Be(Rt,xr),{singleton:!0});function n0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const BF=n0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),WF=Ce(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:c},{beforeUnshiftWith:l,shiftWithOffset:u,sizes:f,gap:h},{log:d},{recalcInProgress:p}])=>{const m=jt(K(c,de(a),on(([,v,x,y],[{items:T,totalCount:S,bottom:E,offsetBottom:R},A])=>{const k=E+R;let I=0;return x===S&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(I=k-y,I!==0&&(I+=A))),[I,T,S,k]},[0,[],0,0]),le(([v])=>v!==0),de(t,s,r,i,d,p),le(([,v,x,y,,,T])=>!T&&!y&&v!==0&&x===mi),ne(([[v],,,,,x])=>(x("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 Oe(K(m,de(n,o)),([v,x,y])=>{y&&BF()?fe(n,x-v):g(-v)}),Oe(K(dt(Tt(o,!1),n,p),le(([v,x,y])=>!v&&!y&&x!==0),ne(([v,x])=>x),Mn(1)),g),se(K(u,ne(v=>({top:-v}))),e),Oe(K(l,de(f,h),ne(([v,{lastSize:x,groupIndices:y,sizeTree:T},S])=>{function E(R){return R*(x+S)}if(y.length===0)return E(v);{let R=0;const A=hi(T,0);let k=0,I=0;for(;k<v;){k++,R+=A;let j=y.length===I+1?1/0:y[I+1]-y[I]-1;k+j>v&&(R-=A,j=v-k+1),k+=j,R+=E(j),I++}return R}})),v=>{fe(n,v),requestAnimationFrame(()=>{fe(e,{top:v}),requestAnimationFrame(()=>{fe(n,0),fe(p,!1)})})}),{deviation:n}},Be(Rt,Di,xr,mn,qn,tf)),HF=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=>{dn(K(n,io(1),le(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{fe(t,o)})})}),{initialScrollTop:r}},Be(Xn,Rt,xr),{singleton:!0}),zF=Ce(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Q(!1),r=Tt(K(dt(n,e,t),le(([o])=>o),ne(([,o,i])=>Math.max(0,o-i)),Mn(0),$e()),0);return{alignToBottom:n,paddingTopAddition:r}},Be(Rt,t0),{singleton:!0}),af=Ce(([{scrollTo:e,scrollContainerState:t}])=>{const n=ge(),r=ge(),o=ge(),i=Q(!1),s=Q(void 0);return se(K(dt(n,r),ne(([{viewportHeight:a,scrollTop:c,scrollHeight:l},{offsetTop:u}])=>({scrollTop:Math.max(0,c-u),scrollHeight:l,viewportHeight:a}))),t),se(K(e,de(r),ne(([a,{offsetTop:c}])=>({...a,top:a.top+c}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Be(Rt)),UF=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>e<n?{...s,behavior:o,align:i??"start"}:t>r?{...s,behavior:o,align:i??"end"}:null,GF=Ce(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:c},{scrollToIndex:l}])=>{const u=ge();return se(K(u,de(e,o,t,i,s,a,r),de(n),ne(([[f,h,d,p,m,g,v,x],y])=>{const{done:T,behavior:S,align:E,calculateViewLocation:R=UF,...A}=f,k=Kb(f,h,p-1),I=pi(k,h.offsetTree,y)+m+g,j=I+Kt(h.sizeTree,k)[1],D=x+g,N=x+d-v,P=R({itemTop:I,itemBottom:j,viewportTop:D,viewportBottom:N,locationParams:{behavior:S,align:E,...A}});return P?T&&dn(K(c,le(O=>O===!1),io(wt(c)?1:2)),T):T&&T(),P}),le(f=>f!==null)),l),{scrollIntoView:u}},Be(mn,Rt,Oi,xr,qn),{singleton:!0}),YF=Ce(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:c}])=>{const l=ge(),u=Q(void 0),f=Q(null),h=Q(null);return se(a,f),se(c,h),Oe(K(l,de(e,n,s,f,h,r)),([d,p,m,g,v,x,y])=>{const T=IF(p.sizeTree);g&&v!==null&&x!==null&&(m=v.scrollTop-x.offsetTop),m-=y,d({ranges:T,scrollTop:m})}),se(K(u,le(Qu),ne(KF)),o),se(K(i,de(u),le(([,d])=>d!==void 0),$e(),ne(([,d])=>d.ranges)),t),{getState:l,restoreStateFrom:u}},Be(mn,Rt,Mi,Xn,af));function KF(e){return{offset:e.scrollTop,index:0,align:"start"}}const qF=Ce(([e,t,n,r,o,i,s,a,c,l])=>({...e,...t,...n,...r,...o,...i,...s,...a,...c,...l}),Be(sf,VF,Xn,e0,t0,HF,zF,af,GF,qn)),r0=Ce(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:c,statefulTotalCount:l,gap:u,sizes:f},{initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p},m,g,v,{listState:x,topItemsIndexes:y,...T},{scrollToIndex:S},E,{topItemCount:R},{groupCounts:A},k])=>(se(T.rangeChanged,k.scrollSeekRangeChanged),se(K(k.windowViewportRect,ne(I=>I.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:R,groupCounts:A,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:l,listState:x,scrollToIndex:S,trackItemSizes:o,itemSize:i,groupIndices:c,...T,...k,...m,sizes:f,...g}),Be(mn,Mi,Rt,YF,NF,xr,Oi,WF,$F,Qb,qF)),wl="-webkit-sticky",Zp="sticky",o0=n0(()=>{if(typeof document>"u")return Zp;const e=document.createElement("div");return e.style.position=wl,e.style.position===wl?wl:Zp});function lf(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const c=a.getBoundingClientRect(),l=c.width;let u,f;if(t){const h=t.getBoundingClientRect(),d=c.top-h.top;u=h.height-Math.max(0,d),f=d+t.scrollTop}else u=window.innerHeight-Math.max(0,c.top),f=c.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:l},e(n.current)},[e,t]),{callbackRef:o,ref:i}=ef(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),o}const ma=b.createContext(void 0),i0=b.createContext(void 0);function cf(e){return e}const XF=Ce(()=>{const e=Q(c=>`Item ${c}`),t=Q(null),n=Q(c=>`Group ${c}`),r=Q({}),o=Q(cf),i=Q("div"),s=Q(br),a=(c,l=null)=>Tt(K(r,ne(u=>u[c]),$e()),l);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,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")}}),QF=Ce(([e,t])=>({...e,...t}),Be(r0,XF)),ZF=({height:e})=>b.createElement("div",{style:{height:e}}),JF={position:o0(),zIndex:1,overflowAnchor:"none"},ej={overflowAnchor:"none"},Jp=b.memo(function({showTopList:t=!1}){const n=pe("listState"),r=Wt("sizeRanges"),o=pe("useWindowScroll"),i=pe("customScrollParent"),s=Wt("windowScrollContainerState"),a=Wt("scrollContainerState"),c=i||o?s:a,l=pe("itemContent"),u=pe("context"),f=pe("groupContent"),h=pe("trackItemSizes"),d=pe("itemSize"),p=pe("log"),m=Wt("gap"),{callbackRef:g}=Vb(r,d,h,t?br:c,p,m,i),[v,x]=b.useState(0);df("deviation",P=>{v!==P&&x(P)});const y=pe("EmptyPlaceholder"),T=pe("ScrollSeekPlaceholder")||ZF,S=pe("ListComponent"),E=pe("ItemComponent"),R=pe("GroupComponent"),A=pe("computeItemKey"),k=pe("isSeeking"),I=pe("groupIndices").length>0,j=pe("alignToBottom"),D=pe("initialItemFinalLocationReached"),N=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:j?"auto":0,...D?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?b.createElement(y,Ke(y,u)):b.createElement(S,{...Ke(S,u),ref:g,style:N,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const O=P.originalIndex,F=A(O+n.firstItemIndex,P.data,u);return k?b.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"?b.createElement(R,{...Ke(R,u),key:F,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,style:JF},f(P.index,u)):b.createElement(E,{...Ke(E,u),...s0(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:ej},I?l(P.index,P.groupIndex,P.data,u):l(P.index,P.data,u))}))}),tj={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Do=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),nj={width:"100%",position:o0(),top:0,zIndex:1};function Ke(e,t){if(typeof e!="string")return{context:t}}function s0(e,t){return{item:typeof e=="string"?void 0:t}}const rj=b.memo(function(){const t=pe("HeaderComponent"),n=Wt("headerHeight"),r=pe("headerFooterTag"),o=hn(b.useMemo(()=>s=>n(Yt(s,"height")),[n])),i=pe("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null}),oj=b.memo(function(){const t=pe("FooterComponent"),n=Wt("footerHeight"),r=pe("headerFooterTag"),o=hn(b.useMemo(()=>s=>n(Yt(s,"height")),[n])),i=pe("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null});function uf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const c=e("scrollContainerState"),l=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),h=n("context"),{scrollerRef:d,scrollByCallback:p,scrollToCallback:m}=Bb(c,u,l,f);return t("scrollTo",m),t("scrollBy",p),b.createElement(l,{ref:d,style:{...tj,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Ke(l,h)},s)})}function ff({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const c=e("windowScrollContainerState"),l=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),d=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:v}=Bb(c,u,l,br,d);return hF(()=>(m.current=d||window,()=>{m.current=null}),[m,d]),t("windowScrollTo",v),t("scrollBy",g),b.createElement(l,{style:{position:"relative",...i,...f!==0?{height:f+h}:{}},"data-virtuoso-scroller":!0,...a,...Ke(l,p)},s)})}const ij=({children:e})=>{const t=b.useContext(ma),n=Wt("viewportHeight"),r=Wt("fixedItemHeight"),o=pe("alignToBottom"),i=hn(b.useMemo(()=>fi(n,s=>Yt(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Do(o),ref:i,"data-viewport-type":"element"},e)},sj=({children:e})=>{const t=b.useContext(ma),n=Wt("windowViewportRect"),r=Wt("fixedItemHeight"),o=pe("customScrollParent"),i=lf(n,o),s=pe("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Do(s),"data-viewport-type":"window"},e)},aj=({children:e})=>{const t=pe("TopItemListComponent")||"div",n=pe("headerHeight"),r={...nj,marginTop:`${n}px`},o=pe("context");return b.createElement(t,{style:r,...Ke(t,o)},e)},lj=b.memo(function(t){const n=pe("useWindowScroll"),r=pe("topItemsIndexes").length>0,o=pe("customScrollParent"),i=o||n?fj:uj,s=o||n?sj:ij;return b.createElement(i,{...t},r&&b.createElement(aj,null,b.createElement(Jp,{showTopList:!0})),b.createElement(s,null,b.createElement(rj,null),b.createElement(Jp,null),b.createElement(oj,null)))}),{Component:cj,usePublisher:Wt,useEmitterValue:pe,useEmitter:df}=Ju(QF,{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"}},lj),uj=uf({usePublisher:Wt,useEmitterValue:pe,useEmitter:df}),fj=ff({usePublisher:Wt,useEmitterValue:pe,useEmitter:df}),dj=cj,em={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},hj={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:tm,ceil:nm,floor:Bs,min:Tl,max:ei}=Math;function pj(e){return{...hj,items:e}}function rm(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const i=n===null?null:n[o+e];return{index:o+e,data:i}})}function mj(e,t){return e&&e.column===t.column&&e.row===t.row}function Qi(e,t){return e&&e.width===t.width&&e.height===t.height}const gj=Ce(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:c,footerHeight:l,headerHeight:u},f,h,{propsReady:d,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:x,windowScrollTo:y},T])=>{const S=Q(0),E=Q(0),R=Q(em),A=Q({height:0,width:0}),k=Q({height:0,width:0}),I=ge(),j=ge(),D=Q(0),N=Q(null),P=Q({row:0,column:0}),O=ge(),F=ge(),_=Q(!1),W=Q(0),U=Q(!0),M=Q(!1);Oe(K(p,de(W),le(([L,B])=>!!B)),()=>{fe(U,!1),fe(E,0)}),Oe(K(dt(p,U,k,A,W,M),le(([L,B,z,$,,Y])=>L&&!B&&z.height!==0&&$.height!==0&&!Y)),([,,,,L])=>{fe(M,!0),rf(1,()=>{fe(I,L)}),dn(K(r),()=>{fe(n,[0,0]),fe(U,!0)})}),se(K(F,le(L=>L!=null&&L.scrollTop>0),Jt(0)),E),Oe(K(p,de(F),le(([,L])=>L!=null)),([,L])=>{L&&(fe(A,L.viewport),fe(k,L==null?void 0:L.item),fe(P,L.gap),L.scrollTop>0&&(fe(_,!0),dn(K(r,io(1)),B=>{fe(_,!1)}),fe(s,{top:L.scrollTop})))}),se(K(A,ne(({height:L})=>L)),o),se(K(dt(ce(A,Qi),ce(k,Qi),ce(P,(L,B)=>L&&L.column===B.column&&L.row===B.row),ce(r)),ne(([L,B,z,$])=>({viewport:L,item:B,gap:z,scrollTop:$}))),O),se(K(dt(ce(S),t,ce(P,mj),ce(k,Qi),ce(A,Qi),ce(N),ce(E),ce(_),ce(U),ce(W)),le(([,,,,,,,L])=>!L),ne(([L,[B,z],$,Y,ee,H,we,,Ue,je])=>{const{row:Ge,column:ie}=$,{height:me,width:oe}=Y,{width:ye}=ee;if(we===0&&(L===0||ye===0))return em;if(oe===0){const Ct=of(je,L),Qn=Ct===0?Math.max(we-1,0):Ct;return pj(rm(Ct,Qn,H))}const Qe=a0(ye,oe,ie);let ve,ot;Ue?B===0&&z===0&&we>0?(ve=0,ot=we-1):(ve=Qe*Bs((B+Ge)/(me+Ge)),ot=Qe*nm((z+Ge)/(me+Ge))-1,ot=Tl(L-1,ei(ot,Qe-1)),ve=Tl(ot,ei(0,ve))):(ve=0,ot=-1);const Z=rm(ve,ot,H),{top:re,bottom:xe}=om(ee,$,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),se(K(N,le(L=>L!==null),ne(L=>L.length)),S),se(K(dt(A,k,R,P),le(([L,B,{items:z}])=>z.length>0&&B.height!==0&&L.height!==0),ne(([L,B,{items:z},$])=>{const{top:Y,bottom:ee}=om(L,$,B,z);return[Y,ee]}),$e(gi)),n);const V=Q(!1);se(K(r,de(V),ne(([L,B])=>B||L!==0)),V);const q=jt(K(ce(R),le(({items:L})=>L.length>0),de(S,V),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),Jt(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(Zb),Mn(0)));se(X,h.scrollSeekRangeChanged),se(K(I,de(A,k,S,P),ne(([L,B,z,$,Y])=>{const ee=Xb(L),{align:H,behavior:we,offset:Ue}=ee;let je=ee.index;je==="LAST"&&(je=$-1),je=ei(0,je,Tl($-1,je));let Ge=Oc(B,Y,z,je);return H==="end"?Ge=tm(Ge-B.height+z.height):H==="center"&&(Ge=tm(Ge-B.height/2+z.height/2)),Ue&&(Ge+=Ue),{top:Ge,behavior:we}})),s);const G=Tt(K(R,ne(L=>L.offsetBottom+L.bottom)),0);return se(K(m,ne(L=>({width:L.visibleWidth,height:L.visibleHeight}))),A),{data:N,totalCount:S,viewportDimensions:A,itemDimensions:k,scrollTop:r,scrollHeight:j,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:I,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:x,deviation:D,scrollContainerState:c,footerHeight:l,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:F,...h,initialTopMostItemIndex:W,gridState:R,totalListHeight:G,...f,startReached:J,endReached:q,rangeChanged:X,stateChanged:O,propsReady:d,stateRestoreInProgress:_,...T}},Be(sf,Rt,Di,e0,Xn,af,qn));function om(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=Oc(e,t,n,r[0].index),s=Oc(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function Oc(e,t,n,r){const o=a0(e.width,n.width,t.column),i=Bs(r/o),s=i*n.height+ei(0,i-1)*t.row;return s>0?s+t.row:s}function a0(e,t,n){return ei(1,Bs((e+n)/(Bs(t)+n)))}const yj=Ce(()=>{const e=Q(l=>`Item ${l}`),t=Q({}),n=Q(null),r=Q("virtuoso-grid-item"),o=Q("virtuoso-grid-list"),i=Q(cf),s=Q("div"),a=Q(br),c=(l,u=null)=>Tt(K(t,ne(f=>f[l]),$e()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),vj=Ce(([e,t])=>({...e,...t}),Be(gj,yj)),bj=b.memo(function(){const t=He("gridState"),n=He("listClassName"),r=He("itemClassName"),o=He("itemContent"),i=He("computeItemKey"),s=He("isSeeking"),a=Ut("scrollHeight"),c=He("ItemComponent"),l=He("ListComponent"),u=He("ScrollSeekPlaceholder"),f=He("context"),h=Ut("itemDimensions"),d=Ut("gap"),p=He("log"),m=He("stateRestoreInProgress"),g=hn(b.useMemo(()=>v=>{const x=v.parentElement.parentElement.scrollHeight;a(x);const y=v.firstChild;if(y){const{width:T,height:S}=y.getBoundingClientRect();h({width:T,height:S})}d({row:im("row-gap",getComputedStyle(v).rowGap,p),column:im("column-gap",getComputedStyle(v).columnGap,p)})},[a,h,d,p]));return m?null:b.createElement(l,{ref:g,className:n,...Ke(l,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const x=i(v.index,v.data,f);return s?b.createElement(u,{key:x,...Ke(u,f),index:v.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(c,{...Ke(c,f),className:r,"data-index":v.index,key:x},o(v.index,v.data,f))}))}),xj=b.memo(function(){const t=He("HeaderComponent"),n=Ut("headerHeight"),r=He("headerFooterTag"),o=hn(b.useMemo(()=>s=>n(Yt(s,"height")),[n])),i=He("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null}),wj=b.memo(function(){const t=He("FooterComponent"),n=Ut("footerHeight"),r=He("headerFooterTag"),o=hn(b.useMemo(()=>s=>n(Yt(s,"height")),[n])),i=He("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null}),Tj=({children:e})=>{const t=b.useContext(i0),n=Ut("itemDimensions"),r=Ut("viewportDimensions"),o=hn(b.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:Do(!1),ref:o},e)},Sj=({children:e})=>{const t=b.useContext(i0),n=Ut("windowViewportRect"),r=Ut("itemDimensions"),o=He("customScrollParent"),i=lf(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:i,style:Do(!1)},e)},Ej=b.memo(function({...t}){const n=He("useWindowScroll"),r=He("customScrollParent"),o=r||n?Pj:Cj,i=r||n?Sj:Tj;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(xj,null),b.createElement(bj,null),b.createElement(wj,null)))}),{Component:OL,usePublisher:Ut,useEmitterValue:He,useEmitter:l0}=Ju(vj,{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"}},Ej),Cj=uf({usePublisher:Ut,useEmitterValue:He,useEmitter:l0}),Pj=ff({usePublisher:Ut,useEmitterValue:He,useEmitter:l0});function im(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 Rj=Ce(()=>{const e=Q(c=>b.createElement("td",null,"Item $",c)),t=Q(null),n=Q(null),r=Q(null),o=Q({}),i=Q(cf),s=Q(br),a=(c,l=null)=>Tt(K(o,ne(u=>u[c]),$e()),l);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,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")}}),Ij=Ce(([e,t])=>({...e,...t}),Be(r0,Rj)),Aj=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),Oj=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),Dj={overflowAnchor:"none"},Mj=b.memo(function(){const t=Ie("listState"),n=Gt("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=Gt("windowScrollContainerState"),s=Gt("scrollContainerState"),a=o||r?i:s,c=Ie("itemContent"),l=Ie("trackItemSizes"),u=Ie("itemSize"),f=Ie("log"),{callbackRef:h,ref:d}=Vb(n,u,l,a,f,void 0,o),[p,m]=b.useState(0);hf("deviation",F=>{p!==F&&(d.current.style.marginTop=`${F}px`,m(F))});const g=Ie("EmptyPlaceholder"),v=Ie("ScrollSeekPlaceholder")||Aj,x=Ie("FillerRow")||Oj,y=Ie("TableBodyComponent"),T=Ie("TableRowComponent"),S=Ie("computeItemKey"),E=Ie("isSeeking"),R=Ie("paddingTopAddition"),A=Ie("firstItemIndex"),k=Ie("statefulTotalCount"),I=Ie("context");if(k===0&&g)return b.createElement(g,Ke(g,I));const j=t.offsetTop+R+p,D=t.offsetBottom,N=j>0?b.createElement(x,{height:j,key:"padding-top",context:I}):null,P=D>0?b.createElement(x,{height:D,key:"padding-bottom",context:I}):null,O=t.items.map(F=>{const _=F.originalIndex,W=S(_+A,F.data,I);return E?b.createElement(v,{...Ke(v,I),key:W,index:F.index,height:F.size,type:F.type||"item"}):b.createElement(T,{...Ke(T,I),...s0(T,F.data),key:W,"data-index":_,"data-known-size":F.size,"data-item-index":F.index,style:Dj},c(F.index,F.data,I))});return b.createElement(y,{ref:h,"data-testid":"virtuoso-item-list",...Ke(y,I)},[N,...O,P])}),kj=({children:e})=>{const t=b.useContext(ma),n=Gt("viewportHeight"),r=Gt("fixedItemHeight"),o=hn(b.useMemo(()=>fi(n,i=>Yt(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Do(!1),ref:o,"data-viewport-type":"element"},e)},Fj=({children:e})=>{const t=b.useContext(ma),n=Gt("windowViewportRect"),r=Gt("fixedItemHeight"),o=Ie("customScrollParent"),i=lf(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Do(!1),"data-viewport-type":"window"},e)},jj=b.memo(function(t){const n=Ie("useWindowScroll"),r=Ie("customScrollParent"),o=Gt("fixedHeaderHeight"),i=Gt("fixedFooterHeight"),s=Ie("fixedHeaderContent"),a=Ie("fixedFooterContent"),c=Ie("context"),l=hn(b.useMemo(()=>fi(o,x=>Yt(x,"height")),[o])),u=hn(b.useMemo(()=>fi(i,x=>Yt(x,"height")),[i])),f=r||n?_j:Lj,h=r||n?Fj:kj,d=Ie("TableComponent"),p=Ie("TableHeadComponent"),m=Ie("TableFooterComponent"),g=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:l,...Ke(p,c)},s()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Ke(m,c)},a()):null;return b.createElement(f,{...t},b.createElement(h,null,b.createElement(d,{style:{borderSpacing:0,overflowAnchor:"none"},...Ke(d,c)},[g,b.createElement(Mj,{key:"TableBody"}),v])))}),{Component:Nj,usePublisher:Gt,useEmitterValue:Ie,useEmitter:hf}=Ju(Ij,{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"}},jj),Lj=uf({usePublisher:Gt,useEmitterValue:Ie,useEmitter:hf}),_j=ff({usePublisher:Gt,useEmitterValue:Ie,useEmitter:hf}),Vj=Nj,$j=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},Bj={Item:b.forwardRef(function(t,n){return w.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return w.jsx("ul",{...t,ref:n,className:"space-y-3"})})},Wj=e=>{const t=b.useRef(null),n=$j(t);return w.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[w.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:[w.jsx("header",{className:"border-b border-card-border pb-2"}),w.jsxs("div",{className:"px-8 space-y-2",children:[w.jsx(Ii,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(dj,{height:n,useWindowScroll:!0,data:e.source,components:Bj,itemContent:(r,o)=>w.jsx(b.Fragment,{children:w.jsx(Tb,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(Hr,{children:w.jsx(bu,{})})}),w.jsx("div",{})]})};var Hj=Object.defineProperty,sm=Object.getOwnPropertySymbols,zj=Object.prototype.hasOwnProperty,Uj=Object.prototype.propertyIsEnumerable,am=(e,t,n)=>t in e?Hj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gj=(e,t)=>{for(var n in t||(t={}))zj.call(t,n)&&am(e,n,t[n]);if(sm)for(var n of sm(t))Uj.call(t,n)&&am(e,n,t[n]);return e},pf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Yj=(e,t,n,r)=>ga(pf,e,t,n,r),so=e=>typeof e=="object",jn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!so(e)&&!so(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=>jn(e[r],t[r]))},Kj=(e,t)=>(so(e)||Array.isArray(e))&&t?e[t]:e,qj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ws=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:jn,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)=>pf(t,n=>jn(e,n)),notIn:(e,t)=>c0(t,n=>!jn(e,n))},Xj=e=>{if(e in um)return um[e];throw new Error("Linq - Symbol not found")},Vr=(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},ga=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=Xj(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},Qj=(e,t,n,r)=>ga(Vr,e,t,n,r),c0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Zj=(e,t,n,r)=>ga(c0,e,t,n,r),u0=e=>{if(e===null)return null;const t=Gj({},e);return Object.keys(t).forEach(n=>t[n]=so(e[n])?u0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},fm=(e,t)=>{if(so(t)){for(let n=0;n<e.length;n++){const r=e[n];if(jn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(jn(t,r))return!0}return!1},Jj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},eN=e=>Vr(e,(t,n,r)=>so(t)?n===r.findIndex(o=>jn(o,t)):n===r.indexOf(t)),tN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},f0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},nN=(e,t)=>f0(e,n=>n[t]),dm=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},rN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},oN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Ws(e)&&Ws(t)?r.map(s=>Number.parseInt(s)):r},Sl=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ws(e)&&Ws(t)){const o=[],[i,s]=rN(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return oN(e,t,r)},iN=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Sl(r,o,1):Sl(r,i,Number.parseInt(o,10))}return lm(e)&&lm(t)?Sl(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},El=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,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 i=t[n];t[n]=t[r],t[r]=i}return t},sN=(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)},aN=(e,t,n,r)=>ga(sN,e,t,n,r),pm=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(qj(t))},d0=(e=>(e.Asc="asc",e.Desc="desc",e))(d0||{}),lN=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),cN=(e,t)=>e.sort(lN(t)),uN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Vr(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},fN=class Dc{constructor(t=[]){this.array=t}static Range(...t){return iN(...t)}static New(t){return new Dc(t)}Where(t,n,r){return this.array=Qj(this.array,t,n,r),this}Some(t,n,r){return Yj(this.array,t,n,r)}All(t,n,r){return Zj(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=aN(this.array,t,n,r),this}Distinct(){return this.array=eN(this.array),this}First(t){return t===void 0?this.array[0]:tN(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?El((n,r)=>n+r,0,this.array):El((n,r)=>n+Kj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return nN(this.array,t)}GroupWith(t){return f0(this.array,t)}Except(t){return Vr(this.array,n=>!fm(t,n))}Intersect(t){return Vr(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 pf(this.array,n=>jn(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 El(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:Vr(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Dc(u0(this.array))}ToObject(t){return Jj(this.array,t)}Sort(t){return Array.isArray(t)?cN(this.array,t):pm(this.array,t)}Unique(t){return uN(this.array,t)}},h0=fN,Mc={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,v)=>{try{Object.keys(g).forEach(v)}catch(x){window.console.log(x)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const x=v.getItem(g);try{return JSON.parse(x)}catch{return x??null}},i=g=>Object.keys(g).reduce((v,x)=>({...v,[x]:o(x,g)}),{}),s=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",c=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),l=new Set,u=()=>{const g=c();l.forEach(v=>v(g))},f=[{name:"expires",parse:g=>`expires=${s(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${s(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":""}],h={json:c,listener:g=>(l.add(g),()=>l.delete(g)),clearListeners:()=>l.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=h.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,x={})=>{const y=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=f.reduce((S,E)=>{const R=E.parse(x);return R===""?S:S.concat(R)},[`${encodeURIComponent(g)}=${y}`]).join(";");document.cookie=T,u()}},d=g=>{const v=new Set,x=y=>{g().removeItem(y);const T=i(g());v.forEach(S=>S(T))};return{delete:x,listener:y=>(v.add(y),()=>v.delete(y)),clearListeners:()=>v.clear(),json:(y=!1)=>y?i(g()):g(),has:y=>{const T=g().getItem(y);return!n(T)},deleteAll:()=>{t(g(),x),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=d(()=>window.sessionStorage),m=d(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=d})(Mc);const mf=e=>e.headerLabel??e.thead??e.id,gf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var $r=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))($r||{});const yf=e=>e.type==="number"?e.valueAsNumber:e.value,dN=e=>{let t=[];return e({add:(o,i,s)=>t.push({...s,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},hN={},pN=(e,t=hN)=>{const n=Es()?null:Mc.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Pu({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},i=>{const s=a=>{const c=i.state(),l={...c,...a};return Es()||Mc.LocalStorage.set(`@unamed/table-${c.name}`,l),l};return{set:a=>s(a)}});return{...r,...o,name:e}},kc=(e,t,n,r={})=>{var c;const o=e.id,i=e.type??$r.Text,s=(c=t[i])==null?void 0:c[0].value,a=n[s];return{id:ta(),operation:a,label:mf(e),name:o,type:i,value:"",...r}},vf=()=>{const e=Dt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},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{operationOptions:b.useMemo(()=>({[$r.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[$r.Boolean]:[t.is,t.isNot],[$r.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},mN=e=>{const t=Dt(),{operationOptions:n,operations:r}=vf(),o=()=>{const l=e.cols.at(0);e.set(u=>[...u,kc(l,n,r)])},i=l=>{const u=l.target.dataset.id||"",f=l.target.value;e.set(h=>h.map(d=>{if(u!==d.id)return d;const p=e.cols.find(m=>f===m.id);return kc(p,n,r,{value:""})}))},s=l=>{const u=l.target.dataset.id||"",f=l.target.value;e.set(h=>h.map(d=>d.id===u?{...d,operation:r[f]}:d))},a=l=>{const u=l.currentTarget.dataset.id||"";e.set(f=>f.filter(h=>h.id!==u))},c=l=>{const u=l.target.dataset.id||"",f=yf(l.target);e.set(h=>h.map(d=>d.id===u?{...d,value:f}:d))};return w.jsx(b.Fragment,{children:w.jsx(Ro,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(bP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const u=n[l.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(yr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:i}),w.jsx(yr,{"data-id":l.id,onChange:s,value:l.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(Ii,{"data-id":l.id,onChange:c,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),w.jsx("div",{className:"flex items-center justify-center mt-5",children:w.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:w.jsx(Xr,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},gN=({filter:e,onDelete:t,set:n})=>{const r=Dt(),{operationOptions:o,operations:i}=vf(),s=c=>{const l=c.target.value,u=c.target.dataset.id||"";n(f=>f.map(h=>h.id===u?{...h,operation:i[l]}:h))},a=c=>{const l=c.target.dataset.id||"",u=yf(c.target);n(f=>f.map(h=>h.id===l?{...h,value:u}:h))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(yr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),w.jsx(Ii,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),w.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:w.jsx(Xr,{className:"text-danger",size:14})})]})},yN=({item:e,onPointerDown:t})=>{const n=qr(0);return w.jsxs(Js.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[w.jsx("button",{type:"button",className:"cursor-grab",children:w.jsx(vP,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},vN=e=>{var c;const t=Dt(),n=gf(e.cols),r=iP(),[o,i]=b.useState(((c=e.groups[0])==null?void 0:c.thead)||""),s=l=>{var g;const u=l.target,f=u.value,h=u.options.selectedIndex,d=((g=u.options.item(h))==null?void 0:g.label)||"";i(d);const p=new h0(e.rows).GroupBy(f),m=e.cols.find(v=>v.id===f);e.setGroups(xw(p).map((v,x)=>{const y=p[v];return{...m,groupId:ta(),groupKey:f,index:x,rows:y,groupName:v}}))},a=()=>e.setGroups([]);return w.jsx(b.Fragment,{children:w.jsxs(Ro,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(SP,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[w.jsxs("div",{className:"flex flex-nowrap items-center",children:[w.jsx(yr,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),w.jsx(Hr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx(Xr,{size:16,className:"text-danger"})})]}),e.groups.length>0?w.jsxs("section",{className:"my-4",children:[w.jsx("header",{children:w.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),w.jsx(PC,{children:w.jsx(Js.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(l=>w.jsx(yN,{item:l,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},bN=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),xN=(e,t)=>e.toSorted(bN(t)),p0=(e,t,n)=>({id:ta(),type:n,value:e.id,label:t}),wN=e=>{const t=Dt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const c=e.cols[0];c&&e.set(l=>[...l,p0(c,n.asc.label,n.asc.value)])},i=c=>l=>{const u=l.target.value;e.set(f=>f.map(h=>h.id===c?{...h,value:u}:h))},s=c=>l=>{const u=l.target.value;e.set(f=>f.map(h=>h.id===c?{...h,type:u}:h))},a=c=>{const l=c.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==l))};return w.jsx(b.Fragment,{children:w.jsx(Ro,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Ay,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(c=>w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(yr,{options:e.options,value:c.value,onChange:i(c.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(yr,{onChange:s(c.id),value:c.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),w.jsx("button",{className:"mt-4","data-id":c.id,onClick:a,children:w.jsx(Xr,{className:"text-danger",size:14})})]},`sorter-select-${c.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(xu,{size:14})," ",t.tableSortAddButton]})})]})})})},TN=e=>{const t=Dt(),[n,r]=b.useState(()=>{const a=e.sorters.find(c=>c.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const c=a.findIndex(u=>u.value===e.col.id),l=p0(e.col,n,n);return c===-1?[...a,l]:(a[c]=l,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=mf(e.col);return w.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[w.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?w.jsx(dP,{size:14}):null,n==="desc"?w.jsx(fP,{size:14}):null,n==="undefined"?w.jsx(Ay,{size:14}):null]})},SN=e=>w.jsx("header",{className:"min-w-full mb-1",children:w.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[w.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[w.jsx("span",{children:w.jsx(mN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(wN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(vN,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),w.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=>w.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[w.jsxs("span",{children:[w.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),w.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[w.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),w.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=yf(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function EN(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,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const CN=e=>{const t=b.useId(),n=Dt(),r=e.asLink||"button",o=b.useMemo(()=>EN(e.current,e.pages),[e.current,e.pages]),i=e.current<e.pages;return w.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[w.jsx("p",{children:w.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?w.jsxs(b.Fragment,{children:[w.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),w.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:s=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(s.target.value))},children:e.sizes.map(s=>w.jsx("option",{value:s,children:s},`pagination-opt-${s}`))})," "]}):null})}),w.jsx("nav",{children:w.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?w.jsx("li",{children:w.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(s=>s===null?null:w.jsx(b.Fragment,{children:typeof s=="string"?w.jsx("li",{children:"..."}):w.jsx("li",{children:w.jsx(r,{href:s,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${s===e.current?"text-primary border-primary":"border-transparent"}`,children:s})})},`pagination-${s}`)),i?w.jsx("li",{children:w.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},PN={opacity:1},RN={opacity:.75,backgroundColor:"var(--table-border)"},IN={opacity:0,transition:{duration:.4,type:"spring"}},AN=e=>{var f;const t=Dt(),n=e.filters.filter(h=>h.name===e.header.id),o=n.length>0?xP:wP,{operationOptions:i,operations:s}=vf(),a=h=>{const d=h.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==d))},c=e.sorters.find(h=>e.header.id===h.value),l=c!=null&&c.type?c.type===d0.Asc?"ascending":"descending":"none",u=mf(e.header);return w.jsx(Js.Item,{...e.header.thProps,as:"th",layout:!0,exit:IN,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:RN,"aria-sort":l,"aria-busy":e.loading,animate:PN,className:`hidden px-2 py-4 font-medium first:table-cell md:table-cell ${((f=e.header.thProps)==null?void 0:f.className)??""}`,children:w.jsx("span",{className:"flex items-center justify-between",children:w.jsxs("span",{className:"flex items-center gap-1",children:[w.jsx(Ro,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),e.inlineFilter?w.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14}):null]}),title:w.jsxs("span",{className:"font-medium text-lg",children:[t.tableFilterDropdownTitleUnique," ",w.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:w.jsxs("ul",{className:"font-medium",children:[n.map(h=>w.jsx("li",{className:"my-1",children:w.jsx(gN,{onDelete:a,filter:h,set:e.setFilters})},`thead-filter-${h.id}`)),w.jsx("li",{children:w.jsxs("button",{onClick:()=>e.setFilters(h=>h.concat(kc(e.header,i,s))),type:"button",className:"flex items-center gap-1 text-primary",children:[w.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})}),w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter?w.jsx(TN,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})})})},ON=e=>w.jsx(Js.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"border-none bg-table-background text-lg",children:w.jsx(go,{children:e.headers.map(t=>w.jsx(AN,{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}`))})}),m0=b.createContext({}),DN=()=>b.useContext(m0),MN=b.forwardRef((e,t)=>w.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:w.jsx(go,{children:e.children})})),kN=b.forwardRef((e,t)=>w.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${e.className??""}`})),FN=b.forwardRef(({context:e,...t},n)=>{var i;const r=DN(),o={...t==null?void 0:t.style,sticky:vn.number(r.sticky)?`${r.sticky}px`:(i=t==null?void 0:t.style)==null?void 0:i.sticky};return w.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),jN=b.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),NN=b.forwardRef((e,t)=>e.context.loadingMore?w.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:w.jsx("tr",{role:"row",className:"bg-card-background",children:w.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:w.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),LN={TableHead:FN,Table:kN,TableBody:MN,TableRow:jN,TableFoot:NN},_N=[0,0,0,0,0,0,0,0,0,0],VN=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(b.Fragment,{children:r.map((i,s)=>{var f;const a=`${s},${e}`,c=Ou(t,i.id),l=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"";return b.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`hidden h-14 border-none px-2 first:table-cell md:table-cell ${u}`},o?w.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}):l?w.jsx(l,{row:t,matrix:a,col:i,rowIndex:e,value:c}):w.jsx(b.Fragment,{children:vn.nil(c)?"":c}))})})},$N=()=>w.jsx(b.Fragment,{}),mm=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:c=!1,setSorters:l,...u})=>{const f=b.useRef(null),[h,d]=b.useState(!1),p=Cc(n),m=Cc(u.loadingMore),g=b.useMemo(()=>{if(u.loading)return _N;if(r)return u.rows;const v=new h0(u.rows);return e.length>0&&e.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:v.Where(x.name,x.operation.symbol,x.value)),s.length===0?v.Select():xN(v.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(f.current===null)return()=>{};const v=f.current,x=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void d(!0)):d(!1)});return x.observe(v),()=>x.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg px-1 ${c?"border border-table-border":""}`,children:[w.jsx(Vj,{data:g,useWindowScroll:!0,components:LN,totalCount:g.length,itemContent:VN,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?$N:null,fixedHeaderContent:()=>w.jsx(ON,{filters:e,headers:a,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter,loading:!!u.loading,setCols:o,setFilters:i,setSorters:l,sorters:s})}),w.jsx("div",{"aria-hidden":"true",ref:f,className:"h-0.5 w-full"})]}),t!==null?w.jsx(CN,{...t}):null]})},BN=(e,t)=>typeof t=="function"?t(e):t,Zi=(e,t,n)=>e===t||n==null?void 0:n(t),WN=e=>{const t=b.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=b.useMemo(()=>gf(e.cols),[e.cols]),[o,i]=Pu({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const a=c=>l=>{const u=s.state();return{...u,[c]:BN(u[c],l)}};return{cols:a("cols"),filters:a("filters"),groups:a("groups"),sorters:a("sorters")}},{postMiddleware:[(s,a)=>{var c;return console.log("->",s,a),(c=e.set)==null||c.call(e,s),Zi((a==null?void 0:a.filters)??[],s.filters??[],e.setFilters),Zi((a==null?void 0:a.sorters)??[],s.sorters??[],e.setSorters),Zi((a==null?void 0:a.groups)??[],s.groups??[],e.setGroups),Zi((a==null?void 0:a.cols)??[],s.cols??[],e.setCols),s}]});return w.jsx(m0.Provider,{value:t,children:w.jsxs("div",{className:"relative min-w-full",children:[n?w.jsx(SN,{cols:o.cols,filters:o.filters,groups:o.groups,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,options:r,pagination:e.pagination??null,rows:e.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters}):null,o.groups.length===0?w.jsx(mm,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,groups:o.groups,index:0,optionCols:r,options:r,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters,pagination:e.pagination??null}):w.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((s,a)=>w.jsx(ft.div,{className:"min-w-full",children:w.jsx(mm,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,pagination:null,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,group:s,groups:o.groups,index:a,optionCols:r,options:r,rows:s.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters})},`group-${s.groupId}`))})]})})};var HN=String.prototype.replace,zN=/%20/g,Cl={RFC1738:"RFC1738",RFC3986:"RFC3986"},bf={default:Cl.RFC3986,formatters:{RFC1738:function(e){return HN.call(e,zN,"+")},RFC3986:function(e){return String(e)}},RFC1738:Cl.RFC1738,RFC3986:Cl.RFC3986},UN=bf,Pl=Object.prototype.hasOwnProperty,sr=Array.isArray,Xt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),GN=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(sr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},g0=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},YN=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(sr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Pl.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 sr(t)&&!sr(n)&&(o=g0(t,r)),sr(t)&&sr(n)?(n.forEach(function(i,s){if(Pl.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Pl.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},KN=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},qN=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}},Rl=1024,XN=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",c=0;c<s.length;c+=Rl){for(var l=s.length>=Rl?s.slice(c,c+Rl):s,u=[],f=0;f<l.length;++f){var h=l.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===UN.RFC1738&&(h===40||h===41)){u[u.length]=l.charAt(f);continue}if(h<128){u[u.length]=Xt[h];continue}if(h<2048){u[u.length]=Xt[192|h>>6]+Xt[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=Xt[224|h>>12]+Xt[128|h>>6&63]+Xt[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|l.charCodeAt(f)&1023),u[u.length]=Xt[240|h>>18]+Xt[128|h>>12&63]+Xt[128|h>>6&63]+Xt[128|h&63]}a+=u.join("")}return a},QN=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),c=0;c<a.length;++c){var l=a[c],u=s[l];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:l}),r.push(u))}return GN(n),t},ZN=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},JN=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},eL=function(t,n){return[].concat(t,n)},tL=function(t,n){if(sr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},y0={arrayToObject:g0,assign:KN,combine:eL,compact:QN,decode:qN,encode:XN,isBuffer:JN,isRegExp:ZN,maybeMap:tL,merge:YN},v0=mw,cs=y0,ti=bf,nL=Object.prototype.hasOwnProperty,b0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Qt=Array.isArray,rL=Array.prototype.push,x0=function(e,t){rL.apply(e,Qt(t)?t:[t])},oL=Date.prototype.toISOString,gm=ti.default,it={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:cs.encode,encodeValuesOnly:!1,format:gm,formatter:ti.formatters[gm],indices:!1,serializeDate:function(t){return oL.call(t)},skipNulls:!1,strictNullHandling:!1},iL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Il={},sL=function e(t,n,r,o,i,s,a,c,l,u,f,h,d,p,m,g,v,x){for(var y=t,T=x,S=0,E=!1;(T=T.get(Il))!==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(Il)>"u"&&(S=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=d(y):r==="comma"&&Qt(y)&&(y=cs.maybeMap(y,function(M){return M instanceof Date?d(M):M})),y===null){if(s)return l&&!g?l(n,it.encoder,v,"key",p):n;y=""}if(iL(y)||cs.isBuffer(y)){if(l){var A=g?n:l(n,it.encoder,v,"key",p);return[m(A)+"="+m(l(y,it.encoder,v,"value",p))]}return[m(n)+"="+m(String(y))]}var k=[];if(typeof y>"u")return k;var I;if(r==="comma"&&Qt(y))g&&l&&(y=cs.maybeMap(y,l)),I=[{value:y.length>0?y.join(",")||null:void 0}];else if(Qt(u))I=u;else{var j=Object.keys(y);I=f?j.sort(f):j}var D=c?n.replace(/\./g,"%2E"):n,N=o&&Qt(y)&&y.length===1?D+"[]":D;if(i&&Qt(y)&&y.length===0)return N+"[]";for(var P=0;P<I.length;++P){var O=I[P],F=typeof O=="object"&&typeof O.value<"u"?O.value:y[O];if(!(a&&F===null)){var _=h&&c?O.replace(/\./g,"%2E"):O,W=Qt(y)?typeof r=="function"?r(N,_):N:N+(h?"."+_:"["+_+"]");x.set(t,S);var U=v0();U.set(Il,x),x0(k,e(F,W,r,o,i,s,a,c,r==="comma"&&g&&Qt(y)?null:l,u,f,h,d,p,m,g,v,U))}}return k},aL=function(t){if(!t)return it;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||it.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=ti.default;if(typeof t.format<"u"){if(!nL.call(ti.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ti.formatters[r],i=it.filter;(typeof t.filter=="function"||Qt(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in b0?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=it.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:it.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:it.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:it.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:it.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?it.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:it.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:it.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:it.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:it.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:it.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:it.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:it.strictNullHandling}},lL=function(e,t){var n=e,r=aL(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Qt(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=b0[r.arrayFormat],c=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var l=v0(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||x0(s,sL(n[f],f,a,c,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,l))}var h=s.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:""},ao=y0,Fc=Object.prototype.hasOwnProperty,cL=Array.isArray,Ze={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ao.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},uL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},w0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},fL="utf8=%26%2310003%3B",dL="utf8=%E2%9C%93",hL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,c,l=n.charset;if(n.charsetSentinel)for(c=0;c<s.length;++c)s[c].indexOf("utf8=")===0&&(s[c]===dL?l="utf-8":s[c]===fL&&(l="iso-8859-1"),a=c,c=s.length);for(c=0;c<s.length;++c)if(c!==a){var u=s[c],f=u.indexOf("]="),h=f===-1?u.indexOf("="):f+1,d,p;h===-1?(d=n.decoder(u,Ze.decoder,l,"key"),p=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,h),Ze.decoder,l,"key"),p=ao.maybeMap(w0(u.slice(h+1),n),function(g){return n.decoder(g,Ze.decoder,l,"value")})),p&&n.interpretNumericEntities&&l==="iso-8859-1"&&(p=uL(p)),u.indexOf("[]=")>-1&&(p=cL(p)?[p]:p);var m=Fc.call(r,d);m&&n.duplicates==="combine"?r[d]=ao.combine(r[d],p):(!m||n.duplicates==="last")&&(r[d]=p)}return r},pL=function(e,t,n,r){for(var o=r?t:w0(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,l=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,u=parseInt(l,10);!n.parseArrays&&l===""?s={0:o}:!isNaN(u)&&a!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):l!=="__proto__"&&(s[l]=o)}o=s}return o},mL=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=r.depth>0&&s.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!r.plainObjects&&Fc.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var f=0;r.depth>0&&(c=a.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Fc.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),pL(u,n,r,o)}},gL=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"||ao.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}},yL=function(e,t){var n=gL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?hL(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],c=mL(a,r[a],n,typeof e=="string");o=ao.merge(o,c,n)}return n.allowSparse===!0?o:ao.compact(o)},vL=lL,bL=yL,xL=bf,wL={formats:xL,parse:bL,stringify:vL};const TL=(e,t)=>e.localeCompare(t),SL={sort:TL,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},T0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return wL.parse(n.toString(),SL)},S0=e=>e.replace("[",".").replace("]","").split("."),Bo=(e,t)=>S0(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),_o=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),EL=(e,t)=>{const[n,r]=b.useState(null),o=b.useRef({}),[i,s]=b.useState({}),a=(p,m)=>{const g=Bo(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=Bo(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=Bo(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=Bo(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})}}};b.useEffect(()=>{const p=Object.values(o.current).map(g=>{const v=g.element.dataset.origin?document.querySelector(`[data-target="${g.element.name}"]`):g.element,x=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):""),A=g.schema.safeParse(R);if(A.success)return v.setCustomValidity(""),s(I=>Da(I,E,A.data)),r(I=>{const{[E]:j,...D}=I||{};return D===null||vn.empty(D)?null:D});if(v.required){const I=((k=A.error.issues[0])==null?void 0:k.message)||"";v.setCustomValidity(I),r(j=>({...j,[E]:I}))}},T=v.getAttribute("data-trigger")||"blur";return v.addEventListener(T,y),v.tagName==="SELECT"&&v.addEventListener("change",y),{input:g,hasInitialError:v.required?!x.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 f=b.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 A=S.dataset.name||S.name||"";return{...y,[A]:R}},{}),x=vn.empty(v)?null:v;r(x),p==null||p({form:g,errors:x||{}})},[]),h=b.useCallback(p=>m=>{m.preventDefault();const g=m.currentTarget;let v=T0(g);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(g.elements)).forEach(T=>{if(T.tagName==="SELECT"){const S=T;v=Da(v,S.name,S.value)}if(T.tagName==="INPUT"){const S=T;v=Da(v,S.name,_o(S))}});const y=e.safeParse(i);return y.success?p({form:g,json:v,data:y.data,event:m,reset:()=>Ec(g),success:!0,errors:[]}):p({form:g,json:v,event:m,data:v,success:!1,reset:()=>Ec(g),errors:y.error.issues.map(T=>({message:T.message,path:T.path.map(S=>String(S))}))})},[t]);return{state:i,input:u,datepicker:a,checkbox:l,select:c,onSubmit:h,errors:n,onInvalid:f,disabled:n!==null,name:t,get:p=>Ou(i,p)||""}},CL=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=RP;exports.Autocomplete=_M;exports.Button=Hr;exports.Calendar=fv;exports.Card=dv;exports.Checkbox=Tb;exports.ColType=$r;exports.Collapse=ky;exports.ComponentsProvider=mA;exports.DatePicker=$M;exports.Dropdown=Ro;exports.Expand=xM;exports.FileUpload=Zk;exports.Form=eF;exports.Input=Ii;exports.InputFeedback=xb;exports.InputField=ua;exports.Menu=SM;exports.MenuItem=TM;exports.Modal=MM;exports.Notifications=bO;exports.Option=wb;exports.Polymorph=ho;exports.Radiobox=tF;exports.RenderOnView=o1;exports.Select=yr;exports.Stats=xO;exports.Switch=nF;exports.Tab=SO;exports.Table=WN;exports.Tabs=wO;exports.Tag=a1;exports.TaskList=rF;exports.Toolbar=kM;exports.Tooltip=bb;exports.TransferList=Wj;exports.convertPath=S0;exports.createColumns=dN;exports.createDesignTokens=sv;exports.createOptionCols=gf;exports.createStyles=cA;exports.createTheme=uA;exports.css=ke;exports.defaultDarkTheme=hA;exports.defaultLightTheme=pA;exports.dispatchInput=$m;exports.formReset=Ec;exports.formToJson=T0;exports.getSchemaShape=Bo;exports.initializeInputDataset=Hs;exports.isReactComponent=e1;exports.isReactFC=t1;exports.isSsr=Es;exports.mergeRefs=Hc;exports.parsers=Ru;exports.path=Ou;exports.reduceTokens=Xo;exports.safeRegex=oc;exports.splitInto=cv;exports.useForm=EL;exports.useNotification=yO;exports.usePrevious=CL;exports.useReactive=jv;exports.useTablePreferences=pN;exports.useTranslations=Dt;exports.uuid=ta;
|
|
201
201
|
//# sourceMappingURL=index.js.map
|