@g4rcez/components 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/core/button.d.ts.map +1 -1
- package/dist/components/core/resizable.d.ts.map +1 -1
- package/dist/components/core/resizable.js +21 -18
- package/dist/components/core/tag.d.ts +5 -1
- package/dist/components/core/tag.d.ts.map +1 -1
- package/dist/components/core/tag.js +20 -7
- package/dist/components/display/calendar.d.ts +39 -8
- package/dist/components/display/calendar.d.ts.map +1 -1
- package/dist/components/display/calendar.js +111 -53
- package/dist/components/display/list.d.ts.map +1 -1
- package/dist/components/display/list.js +1 -3
- package/dist/components/display/timeline.d.ts +32 -0
- package/dist/components/display/timeline.d.ts.map +1 -0
- package/dist/components/display/timeline.js +21 -0
- package/dist/components/floating/dropdown.d.ts.map +1 -1
- package/dist/components/floating/dropdown.js +1 -2
- package/dist/components/floating/expand.d.ts +9 -0
- package/dist/components/floating/expand.d.ts.map +1 -0
- package/dist/components/floating/expand.js +25 -0
- package/dist/components/floating/menu.d.ts +5 -2
- package/dist/components/floating/menu.d.ts.map +1 -1
- package/dist/components/floating/menu.js +5 -4
- package/dist/components/floating/modal.d.ts +1 -0
- package/dist/components/floating/modal.d.ts.map +1 -1
- package/dist/components/floating/modal.js +3 -1
- package/dist/components/floating/tooltip.d.ts +3 -1
- package/dist/components/floating/tooltip.d.ts.map +1 -1
- package/dist/components/floating/tooltip.js +9 -16
- package/dist/components/form/autocomplete.d.ts.map +1 -1
- package/dist/components/form/autocomplete.js +14 -23
- package/dist/components/form/date-picker.d.ts +56 -2
- package/dist/components/form/date-picker.d.ts.map +1 -1
- package/dist/components/form/date-picker.js +16 -11
- package/dist/components/form/input.d.ts.map +1 -1
- package/dist/components/form/input.js +1 -1
- package/dist/components/form/switch.d.ts +1 -1
- package/dist/components/form/switch.d.ts.map +1 -1
- package/dist/components/form/switch.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/hooks/use-form.d.ts.map +1 -1
- package/dist/hooks/use-form.js +1 -3
- package/dist/hooks/use-translate-context.d.ts +5 -1
- package/dist/hooks/use-translate-context.d.ts.map +1 -1
- package/dist/hooks/use-translate-context.js +3 -1
- package/dist/index.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7414 -7324
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +47 -42
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/fns.d.ts +1 -0
- package/dist/lib/fns.d.ts.map +1 -1
- package/dist/lib/fns.js +10 -0
- package/dist/preset/src/styles/theme.js +2 -2
- package/dist/styles/theme.js +2 -2
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(ee,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(ee=typeof globalThis<"u"?globalThis:ee||self,b(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,b,x,Qd){"use strict";var BL=Object.defineProperty;var zL=(ee,b,x)=>b in ee?BL(ee,b,{enumerable:!0,configurable:!0,writable:!0,value:x}):ee[b]=x;var ie=(ee,b,x)=>zL(ee,typeof b!="symbol"?b+"":b,x);function Jd(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 A=Jd(b),ef=Jd(Qd);function tf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=tf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function $0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=tf(e))&&(r&&(r+=" "),r+=t);return r}const nf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,rf=$0,as=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=nf(u)||nf(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...i,...a}[m]):{...i,...a}[m]===g})?[...c,d,f]:c},[]);return rf(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function of(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=of(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function R0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=of(e))&&(r&&(r+=" "),r+=t);return r}var sf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function B0(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 z0=Error,W0=EvalError,H0=RangeError,U0=ReferenceError,af=SyntaxError,Zo=TypeError,G0=URIError,Y0=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},lf=typeof Symbol<"u"&&Symbol,q0=Y0,K0=function(){return typeof lf!="function"||typeof Symbol!="function"||typeof lf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:q0()},tl={__proto__:null,foo:{}},Z0=Object,X0=function(){return{__proto__:tl}.foo===tl.foo&&!(tl instanceof Z0)},Q0="Function.prototype.bind called on incompatible ",J0=Object.prototype.toString,ew=Math.max,tw="[object Function]",cf=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},nw=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},rw=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},ow=function(t){var n=this;if(typeof n!="function"||J0.apply(n)!==tw)throw new TypeError(Q0+n);for(var r=nw(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,cf(r,arguments));return Object(u)===u?u:this}return n.apply(t,cf(r,arguments))},s=ew(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+rw(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},iw=ow,nl=Function.prototype.bind||iw,sw=Function.prototype.call,aw=Object.prototype.hasOwnProperty,lw=nl,cw=lw.call(sw,aw),Te,uw=z0,dw=W0,fw=H0,hw=U0,Yr=af,qr=Zo,pw=G0,uf=Function,rl=function(e){try{return uf('"use strict"; return ('+e+").constructor;")()}catch{}},yr=Object.getOwnPropertyDescriptor;if(yr)try{yr({},"")}catch{yr=null}var ol=function(){throw new qr},mw=yr?function(){try{return arguments.callee,ol}catch{try{return yr(arguments,"callee").get}catch{return ol}}}():ol,Kr=K0(),gw=X0(),yt=Object.getPrototypeOf||(gw?function(e){return e.__proto__}:null),Zr={},yw=typeof Uint8Array>"u"||!yt?Te:yt(Uint8Array),vr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":Kr&&yt?yt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":Zr,"%AsyncGenerator%":Zr,"%AsyncGeneratorFunction%":Zr,"%AsyncIteratorPrototype%":Zr,"%Atomics%":typeof Atomics>"u"?Te:Atomics,"%BigInt%":typeof BigInt>"u"?Te:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Te:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Te:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Te:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":uw,"%eval%":eval,"%EvalError%":dw,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":uf,"%GeneratorFunction%":Zr,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Kr&&yt?yt(yt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Kr||!yt?Te:yt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Te:Promise,"%Proxy%":typeof Proxy>"u"?Te:Proxy,"%RangeError%":fw,"%ReferenceError%":hw,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Kr||!yt?Te:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Kr&&yt?yt(""[Symbol.iterator]()):Te,"%Symbol%":Kr?Symbol:Te,"%SyntaxError%":Yr,"%ThrowTypeError%":mw,"%TypedArray%":yw,"%TypeError%":qr,"%Uint8Array%":typeof Uint8Array>"u"?Te:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Te:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Te:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Te:Uint32Array,"%URIError%":pw,"%WeakMap%":typeof WeakMap>"u"?Te:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Te:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Te:WeakSet};if(yt)try{null.error}catch(e){var vw=yt(yt(e));vr["%Error.prototype%"]=vw}var bw=function e(t){var n;if(t==="%AsyncFunction%")n=rl("async function () {}");else if(t==="%GeneratorFunction%")n=rl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=rl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&yt&&(n=yt(o.prototype))}return vr[t]=n,n},df={__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"]},Xo=nl,ls=cw,ww=Xo.call(Function.call,Array.prototype.concat),xw=Xo.call(Function.apply,Array.prototype.splice),ff=Xo.call(Function.call,String.prototype.replace),cs=Xo.call(Function.call,String.prototype.slice),Tw=Xo.call(Function.call,RegExp.prototype.exec),Sw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ew=/\\(\\)?/g,Cw=function(t){var n=cs(t,0,1),r=cs(t,-1);if(n==="%"&&r!=="%")throw new Yr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Yr("invalid intrinsic syntax, expected opening `%`");var o=[];return ff(t,Sw,function(i,s,a,l){o[o.length]=a?ff(l,Ew,"$1"):s||i}),o},Pw=function(t,n){var r=t,o;if(ls(df,r)&&(o=df[r],r="%"+o[0]+"%"),ls(vr,r)){var i=vr[r];if(i===Zr&&(i=bw(r)),typeof i>"u"&&!n)throw new qr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Yr("intrinsic "+t+" does not exist!")},Xr=function(t,n){if(typeof t!="string"||t.length===0)throw new qr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new qr('"allowMissing" argument must be a boolean');if(Tw(/^%?[^%]*%?$/,t)===null)throw new Yr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Cw(t),o=r.length>0?r[0]:"",i=Pw("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],xw(r,ww([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=cs(f,0,1),p=cs(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Yr("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,s="%"+o+"%",ls(vr,s))a=vr[s];else if(a!=null){if(!(f in a)){if(!n)throw new qr("base intrinsic for "+t+" exists, but the property is not available.");return}if(yr&&u+1>=r.length){var m=yr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=ls(a,f),a=a[f];d&&!l&&(vr[s]=a)}}return a},hf={exports:{}},il,pf;function sl(){if(pf)return il;pf=1;var e=Xr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return il=t,il}var kw=Xr,us=kw("%Object.getOwnPropertyDescriptor%",!0);if(us)try{us([],"length")}catch{us=null}var mf=us,gf=sl(),Ow=af,Qr=Zo,yf=mf,Iw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Qr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Qr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Qr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Qr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Qr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Qr("`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,l=!!yf&&yf(t,n);if(gf)gf(t,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new Ow("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},al=sl(),vf=function(){return!!al};vf.hasArrayLengthDefineBug=function(){if(!al)return null;try{return al([],"length",{value:1}).length!==1}catch{return!0}};var Aw=vf,_w=Xr,bf=Iw,Dw=Aw(),wf=mf,xf=Zo,Mw=_w("%Math.floor%"),Nw=function(t,n){if(typeof t!="function")throw new xf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Mw(n)!==n)throw new xf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&wf){var s=wf(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Dw?bf(t,"length",n,!0,!0):bf(t,"length",n)),t};(function(e){var t=nl,n=Xr,r=Nw,o=Zo,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),l=sl(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,s,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(hf);var Fw=hf.exports,Tf=Xr,Sf=Fw,Lw=Sf(Tf("String.prototype.indexOf")),Vw=function(t,n){var r=Tf(t,!!n);return typeof r=="function"&&Lw(t,".prototype.")>-1?Sf(r):r};const $w=B0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ll=typeof Map=="function"&&Map.prototype,cl=Object.getOwnPropertyDescriptor&&ll?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ds=ll&&cl&&typeof cl.get=="function"?cl.get:null,Ef=ll&&Map.prototype.forEach,ul=typeof Set=="function"&&Set.prototype,dl=Object.getOwnPropertyDescriptor&&ul?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,fs=ul&&dl&&typeof dl.get=="function"?dl.get:null,Cf=ul&&Set.prototype.forEach,Rw=typeof WeakMap=="function"&&WeakMap.prototype,Qo=Rw?WeakMap.prototype.has:null,jw=typeof WeakSet=="function"&&WeakSet.prototype,Jo=jw?WeakSet.prototype.has:null,Bw=typeof WeakRef=="function"&&WeakRef.prototype,Pf=Bw?WeakRef.prototype.deref:null,zw=Boolean.prototype.valueOf,Ww=Object.prototype.toString,Hw=Function.prototype.toString,Uw=String.prototype.match,fl=String.prototype.slice,zn=String.prototype.replace,Gw=String.prototype.toUpperCase,kf=String.prototype.toLowerCase,Of=RegExp.prototype.test,If=Array.prototype.concat,un=Array.prototype.join,Yw=Array.prototype.slice,Af=Math.floor,hl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pl=Object.getOwnPropertySymbols,ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Jr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Jr||!0)?Symbol.toStringTag:null,_f=Object.prototype.propertyIsEnumerable,Df=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Mf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Of.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Af(-e):Af(e);if(r!==e){var o=String(r),i=fl.call(t,o.length+1);return zn.call(o,n,"$&_")+"."+zn.call(zn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return zn.call(t,n,"$&_")}var gl=$w,Nf=gl.custom,Ff=$f(Nf)?Nf:null,qw=function e(t,n,r,o){var i=n||{};if(Wn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Wn(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=Wn(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(Wn(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(Wn(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 jf(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Mf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Mf(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return yl(t)?"[Array]":"[Object]";var d=fx(i,r);if(typeof o>"u")o=[];else if(Rf(o,t)>=0)return"[Circular]";function f($,C,O){if(C&&(o=Yw.call(o),o.push(C)),O){var M={depth:i.depth};return Wn(i,"quoteStyle")&&(M.quoteStyle=i.quoteStyle),e($,M,r+1,o)}return e($,i,r+1,o)}if(typeof t=="function"&&!Vf(t)){var h=rx(t),p=hs(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if($f(t)){var m=Jr?zn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ml.call(t);return typeof t=="object"&&!Jr?ei(m):m}if(cx(t)){for(var g="<"+kf.call(String(t.nodeName)),v=t.attributes||[],w=0;w<v.length;w++)g+=" "+v[w].name+"="+Lf(Kw(v[w].value),"double",i);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+kf.call(String(t.nodeName))+">",g}if(yl(t)){if(t.length===0)return"[]";var y=hs(t,f);return d&&!dx(y)?"["+bl(y,d)+"]":"[ "+un.call(y,", ")+" ]"}if(Xw(t)){var S=hs(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!_f.call(t,"cause")?"{ ["+String(t)+"] "+un.call(If.call("[cause]: "+f(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(S,", ")+" }"}if(typeof t=="object"&&s){if(Ff&&typeof t[Ff]=="function"&&gl)return gl(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ox(t)){var T=[];return Ef&&Ef.call(t,function($,C){T.push(f(C,t,!0)+" => "+f($,t))}),Bf("Map",ds.call(t),T,d)}if(ax(t)){var E=[];return Cf&&Cf.call(t,function($){E.push(f($,t))}),Bf("Set",fs.call(t),E,d)}if(ix(t))return vl("WeakMap");if(lx(t))return vl("WeakSet");if(sx(t))return vl("WeakRef");if(Jw(t))return ei(f(Number(t)));if(tx(t))return ei(f(hl.call(t)));if(ex(t))return ei(zw.call(t));if(Qw(t))return ei(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof sf<"u"&&t===sf)return"{ [object globalThis] }";if(!Zw(t)&&!Vf(t)){var P=hs(t,f),D=Df?Df(t)===Object.prototype:t instanceof Object||t.constructor===Object,_=t instanceof Object?"":"null prototype",I=!D&&Ot&&Object(t)===t&&Ot in t?fl.call(Hn(t),8,-1):_?"Object":"",V=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=V+(I||_?"["+un.call(If.call([],I||[],_||[]),": ")+"] ":"");return P.length===0?F+"{}":d?F+"{"+bl(P,d)+"}":F+"{ "+un.call(P,", ")+" }"}return String(t)};function Lf(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Kw(e){return zn.call(String(e),/"/g,""")}function yl(e){return Hn(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Zw(e){return Hn(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Vf(e){return Hn(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Xw(e){return Hn(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Qw(e){return Hn(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Jw(e){return Hn(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function ex(e){return Hn(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function $f(e){if(Jr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!ml)return!1;try{return ml.call(e),!0}catch{}return!1}function tx(e){if(!e||typeof e!="object"||!hl)return!1;try{return hl.call(e),!0}catch{}return!1}var nx=Object.prototype.hasOwnProperty||function(e){return e in this};function Wn(e,t){return nx.call(e,t)}function Hn(e){return Ww.call(e)}function rx(e){if(e.name)return e.name;var t=Uw.call(Hw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Rf(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 ox(e){if(!ds||!e||typeof e!="object")return!1;try{ds.call(e);try{fs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ix(e){if(!Qo||!e||typeof e!="object")return!1;try{Qo.call(e,Qo);try{Jo.call(e,Jo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function sx(e){if(!Pf||!e||typeof e!="object")return!1;try{return Pf.call(e),!0}catch{}return!1}function ax(e){if(!fs||!e||typeof e!="object")return!1;try{fs.call(e);try{ds.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function lx(e){if(!Jo||!e||typeof e!="object")return!1;try{Jo.call(e,Jo);try{Qo.call(e,Qo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function cx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function jf(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return jf(fl.call(e,0,t.maxStringLength),t)+r}var o=zn.call(zn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ux);return Lf(o,"single",t)}function ux(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":"")+Gw.call(t.toString(16))}function ei(e){return"Object("+e+")"}function vl(e){return e+" { ? }"}function Bf(e,t,n,r){var o=r?bl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function dx(e){for(var t=0;t<e.length;t++)if(Rf(e[t],`
|
|
2
|
-
`)>=0)return!1;return!0}function
|
|
1
|
+
(function(ee,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(ee=typeof globalThis<"u"?globalThis:ee||self,b(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,b,w,Jd){"use strict";var GL=Object.defineProperty;var YL=(ee,b,w)=>b in ee?GL(ee,b,{enumerable:!0,configurable:!0,writable:!0,value:w}):ee[b]=w;var oe=(ee,b,w)=>YL(ee,typeof b!="symbol"?b+"":b,w);function ef(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 M=ef(b),tf=ef(Jd);function nf(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=nf(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=nf(e))&&(r&&(r+=" "),r+=t);return r}const rf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,of=R0,ti=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return of(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=rf(u)||rf(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...i,...a}[m]):{...i,...a}[m]===v})?[...c,d,f]:c},[]);return of(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function sf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=sf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function B0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=sf(e))&&(r&&(r+=" "),r+=t);return r}var af=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function z0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function W0(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 H0=Error,U0=EvalError,G0=RangeError,Y0=ReferenceError,lf=SyntaxError,ni=TypeError,q0=URIError,K0=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},cf=typeof Symbol<"u"&&Symbol,Z0=K0,X0=function(){return typeof cf!="function"||typeof Symbol!="function"||typeof cf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Z0()},nl={__proto__:null,foo:{}},Q0=Object,J0=function(){return{__proto__:nl}.foo===nl.foo&&!(nl instanceof Q0)},ew="Function.prototype.bind called on incompatible ",tw=Object.prototype.toString,nw=Math.max,rw="[object Function]",uf=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},ow=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},iw=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},sw=function(t){var n=this;if(typeof n!="function"||tw.apply(n)!==rw)throw new TypeError(ew+n);for(var r=ow(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,uf(r,arguments));return Object(u)===u?u:this}return n.apply(t,uf(r,arguments))},s=nw(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+iw(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},aw=sw,rl=Function.prototype.bind||aw,lw=Function.prototype.call,cw=Object.prototype.hasOwnProperty,uw=rl,dw=uw.call(lw,cw),Te,fw=H0,hw=U0,pw=G0,mw=Y0,Gr=lf,Yr=ni,gw=q0,df=Function,ol=function(e){try{return df('"use strict"; return ('+e+").constructor;")()}catch{}},vr=Object.getOwnPropertyDescriptor;if(vr)try{vr({},"")}catch{vr=null}var il=function(){throw new Yr},yw=vr?function(){try{return arguments.callee,il}catch{try{return vr(arguments,"callee").get}catch{return il}}}():il,qr=X0(),vw=J0(),yt=Object.getPrototypeOf||(vw?function(e){return e.__proto__}:null),Kr={},bw=typeof Uint8Array>"u"||!yt?Te:yt(Uint8Array),br={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":qr&&yt?yt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":Kr,"%AsyncGenerator%":Kr,"%AsyncGeneratorFunction%":Kr,"%AsyncIteratorPrototype%":Kr,"%Atomics%":typeof Atomics>"u"?Te:Atomics,"%BigInt%":typeof BigInt>"u"?Te:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Te:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Te:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Te:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":fw,"%eval%":eval,"%EvalError%":hw,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":df,"%GeneratorFunction%":Kr,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qr&&yt?yt(yt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qr||!yt?Te:yt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Te:Promise,"%Proxy%":typeof Proxy>"u"?Te:Proxy,"%RangeError%":pw,"%ReferenceError%":mw,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qr||!yt?Te:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qr&&yt?yt(""[Symbol.iterator]()):Te,"%Symbol%":qr?Symbol:Te,"%SyntaxError%":Gr,"%ThrowTypeError%":yw,"%TypedArray%":bw,"%TypeError%":Yr,"%Uint8Array%":typeof Uint8Array>"u"?Te:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Te:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Te:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Te:Uint32Array,"%URIError%":gw,"%WeakMap%":typeof WeakMap>"u"?Te:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Te:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Te:WeakSet};if(yt)try{null.error}catch(e){var ww=yt(yt(e));br["%Error.prototype%"]=ww}var xw=function e(t){var n;if(t==="%AsyncFunction%")n=ol("async function () {}");else if(t==="%GeneratorFunction%")n=ol("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=ol("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&yt&&(n=yt(o.prototype))}return br[t]=n,n},ff={__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"]},ri=rl,us=dw,Tw=ri.call(Function.call,Array.prototype.concat),Sw=ri.call(Function.apply,Array.prototype.splice),hf=ri.call(Function.call,String.prototype.replace),ds=ri.call(Function.call,String.prototype.slice),Ew=ri.call(Function.call,RegExp.prototype.exec),Cw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pw=/\\(\\)?/g,kw=function(t){var n=ds(t,0,1),r=ds(t,-1);if(n==="%"&&r!=="%")throw new Gr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Gr("invalid intrinsic syntax, expected opening `%`");var o=[];return hf(t,Cw,function(i,s,a,l){o[o.length]=a?hf(l,Pw,"$1"):s||i}),o},Iw=function(t,n){var r=t,o;if(us(ff,r)&&(o=ff[r],r="%"+o[0]+"%"),us(br,r)){var i=br[r];if(i===Kr&&(i=xw(r)),typeof i>"u"&&!n)throw new Yr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Gr("intrinsic "+t+" does not exist!")},Zr=function(t,n){if(typeof t!="string"||t.length===0)throw new Yr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Yr('"allowMissing" argument must be a boolean');if(Ew(/^%?[^%]*%?$/,t)===null)throw new Gr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=kw(t),o=r.length>0?r[0]:"",i=Iw("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],Sw(r,Tw([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=ds(f,0,1),p=ds(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Gr("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,s="%"+o+"%",us(br,s))a=br[s];else if(a!=null){if(!(f in a)){if(!n)throw new Yr("base intrinsic for "+t+" exists, but the property is not available.");return}if(vr&&u+1>=r.length){var m=vr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=us(a,f),a=a[f];d&&!l&&(br[s]=a)}}return a},pf={exports:{}},sl,mf;function al(){if(mf)return sl;mf=1;var e=Zr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return sl=t,sl}var Ow=Zr,fs=Ow("%Object.getOwnPropertyDescriptor%",!0);if(fs)try{fs([],"length")}catch{fs=null}var gf=fs,yf=al(),_w=lf,Xr=ni,vf=gf,Aw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Xr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Xr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Xr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Xr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Xr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Xr("`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,l=!!vf&&vf(t,n);if(yf)yf(t,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new _w("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ll=al(),bf=function(){return!!ll};bf.hasArrayLengthDefineBug=function(){if(!ll)return null;try{return ll([],"length",{value:1}).length!==1}catch{return!0}};var Mw=bf,Dw=Zr,wf=Aw,Nw=Mw(),xf=gf,Tf=ni,Fw=Dw("%Math.floor%"),Lw=function(t,n){if(typeof t!="function")throw new Tf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Fw(n)!==n)throw new Tf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&xf){var s=xf(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Nw?wf(t,"length",n,!0,!0):wf(t,"length",n)),t};(function(e){var t=rl,n=Zr,r=Lw,o=ni,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),l=al(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,s,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(pf);var Vw=pf.exports,Sf=Zr,Ef=Vw,$w=Ef(Sf("String.prototype.indexOf")),jw=function(t,n){var r=Sf(t,!!n);return typeof r=="function"&&$w(t,".prototype.")>-1?Ef(r):r};const Rw=W0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var cl=typeof Map=="function"&&Map.prototype,ul=Object.getOwnPropertyDescriptor&&cl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,hs=cl&&ul&&typeof ul.get=="function"?ul.get:null,Cf=cl&&Map.prototype.forEach,dl=typeof Set=="function"&&Set.prototype,fl=Object.getOwnPropertyDescriptor&&dl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ps=dl&&fl&&typeof fl.get=="function"?fl.get:null,Pf=dl&&Set.prototype.forEach,Bw=typeof WeakMap=="function"&&WeakMap.prototype,oi=Bw?WeakMap.prototype.has:null,zw=typeof WeakSet=="function"&&WeakSet.prototype,ii=zw?WeakSet.prototype.has:null,Ww=typeof WeakRef=="function"&&WeakRef.prototype,kf=Ww?WeakRef.prototype.deref:null,Hw=Boolean.prototype.valueOf,Uw=Object.prototype.toString,Gw=Function.prototype.toString,Yw=String.prototype.match,hl=String.prototype.slice,zn=String.prototype.replace,qw=String.prototype.toUpperCase,If=String.prototype.toLowerCase,Of=RegExp.prototype.test,_f=Array.prototype.concat,un=Array.prototype.join,Kw=Array.prototype.slice,Af=Math.floor,pl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ml=Object.getOwnPropertySymbols,gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Qr||!0)?Symbol.toStringTag:null,Mf=Object.prototype.propertyIsEnumerable,Df=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Nf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Of.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Af(-e):Af(e);if(r!==e){var o=String(r),i=hl.call(t,o.length+1);return zn.call(o,n,"$&_")+"."+zn.call(zn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return zn.call(t,n,"$&_")}var yl=Rw,Ff=yl.custom,Lf=jf(Ff)?Ff:null,Zw=function e(t,n,r,o){var i=n||{};if(Wn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Wn(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=Wn(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(Wn(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(Wn(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 Bf(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Nf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Nf(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return vl(t)?"[Array]":"[Object]";var d=px(i,r);if(typeof o>"u")o=[];else if(Rf(o,t)>=0)return"[Circular]";function f(V,P,A){if(P&&(o=Kw.call(o),o.push(P)),A){var N={depth:i.depth};return Wn(i,"quoteStyle")&&(N.quoteStyle=i.quoteStyle),e(V,N,r+1,o)}return e(V,i,r+1,o)}if(typeof t=="function"&&!$f(t)){var h=ix(t),p=ms(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if(jf(t)){var m=Qr?zn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):gl.call(t);return typeof t=="object"&&!Qr?si(m):m}if(dx(t)){for(var v="<"+If.call(String(t.nodeName)),y=t.attributes||[],x=0;x<y.length;x++)v+=" "+y[x].name+"="+Vf(Xw(y[x].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+If.call(String(t.nodeName))+">",v}if(vl(t)){if(t.length===0)return"[]";var g=ms(t,f);return d&&!hx(g)?"["+wl(g,d)+"]":"[ "+un.call(g,", ")+" ]"}if(Jw(t)){var S=ms(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Mf.call(t,"cause")?"{ ["+String(t)+"] "+un.call(_f.call("[cause]: "+f(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(S,", ")+" }"}if(typeof t=="object"&&s){if(Lf&&typeof t[Lf]=="function"&&yl)return yl(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(sx(t)){var T=[];return Cf&&Cf.call(t,function(V,P){T.push(f(P,t,!0)+" => "+f(V,t))}),zf("Map",hs.call(t),T,d)}if(cx(t)){var E=[];return Pf&&Pf.call(t,function(V){E.push(f(V,t))}),zf("Set",ps.call(t),E,d)}if(ax(t))return bl("WeakMap");if(ux(t))return bl("WeakSet");if(lx(t))return bl("WeakRef");if(tx(t))return si(f(Number(t)));if(rx(t))return si(f(pl.call(t)));if(nx(t))return si(Hw.call(t));if(ex(t))return si(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof af<"u"&&t===af)return"{ [object globalThis] }";if(!Qw(t)&&!$f(t)){var O=ms(t,f),I=Df?Df(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",C=!I&&Ot&&Object(t)===t&&Ot in t?hl.call(Hn(t),8,-1):k?"Object":"",L=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",D=L+(C||k?"["+un.call(_f.call([],C||[],k||[]),": ")+"] ":"");return O.length===0?D+"{}":d?D+"{"+wl(O,d)+"}":D+"{ "+un.call(O,", ")+" }"}return String(t)};function Vf(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Xw(e){return zn.call(String(e),/"/g,""")}function vl(e){return Hn(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Qw(e){return Hn(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function $f(e){return Hn(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Jw(e){return Hn(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function ex(e){return Hn(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function tx(e){return Hn(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function nx(e){return Hn(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function jf(e){if(Qr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!gl)return!1;try{return gl.call(e),!0}catch{}return!1}function rx(e){if(!e||typeof e!="object"||!pl)return!1;try{return pl.call(e),!0}catch{}return!1}var ox=Object.prototype.hasOwnProperty||function(e){return e in this};function Wn(e,t){return ox.call(e,t)}function Hn(e){return Uw.call(e)}function ix(e){if(e.name)return e.name;var t=Yw.call(Gw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Rf(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 sx(e){if(!hs||!e||typeof e!="object")return!1;try{hs.call(e);try{ps.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ax(e){if(!oi||!e||typeof e!="object")return!1;try{oi.call(e,oi);try{ii.call(e,ii)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function lx(e){if(!kf||!e||typeof e!="object")return!1;try{return kf.call(e),!0}catch{}return!1}function cx(e){if(!ps||!e||typeof e!="object")return!1;try{ps.call(e);try{hs.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ux(e){if(!ii||!e||typeof e!="object")return!1;try{ii.call(e,ii);try{oi.call(e,oi)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function dx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Bf(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Bf(hl.call(e,0,t.maxStringLength),t)+r}var o=zn.call(zn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,fx);return Vf(o,"single",t)}function fx(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":"")+qw.call(t.toString(16))}function si(e){return"Object("+e+")"}function bl(e){return e+" { ? }"}function zf(e,t,n,r){var o=r?wl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function hx(e){for(var t=0;t<e.length;t++)if(Rf(e[t],`
|
|
2
|
+
`)>=0)return!1;return!0}function px(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=un.call(Array(e.indent+1)," ");else return null;return{base:n,prev:un.call(Array(t+1),n)}}function wl(e,t){if(e.length===0)return"";var n=`
|
|
3
3
|
`+t.prev+t.base;return n+un.call(e,","+n)+`
|
|
4
|
-
`+t.prev}function hs(e,t){var n=yl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Wn(e,o)?t(e[o],e):""}var i=typeof pl=="function"?pl(e):[],s;if(Jr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)Wn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Jr&&s["$"+l]instanceof Symbol||(Of.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof pl=="function")for(var c=0;c<i.length;c++)_f.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var zf=Xr,eo=Vw,hx=qw,px=Zo,ps=zf("%WeakMap%",!0),ms=zf("%Map%",!0),mx=eo("WeakMap.prototype.get",!0),gx=eo("WeakMap.prototype.set",!0),yx=eo("WeakMap.prototype.has",!0),vx=eo("Map.prototype.get",!0),bx=eo("Map.prototype.set",!0),wx=eo("Map.prototype.has",!0),wl=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},xx=function(e,t){var n=wl(e,t);return n&&n.value},Tx=function(e,t,n){var r=wl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Sx=function(e,t){return!!wl(e,t)},Ex=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new px("Side channel does not contain "+hx(i))},get:function(i){if(ps&&i&&(typeof i=="object"||typeof i=="function")){if(t)return mx(t,i)}else if(ms){if(n)return vx(n,i)}else if(r)return xx(r,i)},has:function(i){if(ps&&i&&(typeof i=="object"||typeof i=="function")){if(t)return yx(t,i)}else if(ms){if(n)return wx(n,i)}else if(r)return Sx(r,i);return!1},set:function(i,s){ps&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new ps),gx(t,i,s)):ms?(n||(n=new ms),bx(n,i,s)):(r||(r={key:{},next:null}),Tx(r,i,s))}};return o},Cx=String.prototype.replace,Px=/%20/g,xl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Wf={default:xl.RFC3986,formatters:{RFC1738:function(e){return Cx.call(e,Px,"+")},RFC3986:function(e){return String(e)}},RFC1738:xl.RFC1738,RFC3986:xl.RFC3986},kx=Wf,Tl=Object.prototype.hasOwnProperty,br=Array.isArray,dn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Ox=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(br(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Hf=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},Ix=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Tl.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 br(t)&&!br(n)&&(o=Hf(t,r)),br(t)&&br(n)?(n.forEach(function(i,s){if(Tl.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 Tl.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},Ax=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},_x=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}},Dx=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(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===kx.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+dn[c];continue}if(c<2048){a=a+(dn[192|c>>6]+dn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(dn[224|c>>12]+dn[128|c>>6&63]+dn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=dn[240|c>>18]+dn[128|c>>12&63]+dn[128|c>>6&63]+dn[128|c&63]}return a},Mx=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),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return Ox(n),t},Nx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Fx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Lx=function(t,n){return[].concat(t,n)},Vx=function(t,n){if(br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Uf={arrayToObject:Hf,assign:Ax,combine:Lx,compact:Mx,decode:_x,encode:Dx,isBuffer:Fx,isRegExp:Nx,maybeMap:Vx,merge:Ix},$x=Uf,Gf=Wf,Rx=Date.prototype.toISOString,Yf=Gf.default;$x.encode,Gf.formatters[Yf];var jx=Uf;jx.decode;var qf=e=>Array.isArray(e),Sl=e=>e===void 0,El=e=>e===null,Bx=Function.bind.call(Function.call,Object.prototype.toString),zx=e=>!!e&&Bx(e)==="[object Error]"||e instanceof Error,Kf=(e,t)=>e instanceof t,Wx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Hx=e=>Object.prototype.toString.call(e)==="[object Date]"&&Kf(e,Date),kn={array:qf,date:Hx,empty:e=>El(e)||Sl(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:Kf,isError:zx,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>El(e)||Sl(e),null:El,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!qf(e)&&typeof e=="object",primitive:Wx,string:e=>typeof e=="string",undefined:Sl},Cl=(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]=Cl(i?[]:{},o,n)}else e[r]=Cl(e[r],o,n)}else e[r]=n;return e},Ux=e=>Object.keys(e),Gx=e=>e.replace("[",".").replace("]","").split("."),Zf=(e,t,n)=>{const r=Array.isArray(t)?t:Gx(t),o=structuredClone(e);return Cl(o,r,n),o};const Pl="-";function Yx(e){const t=Kx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(Pl);return a[0]===""&&a.length!==1&&a.shift(),Xf(a,t)||qx(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function Xf(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Xf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Pl);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Qf=/^\[(.+)\]$/;function qx(e){if(Qf.test(e)){const t=Qf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Kx(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Xx(Object.entries(e.classGroups),n).forEach(([i,s])=>{kl(s,r,i,t)}),r}function kl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Jf(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Zx(o)){kl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{kl(s,Jf(t,i),n,r)})})}function Jf(e,t){let n=e;return t.split(Pl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Zx(e){return e.isThemeGetter}function Xx(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 Qx(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 eh="!";function Jx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const l=[];let c=0,u=0,d;for(let g=0;g<a.length;g++){let v=a[g];if(c===0){if(v===o&&(r||a.slice(g,g+i)===t)){l.push(a.slice(u,g)),u=g+i;continue}if(v==="/"){d=g;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(eh),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function e1(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 t1(e){return{cache:Qx(e.cacheSize),parseClassName:Jx(e),...Yx(e)}}const n1=/\s+/;function r1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(n1).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:s};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:s};d=!1}const h=e1(a).join(":");return{isTailwindClass:!0,modifierId:l?h+eh:h,classGroupId:f,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(d=>i.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function o1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=th(t))&&(r&&(r+=" "),r+=n);return r}function th(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=th(e[r]))&&(n&&(n+=" "),n+=t);return n}function i1(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=t1(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=r1(l,n);return o(l,u),u}return function(){return i(o1.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const nh=/^\[(?:([a-z-]+):)?(.+)\]$/i,s1=/^\d+\/\d+$/,a1=new Set(["px","full","screen"]),l1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c1=/\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$/,u1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,d1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function On(e){return wr(e)||a1.has(e)||s1.test(e)}function Un(e){return to(e,"length",w1)}function wr(e){return!!e&&!Number.isNaN(Number(e))}function gs(e){return to(e,"number",wr)}function ti(e){return!!e&&Number.isInteger(Number(e))}function h1(e){return e.endsWith("%")&&wr(e.slice(0,-1))}function ve(e){return nh.test(e)}function Gn(e){return l1.test(e)}const p1=new Set(["length","size","percentage"]);function m1(e){return to(e,p1,rh)}function g1(e){return to(e,"position",rh)}const y1=new Set(["image","url"]);function v1(e){return to(e,y1,T1)}function b1(e){return to(e,"",x1)}function ni(){return!0}function to(e,t,n){const r=nh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function w1(e){return c1.test(e)&&!u1.test(e)}function rh(){return!1}function x1(e){return d1.test(e)}function T1(e){return f1.test(e)}function S1(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),i=Ue("borderRadius"),s=Ue("borderSpacing"),a=Ue("borderWidth"),l=Ue("contrast"),c=Ue("grayscale"),u=Ue("hueRotate"),d=Ue("invert"),f=Ue("gap"),h=Ue("gradientColorStops"),p=Ue("gradientColorStopPositions"),m=Ue("inset"),g=Ue("margin"),v=Ue("opacity"),w=Ue("padding"),y=Ue("saturate"),S=Ue("scale"),T=Ue("sepia"),E=Ue("skew"),P=Ue("space"),D=Ue("translate"),_=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ve,t],F=()=>[ve,t],$=()=>["",On,Un],C=()=>["auto",wr,ve],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],Y=()=>["","0",ve],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[wr,gs],Z=()=>[wr,ve];return{cacheSize:500,separator:":",theme:{colors:[ni],spacing:[On,Un],blur:["none","",Gn,ve],brightness:R(),borderColor:[e],borderRadius:["none","","full",Gn,ve],borderSpacing:F(),borderWidth:$(),contrast:R(),grayscale:Y(),hueRotate:Z(),invert:Y(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[h1,Un],inset:V(),margin:V(),opacity:R(),padding:F(),saturate:R(),scale:R(),sepia:Y(),skew:Z(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Gn]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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(),ve]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],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",ti,ve]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:Y()}],shrink:[{shrink:Y()}],order:[{order:["first","last","none",ti,ve]}],"grid-cols":[{"grid-cols":[ni]}],"col-start-end":[{col:["auto",{span:["full",ti,ve]},ve]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[ni]}],"row-start-end":[{row:["auto",{span:[ti,ve]},ve]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],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":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Gn]},Gn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gn,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gs]}],"font-family":[{font:[ni]}],"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",ve]}],"line-clamp":[{"line-clamp":["none",wr,gs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",On,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"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:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",On,Un]}],"underline-offset":[{"underline-offset":["auto",On,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],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",ve]}],"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(),g1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",m1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},v1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[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:[...M(),"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:M()}],"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:["",...M()]}],"outline-offset":[{"outline-offset":[On,ve]}],"outline-w":[{outline:[On,Un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[On,Un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gn,b1]}],"shadow-color":[{shadow:[ni]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"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",ve]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ti,ve]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"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",ve]}],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",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[On,Un,gs]}],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 E1=i1(S1),Ol=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},C1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),P1=e=>kn.function(e),Xe=(...e)=>E1(R0(e)),ys=(e,t)=>{const n=new Event("input",{bubbles:!0});return e==null||e.dispatchEvent(n),n},vs=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},no=b.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),k1=as("inline-flex duration-700 enabled:hover:bg-opacity-80 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent 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 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",primary:"bg-primary text-primary-foreground",main:"bg-primary text-primary-foreground",warn:"bg-warn text-warn-foreground",danger:"bg-danger text-danger-foreground",secondary:"bg-secondary-background text-secondary-foreground disabled:text-secondary-subtle",success:"bg-success text-success-foreground",info:"bg-info text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),xr=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(no,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:Xe(k1({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),O1=e=>x.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>x.jsx("li",{className:"flex flex-1",children:x.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:Xe("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),I1=as("inline-flex rounded-pill gap-1.5 text-main-foreground 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:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-background text-secondary-foreground",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),A1=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:i,...s},a){return x.jsxs(no,{...s,ref:a,"data-theme":o,as:s.as??"span",className:Xe(I1({size:i,theme:o}),t),children:[s.children,n]})}),ro=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),bs=b.createContext({}),ws=b.createContext(null),Il=typeof document<"u",xs=Il?b.useLayoutEffect:b.useEffect,oh=b.createContext({strict:!1}),Ts=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ih="data-"+Ts("framerAppearId"),_1={skipAnimations:!1,useManualTiming:!1};function D1(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(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&i.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const Ss=["read","resolveKeyframes","update","preRender","render","postRender"],M1=40;function sh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ss.reduce((v,w)=>(v[w]=D1(i),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=s,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,M1),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Ss.reduce((v,w)=>{const y=s[w];return v[w]=(S,T=!1,E=!1)=>(n||p(),y.schedule(S,T,E)),v},{}),cancel:v=>{for(let w=0;w<Ss.length;w++)s[Ss[w]].cancel(v)},state:o,steps:s}}const{schedule:Al,cancel:GL}=sh(queueMicrotask,!1);function oo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const ah=b.createContext({});let lh=!1;function N1(e,t,n,r,o){const{visualElement:i}=b.useContext(bs),s=b.useContext(oh),a=b.useContext(ws),l=b.useContext(ro).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(ah);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&L1(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const f=b.useRef(!!(n[ih]&&!window.HandoffComplete));return xs(()=>{u&&(u.updateFeatures(),Al.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,lh||(lh=!0,queueMicrotask(F1))))}),u}function F1(){window.HandoffComplete=!0}function L1(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ch(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&oo(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ch(e){if(e)return e.options.allowProjection!==!1?e.projection:ch(e.parent)}function V1(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):oo(n)&&(n.current=r))},[t])}function ri(e){return typeof e=="string"||Array.isArray(e)}function oi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const _l=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dl=["initial",..._l];function Es(e){return oi(e.animate)||Dl.some(t=>ri(e[t]))}function uh(e){return!!(Es(e)||e.variants)}function $1(e,t){if(Es(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ri(n)?n:void 0,animate:ri(r)?r:void 0}}return e.inherit!==!1?t:{}}function R1(e){const{initial:t,animate:n}=$1(e,b.useContext(bs));return b.useMemo(()=>({initial:t,animate:n}),[dh(t),dh(n)])}function dh(e){return Array.isArray(e)?e.join(" "):e}const fh={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"]},io={};for(const e in fh)io[e]={isEnabled:t=>fh[e].some(n=>!!t[n])};function j1(e){for(const t in e)io[t]={...io[t],...e[t]}}const ii=b.createContext({}),B1=Symbol.for("motionComponentSymbol"),wt=e=>e;let so=wt,tn=wt;process.env.NODE_ENV!=="production"&&(so=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});function z1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&j1(e);function i(a,l){let c;const u={...b.useContext(ro),...a,layoutId:W1(a)},{isStatic:d}=u,f=R1(a),h=r(a,d);if(!d&&Il){H1(u,e);const p=U1(u);c=p.MeasureLayout,f.visualElement=N1(o,h,u,t,p.ProjectionNode)}return x.jsxs(bs.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,V1(h,f.visualElement,l),h,d,f.visualElement)]})}const s=b.forwardRef(i);return s[B1]=o,s}function W1({layoutId:e}){const t=b.useContext(ii).id;return t&&e!==void 0?t+"-"+e:e}function H1(e,t){const n=b.useContext(oh).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?so(!1,r):tn(!1,r)}}function U1(e){const{drag:t,layout:n}=io;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 G1(e){function t(r,o={}){return z1(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 Y1=["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 Ml(e){return typeof e!="string"||e.includes("-")?!1:!!(Y1.indexOf(e)>-1||/[A-Z]/u.test(e))}const Cs={};function q1(e){Object.assign(Cs,e)}const si=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yn=new Set(si);function hh(e,{layout:t,layoutId:n}){return Yn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Cs[e]||e==="opacity")}const xt=e=>!!(e&&e.getVelocity),K1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Z1=si.length;function X1(e,t,n){let r="";for(let o=0;o<Z1;o++){const i=si[o];if(e[i]!==void 0){const s=K1[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const ph=e=>t=>typeof t=="string"&&t.startsWith(e),mh=ph("--"),Q1=ph("var(--"),Nl=e=>Q1(e)?J1.test(e.split("/*")[0].trim()):!1,J1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,eT=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ai={...ao,transform:e=>qn(0,1,e)},Ps={...ao,default:1},li=e=>Math.round(e*1e5)/1e5,Fl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,tT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,nT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ci(e){return typeof e=="string"}function rT(e){return e==null}const ui=e=>({test:t=>ci(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=ui("deg"),fn=ui("%"),fe=ui("px"),oT=ui("vh"),iT=ui("vw"),gh={...fn,parse:e=>fn.parse(e)/100,transform:e=>fn.transform(e*100)},yh={...ao,transform:Math.round},vh={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:Kn,rotateX:Kn,rotateY:Kn,rotateZ:Kn,scale:Ps,scaleX:Ps,scaleY:Ps,scaleZ:Ps,skew:Kn,skewX:Kn,skewY:Kn,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:ai,originX:gh,originY:gh,originZ:fe,zIndex:yh,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:ai,strokeOpacity:ai,numOctaves:yh};function Ll(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(mh(u)){o[u]=d;continue}const f=vh[u],h=eT(d,f);if(Yn.has(u)){if(a=!0,i[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=X1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=s;r.transformOrigin=`${u} ${d} ${f}`}}const Vl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bh(e,t,n){for(const r in t)!xt(t[r])&&!hh(r,n)&&(e[r]=t[r])}function sT({transformTemplate:e},t){return b.useMemo(()=>{const n=Vl();return Ll(n,t,e),Object.assign({},n.vars,n.style)},[t])}function aT(e,t){const n=e.style||{},r={};return bh(r,n,e),Object.assign(r,sT(e,t)),r}function lT(e,t){const n={},r=aT(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 cT=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 ks(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cT.has(e)}let wh=e=>!ks(e);function xh(e){e&&(wh=t=>t.startsWith("on")?!ks(t):e(t))}try{xh(require("@emotion/is-prop-valid").default)}catch{}function uT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(wh(o)||n===!0&&ks(o)||!t&&!ks(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Th(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function dT(e,t,n){const r=Th(t,e.x,e.width),o=Th(n,e.y,e.height);return`${r} ${o}`}const fT={offset:"stroke-dashoffset",array:"stroke-dasharray"},hT={offset:"strokeDashoffset",array:"strokeDasharray"};function pT(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?fT:hT;e[i.offset]=fe.transform(-r);const s=fe.transform(t),a=fe.transform(n);e[i.array]=`${s} ${a}`}function $l(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Ll(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=dT(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&pT(f,s,a,l,!1)}const Sh=()=>({...Vl(),attrs:{}}),Rl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function mT(e,t,n,r){const o=b.useMemo(()=>{const i=Sh();return $l(i,t,Rl(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};bh(i,e.style,e),o.style={...i,...o.style}}return o}function gT(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Ml(n)?mT:lT)(r,i,s,n),c=uT(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=b.useMemo(()=>xt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:f})}}function Eh(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 Ch=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 Ph(e,t,n,r){Eh(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ch.has(o)?o:Ts(o),t.attrs[o])}function jl(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(xt(o[s])||t.style&&xt(t.style[s])||hh(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 kh(e,t,n){const r=jl(e,t,n);for(const o in e)if(xt(e[o])||xt(t[o])){const i=si.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function Oh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Bl(e,t,n,r){if(typeof t=="function"){const[o,i]=Oh(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]=Oh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Zn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const zl=e=>Array.isArray(e),yT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),vT=e=>zl(e)?e[e.length-1]||0:e;function Os(e){const t=xt(e)?e.get():e;return yT(t)?t.toValue():t}const Ih=new Set(["opacity","clipPath","filter","transform"]);function Ah(e){if(Yn.has(e))return"transform";if(Ih.has(e))return Ts(e)}function Is(e,t){e.indexOf(t)===-1&&e.push(t)}function As(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function bT([...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 wT({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:TT(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const _h=e=>(t,n)=>{const r=b.useContext(bs),o=b.useContext(ws),i=()=>wT(e,t,r,o,n);return n?i():Zn(i)};function xT(e,t){const n=Ah(t);n&&Is(e,n)}function Dh(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=Bl(e,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function TT(e,t,n,r,o){var i;const s={},a=[],l=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(e,{});for(const g in c)s[g]=Os(c[g]);let{initial:u,animate:d}=e;const f=Es(e),h=uh(e);t&&h&&!f&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!oi(m)&&Dh(e,m,(g,v)=>{for(const w in g){let y=g[w];if(Array.isArray(y)){const S=p?y.length-1:0;y=y[S]}y!==null&&(s[w]=y)}for(const w in v)s[w]=v[w]}),l&&(d&&u!==!1&&!oi(d)&&Dh(e,d,g=>{for(const v in g)xT(a,v)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:De,cancel:hn,state:Tt,steps:Wl}=sh(typeof requestAnimationFrame<"u"?requestAnimationFrame:wt,!0),ST={useVisualState:_h({scrapeMotionValuesFromProps:kh,createRenderState:Sh,onMount:(e,t,{renderState:n,latestValues:r})=>{De.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),De.render(()=>{$l(n,r,Rl(t.tagName),e.transformTemplate),Ph(t,n)})}})},ET={useVisualState:_h({applyWillChange:!0,scrapeMotionValuesFromProps:jl,createRenderState:Vl})};function CT(e,{forwardMotionProps:t=!1},n,r){return{...Ml(e)?ST:ET,preloadedFeatures:n,useRender:gT(t),createVisualElement:r,Component:e}}function In(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Mh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function _s(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const PT=e=>t=>Mh(t)&&e(t,_s(t));function An(e,t,n,r){return In(e,t,PT(n),r)}const kT=(e,t)=>n=>t(e(n)),_n=(...e)=>e.reduce(kT);function Nh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Fh=Nh("dragHorizontal"),Lh=Nh("dragVertical");function Vh(e){let t=!1;if(e==="y")t=Lh();else if(e==="x")t=Fh();else{const n=Fh(),r=Lh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function $h(){const e=Vh(!0);return e?(e(),!1):!0}class Xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Rh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||$h())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&De.postRender(()=>l(i,s))};return An(e.current,n,o,{passive:!e.getProps()[r]})}class OT extends Xn{mount(){this.unmount=_n(Rh(this.node,!0),Rh(this.node,!1))}unmount(){}}class IT extends Xn{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=_n(In(this.node.current,"focus",()=>this.onFocus()),In(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const jh=(e,t)=>t?e===t?!0:jh(e,t.parentElement):!1;function Hl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,_s(n))}class AT extends Xn{constructor(){super(...arguments),this.removeStartListeners=wt,this.removeEndListeners=wt,this.removeAccessibleListeners=wt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=An(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),f=!d&&!jh(this.node.current,a.target)?u:c;f&&De.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=An(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_n(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()||Hl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&De.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=In(this.node.current,"keyup",s),Hl("down",(a,l)=>{this.startPress(a,l)})},n=In(this.node.current,"keydown",t),r=()=>{this.isPressing&&Hl("cancel",(i,s)=>this.cancelPress(i,s))},o=In(this.node.current,"blur",r);this.removeAccessibleListeners=_n(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&&De.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!$h()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&De.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=An(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=In(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_n(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ul=new WeakMap,Gl=new WeakMap,_T=e=>{const t=Ul.get(e.target);t&&t(e)},DT=e=>{e.forEach(_T)};function MT({root:e,...t}){const n=e||document;Gl.has(n)||Gl.set(n,{});const r=Gl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(DT,{root:e,...t})),r[o]}function NT(e,t,n){const r=MT(t);return Ul.set(e,n),r.observe(e),()=>{Ul.delete(e),r.unobserve(e)}}const FT={some:0,all:1};class LT extends Xn{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:FT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return NT(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(VT(t,n))&&this.startObserver()}unmount(){}}function VT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $T={inView:{Feature:LT},tap:{Feature:AT},focus:{Feature:IT},hover:{Feature:OT}};function Bh(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 Ds(e,t,n){const r=e.getProps();return Bl(r,t,n!==void 0?n:r.custom,e)}const Dn=e=>e*1e3,Mn=e=>e/1e3,RT={type:"spring",stiffness:500,damping:25,restSpeed:10},jT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),BT={type:"keyframes",duration:.8},zT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WT=(e,{keyframes:t})=>t.length>2?BT:Yn.has(e)?e.startsWith("scale")?jT(t[1]):RT:zT;function HT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Yl(e,t){return e[t]||e.default||e}const UT=e=>e!==null;function Ms(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(UT),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Ns;function GT(){Ns=void 0}const Qn={now:()=>(Ns===void 0&&Qn.set(Tt.isProcessing||_1.useManualTiming?Tt.timestamp:performance.now()),Ns),set:e=>{Ns=e,queueMicrotask(GT)}},zh=e=>/^0[^.\s]+$/u.test(e);function YT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||zh(e):!0}const Wh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),qT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function KT(e){const t=qT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const ZT=4;function Hh(e,t,n=1){tn(n<=ZT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=KT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Wh(s)?parseFloat(s):s}return Nl(o)?Hh(o,t,n+1):o}const XT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Uh=e=>e===ao||e===fe,Gh=(e,t)=>parseFloat(e.split(", ")[t]),Yh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Gh(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Gh(i[1],e):0}},QT=new Set(["x","y","z"]),JT=si.filter(e=>!QT.has(e));function eS(e){const t=[];return JT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const lo={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:Yh(4,13),y:Yh(5,14)};lo.translateX=lo.x,lo.translateY=lo.y;const qh=e=>t=>t.test(e),Kh=[ao,fe,fn,Kn,iT,oT,{test:e=>e==="auto",parse:e=>e}],Zh=e=>Kh.find(qh(e)),Tr=new Set;let ql=!1,Kl=!1;function Xh(){if(Kl){const e=Array.from(Tr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=eS(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)})}Kl=!1,ql=!1,Tr.forEach(e=>e.complete()),Tr.clear()}function Qh(){Tr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Kl=!0)})}function tS(){Qh(),Xh()}class Zl{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?(Tr.add(this),ql||(ql=!0,De.read(Qh),De.resolveKeyframes(Xh))):(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 l=r.readValue(n,a);l!=null&&(t[0]=l)}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),Tr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Tr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xl=(e,t)=>n=>!!(ci(n)&&nT.test(n)&&n.startsWith(e)||t&&!rT(n)&&Object.prototype.hasOwnProperty.call(n,t)),Jh=(e,t,n)=>r=>{if(!ci(r))return r;const[o,i,s,a]=r.match(Fl);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},nS=e=>qn(0,255,e),Ql={...ao,transform:e=>Math.round(nS(e))},Sr={test:Xl("rgb","red"),parse:Jh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ql.transform(e)+", "+Ql.transform(t)+", "+Ql.transform(n)+", "+li(ai.transform(r))+")"};function rS(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 Jl={test:Xl("#"),parse:rS,transform:Sr.transform},co={test:Xl("hsl","hue"),parse:Jh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fn.transform(li(t))+", "+fn.transform(li(n))+", "+li(ai.transform(r))+")"},It={test:e=>Sr.test(e)||Jl.test(e)||co.test(e),parse:e=>Sr.test(e)?Sr.parse(e):co.test(e)?co.parse(e):Jl.parse(e),transform:e=>ci(e)?e:e.hasOwnProperty("red")?Sr.transform(e):co.transform(e)};function oS(e){var t,n;return isNaN(e)&&ci(e)&&(((t=e.match(Fl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(tT))===null||n===void 0?void 0:n.length)||0)>0}const ep="number",tp="color",iS="var",sS="var(",np="${}",aS=/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 di(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(aS,l=>(It.test(l)?(r.color.push(i),o.push(tp),n.push(It.parse(l))):l.startsWith(sS)?(r.var.push(i),o.push(iS),n.push(l)):(r.number.push(i),o.push(ep),n.push(parseFloat(l))),++i,np)).split(np);return{values:n,split:a,indexes:r,types:o}}function rp(e){return di(e).values}function op(e){const{split:t,types:n}=di(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===ep?i+=li(o[s]):a===tp?i+=It.transform(o[s]):i+=o[s]}return i}}const lS=e=>typeof e=="number"?0:e;function cS(e){const t=rp(e);return op(e)(t.map(lS))}const Jn={test:oS,parse:rp,createTransformer:op,getAnimatableNone:cS},uS=new Set(["brightness","contrast","saturate","opacity"]);function dS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Fl)||[];if(!r)return e;const o=n.replace(r,"");let i=uS.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const fS=/\b([a-z-]*)\(.*?\)/gu,ec={...Jn,getAnimatableNone:e=>{const t=e.match(fS);return t?t.map(dS).join(" "):e}},hS={...vh,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:ec,WebkitFilter:ec},tc=e=>hS[e];function ip(e,t){let n=tc(e);return n!==ec&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pS=new Set(["auto","none","0"]);function mS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!pS.has(i)&&di(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=ip(n,o)}class sp extends Zl{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Nl(c))){const u=Hh(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!XT.has(r)||t.length!==2)return;const[o,i]=t,s=Zh(o),a=Zh(i);if(s!==a)if(Uh(s)&&Uh(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)YT(t[o])&&r.push(o);r.length&&mS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=lo[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]=lo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function ap(e){let t;return()=>(t===void 0&&(t=e()),t)}const lp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jn.test(e)||e==="0")&&!e.startsWith("url("));function gS(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 yS(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=lp(o,t),a=lp(i,t);return so(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:gS(e)||n==="spring"&&r}class cp{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&&tS(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!yS(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ms(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 up(e,t){return t?e*(1e3/t):0}const vS=5;function dp(e,t,n){const r=Math.max(t-vS,0);return up(n-e(r),t-r)}const nc=.001,bS=.01,fp=10,wS=.05,xS=1;function TS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;so(e<=Dn(fp),"Spring duration must be 10 seconds or less");let s=1-t;s=qn(wS,xS,s),e=qn(bS,fp,Mn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,h=rc(c,s),p=Math.exp(-d);return nc-f/h*p},i=c=>{const d=c*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=rc(Math.pow(c,2),s);return(-o(c)+nc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-nc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ES(o,i,a);if(e=Dn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const SS=12;function ES(e,t,n){let r=n;for(let o=1;o<SS;o++)r=r-e(r)/t(r);return r}function rc(e,t){return e*Math.sqrt(1-t*t)}const CS=["duration","bounce"],PS=["stiffness","damping","mass"];function hp(e,t){return t.some(n=>e[n]!==void 0)}function kS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!hp(e,PS)&&hp(e,CS)){const n=TS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function pp({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=kS({...r,velocity:-Mn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=i-o,g=Mn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let w;if(p<1){const y=rc(g,p);w=S=>{const T=Math.exp(-p*g*S);return i-T*((h+p*g*m)/y*Math.sin(y*S)+m*Math.cos(y*S))}}else if(p===1)w=y=>i-Math.exp(-g*y)*(m+(h+g*m)*y);else{const y=g*Math.sqrt(p*p-1);w=S=>{const T=Math.exp(-p*g*S),E=Math.min(y*S,300);return i-T*((h+p*g*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:f&&u||null,next:y=>{const S=w(y);if(f)s.done=y>=u;else{let T=h;y!==0&&(p<1?T=dp(w,y,S):T=0);const E=Math.abs(T)<=n,P=Math.abs(i-S)<=t;s.done=E&&P}return s.value=s.done?i:S,s}}}function mp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=D=>a!==void 0&&D<a||l!==void 0&&D>l,p=D=>a===void 0?l:l===void 0||Math.abs(a-D)<Math.abs(l-D)?a:l;let m=n*t;const g=d+m,v=s===void 0?g:s(g);v!==g&&(m=v-d);const w=D=>-m*Math.exp(-D/r),y=D=>v+w(D),S=D=>{const _=w(D),I=y(D);f.done=Math.abs(_)<=c,f.value=f.done?v:I};let T,E;const P=D=>{h(f.value)&&(T=D,E=pp({keyframes:[f.value,p(f.value)],velocity:dp(y,D,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:D=>{let _=!1;return!E&&T===void 0&&(_=!0,S(D),P(D)),T!==void 0&&D>=T?E.next(D-T):(!_&&S(D),f)}}}const gp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,OS=1e-7,IS=12;function AS(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=gp(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>OS&&++a<IS);return s}function fi(e,t,n,r){if(e===t&&n===r)return wt;const o=i=>AS(i,0,1,e,n);return i=>i===0||i===1?i:gp(o(i),t,r)}const _S=fi(.42,0,1,1),DS=fi(0,0,.58,1),yp=fi(.42,0,.58,1),MS=e=>Array.isArray(e)&&typeof e[0]!="number",vp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,bp=e=>t=>1-e(1-t),oc=e=>1-Math.sin(Math.acos(e)),wp=bp(oc),NS=vp(oc),xp=fi(.33,1.53,.69,.99),ic=bp(xp),FS=vp(ic),Tp={linear:wt,easeIn:_S,easeInOut:yp,easeOut:DS,circIn:oc,circInOut:NS,circOut:wp,backIn:ic,backInOut:FS,backOut:xp,anticipate:e=>(e*=2)<1?.5*ic(e):.5*(2-Math.pow(2,-10*(e-1)))},Sp=e=>{if(Array.isArray(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return fi(t,n,r,o)}else if(typeof e=="string")return tn(Tp[e]!==void 0,`Invalid easing type '${e}'`),Tp[e];return e},hi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function sc(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 LS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=sc(l,a,e+1/3),i=sc(l,a,e),s=sc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Fs(e,t){return n=>n>0?t:e}const ac=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},VS=[Jl,Sr,co],$S=e=>VS.find(t=>t.test(e));function Ep(e){const t=$S(e);if(so(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===co&&(n=LS(n)),n}const Cp=(e,t)=>{const n=Ep(e),r=Ep(t);if(!n||!r)return Fs(e,t);const o={...n};return i=>(o.red=ac(n.red,r.red,i),o.green=ac(n.green,r.green,i),o.blue=ac(n.blue,r.blue,i),o.alpha=Ze(n.alpha,r.alpha,i),Sr.transform(o))},lc=new Set(["none","hidden"]);function RS(e,t){return lc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jS(e,t){return n=>Ze(e,t,n)}function cc(e){return typeof e=="number"?jS:typeof e=="string"?Nl(e)?Fs:It.test(e)?Cp:WS:Array.isArray(e)?Pp:typeof e=="object"?It.test(e)?Cp:BS:Fs}function Pp(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>cc(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function BS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=cc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function zS(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]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const WS=(e,t)=>{const n=Jn.createTransformer(t),r=di(e),o=di(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?lc.has(e)&&!o.values.length||lc.has(t)&&!r.values.length?RS(e,t):_n(Pp(zS(r,o),o.values),n):(so(!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.`),Fs(e,t))};function kp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):cc(e)(e,t)}function HS(e,t,n){const r=[],o=n||kp,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||wt:t;a=_n(l,a)}r.push(a)}return r}function Op(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(tn(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=HS(t,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=hi(e[u],e[u+1],c);return s[u](d)};return n?c=>l(qn(e[0],e[i-1],c)):l}function US(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=hi(0,t,r);e.push(Ze(n,1,o))}}function GS(e){const t=[0];return US(t,e.length-1),t}function YS(e,t){return e.map(n=>n*t)}function qS(e,t){return e.map(()=>t||yp).splice(0,e.length-1)}function Ls({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=MS(r)?r.map(Sp):Sp(r),i={done:!1,value:t[0]},s=YS(n&&n.length===t.length?n:GS(t),e),a=Op(s,t,{ease:Array.isArray(o)?o:qS(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Ip=2e4;function KS(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ip;)t+=n,r=e.next(t);return t>=Ip?1/0:t}const ZS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>De.update(t,!0),stop:()=>hn(t),now:()=>Tt.isProcessing?Tt.timestamp:Qn.now()}},XS={decay:mp,inertia:mp,tween:Ls,keyframes:Ls,spring:pp},QS=e=>e/100;class uc extends cp{constructor({KeyframeResolver:t=Zl,...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,l)=>this.onKeyframesResolved(a,l);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=XS[n]||Ls;let l,c;a!==Ls&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&tn(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=_n(QS,kp(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=KS(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),w=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,S=i;if(h){const D=Math.min(this.currentTime,u)/d;let _=Math.floor(D),I=D%1;!I&&D>=1&&(I=1),I===1&&_--,_=Math.min(_,h+1),!!(_%2)&&(p==="reverse"?(I=1-I,m&&(I-=m/d)):p==="mirror"&&(S=s)),y=qn(0,1,I)*d}const T=w?{done:!1,value:l[0]}:S.next(y);a&&(T.value=a(T.value));let{done:E}=T;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return P&&o!==void 0&&(T.value=Ms(l,this.options,o)),g&&g(T.value),P&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Mn(t.calculatedDuration):0}get time(){return Mn(this.currentTime)}set time(t){t=Dn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Mn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=ZS,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 Ap=e=>Array.isArray(e)&&typeof e[0]=="number";function _p(e){return!!(!e||typeof e=="string"&&e in dc||Ap(e)||Array.isArray(e)&&e.every(_p))}const pi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pi([0,.65,.55,1]),circOut:pi([.55,0,1,.45]),backIn:pi([.31,.01,.66,-.59]),backOut:pi([.33,1.53,.69,.99])};function JS(e){return Dp(e)||dc.easeOut}function Dp(e){if(e)return Ap(e)?pi(e):Array.isArray(e)?e.map(JS):dc[e]}function eE(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Dp(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const tE=ap(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vs=10,nE=2e4;function rE(e){return e.type==="spring"||!_p(e.ease)}function oE(e,t){const n=new uc({...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<nE;)r=n.sample(i),o.push(r.value),i+=Vs;return{times:void 0,keyframes:o,duration:i-Vs,ease:"linear"}}class Mp extends cp{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new sp(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:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(rE(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=oE(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=eE(l.owner.current,c,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=Qn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ms(t,this.options,n)),d&&d(),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 Mn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Mn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Dn(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 wt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return wt}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:c,onUpdate:u,onComplete:d,...f}=this.options,h=new uc({...f,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=Dn(this.time);c.setWithVelocity(h.sample(p-Vs).value,h.sample(p).value,Vs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return tE()&&r&&Ih.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function iE(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return De.update(r,!0),()=>hn(r)}const sE=ap(()=>window.ScrollTimeline!==void 0);class aE{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(sE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),iE(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 fc=(e,t,n,r={},o,i,s)=>a=>{const l=Yl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Dn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};HT(l)||(d={...d,...WT(e,d)}),d.duration&&(d.duration=Dn(d.duration)),d.repeatDelay&&(d.repeatDelay=Dn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=Ms(d.keyframes,l);if(h!==void 0)return De.update(()=>{d.onUpdate(h),d.onComplete()}),new aE([])}return!i&&Mp.supports(d)?new Mp(d):new uc(d)};class hc{constructor(){this.subscriptions=[]}add(t){return Is(this.subscriptions,t),()=>As(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 Np=new Set;function pc(e,t,n){e||Np.has(t)||(console.warn(t),Np.add(t))}const Fp=30,lE=e=>!isNaN(parseFloat(e)),mi={current:void 0};class Lp{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Qn.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=Qn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=lE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pc(!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 hc);const r=this.events[t].add(n);return t==="change"?()=>{r(),De.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 mi.current&&mi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fp);return up(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 uo(e,t){return new Lp(e,t)}function cE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function uE(e,t){const n=Ds(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=vT(i[s]);cE(e,s,a)}}function Vp(e){return e.getProps()[ih]}class dE extends Lp{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Ah(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&&(As(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function fE(e){return!!(xt(e)&&e.add)}function mc(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 dE("auto"),e.addValue("willChange",r)),fE(r))return r.add(t)}function hE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function $p(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),h=l[d];if(h===void 0||u&&hE(u,d))continue;const p={delay:n,elapsed:0,...Yl(s||{},d)};let m=!1;if(window.HandoffAppearAnimations){const v=Vp(e);if(v){const w=window.HandoffAppearAnimations(v,d,f,De);w!==null&&(p.elapsed=w,m=!0)}}f.start(fc(d,f,h,e.shouldReduceMotion&&Yn.has(d)?{type:!1}:p,e,m,mc(e,d)));const g=f.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{De.update(()=>{a&&uE(e,a)})}),c}function gc(e,t,n={}){var r;const o=Ds(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($p(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return pE(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function pE(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(mE).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(gc(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function mE(e,t){return e.sortNodePosition(t)}function gE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>gc(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=gc(e,t,n);else{const o=typeof t=="function"?Ds(e,t,n.custom):t;r=Promise.all($p(e,o,n))}return r.then(()=>{De.postRender(()=>{e.notify("AnimationComplete",t)})})}const yE=[..._l].reverse(),vE=_l.length;function bE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>gE(e,n,r)))}function wE(e){let t=bE(e),n=Rp(),r=!0;const o=l=>(c,u)=>{var d;const f=Ds(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function i(l){t=l(e)}function s(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let g=0;g<vE;g++){const v=yE[g],w=n[v],y=c[v]!==void 0?c[v]:u[v],S=ri(y),T=v===l?w.isActive:null;T===!1&&(p=g);let E=y===u[v]&&y!==c[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...h},!w.isActive&&T===null||!y&&!w.prevProp||oi(y)||typeof y=="boolean")continue;let D=xE(w.prevProp,y)||v===l&&w.isActive&&!E&&S||g>p&&S,_=!1;const I=Array.isArray(y)?y:[y];let V=I.reduce(o(v),{});T===!1&&(V={});const{prevResolvedValues:F={}}=w,$={...F,...V},C=O=>{D=!0,f.has(O)&&(_=!0,f.delete(O)),w.needsAnimating[O]=!0;const M=e.getValue(O);M&&(M.liveStyle=!1)};for(const O in $){const M=V[O],L=F[O];if(h.hasOwnProperty(O))continue;let H=!1;zl(M)&&zl(L)?H=!Bh(M,L):H=M!==L,H?M!=null?C(O):f.add(O):M!==void 0&&f.has(O)?C(O):w.protectedKeys[O]=!0}w.prevProp=y,w.prevResolvedValues=V,w.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(D=!1),D&&(!E||_)&&d.push(...I.map(O=>({animation:O,options:{type:v}})))}if(f.size){const g={};f.forEach(v=>{const w=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),g[v]=w??null}),d.push({animation:g})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Rp(),r=!0}}}function xE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Bh(t,e):!1}function Er(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rp(){return{animate:Er(!0),whileInView:Er(),whileHover:Er(),whileTap:Er(),whileDrag:Er(),whileFocus:Er(),exit:Er()}}class TE extends Xn{constructor(t){super(t),t.animationState||(t.animationState=wE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();oi(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 SE=0;class EE extends Xn{constructor(){super(...arguments),this.id=SE++}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 CE={animation:{Feature:TE},exit:{Feature:EE}},jp=(e,t)=>Math.abs(e-t);function PE(e,t){const n=jp(e.x,t.x),r=jp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Bp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=vc(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=PE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Tt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:v}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=yc(f,this.transformPagePoint),De.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=vc(d.type==="pointercancel"?this.lastMoveEventInfo:yc(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,g),p&&p(d,g)},!Mh(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=_s(t),a=yc(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=Tt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,vc(a,this.history)),this.removeListeners=_n(An(this.contextWindow,"pointermove",this.handlePointerMove),An(this.contextWindow,"pointerup",this.handlePointerUp),An(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hn(this.updatePoint)}}function yc(e,t){return t?{point:t(e.point)}:e}function zp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vc({point:e},t){return{point:e,delta:zp(e,Wp(t)),offset:zp(e,kE(t)),velocity:OE(t,.1)}}function kE(e){return e[0]}function Wp(e){return e[e.length-1]}function OE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Wp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Dn(t)));)n--;if(!r)return{x:0,y:0};const i=Mn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const 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 Hp=1e-4,IE=1-Hp,AE=1+Hp,Up=.01,_E=0-Up,DE=0+Up;function Wt(e){return e.max-e.min}function ME(e,t,n){return Math.abs(e-t)<=n}function Gp(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=Wt(n)/Wt(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=IE&&e.scale<=AE||isNaN(e.scale))&&(e.scale=1),(e.translate>=_E&&e.translate<=DE||isNaN(e.translate))&&(e.translate=0)}function gi(e,t,n,r){Gp(e.x,t.x,n.x,r?r.originX:void 0),Gp(e.y,t.y,n.y,r?r.originY:void 0)}function Yp(e,t,n){e.min=n.min+t.min,e.max=e.min+Wt(t)}function NE(e,t,n){Yp(e.x,t.x,n.x),Yp(e.y,t.y,n.y)}function qp(e,t,n){e.min=t.min-n.min,e.max=e.min+Wt(t)}function yi(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function FE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function Kp(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function LE(e,{top:t,left:n,bottom:r,right:o}){return{x:Kp(e.x,n,o),y:Kp(e.y,t,r)}}function Zp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function VE(e,t){return{x:Zp(e.x,t.x),y:Zp(e.y,t.y)}}function $E(e,t){let n=.5;const r=Wt(e),o=Wt(t);return o>r?n=hi(t.min,t.max-r,e.min):r>o&&(n=hi(e.min,e.max-o,t.min)),qn(0,1,n)}function RE(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 bc=.35;function jE(e=bc){return e===!1?e=0:e===!0&&(e=bc),{x:Xp(e,"left","right"),y:Xp(e,"top","bottom")}}function Xp(e,t,n){return{min:Qp(e,t),max:Qp(e,n)}}function Qp(e,t){return typeof e=="number"?e:e[t]||0}const Jp=()=>({translate:0,scale:1,origin:0,originPoint:0}),fo=()=>({x:Jp(),y:Jp()}),em=()=>({min:0,max:0}),st=()=>({x:em(),y:em()});function Zt(e){return[e("x"),e("y")]}function tm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zE(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 wc(e){return e===void 0||e===1}function xc({scale:e,scaleX:t,scaleY:n}){return!wc(e)||!wc(t)||!wc(n)}function Cr(e){return xc(e)||nm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nm(e){return rm(e.x)||rm(e.y)}function rm(e){return e&&e!=="0%"}function $s(e,t,n){const r=e-n,o=t*r;return n+o}function om(e,t,n,r,o){return o!==void 0&&(e=$s(e,o,r)),$s(e,n,r)+t}function Tc(e,t=0,n=1,r,o){e.min=om(e.min,t,n,r,o),e.max=om(e.max,t,n,r,o)}function im(e,{x:t,y:n}){Tc(e.x,t.translate,t.scale,t.originPoint),Tc(e.y,n.translate,n.scale,n.originPoint)}const sm=.999999999999,am=1.0000000000001;function WE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ho(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,im(e,s)),r&&Cr(i.latestValues)&&ho(e,i.latestValues))}t.x<am&&t.x>sm&&(t.x=1),t.y<am&&t.y>sm&&(t.y=1)}function er(e,t){e.min=e.min+t,e.max=e.max+t}function lm(e,t,n,r,o=.5){const i=Ze(e.min,e.max,o);Tc(e,t,n,i,r)}function ho(e,t){lm(e.x,t.x,t.scaleX,t.scale,t.originX),lm(e.y,t.y,t.scaleY,t.scale,t.originY)}function cm(e,t){return tm(zE(e.getBoundingClientRect(),t))}function HE(e,t,n){const r=cm(e,n),{scroll:o}=t;return o&&(er(r.x,o.offset.x),er(r.y,o.offset.y)),r}const um=({current:e})=>e?e.ownerDocument.defaultView:null,UE=new WeakMap;class GE{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=st(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(_s(u,"page").point)},i=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Vh(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zt(v=>{let w=this.getAxisMotionValue(v).get()||0;if(fn.test(w)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[v];S&&(w=Wt(S)*(parseFloat(w)/100))}}this.originPoint[v]=w}),m&&De.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=mc(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:g}=d;if(h&&this.currentDirection===null){this.currentDirection=YE(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Zt(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Bp(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:um(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&&De.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||!Rs(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=FE(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&&oo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=LE(o.layoutBox,n):this.constraints=!1,this.elastic=jE(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Zt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=RE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!oo(t))return!1;const r=t.current;tn(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=HE(r,o.root,this.visualElement.getTransformPagePoint());let s=VE(o.layout.layoutBox,i);if(n){const a=n(BE(s));this.hasMutatedConstraints=!!a,a&&(s=tm(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Zt(u=>{if(!Rs(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(fc(t,r,0,n,this.visualElement,!1,mc(this.visualElement,t)))}stopAnimation(){Zt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zt(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){Zt(n=>{const{drag:r}=this.getProps();if(!Rs(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]-Ze(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!oo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Zt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=$E({min:l,max:l},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(),Zt(s=>{if(!Rs(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Ze(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;UE.set(this.visualElement,this);const t=this.visualElement.current,n=An(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();oo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),De.read(r);const s=In(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[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=bc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Rs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function YE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class qE extends Xn{constructor(t){super(t),this.removeGroupControls=wt,this.removeListeners=wt,this.controls=new GE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wt}unmount(){this.removeGroupControls(),this.removeListeners()}}const dm=e=>(t,n)=>{e&&De.postRender(()=>e(t,n))};class KE extends Xn{constructor(){super(...arguments),this.removePointerDownListener=wt}onPointerDown(t){this.session=new Bp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:um(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:dm(t),onStart:dm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&De.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=An(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 ZE(){const e=b.useContext(ws);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 js={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=fm(e,t.target.x),r=fm(e,t.target.y);return`${n}% ${r}%`}},XE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Jn.parse(e);if(o.length>5)return r;const i=Jn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Ze(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class QE extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;q1(JE),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()})),js.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()||De.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Al.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 hm(e){const[t,n]=ZE(),r=b.useContext(ii);return x.jsx(QE,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(ah),isPresent:t,safeToRemove:n})}const JE={borderRadius:{...vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vi,borderTopRightRadius:vi,borderBottomLeftRadius:vi,borderBottomRightRadius:vi,boxShadow:XE},pm=["TopLeft","TopRight","BottomLeft","BottomRight"],eC=pm.length,mm=e=>typeof e=="string"?parseFloat(e):e,gm=e=>typeof e=="number"||fe.test(e);function tC(e,t,n,r,o,i){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,nC(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,rC(r))):i&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<eC;s++){const a=`border${pm[s]}Radius`;let l=ym(t,a),c=ym(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||gm(l)===gm(c)?(e[a]=Math.max(Ze(mm(l),mm(c),r),0),(fn.test(c)||fn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function ym(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nC=vm(0,.5,wp),rC=vm(.5,.95,wt);function vm(e,t,n){return r=>r<e?0:r>t?1:n(hi(e,t,r))}function bm(e,t){e.min=t.min,e.max=t.max}function Xt(e,t){bm(e.x,t.x),bm(e.y,t.y)}function wm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function xm(e,t,n,r,o){return e-=t,e=$s(e,1/n,r),o!==void 0&&(e=$s(e,1/o,r)),e}function oC(e,t=0,n=1,r=.5,o,i=e,s=e){if(fn.test(t)&&(t=parseFloat(t),t=Ze(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ze(i.min,i.max,r);e===i&&(a-=t),e.min=xm(e.min,t,n,a,o),e.max=xm(e.max,t,n,a,o)}function Tm(e,t,[n,r,o],i,s){oC(e,t[n],t[r],t[o],t.scale,i,s)}const iC=["x","scaleX","originX"],sC=["y","scaleY","originY"];function Sm(e,t,n,r){Tm(e.x,t,iC,n?n.x:void 0,r?r.x:void 0),Tm(e.y,t,sC,n?n.y:void 0,r?r.y:void 0)}function Em(e){return e.translate===0&&e.scale===1}function Cm(e){return Em(e.x)&&Em(e.y)}function aC(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 Pm(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 km(e){return Wt(e.x)/Wt(e.y)}function Om(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class lC{constructor(){this.members=[]}add(t){Is(this.members,t),t.scheduleRender()}remove(t){if(As(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 cC(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:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const uC=(e,t)=>e.depth-t.depth;class dC{constructor(){this.children=[],this.isDirty=!1}add(t){Is(this.children,t),this.isDirty=!0}remove(t){As(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uC),this.isDirty=!1,this.children.forEach(t)}}function fC(e,t){const n=Qn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(hn(r),e(i-t))};return De.read(r,!0),()=>hn(r)}function hC(e){return e instanceof SVGElement&&e.tagName!=="svg"}function pC(e,t,n){const r=xt(e)?e:uo(e);return r.start(fc("",r,t,n)),r.animation}const Pr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Sc=["","X","Y","Z"],mC={visibility:"hidden"},Im=1e3;let gC=0;function Ec(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Am(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Vp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Am(e.parent):!1:!1}function _m({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=gC++,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&&(Pr.totalNodes=Pr.resolvedTargetDeltas=Pr.recalculatedProjection=0),this.nodes.forEach(bC),this.nodes.forEach(EC),this.nodes.forEach(CC),this.nodes.forEach(wC),window.MotionDebug&&window.MotionDebug.record(Pr)},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 l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new dC)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new hc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=hC(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=fC(f,250),js.hasAnimatedSinceResize&&(js.hasAnimatedSinceResize=!1,this.nodes.forEach(Mm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||AC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),w=!this.targetLayout||!Pm(this.targetLayout,p)||h,y=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const S={...Yl(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||Mm(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,hn(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(PC),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&&Am(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Dm);return}this.isUpdating||this.nodes.forEach(TC),this.isUpdating=!1,this.nodes.forEach(SC),this.nodes.forEach(yC),this.nodes.forEach(vC),this.clearAllSnapshots();const a=Qn.now();Tt.delta=qn(0,1e3/60,a-Tt.timestamp),Tt.timestamp=a,Tt.isProcessing=!0,Wl.update.process(Tt),Wl.preRender.process(Tt),Wl.render.process(Tt),Tt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Al.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xC),this.sharedNodes.forEach(kC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,De.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){De.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),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&&!Cm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||Cr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),_C(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return st();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(er(a.x,l.offset.x),er(a.y,l.offset.y)),a}removeElementScroll(s){const a=st();Xt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Xt(a,s);const{scroll:f}=this.root;f&&(er(a.x,-f.offset.x),er(a.y,-f.offset.y))}er(a.x,u.offset.x),er(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=st();Xt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ho(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Cr(u.latestValues)&&ho(l,u.latestValues)}return Cr(this.latestValues)&&ho(l,this.latestValues),l}removeTransform(s){const a=st();Xt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Cr(c.latestValues))continue;xc(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();Xt(u,d),Sm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Cr(this.latestValues)&&Sm(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!==Tt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Tt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),yi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),im(this.target,this.targetDelta)):Xt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),yi(this.relativeTargetOrigin,this.target,h.target),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Pr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||xc(this.parent.latestValues)||nm(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(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Tt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Xt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;WE(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=st());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wm(this.prevProjectionDelta.x,this.projectionDelta.x),wm(this.prevProjectionDelta.y,this.projectionDelta.y)),gi(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Om(this.projectionDelta.x,this.prevProjectionDelta.x)||!Om(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Pr.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=fo(),this.projectionDelta=fo(),this.projectionDeltaWithTransform=fo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=fo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=st(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,g=this.getStack(),v=!g||g.members.length<=1,w=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(IC));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const T=S/1e3;Nm(d.x,s.x,T),Nm(d.y,s.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(yi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),OC(this.relativeTarget,this.relativeTargetOrigin,f,T),y&&aC(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=st()),Xt(y,this.relativeTarget)),m&&(this.animationValues=u,tC(u,c,this.latestValues,T,w,v)),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&&(hn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{js.hasAnimatedSinceResize=!0,this.currentAnimation=pC(0,Im,{...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(Im),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Rm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=Wt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=Wt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Xt(a,l),ho(a,u),gi(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new lC),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){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:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ec("z",s,c,this.animationValues);for(let u=0;u<Sc.length;u++)Ec(`rotate${Sc[u]}`,s,c,this.animationValues),Ec(`skew${Sc[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return mC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Os(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Os(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Cr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=cC(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Cs){if(f[m]===void 0)continue;const{correct:g,applyTo:v}=Cs[m],w=c.transform==="none"?f[m]:g(f[m],d);if(v){const y=v.length;for(let S=0;S<y;S++)c[v[S]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=d===this?Os(s==null?void 0:s.pointerEvents)||"":"none"),c}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(Dm),this.root.sharedNodes.clear()}}}function yC(e){e.updateLayout()}function vC(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"?Zt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Wt(f);f.min=r[d].min,f.max=f.min+h}):Rm(i,n.layoutBox,r)&&Zt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Wt(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=fo();gi(a,r,n.layoutBox);const l=fo();s?gi(l,e.applyTransform(o,!0),n.measuredBox):gi(l,r,n.layoutBox);const c=!Cm(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=st();yi(p,n.layoutBox,f.layoutBox);const m=st();yi(m,r,h.layoutBox),Pm(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function bC(e){window.MotionDebug&&Pr.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 wC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xC(e){e.clearSnapshot()}function Dm(e){e.clearMeasurements()}function TC(e){e.isLayoutDirty=!1}function SC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function EC(e){e.resolveTargetDelta()}function CC(e){e.calcProjection()}function PC(e){e.resetSkewAndRotation()}function kC(e){e.removeLeadSnapshot()}function Nm(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fm(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function OC(e,t,n,r){Fm(e.x,t.x,n.x,r),Fm(e.y,t.y,n.y,r)}function IC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const AC={duration:.45,ease:[.4,0,.1,1]},Lm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vm=Lm("applewebkit/")&&!Lm("chrome/")?Math.round:wt;function $m(e){e.min=Vm(e.min),e.max=Vm(e.max)}function _C(e){$m(e.x),$m(e.y)}function Rm(e,t,n){return e==="position"||e==="preserve-aspect"&&!ME(km(t),km(n),.2)}const DC=_m({attachResizeListener:(e,t)=>In(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Cc={current:void 0},jm=_m({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cc.current){const e=new DC({});e.mount(window),e.setOptions({layoutScroll:!0}),Cc.current=e}return Cc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),MC={pan:{Feature:KE},drag:{Feature:qE,ProjectionNode:jm,MeasureLayout:hm}},Pc={current:null},Bm={current:!1};function NC(){if(Bm.current=!0,!!Il)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pc.current=e.matches;e.addListener(t),t()}else Pc.current=!1}function FC(e,t,n){for(const r in t){const o=t[r],i=n[r];if(xt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&pc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(xt(i))e.addValue(r,uo(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,uo(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const zm=new WeakMap,LC=[...Kh,It,Jn],VC=e=>LC.find(qh(e)),Wm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],$C=Dl.length;class RC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zl,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,De.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Es(n),this.isVariantNode=uh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&xt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,zm.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)),Bm.current||NC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pc.current,process.env.NODE_ENV!=="production"&&pc(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(){zm.delete(this.current),this.projection&&this.projection.unmount(),hn(this.notifyUpdate),hn(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=Yn.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&De.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 io){const n=io[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):st()}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<Wm.length;r++){const o=Wm[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=FC(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<$C;r++){const o=Dl[r],i=this.props[o];(ri(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=uo(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"&&(Wh(o)||zh(o))?o=parseFloat(o):!VC(o)&&Jn.test(n)&&(o=ip(t,n)),this.setBaseTarget(t,xt(o)?o.get():o)),xt(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=Bl(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&&!xt(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 hc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Hm extends RC{constructor(){super(...arguments),this.KeyframeResolver=sp}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 jC(e){return window.getComputedStyle(e)}class BC extends Hm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Eh}readValueFromInstance(t,n){if(Yn.has(n)){const r=tc(n);return r&&r.default||0}else{const r=jC(t),o=(mh(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return cm(t,n)}build(t,n,r){Ll(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return jl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class zC extends Hm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Yn.has(n)){const r=tc(n);return r&&r.default||0}return n=Ch.has(n)?n:Ts(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return kh(t,n,r)}build(t,n,r){$l(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Ph(t,n,r,o)}mount(t){this.isSVGTag=Rl(t.tagName),super.mount(t)}}const WC=(e,t)=>Ml(e)?new zC(t):new BC(t,{allowProjection:e!==b.Fragment}),HC={...CE,...$T,...MC,...{layout:{ProjectionNode:jm,MeasureLayout:hm}}},Ht=G1((e,t)=>CT(e,t,HC,WC));function Um(){const e=b.useRef(!1);return xs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Gm(){const e=Um(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>De.postRender(r),[r]),t]}class UC extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function GC({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(ro);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=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 ms(e,t){var n=vl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Wn(e,o)?t(e[o],e):""}var i=typeof ml=="function"?ml(e):[],s;if(Qr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)Wn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Qr&&s["$"+l]instanceof Symbol||(Of.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof ml=="function")for(var c=0;c<i.length;c++)Mf.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var Wf=Zr,Jr=jw,mx=Zw,gx=ni,gs=Wf("%WeakMap%",!0),ys=Wf("%Map%",!0),yx=Jr("WeakMap.prototype.get",!0),vx=Jr("WeakMap.prototype.set",!0),bx=Jr("WeakMap.prototype.has",!0),wx=Jr("Map.prototype.get",!0),xx=Jr("Map.prototype.set",!0),Tx=Jr("Map.prototype.has",!0),xl=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},Sx=function(e,t){var n=xl(e,t);return n&&n.value},Ex=function(e,t,n){var r=xl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Cx=function(e,t){return!!xl(e,t)},Px=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new gx("Side channel does not contain "+mx(i))},get:function(i){if(gs&&i&&(typeof i=="object"||typeof i=="function")){if(t)return yx(t,i)}else if(ys){if(n)return wx(n,i)}else if(r)return Sx(r,i)},has:function(i){if(gs&&i&&(typeof i=="object"||typeof i=="function")){if(t)return bx(t,i)}else if(ys){if(n)return Tx(n,i)}else if(r)return Cx(r,i);return!1},set:function(i,s){gs&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new gs),vx(t,i,s)):ys?(n||(n=new ys),xx(n,i,s)):(r||(r={key:{},next:null}),Ex(r,i,s))}};return o},kx=String.prototype.replace,Ix=/%20/g,Tl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Hf={default:Tl.RFC3986,formatters:{RFC1738:function(e){return kx.call(e,Ix,"+")},RFC3986:function(e){return String(e)}},RFC1738:Tl.RFC1738,RFC3986:Tl.RFC3986},Ox=Hf,Sl=Object.prototype.hasOwnProperty,wr=Array.isArray,dn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),_x=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(wr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Uf=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},Ax=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(wr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Sl.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 wr(t)&&!wr(n)&&(o=Uf(t,r)),wr(t)&&wr(n)?(n.forEach(function(i,s){if(Sl.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 Sl.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},Mx=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Dx=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}},Nx=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(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===Ox.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+dn[c];continue}if(c<2048){a=a+(dn[192|c>>6]+dn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(dn[224|c>>12]+dn[128|c>>6&63]+dn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=dn[240|c>>18]+dn[128|c>>12&63]+dn[128|c>>6&63]+dn[128|c&63]}return a},Fx=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),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return _x(n),t},Lx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Vx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},$x=function(t,n){return[].concat(t,n)},jx=function(t,n){if(wr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Gf={arrayToObject:Uf,assign:Mx,combine:$x,compact:Fx,decode:Dx,encode:Nx,isBuffer:Vx,isRegExp:Lx,maybeMap:jx,merge:Ax},Rx=Gf,Yf=Hf,Bx=Date.prototype.toISOString,qf=Yf.default;Rx.encode,Yf.formatters[qf];var zx=Gf;zx.decode;var Kf=e=>Array.isArray(e),El=e=>e===void 0,Cl=e=>e===null,Wx=Function.bind.call(Function.call,Object.prototype.toString),Hx=e=>!!e&&Wx(e)==="[object Error]"||e instanceof Error,Zf=(e,t)=>e instanceof t,Ux=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Gx=e=>Object.prototype.toString.call(e)==="[object Date]"&&Zf(e,Date),kn={array:Kf,date:Gx,empty:e=>Cl(e)||El(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:Zf,isError:Hx,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Cl(e)||El(e),null:Cl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Kf(e)&&typeof e=="object",primitive:Ux,string:e=>typeof e=="string",undefined:El},Pl=(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]=Pl(i?[]:{},o,n)}else e[r]=Pl(e[r],o,n)}else e[r]=n;return e},Yx=e=>Object.keys(e),qx=e=>e.replace("[",".").replace("]","").split("."),Xf=(e,t,n)=>{const r=Array.isArray(t)?t:qx(t),o=structuredClone(e);return Pl(o,r,n),o};const kl="-";function Kx(e){const t=Xx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(kl);return a[0]===""&&a.length!==1&&a.shift(),Qf(a,t)||Zx(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function Qf(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Qf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(kl);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Jf=/^\[(.+)\]$/;function Zx(e){if(Jf.test(e)){const t=Jf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Xx(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Jx(Object.entries(e.classGroups),n).forEach(([i,s])=>{Il(s,r,i,t)}),r}function Il(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:eh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Qx(o)){Il(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Il(s,eh(t,i),n,r)})})}function eh(e,t){let n=e;return t.split(kl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Qx(e){return e.isThemeGetter}function Jx(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 e1(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 th="!";function t1(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const l=[];let c=0,u=0,d;for(let v=0;v<a.length;v++){let y=a[v];if(c===0){if(y===o&&(r||a.slice(v,v+i)===t)){l.push(a.slice(u,v)),u=v+i;continue}if(y==="/"){d=v;continue}}y==="["?c++:y==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(th),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function n1(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 r1(e){return{cache:e1(e.cacheSize),parseClassName:t1(e),...Kx(e)}}const o1=/\s+/;function i1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(o1).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:s};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:s};d=!1}const h=n1(a).join(":");return{isTailwindClass:!0,modifierId:l?h+th:h,classGroupId:f,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(d=>i.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function s1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=nh(t))&&(r&&(r+=" "),r+=n);return r}function nh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=nh(e[r]))&&(n&&(n+=" "),n+=t);return n}function a1(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=r1(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=i1(l,n);return o(l,u),u}return function(){return i(s1.apply(null,arguments))}}function Ge(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const rh=/^\[(?:([a-z-]+):)?(.+)\]$/i,l1=/^\d+\/\d+$/,c1=new Set(["px","full","screen"]),u1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,d1=/\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$/,f1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,h1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,p1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function In(e){return xr(e)||c1.has(e)||l1.test(e)}function Un(e){return eo(e,"length",T1)}function xr(e){return!!e&&!Number.isNaN(Number(e))}function vs(e){return eo(e,"number",xr)}function ai(e){return!!e&&Number.isInteger(Number(e))}function m1(e){return e.endsWith("%")&&xr(e.slice(0,-1))}function ve(e){return rh.test(e)}function Gn(e){return u1.test(e)}const g1=new Set(["length","size","percentage"]);function y1(e){return eo(e,g1,oh)}function v1(e){return eo(e,"position",oh)}const b1=new Set(["image","url"]);function w1(e){return eo(e,b1,E1)}function x1(e){return eo(e,"",S1)}function li(){return!0}function eo(e,t,n){const r=rh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function T1(e){return d1.test(e)&&!f1.test(e)}function oh(){return!1}function S1(e){return h1.test(e)}function E1(e){return p1.test(e)}function C1(){const e=Ge("colors"),t=Ge("spacing"),n=Ge("blur"),r=Ge("brightness"),o=Ge("borderColor"),i=Ge("borderRadius"),s=Ge("borderSpacing"),a=Ge("borderWidth"),l=Ge("contrast"),c=Ge("grayscale"),u=Ge("hueRotate"),d=Ge("invert"),f=Ge("gap"),h=Ge("gradientColorStops"),p=Ge("gradientColorStopPositions"),m=Ge("inset"),v=Ge("margin"),y=Ge("opacity"),x=Ge("padding"),g=Ge("saturate"),S=Ge("scale"),T=Ge("sepia"),E=Ge("skew"),O=Ge("space"),I=Ge("translate"),k=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ve,t],D=()=>[ve,t],V=()=>["",In,Un],P=()=>["auto",xr,ve],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ve],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[xr,vs],Z=()=>[xr,ve];return{cacheSize:500,separator:":",theme:{colors:[li],spacing:[In,Un],blur:["none","",Gn,ve],brightness:R(),borderColor:[e],borderRadius:["none","","full",Gn,ve],borderSpacing:D(),borderWidth:V(),contrast:R(),grayscale:U(),hueRotate:Z(),invert:U(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[m1,Un],inset:L(),margin:L(),opacity:R(),padding:D(),saturate:R(),scale:R(),sepia:U(),skew:Z(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Gn]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:[...A(),ve]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],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",ai,ve]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",ai,ve]}],"grid-cols":[{"grid-cols":[li]}],"col-start-end":[{col:["auto",{span:["full",ai,ve]},ve]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[li]}],"row-start-end":[{row:["auto",{span:[ai,ve]},ve]}],"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",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"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:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Gn]},Gn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gn,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vs]}],"font-family":[{font:[li]}],"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",ve]}],"line-clamp":[{"line-clamp":["none",xr,vs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",In,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",In,Un]}],"underline-offset":[{"underline-offset":["auto",In,ve]}],"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",ve]}],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",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),v1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",y1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},w1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[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":[y]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:N()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[In,ve]}],"outline-w":[{outline:[In,Un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[In,Un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gn,x1]}],"shadow-color":[{shadow:[li]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"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",ve]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ai,ve]}],"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",ve]}],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",ve]}],"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",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[In,Un,vs]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const P1=a1(C1),Ol=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},k1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),I1=e=>kn.function(e),ze=(...e)=>P1(B0(e)),bs=(e,t)=>{const n=new Event("input",{bubbles:!0});return e==null||e.dispatchEvent(n),n},ws=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},to=b.forwardRef(function({as:t,...n},r){const o=t||"span";return w.jsx(o,{...n,ref:r})}),O1=ti("inline-flex duration-700 enabled:hover:bg-opacity-80 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent 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 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",primary:"bg-primary text-primary-foreground",main:"bg-primary text-primary-foreground",warn:"bg-warn text-warn-foreground",danger:"bg-danger text-danger-foreground",secondary:"bg-secondary-background text-secondary-foreground disabled:text-secondary-subtle",success:"bg-success text-success-foreground",info:"bg-info text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Yn=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return w.jsxs(to,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:ze(O1({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),_1=e=>w.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>w.jsx("li",{className:"flex flex-1",children:w.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:ze("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),A1=ti("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"}}}),M1=ti("inline-flex rounded-pill gap-1.5 text-main-foreground 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:{raw:"",warn:"bg-warn-subtle text-warn-hover",info:"bg-info-subtle text-info-hover",main:"bg-primary-subtle text-primary-hover",danger:"bg-danger-subtle text-danger-hover",success:"bg-success-subtle text-success-hover",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70",secondary:"bg-secondary-background text-secondary-foreground",neutral:"bg-transparent border-card-border border text-foreground"}},defaultVariants:{theme:"main",size:"default"}}),D1=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return w.jsxs(to,{...a,ref:l,"data-theme":i,as:a.as??"span",className:ze(M1({size:s,theme:i}),t),children:[n?w.jsx("span",{className:A1({theme:n})}):null,r,a.children]})}),no=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),xs=b.createContext({}),Ts=b.createContext(null),_l=typeof document<"u",Ss=_l?b.useLayoutEffect:b.useEffect,ih=b.createContext({strict:!1}),Es=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sh="data-"+Es("framerAppearId"),N1={skipAnimations:!1,useManualTiming:!1};function F1(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(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&i.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const Cs=["read","resolveKeyframes","update","preRender","render","postRender"],L1=40;function ah(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Cs.reduce((y,x)=>(y[x]=F1(i),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=s,h=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,L1),1),o.timestamp=y,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Cs.reduce((y,x)=>{const g=s[x];return y[x]=(S,T=!1,E=!1)=>(n||p(),g.schedule(S,T,E)),y},{}),cancel:y=>{for(let x=0;x<Cs.length;x++)s[Cs[x]].cancel(y)},state:o,steps:s}}const{schedule:Al,cancel:XL}=ah(queueMicrotask,!1);function ro(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const lh=b.createContext({});let ch=!1;function V1(e,t,n,r,o){const{visualElement:i}=b.useContext(xs),s=b.useContext(ih),a=b.useContext(Ts),l=b.useContext(no).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(lh);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&j1(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const f=b.useRef(!!(n[sh]&&!window.HandoffComplete));return Ss(()=>{u&&(u.updateFeatures(),Al.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,ch||(ch=!0,queueMicrotask($1))))}),u}function $1(){window.HandoffComplete=!0}function j1(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:uh(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&ro(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function uh(e){if(e)return e.options.allowProjection!==!1?e.projection:uh(e.parent)}function R1(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):ro(n)&&(n.current=r))},[t])}function ci(e){return typeof e=="string"||Array.isArray(e)}function ui(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Ml=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dl=["initial",...Ml];function Ps(e){return ui(e.animate)||Dl.some(t=>ci(e[t]))}function dh(e){return!!(Ps(e)||e.variants)}function B1(e,t){if(Ps(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ci(n)?n:void 0,animate:ci(r)?r:void 0}}return e.inherit!==!1?t:{}}function z1(e){const{initial:t,animate:n}=B1(e,b.useContext(xs));return b.useMemo(()=>({initial:t,animate:n}),[fh(t),fh(n)])}function fh(e){return Array.isArray(e)?e.join(" "):e}const hh={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"]},oo={};for(const e in hh)oo[e]={isEnabled:t=>hh[e].some(n=>!!t[n])};function W1(e){for(const t in e)oo[t]={...oo[t],...e[t]}}const di=b.createContext({}),H1=Symbol.for("motionComponentSymbol"),wt=e=>e;let io=wt,tn=wt;process.env.NODE_ENV!=="production"&&(io=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});function U1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&W1(e);function i(a,l){let c;const u={...b.useContext(no),...a,layoutId:G1(a)},{isStatic:d}=u,f=z1(a),h=r(a,d);if(!d&&_l){Y1(u,e);const p=q1(u);c=p.MeasureLayout,f.visualElement=V1(o,h,u,t,p.ProjectionNode)}return w.jsxs(xs.Provider,{value:f,children:[c&&f.visualElement?w.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,R1(h,f.visualElement,l),h,d,f.visualElement)]})}const s=b.forwardRef(i);return s[H1]=o,s}function G1({layoutId:e}){const t=b.useContext(di).id;return t&&e!==void 0?t+"-"+e:e}function Y1(e,t){const n=b.useContext(ih).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?io(!1,r):tn(!1,r)}}function q1(e){const{drag:t,layout:n}=oo;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 K1(e){function t(r,o={}){return U1(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 Z1=["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 Nl(e){return typeof e!="string"||e.includes("-")?!1:!!(Z1.indexOf(e)>-1||/[A-Z]/u.test(e))}const ks={};function X1(e){Object.assign(ks,e)}const fi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qn=new Set(fi);function ph(e,{layout:t,layoutId:n}){return qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ks[e]||e==="opacity")}const xt=e=>!!(e&&e.getVelocity),Q1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},J1=fi.length;function eT(e,t,n){let r="";for(let o=0;o<J1;o++){const i=fi[o];if(e[i]!==void 0){const s=Q1[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const mh=e=>t=>typeof t=="string"&&t.startsWith(e),gh=mh("--"),tT=mh("var(--"),Fl=e=>tT(e)?nT.test(e.split("/*")[0].trim()):!1,nT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,rT=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Kn=(e,t,n)=>n>t?t:n<e?e:n,so={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},hi={...so,transform:e=>Kn(0,1,e)},Is={...so,default:1},pi=e=>Math.round(e*1e5)/1e5,Ll=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,oT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,iT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function mi(e){return typeof e=="string"}function sT(e){return e==null}const gi=e=>({test:t=>mi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zn=gi("deg"),fn=gi("%"),fe=gi("px"),aT=gi("vh"),lT=gi("vw"),yh={...fn,parse:e=>fn.parse(e)/100,transform:e=>fn.transform(e*100)},vh={...so,transform:Math.round},bh={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:Zn,rotateX:Zn,rotateY:Zn,rotateZ:Zn,scale:Is,scaleX:Is,scaleY:Is,scaleZ:Is,skew:Zn,skewX:Zn,skewY:Zn,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:hi,originX:yh,originY:yh,originZ:fe,zIndex:vh,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:hi,strokeOpacity:hi,numOctaves:vh};function Vl(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(gh(u)){o[u]=d;continue}const f=bh[u],h=rT(d,f);if(qn.has(u)){if(a=!0,i[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=eT(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=s;r.transformOrigin=`${u} ${d} ${f}`}}const $l=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wh(e,t,n){for(const r in t)!xt(t[r])&&!ph(r,n)&&(e[r]=t[r])}function cT({transformTemplate:e},t){return b.useMemo(()=>{const n=$l();return Vl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function uT(e,t){const n=e.style||{},r={};return wh(r,n,e),Object.assign(r,cT(e,t)),r}function dT(e,t){const n={},r=uT(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const fT=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 Os(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fT.has(e)}let xh=e=>!Os(e);function Th(e){e&&(xh=t=>t.startsWith("on")?!Os(t):e(t))}try{Th(require("@emotion/is-prop-valid").default)}catch{}function hT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(xh(o)||n===!0&&Os(o)||!t&&!Os(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Sh(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function pT(e,t,n){const r=Sh(t,e.x,e.width),o=Sh(n,e.y,e.height);return`${r} ${o}`}const mT={offset:"stroke-dashoffset",array:"stroke-dasharray"},gT={offset:"strokeDashoffset",array:"strokeDasharray"};function yT(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?mT:gT;e[i.offset]=fe.transform(-r);const s=fe.transform(t),a=fe.transform(n);e[i.array]=`${s} ${a}`}function jl(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Vl(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=pT(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&yT(f,s,a,l,!1)}const Eh=()=>({...$l(),attrs:{}}),Rl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function vT(e,t,n,r){const o=b.useMemo(()=>{const i=Eh();return jl(i,t,Rl(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};wh(i,e.style,e),o.style={...i,...o.style}}return o}function bT(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Nl(n)?vT:dT)(r,i,s,n),c=hT(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=b.useMemo(()=>xt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:f})}}function Ch(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 Ph=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 kh(e,t,n,r){Ch(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ph.has(o)?o:Es(o),t.attrs[o])}function Bl(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(xt(o[s])||t.style&&xt(t.style[s])||ph(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 Ih(e,t,n){const r=Bl(e,t,n);for(const o in e)if(xt(e[o])||xt(t[o])){const i=fi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function Oh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function zl(e,t,n,r){if(typeof t=="function"){const[o,i]=Oh(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]=Oh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Xn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Wl=e=>Array.isArray(e),wT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),xT=e=>Wl(e)?e[e.length-1]||0:e;function _s(e){const t=xt(e)?e.get():e;return wT(t)?t.toValue():t}const _h=new Set(["opacity","clipPath","filter","transform"]);function Ah(e){if(qn.has(e))return"transform";if(_h.has(e))return Es(e)}function As(e,t){e.indexOf(t)===-1&&e.push(t)}function Ms(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function TT([...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 ST({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:CT(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Mh=e=>(t,n)=>{const r=b.useContext(xs),o=b.useContext(Ts),i=()=>ST(e,t,r,o,n);return n?i():Xn(i)};function ET(e,t){const n=Ah(t);n&&As(e,n)}function Dh(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=zl(e,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function CT(e,t,n,r,o){var i;const s={},a=[],l=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(e,{});for(const v in c)s[v]=_s(c[v]);let{initial:u,animate:d}=e;const f=Ps(e),h=dh(e);t&&h&&!f&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!ui(m)&&Dh(e,m,(v,y)=>{for(const x in v){let g=v[x];if(Array.isArray(g)){const S=p?g.length-1:0;g=g[S]}g!==null&&(s[x]=g)}for(const x in y)s[x]=y[x]}),l&&(d&&u!==!1&&!ui(d)&&Dh(e,d,v=>{for(const y in v)ET(a,y)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Me,cancel:hn,state:Tt,steps:Hl}=ah(typeof requestAnimationFrame<"u"?requestAnimationFrame:wt,!0),PT={useVisualState:Mh({scrapeMotionValuesFromProps:Ih,createRenderState:Eh,onMount:(e,t,{renderState:n,latestValues:r})=>{Me.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Me.render(()=>{jl(n,r,Rl(t.tagName),e.transformTemplate),kh(t,n)})}})},kT={useVisualState:Mh({applyWillChange:!0,scrapeMotionValuesFromProps:Bl,createRenderState:$l})};function IT(e,{forwardMotionProps:t=!1},n,r){return{...Nl(e)?PT:kT,preloadedFeatures:n,useRender:bT(t),createVisualElement:r,Component:e}}function On(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Nh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ds(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const OT=e=>t=>Nh(t)&&e(t,Ds(t));function _n(e,t,n,r){return On(e,t,OT(n),r)}const _T=(e,t)=>n=>t(e(n)),An=(...e)=>e.reduce(_T);function Fh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Lh=Fh("dragHorizontal"),Vh=Fh("dragVertical");function $h(e){let t=!1;if(e==="y")t=Vh();else if(e==="x")t=Lh();else{const n=Lh(),r=Vh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function jh(){const e=$h(!0);return e?(e(),!1):!0}class Qn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Rh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||jh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Me.postRender(()=>l(i,s))};return _n(e.current,n,o,{passive:!e.getProps()[r]})}class AT extends Qn{mount(){this.unmount=An(Rh(this.node,!0),Rh(this.node,!1))}unmount(){}}class MT extends Qn{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=An(On(this.node.current,"focus",()=>this.onFocus()),On(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Bh=(e,t)=>t?e===t?!0:Bh(e,t.parentElement):!1;function Ul(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ds(n))}class DT extends Qn{constructor(){super(...arguments),this.removeStartListeners=wt,this.removeEndListeners=wt,this.removeAccessibleListeners=wt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=_n(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),f=!d&&!Bh(this.node.current,a.target)?u:c;f&&Me.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=_n(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=An(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()||Ul("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Me.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=On(this.node.current,"keyup",s),Ul("down",(a,l)=>{this.startPress(a,l)})},n=On(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ul("cancel",(i,s)=>this.cancelPress(i,s))},o=On(this.node.current,"blur",r);this.removeAccessibleListeners=An(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&&Me.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!jh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Me.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=_n(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=On(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=An(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Gl=new WeakMap,Yl=new WeakMap,NT=e=>{const t=Gl.get(e.target);t&&t(e)},FT=e=>{e.forEach(NT)};function LT({root:e,...t}){const n=e||document;Yl.has(n)||Yl.set(n,{});const r=Yl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(FT,{root:e,...t})),r[o]}function VT(e,t,n){const r=LT(t);return Gl.set(e,n),r.observe(e),()=>{Gl.delete(e),r.unobserve(e)}}const $T={some:0,all:1};class jT extends Qn{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:$T[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return VT(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(RT(t,n))&&this.startObserver()}unmount(){}}function RT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const BT={inView:{Feature:jT},tap:{Feature:DT},focus:{Feature:MT},hover:{Feature:AT}};function zh(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 Ns(e,t,n){const r=e.getProps();return zl(r,t,n!==void 0?n:r.custom,e)}const Mn=e=>e*1e3,Dn=e=>e/1e3,zT={type:"spring",stiffness:500,damping:25,restSpeed:10},WT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HT={type:"keyframes",duration:.8},UT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},GT=(e,{keyframes:t})=>t.length>2?HT:qn.has(e)?e.startsWith("scale")?WT(t[1]):zT:UT;function YT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function ql(e,t){return e[t]||e.default||e}const qT=e=>e!==null;function Fs(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(qT),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Ls;function KT(){Ls=void 0}const Jn={now:()=>(Ls===void 0&&Jn.set(Tt.isProcessing||N1.useManualTiming?Tt.timestamp:performance.now()),Ls),set:e=>{Ls=e,queueMicrotask(KT)}},Wh=e=>/^0[^.\s]+$/u.test(e);function ZT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Wh(e):!0}const Hh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),XT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function QT(e){const t=XT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const JT=4;function Uh(e,t,n=1){tn(n<=JT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=QT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Hh(s)?parseFloat(s):s}return Fl(o)?Uh(o,t,n+1):o}const eS=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Gh=e=>e===so||e===fe,Yh=(e,t)=>parseFloat(e.split(", ")[t]),qh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Yh(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Yh(i[1],e):0}},tS=new Set(["x","y","z"]),nS=fi.filter(e=>!tS.has(e));function rS(e){const t=[];return nS.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ao={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:qh(4,13),y:qh(5,14)};ao.translateX=ao.x,ao.translateY=ao.y;const Kh=e=>t=>t.test(e),Zh=[so,fe,fn,Zn,lT,aT,{test:e=>e==="auto",parse:e=>e}],Xh=e=>Zh.find(Kh(e)),Tr=new Set;let Kl=!1,Zl=!1;function Qh(){if(Zl){const e=Array.from(Tr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=rS(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)})}Zl=!1,Kl=!1,Tr.forEach(e=>e.complete()),Tr.clear()}function Jh(){Tr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zl=!0)})}function oS(){Jh(),Qh()}class Xl{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?(Tr.add(this),Kl||(Kl=!0,Me.read(Jh),Me.resolveKeyframes(Qh))):(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 l=r.readValue(n,a);l!=null&&(t[0]=l)}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),Tr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Tr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ql=(e,t)=>n=>!!(mi(n)&&iT.test(n)&&n.startsWith(e)||t&&!sT(n)&&Object.prototype.hasOwnProperty.call(n,t)),ep=(e,t,n)=>r=>{if(!mi(r))return r;const[o,i,s,a]=r.match(Ll);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},iS=e=>Kn(0,255,e),Jl={...so,transform:e=>Math.round(iS(e))},Sr={test:Ql("rgb","red"),parse:ep("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Jl.transform(e)+", "+Jl.transform(t)+", "+Jl.transform(n)+", "+pi(hi.transform(r))+")"};function sS(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 ec={test:Ql("#"),parse:sS,transform:Sr.transform},lo={test:Ql("hsl","hue"),parse:ep("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fn.transform(pi(t))+", "+fn.transform(pi(n))+", "+pi(hi.transform(r))+")"},_t={test:e=>Sr.test(e)||ec.test(e)||lo.test(e),parse:e=>Sr.test(e)?Sr.parse(e):lo.test(e)?lo.parse(e):ec.parse(e),transform:e=>mi(e)?e:e.hasOwnProperty("red")?Sr.transform(e):lo.transform(e)};function aS(e){var t,n;return isNaN(e)&&mi(e)&&(((t=e.match(Ll))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(oT))===null||n===void 0?void 0:n.length)||0)>0}const tp="number",np="color",lS="var",cS="var(",rp="${}",uS=/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 yi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(uS,l=>(_t.test(l)?(r.color.push(i),o.push(np),n.push(_t.parse(l))):l.startsWith(cS)?(r.var.push(i),o.push(lS),n.push(l)):(r.number.push(i),o.push(tp),n.push(parseFloat(l))),++i,rp)).split(rp);return{values:n,split:a,indexes:r,types:o}}function op(e){return yi(e).values}function ip(e){const{split:t,types:n}=yi(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===tp?i+=pi(o[s]):a===np?i+=_t.transform(o[s]):i+=o[s]}return i}}const dS=e=>typeof e=="number"?0:e;function fS(e){const t=op(e);return ip(e)(t.map(dS))}const er={test:aS,parse:op,createTransformer:ip,getAnimatableNone:fS},hS=new Set(["brightness","contrast","saturate","opacity"]);function pS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ll)||[];if(!r)return e;const o=n.replace(r,"");let i=hS.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const mS=/\b([a-z-]*)\(.*?\)/gu,tc={...er,getAnimatableNone:e=>{const t=e.match(mS);return t?t.map(pS).join(" "):e}},gS={...bh,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:tc,WebkitFilter:tc},nc=e=>gS[e];function sp(e,t){let n=nc(e);return n!==tc&&(n=er),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yS=new Set(["auto","none","0"]);function vS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!yS.has(i)&&yi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=sp(n,o)}class ap extends Xl{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Fl(c))){const u=Uh(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!eS.has(r)||t.length!==2)return;const[o,i]=t,s=Xh(o),a=Xh(i);if(s!==a)if(Gh(s)&&Gh(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)ZT(t[o])&&r.push(o);r.length&&vS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ao[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]=ao[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function lp(e){let t;return()=>(t===void 0&&(t=e()),t)}const cp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(er.test(e)||e==="0")&&!e.startsWith("url("));function bS(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 wS(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=cp(o,t),a=cp(i,t);return io(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:bS(e)||n==="spring"&&r}class up{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&&oS(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!wS(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Fs(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 dp(e,t){return t?e*(1e3/t):0}const xS=5;function fp(e,t,n){const r=Math.max(t-xS,0);return dp(n-e(r),t-r)}const rc=.001,TS=.01,hp=10,SS=.05,ES=1;function CS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;io(e<=Mn(hp),"Spring duration must be 10 seconds or less");let s=1-t;s=Kn(SS,ES,s),e=Kn(TS,hp,Dn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,h=oc(c,s),p=Math.exp(-d);return rc-f/h*p},i=c=>{const d=c*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=oc(Math.pow(c,2),s);return(-o(c)+rc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-rc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=kS(o,i,a);if(e=Mn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const PS=12;function kS(e,t,n){let r=n;for(let o=1;o<PS;o++)r=r-e(r)/t(r);return r}function oc(e,t){return e*Math.sqrt(1-t*t)}const IS=["duration","bounce"],OS=["stiffness","damping","mass"];function pp(e,t){return t.some(n=>e[n]!==void 0)}function _S(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!pp(e,OS)&&pp(e,IS)){const n=CS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function mp({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=_S({...r,velocity:-Dn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=i-o,v=Dn(Math.sqrt(a/c)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let x;if(p<1){const g=oc(v,p);x=S=>{const T=Math.exp(-p*v*S);return i-T*((h+p*v*m)/g*Math.sin(g*S)+m*Math.cos(g*S))}}else if(p===1)x=g=>i-Math.exp(-v*g)*(m+(h+v*m)*g);else{const g=v*Math.sqrt(p*p-1);x=S=>{const T=Math.exp(-p*v*S),E=Math.min(g*S,300);return i-T*((h+p*v*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:f&&u||null,next:g=>{const S=x(g);if(f)s.done=g>=u;else{let T=h;g!==0&&(p<1?T=fp(x,g,S):T=0);const E=Math.abs(T)<=n,O=Math.abs(i-S)<=t;s.done=E&&O}return s.value=s.done?i:S,s}}}function gp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=I=>a!==void 0&&I<a||l!==void 0&&I>l,p=I=>a===void 0?l:l===void 0||Math.abs(a-I)<Math.abs(l-I)?a:l;let m=n*t;const v=d+m,y=s===void 0?v:s(v);y!==v&&(m=y-d);const x=I=>-m*Math.exp(-I/r),g=I=>y+x(I),S=I=>{const k=x(I),C=g(I);f.done=Math.abs(k)<=c,f.value=f.done?y:C};let T,E;const O=I=>{h(f.value)&&(T=I,E=mp({keyframes:[f.value,p(f.value)],velocity:fp(g,I,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return O(0),{calculatedDuration:null,next:I=>{let k=!1;return!E&&T===void 0&&(k=!0,S(I),O(I)),T!==void 0&&I>=T?E.next(I-T):(!k&&S(I),f)}}}const yp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,AS=1e-7,MS=12;function DS(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=yp(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>AS&&++a<MS);return s}function vi(e,t,n,r){if(e===t&&n===r)return wt;const o=i=>DS(i,0,1,e,n);return i=>i===0||i===1?i:yp(o(i),t,r)}const NS=vi(.42,0,1,1),FS=vi(0,0,.58,1),vp=vi(.42,0,.58,1),LS=e=>Array.isArray(e)&&typeof e[0]!="number",bp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wp=e=>t=>1-e(1-t),ic=e=>1-Math.sin(Math.acos(e)),xp=wp(ic),VS=bp(ic),Tp=vi(.33,1.53,.69,.99),sc=wp(Tp),$S=bp(sc),Sp={linear:wt,easeIn:NS,easeInOut:vp,easeOut:FS,circIn:ic,circInOut:VS,circOut:xp,backIn:sc,backInOut:$S,backOut:Tp,anticipate:e=>(e*=2)<1?.5*sc(e):.5*(2-Math.pow(2,-10*(e-1)))},Ep=e=>{if(Array.isArray(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return vi(t,n,r,o)}else if(typeof e=="string")return tn(Sp[e]!==void 0,`Invalid easing type '${e}'`),Sp[e];return e},bi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Xe=(e,t,n)=>e+(t-e)*n;function ac(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 jS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=ac(l,a,e+1/3),i=ac(l,a,e),s=ac(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Vs(e,t){return n=>n>0?t:e}const lc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},RS=[ec,Sr,lo],BS=e=>RS.find(t=>t.test(e));function Cp(e){const t=BS(e);if(io(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===lo&&(n=jS(n)),n}const Pp=(e,t)=>{const n=Cp(e),r=Cp(t);if(!n||!r)return Vs(e,t);const o={...n};return i=>(o.red=lc(n.red,r.red,i),o.green=lc(n.green,r.green,i),o.blue=lc(n.blue,r.blue,i),o.alpha=Xe(n.alpha,r.alpha,i),Sr.transform(o))},cc=new Set(["none","hidden"]);function zS(e,t){return cc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function WS(e,t){return n=>Xe(e,t,n)}function uc(e){return typeof e=="number"?WS:typeof e=="string"?Fl(e)?Vs:_t.test(e)?Pp:GS:Array.isArray(e)?kp:typeof e=="object"?_t.test(e)?Pp:HS:Vs}function kp(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>uc(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function HS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=uc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function US(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]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const GS=(e,t)=>{const n=er.createTransformer(t),r=yi(e),o=yi(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?cc.has(e)&&!o.values.length||cc.has(t)&&!r.values.length?zS(e,t):An(kp(US(r,o),o.values),n):(io(!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.`),Vs(e,t))};function Ip(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Xe(e,t,n):uc(e)(e,t)}function YS(e,t,n){const r=[],o=n||Ip,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||wt:t;a=An(l,a)}r.push(a)}return r}function Op(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(tn(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=YS(t,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=bi(e[u],e[u+1],c);return s[u](d)};return n?c=>l(Kn(e[0],e[i-1],c)):l}function qS(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=bi(0,t,r);e.push(Xe(n,1,o))}}function KS(e){const t=[0];return qS(t,e.length-1),t}function ZS(e,t){return e.map(n=>n*t)}function XS(e,t){return e.map(()=>t||vp).splice(0,e.length-1)}function $s({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=LS(r)?r.map(Ep):Ep(r),i={done:!1,value:t[0]},s=ZS(n&&n.length===t.length?n:KS(t),e),a=Op(s,t,{ease:Array.isArray(o)?o:XS(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const _p=2e4;function QS(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<_p;)t+=n,r=e.next(t);return t>=_p?1/0:t}const JS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Me.update(t,!0),stop:()=>hn(t),now:()=>Tt.isProcessing?Tt.timestamp:Jn.now()}},eE={decay:gp,inertia:gp,tween:$s,keyframes:$s,spring:mp},tE=e=>e/100;class dc extends up{constructor({KeyframeResolver:t=Xl,...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,l)=>this.onKeyframesResolved(a,l);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=eE[n]||$s;let l,c;a!==$s&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&tn(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=An(tE,Ip(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=QS(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=i;if(h){const I=Math.min(this.currentTime,u)/d;let k=Math.floor(I),C=I%1;!C&&I>=1&&(C=1),C===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(p==="reverse"?(C=1-C,m&&(C-=m/d)):p==="mirror"&&(S=s)),g=Kn(0,1,C)*d}const T=x?{done:!1,value:l[0]}:S.next(g);a&&(T.value=a(T.value));let{done:E}=T;!x&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&o!==void 0&&(T.value=Fs(l,this.options,o)),v&&v(T.value),O&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Dn(t.calculatedDuration):0}get time(){return Dn(this.currentTime)}set time(t){t=Mn(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=Dn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=JS,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 Ap=e=>Array.isArray(e)&&typeof e[0]=="number";function Mp(e){return!!(!e||typeof e=="string"&&e in fc||Ap(e)||Array.isArray(e)&&e.every(Mp))}const wi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,fc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wi([0,.65,.55,1]),circOut:wi([.55,0,1,.45]),backIn:wi([.31,.01,.66,-.59]),backOut:wi([.33,1.53,.69,.99])};function nE(e){return Dp(e)||fc.easeOut}function Dp(e){if(e)return Ap(e)?wi(e):Array.isArray(e)?e.map(nE):fc[e]}function rE(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Dp(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const oE=lp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),js=10,iE=2e4;function sE(e){return e.type==="spring"||!Mp(e.ease)}function aE(e,t){const n=new dc({...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<iE;)r=n.sample(i),o.push(r.value),i+=js;return{times:void 0,keyframes:o,duration:i-js,ease:"linear"}}class Np extends up{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new ap(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:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(sE(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=aE(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=rE(l.owner.current,c,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=Jn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Fs(t,this.options,n)),d&&d(),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 Dn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Dn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Mn(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 wt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return wt}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:c,onUpdate:u,onComplete:d,...f}=this.options,h=new dc({...f,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=Mn(this.time);c.setWithVelocity(h.sample(p-js).value,h.sample(p).value,js)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return oE()&&r&&_h.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function lE(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Me.update(r,!0),()=>hn(r)}const cE=lp(()=>window.ScrollTimeline!==void 0);class uE{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(cE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),lE(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 hc=(e,t,n,r={},o,i,s)=>a=>{const l=ql(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Mn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};YT(l)||(d={...d,...GT(e,d)}),d.duration&&(d.duration=Mn(d.duration)),d.repeatDelay&&(d.repeatDelay=Mn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=Fs(d.keyframes,l);if(h!==void 0)return Me.update(()=>{d.onUpdate(h),d.onComplete()}),new uE([])}return!i&&Np.supports(d)?new Np(d):new dc(d)};class pc{constructor(){this.subscriptions=[]}add(t){return As(this.subscriptions,t),()=>Ms(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 Fp=new Set;function mc(e,t,n){e||Fp.has(t)||(console.warn(t),Fp.add(t))}const Lp=30,dE=e=>!isNaN(parseFloat(e)),xi={current:void 0};class Vp{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Jn.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=Jn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=dE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&mc(!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 pc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Me.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 xi.current&&xi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Lp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Lp);return dp(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 co(e,t){return new Vp(e,t)}function fE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,co(n))}function hE(e,t){const n=Ns(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=xT(i[s]);fE(e,s,a)}}function $p(e){return e.getProps()[sh]}class pE extends Vp{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Ah(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&&(Ms(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function mE(e){return!!(xt(e)&&e.add)}function gc(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 pE("auto"),e.addValue("willChange",r)),mE(r))return r.add(t)}function gE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function jp(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),h=l[d];if(h===void 0||u&&gE(u,d))continue;const p={delay:n,elapsed:0,...ql(s||{},d)};let m=!1;if(window.HandoffAppearAnimations){const y=$p(e);if(y){const x=window.HandoffAppearAnimations(y,d,f,Me);x!==null&&(p.elapsed=x,m=!0)}}f.start(hc(d,f,h,e.shouldReduceMotion&&qn.has(d)?{type:!1}:p,e,m,gc(e,d)));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Me.update(()=>{a&&hE(e,a)})}),c}function yc(e,t,n={}){var r;const o=Ns(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(jp(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return yE(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function yE(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(vE).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(yc(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function vE(e,t){return e.sortNodePosition(t)}function bE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>yc(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=yc(e,t,n);else{const o=typeof t=="function"?Ns(e,t,n.custom):t;r=Promise.all(jp(e,o,n))}return r.then(()=>{Me.postRender(()=>{e.notify("AnimationComplete",t)})})}const wE=[...Ml].reverse(),xE=Ml.length;function TE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>bE(e,n,r)))}function SE(e){let t=TE(e),n=Rp(),r=!0;const o=l=>(c,u)=>{var d;const f=Ns(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function i(l){t=l(e)}function s(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<xE;v++){const y=wE[v],x=n[y],g=c[y]!==void 0?c[y]:u[y],S=ci(g),T=y===l?x.isActive:null;T===!1&&(p=v);let E=g===u[y]&&g!==c[y]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...h},!x.isActive&&T===null||!g&&!x.prevProp||ui(g)||typeof g=="boolean")continue;let I=EE(x.prevProp,g)||y===l&&x.isActive&&!E&&S||v>p&&S,k=!1;const C=Array.isArray(g)?g:[g];let L=C.reduce(o(y),{});T===!1&&(L={});const{prevResolvedValues:D={}}=x,V={...D,...L},P=A=>{I=!0,f.has(A)&&(k=!0,f.delete(A)),x.needsAnimating[A]=!0;const N=e.getValue(A);N&&(N.liveStyle=!1)};for(const A in V){const N=L[A],$=D[A];if(h.hasOwnProperty(A))continue;let z=!1;Wl(N)&&Wl($)?z=!zh(N,$):z=N!==$,z?N!=null?P(A):f.add(A):N!==void 0&&f.has(A)?P(A):x.protectedKeys[A]=!0}x.prevProp=g,x.prevResolvedValues=L,x.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(I=!1),I&&(!E||k)&&d.push(...C.map(A=>({animation:A,options:{type:y}})))}if(f.size){const v={};f.forEach(y=>{const x=e.getBaseTarget(y),g=e.getValue(y);g&&(g.liveStyle=!0),v[y]=x??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Rp(),r=!0}}}function EE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zh(t,e):!1}function Er(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rp(){return{animate:Er(!0),whileInView:Er(),whileHover:Er(),whileTap:Er(),whileDrag:Er(),whileFocus:Er(),exit:Er()}}class CE extends Qn{constructor(t){super(t),t.animationState||(t.animationState=SE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ui(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 PE=0;class kE extends Qn{constructor(){super(...arguments),this.id=PE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const IE={animation:{Feature:CE},exit:{Feature:kE}},Bp=(e,t)=>Math.abs(e-t);function OE(e,t){const n=Bp(e.x,t.x),r=Bp(e.y,t.y);return Math.sqrt(n**2+r**2)}class zp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=bc(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=OE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Tt;this.history.push({...p,timestamp:m});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=vc(f,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=bc(d.type==="pointercancel"?this.lastMoveEventInfo:vc(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,v),p&&p(d,v)},!Nh(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Ds(t),a=vc(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=Tt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,bc(a,this.history)),this.removeListeners=An(_n(this.contextWindow,"pointermove",this.handlePointerMove),_n(this.contextWindow,"pointerup",this.handlePointerUp),_n(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hn(this.updatePoint)}}function vc(e,t){return t?{point:t(e.point)}:e}function Wp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bc({point:e},t){return{point:e,delta:Wp(e,Hp(t)),offset:Wp(e,_E(t)),velocity:AE(t,.1)}}function _E(e){return e[0]}function Hp(e){return e[e.length-1]}function AE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Hp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const i=Dn(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 Up=1e-4,ME=1-Up,DE=1+Up,Gp=.01,NE=0-Gp,FE=0+Gp;function Ht(e){return e.max-e.min}function LE(e,t,n){return Math.abs(e-t)<=n}function Yp(e,t,n,r=.5){e.origin=r,e.originPoint=Xe(t.min,t.max,e.origin),e.scale=Ht(n)/Ht(t),e.translate=Xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ME&&e.scale<=DE||isNaN(e.scale))&&(e.scale=1),(e.translate>=NE&&e.translate<=FE||isNaN(e.translate))&&(e.translate=0)}function Ti(e,t,n,r){Yp(e.x,t.x,n.x,r?r.originX:void 0),Yp(e.y,t.y,n.y,r?r.originY:void 0)}function qp(e,t,n){e.min=n.min+t.min,e.max=e.min+Ht(t)}function VE(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function Kp(e,t,n){e.min=t.min-n.min,e.max=e.min+Ht(t)}function Si(e,t,n){Kp(e.x,t.x,n.x),Kp(e.y,t.y,n.y)}function $E(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Xe(n,e,r.max):Math.min(e,n)),e}function Zp(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 jE(e,{top:t,left:n,bottom:r,right:o}){return{x:Zp(e.x,n,o),y:Zp(e.y,t,r)}}function Xp(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 RE(e,t){return{x:Xp(e.x,t.x),y:Xp(e.y,t.y)}}function BE(e,t){let n=.5;const r=Ht(e),o=Ht(t);return o>r?n=bi(t.min,t.max-r,e.min):r>o&&(n=bi(e.min,e.max-o,t.min)),Kn(0,1,n)}function zE(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 wc=.35;function WE(e=wc){return e===!1?e=0:e===!0&&(e=wc),{x:Qp(e,"left","right"),y:Qp(e,"top","bottom")}}function Qp(e,t,n){return{min:Jp(e,t),max:Jp(e,n)}}function Jp(e,t){return typeof e=="number"?e:e[t]||0}const em=()=>({translate:0,scale:1,origin:0,originPoint:0}),uo=()=>({x:em(),y:em()}),tm=()=>({min:0,max:0}),at=()=>({x:tm(),y:tm()});function Xt(e){return[e("x"),e("y")]}function nm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function HE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function UE(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 xc(e){return e===void 0||e===1}function Tc({scale:e,scaleX:t,scaleY:n}){return!xc(e)||!xc(t)||!xc(n)}function Cr(e){return Tc(e)||rm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rm(e){return om(e.x)||om(e.y)}function om(e){return e&&e!=="0%"}function Rs(e,t,n){const r=e-n,o=t*r;return n+o}function im(e,t,n,r,o){return o!==void 0&&(e=Rs(e,o,r)),Rs(e,n,r)+t}function Sc(e,t=0,n=1,r,o){e.min=im(e.min,t,n,r,o),e.max=im(e.max,t,n,r,o)}function sm(e,{x:t,y:n}){Sc(e.x,t.translate,t.scale,t.originPoint),Sc(e.y,n.translate,n.scale,n.originPoint)}const am=.999999999999,lm=1.0000000000001;function GE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&fo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,sm(e,s)),r&&Cr(i.latestValues)&&fo(e,i.latestValues))}t.x<lm&&t.x>am&&(t.x=1),t.y<lm&&t.y>am&&(t.y=1)}function tr(e,t){e.min=e.min+t,e.max=e.max+t}function cm(e,t,n,r,o=.5){const i=Xe(e.min,e.max,o);Sc(e,t,n,i,r)}function fo(e,t){cm(e.x,t.x,t.scaleX,t.scale,t.originX),cm(e.y,t.y,t.scaleY,t.scale,t.originY)}function um(e,t){return nm(UE(e.getBoundingClientRect(),t))}function YE(e,t,n){const r=um(e,n),{scroll:o}=t;return o&&(tr(r.x,o.offset.x),tr(r.y,o.offset.y)),r}const dm=({current:e})=>e?e.ownerDocument.defaultView:null,qE=new WeakMap;class KE{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=at(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ds(u,"page").point)},i=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=$h(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xt(y=>{let x=this.getAxisMotionValue(y).get()||0;if(fn.test(x)){const{projection:g}=this.visualElement;if(g&&g.layout){const S=g.layout.layoutBox[y];S&&(x=Ht(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&Me.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=gc(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=ZE(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Xt(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new zp(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:dm(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&&Me.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||!Bs(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=$E(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&&ro(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=jE(o.layoutBox,n):this.constraints=!1,this.elastic=WE(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Xt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=zE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ro(t))return!1;const r=t.current;tn(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=YE(r,o.root,this.visualElement.getTransformPagePoint());let s=RE(o.layout.layoutBox,i);if(n){const a=n(HE(s));this.hasMutatedConstraints=!!a,a&&(s=nm(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Xt(u=>{if(!Bs(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(hc(t,r,0,n,this.visualElement,!1,gc(this.visualElement,t)))}stopAnimation(){Xt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xt(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){Xt(n=>{const{drag:r}=this.getProps();if(!Bs(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]-Xe(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ro(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=BE({min:l,max:l},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(),Xt(s=>{if(!Bs(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Xe(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;qE.set(this.visualElement,this);const t=this.visualElement.current,n=_n(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ro(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Me.read(r);const s=On(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Xt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[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=wc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Bs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ZE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class XE extends Qn{constructor(t){super(t),this.removeGroupControls=wt,this.removeListeners=wt,this.controls=new KE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wt}unmount(){this.removeGroupControls(),this.removeListeners()}}const fm=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class QE extends Qn{constructor(){super(...arguments),this.removePointerDownListener=wt}onPointerDown(t){this.session=new zp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:fm(t),onStart:fm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Me.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=_n(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 JE(){const e=b.useContext(Ts);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 zs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function hm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ei={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=hm(e,t.target.x),r=hm(e,t.target.y);return`${n}% ${r}%`}},eC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=er.parse(e);if(o.length>5)return r;const i=er.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Xe(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class tC extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;X1(nC),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()})),zs.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()||Me.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Al.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 pm(e){const[t,n]=JE(),r=b.useContext(di);return w.jsx(tC,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(lh),isPresent:t,safeToRemove:n})}const nC={borderRadius:{...Ei,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ei,borderTopRightRadius:Ei,borderBottomLeftRadius:Ei,borderBottomRightRadius:Ei,boxShadow:eC},mm=["TopLeft","TopRight","BottomLeft","BottomRight"],rC=mm.length,gm=e=>typeof e=="string"?parseFloat(e):e,ym=e=>typeof e=="number"||fe.test(e);function oC(e,t,n,r,o,i){o?(e.opacity=Xe(0,n.opacity!==void 0?n.opacity:1,iC(r)),e.opacityExit=Xe(t.opacity!==void 0?t.opacity:1,0,sC(r))):i&&(e.opacity=Xe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<rC;s++){const a=`border${mm[s]}Radius`;let l=vm(t,a),c=vm(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||ym(l)===ym(c)?(e[a]=Math.max(Xe(gm(l),gm(c),r),0),(fn.test(c)||fn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Xe(t.rotate||0,n.rotate||0,r))}function vm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const iC=bm(0,.5,xp),sC=bm(.5,.95,wt);function bm(e,t,n){return r=>r<e?0:r>t?1:n(bi(e,t,r))}function wm(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){wm(e.x,t.x),wm(e.y,t.y)}function xm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Tm(e,t,n,r,o){return e-=t,e=Rs(e,1/n,r),o!==void 0&&(e=Rs(e,1/o,r)),e}function aC(e,t=0,n=1,r=.5,o,i=e,s=e){if(fn.test(t)&&(t=parseFloat(t),t=Xe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Xe(i.min,i.max,r);e===i&&(a-=t),e.min=Tm(e.min,t,n,a,o),e.max=Tm(e.max,t,n,a,o)}function Sm(e,t,[n,r,o],i,s){aC(e,t[n],t[r],t[o],t.scale,i,s)}const lC=["x","scaleX","originX"],cC=["y","scaleY","originY"];function Em(e,t,n,r){Sm(e.x,t,lC,n?n.x:void 0,r?r.x:void 0),Sm(e.y,t,cC,n?n.y:void 0,r?r.y:void 0)}function Cm(e){return e.translate===0&&e.scale===1}function Pm(e){return Cm(e.x)&&Cm(e.y)}function uC(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 km(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 Im(e){return Ht(e.x)/Ht(e.y)}function Om(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class dC{constructor(){this.members=[]}add(t){As(this.members,t),t.scheduleRender()}remove(t){if(Ms(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 fC(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:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const hC=(e,t)=>e.depth-t.depth;class pC{constructor(){this.children=[],this.isDirty=!1}add(t){As(this.children,t),this.isDirty=!0}remove(t){Ms(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(hC),this.isDirty=!1,this.children.forEach(t)}}function mC(e,t){const n=Jn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(hn(r),e(i-t))};return Me.read(r,!0),()=>hn(r)}function gC(e){return e instanceof SVGElement&&e.tagName!=="svg"}function yC(e,t,n){const r=xt(e)?e:co(e);return r.start(hc("",r,t,n)),r.animation}const Pr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ec=["","X","Y","Z"],vC={visibility:"hidden"},_m=1e3;let bC=0;function Cc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Am(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?$p(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Am(e.parent):!1:!1}function Mm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=bC++,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&&(Pr.totalNodes=Pr.resolvedTargetDeltas=Pr.recalculatedProjection=0),this.nodes.forEach(TC),this.nodes.forEach(kC),this.nodes.forEach(IC),this.nodes.forEach(SC),window.MotionDebug&&window.MotionDebug.record(Pr)},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 l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new pC)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new pc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=gC(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=mC(f,250),zs.hasAnimatedSinceResize&&(zs.hasAnimatedSinceResize=!1,this.nodes.forEach(Nm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||DC,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=u.getProps(),x=!this.targetLayout||!km(this.targetLayout,p)||h,g=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const S={...ql(m,"layout"),onPlay:v,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||Nm(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,hn(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(OC),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&&Am(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Dm);return}this.isUpdating||this.nodes.forEach(CC),this.isUpdating=!1,this.nodes.forEach(PC),this.nodes.forEach(wC),this.nodes.forEach(xC),this.clearAllSnapshots();const a=Jn.now();Tt.delta=Kn(0,1e3/60,a-Tt.timestamp),Tt.timestamp=a,Tt.isProcessing=!0,Hl.update.process(Tt),Hl.preRender.process(Tt),Hl.render.process(Tt),Tt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Al.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(EC),this.sharedNodes.forEach(_C)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=at(),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&&!Pm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||Cr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),NC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return at();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(tr(a.x,l.offset.x),tr(a.y,l.offset.y)),a}removeElementScroll(s){const a=at();Qt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Qt(a,s);const{scroll:f}=this.root;f&&(tr(a.x,-f.offset.x),tr(a.y,-f.offset.y))}tr(a.x,u.offset.x),tr(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=at();Qt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&fo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Cr(u.latestValues)&&fo(l,u.latestValues)}return Cr(this.latestValues)&&fo(l,this.latestValues),l}removeTransform(s){const a=at();Qt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Cr(c.latestValues))continue;Tc(c.latestValues)&&c.updateSnapshot();const u=at(),d=c.measurePageBox();Qt(u,d),Em(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Cr(this.latestValues)&&Em(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!==Tt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Tt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),Si(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=at(),this.targetWithTransforms=at()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),VE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),sm(this.target,this.targetDelta)):Qt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),Si(this.relativeTargetOrigin,this.target,h.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Pr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Tc(this.parent.latestValues)||rm(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(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Tt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Qt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;GE(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=at());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xm(this.prevProjectionDelta.x,this.projectionDelta.x),xm(this.prevProjectionDelta.y,this.projectionDelta.y)),Ti(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Om(this.projectionDelta.x,this.prevProjectionDelta.x)||!Om(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Pr.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=uo(),this.projectionDelta=uo(),this.projectionDeltaWithTransform=uo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=uo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=at(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),y=!v||v.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(MC));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const T=S/1e3;Fm(d.x,s.x,T),Fm(d.y,s.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Si(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),AC(this.relativeTarget,this.relativeTargetOrigin,f,T),g&&uC(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=at()),Qt(g,this.relativeTarget)),m&&(this.animationValues=u,oC(u,c,this.latestValues,T,x,y)),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&&(hn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{zs.hasAnimatedSinceResize=!0,this.currentAnimation=yC(0,_m,{...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(_m),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Rm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||at();const d=Ht(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=Ht(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Qt(a,l),fo(a,u),Ti(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new dC),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){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:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Cc("z",s,c,this.animationValues);for(let u=0;u<Ec.length;u++)Cc(`rotate${Ec[u]}`,s,c,this.animationValues),Cc(`skew${Ec[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return vC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=_s(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=_s(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Cr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=fC(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in ks){if(f[m]===void 0)continue;const{correct:v,applyTo:y}=ks[m],x=c.transform==="none"?f[m]:v(f[m],d);if(y){const g=y.length;for(let S=0;S<g;S++)c[y[S]]=x}else c[m]=x}return this.options.layoutId&&(c.pointerEvents=d===this?_s(s==null?void 0:s.pointerEvents)||"":"none"),c}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(Dm),this.root.sharedNodes.clear()}}}function wC(e){e.updateLayout()}function xC(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"?Xt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Ht(f);f.min=r[d].min,f.max=f.min+h}):Rm(i,n.layoutBox,r)&&Xt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Ht(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=uo();Ti(a,r,n.layoutBox);const l=uo();s?Ti(l,e.applyTransform(o,!0),n.measuredBox):Ti(l,r,n.layoutBox);const c=!Pm(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=at();Si(p,n.layoutBox,f.layoutBox);const m=at();Si(m,r,h.layoutBox),km(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function TC(e){window.MotionDebug&&Pr.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 SC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function EC(e){e.clearSnapshot()}function Dm(e){e.clearMeasurements()}function CC(e){e.isLayoutDirty=!1}function PC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Nm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function kC(e){e.resolveTargetDelta()}function IC(e){e.calcProjection()}function OC(e){e.resetSkewAndRotation()}function _C(e){e.removeLeadSnapshot()}function Fm(e,t,n){e.translate=Xe(t.translate,0,n),e.scale=Xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lm(e,t,n,r){e.min=Xe(t.min,n.min,r),e.max=Xe(t.max,n.max,r)}function AC(e,t,n,r){Lm(e.x,t.x,n.x,r),Lm(e.y,t.y,n.y,r)}function MC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const DC={duration:.45,ease:[.4,0,.1,1]},Vm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$m=Vm("applewebkit/")&&!Vm("chrome/")?Math.round:wt;function jm(e){e.min=$m(e.min),e.max=$m(e.max)}function NC(e){jm(e.x),jm(e.y)}function Rm(e,t,n){return e==="position"||e==="preserve-aspect"&&!LE(Im(t),Im(n),.2)}const FC=Mm({attachResizeListener:(e,t)=>On(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pc={current:void 0},Bm=Mm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Pc.current){const e=new FC({});e.mount(window),e.setOptions({layoutScroll:!0}),Pc.current=e}return Pc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),LC={pan:{Feature:QE},drag:{Feature:XE,ProjectionNode:Bm,MeasureLayout:pm}},kc={current:null},zm={current:!1};function VC(){if(zm.current=!0,!!_l)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kc.current=e.matches;e.addListener(t),t()}else kc.current=!1}function $C(e,t,n){for(const r in t){const o=t[r],i=n[r];if(xt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&mc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(xt(i))e.addValue(r,co(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,co(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Wm=new WeakMap,jC=[...Zh,_t,er],RC=e=>jC.find(Kh(e)),Hm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],BC=Dl.length;class zC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Xl,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,Me.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Ps(n),this.isVariantNode=dh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&xt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Wm.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)),zm.current||VC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:kc.current,process.env.NODE_ENV!=="production"&&mc(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(){Wm.delete(this.current),this.projection&&this.projection.unmount(),hn(this.notifyUpdate),hn(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=qn.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Me.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 oo){const n=oo[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):at()}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<Hm.length;r++){const o=Hm[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=$C(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<BC;r++){const o=Dl[r],i=this.props[o];(ci(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=co(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"&&(Hh(o)||Wh(o))?o=parseFloat(o):!RC(o)&&er.test(n)&&(o=sp(t,n)),this.setBaseTarget(t,xt(o)?o.get():o)),xt(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=zl(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&&!xt(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 pc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Um extends zC{constructor(){super(...arguments),this.KeyframeResolver=ap}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 WC(e){return window.getComputedStyle(e)}class HC extends Um{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Ch}readValueFromInstance(t,n){if(qn.has(n)){const r=nc(n);return r&&r.default||0}else{const r=WC(t),o=(gh(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return um(t,n)}build(t,n,r){Vl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Bl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class UC extends Um{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=at}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qn.has(n)){const r=nc(n);return r&&r.default||0}return n=Ph.has(n)?n:Es(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ih(t,n,r)}build(t,n,r){jl(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){kh(t,n,r,o)}mount(t){this.isSVGTag=Rl(t.tagName),super.mount(t)}}const GC=(e,t)=>Nl(e)?new UC(t):new HC(t,{allowProjection:e!==b.Fragment}),YC={...IE,...BT,...LC,...{layout:{ProjectionNode:Bm,MeasureLayout:pm}}},St=K1((e,t)=>IT(e,t,YC,GC));function Gm(){const e=b.useRef(!1);return Ss(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Ym(){const e=Gm(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Me.postRender(r),[r]),t]}class qC extends M.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 KC({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(no);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=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,132 +9,137 @@
|
|
|
9
9
|
top: ${l}px !important;
|
|
10
10
|
left: ${c}px !important;
|
|
11
11
|
}
|
|
12
|
-
`),()=>{document.head.removeChild(u)}},[t]),
|
|
12
|
+
`),()=>{document.head.removeChild(u)}},[t]),w.jsx(qC,{isPresent:t,childRef:r,sizeRef:o,children:M.cloneElement(e,{ref:r})})}const Ic=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Xn(ZC),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=w.jsx(KC,{isPresent:n,children:e})),w.jsx(Ts.Provider,{value:c,children:e})};function ZC(){return new Map}function XC(e){return b.useEffect(()=>()=>e(),[])}const kr=e=>e.key||"";function QC(e,t){e.forEach(n=>{const r=kr(n);t.set(r,n)})}function JC(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Ci=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{tn(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(di).forceRender||Ym()[0],l=Gm(),c=JC(e);let u=c;const d=b.useRef(new Map).current,f=b.useRef(u),h=b.useRef(new Map).current,p=b.useRef(!0);if(Ss(()=>{p.current=!1,QC(c,h),f.current=u}),XC(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return w.jsx(w.Fragment,{children:u.map(x=>w.jsx(Ic,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:x},kr(x)))});u=[...u];const m=f.current.map(kr),v=c.map(kr),y=m.length;for(let x=0;x<y;x++){const g=m[x];v.indexOf(g)===-1&&!d.has(g)&&d.set(g,void 0)}return s==="wait"&&d.size&&(u=[]),d.forEach((x,g)=>{if(v.indexOf(g)!==-1)return;const S=h.get(g);if(!S)return;const T=m.indexOf(g);let E=x;if(!E){const O=()=>{d.delete(g);const I=Array.from(h.keys()).filter(k=>!v.includes(k));if(I.forEach(k=>h.delete(k)),f.current=c.filter(k=>{const C=kr(k);return C===g||I.includes(C)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=w.jsx(Ic,{isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:i,mode:s,children:S},kr(S)),d.set(g,E)}u.splice(T,0,E)}),u=u.map(x=>{const g=x.key;return d.has(g)?x:w.jsx(Ic,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:x},kr(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:d.size?u:u.map(x=>b.cloneElement(x))})};function eP({children:e,isValidProp:t,...n}){t&&Th(t),n={...b.useContext(no),...n},n.isStatic=Xn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(no.Provider,{value:r,children:e})}const tP=b.createContext(null),nP=e=>!e.isLayoutDirty&&e.willUpdate(!1);function qm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(nP);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 Km=e=>e===!0,rP=e=>Km(e===!0)||e==="id",oP=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(di),o=b.useContext(tP),[i,s]=Ym(),a=b.useRef(null),l=r.id||o;a.current===null&&(rP(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Km(n)&&r.group||qm()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return w.jsx(di.Provider,{value:c,children:e})},Zm=b.createContext(null);function iP(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],l=s.layout,c=Xe(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?TT(e,o,o+i):e}function sP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Xn(()=>St(t)),l=[],c=b.useRef(!1);tn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(cP)},updateOrder:(d,f,h)=>{if(c.current)return;const p=iP(l,d,f,h);l!==p&&(c.current=!0,r(p.map(lP).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),w.jsx(a,{...i,ref:s,ignoreStrict:!0,children:w.jsx(Zm.Provider,{value:u,children:e})})}const aP=b.forwardRef(sP);function lP(e){return e.value}function cP(e,t){return e.layout.min-t.layout.min}function ho(e){const t=Xn(()=>co(e)),{isStatic:n}=b.useContext(no);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const uP=e=>e&&typeof e=="object"&&e.mix,dP=e=>uP(e)?e.mix:void 0;function fP(...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=Op(o,i,{mixer:dP(i[0]),...s});return t?a(r):a}function Xm(e,t){const n=ho(t()),r=()=>n.set(t());return r(),Ss(()=>{const o=()=>Me.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),hn(r)}}),n}function hP(e){xi.current=[],e();const t=Xm(xi.current,e);return xi.current=void 0,t}function pP(e,t,n,r){if(typeof e=="function")return hP(e);const o=typeof t=="function"?t:fP(t,n,r);return Array.isArray(e)?Qm(e,o):Qm([e],([i])=>o(i))}function Qm(e,t){const n=Xn(()=>[]);return Xm(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Jm(e,t=0){return xt(e)?e:ho(t)}function mP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=Xn(()=>St(r)),c=b.useContext(Zm),u={x:Jm(t.x),y:Jm(t.y)},d=pP([u.x,u.y],([m,v])=>m||v?1:"unset");tn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return w.jsx(l,{drag:f,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(m,v)=>{const{velocity:y}=v;y[f]&&p(n,u[f].get(),y[f]),o&&o(m,v)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const gP=b.forwardRef(mP),Ws={Group:aP,Item:gP};class yP{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const vP=()=>new yP;function bP(){return Xn(vP)}/**
|
|
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
|
|
17
|
+
*/const wP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eg=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
18
18
|
* @license lucide-react v0.414.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
21
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/var
|
|
22
|
+
*/var xP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
23
23
|
* @license lucide-react v0.414.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const
|
|
27
|
+
*/const TP=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>b.createElement("svg",{ref:l,...xP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:eg("lucide",o),...a},[...s.map(([c,u])=>b.createElement(c,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
|
|
32
|
+
*/const tt=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(TP,{ref:i,iconNode:t,className:eg(`lucide-${wP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
33
33
|
* @license lucide-react v0.414.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const SP=tt("ArrowDown01",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
38
38
|
* @license lucide-react v0.414.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const EP=tt("ArrowUp01",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
43
43
|
* @license lucide-react v0.414.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const tg=tt("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
48
48
|
* @license lucide-react v0.414.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const CP=tt("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
53
53
|
* @license lucide-react v0.414.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const PP=tt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
58
58
|
* @license lucide-react v0.414.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const ng=tt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
63
63
|
* @license lucide-react v0.414.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const kP=tt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
68
68
|
* @license lucide-react v0.414.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
72
|
+
*/const Oc=tt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
73
73
|
* @license lucide-react v0.414.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const IP=tt("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
78
78
|
* @license lucide-react v0.414.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
82
|
+
*/const rg=tt("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"}]]);/**
|
|
83
83
|
* @license lucide-react v0.414.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
87
|
+
*/const OP=tt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
88
88
|
* @license lucide-react v0.414.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
92
|
+
*/const _P=tt("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
93
93
|
* @license lucide-react v0.414.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
97
|
+
*/const AP=tt("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
98
98
|
* @license lucide-react v0.414.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const og=tt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
103
103
|
* @license lucide-react v0.414.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const MP=tt("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
108
108
|
* @license lucide-react v0.414.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
112
|
+
*/const _c=tt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
113
113
|
* @license lucide-react v0.414.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
117
|
+
*/const DP=tt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
118
118
|
* @license lucide-react v0.414.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const po=tt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
123
123
|
* @license lucide-react v0.414.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
127
|
+
*/const NP=tt("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
|
|
128
128
|
* @license lucide-react v0.414.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const FP=tt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
133
133
|
* @license lucide-react v0.414.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const DP=at("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),ig={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},MP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},sg=e=>x.jsx(Ht.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:ig.false,transition:MP,variants:ig,children:e.children}),NP=as("px-4 py-4 border relative rounded-lg text-sm",{variants:{theme:{neutral:"border-border bg-background",danger:"text-danger-contrast bg-danger/10 border-danger/50",success:"text-success-foreground bg-success/10 border-success/50",info:"text-info bg-info/10 border-info/50"}},defaultVariants:{theme:"neutral"}}),FP=b.forwardRef(function({className:t,theme:n,onClose:r,open:o=!0,...i},s){return x.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"pointer-events-none isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:x.jsx(sg,{"data-open":!!o,open:!!o,children:x.jsxs(no,{...i,className:Xe(NP({theme:n}),t),ref:s,"data-theme":n,role:"alert",as:i.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?x.jsx(ng,{size:20}):null,n==="info"?x.jsx(rg,{size:20}):null,n==="danger"?x.jsx(EP,{size:20}):null,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,r!==void 0?x.jsx("button",{type:"button",onClick:()=>r(!1),className:"duration-300 ease-in-out absolute right-3 top-3 text-foreground transition-colors hover:text-danger",children:x.jsx(og,{size:20})}):null]})})})});function Be(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 Ge(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function mo(e,t){const n=Be(e);return isNaN(t)?Ge(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ws(e,t){const n=Be(e);if(isNaN(t))return Ge(e,NaN);if(!t)return n;const r=n.getDate(),o=Ge(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 ag=6048e5,LP=864e5,VP=6e4,$P=36e5,RP=1e3;let jP={};function Ir(){return jP}function pn(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Be(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 go(e){return pn(e,{weekStartsOn:1})}function lg(e){const t=Be(e),n=t.getFullYear(),r=Ge(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=go(r),i=Ge(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=go(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function yo(e){const t=Be(e);return t.setHours(0,0,0,0),t}function Hs(e){const t=Be(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 BP(e,t){const n=yo(e),r=yo(t),o=+n-Hs(n),i=+r-Hs(r);return Math.round((o-i)/LP)}function zP(e){const t=lg(e),n=Ge(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),go(n)}function cg(e,t){const n=t*7;return mo(e,n)}function ug(e,t){return Ws(e,t*12)}function WP(e){return Ge(e,Date.now())}function HP(e,t){const n=yo(e),r=yo(t);return+n==+r}function UP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function GP(e){if(!UP(e)&&typeof e!="number")return!1;const t=Be(e);return!isNaN(Number(t))}function dg(e,t){const n=Be(e.start),r=Be(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 l=[];for(;+s<=i;)l.push(Be(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function fg(e){const t=Be(e);return t.setDate(1),t.setHours(0,0,0,0),t}function YP(e){const t=Be(e),n=Ge(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function qP(e,t){var a,l;const n=Ir(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Be(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 KP={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"}},ZP=(e,t,n)=>{let r;const o=KP[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 Ac(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const XP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},QP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},JP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ek={date:Ac({formats:XP,defaultWidth:"full"}),time:Ac({formats:QP,defaultWidth:"full"}),dateTime:Ac({formats:JP,defaultWidth:"full"})},tk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nk=(e,t,n,r)=>tk[e];function bi(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 rk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ok={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ik={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"]},sk={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"]},ak={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"}},lk={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"}},ck={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:bi({values:rk,defaultWidth:"wide"}),quarter:bi({values:ok,defaultWidth:"wide",argumentCallback:e=>e-1}),month:bi({values:ik,defaultWidth:"wide"}),day:bi({values:sk,defaultWidth:"wide"}),dayPeriod:bi({values:ak,defaultWidth:"wide",formattingValues:lk,defaultFormattingWidth:"wide"})};function wi(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],l=Array.isArray(a)?dk(a,d=>d.test(s)):uk(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function uk(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fk(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 hk=/^(\d+)(th|st|nd|rd)?/i,pk=/\d+/i,mk={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},gk={any:[/^b/i,/^(a|c)/i]},yk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vk={any:[/1/i,/2/i,/3/i,/4/i]},bk={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},wk={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]},xk={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},Tk={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]},Sk={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},Ek={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}},Ck={ordinalNumber:fk({matchPattern:hk,parsePattern:pk,valueCallback:e=>parseInt(e,10)}),era:wi({matchPatterns:mk,defaultMatchWidth:"wide",parsePatterns:gk,defaultParseWidth:"any"}),quarter:wi({matchPatterns:yk,defaultMatchWidth:"wide",parsePatterns:vk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:wi({matchPatterns:bk,defaultMatchWidth:"wide",parsePatterns:wk,defaultParseWidth:"any"}),day:wi({matchPatterns:xk,defaultMatchWidth:"wide",parsePatterns:Tk,defaultParseWidth:"any"}),dayPeriod:wi({matchPatterns:Sk,defaultMatchWidth:"any",parsePatterns:Ek,defaultParseWidth:"any"})},hg={code:"en-US",formatDistance:ZP,formatLong:ek,formatRelative:nk,localize:ck,match:Ck,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pk(e){const t=Be(e);return BP(t,YP(t))+1}function pg(e){const t=Be(e),n=+go(t)-+zP(t);return Math.round(n/ag)+1}function _c(e,t){var u,d,f,h;const n=Be(e),r=n.getFullYear(),o=Ir(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=Ge(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=pn(s,t),l=Ge(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=pn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function kk(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=_c(e,t),i=Ge(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),pn(i,t)}function mg(e,t){const n=Be(e),r=+pn(n,t)-+kk(n,t);return Math.round(r/ag)+1}function Ve(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const tr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ve(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ve(n+1,2)},d(e,t){return Ve(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 Ve(e.getHours()%12||12,t.length)},H(e,t){return Ve(e.getHours(),t.length)},m(e,t){return Ve(e.getMinutes(),t.length)},s(e,t){return Ve(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ve(o,t.length)}},vo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gg={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 tr.y(e,t)},Y:function(e,t,n,r){const o=_c(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return Ve(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ve(i,t.length)},R:function(e,t){const n=lg(e);return Ve(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ve(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 Ve(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 Ve(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 tr.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 Ve(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=mg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ve(o,t.length)},I:function(e,t,n){const r=pg(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ve(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):tr.d(e,t)},D:function(e,t,n){const r=Pk(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ve(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 Ve(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 Ve(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 Ve(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=vo.noon:r===0?o=vo.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=vo.evening:r>=12?o=vo.afternoon:r>=4?o=vo.morning:o=vo.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 tr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):tr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ve(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ve(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):tr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):tr.s(e,t)},S:function(e,t){return tr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vg(r);case"XXXX":case"XX":return Ar(r);case"XXXXX":case"XXX":default:return Ar(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return vg(r);case"xxxx":case"xx":return Ar(r);case"xxxxx":case"xxx":default:return Ar(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yg(r,":");case"OOOO":default:return"GMT"+Ar(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yg(r,":");case"zzzz":default:return"GMT"+Ar(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Ve(r,t.length)},T:function(e,t,n){const r=e.getTime();return Ve(r,t.length)}};function yg(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+Ve(i,2)}function vg(e,t){return e%60===0?(e>0?"-":"+")+Ve(Math.abs(e)/60,2):Ar(e,t)}function Ar(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ve(Math.trunc(r/60),2),i=Ve(r%60,2);return n+o+t+i}const bg=(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"})}},wg=(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"})}},Dc={p:wg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return bg(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}}",bg(r,t)).replace("{{time}}",wg(o,t))}},Ok=/^D+$/,Ik=/^Y+$/,Ak=["D","DD","YY","YYYY"];function xg(e){return Ok.test(e)}function Tg(e){return Ik.test(e)}function Mc(e,t,n){const r=_k(e,t,n);if(console.warn(r),Ak.includes(e))throw new RangeError(r)}function _k(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 Dk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nk=/^'([^]*?)'?$/,Fk=/''/g,Lk=/[a-zA-Z]/;function Vk(e,t,n){var u,d,f,h;const r=Ir(),o=r.locale??hg,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Be(e);if(!GP(a))throw new RangeError("Invalid time value");let l=t.match(Mk).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=Dc[m];return g(p,o.formatLong)}return p}).join("").match(Dk).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:$k(p)};if(gg[m])return{isToken:!0,value:p};if(m.match(Lk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Tg(m)||xg(m))&&Mc(m,t,String(e));const g=gg[m[0]];return g(a,m,o.localize,c)}).join("")}function $k(e){const t=e.match(Nk);return t?t[1].replace(Fk,"'"):e}function Rk(){return Object.assign({},Ir())}function jk(e){let n=Be(e).getDay();return n===0&&(n=7),n}function Bk(e,t){const n=t instanceof Date?Ge(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 zk=10;class Sg{constructor(){ie(this,"subPriority",0)}validate(t,n){return!0}}class Wk extends Sg{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 Hk extends Sg{constructor(){super(...arguments);ie(this,"priority",zk);ie(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ge(n,Bk(n,Date))}}class Me{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Wk(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Uk extends Me{constructor(){super(...arguments);ie(this,"priority",140);ie(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 lt={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}/},mn={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 ct(e,t){return e&&{value:t(e.value),rest:e.rest}}function Qe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function gn(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*$P+i*VP+s*RP),rest:t.slice(n[0].length)}}function Eg(e){return Qe(lt.anyDigitsSigned,e)}function tt(e,t){switch(e){case 1:return Qe(lt.singleDigit,t);case 2:return Qe(lt.twoDigits,t);case 3:return Qe(lt.threeDigits,t);case 4:return Qe(lt.fourDigits,t);default:return Qe(new RegExp("^\\d{1,"+e+"}"),t)}}function Us(e,t){switch(e){case 1:return Qe(lt.singleDigitSigned,t);case 2:return Qe(lt.twoDigitsSigned,t);case 3:return Qe(lt.threeDigitsSigned,t);case 4:return Qe(lt.fourDigitsSigned,t);default:return Qe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Nc(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 Cg(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 Pg(e){return e%400===0||e%4===0&&e%100!==0}class Gk extends Me{constructor(){super(...arguments);ie(this,"priority",130);ie(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 ct(tt(4,n),i);case"yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(tt(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=Cg(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 Yk extends Me{constructor(){super(...arguments);ie(this,"priority",130);ie(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 ct(tt(4,n),i);case"Yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(tt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=_c(n,i);if(o.isTwoDigitYear){const l=Cg(o.year,s);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),pn(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),pn(n,i)}}class qk extends Me{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Us(r==="R"?4:r.length,n)}set(n,r,o){const i=Ge(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),go(i)}}class Kk extends Me{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Us(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class Zk extends Me{constructor(){super(...arguments);ie(this,"priority",120);ie(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 tt(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 Xk extends Me{constructor(){super(...arguments);ie(this,"priority",120);ie(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 tt(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 Qk extends Me{constructor(){super(...arguments);ie(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ie(this,"priority",110)}parse(n,r,o){const i=s=>s-1;switch(r){case"M":return ct(Qe(lt.month,n),i);case"MM":return ct(tt(2,n),i);case"Mo":return ct(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 Jk extends Me{constructor(){super(...arguments);ie(this,"priority",110);ie(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 ct(Qe(lt.month,n),i);case"LL":return ct(tt(2,n),i);case"Lo":return ct(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 eO(e,t,n){const r=Be(e),o=mg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class tO extends Me{constructor(){super(...arguments);ie(this,"priority",100);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Qe(lt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return pn(eO(n,o,i),i)}}function nO(e,t){const n=Be(e),r=pg(n)-t;return n.setDate(n.getDate()-r*7),n}class rO extends Me{constructor(){super(...arguments);ie(this,"priority",100);ie(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 Qe(lt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return go(nO(n,o))}}const oO=[31,28,31,30,31,30,31,31,30,31,30,31],iO=[31,29,31,30,31,30,31,31,30,31,30,31];class sO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subPriority",1);ie(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Qe(lt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Pg(o),s=n.getMonth();return i?r>=1&&r<=iO[s]:r>=1&&r<=oO[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class aO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subpriority",1);ie(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 Qe(lt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Pg(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 Fc(e,t,n){var d,f,h,p;const r=Ir(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,i=Be(e),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return mo(i,u)}class lO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(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=Fc(n,o,i),n.setHours(0,0,0,0),n}}class cO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(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 l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ct(tt(r.length,n),s);case"eo":return ct(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=Fc(n,o,i),n.setHours(0,0,0,0),n}}class uO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(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 l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ct(tt(r.length,n),s);case"co":return ct(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=Fc(n,o,i),n.setHours(0,0,0,0),n}}function dO(e,t){const n=Be(e),r=jk(n),o=t-r;return mo(n,o)}class fO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(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 tt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ct(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 ct(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return ct(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return ct(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=dO(n,o),n.setHours(0,0,0,0),n}}class hO extends Me{constructor(){super(...arguments);ie(this,"priority",80);ie(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(Nc(o),0,0,0),n}}class pO extends Me{constructor(){super(...arguments);ie(this,"priority",80);ie(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(Nc(o),0,0,0),n}}class mO extends Me{constructor(){super(...arguments);ie(this,"priority",80);ie(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(Nc(o),0,0,0),n}}class gO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Qe(lt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(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 yO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Qe(lt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class vO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Qe(lt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(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 bO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Qe(lt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(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 wO extends Me{constructor(){super(...arguments);ie(this,"priority",60);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Qe(lt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class xO extends Me{constructor(){super(...arguments);ie(this,"priority",50);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Qe(lt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class TO extends Me{constructor(){super(...arguments);ie(this,"priority",30);ie(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return ct(tt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class SO extends Me{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return gn(mn.basicOptionalMinutes,n);case"XX":return gn(mn.basic,n);case"XXXX":return gn(mn.basicOptionalSeconds,n);case"XXXXX":return gn(mn.extendedOptionalSeconds,n);case"XXX":default:return gn(mn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-Hs(n)-o)}}class EO extends Me{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return gn(mn.basicOptionalMinutes,n);case"xx":return gn(mn.basic,n);case"xxxx":return gn(mn.basicOptionalSeconds,n);case"xxxxx":return gn(mn.extendedOptionalSeconds,n);case"xxx":default:return gn(mn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-Hs(n)-o)}}class CO extends Me{constructor(){super(...arguments);ie(this,"priority",40);ie(this,"incompatibleTokens","*")}parse(n){return Eg(n)}set(n,r,o){return[Ge(n,o*1e3),{timestampIsSet:!0}]}}class PO extends Me{constructor(){super(...arguments);ie(this,"priority",20);ie(this,"incompatibleTokens","*")}parse(n){return Eg(n)}set(n,r,o){return[Ge(n,o),{timestampIsSet:!0}]}}const kO={G:new Uk,y:new Gk,Y:new Yk,R:new qk,u:new Kk,Q:new Zk,q:new Xk,M:new Qk,L:new Jk,w:new tO,I:new rO,d:new sO,D:new aO,E:new lO,e:new cO,c:new uO,i:new fO,a:new hO,b:new pO,B:new mO,h:new gO,H:new yO,K:new vO,k:new bO,m:new wO,s:new xO,S:new TO,X:new SO,x:new EO,t:new CO,T:new PO},OO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,AO=/^'([^]*?)'?$/,_O=/''/g,DO=/\S/,MO=/[a-zA-Z]/;function NO(e,t,n,r){var m,g,v,w;const o=Rk(),i=o.locale??hg,s=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(v=o.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?Be(n):Ge(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:a,locale:i},c=[new Hk],u=t.match(IO).map(y=>{const S=y[0];if(S in Dc){const T=Dc[S];return T(y,i.formatLong)}return y}).join("").match(OO),d=[];for(let y of u){Tg(y)&&Mc(y,t,e),xg(y)&&Mc(y,t,e);const S=y[0],T=kO[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const D=d.find(_=>E.includes(_.token)||_.token===S);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${y}\` at the same time`)}else if(T.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);d.push({token:S,fullToken:y});const P=T.run(e,y,i.match,l);if(!P)return Ge(n,NaN);c.push(P.setter),e=P.rest}else{if(S.match(MO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(y==="''"?y="'":S==="'"&&(y=FO(y)),e.indexOf(y)===0)e=e.slice(y.length);else return Ge(n,NaN)}}if(e.length>0&&DO.test(e))return Ge(n,NaN);const f=c.map(y=>y.priority).sort((y,S)=>S-y).filter((y,S,T)=>T.indexOf(y)===S).map(y=>c.filter(S=>S.priority===y).sort((S,T)=>T.subPriority-S.subPriority)).map(y=>y[0]);let h=Be(n);if(isNaN(h.getTime()))return Ge(n,NaN);const p={};for(const y of f){if(!y.validate(h,l))return Ge(n,NaN);const S=y.set(h,p,l);Array.isArray(S)?(h=S[0],Object.assign(p,S[1])):h=S}return Ge(n,h)}function FO(e){return e.match(AO)[1].replace(_O,"'")}function LO(e,t){const n=Be(e),r=Be(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function VO(e){return HP(e,WP(e))}function $O(e,t){return mo(e,-t)}function kg(e,t){return Ws(e,-t)}function RO(e,t){return cg(e,-t)}function jO(e,t){return ug(e,-t)}var St=function(){return St=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},St.apply(this,arguments)};function Lc(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 Vc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var xi=function(e){return e.replace(new RegExp(" ","g")," ")},Og=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)},BO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Ig=function(e,t,n){var r=e.length-2,o=BO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Ag=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},_g=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},zO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},$c=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},WO=function(e){return e==="money"||e==="currency"},HO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return St(St({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Rc=function(e,t){var n=Og(Ag(e),t.fraction.length),r="".concat(t.currency).concat(Ig(n,t.group,t.decimal));return xi(r)},UO=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 l=e.onChange,c=Lc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=HO(r,i,a);return p.currency=xi("".concat(p.currency.trim()," ")),p.literal=xi(p.literal.trim()),p},[r,i]),f=function(p){var m=Rc(p.target.value,d),g=_g(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Rc(c.defaultValue,d):void 0;return b.createElement("input",St({},c,{value:typeof c.value=="string"?Rc(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),GO=1,YO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},qO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return St(St({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},jc=function(e,t){var n=Og(Ag(e),t.fraction.length),r="".concat(Ig(n,t.group,t.decimal)," ").concat(t.percentSign);return xi(r)},KO=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=Lc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Vc(b.useState(function(){var v,w;return(w=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var v,w=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(jc(w,d))},[s.value]);var d=b.useMemo(function(){var v=qO(r);return v.percentSign=xi("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-GO,h=function(v){var w,y=a.current;y&&(y.setSelectionRange(f,f),v&&((w=s.onFocus)===null||w===void 0||w.call(s,v)))},p=function(v){var w=v.currentTarget;if(w.selectionStart!==null){var y=w.selectionStart,S=w.selectionEnd,T=y!==S,E=f<y;!T&&E&&h()}i==null||i(v)},m=function(v){var w=jc(v.target.value,d),y=_g(w);u(w),v.target.value=w,v.target.setAttribute("data-number",y.toString()),o==null||o(v)};b.useEffect(function(){return h()},[c]);var g=s.defaultValue?jc(s.defaultValue,d):void 0;return b.createElement("input",St({},s,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Ti={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},ZO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=Gs[i];s===void 0?r.push(i.replace(Ti.dots,"\\.").replace(Ti.openParenthesis,"\\(").replace(Ti.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ti.leadingBars,"\\")},Si=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Bc(o,n);var i=ZO(o);return n?"^".concat(i,"$"):i},XO=function(e){return e.replace(Ti.escape,"\\$&")},Bc=function(e,t){var n=e.map(function(r){return typeof r=="string"?XO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Gs={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]/}},QO=/\d/,Dg="(dd) 9dddd-dddd",Mg="(dd) dddd-dddd",Ng="ddd.ddd.ddd-dd",Fg="dd.ddd.ddd/dddd-dd",Ys=function(e){return e.replace(/\D/g,"")},JO=["2",/[0-3]/,":",/[0-5]/,/\d/],eI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],$t={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Ng,isoDate:"dddd-dd-dd",cnpj:Fg,telephone:Mg,cellphone:Dg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ys(e).length<=11?Ng:Fg},int:function(e){return e===void 0&&(e=""),QO.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=Ys(e);return t.length<11?Mg:Dg},time:function(e){var t=Ys(e),n=t[0];return n==="2"?JO:eI}},Rt=function(e,t,n){var r;return n===void 0&&(n={}),St({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Si(e,"",!0),infinity:n.infinity},n)},At={cellTelephone:Rt($t.cellTelephone,"tel"),cellphone:Rt($t.cellphone,"tel"),cep:Rt($t.cep,"decimal"),cnpj:Rt($t.cnpj,"decimal"),color:Rt($t.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Rt($t.cpf,"decimal"),cpfCnpj:Rt($t.cpfCnpj,"decimal",{transform:Ys}),creditCard:Rt($t.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Rt($t.date,"decimal"),int:Rt($t.int,"decimal",{pattern:"[0-9]+"}),isoDate:Rt($t.isoDate,"decimal"),telephone:Rt($t.telephone,"tel"),time:Rt($t.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Rt($t.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Lg(e,t,n,r){var o,i;r===void 0&&(r=Gs);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Vg=function(e){return e},tI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Si(e,n,t));return r.test(n)};function nI(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var rI=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,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Lc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=$c(a),g=$c(d),v=$c(u),w=b.useRef(tI(u,i,h.value||h.defaultValue)),y=f??"input",S=Vc(b.useState(""),2),T=S[0],E=S[1],P=nI(T),D=b.useCallback(function(O,M){var L,H,Y=(L=O??M)!==null&&L!==void 0?L:"";if(u===void 0)return Y;var k=(H=Y==null?void 0:Y.toString())!==null&&H!==void 0?H:"";return Lg(k,typeof u=="function"?u(k):u,s??Vg,c??Gs)},[s,u,c]),_=Vc(b.useState(function(){return D(h.value,h.defaultValue)}),2),I=_[0],V=_[1],F=D(h.defaultValue,h.defaultValue),$=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(I);return Array.isArray(O)?Bc(O,i):Si(u,I,i)}return typeof u=="string"?Si(u,I,i):Bc(u,i)},[l,I,i,u]);b.useEffect(function(){if(h.value!==void 0){var O=D(h.value,h.defaultValue);V(O),p.current!==null&&(p.current.value=O)}},[h.value,u,s,h.defaultValue]);var C=function(O){var M,L,H,Y,k,R=O.currentTarget,Z=O.target.value;if(v.current===void 0)return V(Z),(M=g.current)===null||M===void 0||M.call(g,Z),(L=m.current)===null||L===void 0||L.call(m,O),d==null?void 0:d(Z);var oe=new RegExp(Si(v.current,Z,i)),J=(H=R.selectionEnd)!==null&&H!==void 0?H:0,G=function(z,te,B){if(z.type!=="number")return z.setSelectionRange(te,B)};if(r&&w.current&&Z.length>=I.length)return R.value=I,G(R,J-1,J-1);var N=!1;Z.length<P.length&&(w.current=!1,N=!0),oe.test(Z)&&(w.current=!0);var j=J,W=Z[j-1],U=Lg(Z,typeof v.current=="function"?v.current(Z):v.current,s??Vg,c??Gs);for(R.value=U,V(U);j<U.length&&U.charAt(j-1)!==W;)j+=1;N?G(R,J,J):G(R,j,j),O.target.value=U,E(U),(Y=g.current)===null||Y===void 0||Y.call(g,U),(k=m.current)===null||k===void 0||k.call(m,O)};return b.createElement(y,St({},h,{ref:p,pattern:$,onChange:C,defaultValue:$g(h.defaultValue)?F:void 0,value:$g(h.value)?D(h.value,h.value):h.value}))}),$g=function(e){return typeof e=="string"},Rg=b.forwardRef(function(e,t){return WO(e.mask)?b.createElement(UO,St({},e,{mask:void 0,ref:t})):YO(e.mask)?b.createElement(KO,St({},e,{mask:void 0,ref:t})):b.createElement(rI,St({},e,{ref:t}))}),jt=function(e){return function(t){return b.createElement(Rg,St({},e,t))}};jt(At.cellTelephone),jt(At.cellphone),jt(At.cep),jt(At.cnpj),jt(At.color),jt(At.cpf),jt(At.cpfCnpj),jt(At.creditCard),jt(At.date),jt(At.int),jt(At.isoDate),jt(At.telephone),jt(At.time),jt(At.uuid);var jg=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&zO(At,t.mask)?At[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return b.createElement(Rg,St({},o,{ref:n}))}),zc={},Wc={exports:{}},Hc={};/**
|
|
137
|
+
*/const ig=tt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
138
|
+
* @license lucide-react v0.414.0 - ISC
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the ISC license.
|
|
141
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
+
*/const LP=tt("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),sg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},VP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},ag=e=>w.jsx(St.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:sg.false,transition:VP,variants:sg,children:e.children}),$P=ti("px-4 py-4 border relative rounded-lg text-sm",{variants:{theme:{neutral:"border-border bg-background",danger:"text-danger-contrast bg-danger/10 border-danger/50",success:"text-success-foreground bg-success/10 border-success/50",info:"text-info bg-info/10 border-info/50"}},defaultVariants:{theme:"neutral"}}),jP=b.forwardRef(function({className:t,theme:n,onClose:r,open:o=!0,...i},s){return w.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"pointer-events-none isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:w.jsx(ag,{"data-open":!!o,open:!!o,children:w.jsxs(to,{...i,className:ze($P({theme:n}),t),ref:s,"data-theme":n,role:"alert",as:i.as??"div",children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?w.jsx(rg,{size:20}):null,n==="info"?w.jsx(og,{size:20}):null,n==="danger"?w.jsx(IP,{size:20}):null,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,r!==void 0?w.jsx("button",{type:"button",onClick:()=>r(!1),className:"duration-300 ease-in-out absolute right-3 top-3 text-foreground transition-colors hover:text-danger",children:w.jsx(ig,{size:20})}):null]})})})});function De(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 Ye(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function mo(e,t){const n=De(e);return isNaN(t)?Ye(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Hs(e,t){const n=De(e);if(isNaN(t))return Ye(e,NaN);if(!t)return n;const r=n.getDate(),o=Ye(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 lg=6048e5,RP=864e5,BP=6e4,zP=36e5,WP=1e3;let HP={};function Ir(){return HP}function pn(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=De(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 go(e){return pn(e,{weekStartsOn:1})}function cg(e){const t=De(e),n=t.getFullYear(),r=Ye(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=go(r),i=Ye(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=go(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function yo(e){const t=De(e);return t.setHours(0,0,0,0),t}function Us(e){const t=De(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 UP(e,t){const n=yo(e),r=yo(t),o=+n-Us(n),i=+r-Us(r);return Math.round((o-i)/RP)}function GP(e){const t=cg(e),n=Ye(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),go(n)}function ug(e,t){const n=t*7;return mo(e,n)}function dg(e,t){return Hs(e,t*12)}function YP(e){return Ye(e,Date.now())}function qP(e,t){const n=yo(e),r=yo(t);return+n==+r}function KP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function fg(e){if(!KP(e)&&typeof e!="number")return!1;const t=De(e);return!isNaN(Number(t))}function hg(e,t){const n=De(e.start),r=De(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 l=[];for(;+s<=i;)l.push(De(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function pg(e){const t=De(e);return t.setDate(1),t.setHours(0,0,0,0),t}function ZP(e){const t=De(e),n=Ye(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function XP(e,t){var a,l;const n=Ir(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=De(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 QP={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"}},JP=(e,t,n)=>{let r;const o=QP[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 Ac(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ek={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},tk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},nk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},rk={date:Ac({formats:ek,defaultWidth:"full"}),time:Ac({formats:tk,defaultWidth:"full"}),dateTime:Ac({formats:nk,defaultWidth:"full"})},ok={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ik=(e,t,n,r)=>ok[e];function Pi(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 sk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ak={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lk={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"]},ck={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"]},uk={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"}},dk={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"}},fk={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Pi({values:sk,defaultWidth:"wide"}),quarter:Pi({values:ak,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pi({values:lk,defaultWidth:"wide"}),day:Pi({values:ck,defaultWidth:"wide"}),dayPeriod:Pi({values:uk,defaultWidth:"wide",formattingValues:dk,defaultFormattingWidth:"wide"})};function ki(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],l=Array.isArray(a)?pk(a,d=>d.test(s)):hk(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function hk(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function pk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function mk(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 gk=/^(\d+)(th|st|nd|rd)?/i,yk=/\d+/i,vk={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},bk={any:[/^b/i,/^(a|c)/i]},wk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xk={any:[/1/i,/2/i,/3/i,/4/i]},Tk={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},Sk={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]},Ek={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},Ck={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]},Pk={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},kk={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}},Ik={ordinalNumber:mk({matchPattern:gk,parsePattern:yk,valueCallback:e=>parseInt(e,10)}),era:ki({matchPatterns:vk,defaultMatchWidth:"wide",parsePatterns:bk,defaultParseWidth:"any"}),quarter:ki({matchPatterns:wk,defaultMatchWidth:"wide",parsePatterns:xk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ki({matchPatterns:Tk,defaultMatchWidth:"wide",parsePatterns:Sk,defaultParseWidth:"any"}),day:ki({matchPatterns:Ek,defaultMatchWidth:"wide",parsePatterns:Ck,defaultParseWidth:"any"}),dayPeriod:ki({matchPatterns:Pk,defaultMatchWidth:"any",parsePatterns:kk,defaultParseWidth:"any"})},mg={code:"en-US",formatDistance:JP,formatLong:rk,formatRelative:ik,localize:fk,match:Ik,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ok(e){const t=De(e);return UP(t,ZP(t))+1}function gg(e){const t=De(e),n=+go(t)-+GP(t);return Math.round(n/lg)+1}function Mc(e,t){var u,d,f,h;const n=De(e),r=n.getFullYear(),o=Ir(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=Ye(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=pn(s,t),l=Ye(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=pn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function _k(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Mc(e,t),i=Ye(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),pn(i,t)}function yg(e,t){const n=De(e),r=+pn(n,t)-+_k(n,t);return Math.round(r/lg)+1}function $e(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const nr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return $e(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):$e(n+1,2)},d(e,t){return $e(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 $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return $e(o,t.length)}},vo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vg={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 nr.y(e,t)},Y:function(e,t,n,r){const o=Mc(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return $e(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):$e(i,t.length)},R:function(e,t){const n=cg(e);return $e(n,t.length)},u:function(e,t){const n=e.getFullYear();return $e(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 $e(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 $e(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 nr.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 $e(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=yg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):$e(o,t.length)},I:function(e,t,n){const r=gg(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):nr.d(e,t)},D:function(e,t,n){const r=Ok(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):$e(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 $e(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 $e(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 $e(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=vo.noon:r===0?o=vo.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=vo.evening:r>=12?o=vo.afternoon:r>=4?o=vo.morning:o=vo.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 nr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):nr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):nr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):nr.s(e,t)},S:function(e,t){return nr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return wg(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return wg(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bg(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bg(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return $e(r,t.length)},T:function(e,t,n){const r=e.getTime();return $e(r,t.length)}};function bg(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+$e(i,2)}function wg(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=$e(Math.trunc(r/60),2),i=$e(r%60,2);return n+o+t+i}const xg=(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"})}},Tg=(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"})}},Dc={p:Tg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return xg(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}}",xg(r,t)).replace("{{time}}",Tg(o,t))}},Ak=/^D+$/,Mk=/^Y+$/,Dk=["D","DD","YY","YYYY"];function Sg(e){return Ak.test(e)}function Eg(e){return Mk.test(e)}function Nc(e,t,n){const r=Nk(e,t,n);if(console.warn(r),Dk.includes(e))throw new RangeError(r)}function Nk(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 Fk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Lk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vk=/^'([^]*?)'?$/,$k=/''/g,jk=/[a-zA-Z]/;function Rk(e,t,n){var u,d,f,h;const r=Ir(),o=r.locale??mg,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=De(e);if(!fg(a))throw new RangeError("Invalid time value");let l=t.match(Lk).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=Dc[m];return v(p,o.formatLong)}return p}).join("").match(Fk).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:Bk(p)};if(vg[m])return{isToken:!0,value:p};if(m.match(jk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Eg(m)||Sg(m))&&Nc(m,t,String(e));const v=vg[m[0]];return v(a,m,o.localize,c)}).join("")}function Bk(e){const t=e.match(Vk);return t?t[1].replace($k,"'"):e}function zk(){return Object.assign({},Ir())}function Wk(e){let n=De(e).getDay();return n===0&&(n=7),n}function Hk(e,t){const n=De(e),r=De(t);return n.getTime()>r.getTime()}function Uk(e,t){const n=De(e),r=De(t);return+n<+r}function Gk(e,t){const n=t instanceof Date?Ye(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 Yk=10;class Cg{constructor(){oe(this,"subPriority",0)}validate(t,n){return!0}}class qk extends Cg{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 Kk extends Cg{constructor(){super(...arguments);oe(this,"priority",Yk);oe(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ye(n,Gk(n,Date))}}class Ne{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new qk(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Zk extends Ne{constructor(){super(...arguments);oe(this,"priority",140);oe(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 lt={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}/},mn={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 ct(e,t){return e&&{value:t(e.value),rest:e.rest}}function Qe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function gn(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*zP+i*BP+s*WP),rest:t.slice(n[0].length)}}function Pg(e){return Qe(lt.anyDigitsSigned,e)}function nt(e,t){switch(e){case 1:return Qe(lt.singleDigit,t);case 2:return Qe(lt.twoDigits,t);case 3:return Qe(lt.threeDigits,t);case 4:return Qe(lt.fourDigits,t);default:return Qe(new RegExp("^\\d{1,"+e+"}"),t)}}function Gs(e,t){switch(e){case 1:return Qe(lt.singleDigitSigned,t);case 2:return Qe(lt.twoDigitsSigned,t);case 3:return Qe(lt.threeDigitsSigned,t);case 4:return Qe(lt.fourDigitsSigned,t);default:return Qe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Fc(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 kg(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 Ig(e){return e%400===0||e%4===0&&e%100!==0}class Xk extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(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 ct(nt(4,n),i);case"yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(nt(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=kg(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 Qk extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(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 ct(nt(4,n),i);case"Yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(nt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=Mc(n,i);if(o.isTwoDigitYear){const l=kg(o.year,s);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),pn(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),pn(n,i)}}class Jk extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Gs(r==="R"?4:r.length,n)}set(n,r,o){const i=Ye(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),go(i)}}class eI extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Gs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class tI extends Ne{constructor(){super(...arguments);oe(this,"priority",120);oe(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 nt(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 nI extends Ne{constructor(){super(...arguments);oe(this,"priority",120);oe(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 nt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class rI extends Ne{constructor(){super(...arguments);oe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);oe(this,"priority",110)}parse(n,r,o){const i=s=>s-1;switch(r){case"M":return ct(Qe(lt.month,n),i);case"MM":return ct(nt(2,n),i);case"Mo":return ct(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 oI extends Ne{constructor(){super(...arguments);oe(this,"priority",110);oe(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 ct(Qe(lt.month,n),i);case"LL":return ct(nt(2,n),i);case"Lo":return ct(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 iI(e,t,n){const r=De(e),o=yg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class sI extends Ne{constructor(){super(...arguments);oe(this,"priority",100);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Qe(lt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return pn(iI(n,o,i),i)}}function aI(e,t){const n=De(e),r=gg(n)-t;return n.setDate(n.getDate()-r*7),n}class lI extends Ne{constructor(){super(...arguments);oe(this,"priority",100);oe(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 Qe(lt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return go(aI(n,o))}}const cI=[31,28,31,30,31,30,31,31,30,31,30,31],uI=[31,29,31,30,31,30,31,31,30,31,30,31];class dI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"subPriority",1);oe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Qe(lt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return nt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Ig(o),s=n.getMonth();return i?r>=1&&r<=uI[s]:r>=1&&r<=cI[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class fI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"subpriority",1);oe(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 Qe(lt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return nt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Ig(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Lc(e,t,n){var d,f,h,p;const r=Ir(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,i=De(e),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return mo(i,u)}class hI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(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=Lc(n,o,i),n.setHours(0,0,0,0),n}}class pI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(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 l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ct(nt(r.length,n),s);case"eo":return ct(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=Lc(n,o,i),n.setHours(0,0,0,0),n}}class mI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(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 l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ct(nt(r.length,n),s);case"co":return ct(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=Lc(n,o,i),n.setHours(0,0,0,0),n}}function gI(e,t){const n=De(e),r=Wk(n),o=t-r;return mo(n,o)}class yI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(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 nt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ct(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 ct(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return ct(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return ct(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=gI(n,o),n.setHours(0,0,0,0),n}}class vI extends Ne{constructor(){super(...arguments);oe(this,"priority",80);oe(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(Fc(o),0,0,0),n}}class bI extends Ne{constructor(){super(...arguments);oe(this,"priority",80);oe(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(Fc(o),0,0,0),n}}class wI extends Ne{constructor(){super(...arguments);oe(this,"priority",80);oe(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(Fc(o),0,0,0),n}}class xI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Qe(lt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return nt(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 TI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Qe(lt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class SI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Qe(lt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return nt(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 EI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Qe(lt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return nt(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 CI extends Ne{constructor(){super(...arguments);oe(this,"priority",60);oe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Qe(lt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class PI extends Ne{constructor(){super(...arguments);oe(this,"priority",50);oe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Qe(lt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class kI extends Ne{constructor(){super(...arguments);oe(this,"priority",30);oe(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return ct(nt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class II extends Ne{constructor(){super(...arguments);oe(this,"priority",10);oe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return gn(mn.basicOptionalMinutes,n);case"XX":return gn(mn.basic,n);case"XXXX":return gn(mn.basicOptionalSeconds,n);case"XXXXX":return gn(mn.extendedOptionalSeconds,n);case"XXX":default:return gn(mn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ye(n,n.getTime()-Us(n)-o)}}class OI extends Ne{constructor(){super(...arguments);oe(this,"priority",10);oe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return gn(mn.basicOptionalMinutes,n);case"xx":return gn(mn.basic,n);case"xxxx":return gn(mn.basicOptionalSeconds,n);case"xxxxx":return gn(mn.extendedOptionalSeconds,n);case"xxx":default:return gn(mn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ye(n,n.getTime()-Us(n)-o)}}class _I extends Ne{constructor(){super(...arguments);oe(this,"priority",40);oe(this,"incompatibleTokens","*")}parse(n){return Pg(n)}set(n,r,o){return[Ye(n,o*1e3),{timestampIsSet:!0}]}}class AI extends Ne{constructor(){super(...arguments);oe(this,"priority",20);oe(this,"incompatibleTokens","*")}parse(n){return Pg(n)}set(n,r,o){return[Ye(n,o),{timestampIsSet:!0}]}}const MI={G:new Zk,y:new Xk,Y:new Qk,R:new Jk,u:new eI,Q:new tI,q:new nI,M:new rI,L:new oI,w:new sI,I:new lI,d:new dI,D:new fI,E:new hI,e:new pI,c:new mI,i:new yI,a:new vI,b:new bI,B:new wI,h:new xI,H:new TI,K:new SI,k:new EI,m:new CI,s:new PI,S:new kI,X:new II,x:new OI,t:new _I,T:new AI},DI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,NI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,FI=/^'([^]*?)'?$/,LI=/''/g,VI=/\S/,$I=/[a-zA-Z]/;function jI(e,t,n,r){var m,v,y,x;const o=zk(),i=o.locale??mg,s=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((x=(y=o.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(t==="")return e===""?De(n):Ye(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:a,locale:i},c=[new Kk],u=t.match(NI).map(g=>{const S=g[0];if(S in Dc){const T=Dc[S];return T(g,i.formatLong)}return g}).join("").match(DI),d=[];for(let g of u){Eg(g)&&Nc(g,t,e),Sg(g)&&Nc(g,t,e);const S=g[0],T=MI[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const I=d.find(k=>E.includes(k.token)||k.token===S);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${g}\` at the same time`)}else if(T.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);d.push({token:S,fullToken:g});const O=T.run(e,g,i.match,l);if(!O)return Ye(n,NaN);c.push(O.setter),e=O.rest}else{if(S.match($I))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(g==="''"?g="'":S==="'"&&(g=RI(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Ye(n,NaN)}}if(e.length>0&&VI.test(e))return Ye(n,NaN);const f=c.map(g=>g.priority).sort((g,S)=>S-g).filter((g,S,T)=>T.indexOf(g)===S).map(g=>c.filter(S=>S.priority===g).sort((S,T)=>T.subPriority-S.subPriority)).map(g=>g[0]);let h=De(n);if(isNaN(h.getTime()))return Ye(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Ye(n,NaN);const S=g.set(h,p,l);Array.isArray(S)?(h=S[0],Object.assign(p,S[1])):h=S}return Ye(n,h)}function RI(e){return e.match(FI)[1].replace(LI,"'")}function BI(e,t){const n=De(e),r=De(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function zI(e){return qP(e,YP(e))}function WI(e,t){return mo(e,-t)}function Og(e,t){return Hs(e,-t)}function HI(e,t){return ug(e,-t)}function UI(e,t){return dg(e,-t)}var Et=function(){return Et=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},Et.apply(this,arguments)};function Vc(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 $c(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Ii=function(e){return e.replace(new RegExp(" ","g")," ")},_g=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)},GI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Ag=function(e,t,n){var r=e.length-2,o=GI(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Mg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Dg=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},YI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},jc=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},qI=function(e){return e==="money"||e==="currency"},KI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Et(Et({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Rc=function(e,t){var n=_g(Mg(e),t.fraction.length),r="".concat(t.currency).concat(Ag(n,t.group,t.decimal));return Ii(r)},ZI=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 l=e.onChange,c=Vc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=KI(r,i,a);return p.currency=Ii("".concat(p.currency.trim()," ")),p.literal=Ii(p.literal.trim()),p},[r,i]),f=function(p){var m=Rc(p.target.value,d),v=Dg(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Rc(c.defaultValue,d):void 0;return b.createElement("input",Et({},c,{value:typeof c.value=="string"?Rc(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),XI=1,QI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},JI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Et(Et({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Bc=function(e,t){var n=_g(Mg(e),t.fraction.length),r="".concat(Ag(n,t.group,t.decimal)," ").concat(t.percentSign);return Ii(r)},eO=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=Vc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=$c(b.useState(function(){var y,x;return(x=(y=s.value)===null||y===void 0?void 0:y.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var y,x=Number.parseFloat("".concat((y=s.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(Bc(x,d))},[s.value]);var d=b.useMemo(function(){var y=JI(r);return y.percentSign=Ii("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-XI,h=function(y){var x,g=a.current;g&&(g.setSelectionRange(f,f),y&&((x=s.onFocus)===null||x===void 0||x.call(s,y)))},p=function(y){var x=y.currentTarget;if(x.selectionStart!==null){var g=x.selectionStart,S=x.selectionEnd,T=g!==S,E=f<g;!T&&E&&h()}i==null||i(y)},m=function(y){var x=Bc(y.target.value,d),g=Dg(x);u(x),y.target.value=x,y.target.setAttribute("data-number",g.toString()),o==null||o(y)};b.useEffect(function(){return h()},[c]);var v=s.defaultValue?Bc(s.defaultValue,d):void 0;return b.createElement("input",Et({},s,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Oi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},tO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=Ys[i];s===void 0?r.push(i.replace(Oi.dots,"\\.").replace(Oi.openParenthesis,"\\(").replace(Oi.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Oi.leadingBars,"\\")},_i=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return zc(o,n);var i=tO(o);return n?"^".concat(i,"$"):i},nO=function(e){return e.replace(Oi.escape,"\\$&")},zc=function(e,t){var n=e.map(function(r){return typeof r=="string"?nO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ys={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]/}},rO=/\d/,Ng="(dd) 9dddd-dddd",Fg="(dd) dddd-dddd",Lg="ddd.ddd.ddd-dd",Vg="dd.ddd.ddd/dddd-dd",qs=function(e){return e.replace(/\D/g,"")},oO=["2",/[0-3]/,":",/[0-5]/,/\d/],iO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],jt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Lg,isoDate:"dddd-dd-dd",cnpj:Vg,telephone:Fg,cellphone:Ng,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return qs(e).length<=11?Lg:Vg},int:function(e){return e===void 0&&(e=""),rO.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=qs(e);return t.length<11?Fg:Ng},time:function(e){var t=qs(e),n=t[0];return n==="2"?oO:iO}},Rt=function(e,t,n){var r;return n===void 0&&(n={}),Et({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:_i(e,"",!0),infinity:n.infinity},n)},At={cellTelephone:Rt(jt.cellTelephone,"tel"),cellphone:Rt(jt.cellphone,"tel"),cep:Rt(jt.cep,"decimal"),cnpj:Rt(jt.cnpj,"decimal"),color:Rt(jt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Rt(jt.cpf,"decimal"),cpfCnpj:Rt(jt.cpfCnpj,"decimal",{transform:qs}),creditCard:Rt(jt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Rt(jt.date,"decimal"),int:Rt(jt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Rt(jt.isoDate,"decimal"),telephone:Rt(jt.telephone,"tel"),time:Rt(jt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Rt(jt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function $g(e,t,n,r){var o,i;r===void 0&&(r=Ys);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var jg=function(e){return e},sO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(_i(e,n,t));return r.test(n)};function aO(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var lO=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,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Vc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=jc(a),v=jc(d),y=jc(u),x=b.useRef(sO(u,i,h.value||h.defaultValue)),g=f??"input",S=$c(b.useState(""),2),T=S[0],E=S[1],O=aO(T),I=b.useCallback(function(A,N){var $,z,U=($=A??N)!==null&&$!==void 0?$:"";if(u===void 0)return U;var _=(z=U==null?void 0:U.toString())!==null&&z!==void 0?z:"";return $g(_,typeof u=="function"?u(_):u,s??jg,c??Ys)},[s,u,c]),k=$c(b.useState(function(){return I(h.value,h.defaultValue)}),2),C=k[0],L=k[1],D=I(h.defaultValue,h.defaultValue),V=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var A=u(C);return Array.isArray(A)?zc(A,i):_i(u,C,i)}return typeof u=="string"?_i(u,C,i):zc(u,i)},[l,C,i,u]);b.useEffect(function(){if(h.value!==void 0){var A=I(h.value,h.defaultValue);L(A),p.current!==null&&(p.current.value=A)}},[h.value,u,s,h.defaultValue]);var P=function(A){var N,$,z,U,_,R=A.currentTarget,Z=A.target.value;if(y.current===void 0)return L(Z),(N=v.current)===null||N===void 0||N.call(v,Z),($=m.current)===null||$===void 0||$.call(m,A),d==null?void 0:d(Z);var re=new RegExp(_i(y.current,Z,i)),Q=(z=R.selectionEnd)!==null&&z!==void 0?z:0,G=function(Y,se,H){if(Y.type!=="number")return Y.setSelectionRange(se,H)};if(r&&x.current&&Z.length>=C.length)return R.value=C,G(R,Q-1,Q-1);var F=!1;Z.length<O.length&&(x.current=!1,F=!0),re.test(Z)&&(x.current=!0);var B=Q,W=Z[B-1],j=$g(Z,typeof y.current=="function"?y.current(Z):y.current,s??jg,c??Ys);for(R.value=j,L(j);B<j.length&&j.charAt(B-1)!==W;)B+=1;F?G(R,Q,Q):G(R,B,B),A.target.value=j,E(j),(U=v.current)===null||U===void 0||U.call(v,j),(_=m.current)===null||_===void 0||_.call(m,A)};return b.createElement(g,Et({},h,{ref:p,pattern:V,onChange:P,defaultValue:Rg(h.defaultValue)?D:void 0,value:Rg(h.value)?I(h.value,h.value):h.value}))}),Rg=function(e){return typeof e=="string"},Bg=b.forwardRef(function(e,t){return qI(e.mask)?b.createElement(ZI,Et({},e,{mask:void 0,ref:t})):QI(e.mask)?b.createElement(eO,Et({},e,{mask:void 0,ref:t})):b.createElement(lO,Et({},e,{ref:t}))}),Bt=function(e){return function(t){return b.createElement(Bg,Et({},e,t))}};Bt(At.cellTelephone),Bt(At.cellphone),Bt(At.cep),Bt(At.cnpj),Bt(At.color),Bt(At.cpf),Bt(At.cpfCnpj),Bt(At.creditCard),Bt(At.date),Bt(At.int),Bt(At.isoDate),Bt(At.telephone),Bt(At.time),Bt(At.uuid);var zg=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&YI(At,t.mask)?At[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return b.createElement(Bg,Et({},o,{ref:n}))}),Wc={},Hc={exports:{}},Uc={};/**
|
|
138
143
|
* @license React
|
|
139
144
|
* use-sync-external-store-shim.production.min.js
|
|
140
145
|
*
|
|
@@ -142,7 +147,7 @@
|
|
|
142
147
|
*
|
|
143
148
|
* This source code is licensed under the MIT license found in the
|
|
144
149
|
* LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/var
|
|
150
|
+
*/var Wg;function cO(){if(Wg)return Uc;Wg=1;var e=b;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,v=p[1];return i(function(){m.value=h,m.getSnapshot=f,l(m)&&v({inst:m})},[d,h,f]),o(function(){return l(m)&&v({inst:m}),d(function(){l(m)&&v({inst:m})})},[d]),s(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Uc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Uc}var Hg={};/**
|
|
146
151
|
* @license React
|
|
147
152
|
* use-sync-external-store-shim.development.js
|
|
148
153
|
*
|
|
@@ -150,7 +155,7 @@
|
|
|
150
155
|
*
|
|
151
156
|
* This source code is licensed under the MIT license found in the
|
|
152
157
|
* LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/var
|
|
158
|
+
*/var Ug;function uO(){return Ug||(Ug=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(g){{for(var S=arguments.length,T=new Array(S>1?S-1:0),E=1;E<S;E++)T[E-1]=arguments[E];r("error",g,T)}}function r(g,S,T){{var E=t.ReactDebugCurrentFrame,O=E.getStackAddendum();O!==""&&(S+="%s",T=T.concat([O]));var I=T.map(function(k){return String(k)});I.unshift("Warning: "+S),Function.prototype.apply.call(console[g],console,I)}}function o(g,S){return g===S&&(g!==0||1/g===1/S)||g!==g&&S!==S}var i=typeof Object.is=="function"?Object.is:o,s=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(g,S,T){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=S();if(!d){var O=S();i(E,O)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var I=s({inst:{value:E,getSnapshot:S}}),k=I[0].inst,C=I[1];return l(function(){k.value=E,k.getSnapshot=S,h(k)&&C({inst:k})},[g,E,S]),a(function(){h(k)&&C({inst:k});var L=function(){h(k)&&C({inst:k})};return g(L)},[g]),c(E),E}function h(g){var S=g.getSnapshot,T=g.value;try{var E=S();return!i(T,E)}catch{return!0}}function p(g,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!m,y=v?p:f,x=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;Hg.useSyncExternalStore=x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Hg}var Gg;function Yg(){return Gg||(Gg=1,process.env.NODE_ENV==="production"?Hc.exports=cO():Hc.exports=uO()),Hc.exports}/**
|
|
154
159
|
* @license React
|
|
155
160
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
156
161
|
*
|
|
@@ -158,7 +163,7 @@
|
|
|
158
163
|
*
|
|
159
164
|
* This source code is licensed under the MIT license found in the
|
|
160
165
|
* LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/var
|
|
166
|
+
*/var qg;function dO(){if(qg)return Wc;qg=1;var e=b,t=Yg();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Wc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){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 y(E){if(!x){if(x=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var O=m.value;if(h(O,E))return S=O}return S=E}if(O=S,r(g,E))return O;var I=f(E);return h!==void 0&&h(O,I)?O:(g=E,S=I)}var x=!1,g,S,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,f,h]);var v=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},Wc}var Kg={};/**
|
|
162
167
|
* @license React
|
|
163
168
|
* use-sync-external-store-shim/with-selector.development.js
|
|
164
169
|
*
|
|
@@ -166,31 +171,31 @@
|
|
|
166
171
|
*
|
|
167
172
|
* This source code is licensed under the MIT license found in the
|
|
168
173
|
* LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/var qg;function aI(){return qg||(qg=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=Ug();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,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 T=!1,E,P,D=function(F){if(!T){T=!0,E=F;var $=h(F);if(p!==void 0&&g.hasValue){var C=g.value;if(p(C,$))return P=C,C}return P=$,$}var O=E,M=P;if(r(O,F))return M;var L=h(F);return p!==void 0&&p(M,L)?M:(E=F,P=L,L)},_=f===void 0?null:f,I=function(){return D(d())},V=_===null?void 0:function(){return D(_())};return[I,V]},[d,f,h,p]),w=v[0],y=v[1],S=o(u,w,y);return s(function(){g.hasValue=!0,g.value=S},[S]),l(S),S}Yg.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Yg}process.env.NODE_ENV==="production"?sI():aI();const bo=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},lI=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},cI=e=>Object.entries(e),Kg=e=>e instanceof Promise,Zg=(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),uI=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),l=t(...s),c=(u,d)=>n(f=>Zg(u,f,i,d));return Kg(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},dI=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),l=c=>n(u=>Zg(c,u,i,o.current));return Kg(a)?a.then(c=>l(c)):l(a)},Uc=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=bo(r),s=bo((n==null?void 0:n.props)??{}),a=bo(t),l=bo((n==null?void 0:n.postMiddleware)??[]),c=bo((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=lI(r),f=bo(d),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(g=>{g(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>s.current,g=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>f.current});return cI(g).reduce((v,[w,y])=>({...v,[w]:n!=null&&n.debug?uI(w,y,o,m,h,c.current):dI(w,y,o,m,h,c.current)}),{})});return[r,p,s.current]},fI=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function hI(e,t){return b.useRef(fI(e,t)).current}const pI={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0},mI=()=>{const[e,t]=b.useState(null),n=Or(pI),r=b.useMemo(()=>new window.ResizeObserver(o=>{if(o[0]){const i=o[0].contentRect;n.set({x:i.x,y:i.y,width:i.width,height:i.height,top:i.top,left:i.left,bottom:i.bottom,right:i.right})}}),[]);return b.useEffect(()=>{if(e)return r.observe(e),()=>{r.disconnect()}},[e]),[t,n]},gI=({children:e})=>{const[t,n]=mI(),r=n.get().height;return x.jsx(Ht.div,{animate:{height:r>0?r:"auto"},children:x.jsx("div",{ref:t,children:e})})},yI={type:"spring",bounce:.1,duration:.3},Xg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),Qg={middle:{x:"0%",opacity:1},enter:Xg(1),exit:Xg(-1)},Jg={exit:{visibility:"hidden"}},vI=e=>{const t=pn(fg(e));return dg({start:t,end:mo(t,41)})},ey=(e,t)=>e.toLocaleDateString(t,{month:"long"}),bI=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=fg(new Date(e).setMonth(r)),i=ey(o,t);return x.jsx("option",{value:i,"data-index":r,children:i},i)}),Gc={ArrowLeft:(e,t)=>t==="days"?$O(e,1):kg(e,1),ArrowRight:(e,t)=>t==="days"?mo(e,1):Ws(e,1),ArrowUp:(e,t)=>t==="days"?RO(e,1):jO(e,1),ArrowDown:(e,t)=>t==="days"?cg(e,1):ug(e,1)},ty=(e,t=0)=>{const n=e.toISOString(),r=()=>{const o=document.querySelector(`button[data-date="${n}"]`);if(o)return o.focus({preventScroll:!1})};t===0&&r(),setTimeout(r,t)},_r=e=>e.getFullYear().toString().padStart(4,"0"),ny=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:i})=>{const s=o||new Date,[a,l]=Uc({date:s,isAnimating:!1,year:_r(s),direction:void 0,months:bI(s,e),week:dg({start:pn(s),end:qP(s)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:yo(new Date)}),onExitComplete:()=>(ty(p.state().date,200),{isAnimating:!1}),date:m=>{const g=m(p.state().date);return{date:g,year:_r(g)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const g=Ws(m.date,1);return{date:g,isAnimating:!0,direction:1,year:_r(g)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const g=kg(m.date,1);return{date:g,isAnimating:!0,direction:-1,year:_r(g)}},onSelectDate:m=>{const g=m.currentTarget.dataset.date||"",v=new Date(g);return{date:v,year:_r(v)}},onChangeMonth:m=>{const g=m.target.value,w=Array.from(m.target.options).find(y=>y.value===g);if(w){const y=w.dataset.index||"",S=new Date(p.state().date);return S.setMonth(+y),{date:S,year:_r(S)}}return p.state()},onKeyDown:m=>{const g=m.key;if(g in Gc){(g==="ArrowUp"||g==="ArrowDown")&&m.preventDefault();const v=p.state().date,w=kn.keyof(Gc,g)?Gc[g](v,m.shiftKey?"month":"days"):null;if(w!==null)return ty(w),{date:w,year:_r(w)}}return p.state()}})),c=vI(a.date),u=a.date.toISOString(),d=ey(a.date,e);b.useEffect(()=>i==null?void 0:i(a.date),[u]);const f=hI(p=>{l.date(m=>{const g=new Date(m);return g.setFullYear(+p),g})},1200),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),f(m)};return x.jsx(XC,{transition:yI,children:x.jsxs("div",{className:"relative overflow-hidden",children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(gI,{children:x.jsx(Bs,{initial:!1,mode:"popLayout",presenceAffectsLayout:!0,custom:a.direction,onExitComplete:l.onExitComplete,children:x.jsxs(Ht.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(Ht.button,{onClick:l.previousMonth,variants:Jg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(SP,{className:"h-4 w-4"})}),x.jsx(Ht.span,{variants:Qg,custom:a.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${d.length}ch`},value:d,onChange:l.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:a.months}),x.jsx(jg,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(Ht.button,{variants:Jg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:l.nextMonth,children:x.jsx(Oc,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsx("div",{className:"mt-4 grid grid-cols-7 gap-y-4",children:a.week.map(p=>x.jsx("span",{className:"text-sm font-medium capitalize",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),x.jsx(Ht.ul,{onKeyDown:l.onKeyDown,variants:Qg,custom:a.direction,className:"mt-4 grid grid-cols-7 gap-y-4 pb-2",children:c.map(p=>{const m=p.toISOString(),g=m===u,v=VO(p)&&n,w=(t==null?void 0:t(p))||!1,y=!LO(p,a.date)||w;return x.jsx("li",{className:"flex w-full items-center justify-center",children:x.jsx("button",{type:"button","data-date":m,disabled:w,onClick:l.onSelectDate,"data-view":a.date.getMonth().toString(),className:Xe(`flex size-8 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${v?"text-primary":""} ${y?"text-disabled":""} ${g?"bg-primary text-primary-foreground":""}`),children:p.getDate()})},m)})})]},d)})})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{className:"duration-300 transition-transform hover:scale-105",type:"button",onClick:l.setToday,children:"Today"})})]})})},ry=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>x.jsxs(no,{...s,as:n,className:Xe("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?x.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,x.jsx("div",{className:Xe("min-w-full px-8",i),children:e})]}),wI=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:Xe("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),oy=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]};function nr(e){return iy(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nn(e){var t;return(t=(iy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function iy(e){return e instanceof Node||e instanceof Bt(e).Node}function je(e){return e instanceof Element||e instanceof Bt(e).Element}function ut(e){return e instanceof HTMLElement||e instanceof Bt(e).HTMLElement}function Yc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function Ei(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function xI(e){return["table","td","th"].includes(nr(e))}function qs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function qc(e){const t=Kc(),n=je(e)?Ut(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 TI(e){let t=Fn(e);for(;ut(t)&&!rr(t);){if(qc(t))return t;if(qs(t))return null;t=Fn(t)}return null}function Kc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rr(e){return["html","body","#document"].includes(nr(e))}function Ut(e){return Bt(e).getComputedStyle(e)}function Ks(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fn(e){if(nr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yc(e)&&e.host||Nn(e);return Yc(t)?t.host:t}function sy(e){const t=Fn(e);return rr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&Ei(t)?t:sy(t)}function or(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Bt(o);if(i){const a=Zc(s);return t.concat(s,s.visualViewport||[],Ei(o)?o:[],a&&n?or(a):[])}return t.concat(o,or(o,[],n))}function Zc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nn(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 dt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Xc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ay(){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 ly(e){return e.mozInputSource===0&&e.isTrusted?!0:eu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Qc(e){return SI()?!1:!eu()&&e.width===0&&e.height===0||eu()&&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 Jc(){return/apple/i.test(navigator.vendor)}function eu(){const e=/android/i;return e.test(Xc())||e.test(ay())}function cy(){return Xc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function SI(){return ay().includes("jsdom/")}function Ci(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function EI(e){return"nativeEvent"in e}function CI(e){return e.matches("html,body")}function vt(e){return(e==null?void 0:e.ownerDocument)||document}function tu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Ln(e){return"composedPath"in e?e.composedPath()[0]:e.target}const PI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function nu(e){return ut(e)&&e.matches(PI)}function Et(e){e.preventDefault(),e.stopPropagation()}function uy(e){return e?e.getAttribute("role")==="combobox"&&nu(e):!1}const yn=Math.min,Gt=Math.max,Zs=Math.round,wo=Math.floor,ir=e=>({x:e,y:e}),kI={left:"right",right:"left",bottom:"top",top:"bottom"},OI={start:"end",end:"start"};function ru(e,t,n){return Gt(e,yn(t,n))}function xo(e,t){return typeof e=="function"?e(t):e}function sr(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function dy(e){return e==="x"?"y":"x"}function ou(e){return e==="y"?"height":"width"}function Dr(e){return["top","bottom"].includes(sr(e))?"y":"x"}function iu(e){return dy(Dr(e))}function II(e,t,n){n===void 0&&(n=!1);const r=To(e),o=iu(e),i=ou(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Xs(s)),[s,Xs(s)]}function AI(e){const t=Xs(e);return[su(e),t,su(t)]}function su(e){return e.replace(/start|end/g,t=>OI[t])}function _I(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 DI(e,t,n,r){const o=To(e);let i=_I(sr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(su)))),i}function Xs(e){return e.replace(/left|right|bottom|top/g,t=>kI[t])}function MI(e){return{top:0,right:0,bottom:0,left:0,...e}}function fy(e){return typeof e!="number"?MI(e):{top:e,right:e,bottom:e,left:e}}function Qs(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 Zg;function fO(){return Zg||(Zg=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=Yg();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=i(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var y=a(function(){var T=!1,E,O,I=function(D){if(!T){T=!0,E=D;var V=h(D);if(p!==void 0&&v.hasValue){var P=v.value;if(p(P,V))return O=P,P}return O=V,V}var A=E,N=O;if(r(A,D))return N;var $=h(D);return p!==void 0&&p(N,$)?N:(E=D,O=$,$)},k=f===void 0?null:f,C=function(){return I(d())},L=k===null?void 0:function(){return I(k())};return[C,L]},[d,f,h,p]),x=y[0],g=y[1],S=o(u,x,g);return s(function(){v.hasValue=!0,v.value=S},[S]),l(S),S}Kg.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Kg}process.env.NODE_ENV==="production"?dO():fO();const bo=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},hO=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},pO=e=>Object.entries(e),Xg=e=>e instanceof Promise,Qg=(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),mO=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),l=t(...s),c=(u,d)=>n(f=>Qg(u,f,i,d));return Xg(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},gO=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),l=c=>n(u=>Qg(c,u,i,o.current));return Xg(a)?a.then(c=>l(c)):l(a)},Gc=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=bo(r),s=bo((n==null?void 0:n.props)??{}),a=bo(t),l=bo((n==null?void 0:n.postMiddleware)??[]),c=bo((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=hO(r),f=bo(d),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(v=>{v(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>s.current,v=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>f.current});return pO(v).reduce((y,[x,g])=>({...y,[x]:n!=null&&n.debug?mO(x,g,o,m,h,c.current):gO(x,g,o,m,h,c.current)}),{})});return[r,p,s.current]},yO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function vO(e,t){return b.useRef(yO(e,t)).current}const Yc={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",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"},Jg=b.createContext({translations:Yc}),bO=e=>{const t=b.useMemo(()=>({translations:{...Yc,...e.map}}),[e.map]);return w.jsx(Jg.Provider,{value:t,children:e.children})},Ut=()=>{const e=b.useContext(Jg);return e?e.translations:Yc},Ks=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),ey=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),ty={basic:/[,[\]]+?/,extend:/[,[\].]+?/},ny=(e,t)=>{const n=ey(t,ty.basic,e)||ey(t,ty.extend,e);return n===void 0||n===e?void 0:n},Zs=()=>typeof window>"u",qc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),ry=(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},wO={type:"spring",bounce:.3,duration:.6},oy=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),iy={middle:{x:"0%",opacity:1},enter:oy(1),exit:oy(-1)},sy={exit:{visibility:"hidden"}},xO=e=>{const t=pn(pg(e));return hg({start:t,end:mo(t,41)})},ay=(e,t)=>e.toLocaleDateString(t,{month:"long"}),TO=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=pg(new Date(e).setMonth(r)),i=ay(o,t);return w.jsx("option",{value:i,"data-index":r,children:i},i)}),Kc={ArrowLeft:(e,t)=>t==="days"?WI(e,1):Og(e,1),ArrowRight:(e,t)=>t==="days"?mo(e,1):Hs(e,1),ArrowUp:(e,t)=>t==="days"?HI(e,1):UI(e,1),ArrowDown:(e,t)=>t==="days"?ug(e,1):dg(e,1)},ly=(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)},_r=e=>e.getFullYear().toString().padStart(4,"0"),SO=(e,t,n)=>e===void 0||n===void 0?!1:Hk(t,e)&&Uk(t,n),cy=({RenderOnDay:e,changeOnlyOnClick:t=!1,disabledDate:n,locale:r,markToday:o=!0,onChangeMonth:i,onChangeYear:s,rangeMode:a=!1,onChange:l,styles:c,...u})=>{const d=Ut(),f=b.useRef(null),{date:h,range:p}=u,m=h||new Date,v=b.useRef(null),[y,x]=Gc({date:m,isAnimating:!1,year:_r(m),months:TO(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:hg({start:pn(m),end:XP(m)})},I=>({onChangeYear:k=>({year:k}),setToday:()=>({date:yo(new Date)}),onExitComplete:()=>(ly(v.current||null,f,I.state().date,200),v.current=null,{isAnimating:!1}),date:k=>{const C=k(I.state().date);return{date:C,year:_r(C)}},nextMonth:k=>{v.current=k.currentTarget;const C=I.state();if(C.isAnimating)return C;const L=Hs(C.date,1);return{date:L,isAnimating:!0,direction:1,year:_r(L)}},previousMonth:k=>{v.current=k.currentTarget;const C=I.state();if(C.isAnimating)return C;const L=Og(C.date,1);return{date:L,isAnimating:!0,direction:-1,year:_r(L)}},onSelectDate:k=>{const C=I.state(),L=k.currentTarget.dataset.range==="true",D=k.currentTarget.dataset.date||"",V=new Date(D);return{date:V,year:_r(V),selectMode:C.selectMode===void 0?void 0:C.selectMode==="from"?"to":"from",range:L?{from:C.selectMode==="from"?V:C.range.from,to:C.selectMode==="to"?V:C.range.to}:C.range}},onChangeMonth:k=>{const C=k.target.value,D=Array.from(k.target.options).find(P=>P.value===C),V=I.state();if(D){const P=D.dataset.index||"",A=new Date(I.state().date);return A.setMonth(+P),{...V,date:A,year:_r(A)}}return V},onKeyDown:k=>{const C=k.key,L=I.state();if(C in Kc){(C==="ArrowUp"||C==="ArrowDown")&&k.preventDefault();const D=I.state().date,V=kn.keyof(Kc,C)?Kc[C](D,k.shiftKey?"month":"days"):null;if(V!==null)return ly(k.target,f,V),{...L,date:V,year:_r(V)}}return I.state()}}),{props:{onChangeMonth:i,onChangeYear:s},postMiddleware:[(I,k,C)=>{var D,V;return(C.method==="onChangeMonth"||C.method==="previousMonth"||C.method==="nextMonth")&&((V=(D=C.props).onChangeMonth)==null||V.call(D,I.date)),I},(I,k,C)=>{var D,V;return C.method==="onChangeYear"&&((V=(D=C.props).onChangeYear)==null||V.call(D,I.date)),I},(I,k,C)=>{const L=C.method==="onSelectDate"||C.method==="setToday"||C.method==="onKeyDown";return a&&L&&t?(l==null||l(I.range),I):(L&&t&&(l==null||l(I.date)),I)}]}),g=ry(xO(y.date),7),S=y.date.toISOString(),T=ay(y.date,r);b.useEffect(()=>{t||l==null||l(y.date)},[S]);const E=vO(I=>{x.date(k=>{const C=new Date(k);return C.setFullYear(+I),C})},1200),O=I=>{const k=I.currentTarget.value;x.onChangeYear(k),s==null||s(new Date(k)),E(k)};return w.jsx(eP,{transition:wO,children:w.jsxs("div",{ref:f,className:ze("relative overflow-hidden",c==null?void 0:c.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(Ci,{initial:!1,mode:"popLayout",custom:y.direction,onExitComplete:x.onExitComplete,children:w.jsxs(St.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(St.button,{layout:!0,"data-focustrap":"prev",variants:sy,onClick:x.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:w.jsx(kP,{className:"h-4 w-4"})}),w.jsx(St.span,{layout:!0,variants:iy,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:`${T.length}ch`},value:T,onChange:x.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:y.months}),w.jsx(zg,{mask:"int",value:y.year,maxLength:4,placeholder:"YYYY",onChange:O,style:{width:`${y.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(St.button,{layout:!0,"data-focustrap":"next",variants:sy,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:x.nextMonth,children:w.jsx(Oc,{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(St.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:ze("py-2 text-sm font-medium capitalize",c==null?void 0:c.weekDay),children:I.toLocaleDateString(r,{weekday:"short"})},I.toString()))})}),w.jsx(St.tbody,{layout:!0,variants:iy,custom:y.direction,onKeyDown:x.onKeyDown,className:ze(c==null?void 0:c.week),children:g.map((I,k)=>w.jsx("tr",{className:c==null?void 0:c.week,children:I.map(C=>{var $,z,U,_;const L=C.toISOString(),D=a?L===(($=p==null?void 0:p.to)==null?void 0:$.toISOString())||L===((z=p==null?void 0:p.from)==null?void 0:z.toISOString()):L===(h==null?void 0:h.toISOString()),V=zI(C)&&o,P=(n==null?void 0:n(C))||!1,A=!BI(C,y.date)||P,N=a?SO(p==null?void 0:p.from,C,p==null?void 0:p.to):!1;return w.jsxs("td",{align:"center",className:ze("relative",c==null?void 0:c.dayFrame),children:[w.jsxs("button",{type:"button","data-date":L,disabled:P,"data-range":a,onClick:x.onSelectDate,"data-view":y.date.getMonth().toString(),className:ze(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${V?"text-primary":""} ${A?"text-disabled":""} ${D?"bg-primary text-primary-foreground":""}`,c==null?void 0:c.day,N?"size-10 border border-dashed border-card-border":""),children:[C.getDate(),D&&((U=y.range.from)==null?void 0:U.toISOString())===L?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:d.calendarFromDate})}):null,D&&((_=y.range.to)==null?void 0:_.toISOString())===L?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:d.calendarToDate})}):null]}),e?w.jsx(e,{date:C}):null]},L)})},`week-${I.length}-${k}`))})]})]},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"})})]})})},uy=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>w.jsxs(to,{...s,as:n,className:ze("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:ze("min-w-full px-8",i),children:e})]}),EO=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:ze("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]}),dy=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]};function rr(e){return fy(e)?(e.nodeName||"").toLowerCase():"#document"}function zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nn(e){var t;return(t=(fy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fy(e){return e instanceof Node||e instanceof zt(e).Node}function Be(e){return e instanceof Element||e instanceof zt(e).Element}function ut(e){return e instanceof HTMLElement||e instanceof zt(e).HTMLElement}function Zc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zt(e).ShadowRoot}function Ai(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function CO(e){return["table","td","th"].includes(rr(e))}function Xs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Xc(e){const t=Qc(),n=Be(e)?Gt(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 PO(e){let t=Fn(e);for(;ut(t)&&!or(t);){if(Xc(t))return t;if(Xs(t))return null;t=Fn(t)}return null}function Qc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function or(e){return["html","body","#document"].includes(rr(e))}function Gt(e){return zt(e).getComputedStyle(e)}function Qs(e){return Be(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fn(e){if(rr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zc(e)&&e.host||Nn(e);return Zc(t)?t.host:t}function hy(e){const t=Fn(e);return or(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&Ai(t)?t:hy(t)}function ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=zt(o);if(i){const a=Jc(s);return t.concat(s,s.visualViewport||[],Ai(o)?o:[],a&&n?ir(a):[])}return t.concat(o,ir(o,[],n))}function Jc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nn(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 dt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Zc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function eu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function py(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function my(e){return e.mozInputSource===0&&e.isTrusted?!0:ru()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function tu(e){return kO()?!1:!ru()&&e.width===0&&e.height===0||ru()&&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 nu(){return/apple/i.test(navigator.vendor)}function ru(){const e=/android/i;return e.test(eu())||e.test(py())}function gy(){return eu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function kO(){return py().includes("jsdom/")}function Mi(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function IO(e){return"nativeEvent"in e}function OO(e){return e.matches("html,body")}function vt(e){return(e==null?void 0:e.ownerDocument)||document}function ou(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Ln(e){return"composedPath"in e?e.composedPath()[0]:e.target}const _O="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function iu(e){return ut(e)&&e.matches(_O)}function Ct(e){e.preventDefault(),e.stopPropagation()}function yy(e){return e?e.getAttribute("role")==="combobox"&&iu(e):!1}const yn=Math.min,Yt=Math.max,Js=Math.round,wo=Math.floor,sr=e=>({x:e,y:e}),AO={left:"right",right:"left",bottom:"top",top:"bottom"},MO={start:"end",end:"start"};function su(e,t,n){return Yt(e,yn(t,n))}function xo(e,t){return typeof e=="function"?e(t):e}function ar(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function vy(e){return e==="x"?"y":"x"}function au(e){return e==="y"?"height":"width"}function Ar(e){return["top","bottom"].includes(ar(e))?"y":"x"}function lu(e){return vy(Ar(e))}function DO(e,t,n){n===void 0&&(n=!1);const r=To(e),o=lu(e),i=au(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ea(s)),[s,ea(s)]}function NO(e){const t=ea(e);return[cu(e),t,cu(t)]}function cu(e){return e.replace(/start|end/g,t=>MO[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 LO(e,t,n,r){const o=To(e);let i=FO(ar(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(cu)))),i}function ea(e){return e.replace(/left|right|bottom|top/g,t=>AO[t])}function VO(e){return{top:0,right:0,bottom:0,left:0,...e}}function by(e){return typeof e!="number"?VO(e):{top:e,right:e,bottom:e,left:e}}function ta(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
|
|
170
175
|
* tabbable 6.2.0
|
|
171
176
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
172
|
-
*/var NI=["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])"],Js=NI.join(","),hy=typeof Element>"u",So=hy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ea=!hy&&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},ta=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},FI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},LI=function(t,n,r){if(ta(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Js));return n&&So.call(t,Js)&&o.unshift(t),o=o.filter(r),o},VI=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!ta(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=So.call(s,Js);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!ta(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var h=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},py=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},my=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||FI(t))&&!py(t)?0:t.tabIndex},$I=function(t,n){var r=my(t);return r<0&&n&&!py(t)?0:r},RI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},gy=function(t){return t.tagName==="INPUT"},jI=function(t){return gy(t)&&t.type==="hidden"},BI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},zI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},WI=function(t){if(!t.name)return!0;var n=t.form||ea(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=zI(o,t.form);return!i||i===t},HI=function(t){return gy(t)&&t.type==="radio"},UI=function(t){return HI(t)&&!WI(t)},GI=function(t){var n,r=t&&ea(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=ea(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},yy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},YI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=So.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(So.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=ea(t);if(l&&!l.shadowRoot&&o(l)===!0)return yy(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(GI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return yy(t);return!1},qI=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return So.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},KI=function(t,n){return!(n.disabled||ta(n)||jI(n)||YI(n,t)||BI(n)||qI(n))},au=function(t,n){return!(UI(n)||my(n)<0||!KI(t,n))},ZI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},XI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=$I(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(RI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Pi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=VI([t],n.includeContainer,{filter:au.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ZI}):r=LI(t,n.includeContainer,au.bind(null,n)),XI(r)},QI=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return So.call(t,Js)===!1?!1:au(n,t)};function vy(e,t,n){let{reference:r,floating:o}=e;const i=Dr(t),s=iu(t),a=ou(s),l=sr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(To(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const JI=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=vy(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x:w,y,data:S,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=w??u,d=y??d,h={...h,[g]:{...h[g],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=vy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function lu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=xo(t,e),p=fy(h),g=a[f?d==="floating"?"reference":"floating":d],v=Qs(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:c,rootBoundary:u,strategy:l})),w=d==="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)),S=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},T=Qs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:l}):w);return{top:(v.top-T.top+p.top)/S.y,bottom:(T.bottom-v.bottom+p.bottom)/S.y,left:(v.left-T.left+p.left)/S.x,right:(T.right-v.right+p.right)/S.x}}const eA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=xo(e,t)||{};if(c==null)return{};const d=fy(u),f={x:n,y:r},h=iu(o),p=ou(h),m=await s.getDimensions(c),g=h==="y",v=g?"top":"left",w=g?"bottom":"right",y=g?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-f[h]-i.floating[p],T=f[h]-i.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let P=E?E[y]:0;(!P||!await(s.isElement==null?void 0:s.isElement(E)))&&(P=a.floating[y]||i.floating[p]);const D=S/2-T/2,_=P/2-m[p]/2-1,I=yn(d[v],_),V=yn(d[w],_),F=I,$=P-m[p]-V,C=P/2-m[p]/2+D,O=ru(F,C,$),M=!l.arrow&&To(o)!=null&&C!==O&&i.reference[p]/2-(C<F?I:V)-m[p]/2<0,L=M?C<F?C-F:C-$:0;return{[h]:f[h]+L,data:{[h]:O,centerOffset:C-O-L,...M&&{alignmentOffset:L}},reset:M}}}),tA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=xo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=sr(o),w=Dr(a),y=sr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(y||!m?[Xs(a)]:AI(a)),E=p!=="none";!f&&E&&T.push(...DI(a,m,p,S));const P=[a,...T],D=await lu(t,g),_=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&_.push(D[v]),d){const C=II(o,s,S);_.push(D[C[0]],D[C[1]])}if(I=[...I,{placement:o,overflows:_}],!_.every(C=>C<=0)){var V,F;const C=(((V=i.flip)==null?void 0:V.index)||0)+1,O=P[C];if(O)return{data:{index:C,overflows:I},reset:{placement:O}};let M=(F=I.filter(L=>L.overflows[0]<=0).sort((L,H)=>L.overflows[1]-H.overflows[1])[0])==null?void 0:F.placement;if(!M)switch(h){case"bestFit":{var $;const L=($=I.filter(H=>{if(E){const Y=Dr(H.placement);return Y===w||Y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Y=>Y>0).reduce((Y,k)=>Y+k,0)]).sort((H,Y)=>H[1]-Y[1])[0])==null?void 0:$[0];L&&(M=L);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function nA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=sr(n),a=To(n),l=Dr(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=xo(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const rA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await nA(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},oA=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:w}=g;return{x:v,y:w}}},...l}=xo(e,t),c={x:n,y:r},u=await lu(t,l),d=Dr(sr(o)),f=dy(d);let h=c[f],p=c[d];if(i){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=h+u[g],y=h-u[v];h=ru(w,h,y)}if(s){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=p+u[g],y=p-u[v];p=ru(w,p,y)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},iA=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}=xo(e,t),l=await lu(t,a),c=sr(n),u=To(n),d=Dr(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=h-l.top-l.bottom,v=f-l.left-l.right,w=yn(h-l[p],g),y=yn(f-l[m],v),S=!t.middlewareData.shift;let T=w,E=y;if(d?E=u||S?yn(y,v):v:T=u||S?yn(w,g):g,S&&!u){const D=Gt(l.left,0),_=Gt(l.right,0),I=Gt(l.top,0),V=Gt(l.bottom,0);d?E=f-2*(D!==0||_!==0?D+_:Gt(l.left,l.right)):T=h-2*(I!==0||V!==0?I+V:Gt(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:T});const P=await o.getDimensions(i.floating);return f!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function by(e){const t=Ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ut(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Zs(n)!==i||Zs(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function cu(e){return je(e)?e:e.contextElement}function Eo(e){const t=cu(e);if(!ut(t))return ir(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=by(t);let s=(i?Zs(n.width):n.width)/r,a=(i?Zs(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const sA=ir(0);function wy(e){const t=Bt(e);return!Kc()||!t.visualViewport?sA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=cu(e);let s=ir(1);t&&(r?je(r)&&(s=Eo(r)):s=Eo(e));const a=aA(i,n,r)?wy(i):ir(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Bt(i),h=r&&je(r)?Bt(r):r;let p=f,m=Zc(p);for(;m&&r&&h!==p;){const g=Eo(m),v=m.getBoundingClientRect(),w=Ut(m),y=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,S=v.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=y,c+=S,p=Bt(m),m=Zc(p)}}return Qs({width:u,height:d,x:l,y:c})}function lA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Nn(r),a=t?qs(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ir(1);const u=ir(0),d=ut(r);if((d||!d&&!i)&&((nr(r)!=="body"||Ei(s))&&(l=Ks(r)),ut(r))){const f=Mr(r);c=Eo(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function cA(e){return Array.from(e.getClientRects())}function xy(e){return Mr(Nn(e)).left+Ks(e).scrollLeft}function uA(e){const t=Nn(e),n=Ks(e),r=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+xy(e);const a=-n.scrollTop;return Ut(r).direction==="rtl"&&(s+=Gt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function dA(e,t){const n=Bt(e),r=Nn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Kc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function fA(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ut(e)?Eo(e):ir(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Ty(e,t,n){let r;if(t==="viewport")r=dA(e,n);else if(t==="document")r=uA(Nn(e));else if(je(t))r=fA(t,n);else{const o=wy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Qs(r)}function Sy(e,t){const n=Fn(e);return n===t||!je(n)||rr(n)?!1:Ut(n).position==="fixed"||Sy(n,t)}function hA(e,t){const n=t.get(e);if(n)return n;let r=or(e,[],!1).filter(a=>je(a)&&nr(a)!=="body"),o=null;const i=Ut(e).position==="fixed";let s=i?Fn(e):e;for(;je(s)&&!rr(s);){const a=Ut(s),l=qc(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ei(s)&&!l&&Sy(e,s))?r=r.filter(u=>u!==s):o=a,s=Fn(s)}return t.set(e,r),r}function pA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?qs(t)?[]:hA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Ty(t,u,o);return c.top=Gt(d.top,c.top),c.right=yn(d.right,c.right),c.bottom=yn(d.bottom,c.bottom),c.left=Gt(d.left,c.left),c},Ty(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mA(e){const{width:t,height:n}=by(e);return{width:t,height:n}}function gA(e,t,n){const r=ut(t),o=Nn(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ir(0);if(r||!r&&!i)if((nr(t)!=="body"||Ei(o))&&(a=Ks(t)),r){const d=Mr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=xy(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function uu(e){return Ut(e).position==="static"}function Ey(e,t){return!ut(e)||Ut(e).position==="fixed"?null:t?t(e):e.offsetParent}function Cy(e,t){const n=Bt(e);if(qs(e))return n;if(!ut(e)){let o=Fn(e);for(;o&&!rr(o);){if(je(o)&&!uu(o))return o;o=Fn(o)}return n}let r=Ey(e,t);for(;r&&xI(r)&&uu(r);)r=Ey(r,t);return r&&rr(r)&&uu(r)&&!qc(r)?n:r||TI(e)||n}const yA=async function(e){const t=this.getOffsetParent||Cy,n=this.getDimensions,r=await n(e.floating);return{reference:gA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vA(e){return Ut(e).direction==="rtl"}const bA={convertOffsetParentRelativeRectToViewportRelativeRect:lA,getDocumentElement:Nn,getClippingRect:pA,getOffsetParent:Cy,getElementRects:yA,getClientRects:cA,getDimensions:mA,getScale:Eo,isElement:je,isRTL:vA};function wA(e,t){let n=null,r;const o=Nn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=wo(u),p=wo(o.clientWidth-(c+d)),m=wo(o.clientHeight-(u+f)),g=wo(c),w={rootMargin:-h+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Gt(0,yn(1,l))||1};let y=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!y)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return s(!0),i}function na(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=cu(e),u=o||i?[...c?or(c):[],...or(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?wA(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?Mr(e):null;l&&g();function g(){const v=Mr(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(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const xA=rA,TA=oA,SA=tA,EA=iA,Py=eA,CA=(e,t,n)=>{const r=new Map,o={platform:bA,...n},i={...o.platform,_c:r};return JI(e,t,{...o,platform:i})};var ra=typeof document<"u"?b.useLayoutEffect:b.useEffect;function oa(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(!oa(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)&&!oa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ky(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oy(e,t){const n=ky(e);return Math.round(t*n)/n}function Iy(e){const t=A.useRef(e);return ra(()=>{t.current=e}),t}function PA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=A.useState(r);oa(f,r)||h(r);const[p,m]=A.useState(null),[g,v]=A.useState(null),w=A.useCallback(L=>{L!==E.current&&(E.current=L,m(L))},[]),y=A.useCallback(L=>{L!==P.current&&(P.current=L,v(L))},[]),S=i||p,T=s||g,E=A.useRef(null),P=A.useRef(null),D=A.useRef(u),_=l!=null,I=Iy(l),V=Iy(o),F=A.useCallback(()=>{if(!E.current||!P.current)return;const L={placement:t,strategy:n,middleware:f};V.current&&(L.platform=V.current),CA(E.current,P.current,L).then(H=>{const Y={...H,isPositioned:!0};$.current&&!oa(D.current,Y)&&(D.current=Y,ef.flushSync(()=>{d(Y)}))})},[f,t,n,V]);ra(()=>{c===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);const $=A.useRef(!1);ra(()=>($.current=!0,()=>{$.current=!1}),[]),ra(()=>{if(S&&(E.current=S),T&&(P.current=T),S&&T){if(I.current)return I.current(S,T,F);F()}},[S,T,F,I,_]);const C=A.useMemo(()=>({reference:E,floating:P,setReference:w,setFloating:y}),[w,y]),O=A.useMemo(()=>({reference:S,floating:T}),[S,T]),M=A.useMemo(()=>{const L={position:n,left:0,top:0};if(!O.floating)return L;const H=Oy(O.floating,u.x),Y=Oy(O.floating,u.y);return a?{...L,transform:"translate("+H+"px, "+Y+"px)",...ky(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:Y}},[n,a,O.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:F,refs:C,elements:O,floatingStyles:M}),[u,F,C,O,M])}const kA=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?Py({element:r.current,padding:o}).fn(n):{}:r?Py({element:r,padding:o}).fn(n):{}}}},ia=(e,t)=>({...xA(e),options:[e,t]}),du=(e,t)=>({...TA(e),options:[e,t]}),fu=(e,t)=>({...SA(e),options:[e,t]}),OA=(e,t)=>({...EA(e),options:[e,t]}),Ay=(e,t)=>({...kA(e),options:[e,t]});function hu(e){return A.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const _y={...A},IA=_y.useInsertionEffect||(e=>e());function Ct(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return IA(()=>{t.current=e}),A.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 pu="ArrowUp",ki="ArrowDown",Co="ArrowLeft",Po="ArrowRight";function sa(e,t,n){return Math.floor(e/t)!==n}function Oi(e,t){return t<0||t>=e.current.length}function mu(e,t){return _t(e,{disabledIndices:t})}function Dy(e,t){return _t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function _t(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&&aa(s,a,o));return a}function AA(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===pu){if(u&&Et(n),c===-1)d=l;else if(d=_t(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||d<0)){const f=c%i,h=l%i,p=l-(h-f);h===f?d=l:d=h>f?p:p-i}Oi(e,d)&&(d=c)}if(n.key===ki&&(u&&Et(n),c===-1?d=a:(d=_t(e,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(d=_t(e,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),Oi(e,d)&&(d=c)),r==="both"){const f=wo(c/i);n.key===Po&&(u&&Et(n),c%i!==i-1?(d=_t(e,{startingIndex:c,disabledIndices:s}),o&&sa(d,i,f)&&(d=_t(e,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(d=_t(e,{startingIndex:c-c%i-1,disabledIndices:s})),sa(d,i,f)&&(d=c)),n.key===Co&&(u&&Et(n),c%i!==0?(d=_t(e,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&sa(d,i,f)&&(d=_t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(d=_t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),sa(d,i,f)&&(d=c));const h=wo(l/i)===f;Oi(e,d)&&(o&&h?d=n.key===Co?l:_t(e,{startingIndex:c-c%i-1,disabledIndices:s}):d=c)}return d}function _A(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function DA(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 MA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function aa(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 My=0;function ar(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(My);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():My=requestAnimationFrame(i)}var Ae=typeof document<"u"?b.useLayoutEffect:b.useEffect;function NA(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 FA(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 Ny=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function LA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Map),s=A.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=A.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ae(()=>{const l=new Map(o);Array.from(l.keys()).sort(NA).forEach((u,d)=>{l.set(u,d)}),FA(o,l)||i(l)},[o]),A.createElement(Ny.Provider,{value:A.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function Fy(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=A.useContext(Ny),[a,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const h=t!==void 0;s.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,i,s,t]);return Ae(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ae(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function ko(){return ko=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},ko.apply(this,arguments)}let Ly=!1,VA=0;const Vy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+VA++;function $A(){const[e,t]=A.useState(()=>Ly?Vy():void 0);return Ae(()=>{e==null&&t(Vy())},[]),A.useEffect(()=>{Ly=!0},[]),e}const Oo=_y.useId||$A;let Ii;process.env.NODE_ENV!=="production"&&(Ii=new Set);function la(){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=Ii)!=null&&e.has(o))){var i;(i=Ii)==null||i.add(o),console.warn(o)}}function RA(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Ii)!=null&&e.has(o))){var i;(i=Ii)==null||i.add(o),console.error(o)}}const $y=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||la("The `ref` prop is required for `FloatingArrow`."));const g=Oo(),[v,w]=A.useState(!1);if(Ae(()=>{if(!o)return;Ut(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const y=c*2,S=y/2,T=s/2*(l/-8+1),E=a/2*l/4,[P,D]=r.split("-"),_=!!f,I=P==="top"||P==="bottom",V=u&&D==="end"?"bottom":"top";let F=u&&D==="end"?"right":"left";u&&v&&(F=D==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",C=(i==null?void 0:i.y)!=null?u||i.y:"",O=f||"M0,0"+(" H"+s)+(" L"+(s-T)+","+(a-E))+(" Q"+s/2+","+a+" "+T+","+(a-E))+" Z",M={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[P];return A.createElement("svg",ko({},m,{"aria-hidden":!0,ref:n,width:_?s:s+y,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[F]:$,[V]:C,[P]:I||_?"100%":"calc(100% - "+y/2+"px)",transform:""+M+(h??""),...p}}),y>0&&A.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:y+(f?0:1),d:O}),A.createElement("path",{stroke:y&&!f?m.fill:"none",d:O}),A.createElement("clipPath",{id:g},A.createElement("rect",{x:-S,y:S*(_?-1:1),width:s+y,height:s})))});function Ry(){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 jy=A.createContext(null),By=A.createContext(null),lr=()=>{var e;return((e=A.useContext(jy))==null?void 0:e.id)||null},cr=()=>A.useContext(By);function jA(e){const t=Oo(),n=cr(),o=lr();return Ae(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function BA(e){const{children:t,id:n}=e,r=lr();return A.createElement(jy.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function zA(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(s=>{n.current=[...n.current,s]},[]),o=A.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=A.useState(()=>Ry())[0];return A.createElement(By.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function ur(e){return"data-floating-ui-"+e}function Pt(e){const t=b.useRef(e);return Ae(()=>{t.current=e}),t}const zy=ur("safe-polygon");function gu(e,t,n){return n&&!Ci(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Wy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=cr(),p=lr(),m=Pt(c),g=Pt(l),v=Pt(n),w=A.useRef(),y=A.useRef(-1),S=A.useRef(),T=A.useRef(-1),E=A.useRef(!0),P=A.useRef(!1),D=A.useRef(()=>{}),_=A.useCallback(()=>{var O;const M=(O=o.current.openEvent)==null?void 0:O.type;return(M==null?void 0:M.includes("mouse"))&&M!=="mousedown"},[o]);A.useEffect(()=>{if(!a)return;function O(M){let{open:L}=M;L||(clearTimeout(y.current),clearTimeout(T.current),E.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[a,i]),A.useEffect(()=>{if(!a||!m.current||!n)return;function O(L){_()&&r(!1,L,"hover")}const M=vt(s.floating).documentElement;return M.addEventListener("mouseleave",O),()=>{M.removeEventListener("mouseleave",O)}},[s.floating,n,r,a,m,_]);const I=A.useCallback(function(O,M,L){M===void 0&&(M=!0),L===void 0&&(L="hover");const H=gu(g.current,"close",w.current);H&&!S.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,O,L),H)):M&&(clearTimeout(y.current),r(!1,O,L))},[g,r]),V=Ct(()=>{D.current(),S.current=void 0}),F=Ct(()=>{if(P.current){const O=vt(s.floating).body;O.style.pointerEvents="",O.removeAttribute(zy),P.current=!1}});A.useEffect(()=>{if(!a)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(k){if(clearTimeout(y.current),E.current=!1,u&&!Ci(w.current)||d>0&&!gu(g.current,"open"))return;const R=gu(g.current,"open",w.current);R?y.current=window.setTimeout(()=>{v.current||r(!0,k,"hover")},R):r(!0,k,"hover")}function L(k){if(O())return;D.current();const R=vt(s.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),S.current=m.current({...o.current.floatingContext,tree:h,x:k.clientX,y:k.clientY,onClose(){F(),V(),I(k,!0,"safe-polygon")}});const oe=S.current;R.addEventListener("mousemove",oe),D.current=()=>{R.removeEventListener("mousemove",oe)};return}(w.current==="touch"?!dt(s.floating,k.relatedTarget):!0)&&I(k)}function H(k){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:k.clientX,y:k.clientY,onClose(){F(),V(),I(k)}})(k))}if(je(s.domReference)){var Y;const k=s.domReference;return n&&k.addEventListener("mouseleave",H),(Y=s.floating)==null||Y.addEventListener("mouseleave",H),f&&k.addEventListener("mousemove",M,{once:!0}),k.addEventListener("mouseenter",M),k.addEventListener("mouseleave",L),()=>{var R;n&&k.removeEventListener("mouseleave",H),(R=s.floating)==null||R.removeEventListener("mouseleave",H),f&&k.removeEventListener("mousemove",M),k.removeEventListener("mouseenter",M),k.removeEventListener("mouseleave",L)}}},[s,a,e,u,d,f,I,V,F,r,n,v,h,g,m,o]),Ae(()=>{var O;if(a&&n&&(O=m.current)!=null&&O.__options.blockPointerEvents&&_()){const L=vt(s.floating).body;L.setAttribute(zy,""),L.style.pointerEvents="none",P.current=!0;const H=s.floating;if(je(s.domReference)&&H){var M;const Y=s.domReference,k=h==null||(M=h.nodesRef.current.find(R=>R.id===p))==null||(M=M.context)==null?void 0:M.elements.floating;return k&&(k.style.pointerEvents=""),Y.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{Y.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,s,h,m,_]),Ae(()=>{n||(w.current=void 0,V(),F())},[n,V,F]),A.useEffect(()=>()=>{V(),clearTimeout(y.current),clearTimeout(T.current),F()},[a,s.domReference,V,F]);const $=A.useMemo(()=>{function O(M){w.current=M.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(M){const{nativeEvent:L}=M;function H(){!E.current&&!v.current&&r(!0,L,"hover")}u&&!Ci(w.current)||n||d===0||(clearTimeout(T.current),w.current==="touch"?H():T.current=window.setTimeout(H,d))}}},[u,r,n,v,d]),C=A.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(O){I(O.nativeEvent,!1)}}),[I]);return A.useMemo(()=>a?{reference:$,floating:C}:{},[a,$,C])}function WA(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 Nr(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 HA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),Nr(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let Io=new WeakMap,ca=new WeakSet,ua={},yu=0;const UA=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Hy=e=>e&&(e.host||Hy(e.parentNode)),GA=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Hy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function YA(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=GA(t,e),a=new Set,l=new Set(s),c=[];ua[o]||(ua[o]=new WeakMap);const u=ua[o];s.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(nr(p)!=="script")if(a.has(p))f(p);else{const m=i?p.getAttribute(i):null,g=m!==null&&m!=="false",v=(Io.get(p)||0)+1,w=(u.get(p)||0)+1;Io.set(p,v),u.set(p,w),c.push(p),v===1&&g&&ca.add(p),w===1&&p.setAttribute(o,""),!g&&i&&p.setAttribute(i,"true")}})}return yu++,()=>{c.forEach(h=>{const p=(Io.get(h)||0)-1,m=(u.get(h)||0)-1;Io.set(h,p),u.set(h,m),p||(!ca.has(h)&&i&&h.removeAttribute(i),ca.delete(h)),m||h.removeAttribute(o)}),yu--,yu||(Io=new WeakMap,Io=new WeakMap,ca=new WeakSet,ua={})}}function Uy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vt(e[0]).body;return YA(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ao=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Gy(e,t){const n=Pi(e,Ao());t==="prev"&&n.reverse();const r=n.indexOf(nn(vt(e)));return n.slice(r+1)[0]}function Yy(){return Gy(document.body,"next")}function qy(){return Gy(document.body,"prev")}function Ai(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!dt(n,r)}function qA(e){Pi(e,Ao()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function KA(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 ZA(e,t,n){const r=e.indexOf(t);function o(s){const a=ur("focus-guard");let l=r+(s?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||dt(n,c));)s?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const vu={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 XA;function Ky(e){e.key==="Tab"&&(e.target,clearTimeout(XA))}const da=A.forwardRef(function(t,n){const[r,o]=A.useState();Ae(()=>(Jc()&&o("button"),document.addEventListener("keydown",Ky),()=>{document.removeEventListener("keydown",Ky)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ur("focus-guard")]:"",style:vu};return A.createElement("span",ko({},t,i))}),Zy=A.createContext(null),Xy=ur("portal");function QA(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Oo(),o=Qy(),[i,s]=A.useState(null),a=A.useRef(null);return Ae(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),Ae(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Xy,""),l.appendChild(c),a.current=c,s(c)},[t,r]),Ae(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!je(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Xy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function _i(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=QA({id:n,root:r}),[s,a]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=!!s&&!s.modal&&s.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&Ai(p)&&(p.type==="focusin"?KA:qA)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),A.createElement(Zy.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i])},f&&i&&A.createElement(da,{"data-type":"outside",ref:l,onFocus:h=>{if(Ai(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=qy()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),f&&i&&A.createElement("span",{"aria-owns":i.id,style:vu}),i&&ef.createPortal(t,i),f&&i&&A.createElement(da,{"data-type":"outside",ref:c,onFocus:h=>{if(Ai(h,i)){var p;(p=d.current)==null||p.focus()}else{const m=Yy()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const Qy=()=>A.useContext(Zy),Jy=20;let Fr=[];function bu(e){Fr=Fr.filter(n=>n.isConnected);let t=e;if(!(!t||nr(t)==="body")){if(!QI(t,Ao())){const n=Pi(t,Ao())[0];n&&(t=n)}Fr.push(t),Fr.length>Jy&&(Fr=Fr.slice(-Jy))}}function ev(){return Fr.slice().reverse().find(e=>e.isConnected)}const JA=A.forwardRef(function(t,n){return A.createElement("button",ko({},t,{type:"button",ref:n,tabIndex:-1,style:vu}))});function fa(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:g,dataRef:v,floatingId:w,elements:{domReference:y,floating:S}}=t,T=typeof s=="number"&&s<0,E=uy(y)&&T,P=UA()?i:!0,D=Pt(o),_=Pt(s),I=Pt(a),V=cr(),F=Qy(),$=A.useRef(null),C=A.useRef(null),O=A.useRef(!1),M=A.useRef(!1),L=A.useRef(-1),H=F!=null,Y=S==null?void 0:S.firstElementChild,k=(Y==null?void 0:Y.id)===w?Y:S,R=Ct(function(G){return G===void 0&&(G=k),G?Pi(G,Ao()):[]}),Z=Ct(G=>{const N=R(G);return D.current.map(j=>y&&j==="reference"?y:k&&j==="floating"?k:N).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function G(j){if(j.key==="Tab"){dt(k,nn(vt(k)))&&R().length===0&&!E&&Et(j);const W=Z(),U=Ln(j);D.current[0]==="reference"&&U===y&&(Et(j),j.shiftKey?ar(W[W.length-1]):ar(W[1])),D.current[1]==="floating"&&U===k&&j.shiftKey&&(Et(j),ar(W[0]))}}const N=vt(k);return N.addEventListener("keydown",G),()=>{N.removeEventListener("keydown",G)}},[r,y,k,c,D,E,R,Z]),A.useEffect(()=>{if(r||!S)return;function G(N){const j=Ln(N),U=R().indexOf(j);U!==-1&&(L.current=U)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,R]),A.useEffect(()=>{if(r||!d)return;function G(){M.current=!0,setTimeout(()=>{M.current=!1})}function N(j){const W=j.relatedTarget;queueMicrotask(()=>{const U=!(dt(y,W)||dt(S,W)||dt(W,S)||dt(F==null?void 0:F.portalNode,W)||W!=null&&W.hasAttribute(ur("focus-guard"))||V&&(Nr(V.nodesRef.current,p).find(z=>{var te,B;return dt((te=z.context)==null?void 0:te.elements.floating,W)||dt((B=z.context)==null?void 0:B.elements.domReference,W)})||WA(V.nodesRef.current,p).find(z=>{var te,B;return((te=z.context)==null?void 0:te.elements.floating)===W||((B=z.context)==null?void 0:B.elements.domReference)===W})));if(l&&U&&nn(vt(k))===vt(k).body){ut(k)&&(k==null||k.focus());const z=L.current,te=R(),B=te[z]||te[te.length-1]||k;ut(B)&&B.focus()}(E||!c)&&W&&U&&!M.current&&W!==ev()&&(O.current=!0,m(!1,j))})}if(S&&ut(y))return y.addEventListener("focusout",N),y.addEventListener("pointerdown",G),S.addEventListener("focusout",N),()=>{y.removeEventListener("focusout",N),y.removeEventListener("pointerdown",G),S.removeEventListener("focusout",N)}},[r,y,S,k,c,p,V,F,m,d,l,R,E]),A.useEffect(()=>{var G;if(r)return;const N=Array.from((F==null||(G=F.portalNode)==null?void 0:G.querySelectorAll("["+ur("portal")+"]"))||[]);if(S){const j=[S,...N,$.current,C.current,D.current.includes("reference")||E?y:null].filter(U=>U!=null),W=c||E?Uy(j,P,!P):Uy(j);return()=>{W()}}},[r,y,S,c,D,F,E,P]),Ae(()=>{if(r||!ut(k))return;const G=vt(k),N=nn(G);queueMicrotask(()=>{const j=Z(k),W=_.current,U=(typeof W=="number"?j[W]:W.current)||k,z=dt(k,N);!T&&!z&&f&&ar(U,{preventScroll:U===k})})},[r,f,k,T,Z,_]),Ae(()=>{if(r||!k)return;let G=!1;const N=vt(k),j=nn(N);let U=v.current.openEvent;const z=h.domReference.current;bu(j);function te(B){let{open:Pe,reason:ot,event:He,nested:it}=B;Pe&&(U=He),ot==="escape-key"&&h.domReference.current&&bu(h.domReference.current),ot==="hover"&&He.type==="mouseleave"&&(O.current=!0),ot==="outside-press"&&(it?(O.current=!1,G=!0):O.current=!(ly(He)||Qc(He)))}return g.on("openchange",te),()=>{g.off("openchange",te);const B=nn(N),Pe=dt(S,B)||V&&Nr(V.nodesRef.current,p).some(de=>{var Ee;return dt((Ee=de.context)==null?void 0:Ee.elements.floating,B)});(Pe||U&&["click","mousedown"].includes(U.type))&&h.domReference.current&&bu(h.domReference.current);const He=z||j,it=Pi(vt(He).body,Ao());queueMicrotask(()=>{let de=ev();!de&&ut(He)&&S&&(de=ZA(it,He,S)),I.current&&!O.current&&ut(de)&&(!(de!==B&&B!==N.body)||Pe)&&de.focus({preventScroll:G})})}},[r,S,k,I,v,h,g,V,p]),Ae(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{F.setFocusManagerState(null)}},[r,F,c,f,m,h,d]),Ae(()=>{if(r||!k||typeof MutationObserver!="function"||T)return;const G=()=>{const j=k.getAttribute("tabindex"),W=R(),U=nn(vt(S)),z=W.indexOf(U);z!==-1&&(L.current=z),D.current.includes("floating")||U!==h.domReference.current&&W.length===0?j!=="0"&&k.setAttribute("tabindex","0"):j!=="-1"&&k.setAttribute("tabindex","-1")};G();const N=new MutationObserver(G);return N.observe(k,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}},[r,S,k,h,D,R,T]);function oe(G){return r||!u||!c?null:A.createElement(JA,{ref:G==="start"?$:C,onClick:N=>m(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&P&&(c?!E:!0)&&(H||c);return A.createElement(A.Fragment,null,J&&A.createElement(da,{"data-type":"inside",ref:F==null?void 0:F.beforeInsideRef,onFocus:G=>{if(c){const j=Z();ar(o[0]==="reference"?j[0]:j[j.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(O.current=!1,Ai(G,F.portalNode)){const j=Yy()||y;j==null||j.focus()}else{var N;(N=F.beforeOutsideRef.current)==null||N.focus()}}}),!E&&oe("start"),n,oe("end"),J&&A.createElement(da,{"data-type":"inside",ref:F==null?void 0:F.afterInsideRef,onFocus:G=>{if(c)ar(Z()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(O.current=!0),Ai(G,F.portalNode)){const j=qy()||y;j==null||j.focus()}else{var N;(N=F.afterOutsideRef.current)==null||N.focus()}}}))}const wu=new Set,e_=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Oo();return Ae(()=>{if(!r)return;wu.add(i);const s=/iP(hone|ad|od)|iOS/.test(Xc()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(g))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{wu.delete(i),wu.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[i,r]),A.createElement("div",ko({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function tv(e){return ut(e.target)&&e.target.tagName==="BUTTON"}function nv(e){return nu(e)}function xu(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=A.useRef(),f=A.useRef(!1),h=A.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Ci(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Ci(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){d.current=void 0,!(p.defaultPrevented||!u||tv(p))&&(p.key===" "&&!nv(i)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||tv(p)||nv(i)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return A.useMemo(()=>s?{reference:h}:{},[s,h])}const t_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},n_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},rv=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 Di(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=cr(),g=Ct(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,w=A.useRef(!1),y=A.useRef(!1),{escapeKey:S,outsidePress:T}=rv(h),{escapeKey:E,outsidePress:P}=rv(p),D=Ct(C=>{var O;if(!n||!s||!a||C.key!=="Escape")return;const M=(O=i.current.floatingContext)==null?void 0:O.nodeId,L=m?Nr(m.nodesRef.current,M):[];if(!S&&(C.stopPropagation(),L.length>0)){let H=!0;if(L.forEach(Y=>{var k;if((k=Y.context)!=null&&k.open&&!Y.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,EI(C)?C.nativeEvent:C,"escape-key")}),_=Ct(C=>{var O;const M=()=>{var L;D(C),(L=Ln(C))==null||L.removeEventListener("keydown",M)};(O=Ln(C))==null||O.addEventListener("keydown",M)}),I=Ct(C=>{var O;const M=w.current;w.current=!1;const L=y.current;if(y.current=!1,c==="click"&&L||M||typeof v=="function"&&!v(C))return;const H=Ln(C),Y="["+ur("inert")+"]",k=vt(o.floating).querySelectorAll(Y);let R=je(H)?H:null;for(;R&&!rr(R);){const G=Fn(R);if(rr(G)||!je(G))break;R=G}if(k.length&&je(H)&&!CI(H)&&!dt(H,o.floating)&&Array.from(k).every(G=>!dt(R,G)))return;if(ut(H)&&$){const G=H.clientWidth>0&&H.scrollWidth>H.clientWidth,N=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let j=N&&C.offsetX>H.clientWidth;if(N&&Ut(H).direction==="rtl"&&(j=C.offsetX<=H.offsetWidth-H.clientWidth),j||G&&C.offsetY>H.clientHeight)return}const Z=(O=i.current.floatingContext)==null?void 0:O.nodeId,oe=m&&Nr(m.nodesRef.current,Z).some(G=>{var N;return tu(C,(N=G.context)==null?void 0:N.elements.floating)});if(tu(C,o.floating)||tu(C,o.domReference)||oe)return;const J=m?Nr(m.nodesRef.current,Z):[];if(J.length>0){let G=!0;if(J.forEach(N=>{var j;if((j=N.context)!=null&&j.open&&!N.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,C,"outside-press")}),V=Ct(C=>{var O;const M=()=>{var L;I(C),(L=Ln(C))==null||L.removeEventListener(c,M)};(O=Ln(C))==null||O.addEventListener(c,M)});A.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function C(L){r(!1,L,"ancestor-scroll")}const O=vt(o.floating);a&&O.addEventListener("keydown",E?_:D,E),v&&O.addEventListener(c,P?V:I,P);let M=[];return f&&(je(o.domReference)&&(M=or(o.domReference)),je(o.floating)&&(M=M.concat(or(o.floating))),!je(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(or(o.reference.contextElement)))),M=M.filter(L=>{var H;return L!==((H=O.defaultView)==null?void 0:H.visualViewport)}),M.forEach(L=>{L.addEventListener("scroll",C,{passive:!0})}),()=>{a&&O.removeEventListener("keydown",E?_:D,E),v&&O.removeEventListener(c,P?V:I,P),M.forEach(L=>{L.removeEventListener("scroll",C)})}},[i,o,a,v,c,n,r,f,s,S,T,D,E,_,I,P,V]),A.useEffect(()=>{w.current=!1},[v,c]);const F=A.useMemo(()=>({onKeyDown:D,[t_[d]]:C=>{u&&r(!1,C.nativeEvent,"reference-press")}}),[D,r,u,d]),$=A.useMemo(()=>({onKeyDown:D,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[n_[c]]:()=>{w.current=!0}}),[D,c]);return A.useMemo(()=>s?{reference:F,floating:$}:{},[s,F,$])}function r_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Oo(),i=A.useRef({}),[s]=A.useState(()=>Ry()),a=lr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!je(h)&&RA("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=A.useState(r.reference),u=Ct((h,p,m)=>{i.current.openEvent=h?p:void 0,s.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Mi(e){e===void 0&&(e={});const{nodeId:t}=e,n=r_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=A.useState(null),[a,l]=A.useState(null),u=(o==null?void 0:o.reference)||i,d=A.useRef(null),f=cr();Ae(()=>{u&&(d.current=u)},[u]);const h=PA({...e,elements:{...o,...a&&{reference:a}}}),p=A.useCallback(y=>{const S=je(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(S),h.refs.setReference(S)},[h.refs]),m=A.useCallback(y=>{(je(y)||y===null)&&(d.current=y,s(y)),(je(h.refs.reference.current)||h.refs.reference.current===null||y!==null&&!je(y))&&h.refs.setReference(y)},[h.refs]),g=A.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=A.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=A.useMemo(()=>({...h,...r,refs:g,elements:v,nodeId:t}),[h,g,v,t,r]);return Ae(()=>{r.dataRef.current.floatingContext=w;const y=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);y&&(y.context=w)}),A.useMemo(()=>({...h,context:w,refs:g,elements:v}),[h,g,v,w])}function o_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=A.useRef(!1),u=A.useRef(),d=A.useRef(!0);A.useEffect(()=>{if(!a)return;const h=Bt(s.domReference);function p(){!n&&ut(s.domReference)&&s.domReference===nn(vt(s.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),A.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),A.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=A.useMemo(()=>({onPointerDown(h){Qc(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Ln(h.nativeEvent);if(l&&je(p))try{if(Jc()&&cy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!nu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,g=je(p)&&p.hasAttribute(ur("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const w=nn(s.domReference?s.domReference.ownerDocument:document);!p&&w===s.domReference||dt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,w)||dt(s.domReference,w)||g||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return A.useMemo(()=>a?{reference:f}:{},[a,f])}const ov="active",iv="selected";function Tu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ov]:s,[iv]:a,...l}=e;i=l}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(l=>{let[c,u]=l;if(!(o&&[ov,iv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(g=>g(...p)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function Ni(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=A.useCallback(a=>Tu(a,e,"reference"),t),i=A.useCallback(a=>Tu(a,e,"floating"),n),s=A.useCallback(a=>Tu(a,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let sv=!1;function ha(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function av(e,t){return ha(t,e===pu||e===ki,e===Co||e===Po)}function Su(e,t,n){return ha(t,e===ki,n?e===Co:e===Po)||e==="Enter"||e===" "||e===""}function i_(e,t,n){return ha(t,n?e===Co:e===Po,e===ki)}function lv(e,t,n){return ha(t,n?e===Po:e===Co,e===pu)}function cv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:P,dense:D=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||la("`useListNavigation` looping must be enabled to allow escaping."),p||la("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&S>1&&la("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=lr(),I=cr(),V=Ct(a),F=A.useRef(m),$=A.useRef(c??-1),C=A.useRef(null),O=A.useRef(!0),M=A.useRef(V),L=A.useRef(!!o.floating),H=A.useRef(n),Y=A.useRef(!1),k=A.useRef(!1),R=Pt(w),Z=Pt(n),oe=Pt(T),J=Pt(o.floating),G=Pt(c),[N,j]=A.useState(),[W,U]=A.useState(),z=Ct(function(de,Ee,ce){ce===void 0&&(ce=!1);function Oe(Ie){p?(j(Ie.id),I==null||I.events.emit("virtualfocus",Ie),E&&(E.current=Ie)):ar(Ie,{preventScroll:!0,sync:cy()&&Jc()?sv||Y.current:!1})}const ht=de.current[Ee.current];ht&&Oe(ht),requestAnimationFrame(()=>{const Ie=de.current[Ee.current]||ht;if(!Ie)return;ht||Oe(Ie);const pt=oe.current;pt&&B&&(ce||!O.current)&&(Ie.scrollIntoView==null||Ie.scrollIntoView(typeof pt=="boolean"?{block:"nearest",inline:"nearest"}:pt))})});Ae(()=>{document.createElement("div").focus({get preventScroll(){return sv=!0,!1}})},[]),Ae(()=>{l&&(n&&o.floating?F.current&&c!=null&&(k.current=!0,$.current=c,V(c)):L.current&&($.current=-1,M.current(null)))},[l,n,o.floating,c,V]),Ae(()=>{if(l&&n&&o.floating)if(s==null){if(Y.current=!1,G.current!=null)return;if(L.current&&($.current=-1,z(i,$)),(!H.current||!L.current)&&F.current&&(C.current!=null||F.current===!0&&C.current==null)){let de=0;const Ee=()=>{i.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ee),de++):($.current=C.current==null||Su(C.current,y,h)||f?mu(i,R.current):Dy(i,R.current),C.current=null,V($.current))};Ee()}}else Oi(i,s)||($.current=s,z(i,$,k.current),k.current=!1)},[l,n,o.floating,s,G,f,i,y,h,V,z,R]),Ae(()=>{var de;if(!l||o.floating||!I||p||!L.current)return;const Ee=I.nodesRef.current,ce=(de=Ee.find(Ie=>Ie.id===_))==null||(de=de.context)==null?void 0:de.elements.floating,Oe=nn(vt(o.floating)),ht=Ee.some(Ie=>Ie.context&&dt(Ie.context.elements.floating,Oe));ce&&!ht&&O.current&&ce.focus({preventScroll:!0})},[l,o.floating,I,_,p]),Ae(()=>{if(!l||!I||!p||_)return;function de(Ee){U(Ee.id),E&&(E.current=Ee)}return I.events.on("virtualfocus",de),()=>{I.events.off("virtualfocus",de)}},[l,I,p,_,E]),Ae(()=>{M.current=V,L.current=!!o.floating}),Ae(()=>{n||(C.current=null)},[n]),Ae(()=>{H.current=n},[n]);const te=s!=null,B=A.useMemo(()=>{function de(ce){if(!n)return;const Oe=i.current.indexOf(ce);Oe!==-1&&V(Oe)}return{onFocus(ce){let{currentTarget:Oe}=ce;de(Oe)},onClick:ce=>{let{currentTarget:Oe}=ce;return Oe.focus({preventScroll:!0})},...g&&{onMouseMove(ce){let{currentTarget:Oe}=ce;de(Oe)},onPointerLeave(ce){let{pointerType:Oe}=ce;!O.current||Oe==="touch"||($.current=-1,z(i,$),V(null),p||ar(J.current,{preventScroll:!0}))}}}},[n,J,z,g,i,V,p]),Pe=Ct(de=>{if(O.current=!1,Y.current=!0,!Z.current&&de.currentTarget===J.current)return;if(f&&lv(de.key,y,h)){Et(de),r(!1,de.nativeEvent,"list-navigation"),ut(o.domReference)&&!p&&o.domReference.focus();return}const Ee=$.current,ce=mu(i,w),Oe=Dy(i,w);if(de.key==="Home"&&(Et(de),$.current=ce,V($.current)),de.key==="End"&&(Et(de),$.current=Oe,V($.current)),S>1){const ht=P||Array.from({length:i.current.length},()=>({width:1,height:1})),Ie=_A(ht,S,D),pt=Ie.findIndex(ae=>ae!=null&&!aa(i.current,ae,w)),Q=Ie.reduce((ae,_e,Ke)=>_e!=null&&!aa(i.current,_e,w)?Ke:ae,-1);if($.current=Ie[AA({current:Ie.map(ae=>ae!=null?i.current[ae]:null)},{event:de,orientation:y,loop:d,cols:S,disabledIndices:MA([...w||i.current.map((ae,_e)=>aa(i.current,_e)?_e:void 0),void 0],Ie),minIndex:pt,maxIndex:Q,prevIndex:DA($.current>Oe?ce:$.current,ht,Ie,S,de.key===ki?"bl":de.key===Po?"tr":"tl"),stopEvent:!0})],V($.current),y==="both")return}if(av(de.key,y)){if(Et(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){$.current=Su(de.key,y,h)?ce:Oe,V($.current);return}Su(de.key,y,h)?d?$.current=Ee>=Oe?u&&Ee!==i.current.length?-1:ce:_t(i,{startingIndex:Ee,disabledIndices:w}):$.current=Math.min(Oe,_t(i,{startingIndex:Ee,disabledIndices:w})):d?$.current=Ee<=ce?u&&Ee!==-1?i.current.length:Oe:_t(i,{startingIndex:Ee,decrement:!0,disabledIndices:w}):$.current=Math.max(ce,_t(i,{startingIndex:Ee,decrement:!0,disabledIndices:w})),Oi(i,$.current)?V(null):V($.current)}}),ot=A.useMemo(()=>p&&n&&te&&{"aria-activedescendant":W||N},[p,n,te,W,N]),He=A.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!uy(o.domReference)&&ot,onKeyDown:Pe,onPointerMove(){O.current=!0}}),[ot,Pe,o.domReference,y]),it=A.useMemo(()=>{function de(ce){m==="auto"&&ly(ce.nativeEvent)&&(F.current=!0)}function Ee(ce){F.current=m,m==="auto"&&Qc(ce.nativeEvent)&&(F.current=!0)}return{...ot,onKeyDown(ce){O.current=!1;const Oe=ce.key.indexOf("Arrow")===0,ht=i_(ce.key,y,h),Ie=lv(ce.key,y,h),pt=av(ce.key,y),Q=(f?ht:pt)||ce.key==="Enter"||ce.key.trim()==="";if(p&&n){const kt=I==null?void 0:I.nodesRef.current.find(Vt=>Vt.parentId==null),Nt=I&&kt?HA(I.nodesRef.current,kt.id):null;if(Oe&&Nt&&E){const Vt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ht||Ie){var ae,_e;const Gr=((ae=Nt.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,qo=Ie&&!Gr?(_e=Nt.context)==null?void 0:_e.elements.domReference:ht?i.current.find(Ko=>(Ko==null?void 0:Ko.id)===N):null;qo&&(Et(ce),qo.dispatchEvent(Vt),U(void 0))}if(pt&&Nt.context&&Nt.context.open&&Nt.parentId&&ce.currentTarget!==Nt.context.elements.domReference){var Ke;Et(ce),(Ke=Nt.context.elements.domReference)==null||Ke.dispatchEvent(Vt);return}}return Pe(ce)}if(!(!n&&!v&&Oe)){if(Q&&(C.current=f&&pt?null:ce.key),f){ht&&(Et(ce),n?($.current=mu(i,R.current),V($.current)):r(!0,ce.nativeEvent,"list-navigation"));return}pt&&(c!=null&&($.current=c),Et(ce),!n&&v?r(!0,ce.nativeEvent,"list-navigation"):Pe(ce),n&&V($.current))}},onFocus(){n&&!p&&V(null)},onPointerDown:Ee,onMouseDown:de,onClick:de}},[N,ot,Pe,R,m,i,f,V,r,n,v,y,h,c,I,p,E]);return A.useMemo(()=>l?{reference:it,floating:He,item:B}:{},[l,it,He,B])}const s_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Fi(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=s_.get(s))!=null?n:s,l=Oo(),u=lr()!=null,d=A.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:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),f=A.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),h=A.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 A.useMemo(()=>i?{reference:d,floating:f,item:h}:{},[i,d,f,h])}const uv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function _o(e,t){return typeof e=="function"?e(t):e}function a_(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function l_(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=A.useState("unmounted"),c=a_(n,s);return!c&&a==="close"&&l("unmounted"),Ae(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function c_(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=A.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[h,p]=A.useState(()=>({..._o(i,c),..._o(n,c)})),{isMounted:m,status:g}=l_(e,{duration:s}),v=Pt(n),w=Pt(r),y=Pt(o),S=Pt(i);return Ae(()=>{const T=_o(v.current,c),E=_o(y.current,c),P=_o(S.current,c),D=_o(w.current,c)||Object.keys(T).reduce((_,I)=>(_[I]="",_),{});if(g==="initial"&&p(_=>({transitionProperty:_.transitionProperty,...P,...T})),g==="open"&&p({transitionProperty:Object.keys(D).map(uv).join(","),transitionDuration:d+"ms",...P,...D}),g==="close"){const _=E||T;p({transitionProperty:Object.keys(_).map(uv).join(","),transitionDuration:f+"ms",...P,..._})}},[f,y,v,w,S,d,g,c]),{isMounted:m,styles:h}}function u_(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=A.useRef(),m=A.useRef(""),g=A.useRef((n=h??s)!=null?n:-1),v=A.useRef(null),w=Ct(a),y=Ct(l),S=Pt(u),T=Pt(f);Ae(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),Ae(()=>{if(r&&m.current===""){var I;g.current=(I=h??s)!=null?I:-1}},[r,h,s]);const E=Ct(I=>{I?o.current.typing||(o.current.typing=I,y(I)):o.current.typing&&(o.current.typing=I,y(I))}),P=Ct(I=>{function V(M,L,H){const Y=S.current?S.current(L,H):L.find(k=>(k==null?void 0:k.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return Y?M.indexOf(Y):-1}const F=i.current;if(m.current.length>0&&m.current[0]!==" "&&(V(F,F,m.current)===-1?E(!1):I.key===" "&&Et(I)),F==null||T.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(Et(I),E(!0)),F.every(M=>{var L,H;return M?((L=M[0])==null?void 0:L.toLocaleLowerCase())!==((H=M[1])==null?void 0:H.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)},d);const C=g.current,O=V(F,[...F.slice((C||0)+1),...F.slice(0,(C||0)+1)],m.current);O!==-1?(w(O),v.current=O):I.key!==" "&&(m.current="",E(!1))}),D=A.useMemo(()=>({onKeyDown:P}),[P]),_=A.useMemo(()=>({onKeyDown:P,onKeyUp(I){I.key===" "&&E(!1)}}),[P,E]);return A.useMemo(()=>c?{reference:D,floating:_}:{},[c,D,_])}function dv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function d_(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function f_(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(s===null||a===null||p===0)return s=d,a=f,l=h,null;const m=d-s,g=f-a,w=Math.sqrt(m*m+g*g)/p;return s=d,a=f,l=h,w}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:g,nodeId:v,tree:w}=d;return function(S){function T(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:P}=S,D=[E,P],_=Ln(S),I=S.type==="mouseleave",V=dt(m.floating,_),F=dt(m.domReference,_),$=m.domReference.getBoundingClientRect(),C=m.floating.getBoundingClientRect(),O=p.split("-")[0],M=f>C.right-C.width/2,L=h>C.bottom-C.height/2,H=d_(D,$),Y=C.width>$.width,k=C.height>$.height,R=(Y?$:C).left,Z=(Y?$:C).right,oe=(k?$:C).top,J=(k?$:C).bottom;if(V&&(i=!0,!I))return;if(F&&(i=!1),F&&!I){i=!0;return}if(I&&je(S.relatedTarget)&&dt(m.floating,S.relatedTarget)||w&&Nr(w.nodesRef.current,v).some(j=>{let{context:W}=j;return W==null?void 0:W.open}))return;if(O==="top"&&h>=$.bottom-1||O==="bottom"&&h<=$.top+1||O==="left"&&f>=$.right-1||O==="right"&&f<=$.left+1)return T();let G=[];switch(O){case"top":G=[[R,$.top+1],[R,C.bottom-1],[Z,C.bottom-1],[Z,$.top+1]];break;case"bottom":G=[[R,C.top+1],[R,$.bottom-1],[Z,$.bottom-1],[Z,C.top+1]];break;case"left":G=[[C.right-1,J],[C.right-1,oe],[$.left+1,oe],[$.left+1,J]];break;case"right":G=[[$.right-1,J],[$.right-1,oe],[C.left+1,oe],[C.left+1,J]];break}function N(j){let[W,U]=j;switch(O){case"top":{const z=[Y?W+t/2:M?W+t*4:W-t*4,U+t+1],te=[Y?W-t/2:M?W+t*4:W-t*4,U+t+1],B=[[C.left,M||Y?C.bottom-t:C.top],[C.right,M?Y?C.bottom-t:C.top:C.bottom-t]];return[z,te,...B]}case"bottom":{const z=[Y?W+t/2:M?W+t*4:W-t*4,U-t],te=[Y?W-t/2:M?W+t*4:W-t*4,U-t],B=[[C.left,M||Y?C.top+t:C.bottom],[C.right,M?Y?C.top+t:C.bottom:C.top+t]];return[z,te,...B]}case"left":{const z=[W+t+1,k?U+t/2:L?U+t*4:U-t*4],te=[W+t+1,k?U-t/2:L?U+t*4:U-t*4];return[...[[L||k?C.right-t:C.left,C.top],[L?k?C.right-t:C.left:C.right-t,C.bottom]],z,te]}case"right":{const z=[W-t,k?U+t/2:L?U+t*4:U-t*4],te=[W-t,k?U-t/2:L?U+t*4:U-t*4],B=[[L||k?C.left+t:C.right,C.top],[L?k?C.left+t:C.right:C.left+t,C.bottom]];return[z,te,...B]}}}if(!dv([E,P],G)){if(i&&!H)return T();if(!I&&r){const j=c(S.clientX,S.clientY);if(j!==null&&j<.1)return T()}dv([E,P],N([f,h]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}function h_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function p_(...e){return t=>e.forEach(n=>h_(n,t))}var Eu=A.forwardRef((e,t)=>{const{children:n,...r}=e,o=A.Children.toArray(n),i=o.find(g_);if(i){const s=i.props.children,a=o.map(l=>l===i?A.Children.count(s)>1?A.Children.only(null):A.isValidElement(s)?s.props.children:null:l);return x.jsx(Cu,{...r,ref:t,children:A.isValidElement(s)?A.cloneElement(s,void 0,a):null})}return x.jsx(Cu,{...r,ref:t,children:n})});Eu.displayName="Slot";var Cu=A.forwardRef((e,t)=>{const{children:n,...r}=e;if(A.isValidElement(n)){const o=v_(n);return A.cloneElement(n,{...y_(r,n.props),ref:t?p_(t,o):o})}return A.Children.count(n)>1?A.Children.only(null):null});Cu.displayName="SlotClone";var m_=({children:e})=>x.jsx(x.Fragment,{children:e});function g_(e){return A.isValidElement(e)&&e.type===m_}function y_(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 v_(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)}const pa=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),fv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),hv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},pv=(e,t)=>{const n=fv(t,hv.basic,e)||fv(t,hv.extend,e);return n===void 0||n===e?void 0:n},ma=()=>typeof window>"u",Pu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),b_=(e,t)=>ma()?t:window.matchMedia(e).matches,w_=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(b_(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},rn="600ms",x_={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:rn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:rn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:rn}},T_={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:rn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:rn}},ku={drawer:e=>e==="left"?x_:T_,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:rn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:rn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:rn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:rn},enter:{opacity:1,scale:[1.05,1],animationDuration:rn},exit:{opacity:0,scale:.97,animationDuration:rn}}},S_=as("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"}}),E_={top:0,left:0,right:0,bottom:-1},C_=e=>e*.62,P_=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),l=C_(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(Ht.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:E_,whileDrag:{cursor:"grabbing"},className:Xe("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ou={drawer:"right",sheet:"none",dialog:"none"},mv=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),l=w_("(min-width: 48rem)"),c=e!=="dialog",u=l?e==="drawer"?i.position:Ou[e]:r?Ou[e]:Ou.sheet,d=l||r?ku[e]:ku.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=Mi({open:i.open,onOpenChange:i.onChange}),g=xu(m),v=Fi(m),w=Di(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:S}=Ni([g,v,w]),T=i.trigger,E=Or(void 0),P=()=>i.onChange(!1);return x.jsxs(b.Fragment,{children:[i.trigger?x.jsx(b.Fragment,{children:i.asChild?x.jsx(Eu,{ref:p.setReference,...y(),children:T}):x.jsx("button",{ref:p.setReference,...y(),type:"button",children:T})}):null,x.jsx(_i,{children:x.jsx(Bs,{presenceAffectsLayout:!0,children:i.open?x.jsx(e_,{lockScroll:!0,className:`z-overlay inset-0 isolate h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:x.jsx(fa,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(Ht.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:S_({position:u,type:h}),exit:"exit",initial:"initial",ref:p.setFloating,style:h==="drawer"?{width:E}:{height:E},variants:f,...S(),children:[i.title?x.jsx("header",{className:"relative w-full",children:i.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:i.title}):null}):null,x.jsx("section",{className:"py-1 flex-1 overflow-y-auto px-8",children:i.children}),i.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:i.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1",children:x.jsx("button",{type:"button",onClick:P,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(og,{})})}):null,c&&t?x.jsx(P_,{onChange:i.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})}):null})})]})},gv=b.createContext(""),k_=e=>{var o;const[t,n]=b.useState(!1),r=e.items.find(i=>i.props.id===e.active);return x.jsxs("div",{className:"my-4 px-8 flex min-w-full text-center lg:hidden",children:[x.jsx(xr,{className:"min-w-full",onClick:()=>n(!0),children:(o=r==null?void 0:r.props)==null?void 0:o.title}),x.jsx(mv,{closable:!0,forceType:!0,onChange:n,open:t,type:"dialog",children:x.jsx("ul",{className:"mt-4 space-y-4",children:e.items.map(i=>{const s=i.props,a=()=>{e.setActive(s.id),n(!1)};return x.jsx("li",{className:"min-w-full",children:x.jsx(xr,{className:"w-full",onClick:a,theme:s.id===e.active?"primary":"secondary",children:s.title})},s.id)})})})]})},O_=e=>{const[t,n]=oy(e.active),r=Or(0),o=Or(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useEffect(()=>{const c=i.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},d=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",d);let f=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(e.active===""&&h!==""&&(f=c.querySelector(`li[data-id=${h}]`),n(h)),f===null){f=c.querySelector("li[data-id]");const p=f.getAttribute("data-id")||"";n(p)}return u(f),()=>window.removeEventListener("resize",d)},[]),b.useEffect(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=b.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return x.jsx(gv.Provider,{value:t,children:x.jsx(ry,{container:"pt-0",className:e.className,header:x.jsxs("header",{ref:i,className:"relative mb-2 border-b border-card-border",children:[x.jsx(Ht.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"duration-300 absolute bottom-0 hidden h-0.5 w-28 bg-primary transition-all lg:block"}),x.jsxs("nav",{children:[x.jsx(k_,{setActive:n,items:a,active:t}),x.jsx("ul",{className:"hidden justify-between divide-x divide-card-border overflow-x-auto md:justify-start lg:flex",children:a.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full data-[active=true]:text-primary md:w-auto",children:x.jsx(s,{"data-id":u.id,onClick:l,"aria-current":"page",className:"block w-full whitespace-nowrap px-10 py-4 font-medium",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})]})]}),children:e.children})})},I_=()=>b.useContext(gv),A_=e=>{const t=I_();return x.jsx(b.Fragment,{children:e.id===t?e.children:null})},Do=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[ia(10),fu({fallbackAxisSideDirection:"end"}),du(),Ay({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Mi({open:n,middleware:i,transform:!0,whileElementsMounted:na,onOpenChange:(p,m)=>{var v;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=xu(l),u=Di(l),d=Fi(l),{getReferenceProps:f,getFloatingProps:h}=Ni([c,u,d]);return x.jsxs(b.Fragment,{children:[x.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(_i,{id:`${t}-portal`,children:x.jsx(fa,{restoreFocus:e.restoreFocus??!0,returnFocus:e.restoreFocus??!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:s.setFloating,style:a,"aria-labelledby":t,...h(),children:[x.jsx($y,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-wide text-left",children:e.title})}),e.children]})})})]})},yv=300,vv=({children:e,enabled:t,as:n,title:r,...o})=>{const[i,s]=b.useState(!1),a=b.useRef(null),l=n||"span",{refs:c,floatingStyles:u,context:d}=Mi({open:i,onOpenChange:s,whileElementsMounted:na,transform:!0,middleware:[ia(5),fu({fallbackAxisSideDirection:"start"}),du(),Ay({element:a,padding:5})]}),f=Wy(d,{move:!0,delay:{open:yv}}),h=o_(d,{enabled:t}),p=Di(d,{enabled:t}),m=Fi(d,{role:"tooltip",enabled:t}),{getReferenceProps:g,getFloatingProps:v}=Ni([f,h,p,m]);return x.jsxs(b.Fragment,{children:[x.jsx(l,{ref:c.setReference,...g(o),children:r}),x.jsx(_i,{children:i&&x.jsxs(no,{...v(),ref:c.setFloating,style:u,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground",children:[x.jsx($y,{ref:a,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class ga{static getDescendantProperty(t,n,r=[]){let o,i,s,a,l,c;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(l=0,c=a.length;l<c;l++)ga.getDescendantProperty(a[l],i,r);else i&&ga.getDescendantProperty(a,i,r)}else r.push(t);return r}}class Mo{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=Mo.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=ga.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=Mo.isMatch(s[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Mo.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 Mo.indexesOfFirstLetter(t,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(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 bv=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},Iu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",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=>x.jsxs(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]})},wv=b.createContext({translations:Iu}),__=e=>{const t=b.useMemo(()=>({translations:{...Iu,...e.map}}),[e.map]);return x.jsx(wv.Provider,{value:t,children:e.children})},Qt=()=>{const e=b.useContext(wv);return e?e.translations:Iu},xv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("div",{className:Xe("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(vv,{title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(rg,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?x.jsxs(b.Fragment,{children:[x.jsx(ng,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(CP,{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]}),ya=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,placeholder:m,hideLeft:g,required:v})=>{const w=d??h,y=Qt(),S=e??y.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!i,className:Xe("group inline-flex w-full gap-1.5",r),children:[x.jsxs("label",{form:u,htmlFor:w,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-hover:border-primary group-error:text-danger",children:[!g&&!n?x.jsx(xv,{info:a,hideLeft:g,reportStatus:!0,title:p,placeholder:m,children:S||n?x.jsxs(b.Fragment,{children:[v?null:x.jsx("span",{className:"text-opacity-70",children:S}),n?x.jsx(b.Fragment,{children:n}):null]}):null}):null,x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger ${f} focus:ring-2 focus:ring-inset focus:ring-primary`,children:[t?x.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?x.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:s}):null]})]}),x.jsx("p",{className:"hidden text-xs empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:block group-error:block group-error:text-danger",children:c}),x.jsx("p",{className:"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})]})},Tv=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>x.jsx("li",{...o,ref:i,role:"option","aria-selected":e,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":e,className:`w-full cursor-pointer p-2 text-left ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),D_={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},M_={caseSensitive:!1,sort:!1},N_=[],F_=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:f=!1,...h},p)=>{const m=Qt(),g=b.useRef(null),[v,w]=b.useState(!1),[y,S]=b.useState(""),[T,E]=b.useState(h.value??h.defaultValue??""),[P,D]=b.useState(h.value??h.defaultValue??""),[_,I]=b.useState(null),V=b.useRef(N_),F=bv(_),$=t&&y!==""?[{value:y,label:y,"data-dynamic":"true"},...e]:e,C=new Mo($,["value","label"],M_).search(y),O=t?void 0:`^(${e.map(z=>`${Pu(z.value)}${z.label?"|"+Pu(z.label):""}`).join("|")})$`;b.useEffect(()=>{const z=Y.reference.current;if(z)return vs(z)},[]),b.useEffect(()=>{if(h.value){const z=e.find(te=>te.value===h.value);E((z==null?void 0:z.label)??h.value)}},[h.value]);const{x:M,y:L,strategy:H,refs:Y,context:k}=Mi({open:v,transform:!0,onOpenChange:w,whileElementsMounted:na,middleware:[ia(4),OA({padding:10,apply(z){Object.assign(z.elements.floating.style,{width:`${z.rects.reference.width}px`,maxHeight:`${Math.min(480,z.availableHeight)}px`})}})]}),R=c_(k,D_),{getReferenceProps:Z,getFloatingProps:oe,getItemProps:J}=Ni([Fi(k,{role:"listbox"}),Di(k),cv(k,{listRef:V,loop:!0,activeIndex:_,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:_,virtual:!0,onNavigate:z=>{const te=C.length-1;if(z===null&&F===0)return I(te);if(z===null&&F===te)return I(0);const B=z??F??null;return B===null?void 0:I(B)}})]),G=z=>{var B,Pe;E(z.value),(B=Y.reference.current)==null||B.setAttribute("data-value",z.value),D(z.label??"");const te=ys(g.current,z.value);te&&((Pe=h.onChange)==null||Pe.call(h,te)),w(!1),S("")},N=z=>{var B;const te=z.target.value;return S(te),!v&&te===""?w(!0):(z.target.name=h.name||"",te?w(!0):(B=h.onChange)==null?void 0:B.call(h,z))},j=()=>{w(!0),S("")},W=()=>{var z;S(""),E(""),(z=Y.reference.current)==null||z.setAttribute("data-value",""),D(""),ys(Y.reference.current),w(!1)},U=h.id||h.name;return x.jsxs(ya,{...h,container:Xe("group inline-block w-full",a),error:d,feedback:n,form:h.form,hideLeft:l,id:h.name||h.id,interactive:o,labelClassName:r,left:u,name:h.name,optionalText:s,placeholder:h.placeholder,required:!0,rightLabel:i,title:h.title,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[x.jsx(tg,{size:20}),x.jsx("span",{className:"sr-only",children:m.inputCaretDown})]}),T?x.jsx("button",{type:"button",onClick:W,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{...Z({...h,onChange:N,onFocus:j,pattern:O,ref:Y.setReference,name:`${U}-shadow`,id:`${U}-shadow`,onClick:z=>z.currentTarget.focus(),onKeyDown(z){if(z.key==="Escape")return z.currentTarget.blur(),w(!1);if(z.key==="Enter"){if(_!==null&&C[_])return z.preventDefault(),G(C[_]);if(C.length===1)return z.preventDefault(),G(C[0])}}}),"data-value":T,"data-error":!!d,"data-name":U,"data-target":U,required:f,value:v?y:P||T,"aria-autocomplete":"list",autoComplete:"off",className:Xe("input placeholder-input-mask group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-base text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",c||y?"pe-12":"",u?"ps-8":"",h.className)}),x.jsx("input",{id:U,name:U,type:"hidden","data-origin":U,ref:p,required:f,defaultValue:h.value||T||void 0}),x.jsx(_i,{preserveTabOrder:!0,children:v?x.jsx(fa,{guards:!0,returnFocus:!1,context:k,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...oe({ref:Y.setFloating,style:{position:H,left:M??0,top:L??0,...R.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 bg-floating-background p-0 text-foreground shadow-floating",children:C.map((z,te)=>b.createElement(Tv,{...J({onClick:()=>G(z),ref:B=>void(V.current[te]=B),selected:_===te,active:T===z.value}),key:`${z.value}-option`,option:z,selected:_===te,active:T===z.value}))})}):null})]})}),Sv=b.forwardRef(({children:e,error:t,className:n="",size:r,container:o,...i},s)=>x.jsxs("label",{"data-disabled":i.disabled,"aria-disabled":i.disabled,className:Xe("group flex flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed w-fit",o),children:[x.jsx("input",{...i,ref:s,type:"checkbox",className:Xe("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",n)}),e,x.jsx("span",{className:"min-w-full flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:t})]})),Li=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,...h},p)=>{const m=h.id??h.name,g=b.useRef(null);return b.useEffect(()=>{if(g.current===null)return;const v=g.current,w=vs(g.current),y=S=>{const T=S;if(T.key==="Enter"&&v.enterKeyHint==="next"){const E=v.getAttribute("data-next");if(E){const P=document.getElementById(E);if(P)return P.focus(),void T.preventDefault()}}};return v.addEventListener("keydown",y),()=>{w(),v.removeEventListener("keydown",y)}},[]),x.jsx(ya,{info:n,container:Xe("group inline-block w-full",l),error:f,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:s,interactive:i,form:h.form,id:h.name||h.id,name:h.name,labelClassName:r,title:h.title,placeholder:h.placeholder,required:h.required,children:x.jsx(jg,{...h,type:e,"data-next":o,ref:Ol(p,g),id:m,name:m,className:Xe("input placeholder-input-mask group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",u?"pe-4":"",d?"ps-4":"",h.className)})})}),Ev=new Date(1970,11,31),Au={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Cv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},L_={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")},V_=b.forwardRef(({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:i,...s},a)=>{const l=b.useId(),c=Qt(),u=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[d,f]=b.useState(e||void 0),[h,p]=b.useState(!1),m=u.formatToParts(Ev).flatMap(E=>kn.keyof(Au,E.type)?Au[E.type](E.value):[]),g=u.formatToParts(Ev).reduce((E,P)=>E+(kn.keyof(Cv,P.type)?Cv[P.type](P.value):""),""),[v,w]=b.useState(d?u.formatToParts(d).reduce((E,P)=>E+(kn.keyof(Au,P.type)?L_[P.type](d,P.value):""),""):""),y=E=>{const P=E.target.value;if(w(P),m.length===P.length&&m.every((_,I)=>{const V=P.charAt(I);return typeof _=="string"?V===_:_.test(V)})){const _=yo(NO(P,g,new Date));return f(_),o==null?void 0:o(_)}return f(void 0),o==null?void 0:o(void 0)},S=E=>(f(E),o==null||o(E),w(E?Vk(E,g):"")),T=d==null?void 0:d.toISOString();return x.jsx(Li,{...s,mask:m,value:v,"data-value":T,"data-target":s.name,className:"uppercase",formNoValidate:!h,placeholder:g,onChange:y,required:s.required??!0,error:h?void 0:s.error,name:void 0,id:void 0,right:x.jsxs(b.Fragment,{children:[x.jsx("input",{"data-origin":s.name,hidden:!0,type:"date",id:s.name,ref:a,name:s.name,defaultValue:T}),x.jsx(Do,{open:h,restoreFocus:!0,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(TP,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(ny,{...s,locale:t,date:d,onChange:S,markToday:i,disabledDate:n,autoFocusToday:r})})]})})}),$_=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],R_=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],j_=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],B_=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Pv=(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 kv(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?B_:j_:t.binary?R_:$_,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=Pv(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 l=Pv(Number(e),t.locale,s),c=n[a];return i+l+r+c}var _u={exports:{}},va={exports:{}},Fe={};/** @license React v16.13.1
|
|
177
|
+
*/var $O=["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])"],na=$O.join(","),wy=typeof Element>"u",So=wy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ra=!wy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},oa=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},jO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},RO=function(t,n,r){if(oa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(na));return n&&So.call(t,na)&&o.unshift(t),o=o.filter(r),o},BO=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!oa(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=So.call(s,na);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!oa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var h=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},xy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ty=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||jO(t))&&!xy(t)?0:t.tabIndex},zO=function(t,n){var r=Ty(t);return r<0&&n&&!xy(t)?0:r},WO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Sy=function(t){return t.tagName==="INPUT"},HO=function(t){return Sy(t)&&t.type==="hidden"},UO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},GO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},YO=function(t){if(!t.name)return!0;var n=t.form||ra(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=GO(o,t.form);return!i||i===t},qO=function(t){return Sy(t)&&t.type==="radio"},KO=function(t){return qO(t)&&!YO(t)},ZO=function(t){var n,r=t&&ra(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=ra(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Ey=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=So.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(So.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=ra(t);if(l&&!l.shadowRoot&&o(l)===!0)return Ey(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(ZO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ey(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 So.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},JO=function(t,n){return!(n.disabled||oa(n)||HO(n)||XO(n,t)||UO(n)||QO(n))},uu=function(t,n){return!(KO(n)||Ty(n)<0||!JO(t,n))},e_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},t_=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=zO(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(WO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Di=function(t,n){n=n||{};var r;return n.getShadowRoot?r=BO([t],n.includeContainer,{filter:uu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:e_}):r=RO(t,n.includeContainer,uu.bind(null,n)),t_(r)},n_=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return So.call(t,na)===!1?!1:uu(n,t)};function Cy(e,t,n){let{reference:r,floating:o}=e;const i=Ar(t),s=lu(t),a=au(s),l=ar(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(To(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const r_=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Cy(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:y}=a[m],{x,y:g,data:S,reset:T}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=x??u,d=g??d,h={...h,[v]:{...h[v],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=Cy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function du(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=xo(t,e),p=by(h),v=a[f?d==="floating"?"reference":"floating":d],y=ta(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},T=ta(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:g,strategy:l}):x);return{top:(y.top-T.top+p.top)/S.y,bottom:(T.bottom-y.bottom+p.bottom)/S.y,left:(y.left-T.left+p.left)/S.x,right:(T.right-y.right+p.right)/S.x}}const o_=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=xo(e,t)||{};if(c==null)return{};const d=by(u),f={x:n,y:r},h=lu(o),p=au(h),m=await s.getDimensions(c),v=h==="y",y=v?"top":"left",x=v?"bottom":"right",g=v?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-f[h]-i.floating[p],T=f[h]-i.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let O=E?E[g]:0;(!O||!await(s.isElement==null?void 0:s.isElement(E)))&&(O=a.floating[g]||i.floating[p]);const I=S/2-T/2,k=O/2-m[p]/2-1,C=yn(d[y],k),L=yn(d[x],k),D=C,V=O-m[p]-L,P=O/2-m[p]/2+I,A=su(D,P,V),N=!l.arrow&&To(o)!=null&&P!==A&&i.reference[p]/2-(P<D?C:L)-m[p]/2<0,$=N?P<D?P-D:P-V:0;return{[h]:f[h]+$,data:{[h]:A,centerOffset:P-A-$,...N&&{alignmentOffset:$}},reset:N}}}),i_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=xo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=ar(o),x=Ar(a),g=ar(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(g||!m?[ea(a)]:NO(a)),E=p!=="none";!f&&E&&T.push(...LO(a,m,p,S));const O=[a,...T],I=await du(t,v),k=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&k.push(I[y]),d){const P=DO(o,s,S);k.push(I[P[0]],I[P[1]])}if(C=[...C,{placement:o,overflows:k}],!k.every(P=>P<=0)){var L,D;const P=(((L=i.flip)==null?void 0:L.index)||0)+1,A=O[P];if(A)return{data:{index:P,overflows:C},reset:{placement:A}};let N=(D=C.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:D.placement;if(!N)switch(h){case"bestFit":{var V;const $=(V=C.filter(z=>{if(E){const U=Ar(z.placement);return U===x||U==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(U=>U>0).reduce((U,_)=>U+_,0)]).sort((z,U)=>z[1]-U[1])[0])==null?void 0:V[0];$&&(N=$);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function s_(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ar(n),a=To(n),l=Ar(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=xo(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const a_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await s_(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},l_=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:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...l}=xo(e,t),c={x:n,y:r},u=await du(t,l),d=Ar(ar(o)),f=vy(d);let h=c[f],p=c[d];if(i){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=h+u[v],g=h-u[y];h=su(x,h,g)}if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=p+u[v],g=p-u[y];p=su(x,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},c_=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}=xo(e,t),l=await du(t,a),c=ar(n),u=To(n),d=Ar(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const v=h-l.top-l.bottom,y=f-l.left-l.right,x=yn(h-l[p],v),g=yn(f-l[m],y),S=!t.middlewareData.shift;let T=x,E=g;if(d?E=u||S?yn(g,y):y:T=u||S?yn(x,v):v,S&&!u){const I=Yt(l.left,0),k=Yt(l.right,0),C=Yt(l.top,0),L=Yt(l.bottom,0);d?E=f-2*(I!==0||k!==0?I+k:Yt(l.left,l.right)):T=h-2*(C!==0||L!==0?C+L:Yt(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:T});const O=await o.getDimensions(i.floating);return f!==O.width||h!==O.height?{reset:{rects:!0}}:{}}}};function Py(e){const t=Gt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ut(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Js(n)!==i||Js(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function fu(e){return Be(e)?e:e.contextElement}function Eo(e){const t=fu(e);if(!ut(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Py(t);let s=(i?Js(n.width):n.width)/r,a=(i?Js(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const u_=sr(0);function ky(e){const t=zt(e);return!Qc()||!t.visualViewport?u_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function d_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==zt(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=fu(e);let s=sr(1);t&&(r?Be(r)&&(s=Eo(r)):s=Eo(e));const a=d_(i,n,r)?ky(i):sr(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=zt(i),h=r&&Be(r)?zt(r):r;let p=f,m=Jc(p);for(;m&&r&&h!==p;){const v=Eo(m),y=m.getBoundingClientRect(),x=Gt(m),g=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,S=y.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=g,c+=S,p=zt(m),m=Jc(p)}}return ta({width:u,height:d,x:l,y:c})}function f_(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Nn(r),a=t?Xs(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),d=ut(r);if((d||!d&&!i)&&((rr(r)!=="body"||Ai(s))&&(l=Qs(r)),ut(r))){const f=Mr(r);c=Eo(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function h_(e){return Array.from(e.getClientRects())}function Iy(e){return Mr(Nn(e)).left+Qs(e).scrollLeft}function p_(e){const t=Nn(e),n=Qs(e),r=e.ownerDocument.body,o=Yt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Yt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Iy(e);const a=-n.scrollTop;return Gt(r).direction==="rtl"&&(s+=Yt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function m_(e,t){const n=zt(e),r=Nn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Qc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function g_(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ut(e)?Eo(e):sr(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Oy(e,t,n){let r;if(t==="viewport")r=m_(e,n);else if(t==="document")r=p_(Nn(e));else if(Be(t))r=g_(t,n);else{const o=ky(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ta(r)}function _y(e,t){const n=Fn(e);return n===t||!Be(n)||or(n)?!1:Gt(n).position==="fixed"||_y(n,t)}function y_(e,t){const n=t.get(e);if(n)return n;let r=ir(e,[],!1).filter(a=>Be(a)&&rr(a)!=="body"),o=null;const i=Gt(e).position==="fixed";let s=i?Fn(e):e;for(;Be(s)&&!or(s);){const a=Gt(s),l=Xc(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ai(s)&&!l&&_y(e,s))?r=r.filter(u=>u!==s):o=a,s=Fn(s)}return t.set(e,r),r}function v_(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Xs(t)?[]:y_(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Oy(t,u,o);return c.top=Yt(d.top,c.top),c.right=yn(d.right,c.right),c.bottom=yn(d.bottom,c.bottom),c.left=Yt(d.left,c.left),c},Oy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function b_(e){const{width:t,height:n}=Py(e);return{width:t,height:n}}function w_(e,t,n){const r=ut(t),o=Nn(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!i)if((rr(t)!=="body"||Ai(o))&&(a=Qs(t)),r){const d=Mr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Iy(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function hu(e){return Gt(e).position==="static"}function Ay(e,t){return!ut(e)||Gt(e).position==="fixed"?null:t?t(e):e.offsetParent}function My(e,t){const n=zt(e);if(Xs(e))return n;if(!ut(e)){let o=Fn(e);for(;o&&!or(o);){if(Be(o)&&!hu(o))return o;o=Fn(o)}return n}let r=Ay(e,t);for(;r&&CO(r)&&hu(r);)r=Ay(r,t);return r&&or(r)&&hu(r)&&!Xc(r)?n:r||PO(e)||n}const x_=async function(e){const t=this.getOffsetParent||My,n=this.getDimensions,r=await n(e.floating);return{reference:w_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function T_(e){return Gt(e).direction==="rtl"}const S_={convertOffsetParentRelativeRectToViewportRelativeRect:f_,getDocumentElement:Nn,getClippingRect:v_,getOffsetParent:My,getElementRects:x_,getClientRects:h_,getDimensions:b_,getScale:Eo,isElement:Be,isRTL:T_};function E_(e,t){let n=null,r;const o=Nn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=wo(u),p=wo(o.clientWidth-(c+d)),m=wo(o.clientHeight-(u+f)),v=wo(c),x={rootMargin:-h+"px "+-p+"px "+-m+"px "+-v+"px",threshold:Yt(0,yn(1,l))||1};let g=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!g)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),i}function ia(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=fu(e),u=o||i?[...c?ir(c):[],...ir(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?E_(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?Mr(e):null;l&&v();function v(){const y=Mr(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(v)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const C_=a_,P_=l_,k_=i_,I_=c_,Dy=o_,O_=(e,t,n)=>{const r=new Map,o={platform:S_,...n},i={...o.platform,_c:r};return r_(e,t,{...o,platform:i})};var sa=typeof document<"u"?b.useLayoutEffect:b.useEffect;function aa(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(!aa(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)&&!aa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ny(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fy(e,t){const n=Ny(e);return Math.round(t*n)/n}function Ly(e){const t=M.useRef(e);return sa(()=>{t.current=e}),t}function __(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=M.useState(r);aa(f,r)||h(r);const[p,m]=M.useState(null),[v,y]=M.useState(null),x=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),g=M.useCallback($=>{$!==O.current&&(O.current=$,y($))},[]),S=i||p,T=s||v,E=M.useRef(null),O=M.useRef(null),I=M.useRef(u),k=l!=null,C=Ly(l),L=Ly(o),D=M.useCallback(()=>{if(!E.current||!O.current)return;const $={placement:t,strategy:n,middleware:f};L.current&&($.platform=L.current),O_(E.current,O.current,$).then(z=>{const U={...z,isPositioned:!0};V.current&&!aa(I.current,U)&&(I.current=U,tf.flushSync(()=>{d(U)}))})},[f,t,n,L]);sa(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const V=M.useRef(!1);sa(()=>(V.current=!0,()=>{V.current=!1}),[]),sa(()=>{if(S&&(E.current=S),T&&(O.current=T),S&&T){if(C.current)return C.current(S,T,D);D()}},[S,T,D,C,k]);const P=M.useMemo(()=>({reference:E,floating:O,setReference:x,setFloating:g}),[x,g]),A=M.useMemo(()=>({reference:S,floating:T}),[S,T]),N=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!A.floating)return $;const z=Fy(A.floating,u.x),U=Fy(A.floating,u.y);return a?{...$,transform:"translate("+z+"px, "+U+"px)",...Ny(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:U}},[n,a,A.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:D,refs:P,elements:A,floatingStyles:N}),[u,D,P,A,N])}const A_=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?Dy({element:r.current,padding:o}).fn(n):{}:r?Dy({element:r,padding:o}).fn(n):{}}}},la=(e,t)=>({...C_(e),options:[e,t]}),pu=(e,t)=>({...P_(e),options:[e,t]}),mu=(e,t)=>({...k_(e),options:[e,t]}),M_=(e,t)=>({...I_(e),options:[e,t]}),Vy=(e,t)=>({...A_(e),options:[e,t]});function gu(e){return M.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const $y={...M},D_=$y.useInsertionEffect||(e=>e());function Pt(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return D_(()=>{t.current=e}),M.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",Ni="ArrowDown",Co="ArrowLeft",Po="ArrowRight";function ca(e,t,n){return Math.floor(e/t)!==n}function Fi(e,t){return t<0||t>=e.current.length}function vu(e,t){return Mt(e,{disabledIndices:t})}function jy(e,t){return Mt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Mt(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&&ua(s,a,o));return a}function N_(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===yu){if(u&&Ct(n),c===-1)d=l;else if(d=Mt(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||d<0)){const f=c%i,h=l%i,p=l-(h-f);h===f?d=l:d=h>f?p:p-i}Fi(e,d)&&(d=c)}if(n.key===Ni&&(u&&Ct(n),c===-1?d=a:(d=Mt(e,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(d=Mt(e,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),Fi(e,d)&&(d=c)),r==="both"){const f=wo(c/i);n.key===Po&&(u&&Ct(n),c%i!==i-1?(d=Mt(e,{startingIndex:c,disabledIndices:s}),o&&ca(d,i,f)&&(d=Mt(e,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(d=Mt(e,{startingIndex:c-c%i-1,disabledIndices:s})),ca(d,i,f)&&(d=c)),n.key===Co&&(u&&Ct(n),c%i!==0?(d=Mt(e,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&ca(d,i,f)&&(d=Mt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(d=Mt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),ca(d,i,f)&&(d=c));const h=wo(l/i)===f;Fi(e,d)&&(o&&h?d=n.key===Co?l:Mt(e,{startingIndex:c-c%i-1,disabledIndices:s}):d=c)}return d}function F_(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function L_(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 V_(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ua(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Ry=0;function lr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ry);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Ry=requestAnimationFrame(i)}var _e=typeof document<"u"?b.useLayoutEffect:b.useEffect;function $_(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 j_(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const By=M.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function R_(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=M.useState(()=>new Map),s=M.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=M.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return _e(()=>{const l=new Map(o);Array.from(l.keys()).sort($_).forEach((u,d)=>{l.set(u,d)}),j_(o,l)||i(l)},[o]),M.createElement(By.Provider,{value:M.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function zy(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=M.useContext(By),[a,l]=M.useState(null),c=M.useRef(null),u=M.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const h=t!==void 0;s.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,i,s,t]);return _e(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),_e(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),M.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function ko(){return ko=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},ko.apply(this,arguments)}let Wy=!1,B_=0;const Hy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+B_++;function z_(){const[e,t]=M.useState(()=>Wy?Hy():void 0);return _e(()=>{e==null&&t(Hy())},[]),M.useEffect(()=>{Wy=!0},[]),e}const Io=$y.useId||z_;let Li;process.env.NODE_ENV!=="production"&&(Li=new Set);function da(){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=Li)!=null&&e.has(o))){var i;(i=Li)==null||i.add(o),console.warn(o)}}function W_(){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=Li)!=null&&e.has(o))){var i;(i=Li)==null||i.add(o),console.error(o)}}const Uy=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||da("The `ref` prop is required for `FloatingArrow`."));const v=Io(),[y,x]=M.useState(!1);if(_e(()=>{if(!o)return;Gt(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const g=c*2,S=g/2,T=s/2*(l/-8+1),E=a/2*l/4,[O,I]=r.split("-"),k=!!f,C=O==="top"||O==="bottom",L=u&&I==="end"?"bottom":"top";let D=u&&I==="end"?"right":"left";u&&y&&(D=I==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",A=f||"M0,0"+(" H"+s)+(" L"+(s-T)+","+(a-E))+(" Q"+s/2+","+a+" "+T+","+(a-E))+" Z",N={top:k?"rotate(180deg)":"",left:k?"rotate(90deg)":"rotate(-90deg)",bottom:k?"":"rotate(180deg)",right:k?"rotate(-90deg)":"rotate(90deg)"}[O];return M.createElement("svg",ko({},m,{"aria-hidden":!0,ref:n,width:k?s:s+g,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[D]:V,[L]:P,[O]:C||k?"100%":"calc(100% - "+g/2+"px)",transform:""+N+(h??""),...p}}),g>0&&M.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:A}),M.createElement("path",{stroke:g&&!f?m.fill:"none",d:A}),M.createElement("clipPath",{id:v},M.createElement("rect",{x:-S,y:S*(k?-1:1),width:s+g,height:s})))});function Gy(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Yy=M.createContext(null),qy=M.createContext(null),cr=()=>{var e;return((e=M.useContext(Yy))==null?void 0:e.id)||null},ur=()=>M.useContext(qy);function H_(e){const t=Io(),n=ur(),o=cr();return _e(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function U_(e){const{children:t,id:n}=e,r=cr();return M.createElement(Yy.Provider,{value:M.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function G_(e){const{children:t}=e,n=M.useRef([]),r=M.useCallback(s=>{n.current=[...n.current,s]},[]),o=M.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=M.useState(()=>Gy())[0];return M.createElement(qy.Provider,{value:M.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function dr(e){return"data-floating-ui-"+e}function kt(e){const t=b.useRef(e);return _e(()=>{t.current=e}),t}const Ky=dr("safe-polygon");function bu(e,t,n){return n&&!Mi(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Zy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=ur(),p=cr(),m=kt(c),v=kt(l),y=kt(n),x=M.useRef(),g=M.useRef(-1),S=M.useRef(),T=M.useRef(-1),E=M.useRef(!0),O=M.useRef(!1),I=M.useRef(()=>{}),k=M.useCallback(()=>{var A;const N=(A=o.current.openEvent)==null?void 0:A.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function A(N){let{open:$}=N;$||(clearTimeout(g.current),clearTimeout(T.current),E.current=!0)}return i.on("openchange",A),()=>{i.off("openchange",A)}},[a,i]),M.useEffect(()=>{if(!a||!m.current||!n)return;function A($){k()&&r(!1,$,"hover")}const N=vt(s.floating).documentElement;return N.addEventListener("mouseleave",A),()=>{N.removeEventListener("mouseleave",A)}},[s.floating,n,r,a,m,k]);const C=M.useCallback(function(A,N,$){N===void 0&&(N=!0),$===void 0&&($="hover");const z=bu(v.current,"close",x.current);z&&!S.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,A,$),z)):N&&(clearTimeout(g.current),r(!1,A,$))},[v,r]),L=Pt(()=>{I.current(),S.current=void 0}),D=Pt(()=>{if(O.current){const A=vt(s.floating).body;A.style.pointerEvents="",A.removeAttribute(Ky),O.current=!1}});M.useEffect(()=>{if(!a)return;function A(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(_){if(clearTimeout(g.current),E.current=!1,u&&!Mi(x.current)||d>0&&!bu(v.current,"open"))return;const R=bu(v.current,"open",x.current);R?g.current=window.setTimeout(()=>{y.current||r(!0,_,"hover")},R):r(!0,_,"hover")}function $(_){if(A())return;I.current();const R=vt(s.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),S.current=m.current({...o.current.floatingContext,tree:h,x:_.clientX,y:_.clientY,onClose(){D(),L(),C(_,!0,"safe-polygon")}});const re=S.current;R.addEventListener("mousemove",re),I.current=()=>{R.removeEventListener("mousemove",re)};return}(x.current==="touch"?!dt(s.floating,_.relatedTarget):!0)&&C(_)}function z(_){A()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:_.clientX,y:_.clientY,onClose(){D(),L(),C(_)}})(_))}if(Be(s.domReference)){var U;const _=s.domReference;return n&&_.addEventListener("mouseleave",z),(U=s.floating)==null||U.addEventListener("mouseleave",z),f&&_.addEventListener("mousemove",N,{once:!0}),_.addEventListener("mouseenter",N),_.addEventListener("mouseleave",$),()=>{var R;n&&_.removeEventListener("mouseleave",z),(R=s.floating)==null||R.removeEventListener("mouseleave",z),f&&_.removeEventListener("mousemove",N),_.removeEventListener("mouseenter",N),_.removeEventListener("mouseleave",$)}}},[s,a,e,u,d,f,C,L,D,r,n,y,h,v,m,o]),_e(()=>{var A;if(a&&n&&(A=m.current)!=null&&A.__options.blockPointerEvents&&k()){const $=vt(s.floating).body;$.setAttribute(Ky,""),$.style.pointerEvents="none",O.current=!0;const z=s.floating;if(Be(s.domReference)&&z){var N;const U=s.domReference,_=h==null||(N=h.nodesRef.current.find(R=>R.id===p))==null||(N=N.context)==null?void 0:N.elements.floating;return _&&(_.style.pointerEvents=""),U.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{U.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,s,h,m,k]),_e(()=>{n||(x.current=void 0,L(),D())},[n,L,D]),M.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(T.current),D()},[a,s.domReference,L,D]);const V=M.useMemo(()=>{function A(N){x.current=N.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(N){const{nativeEvent:$}=N;function z(){!E.current&&!y.current&&r(!0,$,"hover")}u&&!Mi(x.current)||n||d===0||(clearTimeout(T.current),x.current==="touch"?z():T.current=window.setTimeout(z,d))}}},[u,r,n,y,d]),P=M.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(A){C(A.nativeEvent,!1)}}),[C]);return M.useMemo(()=>a?{reference:V,floating:P}:{},[a,V,P])}function Y_(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 Dr(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 q_(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),Dr(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let Oo=new WeakMap,fa=new WeakSet,ha={},wu=0;const K_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Xy=e=>e&&(e.host||Xy(e.parentNode)),Z_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Xy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function X_(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=Z_(t,e),a=new Set,l=new Set(s),c=[];ha[o]||(ha[o]=new WeakMap);const u=ha[o];s.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(rr(p)!=="script")if(a.has(p))f(p);else{const m=i?p.getAttribute(i):null,v=m!==null&&m!=="false",y=(Oo.get(p)||0)+1,x=(u.get(p)||0)+1;Oo.set(p,y),u.set(p,x),c.push(p),y===1&&v&&fa.add(p),x===1&&p.setAttribute(o,""),!v&&i&&p.setAttribute(i,"true")}})}return wu++,()=>{c.forEach(h=>{const p=(Oo.get(h)||0)-1,m=(u.get(h)||0)-1;Oo.set(h,p),u.set(h,m),p||(!fa.has(h)&&i&&h.removeAttribute(i),fa.delete(h)),m||h.removeAttribute(o)}),wu--,wu||(Oo=new WeakMap,Oo=new WeakMap,fa=new WeakSet,ha={})}}function Qy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vt(e[0]).body;return X_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const _o=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Jy(e,t){const n=Di(e,_o());t==="prev"&&n.reverse();const r=n.indexOf(nn(vt(e)));return n.slice(r+1)[0]}function ev(){return Jy(document.body,"next")}function tv(){return Jy(document.body,"prev")}function Vi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!dt(n,r)}function Q_(e){Di(e,_o()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function J_(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 eA(e,t,n){const r=e.indexOf(t);function o(s){const a=dr("focus-guard");let l=r+(s?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||dt(n,c));)s?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const xu={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 tA;function nv(e){e.key==="Tab"&&(e.target,clearTimeout(tA))}const pa=M.forwardRef(function(t,n){const[r,o]=M.useState();_e(()=>(nu()&&o("button"),document.addEventListener("keydown",nv),()=>{document.removeEventListener("keydown",nv)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[dr("focus-guard")]:"",style:xu};return M.createElement("span",ko({},t,i))}),rv=M.createContext(null),ov=dr("portal");function nA(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Io(),o=iv(),[i,s]=M.useState(null),a=M.useRef(null);return _e(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),_e(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(ov,""),l.appendChild(c),a.current=c,s(c)},[t,r]),_e(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Be(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(ov,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function Ao(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=nA({id:n,root:r}),[s,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),f=!!s&&!s.modal&&s.open&&o&&!!(r||i);return M.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&Vi(p)&&(p.type==="focusin"?J_:Q_)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),M.createElement(rv.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i])},f&&i&&M.createElement(pa,{"data-type":"outside",ref:l,onFocus:h=>{if(Vi(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=tv()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),f&&i&&M.createElement("span",{"aria-owns":i.id,style:xu}),i&&tf.createPortal(t,i),f&&i&&M.createElement(pa,{"data-type":"outside",ref:c,onFocus:h=>{if(Vi(h,i)){var p;(p=d.current)==null||p.focus()}else{const m=ev()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const iv=()=>M.useContext(rv),sv=20;let Nr=[];function Tu(e){Nr=Nr.filter(n=>n.isConnected);let t=e;if(!(!t||rr(t)==="body")){if(!n_(t,_o())){const n=Di(t,_o())[0];n&&(t=n)}Nr.push(t),Nr.length>sv&&(Nr=Nr.slice(-sv))}}function av(){return Nr.slice().reverse().find(e=>e.isConnected)}const rA=M.forwardRef(function(t,n){return M.createElement("button",ko({},t,{type:"button",ref:n,tabIndex:-1,style:xu}))});function $i(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:v,dataRef:y,floatingId:x,elements:{domReference:g,floating:S}}=t,T=typeof s=="number"&&s<0,E=yy(g)&&T,O=K_()?i:!0,I=kt(o),k=kt(s),C=kt(a),L=ur(),D=iv(),V=M.useRef(null),P=M.useRef(null),A=M.useRef(!1),N=M.useRef(!1),$=M.useRef(-1),z=D!=null,U=S==null?void 0:S.firstElementChild,_=(U==null?void 0:U.id)===x?U:S,R=Pt(function(G){return G===void 0&&(G=_),G?Di(G,_o()):[]}),Z=Pt(G=>{const F=R(G);return I.current.map(B=>g&&B==="reference"?g:_&&B==="floating"?_:F).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){dt(_,nn(vt(_)))&&R().length===0&&!E&&Ct(B);const W=Z(),j=Ln(B);I.current[0]==="reference"&&j===g&&(Ct(B),B.shiftKey?lr(W[W.length-1]):lr(W[1])),I.current[1]==="floating"&&j===_&&B.shiftKey&&(Ct(B),lr(W[0]))}}const F=vt(_);return F.addEventListener("keydown",G),()=>{F.removeEventListener("keydown",G)}},[r,g,_,c,I,E,R,Z]),M.useEffect(()=>{if(r||!S)return;function G(F){const B=Ln(F),j=R().indexOf(B);j!==-1&&($.current=j)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,R]),M.useEffect(()=>{if(r||!d)return;function G(){N.current=!0,setTimeout(()=>{N.current=!1})}function F(B){const W=B.relatedTarget;queueMicrotask(()=>{const j=!(dt(g,W)||dt(S,W)||dt(W,S)||dt(D==null?void 0:D.portalNode,W)||W!=null&&W.hasAttribute(dr("focus-guard"))||L&&(Dr(L.nodesRef.current,p).find(Y=>{var se,H;return dt((se=Y.context)==null?void 0:se.elements.floating,W)||dt((H=Y.context)==null?void 0:H.elements.domReference,W)})||Y_(L.nodesRef.current,p).find(Y=>{var se,H;return((se=Y.context)==null?void 0:se.elements.floating)===W||((H=Y.context)==null?void 0:H.elements.domReference)===W})));if(l&&j&&nn(vt(_))===vt(_).body){ut(_)&&(_==null||_.focus());const Y=$.current,se=R(),H=se[Y]||se[se.length-1]||_;ut(H)&&H.focus()}(E||!c)&&W&&j&&!N.current&&W!==av()&&(A.current=!0,m(!1,B))})}if(S&&ut(g))return g.addEventListener("focusout",F),g.addEventListener("pointerdown",G),S.addEventListener("focusout",F),()=>{g.removeEventListener("focusout",F),g.removeEventListener("pointerdown",G),S.removeEventListener("focusout",F)}},[r,g,S,_,c,p,L,D,m,d,l,R,E]),M.useEffect(()=>{var G;if(r)return;const F=Array.from((D==null||(G=D.portalNode)==null?void 0:G.querySelectorAll("["+dr("portal")+"]"))||[]);if(S){const B=[S,...F,V.current,P.current,I.current.includes("reference")||E?g:null].filter(j=>j!=null),W=c||E?Qy(B,O,!O):Qy(B);return()=>{W()}}},[r,g,S,c,I,D,E,O]),_e(()=>{if(r||!ut(_))return;const G=vt(_),F=nn(G);queueMicrotask(()=>{const B=Z(_),W=k.current,j=(typeof W=="number"?B[W]:W.current)||_,Y=dt(_,F);!T&&!Y&&f&&lr(j,{preventScroll:j===_})})},[r,f,_,T,Z,k]),_e(()=>{if(r||!_)return;let G=!1;const F=vt(_),B=nn(F);let j=y.current.openEvent;const Y=h.domReference.current;Tu(B);function se(H){let{open:Pe,reason:it,event:Ue,nested:st}=H;Pe&&(j=Ue),it==="escape-key"&&h.domReference.current&&Tu(h.domReference.current),it==="hover"&&Ue.type==="mouseleave"&&(A.current=!0),it==="outside-press"&&(st?(A.current=!1,G=!0):A.current=!(my(Ue)||tu(Ue)))}return v.on("openchange",se),()=>{v.off("openchange",se);const H=nn(F),Pe=dt(S,H)||L&&Dr(L.nodesRef.current,p).some(de=>{var Ee;return dt((Ee=de.context)==null?void 0:Ee.elements.floating,H)});(Pe||j&&["click","mousedown"].includes(j.type))&&h.domReference.current&&Tu(h.domReference.current);const Ue=Y||B,st=Di(vt(Ue).body,_o());queueMicrotask(()=>{let de=av();!de&&ut(Ue)&&S&&(de=eA(st,Ue,S)),C.current&&!A.current&&ut(de)&&(!(de!==H&&H!==F.body)||Pe)&&de.focus({preventScroll:G})})}},[r,S,_,C,y,h,v,L,p]),_e(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{D.setFocusManagerState(null)}},[r,D,c,f,m,h,d]),_e(()=>{if(r||!_||typeof MutationObserver!="function"||T)return;const G=()=>{const B=_.getAttribute("tabindex"),W=R(),j=nn(vt(S)),Y=W.indexOf(j);Y!==-1&&($.current=Y),I.current.includes("floating")||j!==h.domReference.current&&W.length===0?B!=="0"&&_.setAttribute("tabindex","0"):B!=="-1"&&_.setAttribute("tabindex","-1")};G();const F=new MutationObserver(G);return F.observe(_,{childList:!0,subtree:!0,attributes:!0}),()=>{F.disconnect()}},[r,S,_,h,I,R,T]);function re(G){return r||!u||!c?null:M.createElement(rA,{ref:G==="start"?V:P,onClick:F=>m(!1,F.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&O&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,Q&&M.createElement(pa,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:G=>{if(c){const B=Z();lr(o[0]==="reference"?B[0]:B[B.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(A.current=!1,Vi(G,D.portalNode)){const B=ev()||g;B==null||B.focus()}else{var F;(F=D.beforeOutsideRef.current)==null||F.focus()}}}),!E&&re("start"),n,re("end"),Q&&M.createElement(pa,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:G=>{if(c)lr(Z()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(A.current=!0),Vi(G,D.portalNode)){const B=tv()||g;B==null||B.focus()}else{var F;(F=D.afterOutsideRef.current)==null||F.focus()}}}))}const Su=new Set,oA=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Io();return _e(()=>{if(!r)return;Su.add(i);const s=/iP(hone|ad|od)|iOS/.test(eu()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(v))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Su.delete(i),Su.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[i,r]),M.createElement("div",ko({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function lv(e){return ut(e.target)&&e.target.tagName==="BUTTON"}function cv(e){return iu(e)}function ma(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=M.useRef(),f=M.useRef(!1),h=M.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Mi(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Mi(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){d.current=void 0,!(p.defaultPrevented||!u||lv(p))&&(p.key===" "&&!cv(i)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||lv(p)||cv(i)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return M.useMemo(()=>s?{reference:h}:{},[s,h])}const iA={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},sA={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},uv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Mo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=ur(),v=Pt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?v:l,x=M.useRef(!1),g=M.useRef(!1),{escapeKey:S,outsidePress:T}=uv(h),{escapeKey:E,outsidePress:O}=uv(p),I=Pt(P=>{var A;if(!n||!s||!a||P.key!=="Escape")return;const N=(A=i.current.floatingContext)==null?void 0:A.nodeId,$=m?Dr(m.nodesRef.current,N):[];if(!S&&(P.stopPropagation(),$.length>0)){let z=!0;if($.forEach(U=>{var _;if((_=U.context)!=null&&_.open&&!U.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,IO(P)?P.nativeEvent:P,"escape-key")}),k=Pt(P=>{var A;const N=()=>{var $;I(P),($=Ln(P))==null||$.removeEventListener("keydown",N)};(A=Ln(P))==null||A.addEventListener("keydown",N)}),C=Pt(P=>{var A;const N=x.current;x.current=!1;const $=g.current;if(g.current=!1,c==="click"&&$||N||typeof y=="function"&&!y(P))return;const z=Ln(P),U="["+dr("inert")+"]",_=vt(o.floating).querySelectorAll(U);let R=Be(z)?z:null;for(;R&&!or(R);){const G=Fn(R);if(or(G)||!Be(G))break;R=G}if(_.length&&Be(z)&&!OO(z)&&!dt(z,o.floating)&&Array.from(_).every(G=>!dt(R,G)))return;if(ut(z)&&V){const G=z.clientWidth>0&&z.scrollWidth>z.clientWidth,F=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let B=F&&P.offsetX>z.clientWidth;if(F&&Gt(z).direction==="rtl"&&(B=P.offsetX<=z.offsetWidth-z.clientWidth),B||G&&P.offsetY>z.clientHeight)return}const Z=(A=i.current.floatingContext)==null?void 0:A.nodeId,re=m&&Dr(m.nodesRef.current,Z).some(G=>{var F;return ou(P,(F=G.context)==null?void 0:F.elements.floating)});if(ou(P,o.floating)||ou(P,o.domReference)||re)return;const Q=m?Dr(m.nodesRef.current,Z):[];if(Q.length>0){let G=!0;if(Q.forEach(F=>{var B;if((B=F.context)!=null&&B.open&&!F.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),L=Pt(P=>{var A;const N=()=>{var $;C(P),($=Ln(P))==null||$.removeEventListener(c,N)};(A=Ln(P))==null||A.addEventListener(c,N)});M.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function P($){r(!1,$,"ancestor-scroll")}const A=vt(o.floating);a&&A.addEventListener("keydown",E?k:I,E),y&&A.addEventListener(c,O?L:C,O);let N=[];return f&&(Be(o.domReference)&&(N=ir(o.domReference)),Be(o.floating)&&(N=N.concat(ir(o.floating))),!Be(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(ir(o.reference.contextElement)))),N=N.filter($=>{var z;return $!==((z=A.defaultView)==null?void 0:z.visualViewport)}),N.forEach($=>{$.addEventListener("scroll",P,{passive:!0})}),()=>{a&&A.removeEventListener("keydown",E?k:I,E),y&&A.removeEventListener(c,O?L:C,O),N.forEach($=>{$.removeEventListener("scroll",P)})}},[i,o,a,y,c,n,r,f,s,S,T,I,E,k,C,O,L]),M.useEffect(()=>{x.current=!1},[y,c]);const D=M.useMemo(()=>({onKeyDown:I,[iA[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[I,r,u,d]),V=M.useMemo(()=>({onKeyDown:I,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[sA[c]]:()=>{x.current=!0}}),[I,c]);return M.useMemo(()=>s?{reference:D,floating:V}:{},[s,D,V])}function aA(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Io(),i=M.useRef({}),[s]=M.useState(()=>Gy()),a=cr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Be(h)&&W_("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=M.useState(r.reference),u=Pt((h,p,m)=>{i.current.openEvent=h?p:void 0,s.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=M.useMemo(()=>({setPositionReference:c}),[]),f=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Do(e){e===void 0&&(e={});const{nodeId:t}=e,n=aA({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||i,d=M.useRef(null),f=ur();_e(()=>{u&&(d.current=u)},[u]);const h=__({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(g=>{const S=Be(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),h.refs.setReference(S)},[h.refs]),m=M.useCallback(g=>{(Be(g)||g===null)&&(d.current=g,s(g)),(Be(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Be(g))&&h.refs.setReference(g)},[h.refs]),v=M.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),y=M.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),x=M.useMemo(()=>({...h,...r,refs:v,elements:y,nodeId:t}),[h,v,y,t,r]);return _e(()=>{r.dataRef.current.floatingContext=x;const g=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);g&&(g.context=x)}),M.useMemo(()=>({...h,context:x,refs:v,elements:y}),[h,v,y,x])}function lA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),d=M.useRef(!0);M.useEffect(()=>{if(!a)return;const h=zt(s.domReference);function p(){!n&&ut(s.domReference)&&s.domReference===nn(vt(s.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),M.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=M.useMemo(()=>({onPointerDown(h){tu(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Ln(h.nativeEvent);if(l&&Be(p))try{if(nu()&&gy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!iu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,v=Be(p)&&p.hasAttribute(dr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=nn(s.domReference?s.domReference.ownerDocument:document);!p&&x===s.domReference||dt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,x)||dt(s.domReference,x)||v||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return M.useMemo(()=>a?{reference:f}:{},[a,f])}const dv="active",fv="selected";function Eu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[dv]:s,[fv]:a,...l}=e;i=l}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(l=>{let[c,u]=l;if(!(o&&[dv,fv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(v=>v(...p)).find(v=>v!==void 0)}}}else s[c]=u}),s),{})}}function No(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=M.useCallback(a=>Eu(a,e,"reference"),t),i=M.useCallback(a=>Eu(a,e,"floating"),n),s=M.useCallback(a=>Eu(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let hv=!1;function ga(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function pv(e,t){return ga(t,e===yu||e===Ni,e===Co||e===Po)}function Cu(e,t,n){return ga(t,e===Ni,n?e===Co:e===Po)||e==="Enter"||e===" "||e===""}function cA(e,t,n){return ga(t,n?e===Co:e===Po,e===Ni)}function mv(e,t,n){return ga(t,n?e===Po:e===Co,e===yu)}function gv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:g="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:O,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||da("`useListNavigation` looping must be enabled to allow escaping."),p||da("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&S>1&&da("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const k=cr(),C=ur(),L=Pt(a),D=M.useRef(m),V=M.useRef(c??-1),P=M.useRef(null),A=M.useRef(!0),N=M.useRef(L),$=M.useRef(!!o.floating),z=M.useRef(n),U=M.useRef(!1),_=M.useRef(!1),R=kt(x),Z=kt(n),re=kt(T),Q=kt(o.floating),G=kt(c),[F,B]=M.useState(),[W,j]=M.useState(),Y=Pt(function(de,Ee,ce){ce===void 0&&(ce=!1);function Ie(Oe){p?(B(Oe.id),C==null||C.events.emit("virtualfocus",Oe),E&&(E.current=Oe)):lr(Oe,{preventScroll:!0,sync:gy()&&nu()?hv||U.current:!1})}const ht=de.current[Ee.current];ht&&Ie(ht),requestAnimationFrame(()=>{const Oe=de.current[Ee.current]||ht;if(!Oe)return;ht||Ie(Oe);const pt=re.current;pt&&H&&(ce||!A.current)&&(Oe.scrollIntoView==null||Oe.scrollIntoView(typeof pt=="boolean"?{block:"nearest",inline:"nearest"}:pt))})});_e(()=>{document.createElement("div").focus({get preventScroll(){return hv=!0,!1}})},[]),_e(()=>{l&&(n&&o.floating?D.current&&c!=null&&(_.current=!0,V.current=c,L(c)):$.current&&(V.current=-1,N.current(null)))},[l,n,o.floating,c,L]),_e(()=>{if(l&&n&&o.floating)if(s==null){if(U.current=!1,G.current!=null)return;if($.current&&(V.current=-1,Y(i,V)),(!z.current||!$.current)&&D.current&&(P.current!=null||D.current===!0&&P.current==null)){let de=0;const Ee=()=>{i.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ee),de++):(V.current=P.current==null||Cu(P.current,g,h)||f?vu(i,R.current):jy(i,R.current),P.current=null,L(V.current))};Ee()}}else Fi(i,s)||(V.current=s,Y(i,V,_.current),_.current=!1)},[l,n,o.floating,s,G,f,i,g,h,L,Y,R]),_e(()=>{var de;if(!l||o.floating||!C||p||!$.current)return;const Ee=C.nodesRef.current,ce=(de=Ee.find(Oe=>Oe.id===k))==null||(de=de.context)==null?void 0:de.elements.floating,Ie=nn(vt(o.floating)),ht=Ee.some(Oe=>Oe.context&&dt(Oe.context.elements.floating,Ie));ce&&!ht&&A.current&&ce.focus({preventScroll:!0})},[l,o.floating,C,k,p]),_e(()=>{if(!l||!C||!p||k)return;function de(Ee){j(Ee.id),E&&(E.current=Ee)}return C.events.on("virtualfocus",de),()=>{C.events.off("virtualfocus",de)}},[l,C,p,k,E]),_e(()=>{N.current=L,$.current=!!o.floating}),_e(()=>{n||(P.current=null)},[n]),_e(()=>{z.current=n},[n]);const se=s!=null,H=M.useMemo(()=>{function de(ce){if(!n)return;const Ie=i.current.indexOf(ce);Ie!==-1&&L(Ie)}return{onFocus(ce){let{currentTarget:Ie}=ce;de(Ie)},onClick:ce=>{let{currentTarget:Ie}=ce;return Ie.focus({preventScroll:!0})},...v&&{onMouseMove(ce){let{currentTarget:Ie}=ce;de(Ie)},onPointerLeave(ce){let{pointerType:Ie}=ce;!A.current||Ie==="touch"||(V.current=-1,Y(i,V),L(null),p||lr(Q.current,{preventScroll:!0}))}}}},[n,Q,Y,v,i,L,p]),Pe=Pt(de=>{if(A.current=!1,U.current=!0,!Z.current&&de.currentTarget===Q.current)return;if(f&&mv(de.key,g,h)){Ct(de),r(!1,de.nativeEvent,"list-navigation"),ut(o.domReference)&&!p&&o.domReference.focus();return}const Ee=V.current,ce=vu(i,x),Ie=jy(i,x);if(de.key==="Home"&&(Ct(de),V.current=ce,L(V.current)),de.key==="End"&&(Ct(de),V.current=Ie,L(V.current)),S>1){const ht=O||Array.from({length:i.current.length},()=>({width:1,height:1})),Oe=F_(ht,S,I),pt=Oe.findIndex(ae=>ae!=null&&!ua(i.current,ae,x)),J=Oe.reduce((ae,Ae,Ze)=>Ae!=null&&!ua(i.current,Ae,x)?Ze:ae,-1);if(V.current=Oe[N_({current:Oe.map(ae=>ae!=null?i.current[ae]:null)},{event:de,orientation:g,loop:d,cols:S,disabledIndices:V_([...x||i.current.map((ae,Ae)=>ua(i.current,Ae)?Ae:void 0),void 0],Oe),minIndex:pt,maxIndex:J,prevIndex:L_(V.current>Ie?ce:V.current,ht,Oe,S,de.key===Ni?"bl":de.key===Po?"tr":"tl"),stopEvent:!0})],L(V.current),g==="both")return}if(pv(de.key,g)){if(Ct(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){V.current=Cu(de.key,g,h)?ce:Ie,L(V.current);return}Cu(de.key,g,h)?d?V.current=Ee>=Ie?u&&Ee!==i.current.length?-1:ce:Mt(i,{startingIndex:Ee,disabledIndices:x}):V.current=Math.min(Ie,Mt(i,{startingIndex:Ee,disabledIndices:x})):d?V.current=Ee<=ce?u&&Ee!==-1?i.current.length:Ie:Mt(i,{startingIndex:Ee,decrement:!0,disabledIndices:x}):V.current=Math.max(ce,Mt(i,{startingIndex:Ee,decrement:!0,disabledIndices:x})),Fi(i,V.current)?L(null):L(V.current)}}),it=M.useMemo(()=>p&&n&&se&&{"aria-activedescendant":W||F},[p,n,se,W,F]),Ue=M.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!yy(o.domReference)&&it,onKeyDown:Pe,onPointerMove(){A.current=!0}}),[it,Pe,o.domReference,g]),st=M.useMemo(()=>{function de(ce){m==="auto"&&my(ce.nativeEvent)&&(D.current=!0)}function Ee(ce){D.current=m,m==="auto"&&tu(ce.nativeEvent)&&(D.current=!0)}return{...it,onKeyDown(ce){A.current=!1;const Ie=ce.key.indexOf("Arrow")===0,ht=cA(ce.key,g,h),Oe=mv(ce.key,g,h),pt=pv(ce.key,g),J=(f?ht:pt)||ce.key==="Enter"||ce.key.trim()==="";if(p&&n){const It=C==null?void 0:C.nodesRef.current.find($t=>$t.parentId==null),Ft=C&&It?q_(C.nodesRef.current,It.id):null;if(Ie&&Ft&&E){const $t=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ht||Oe){var ae,Ae;const Ur=((ae=Ft.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,Jo=Oe&&!Ur?(Ae=Ft.context)==null?void 0:Ae.elements.domReference:ht?i.current.find(ei=>(ei==null?void 0:ei.id)===F):null;Jo&&(Ct(ce),Jo.dispatchEvent($t),j(void 0))}if(pt&&Ft.context&&Ft.context.open&&Ft.parentId&&ce.currentTarget!==Ft.context.elements.domReference){var Ze;Ct(ce),(Ze=Ft.context.elements.domReference)==null||Ze.dispatchEvent($t);return}}return Pe(ce)}if(!(!n&&!y&&Ie)){if(J&&(P.current=f&&pt?null:ce.key),f){ht&&(Ct(ce),n?(V.current=vu(i,R.current),L(V.current)):r(!0,ce.nativeEvent,"list-navigation"));return}pt&&(c!=null&&(V.current=c),Ct(ce),!n&&y?r(!0,ce.nativeEvent,"list-navigation"):Pe(ce),n&&L(V.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ee,onMouseDown:de,onClick:de}},[F,it,Pe,R,m,i,f,L,r,n,y,g,h,c,C,p,E]);return M.useMemo(()=>l?{reference:st,floating:Ue,item:H}:{},[l,st,Ue,H])}const uA=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Fo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=uA.get(s))!=null?n:s,l=Io(),u=cr()!=null,d=M.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:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),f=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),h=M.useCallback(p=>{let{active:m,selected:v}=p;const y={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...y,"aria-selected":m&&v};case"combobox":return{...y,...m&&{"aria-selected":!0}}}return{}},[o,s]);return M.useMemo(()=>i?{reference:d,floating:f,item:h}:{},[i,d,f,h])}const yv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Lo(e,t){return typeof e=="function"?e(t):e}function dA(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function fA(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=dA(n,s);return!c&&a==="close"&&l("unmounted"),_e(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function hA(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[h,p]=M.useState(()=>({...Lo(i,c),...Lo(n,c)})),{isMounted:m,status:v}=fA(e,{duration:s}),y=kt(n),x=kt(r),g=kt(o),S=kt(i);return _e(()=>{const T=Lo(y.current,c),E=Lo(g.current,c),O=Lo(S.current,c),I=Lo(x.current,c)||Object.keys(T).reduce((k,C)=>(k[C]="",k),{});if(v==="initial"&&p(k=>({transitionProperty:k.transitionProperty,...O,...T})),v==="open"&&p({transitionProperty:Object.keys(I).map(yv).join(","),transitionDuration:d+"ms",...O,...I}),v==="close"){const k=E||T;p({transitionProperty:Object.keys(k).map(yv).join(","),transitionDuration:f+"ms",...O,...k})}},[f,g,y,x,S,d,v,c]),{isMounted:m,styles:h}}function pA(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=M.useRef(),m=M.useRef(""),v=M.useRef((n=h??s)!=null?n:-1),y=M.useRef(null),x=Pt(a),g=Pt(l),S=kt(u),T=kt(f);_e(()=>{r&&(clearTimeout(p.current),y.current=null,m.current="")},[r]),_e(()=>{if(r&&m.current===""){var C;v.current=(C=h??s)!=null?C:-1}},[r,h,s]);const E=Pt(C=>{C?o.current.typing||(o.current.typing=C,g(C)):o.current.typing&&(o.current.typing=C,g(C))}),O=Pt(C=>{function L(N,$,z){const U=S.current?S.current($,z):$.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return U?N.indexOf(U):-1}const D=i.current;if(m.current.length>0&&m.current[0]!==" "&&(L(D,D,m.current)===-1?E(!1):C.key===" "&&Ct(C)),D==null||T.current.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;r&&C.key!==" "&&(Ct(C),E(!0)),D.every(N=>{var $,z;return N?(($=N[0])==null?void 0:$.toLocaleLowerCase())!==((z=N[1])==null?void 0:z.toLocaleLowerCase()):!0})&&m.current===C.key&&(m.current="",v.current=y.current),m.current+=C.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=y.current,E(!1)},d);const P=v.current,A=L(D,[...D.slice((P||0)+1),...D.slice(0,(P||0)+1)],m.current);A!==-1?(x(A),y.current=A):C.key!==" "&&(m.current="",E(!1))}),I=M.useMemo(()=>({onKeyDown:O}),[O]),k=M.useMemo(()=>({onKeyDown:O,onKeyUp(C){C.key===" "&&E(!1)}}),[O,E]);return M.useMemo(()=>c?{reference:I,floating:k}:{},[c,I,k])}function vv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function mA(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function gA(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(s===null||a===null||p===0)return s=d,a=f,l=h,null;const m=d-s,v=f-a,x=Math.sqrt(m*m+v*v)/p;return s=d,a=f,l=h,x}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:v,nodeId:y,tree:x}=d;return function(S){function T(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:O}=S,I=[E,O],k=Ln(S),C=S.type==="mouseleave",L=dt(m.floating,k),D=dt(m.domReference,k),V=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),A=p.split("-")[0],N=f>P.right-P.width/2,$=h>P.bottom-P.height/2,z=mA(I,V),U=P.width>V.width,_=P.height>V.height,R=(U?V:P).left,Z=(U?V:P).right,re=(_?V:P).top,Q=(_?V:P).bottom;if(L&&(i=!0,!C))return;if(D&&(i=!1),D&&!C){i=!0;return}if(C&&Be(S.relatedTarget)&&dt(m.floating,S.relatedTarget)||x&&Dr(x.nodesRef.current,y).some(B=>{let{context:W}=B;return W==null?void 0:W.open}))return;if(A==="top"&&h>=V.bottom-1||A==="bottom"&&h<=V.top+1||A==="left"&&f>=V.right-1||A==="right"&&f<=V.left+1)return T();let G=[];switch(A){case"top":G=[[R,V.top+1],[R,P.bottom-1],[Z,P.bottom-1],[Z,V.top+1]];break;case"bottom":G=[[R,P.top+1],[R,V.bottom-1],[Z,V.bottom-1],[Z,P.top+1]];break;case"left":G=[[P.right-1,Q],[P.right-1,re],[V.left+1,re],[V.left+1,Q]];break;case"right":G=[[V.right-1,Q],[V.right-1,re],[P.left+1,re],[P.left+1,Q]];break}function F(B){let[W,j]=B;switch(A){case"top":{const Y=[U?W+t/2:N?W+t*4:W-t*4,j+t+1],se=[U?W-t/2:N?W+t*4:W-t*4,j+t+1],H=[[P.left,N||U?P.bottom-t:P.top],[P.right,N?U?P.bottom-t:P.top:P.bottom-t]];return[Y,se,...H]}case"bottom":{const Y=[U?W+t/2:N?W+t*4:W-t*4,j-t],se=[U?W-t/2:N?W+t*4:W-t*4,j-t],H=[[P.left,N||U?P.top+t:P.bottom],[P.right,N?U?P.top+t:P.bottom:P.top+t]];return[Y,se,...H]}case"left":{const Y=[W+t+1,_?j+t/2:$?j+t*4:j-t*4],se=[W+t+1,_?j-t/2:$?j+t*4:j-t*4];return[...[[$||_?P.right-t:P.left,P.top],[$?_?P.right-t:P.left:P.right-t,P.bottom]],Y,se]}case"right":{const Y=[W-t,_?j+t/2:$?j+t*4:j-t*4],se=[W-t,_?j-t/2:$?j+t*4:j-t*4],H=[[$||_?P.left+t:P.right,P.top],[$?_?P.left+t:P.right:P.left+t,P.bottom]];return[Y,se,...H]}}}if(!vv([E,O],G)){if(i&&!z)return T();if(!C&&r){const B=c(S.clientX,S.clientY);if(B!==null&&B<.1)return T()}vv([E,O],F([f,h]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}function yA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function vA(...e){return t=>e.forEach(n=>yA(n,t))}var Pu=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),i=o.find(wA);if(i){const s=i.props.children,a=o.map(l=>l===i?M.Children.count(s)>1?M.Children.only(null):M.isValidElement(s)?s.props.children:null:l);return w.jsx(ku,{...r,ref:t,children:M.isValidElement(s)?M.cloneElement(s,void 0,a):null})}return w.jsx(ku,{...r,ref:t,children:n})});Pu.displayName="Slot";var ku=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=TA(n);return M.cloneElement(n,{...xA(r,n.props),ref:t?vA(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});ku.displayName="SlotClone";var bA=({children:e})=>w.jsx(w.Fragment,{children:e});function wA(e){return M.isValidElement(e)&&e.type===bA}function xA(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 TA(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)}const SA=(e,t)=>Zs()?t:window.matchMedia(e).matches,EA=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(SA(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},rn="600ms",CA={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:rn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:rn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:rn}},PA={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:rn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:rn}},Iu={drawer:e=>e==="left"?CA:PA,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:rn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:rn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:rn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:rn},enter:{opacity:1,scale:[1.05,1],animationDuration:rn},exit:{opacity:0,scale:.97,animationDuration:rn}}},kA=ti("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"}}),IA={top:0,left:0,right:0,bottom:-1},OA=e=>e*.62,_A=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),l=OA(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.jsx(St.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:IA,whileDrag:{cursor:"grabbing"},className:ze("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})},Ou={drawer:"right",sheet:"none",dialog:"none"},bv=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),l=EA("(min-width: 48rem)"),c=e!=="dialog",u=l?e==="drawer"?i.position:Ou[e]:r?Ou[e]:Ou.sheet,d=l||r?Iu[e]:Iu.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=Do({open:i.open,onOpenChange:i.onChange}),v=ma(m),y=Fo(m),x=Mo(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:g,getFloatingProps:S}=No([v,y,x]),T=i.trigger,E=ho(void 0),O=()=>i.onChange(!1);return w.jsxs(b.Fragment,{children:[i.trigger?w.jsx(b.Fragment,{children:i.asChild?w.jsx(Pu,{ref:p.setReference,...g({layoutId:i.layoutId}),children:T}):w.jsx(St.button,{ref:p.setReference,...g(),layoutId:i.layoutId,type:"button",children:T})}):null,w.jsx(Ao,{children:w.jsx(Ci,{presenceAffectsLayout:!0,children:i.open?w.jsx(oA,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:w.jsx($i,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:w.jsxs(St.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:kA({position:u,type:h}),exit:"exit",layoutId:i.layoutId,initial:"initial",ref:p.setFloating,style:h==="drawer"?{width:E}:{height:E},variants:f,...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:O,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(ig,{})})}):null,c&&t?w.jsx(_A,{onChange:i.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})}):null})})]})},wv=b.createContext(""),AA=e=>{var o;const[t,n]=b.useState(!1),r=e.items.find(i=>i.props.id===e.active);return w.jsxs("div",{className:"my-4 px-8 flex min-w-full text-center lg:hidden",children:[w.jsx(Yn,{className:"min-w-full",onClick:()=>n(!0),children:(o=r==null?void 0:r.props)==null?void 0:o.title}),w.jsx(bv,{closable:!0,forceType:!0,onChange:n,open:t,type:"dialog",children:w.jsx("ul",{className:"mt-4 space-y-4",children:e.items.map(i=>{const s=i.props,a=()=>{e.setActive(s.id),n(!1)};return w.jsx("li",{className:"min-w-full",children:w.jsx(Yn,{className:"w-full",onClick:a,theme:s.id===e.active?"primary":"secondary",children:s.title})},s.id)})})})]})},MA=e=>{const[t,n]=dy(e.active),r=ho(0),o=ho(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useEffect(()=>{const c=i.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},d=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",d);let f=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(e.active===""&&h!==""&&(f=c.querySelector(`li[data-id=${h}]`),n(h)),f===null){f=c.querySelector("li[data-id]");const p=f.getAttribute("data-id")||"";n(p)}return u(f),()=>window.removeEventListener("resize",d)},[]),b.useEffect(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=b.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return w.jsx(wv.Provider,{value:t,children:w.jsx(uy,{container:"pt-0",className:e.className,header:w.jsxs("header",{ref:i,className:"relative mb-2 border-b border-card-border",children:[w.jsx(St.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"duration-300 absolute bottom-0 hidden h-0.5 w-28 bg-primary transition-all lg:block"}),w.jsxs("nav",{children:[w.jsx(AA,{setActive:n,items:a,active:t}),w.jsx("ul",{className:"hidden justify-between divide-x divide-card-border overflow-x-auto md:justify-start lg:flex",children:a.map(c=>{const u=c.props;return w.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full data-[active=true]:text-primary md:w-auto",children:w.jsx(s,{"data-id":u.id,onClick:l,"aria-current":"page",className:"block w-full whitespace-nowrap px-10 py-4 font-medium",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})]})]}),children:e.children})})},DA=()=>b.useContext(wv),NA=e=>{const t=DA();return w.jsx(b.Fragment,{children:e.id===t?e.children:null})},Vo=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[la(10),mu({fallbackAxisSideDirection:"end"}),pu(),Vy({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Do({open:n,middleware:i,transform:!0,whileElementsMounted:ia,onOpenChange:(p,m)=>{var y;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(y=e.onChange)==null||y.call(e,p))}}),c=ma(l),u=Mo(l),d=Fo(l),{getReferenceProps:f,getFloatingProps:h}=No([c,u,d]);return w.jsxs(b.Fragment,{children:[w.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(Ao,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx($i,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,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,...h(),children:[w.jsx(Uy,{ref:o,context:l,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]})})})]})},xv=300,Tv=({children:e,placement:t,enabled:n,as:r,title:o,...i})=>{const[s,a]=b.useState(!1),l=b.useRef(null),c=r||"span",{refs:u,floatingStyles:d,context:f}=Do({open:s,placement:t,transform:!0,onOpenChange:a,whileElementsMounted:ia,middleware:[la(5),mu({fallbackAxisSideDirection:"start"}),pu(),Vy({element:l,padding:5})]}),h=Zy(f,{move:!0,enabled:n,delay:{open:xv}}),p=lA(f,{enabled:n}),m=Mo(f,{enabled:n}),v=Fo(f,{role:"tooltip",enabled:n}),{getReferenceProps:y,getFloatingProps:x}=No([h,p,m,v]);return w.jsxs(b.Fragment,{children:[w.jsx(c,{ref:u.setReference,...y(i),children:o}),w.jsx(Ao,{children:s&&w.jsxs(to,{...x(),ref:u.setFloating,style:d,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[w.jsx(Uy,{ref:l,context:f,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class ya{static getDescendantProperty(t,n,r=[]){let o,i,s,a,l,c;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(l=0,c=a.length;l<c;l++)ya.getDescendantProperty(a[l],i,r);else i&&ya.getDescendantProperty(a,i,r)}else r.push(t);return r}}class $o{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=$o.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=ya.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=$o.isMatch(s[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=$o.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 $o.indexesOfFirstLetter(t,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(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 Sv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>w.jsxs("div",{className:ze("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(Tv,{title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(og,{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(rg,{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(OP,{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]}),va=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,placeholder:m,hideLeft:v,required:y})=>{const x=d??h,g=Ut(),S=e??g.inputOptionalLabel;return w.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!i,className:ze("group inline-flex w-full gap-1.5",r),children:[w.jsxs("label",{form:u,htmlFor:x,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-hover:border-primary group-error:text-danger",children:[!v&&!n?w.jsx(Sv,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:m,children:S||n?w.jsxs(b.Fragment,{children:[y?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-focus-within:border-primary group-hover:border-primary group-error:border-danger ${f} focus:ring-2 focus:ring-inset focus:ring-primary`,children:[t?w.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?w.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:s}):null]})]}),w.jsx("p",{className:"hidden text-xs empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:block group-error:block group-error:text-danger",children:c}),w.jsx("p",{className:"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})]})},Ev=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>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:[r.label??r.value,t?w.jsx("span",{children:w.jsx(PP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})),FA={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},LA={caseSensitive:!1,sort:!1},VA=[],$A=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:f=!1,...h},p)=>{const m=Ut(),v=b.useRef(null),[y,x]=b.useState(!1),[g,S]=b.useState(""),[T,E]=b.useState(h.value??h.defaultValue??""),[O,I]=b.useState(h.value??h.defaultValue??""),[k,C]=b.useState(null),L=b.useRef(VA),D=t&&g!==""?[{value:g,label:g,"data-dynamic":"true"},...e]:e,V=new $o(D,["value","label"],LA).search(g),P=t?void 0:`^(${e.map(j=>`${qc(j.value)}${j.label?"|"+qc(j.label):""}`).join("|")})$`;b.useEffect(()=>{const j=z.reference.current;if(j)return ws(j)},[]),b.useEffect(()=>{if(h.value){const j=e.find(Y=>Y.value===h.value);E((j==null?void 0:j.label)??h.value)}},[h.value]);const{x:A,y:N,strategy:$,refs:z,context:U}=Do({open:y,transform:!0,onOpenChange:x,whileElementsMounted:ia,middleware:[la(4),M_({padding:10,apply(j){Object.assign(j.elements.floating.style,{width:`${j.rects.reference.width}px`,maxHeight:`${Math.min(480,j.availableHeight)}px`})}})]}),_=hA(U,FA),{getReferenceProps:R,getFloatingProps:Z,getItemProps:re}=No([Fo(U,{role:"listbox"}),Mo(U),gv(U,{activeIndex:k,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:L,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:k,virtual:!0,onNavigate:j=>C(Y=>j??Y)})]),Q=(j,Y)=>{var H,Pe;E(j.value),(H=z.reference.current)==null||H.setAttribute("data-value",j.value),I(j.label??"");const se=bs(v.current,j.value);se&&((Pe=h.onChange)==null||Pe.call(h,se)),x(!1),S(""),C(Y)},G=j=>{var se;const Y=j.target.value;return S(Y),!y&&Y===""?x(!0):(j.target.name=h.name||"",Y?x(!0):(se=h.onChange)==null?void 0:se.call(h,j))},F=()=>{x(!0),S("")},B=()=>{var j;S(""),E(""),(j=z.reference.current)==null||j.setAttribute("data-value",""),I(""),bs(z.reference.current),x(!1)},W=h.id||h.name;return w.jsxs(va,{...h,container:ze("group inline-block w-full",a),error:d,feedback:n,form:h.form,hideLeft:l,id:h.name||h.id,interactive:o,labelClassName:r,left:u,name:h.name,optionalText:s,placeholder:h.placeholder,required:f,rightLabel:i,title:h.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(ng,{size:20}),w.jsx("span",{className:"sr-only",children:m.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",{...R({...h,onChange:G,onFocus:F,pattern:P,ref:z.setReference,name:`${W}-shadow`,id:`${W}-shadow`,onClick:j=>j.currentTarget.focus(),onKeyDown(j){if(j.key==="Escape")return j.currentTarget.blur(),x(!1);if(j.key==="Enter"){if(k!==null&&V[k])return j.preventDefault(),Q(V[k],k);if(V.length===1)return j.preventDefault(),Q(V[0],0)}}}),"data-value":T,"data-error":!!d,"data-name":W,"data-target":W,required:f,value:y?g:O||T,"aria-autocomplete":"list",autoComplete:"off",className:ze("input placeholder-input-mask group h-10 w-full flex-1 rounded-md bg-transparent px-2 py-1 text-base text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",c||g?"pe-12":"",u?"ps-8":"",h.className)}),w.jsx("input",{id:W,name:W,type:"hidden","data-origin":W,ref:p,required:f,defaultValue:h.value||T||void 0}),w.jsx(Ao,{preserveTabOrder:!0,children:y?w.jsx($i,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsx("ul",{...Z({ref:z.setFloating,style:{position:$,left:A??0,top:N??0,..._.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:V.map((j,Y)=>b.createElement(Ev,{...re({onClick:()=>Q(j,Y),ref:se=>void(L.current[Y]=se),selected:k===Y,active:T===j.value}),key:`${j.value}-option`,option:j,selected:k===Y,active:T===j.value}))})}):null})]})}),Cv=b.forwardRef(({children:e,error:t,className:n="",size:r,container:o,...i},s)=>w.jsxs("label",{"data-disabled":i.disabled,"aria-disabled":i.disabled,className:ze("group flex flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed w-fit",o),children:[w.jsx("input",{...i,ref:s,type:"checkbox",className:ze("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",n)}),e,w.jsx("span",{className:"min-w-full flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:t})]})),ji=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,...h},p)=>{const m=h.id??h.name,v=b.useRef(null);return b.useEffect(()=>{if(v.current===null)return;const y=v.current,x=ws(v.current),g=S=>{const T=S;if(T.key==="Enter"&&y.enterKeyHint==="next"){const E=y.getAttribute("data-next");if(E){const O=document.getElementById(E);if(O)return O.focus(),void T.preventDefault()}}};return y.addEventListener("keydown",g),()=>{x(),y.removeEventListener("keydown",g)}},[]),w.jsx(va,{info:n,container:ze("group inline-block w-full",l),error:f,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:s,interactive:i,form:h.form,id:h.name||h.id,name:h.name,labelClassName:r,title:h.title,placeholder:h.placeholder,required:h.required,children:w.jsx(zg,{...h,type:e,"data-next":o,ref:Ol(p,v),id:m,name:m,className:ze("input placeholder-input-mask group h-10 w-full flex-1 rounded-md bg-transparent px-2 py-1 text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",u?"pe-4":"",d?"ps-4":"",h.className)})})}),Pv=new Date(1970,11,31),_u={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},kv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},jA={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")},Au=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},RA=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},s)=>{const a=b.useId(),l=Ut(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,d]=b.useState(e||void 0),[f,h]=b.useState(!1),p=Au(c,Pv).flatMap(E=>kn.keyof(_u,E.type)?_u[E.type](E.value):[]),m=Au(c,Pv).reduce((E,O)=>E+(kn.keyof(kv,O.type)?kv[O.type](O.value):""),""),[v,y]=b.useState(u?Au(c,u).reduce((E,O)=>E+(kn.keyof(_u,O.type)?jA[O.type](u,O.value):""),""):""),x=E=>{const O=E.target.value;if(y(O),p.length===O.length&&p.every((k,C)=>{const L=O.charAt(C);return typeof k=="string"?L===k:k.test(L)})){const k=yo(jI(O,m,new Date));return d(k),r==null?void 0:r(k)}return d(void 0),r==null?void 0:r(void 0)},g=E=>(d(E),r==null||r(E),y(E?Rk(E,m):"")),S=fg(u),T=S?u.toISOString():void 0;return w.jsx(ji,{...i,mask:p,value:v,"data-value":T,"data-target":i.name,className:"uppercase",formNoValidate:!f,placeholder:m,onChange:x,required:i.required??!0,error:f?void 0:i.error,name:void 0,id:void 0,right:w.jsxs(b.Fragment,{children:[w.jsx("input",{"data-origin":i.name,hidden:!0,type:"date",id:i.name,ref:s,name:i.name,defaultValue:T}),w.jsx(Vo,{open:f,onChange:h,trigger:w.jsxs("span",{"aria-labelledby":a,children:[w.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),w.jsx(CP,{})]}),buttonProps:{"aria-describedby":a},children:w.jsx(cy,{...i,locale:t,changeOnlyOnClick:!0,markToday:o,onChange:g,disabledDate:n,date:S?u:void 0})})]})})}),BA=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zA=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],WA=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],HA=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Iv=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Ov(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?HA:WA:t.binary?zA:BA,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=Iv(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 l=Iv(Number(e),t.locale,s),c=n[a];return i+l+r+c}var Mu={exports:{}},ba={exports:{}},Le={};/** @license React v16.13.1
|
|
173
178
|
* react-is.production.min.js
|
|
174
179
|
*
|
|
175
180
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
176
181
|
*
|
|
177
182
|
* This source code is licensed under the MIT license found in the
|
|
178
183
|
* LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/var
|
|
184
|
+
*/var _v;function UA(){if(_v)return Le;_v=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,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function g(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case l:case c:case r:case i:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case h:case s:return T;default:return E}}case n:return E}}}function S(T){return g(T)===c}return Le.AsyncMode=l,Le.ConcurrentMode=c,Le.ContextConsumer=a,Le.ContextProvider=s,Le.Element=t,Le.ForwardRef=u,Le.Fragment=r,Le.Lazy=p,Le.Memo=h,Le.Portal=n,Le.Profiler=i,Le.StrictMode=o,Le.Suspense=d,Le.isAsyncMode=function(T){return S(T)||g(T)===l},Le.isConcurrentMode=S,Le.isContextConsumer=function(T){return g(T)===a},Le.isContextProvider=function(T){return g(T)===s},Le.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Le.isForwardRef=function(T){return g(T)===u},Le.isFragment=function(T){return g(T)===r},Le.isLazy=function(T){return g(T)===p},Le.isMemo=function(T){return g(T)===h},Le.isPortal=function(T){return g(T)===n},Le.isProfiler=function(T){return g(T)===i},Le.isStrictMode=function(T){return g(T)===o},Le.isSuspense=function(T){return g(T)===d},Le.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===h||T.$$typeof===s||T.$$typeof===a||T.$$typeof===u||T.$$typeof===v||T.$$typeof===y||T.$$typeof===x||T.$$typeof===m)},Le.typeOf=g,Le}var Ve={};/** @license React v16.13.1
|
|
180
185
|
* react-is.development.js
|
|
181
186
|
*
|
|
182
187
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
183
188
|
*
|
|
184
189
|
* This source code is licensed under the MIT license found in the
|
|
185
190
|
* LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/var
|
|
191
|
+
*/var Av;function GA(){return Av||(Av=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,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function g(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===h||H.$$typeof===s||H.$$typeof===a||H.$$typeof===u||H.$$typeof===v||H.$$typeof===y||H.$$typeof===x||H.$$typeof===m)}function S(H){if(typeof H=="object"&&H!==null){var Pe=H.$$typeof;switch(Pe){case t:var it=H.type;switch(it){case l:case c:case r:case i:case o:case d:return it;default:var Ue=it&&it.$$typeof;switch(Ue){case a:case u:case p:case h:case s:return Ue;default:return Pe}}case n:return Pe}}}var T=l,E=c,O=a,I=s,k=t,C=u,L=r,D=p,V=h,P=n,A=i,N=o,$=d,z=!1;function U(H){return z||(z=!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.")),_(H)||S(H)===l}function _(H){return S(H)===c}function R(H){return S(H)===a}function Z(H){return S(H)===s}function re(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function Q(H){return S(H)===u}function G(H){return S(H)===r}function F(H){return S(H)===p}function B(H){return S(H)===h}function W(H){return S(H)===n}function j(H){return S(H)===i}function Y(H){return S(H)===o}function se(H){return S(H)===d}Ve.AsyncMode=T,Ve.ConcurrentMode=E,Ve.ContextConsumer=O,Ve.ContextProvider=I,Ve.Element=k,Ve.ForwardRef=C,Ve.Fragment=L,Ve.Lazy=D,Ve.Memo=V,Ve.Portal=P,Ve.Profiler=A,Ve.StrictMode=N,Ve.Suspense=$,Ve.isAsyncMode=U,Ve.isConcurrentMode=_,Ve.isContextConsumer=R,Ve.isContextProvider=Z,Ve.isElement=re,Ve.isForwardRef=Q,Ve.isFragment=G,Ve.isLazy=F,Ve.isMemo=B,Ve.isPortal=W,Ve.isProfiler=j,Ve.isStrictMode=Y,Ve.isSuspense=se,Ve.isValidElementType=g,Ve.typeOf=S}()),Ve}var Mv;function Dv(){return Mv||(Mv=1,process.env.NODE_ENV==="production"?ba.exports=UA():ba.exports=GA()),ba.exports}/*
|
|
187
192
|
object-assign
|
|
188
193
|
(c) Sindre Sorhus
|
|
189
194
|
@license MIT
|
|
190
|
-
*/var Du,
|
|
191
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
192
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
193
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
194
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
195
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rb(e,t){if(e){if(typeof e=="string")return zu(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 zu(e,t)}}function zu(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 jD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function BD(e){if(Array.isArray(e))return e}function ob(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 Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ob(Object(n),!0).forEach(function(r){Wu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ob(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ta(e,t){if(e==null)return{};var n=zD(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 zD(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 Hu=b.forwardRef(function(e,t){var n=e.children,r=Ta(e,_D),o=sb(r),i=o.open,s=Ta(o,DD);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(Je(Je({},s),{},{open:i})))});Hu.displayName="Dropzone";var ib={disabled:!1,getFilesFromEvent:eD,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};Hu.defaultProps=ib,Hu.propTypes={children:ze.func,accept:ze.objectOf(ze.arrayOf(ze.string)),multiple:ze.bool,preventDropOnDocument:ze.bool,noClick:ze.bool,noKeyboard:ze.bool,noDrag:ze.bool,noDragEventsBubbling:ze.bool,minSize:ze.number,maxSize:ze.number,maxFiles:ze.number,disabled:ze.bool,getFilesFromEvent:ze.func,onFileDialogCancel:ze.func,onFileDialogOpen:ze.func,useFsAccessApi:ze.bool,autoFocus:ze.bool,onDragEnter:ze.func,onDragLeave:ze.func,onDragOver:ze.func,onDrop:ze.func,onDropAccepted:ze.func,onDropRejected:ze.func,onError:ze.func,validator:ze.func};var Uu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function sb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Je(Je({},ib),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.autoFocus,y=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,P=t.noDragEventsBubbling,D=t.onError,_=t.validator,I=b.useMemo(function(){return OD(n)},[n]),V=b.useMemo(function(){return kD(n)},[n]),F=b.useMemo(function(){return typeof g=="function"?g:ab},[g]),$=b.useMemo(function(){return typeof m=="function"?m:ab},[m]),C=b.useRef(null),O=b.useRef(null),M=b.useReducer(WD,Uu),L=Bu(M,2),H=L[0],Y=L[1],k=H.isFocused,R=H.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&PD()),oe=function(){!Z.current&&R&&setTimeout(function(){if(O.current){var ae=O.current.files;ae.length||(Y({type:"closeDialog"}),$())}},300)};b.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[O,R,$,Z]);var J=b.useRef([]),G=function(ae){C.current&&C.current.contains(ae.target)||(ae.preventDefault(),J.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",eb,!1),document.addEventListener("drop",G,!1)),function(){y&&(document.removeEventListener("dragover",eb),document.removeEventListener("drop",G))}},[C,y]),b.useEffect(function(){return!r&&w&&C.current&&C.current.focus(),function(){}},[C,w,r]);var N=b.useCallback(function(Q){D?D(Q):console.error(Q)},[D]),j=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q),J.current=[].concat(FD(J.current),[Q.target]),xa(Q)&&Promise.resolve(o(Q)).then(function(ae){if(!(wa(Q)&&!P)){var _e=ae.length,Ke=_e>0&&TD({files:ae,accept:I,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:_}),kt=_e>0&&!Ke;Y({isDragAccept:Ke,isDragReject:kt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Q)}}).catch(function(ae){return N(ae)})},[o,c,N,P,I,s,i,a,l,_]),W=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q);var ae=xa(Q);if(ae&&Q.dataTransfer)try{Q.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(Q),!1},[d,P]),U=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q);var ae=J.current.filter(function(Ke){return C.current&&C.current.contains(Ke)}),_e=ae.indexOf(Q.target);_e!==-1&&ae.splice(_e,1),J.current=ae,!(ae.length>0)&&(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),xa(Q)&&u&&u(Q))},[C,u,P]),z=b.useCallback(function(Q,ae){var _e=[],Ke=[];Q.forEach(function(kt){var Nt=Qv(kt,I),Vt=Bu(Nt,2),Gr=Vt[0],qo=Vt[1],Ko=Jv(kt,s,i),el=Bu(Ko,2),Yd=el[0],qd=el[1],Kd=_?_(kt):null;if(Gr&&Yd&&!Kd)_e.push(kt);else{var Zd=[qo,qd];Kd&&(Zd=Zd.concat(Kd)),Ke.push({file:kt,errors:Zd.filter(function(jL){return jL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(kt){Ke.push({file:kt,errors:[xD]})}),_e.splice(0)),Y({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),f&&f(_e,Ke,ae),Ke.length>0&&p&&p(Ke,ae),_e.length>0&&h&&h(_e,ae)},[Y,a,I,s,i,l,f,h,p,_]),te=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q),J.current=[],xa(Q)&&Promise.resolve(o(Q)).then(function(ae){wa(Q)&&!P||z(ae,Q)}).catch(function(ae){return N(ae)}),Y({type:"reset"})},[o,z,N,P]),B=b.useCallback(function(){if(Z.current){Y({type:"openDialog"}),F();var Q={multiple:a,types:V};window.showOpenFilePicker(Q).then(function(ae){return o(ae)}).then(function(ae){z(ae,null),Y({type:"closeDialog"})}).catch(function(ae){ID(ae)?($(ae),Y({type:"closeDialog"})):AD(ae)?(Z.current=!1,O.current?(O.current.value=null,O.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(ae)});return}O.current&&(Y({type:"openDialog"}),F(),O.current.value=null,O.current.click())},[Y,F,$,v,z,N,V,a]),Pe=b.useCallback(function(Q){!C.current||!C.current.isEqualNode(Q.target)||(Q.key===" "||Q.key==="Enter"||Q.keyCode===32||Q.keyCode===13)&&(Q.preventDefault(),B())},[C,B]),ot=b.useCallback(function(){Y({type:"focus"})},[]),He=b.useCallback(function(){Y({type:"blur"})},[]),it=b.useCallback(function(){S||(CD()?setTimeout(B,0):B())},[S,B]),de=function(ae){return r?null:ae},Ee=function(ae){return T?null:de(ae)},ce=function(ae){return E?null:de(ae)},Oe=function(ae){P&&ae.stopPropagation()},ht=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=Q.refKey,_e=ae===void 0?"ref":ae,Ke=Q.role,kt=Q.onKeyDown,Nt=Q.onFocus,Vt=Q.onBlur,Gr=Q.onClick,qo=Q.onDragEnter,Ko=Q.onDragOver,el=Q.onDragLeave,Yd=Q.onDrop,qd=Ta(Q,MD);return Je(Je(Wu({onKeyDown:Ee(vn(kt,Pe)),onFocus:Ee(vn(Nt,ot)),onBlur:Ee(vn(Vt,He)),onClick:de(vn(Gr,it)),onDragEnter:ce(vn(qo,j)),onDragOver:ce(vn(Ko,W)),onDragLeave:ce(vn(el,U)),onDrop:ce(vn(Yd,te)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,C),!r&&!T?{tabIndex:0}:{}),qd)}},[C,Pe,ot,He,it,j,W,U,te,T,E,r]),Ie=b.useCallback(function(Q){Q.stopPropagation()},[]),pt=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=Q.refKey,_e=ae===void 0?"ref":ae,Ke=Q.onChange,kt=Q.onClick,Nt=Ta(Q,ND),Vt=Wu({accept:I,multiple:a,type:"file",style:{display:"none"},onChange:de(vn(Ke,te)),onClick:de(vn(kt,Ie)),tabIndex:-1},_e,O);return Je(Je({},Vt),Nt)}},[O,n,a,te,r]);return Je(Je({},H),{},{isFocused:k&&!r,getRootProps:ht,getInputProps:pt,rootRef:C,inputRef:O,open:de(B)})}function WD(e,t){switch(t.type){case"focus":return Je(Je({},e),{},{isFocused:!0});case"blur":return Je(Je({},e),{},{isFocused:!1});case"openDialog":return Je(Je({},Uu),{},{isFileDialogActive:!0});case"closeDialog":return Je(Je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Je(Je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Je(Je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Je({},Uu);default:return e}}function ab(){}const HD={isImage:e=>e.type.includes("image")},UD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(HD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:kv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:kv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(xr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(po,{})})]}):x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[x.jsx(PP,{size:48}),x.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(xr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(po,{className:"text-danger"})})]})},GD=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(UD,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),YD=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(GD,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(b.Fragment,{children:e.idle}),qD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(_P,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),KD=({idle:e=qD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=d=>{n==null||n(d),i(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=sb({onDrop:s});return x.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:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(YD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},ZD=["INPUT","SELECT"],Gu=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{ZD.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},XD=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},QD=({children:e,className:t="",size:n,...r})=>x.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:[x.jsx("input",{...r,type:"radio",className:Xe("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]}),Vr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const g=Qt(),v=b.useRef(null),w=p.id??p.name;b.useImperativeHandle(m,()=>v.current),b.useEffect(()=>{if(v.current===null)return;const S=v.current,T=vs(v.current),E=()=>S.setAttribute("data-selected","true");return S.addEventListener("change",E),()=>{T(),S.removeEventListener("change",E)}},[]);const y=()=>{var S;return(S=v.current)==null?void 0:S.focus()};return x.jsx(ya,{container:Xe("group inline-block w-full",c),error:h,feedback:o,hideLeft:u,left:f,info:n,optionalText:l,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:x.jsx("label",{htmlFor:w,children:x.jsxs("button",{onClick:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(tg,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:w,name:w,value:p.value,required:e,ref:Ol(m,v),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:Xe("input appearance-none select group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-foreground placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(S=>x.jsx("option",{...S,children:S.label??S.value},`${w}-select-option-${S.value}`))]})})}),Yu=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},JD=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),l=s,c=b.useRef(null),u=Yu(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=f=>{var m;const p=f.target.dataset.checked!=="true";a(p),(m=r==null?void 0:r.onCheck)==null||m.call(r,p),c.current!==null&&(ys(c.current,p.toString()),c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:Xe("flex flex-wrap items-center",t),children:[x.jsx("input",{...r,ref:c,hidden:!0,type:"checkbox",checked:l,onChange:f=>a(f.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,className:"duration-300 ease-in-out relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"duration-300 duration-300 ease-in-out inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("span",{className:"ml-3 text-sm",id:`${i}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),Sa=0,dr=1,Lo=2,lb=4;function Ri(e,t){return n=>e(t(n))}function eM(e,t){return t(e)}function cb(e,t){return n=>e(t,n)}function ub(e,t){return()=>e(t)}function Ea(e,t){return t(e),e}function Ye(...e){return e}function tM(e){e()}function db(e){return()=>e}function nM(...e){return()=>{e.map(tM)}}function qu(e){return e!==void 0}function $r(){}function $e(e,t){return e(dr,t)}function be(e,t){e(Sa,t)}function Ku(e){e(Lo)}function Dt(e){return e(lb)}function ue(e,t){return $e(e,cb(t,Sa))}function bn(e,t){const n=e(dr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Lo:e.splice(0,e.length);return;case dr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Sa:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case dr:o(t);break;case Sa:t=o;break;case lb:return t}return n(r,o)}}function rM(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case dr:return i?n===i?void 0:(r(),n=i,t=$e(e,i),t):(r(),$r);case Lo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Yt(e){return Ea(Ce(),t=>ue(e,t))}function Mt(e,t){return Ea(X(t),n=>ue(e,n))}function oM(...e){return t=>e.reduceRight(eM,t)}function q(e,...t){const n=oM(...t);return(r,o)=>{switch(r){case dr:return $e(e,n(o));case Lo:Ku(e);return}}}function fb(e,t){return e===t}function qe(e=fb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function se(e){return t=>Ri(t,e)}function wn(e){return t=>()=>t(e)}function xn(e,t){return n=>r=>n(t=e(t,r))}function Vo(e){return t=>n=>{e>0?e--:t(n)}}function fr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function hb(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...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);$e(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function pb(...e){return function(t,n){switch(t){case dr:return nM(...e.map(r=>$e(r,n)));case Lo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=fb){return q(e,qe(t))}function bt(...e){const t=Ce(),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);$e(i,l=>{n[s]=l,r=r|a,r===o&&be(t,n)})}),function(i,s){switch(i){case dr:return r===o&&s(n),$e(t,s);case Lo:return Ku(t);default:throw new Error(`unrecognized action ${i}`)}}}function Ne(e,t=[],{singleton:n}={singleton:!0}){return{id:iM(),constructor:e,dependencies:t,singleton:n}}const iM=()=>Symbol();function sM(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(l=>n(l)));return s&&t.set(r,a),a};return n(e)}function aM(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 Ca=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 l(v,w){v.propsReady&&be(v.propsReady,!1);for(const y of r){const S=v[t.required[y]];be(S,w[y])}for(const y of o)if(y in w){const S=v[t.optional[y]];be(S,w[y])}v.propsReady&&be(v.propsReady,!0)}function c(v){return i.reduce((w,y)=>(w[y]=S=>{const T=v[t.methods[y]];be(T,S)},w),{})}function u(v){return s.reduce((w,y)=>(w[y]=rM(v[t.events[y]]),w),{})}const d=b.forwardRef((v,w)=>{const{children:y,...S}=v,[T]=b.useState(()=>Ea(sM(e),P=>l(P,S))),[E]=b.useState(ub(u,T));return Ca(()=>{for(const P of s)P in S&&$e(E[P],S[P]);return()=>{Object.values(E).map(Ku)}},[S,E,T]),Ca(()=>{l(T,S)}),b.useImperativeHandle(w,db(c(T))),b.createElement(a.Provider,{value:T},n?b.createElement(n,aM([...r,...o,...s],S),y):y)}),f=v=>b.useCallback(cb(be,b.useContext(a)[v]),[v]),h=v=>{const y=b.useContext(a)[v],S=b.useCallback(T=>$e(y,T),[y]);return b.useSyncExternalStore(S,()=>Dt(y),()=>Dt(y))},p=v=>{const y=b.useContext(a)[v],[S,T]=b.useState(ub(Dt,y));return Ca(()=>$e(y,E=>{E!==S&&T(db(E))}),[y,S]),S},m=b.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(v,w)=>{const S=b.useContext(a)[v];Ca(()=>$e(S,w),[w,S])}}}const lM=typeof document<"u"?b.useLayoutEffect:b.useEffect;var qt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(qt||{});const cM={0:"debug",1:"log",2:"warn",3:"error"},uM=()=>typeof globalThis>"u"?window:globalThis,hr=Ne(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var i;const s=(i=uM().VIRTUOSO_LOG_LEVEL)!=null?i:Dt(e);o>=s&&console[cM[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Xu(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 Tn(e,t=!0){return Xu(e,t).callbackRef}function mb(e,t,n,r,o,i,s){const a=b.useCallback(l=>{const c=dM(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=s?s.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),i==null||i(fM("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,i,s,r]);return Xu(a,n)}function dM(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 l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},qt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function fM(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,qt.WARN),t==="normal"?0:parseInt(t??"0",10)}function on(e,t){return Math.round(e.getBoundingClientRect()[t])}function gb(e,t){return Math.abs(e-t)<1.01}function yb(e,t,n,r=$r,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,g=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};d.suppressFlushSync?v():Qd.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 d=o||i.current;return r(o||i.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(d){const f=i.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,g;f===window?(m=Math.max(on(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=f.scrollHeight,p=on(f,"height"),g=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),gb(p,m)||d.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(s.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,f.scrollTo(d)}function u(d){i.current.scrollBy(d)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const Ft=Ne(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),i=Ce(),s=Ce(),a=X(0),l=X(0),c=X(0),u=X(0),d=Ce(),f=Ce(),h=X(!1);return ue(q(e,se(({scrollTop:p})=>p)),t),ue(q(e,se(({scrollHeight:p})=>p)),s),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),ji={lvl:0};function vb(e,t,n,r=ji,o=ji){return{k:e,v:t,lvl:n,l:r,r:o}}function We(e){return e===ji}function $o(){return ji}function Qu(e,t){if(We(e))return ji;const{k:n,l:r,r:o}=e;if(t===n){if(We(r))return o;if(We(o))return r;{const[i,s]=bb(r);return Pa(mt(e,{k:i,v:s,l:wb(r)}))}}else return t<n?Pa(mt(e,{l:Qu(r,t)})):Pa(mt(e,{r:Qu(o,t)}))}function Bi(e,t){if(!We(e))return t===e.k?e.v:t<e.k?Bi(e.l,t):Bi(e.r,t)}function sn(e,t,n="k"){if(We(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return sn(e.l,t,n)}function Kt(e,t,n){return We(e)?vb(t,n,1):t===e.k?mt(e,{k:t,v:n}):t<e.k?xb(mt(e,{l:Kt(e.l,t,n)})):xb(mt(e,{r:Kt(e.r,t,n)}))}function Ju(e,t,n){if(We(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(Ju(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Ju(s,t,n))),a}function Rr(e){return We(e)?[]:[...Rr(e.l),{k:e.k,v:e.v},...Rr(e.r)]}function bb(e){return We(e.r)?[e.k,e.v]:bb(e.r)}function wb(e){return We(e.r)?e.l:Pa(mt(e,{r:wb(e.r)}))}function mt(e,t){return vb(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 ed(e){return We(e)||e.lvl>e.r.lvl}function xb(e){return td(Sb(e))}function Pa(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(ed(t))return Sb(mt(e,{lvl:r-1}));if(!We(t)&&!We(t.r))return mt(t.r,{l:mt(t,{r:t.r.l}),r:mt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(ed(e))return td(mt(e,{lvl:r-1}));if(!We(n)&&!We(n.l)){const o=n.l,i=ed(o)?n.lvl-1:n.lvl;return mt(o,{l:mt(e,{r:o.l,lvl:r-1}),r:td(mt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ka(e,t,n){if(We(e))return[];const r=sn(e,t)[0];return hM(Ju(e,r,n))}function Tb(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:l}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function hM(e){return Tb(e,({k:t,v:n})=>({index:t,value:n}))}function td(e){const{r:t,lvl:n}=e;return!We(t)&&!We(t.r)&&t.lvl===n&&t.r.lvl===n?mt(t,{l:mt(e,{r:t.l}),lvl:n+1}):e}function Sb(e){const{l:t}=e;return!We(t)&&t.lvl===e.lvl?mt(t,{r:mt(e,{l:t.r})}):e}function Oa(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 Eb(e,t,n){return e[Oa(e,t,n)]}function pM(e,t,n,r){const o=Oa(e,t,r),i=Oa(e,n,r,o);return e.slice(o,i+1)}const nd=Ne(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function mM(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 Cb(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 gM(e,t){let n=We(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),We(e)){e=Kt(e,0,o);continue}const a=ka(e,i-1,s+1);if(a.some(mM(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(s>=u||o===f)&&(e=Qu(e,u)):(c=f!==o,l=!0),d>s&&s>=u&&f!==o&&(e=Kt(e,s+1,f));c&&(e=Kt(e,i,o))}return[e,n]}function yM(){return{offsetTree:[],sizeTree:$o(),groupOffsetTree:$o(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function rd({index:e},t){return t===e?0:t<e?-1:1}function vM({offset:e},t){return t===e?0:t<e?-1:1}function bM(e){return{index:e.index,value:e}}function wM(e,t,n,r=0){return r>0&&(t=Math.max(t,Eb(e,r,rd).offset)),Tb(pM(e,t,n,vM),bM)}function od(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Oa(o,t-1,rd),a=o[l].offset;const u=sn(n,t-1);i=u[0],s=u[1],o.length&&o[l].size===sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of ka(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({offset:f,size:u,index:c}),i=c,a=f,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function xM(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,qt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&We(i)&&t.length===2){const f=t[0].size,h=t[1].size;s=n.reduce((p,m)=>Kt(Kt(p,m,f),m+1,h),s)}else[s,a]=gM(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=od(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,zi(h,l,o)),$o()),groupIndices:n}}function zi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=Eb(t,e,rd),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function TM(e){return typeof e.groupIndex<"u"}function Pb(e,t,n){if(TM(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=kb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function kb(e,t){if(!Ia(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ia(e){return!We(e.groupOffsetTree)}function SM(e){return Rr(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 EM={offsetHeight:"height",offsetWidth:"width"},Sn=Ne(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Mt(r,0),i=Ce(),s=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((T,E)=>on(T,EM[E])),f=X(void 0),h=X(0),p=yM(),m=Mt(q(n,we(l,e,h),xn(xM,p),qe()),p),g=Mt(q(l,qe(),xn((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),se(({prev:T})=>T)),[]);ue(q(l,pe(T=>T.length>0),we(m,h),se(([T,E,P])=>{const D=T.reduce((_,I,V)=>Kt(_,I,zi(I,E.offsetTree,P)||V),$o());return{...E,groupIndices:T,groupOffsetTree:D}})),m),ue(q(r,we(m),pe(([T,{lastIndex:E}])=>T<E),se(([T,{lastIndex:E,lastSize:P}])=>[{startIndex:T,endIndex:E,size:P}])),n),ue(c,u);const v=Mt(q(c,se(T=>T===void 0)),!0);ue(q(u,pe(T=>T!==void 0&&We(Dt(m).sizeTree)),se(T=>[{startIndex:0,endIndex:0,size:T}])),n);const w=Yt(q(n,we(m),xn(({sizes:T},[E,P])=>({changed:P!==T,sizes:P}),{changed:!1,sizes:p}),se(T=>T.changed)));$e(q(a,xn((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),se(T=>T.diff)),T=>{const{groupIndices:E}=Dt(m);if(T>0)be(t,!0),be(i,T+Cb(T,E));else if(T<0){const P=Dt(g);P.length>0&&(T-=Cb(-T,P)),be(s,T)}}),$e(q(a,we(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},qt.ERROR)});const y=Yt(i);ue(q(i,we(m),se(([T,E])=>{const P=E.groupIndices.length>0,D=[],_=E.lastSize;if(P){const I=Bi(E.sizeTree,0);let V=0,F=0;for(;V<T;){const O=E.groupIndices[F],M=E.groupIndices.length===F+1?1/0:E.groupIndices[F+1]-O-1;D.push({startIndex:O,endIndex:O,size:I}),D.push({startIndex:O+1,endIndex:O+1+M-1,size:_}),F++,V+=M+1}const $=Rr(E.sizeTree);return V!==T&&$.shift(),$.reduce((O,{k:M,v:L})=>{let H=O.ranges;return O.prevSize!==0&&(H=[...O.ranges,{startIndex:O.prevIndex,endIndex:M+T-1,size:O.prevSize}]),{ranges:H,prevIndex:M+T,prevSize:L}},{ranges:D,prevIndex:T,prevSize:0}).ranges}return Rr(E.sizeTree).reduce((I,{k:V,v:F})=>({ranges:[...I.ranges,{startIndex:I.prevIndex,endIndex:V+T-1,size:I.prevSize}],prevIndex:V+T,prevSize:F}),{ranges:[],prevIndex:0,prevSize:_}).ranges})),n);const S=Yt(q(s,we(m,h),se(([T,{offsetTree:E},P])=>{const D=-T;return zi(D,E,P)})));return ue(q(s,we(m,h),se(([T,E,P])=>{if(E.groupIndices.length>0){if(We(E.sizeTree))return E;let _=$o();const I=Dt(g);let V=0,F=0,$=0;for(;V<-T;){$=I[F];const O=I[F+1]-$-1;F++,V+=O+1}if(_=Rr(E.sizeTree).reduce((O,{k:M,v:L})=>Kt(O,Math.max(0,M+T),L),_),V!==-T){const O=Bi(E.sizeTree,$);_=Kt(_,0,O);const M=sn(E.sizeTree,-T+1)[1];_=Kt(_,1,M)}return{...E,sizeTree:_,...od(E.offsetTree,0,_,P)}}else{const _=Rr(E.sizeTree).reduce((I,{k:V,v:F})=>Kt(I,Math.max(0,V+T),F),$o());return{...E,sizeTree:_,...od(E.offsetTree,0,_,P)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:y,firstItemIndex:a,gap:h,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},Ye(hr,nd),{singleton:!0}),CM=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Ob(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!CM)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Wi=Ne(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ce(),p=Ce(),m=X(0);let g=null,v=null,w=null;function y(){g&&(g(),g=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ue(q(h,we(e,i,t,m,l,c,f),we(r,u,d),se(([[S,T,E,P,D,_,I,V],F,$,C])=>{const O=Ob(S),{align:M,behavior:L,offset:H}=O,Y=P-1,k=Pb(O,T,Y);let R=zi(k,T.offsetTree,F)+_;M==="end"?(R+=$+sn(T.sizeTree,k)[1]-E+C,k===Y&&(R+=I)):M==="center"?R+=($+sn(T.sizeTree,k)[1]-E+C)/2:R-=D,H&&(R+=H);const Z=oe=>{y(),oe?(V("retrying to scroll to",{location:S},qt.DEBUG),be(h,S)):(be(p,!0),V("list did not change, scroll successful",{},qt.DEBUG))};if(y(),L==="smooth"){let oe=!1;w=$e(n,J=>{oe=oe||J}),g=bn(a,()=>{Z(oe)})}else g=bn(q(n,PM(150)),Z);return v=setTimeout(()=>{y()},1200),be(o,!0),V("scrolling from index to",{index:k,top:R,behavior:L},qt.DEBUG),{top:R,behavior:L}})),s),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ye(Sn,Ft,hr),{singleton:!0});function PM(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Hi="up",Ui="down",kM="none",OM={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},IM=0,Gi=Ne(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(IM),f=Mt(q(pb(q(ge(t),Vo(1),wn(!0)),q(ge(t),Vo(1),wn(!1),hb(100))),qe()),!1),h=Mt(q(pb(q(i,wn(!0)),q(i,wn(!1),hb(200))),qe()),!1);ue(q(bt(ge(t),ge(d)),se(([w,y])=>w<=y),qe()),a),ue(q(a,fr(50)),c);const p=Yt(q(bt(e,ge(n),ge(r),ge(o),ge(u)),xn((w,[{scrollTop:y,scrollHeight:S},T,E,P,D])=>{const _=y+T-S>-D,I={viewportHeight:T,scrollTop:y,scrollHeight:S};if(_){let F,$;return y>w.state.scrollTop?(F="SCROLLED_DOWN",$=w.state.scrollTop-y):(F="SIZE_DECREASED",$=w.state.scrollTop-y||w.scrollTopDelta),{atBottom:!0,state:I,atBottomBecause:F,scrollTopDelta:$}}let V;return I.scrollHeight>w.state.scrollHeight?V="SIZE_INCREASED":T<w.state.viewportHeight?V="VIEWPORT_HEIGHT_DECREASING":y<w.state.scrollTop?V="SCROLLING_UPWARDS":V="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:V,state:I}},OM),qe((w,y)=>w&&w.atBottom===y.atBottom))),m=Mt(q(e,xn((w,{scrollTop:y,scrollHeight:S,viewportHeight:T})=>{if(gb(w.scrollHeight,S))return{scrollTop:y,scrollHeight:S,jump:0,changed:!1};{const E=S-(y+T)<1;return w.scrollTop!==y&&E?{scrollHeight:S,scrollTop:y,jump:w.scrollTop-y,changed:!0}:{scrollHeight:S,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(w=>w.changed),se(w=>w.jump)),0);ue(q(p,se(w=>w.atBottom)),s),ue(q(s,fr(50)),l);const g=X(Ui);ue(q(e,se(({scrollTop:w})=>w),qe(),xn((w,y)=>Dt(h)?{direction:w.direction,prevScrollTop:y}:{direction:y<w.prevScrollTop?Hi:Ui,prevScrollTop:y},{direction:Ui,prevScrollTop:0}),se(w=>w.direction)),g),ue(q(e,fr(50),wn(kM)),g);const v=X(0);return ue(q(f,pe(w=>!w),wn(0)),v),ue(q(t,fr(100),we(f),pe(([w,y])=>!!y),xn(([w,y],[S])=>[y,S],[0,0]),se(([w,y])=>y-w)),v),{isScrolling:f,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},Ye(Ft)),pr=Ne(([{log:e}])=>{const t=X(!1),n=Yt(q(t,pe(r=>r),qe()));return $e(t,r=>{r&&Dt(e)("props updated",{},qt.DEBUG)}),{propsReady:t,didMount:n}},Ye(hr),{singleton:!0});function id(e,t){e==0?t():requestAnimationFrame(()=>id(e-1,t))}function sd(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Yi=Ne(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(s,we(l),pe(([u,d])=>!!d),wn(!1)),a),ue(q(s,we(l),pe(([u,d])=>!!d),wn(!1)),c),$e(q(bt(t,s),we(a,e,n,c),pe(([[,u],d,{sizeTree:f},h,p])=>u&&(!We(f)||qu(h))&&!d&&!p),we(l)),([,u])=>{bn(i,()=>{be(c,!0)}),id(4,()=>{bn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ye(Sn,Ft,Wi,pr),{singleton:!0});function Ib(e){return e?e==="smooth"?"smooth":"auto":!1}const AM=(e,t)=>typeof e=="function"?Ib(e(t)):t&&Ib(e),_M=Ne(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),d=Ce();let f=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}$e(q(bt(q(ge(e),Vo(1)),a),we(ge(u),n,i,c),se(([[m,g],v,w,y,S])=>{let T=g&&y,E="auto";return T&&(E=AM(v,w||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{f&&(f(),f=null),f=bn(t,()=>{Dt(l)("following output to ",{totalCount:m},qt.DEBUG),h(g),f=null})});function p(m){const g=bn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Dt(l)("scrolling to bottom due to increased size",{},qt.DEBUG),h("auto"))});setTimeout(g,100)}return $e(q(bt(ge(u),e,s),pe(([m,,g])=>m&&g),xn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(i)&&p(m!==!1)}),$e(d,()=>{p(Dt(u)!==!1)}),$e(bt(ge(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Ye(Sn,Gi,Wi,Yi,pr,hr,Ft));function DM(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Ab=Ne(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Ce(),s=Ce(),a=Yt(q(i,se(DM)));return ue(q(a,se(l=>l.totalCount)),e),ue(q(a,se(l=>l.groupIndices)),t),ue(q(bt(r,n,o),pe(([l,c])=>Ia(c)),se(([l,c,u])=>sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),qe(),se(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Ye(Sn,Ft));function qi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function _b(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Aa="top",_a="bottom",Db="none";function Mb(e,t,n){return typeof e=="number"?n===Hi&&t===Aa||n===Ui&&t===_a?e:0:n===Hi?t===Aa?e.main:e.reverse:t===_a?e.main:e.reverse}function Nb(e,t){return typeof e=="number"?e:e[t]||0}const ad=Ne(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Ce(),s=X(0),a=X(0),l=X(0),c=Mt(q(bt(ge(e),ge(t),ge(r),ge(i,qi),ge(l),ge(s),ge(o),ge(n),ge(a)),se(([u,d,f,[h,p],m,g,v,w,y])=>{const S=u-w,T=g+v,E=Math.max(f-S,0);let P=Db;const D=Nb(y,Aa),_=Nb(y,_a);return h-=w,h+=f+v,p+=f+v,p-=w,h>u+T-D&&(P=Hi),p<u-E+d+_&&(P=Ui),P!==Db?[Math.max(S-f-Mb(m,Aa,P)-D,0),S-E-v+d+Mb(m,_a,P)+_]:null}),pe(u=>u!=null),qe(qi)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Ye(Ft),{singleton:!0});function MM(e,t,n){if(Ia(t)){const r=kb(e,t);return[{index:sn(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 ld={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Fb(e,t,n){if(e.length===0)return[];if(!Ia(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=ka(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Da(e,t,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*s+(d-1)*r,h=c,p=f-u;return{items:Fb(e,o,i),topItems:Fb(t,o,i),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function Lb(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,l=sd(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:i[d+l]}));return Da(c,[],a,o,n,r)}const jr=Ne(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=X([]),g=X(0),v=Ce();ue(i.topItemsIndexes,m);const w=Mt(q(bt(h,p,ge(s,qi),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,P,,D,,,,,,,_])=>{const I=_&&_.length!==D;return E&&!P&&!I}),se(([,,[E,P],D,_,I,V,F,$,C,O])=>{const M=_,{sizeTree:L,offsetTree:H}=M,Y=Dt(g);if(D===0)return{...ld,totalCount:D};if(E===0&&P===0)return Y===0?{...ld,totalCount:D}:Lb(Y,I,_,$,C,O||[]);if(We(L))return Y>0?null:Da(MM(sd(I,D),M,O),[],D,C,M,$);const k=[];if(F.length>0){const G=F[0],N=F[F.length-1];let j=0;for(const W of ka(L,G,N)){const U=W.value,z=Math.max(W.start,G),te=Math.min(W.end,N);for(let B=z;B<=te;B++)k.push({index:B,size:U,offset:j,data:O&&O[B]}),j+=U}}if(!V)return Da([],k,D,C,M,$);const R=F.length>0?F[F.length-1]+1:0,Z=wM(H,E,P,R);if(Z.length===0)return null;const oe=D-1,J=Ea([],G=>{for(const N of Z){const j=N.value;let W=j.offset,U=N.start;const z=j.size;if(j.offset<E){U+=Math.floor((E-j.offset+C)/(z+C));const B=U-N.start;W+=B*z+B*C}U<R&&(W+=(R-U)*z,U=R);const te=Math.min(N.end,oe);for(let B=U;B<=te&&!(W>=P);B++)G.push({index:B,size:z,offset:W,data:O&&O[B]}),W+=z+C}});return Da(J,k,D,C,M,$)}),pe(E=>E!==null),qe()),ld);ue(q(n,pe(qu),se(E=>E==null?void 0:E.length)),t),ue(q(w,se(E=>E.topListHeight)),d),ue(d,l),ue(q(w,se(E=>[E.top,E.bottom])),a),ue(q(w,se(E=>E.items)),v);const y=Yt(q(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},P])=>E[E.length-1].originalIndex===P-1),se(([,E,P])=>[E-1,P]),qe(qi),se(([E])=>E))),S=Yt(q(w,fr(200),pe(({items:E,topItems:P})=>E.length>0&&E[0].originalIndex===P.length),se(({items:E})=>E[0].index),qe())),T=Yt(q(w,pe(({items:E})=>E.length>0),se(({items:E})=>{let P=0,D=E.length-1;for(;E[P].type==="group"&&P<D;)P++;for(;E[D].type==="group"&&D>P;)D--;return{startIndex:E[P].index,endIndex:E[D].index}}),qe(_b)));return{listState:w,topItemsIndexes:m,endReached:y,startReached:S,rangeChanged:T,itemsRendered:v,initialItemCount:g,...f}},Ye(Sn,Ab,ad,Yi,Wi,Gi,pr,nd),{singleton:!0}),NM=Ne(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ue(q(a,we(i),pe(([,l])=>l!==0),we(o,e,t,r,n),se(([[,l],c,u,d,f,h=[]])=>Lb(l,c,u,d,f,h))),s),{}),Ye(Sn,Yi,jr,pr),{singleton:!0}),Vb=Ne(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,we(r,t,n),pe(([o,i])=>!!i),se(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),qe()),t),$e(q(bt(t,e,n),we(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ye(Gi),{singleton:!0}),FM=Ne(([{topItemsIndexes:e}])=>{const t=X(0);return ue(q(t,pe(n=>n>0),se(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ye(jr)),$b=Ne(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Ce(),s=Mt(q(bt(e,r,t,n,o),se(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ue(ge(s),i),{totalListHeight:s,totalListHeightChanged:i}},Ye(Ft,jr),{singleton:!0});function Rb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const LM=Rb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),VM=Ne(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Yt(q(l,we(a),xn(([,v,w,y],[{items:S,totalCount:T,bottom:E,offsetBottom:P},D])=>{const _=E+P;let I=0;return w===T&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(I=_-y,I!==0&&(I+=D))),[I,S,T,_]},[0,[],0,0]),pe(([v])=>v!==0),we(t,s,r,i,h,p),pe(([,v,w,y,,,S])=>!S&&!y&&v!==0&&w===Hi),se(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},qt.DEBUG),v))));function g(v){v>0?(be(e,{top:-v,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-v,behavior:"auto"}))}return $e(q(m,we(n,o)),([v,w,y])=>{y&&LM()?be(n,w-v):g(-v)}),$e(q(bt(Mt(o,!1),n,p),pe(([v,w,y])=>!v&&!y&&w!==0),se(([v,w])=>w),fr(1)),g),ue(q(u,se(v=>({top:-v}))),e),$e(q(c,we(d,f),se(([v,{lastSize:w,groupIndices:y,sizeTree:S},T])=>{function E(P){return P*(w+T)}if(y.length===0)return E(v);{let P=0;const D=Bi(S,0);let _=0,I=0;for(;_<v;){_++,P+=D;let V=y.length===I+1?1/0:y[I+1]-y[I]-1;_+V>v&&(P-=D,V=v-_+1),_+=V,P+=E(V),I++}return P}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ye(Ft,Gi,jr,Sn,hr,nd)),$M=Ne(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return $e(q(e,we(r),pe(([,o])=>o!==0),se(([,o])=>({top:o}))),o=>{bn(q(n,Vo(1),pe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ye(pr,Ft,jr),{singleton:!0}),RM=Ne(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Mt(q(bt(n,e,t),pe(([o])=>o),se(([,o,i])=>Math.max(0,o-i)),fr(0),qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Ye(Ft,$b),{singleton:!0}),cd=Ne(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),i=X(!1),s=X(void 0);return ue(q(bt(n,r),se(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ue(q(e,we(r),se(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ye(Ft)),jM=({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,BM=Ne(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,we(e,o,t,i,s,a,r),we(n),se(([[d,f,h,p,m,g,v,w],y])=>{const{done:S,behavior:T,align:E,calculateViewLocation:P=jM,...D}=d,_=Pb(d,f,p-1),I=zi(_,f.offsetTree,y)+m+g,V=I+sn(f.sizeTree,_)[1],F=w+g,$=w+h-v,C=P({itemTop:I,itemBottom:V,viewportTop:F,viewportBottom:$,locationParams:{behavior:T,align:E,...D}});return C?S&&bn(q(l,pe(O=>O===!1),Vo(Dt(l)?1:2)),S):S&&S(),C}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ye(Sn,Ft,Wi,jr,hr),{singleton:!0}),zM=Ne(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=X(void 0),d=X(null),f=X(null);return ue(a,d),ue(l,f),$e(q(c,we(e,n,s,d,f,r)),([h,p,m,g,v,w,y])=>{const S=SM(p.sizeTree);g&&v!==null&&w!==null&&(m=v.scrollTop-w.offsetTop),m-=y,h({ranges:S,scrollTop:m})}),ue(q(u,pe(qu),se(WM)),o),ue(q(i,we(u),pe(([,h])=>h!==void 0),qe(),se(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ye(Sn,Ft,Yi,pr,cd));function WM(e){return{offset:e.scrollTop,index:0,align:"start"}}const HM=Ne(([e,t,n,r,o,i,s,a,l,c])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c}),Ye(ad,NM,pr,Vb,$b,$M,RM,cd,BM,hr)),jb=Ne(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,g,v,{listState:w,topItemsIndexes:y,...S},{scrollToIndex:T},E,{topItemCount:P},{groupCounts:D},_])=>(ue(S.rangeChanged,_.scrollSeekRangeChanged),ue(q(_.windowViewportRect,se(I=>I.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:P,groupCounts:D,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:w,scrollToIndex:T,trackItemSizes:o,itemSize:i,groupIndices:l,...S,..._,...m,sizes:d,...g}),Ye(Sn,Yi,Ft,zM,_M,jr,Wi,VM,FM,Ab,HM)),ud="-webkit-sticky",Bb="sticky",zb=Rb(()=>{if(typeof document>"u")return Bb;const e=document.createElement("div");return e.style.position=ud,e.style.position===ud?ud:Bb});function dd(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:i}=Xu(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),Wb=b.createContext(void 0);function fd(e){return e}const UM=Ne(([e,t])=>({...e,...t}),Ye(jb,Ne(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(fd),i=X("div"),s=X($r),a=(l,c=null)=>Mt(q(r,se(u=>u[l]),qe()),c);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")}}))),GM=({height:e})=>b.createElement("div",{style:{height:e}}),YM={position:zb(),zIndex:1,overflowAnchor:"none"},qM={overflowAnchor:"none"},Hb=b.memo(function({showTopList:t=!1}){const n=Se("listState"),r=Jt("sizeRanges"),o=Se("useWindowScroll"),i=Se("customScrollParent"),s=Jt("windowScrollContainerState"),a=Jt("scrollContainerState"),l=i||o?s:a,c=Se("itemContent"),u=Se("context"),d=Se("groupContent"),f=Se("trackItemSizes"),h=Se("itemSize"),p=Se("log"),m=Jt("gap"),{callbackRef:g}=mb(r,h,f,t?$r:l,p,m,i),[v,w]=b.useState(0);md("deviation",C=>{v!==C&&w(C)});const y=Se("EmptyPlaceholder"),S=Se("ScrollSeekPlaceholder")||GM,T=Se("ListComponent"),E=Se("ItemComponent"),P=Se("GroupComponent"),D=Se("computeItemKey"),_=Se("isSeeking"),I=Se("groupIndices").length>0,V=Se("alignToBottom"),F=Se("initialItemFinalLocationReached"),$=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:V?"auto":0,...F?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?b.createElement(y,nt(y,u)):b.createElement(T,{...nt(T,u),ref:g,style:$,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(C=>{const O=C.originalIndex,M=D(O+n.firstItemIndex,C.data,u);return _?b.createElement(S,{...nt(S,u),key:M,index:C.index,height:C.size,type:C.type||"item",...C.type==="group"?{}:{groupIndex:C.groupIndex}}):C.type==="group"?b.createElement(P,{...nt(P,u),key:M,"data-index":O,"data-known-size":C.size,"data-item-index":C.index,style:YM},d(C.index,u)):b.createElement(E,{...nt(E,u),...Ub(E,C.data),key:M,"data-index":O,"data-known-size":C.size,"data-item-index":C.index,"data-item-group-index":C.groupIndex,style:qM},I?c(C.index,C.groupIndex,C.data,u):c(C.index,C.data,u))}))}),KM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ro=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),ZM={width:"100%",position:zb(),top:0,zIndex:1};function nt(e,t){if(typeof e!="string")return{context:t}}function Ub(e,t){return{item:typeof e=="string"?void 0:t}}const XM=b.memo(function(){const t=Se("HeaderComponent"),n=Jt("headerHeight"),r=Se("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null}),QM=b.memo(function(){const t=Se("FooterComponent"),n=Jt("footerHeight"),r=Se("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null});function hd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=yb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...KM,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...nt(c,f)},s)})}function pd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:v}=yb(l,u,c,$r,h);return lM(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",g),b.createElement(c,{style:{position:"relative",...i,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...nt(c,p)},s)})}const JM=({children:e})=>{const t=b.useContext(Ma),n=Jt("viewportHeight"),r=Jt("fixedItemHeight"),o=Se("alignToBottom"),i=Tn(b.useMemo(()=>Ri(n,s=>on(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ro(o),ref:i,"data-viewport-type":"element"},e)},eN=({children:e})=>{const t=b.useContext(Ma),n=Jt("windowViewportRect"),r=Jt("fixedItemHeight"),o=Se("customScrollParent"),i=dd(n,o),s=Se("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:Ro(s),"data-viewport-type":"window"},e)},tN=({children:e})=>{const t=Se("TopItemListComponent")||"div",n=Se("headerHeight"),r={...ZM,marginTop:`${n}px`},o=Se("context");return b.createElement(t,{style:r,...nt(t,o)},e)},nN=b.memo(function(t){const n=Se("useWindowScroll"),r=Se("topItemsIndexes").length>0,o=Se("customScrollParent"),i=o||n?iN:oN,s=o||n?eN:JM;return b.createElement(i,{...t},r&&b.createElement(tN,null,b.createElement(Hb,{showTopList:!0})),b.createElement(s,null,b.createElement(XM,null),b.createElement(Hb,null),b.createElement(QM,null)))}),{Component:rN,usePublisher:Jt,useEmitterValue:Se,useEmitter:md}=Zu(UM,{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"}},nN),oN=hd({usePublisher:Jt,useEmitterValue:Se,useEmitter:md}),iN=pd({usePublisher:Jt,useEmitterValue:Se,useEmitter:md}),sN=rN,Gb={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},aN={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Yb,ceil:qb,floor:Na,min:gd,max:Ki}=Math;function lN(e){return{...aN,items:e}}function Kb(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 cN(e,t){return e&&e.column===t.column&&e.row===t.row}function Fa(e,t){return e&&e.width===t.width&&e.height===t.height}const uN=Ne(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:w,windowScrollTo:y},S])=>{const T=X(0),E=X(0),P=X(Gb),D=X({height:0,width:0}),_=X({height:0,width:0}),I=Ce(),V=Ce(),F=X(0),$=X(null),C=X({row:0,column:0}),O=Ce(),M=Ce(),L=X(!1),H=X(0),Y=X(!0),k=X(!1);$e(q(p,we(H),pe(([N,j])=>!!j)),()=>{be(Y,!1),be(E,0)}),$e(q(bt(p,Y,_,D,H,k),pe(([N,j,W,U,,z])=>N&&!j&&W.height!==0&&U.height!==0&&!z)),([,,,,N])=>{be(k,!0),id(1,()=>{be(I,N)}),bn(q(r),()=>{be(n,[0,0]),be(Y,!0)})}),ue(q(M,pe(N=>N!=null&&N.scrollTop>0),wn(0)),E),$e(q(p,we(M),pe(([,N])=>N!=null)),([,N])=>{N&&(be(D,N.viewport),be(_,N==null?void 0:N.item),be(C,N.gap),N.scrollTop>0&&(be(L,!0),bn(q(r,Vo(1)),j=>{be(L,!1)}),be(s,{top:N.scrollTop})))}),ue(q(D,se(({height:N})=>N)),o),ue(q(bt(ge(D,Fa),ge(_,Fa),ge(C,(N,j)=>N&&N.column===j.column&&N.row===j.row),ge(r)),se(([N,j,W,U])=>({viewport:N,item:j,gap:W,scrollTop:U}))),O),ue(q(bt(ge(T),t,ge(C,cN),ge(_,Fa),ge(D,Fa),ge($),ge(E),ge(L),ge(Y),ge(H)),pe(([,,,,,,,N])=>!N),se(([N,[j,W],U,z,te,B,Pe,,ot,He])=>{const{row:it,column:de}=U,{height:Ee,width:ce}=z,{width:Oe}=te;if(Pe===0&&(N===0||Oe===0))return Gb;if(ce===0){const Vt=sd(He,N),Gr=Vt===0?Math.max(Pe-1,0):Vt;return lN(Kb(Vt,Gr,B))}const ht=Xb(Oe,ce,de);let Ie,pt;ot?j===0&&W===0&&Pe>0?(Ie=0,pt=Pe-1):(Ie=ht*Na((j+it)/(Ee+it)),pt=ht*qb((W+it)/(Ee+it))-1,pt=gd(N-1,Ki(pt,ht-1)),Ie=gd(pt,Ki(0,Ie))):(Ie=0,pt=-1);const Q=Kb(Ie,pt,B),{top:ae,bottom:_e}=Zb(te,U,z,Q),Ke=qb(N/ht),Nt=Ke*Ee+(Ke-1)*it-_e;return{items:Q,offsetTop:ae,offsetBottom:Nt,top:ae,bottom:_e,itemHeight:Ee,itemWidth:ce}})),P),ue(q($,pe(N=>N!==null),se(N=>N.length)),T),ue(q(bt(D,_,P,C),pe(([N,j,{items:W}])=>W.length>0&&j.height!==0&&N.height!==0),se(([N,j,{items:W},U])=>{const{top:z,bottom:te}=Zb(N,U,j,W);return[z,te]}),qe(qi)),n);const R=X(!1);ue(q(r,we(R),se(([N,j])=>j||N!==0)),R);const Z=Yt(q(ge(P),pe(({items:N})=>N.length>0),we(T,R),pe(([{items:N},j,W])=>W&&N[N.length-1].index===j-1),se(([,N])=>N-1),qe())),oe=Yt(q(ge(P),pe(({items:N})=>N.length>0&&N[0].index===0),wn(0),qe())),J=Yt(q(ge(P),we(L),pe(([{items:N},j])=>N.length>0&&!j),se(([{items:N}])=>({startIndex:N[0].index,endIndex:N[N.length-1].index})),qe(_b),fr(0)));ue(J,f.scrollSeekRangeChanged),ue(q(I,we(D,_,T,C),se(([N,j,W,U,z])=>{const te=Ob(N),{align:B,behavior:Pe,offset:ot}=te;let He=te.index;He==="LAST"&&(He=U-1),He=Ki(0,He,gd(U-1,He));let it=yd(j,z,W,He);return B==="end"?it=Yb(it-j.height+W.height):B==="center"&&(it=Yb(it-j.height/2+W.height/2)),ot&&(it+=ot),{top:it,behavior:Pe}})),s);const G=Mt(q(P,se(N=>N.offsetBottom+N.bottom)),0);return ue(q(m,se(N=>({width:N.visibleWidth,height:N.visibleHeight}))),D),{data:$,totalCount:T,viewportDimensions:D,itemDimensions:_,scrollTop:r,scrollHeight:V,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:I,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:w,deviation:F,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:C,restoreStateFrom:M,...f,initialTopMostItemIndex:H,gridState:P,totalListHeight:G,...d,startReached:oe,endReached:Z,rangeChanged:J,stateChanged:O,propsReady:h,stateRestoreInProgress:L,...S}},Ye(ad,Ft,Gi,Vb,pr,cd,hr));function Zb(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=yd(e,t,n,r[0].index),s=yd(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function yd(e,t,n,r){const o=Xb(e.width,n.width,t.column),i=Na(r/o),s=i*n.height+Ki(0,i-1)*t.row;return s>0?s+t.row:s}function Xb(e,t,n){return Ki(1,Na((e+n)/(Na(t)+n)))}const dN=Ne(([e,t])=>({...e,...t}),Ye(uN,Ne(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),i=X(fd),s=X("div"),a=X($r),l=(c,u=null)=>Mt(q(t,se(d=>d[c]),qe()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),fN=b.memo(function(){const t=et("gridState"),n=et("listClassName"),r=et("itemClassName"),o=et("itemContent"),i=et("computeItemKey"),s=et("isSeeking"),a=an("scrollHeight"),l=et("ItemComponent"),c=et("ListComponent"),u=et("ScrollSeekPlaceholder"),d=et("context"),f=an("itemDimensions"),h=an("gap"),p=et("log"),m=et("stateRestoreInProgress"),g=Tn(b.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;a(w);const y=v.firstChild;if(y){const{width:S,height:T}=y.getBoundingClientRect();f({width:S,height:T})}h({row:Jb("row-gap",getComputedStyle(v).rowGap,p),column:Jb("column-gap",getComputedStyle(v).columnGap,p)})},[a,f,h,p]));return m?null:b.createElement(c,{ref:g,className:n,...nt(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const w=i(v.index,v.data,d);return s?b.createElement(u,{key:w,...nt(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...nt(l,d),className:r,"data-index":v.index,key:w},o(v.index,v.data,d))}))}),hN=b.memo(function(){const t=et("HeaderComponent"),n=an("headerHeight"),r=et("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null}),pN=b.memo(function(){const t=et("FooterComponent"),n=an("footerHeight"),r=et("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null}),mN=({children:e})=>{const t=b.useContext(Wb),n=an("itemDimensions"),r=an("viewportDimensions"),o=Tn(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:Ro(!1),ref:o},e)},gN=({children:e})=>{const t=b.useContext(Wb),n=an("windowViewportRect"),r=an("itemDimensions"),o=et("customScrollParent"),i=dd(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:Ro(!1)},e)},yN=b.memo(function({...t}){const n=et("useWindowScroll"),r=et("customScrollParent"),o=r||n?bN:vN,i=r||n?gN:mN;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(hN,null),b.createElement(fN,null),b.createElement(pN,null)))}),{Component:rV,usePublisher:an,useEmitterValue:et,useEmitter:Qb}=Zu(dN,{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"}},yN),vN=hd({usePublisher:an,useEmitterValue:et,useEmitter:Qb}),bN=pd({usePublisher:an,useEmitterValue:et,useEmitter:Qb});function Jb(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,qt.WARN),t==="normal"?0:parseInt(t??"0",10)}const wN=Ne(([e,t])=>({...e,...t}),Ye(jb,Ne(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),i=X(fd),s=X($r),a=(l,c=null)=>Mt(q(o,se(u=>u[l]),qe()),c);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")}}))),xN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),TN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),SN={overflowAnchor:"none"},EN=b.memo(function(){const t=Re("listState"),n=ln("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),i=ln("windowScrollContainerState"),s=ln("scrollContainerState"),a=o||r?i:s,l=Re("itemContent"),c=Re("trackItemSizes"),u=Re("itemSize"),d=Re("log"),{callbackRef:f,ref:h}=mb(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);vd("deviation",M=>{p!==M&&(h.current.style.marginTop=`${M}px`,m(M))});const g=Re("EmptyPlaceholder"),v=Re("ScrollSeekPlaceholder")||xN,w=Re("FillerRow")||TN,y=Re("TableBodyComponent"),S=Re("TableRowComponent"),T=Re("computeItemKey"),E=Re("isSeeking"),P=Re("paddingTopAddition"),D=Re("firstItemIndex"),_=Re("statefulTotalCount"),I=Re("context");if(_===0&&g)return b.createElement(g,nt(g,I));const V=t.offsetTop+P+p,F=t.offsetBottom,$=V>0?b.createElement(w,{height:V,key:"padding-top",context:I}):null,C=F>0?b.createElement(w,{height:F,key:"padding-bottom",context:I}):null,O=t.items.map(M=>{const L=M.originalIndex,H=T(L+D,M.data,I);return E?b.createElement(v,{...nt(v,I),key:H,index:M.index,height:M.size,type:M.type||"item"}):b.createElement(S,{...nt(S,I),...Ub(S,M.data),key:H,"data-index":L,"data-known-size":M.size,"data-item-index":M.index,style:SN},l(M.index,M.data,I))});return b.createElement(y,{ref:f,"data-testid":"virtuoso-item-list",...nt(y,I)},[$,...O,C])}),CN=({children:e})=>{const t=b.useContext(Ma),n=ln("viewportHeight"),r=ln("fixedItemHeight"),o=Tn(b.useMemo(()=>Ri(n,i=>on(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ro(!1),ref:o,"data-viewport-type":"element"},e)},PN=({children:e})=>{const t=b.useContext(Ma),n=ln("windowViewportRect"),r=ln("fixedItemHeight"),o=Re("customScrollParent"),i=dd(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:Ro(!1),"data-viewport-type":"window"},e)},kN=b.memo(function(t){const n=Re("useWindowScroll"),r=Re("customScrollParent"),o=ln("fixedHeaderHeight"),i=ln("fixedFooterHeight"),s=Re("fixedHeaderContent"),a=Re("fixedFooterContent"),l=Re("context"),c=Tn(b.useMemo(()=>Ri(o,w=>on(w,"height")),[o])),u=Tn(b.useMemo(()=>Ri(i,w=>on(w,"height")),[i])),d=r||n?AN:IN,f=r||n?PN:CN,h=Re("TableComponent"),p=Re("TableHeadComponent"),m=Re("TableFooterComponent"),g=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...nt(p,l)},s()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...nt(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(f,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...nt(h,l)},[g,b.createElement(EN,{key:"TableBody"}),v])))}),{Component:ON,usePublisher:ln,useEmitterValue:Re,useEmitter:vd}=Zu(wN,{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"}},kN),IN=hd({usePublisher:ln,useEmitterValue:Re,useEmitter:vd}),AN=pd({usePublisher:ln,useEmitterValue:Re,useEmitter:vd}),_N=ON,DN=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},MN={Item:b.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},NN=e=>{const t=b.useRef(null),n=DN(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Li,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(sN,{height:n,useWindowScroll:!0,data:e.source,components:MN,itemContent:(r,o)=>x.jsx(b.Fragment,{children:x.jsx(Sv,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(xr,{children:x.jsx(Oc,{})})}),x.jsx("div",{})]})};var FN=Object.defineProperty,e0=Object.getOwnPropertySymbols,LN=Object.prototype.hasOwnProperty,VN=Object.prototype.propertyIsEnumerable,t0=(e,t,n)=>t in e?FN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$N=(e,t)=>{for(var n in t||(t={}))LN.call(t,n)&&t0(e,n,t[n]);if(e0)for(var n of e0(t))VN.call(t,n)&&t0(e,n,t[n]);return e},bd=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},RN=(e,t,n,r)=>Va(bd,e,t,n,r),jo=e=>typeof e=="object",mr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!jo(e)&&!jo(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=>mr(e[r],t[r]))},jN=(e,t)=>(jo(e)||Array.isArray(e))&&t?e[t]:e,BN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,La=e=>/[0-9.]+/.test(e),n0=e=>["string","number"].includes(typeof e),r0=e=>e==null||(e==null?void 0:e.length)===0||e==="",o0={eq:mr,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:r0,notEmpty:e=>!r0(e),in:(e,t)=>bd(t,n=>mr(e,n)),notIn:(e,t)=>i0(t,n=>!mr(e,n))},zN=e=>{if(e in o0)return o0[e];throw new Error("Linq - Symbol not found")},Bo=(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},Va=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=zN(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},WN=(e,t,n,r)=>Va(Bo,e,t,n,r),i0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},HN=(e,t,n,r)=>Va(i0,e,t,n,r),s0=e=>{if(e===null)return null;const t=$N({},e);return Object.keys(t).forEach(n=>t[n]=jo(e[n])?s0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},a0=(e,t)=>{if(jo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1},UN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},GN=e=>Bo(e,(t,n,r)=>jo(t)?n===r.findIndex(o=>mr(o,t)):n===r.indexOf(t)),YN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},l0=(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())},qN=(e,t)=>l0(e,n=>n[t]),c0=(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},KN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},ZN=(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 La(e)&&La(t)?r.map(s=>Number.parseInt(s)):r},wd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&La(e)&&La(t)){const o=[],[i,s]=KN(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return ZN(e,t,r)},XN=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?wd(r,o,1):wd(r,i,Number.parseInt(o,10))}return n0(e)&&n0(t)?wd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},xd=(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},u0=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},QN=(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)},JN=(e,t,n,r)=>Va(QN,e,t,n,r),d0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(BN(t))},f0=(e=>(e.Asc="asc",e.Desc="desc",e))(f0||{}),eF=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),tF=(e,t)=>e.sort(eF(t)),nF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Bo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},rF=class Xd{constructor(t=[]){this.array=t}static Range(...t){return XN(...t)}static New(t){return new Xd(t)}Where(t,n,r){return this.array=WN(this.array,t,n,r),this}Some(t,n,r){return RN(this.array,t,n,r)}All(t,n,r){return HN(this.array,t,n,r)}Reverse(){return this.array=u0(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=JN(this.array,t,n,r),this}Distinct(){return this.array=GN(this.array),this}First(t){return t===void 0?this.array[0]:YN(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?xd((n,r)=>n+r,0,this.array):xd((n,r)=>n+jN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return qN(this.array,t)}GroupWith(t){return l0(this.array,t)}Except(t){return Bo(this.array,n=>!a0(t,n))}Intersect(t){return Bo(this.array,n=>a0(t,n))}OrderBy(t,n){let r;return r=t?d0(this.array,t):this.array.toSorted(),this.array=n==="desc"?u0(r):r,this}Includes(t){return bd(this.array,n=>mr(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 xd(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(c0(this.array,n=>[t,n]))}Zip(t,n){return c0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Bo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Xd(s0(this.array))}ToObject(t){return UN(this.array,t)}Sort(t){return Array.isArray(t)?tF(this.array,t):d0(this.array,t)}Unique(t){return nF(this.array,t)}},h0=rF,Td={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,v)=>{try{Object.keys(g).forEach(v)}catch(w){window.console.log(w)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const w=v.getItem(g);try{return JSON.parse(w)}catch{return w??null}},i=g=>Object.keys(g).reduce((v,w)=>({...v,[w]:o(w,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",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},d=[{name:"expires",parse:g=>`expires=${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":""}],f={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=f.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,w={})=>{const y=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,E)=>{const P=E.parse(w);return P===""?T:T.concat(P)},[`${encodeURIComponent(g)}=${y}`]).join(";");document.cookie=S,u()}},h=g=>{const v=new Set,w=y=>{g().removeItem(y);const S=i(g());v.forEach(T=>T(S))};return{delete:w,listener:y=>(v.add(y),()=>v.delete(y)),clearListeners:()=>v.clear(),json:(y=!1)=>y?i(g()):g(),has:y=>{const S=g().getItem(y);return!n(S)},deleteAll:()=>{t(g(),w),v.forEach(y=>y(g()))},get:y=>o(y,g()),set:(y,S)=>{g().setItem(y,JSON.stringify(S)),v.forEach(T=>T(g()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Td);const Sd=e=>e.headerLabel??e.thead??e.id,Ed=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var zo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(zo||{});const Cd=e=>e.type==="number"?e.valueAsNumber:e.value,oF=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},iF={},sF=(e,t=iF)=>{const n=ma()?null:Td.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Uc({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 l=i.state(),c={...l,...a};return ma()||Td.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:e}},Pd=(e,t,n,r={})=>{var l;const o=e.id,i=e.type??zo.Text,s=(l=t[i])==null?void 0:l[0].value,a=n[s];return{id:pa(),operation:a,label:Sd(e),name:o,type:i,value:"",...r}},kd=()=>{const e=Qt(),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(()=>({[zo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[zo.Boolean]:[t.is,t.isNot],[zo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},aF=e=>{const t=Qt(),{operationOptions:n,operations:r}=kd(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,Pd(c,n,r)])},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>{if(u!==h.id)return h;const p=e.cols.find(m=>d===m.id);return Pd(p,n,r,{value:""})}))},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>h.id===u?{...h,operation:r[d]}:h))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(f=>f.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=Cd(c.target);e.set(f=>f.map(h=>h.id===u?{...h,value:d}:h))};return x.jsx(b.Fragment,{children:x.jsx(Do,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(OP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const u=n[c.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Vr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:i}),x.jsx(Vr,{"data-id":c.id,onChange:s,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Li,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),x.jsx("div",{className:"flex items-center justify-center mt-5",children:x.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:x.jsx(po,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Ic,{size:14})," ",t.tableFilterNewFilter]})})]})})})},lF=({filter:e,onDelete:t,set:n})=>{const r=Qt(),{operationOptions:o,operations:i}=kd(),s=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(f=>f.id===u?{...f,operation:i[c]}:f))},a=l=>{const c=l.target.dataset.id||"",u=Cd(l.target);n(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Vr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),x.jsx(Li,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(po,{className:"text-danger",size:14})})]})},cF=({item:e,onPointerDown:t})=>{const n=Or(0);return x.jsxs(zs.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(kP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},uF=e=>{var a;const t=Ed(e.cols),n=gP(),[r,o]=b.useState(((a=e.groups[0])==null?void 0:a.thead)||""),i=l=>{var m;const c=l.target,u=c.value,d=c.options.selectedIndex,f=((m=c.options.item(d))==null?void 0:m.label)||"";o(f);const h=new h0(e.rows).GroupBy(u),p=e.cols.find(g=>g.id===u);e.setGroups(Ux(h).map((g,v)=>{const w=h[g];return{...p,groupId:pa(),groupKey:u,index:v,rows:w,groupName:g}}))},s=()=>e.setGroups([]);return x.jsx(b.Fragment,{children:x.jsxs(Do,{arrow:!1,title:"Groups",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(AP,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Vr,{value:r,title:"Tipo de agrupamento",onChange:i,options:t,placeholder:"Agrupar por..."}),x.jsx(xr,{className:"mt-4",onClick:s,theme:"raw","data-id":r,children:x.jsx(po,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(tP,{children:x.jsx(zs.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>x.jsx(cF,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},dF=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),fF=(e,t)=>e.toSorted(dF(t)),p0=(e,t,n)=>({id:pa(),type:n,value:e.id,label:t}),hF=e=>{const t=Qt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,p0(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(b.Fragment,{children:x.jsx(Do,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(eg,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Vr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Vr,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(po,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Ic,{size:14})," ",t.tableSortAddButton]})})]})})})},pF=e=>{const t=Qt(),[n,r]=b.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=p0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Sd(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?x.jsx(xP,{size:14}):null,n==="desc"?x.jsx(wP,{size:14}):null,n==="undefined"?x.jsx(eg,{size:14}):null]})},mF=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(aF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(hF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(uF,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Cd(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function gF(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 yF=e=>{const t=b.useId(),n=Qt(),r=e.asLink||"button",o=b.useMemo(()=>gF(e.current,e.pages),[e.current,e.pages]),i=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(b.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.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=>x.jsx("option",{value:s,children:s},`pagination-opt-${s}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(s=>s===null?null:x.jsx(b.Fragment,{children:typeof s=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.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?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},vF={opacity:1},bF={opacity:.75,backgroundColor:"var(--table-border)"},wF={opacity:0,transition:{duration:.4,type:"spring"}},xF=e=>{var d;const t=Qt(),n=e.filters.filter(f=>f.name===e.header.id),o=n.length>0?DP:IP,{operationOptions:i,operations:s}=kd(),a=f=>{const h=f.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==h))},l=e.sorters.find(f=>e.header.id===f.value),c=l!=null&&l.type?l.type===f0.Asc?"ascending":"descending":"none",u=Sd(e.header);return x.jsx(zs.Item,{...e.header.thProps,as:"th",exit:wF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:bF,"aria-sort":c,"aria-busy":e.loading,animate:vF,className:`hidden font-medium px-2 py-4 first:table-cell md:table-cell ${((d=e.header.thProps)==null?void 0:d.className)??""}`,children:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(Do,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),x.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(f=>x.jsx("li",{className:"my-1",children:x.jsx(lF,{onDelete:a,filter:f,set:e.setFilters})},`thead-filter-${f.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(f=>f.concat(Pd(e.header,i,s))),type:"button",className:"text-primary flex items-center gap-1",children:[x.jsx(Ic,{size:14})," ",t.tableFilterNewFilter]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),x.jsx(pF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},TF=e=>x.jsx(zs.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:x.jsx(Bs,{children:e.headers.map(t=>x.jsx(xF,{loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),SF=e=>Math.min(Math.max(e+e*(e%2===0?2:4)+10,50),90),EF=b.forwardRef((e,t)=>x.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Bs,{children:e.children})})),CF=b.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),PF=b.forwardRef(({context:e,...t},n)=>x.jsx("thead",{...t,role:"rowgroup",className:"bg-card-background shadow-xs group:sticky top-0",ref:n})),kF=b.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${n.className??""}`})),OF=b.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:x.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),IF={TableHead:PF,Table:CF,TableBody:EF,TableRow:kF,TableFoot:OF},AF=[0,0,0,0,0,0,0,0,0,0],_F=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(b.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=pv(t,i.id),c=i.Element;return b.createElement("td",{...i.cellProps,"data-matrix":a,role:"cell",key:`accessor-${e}-${s}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?x.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded",style:{width:`${SF(e)}%`}}):c?x.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l}):x.jsx(b.Fragment,{children:kn.nil(l)?"":l}))})})},DF=()=>x.jsx(b.Fragment,{}),m0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[f,h]=b.useState(!1),p=Yu(n),m=Yu(u.loadingMore),g=b.useMemo(()=>{if(u.loading)return AF;if(r)return u.rows;const v=new h0(u.rows);return e.length>0&&e.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:v.Where(w.name,w.operation.symbol,w.value)),s.length===0?v.Select():fF(v.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,w=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return w.observe(v),()=>w.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[x.jsx(_N,{data:g,useWindowScroll:!0,components:IF,totalCount:g.length,itemContent:_F,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:f?DF:null,fixedHeaderContent:()=>x.jsx(TF,{headers:a,sorters:s,filters:e,setCols:o,setSorters:c,setFilters:i,loading:!!u.loading})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(yF,{...t}):null]})},MF=(e,t)=>typeof t=="function"?t(e):t,NF=e=>{const t=e.operations??!0,n=b.useMemo(()=>Ed(e.cols),[e.cols]),[r,o]=Uc({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const s=a=>l=>{const c=i.state();return{...c,[a]:MF(c[a],l)}};return{cols:s("cols"),filters:s("filters"),groups:s("groups"),sorters:s("sorters")}},{postMiddleware:[i=>{var s;return(s=e.set)==null||s.call(e,i),i}]});return x.jsxs("div",{className:"relative min-w-full",children:[t?x.jsx(mF,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?x.jsx(m0,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):x.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((i,s)=>x.jsx(Ht.div,{className:"min-w-full",children:x.jsx(m0,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:i,groups:r.groups,index:s,optionCols:n,options:n,rows:i.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${i.groupId}`))})]})},g0=(e="")=>Xe("w-full min-w-36 outline-none px-2 py-1 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),Od=b.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),y0=b.forwardRef(({children:e,isParent:t,label:n,...r},o)=>{const i=lr(),s=i!==null,[a,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),h=b.useRef([]),p=b.useRef([]),m=b.useContext(Od),g=cr(),v=jA(),w=Fy(),{floatingStyles:y,refs:S,context:T}=Mi({nodeId:v,open:a,transform:!0,onOpenChange:l,whileElementsMounted:na,placement:s?"right-start":"bottom-start",middleware:[ia({mainAxis:s?0:4,alignmentAxis:s?-4:0}),fu(),du()]}),E=Fi(T,{role:"menu",enabled:!0}),P=Di(T,{bubbles:!0}),D=Wy(T,{enabled:!0,delay:{open:yv},handleClose:f_({blockPointerEvents:!0})}),_=xu(T,{event:"mousedown",toggle:!s,ignoreMouse:s,keyboardHandlers:!0}),I=cv(T,{loop:!0,activeIndex:d,virtual:!0,nested:s,allowEscape:!0,listRef:h,scrollItemIntoView:!0,onNavigate:f}),V=u_(T,{activeIndex:d,listRef:p,onMatch:a?f:void 0}),{getReferenceProps:F,getFloatingProps:$,getItemProps:C}=Ni([D,_,E,P,I,V]);b.useEffect(()=>{if(!g)return;const M=()=>l(!1),L=H=>{H.nodeId!==v&&H.parentId===i&&l(!1)};return g.events.on("click",M),g.events.on("menuopen",L),()=>{g.events.off("click",M),g.events.off("menuopen",L)}},[g,v,i]),b.useEffect(()=>{a&&g&&g.events.emit("menuopen",{parentId:i,nodeId:v})},[g,a,v,i]);const O=t?r.className:g0(r.className);return x.jsxs(BA,{id:v,children:[x.jsx(b.Fragment,{children:r.asChild?x.jsx(Eu,{children:n,ref:hu([S.setReference,w.ref,o]),tabIndex:s?m.activeIndex===w.index?0:-1:void 0,"data-open":a?"":void 0,"data-nested":s?"":void 0,role:s?"menuitem":void 0,"data-focus-inside":c?"":void 0,className:O,...F(m.getItemProps({...r,onFocus(M){var L;(L=r.onFocus)==null||L.call(r,M),u(!1),m.setHasFocusInside(!0)}}))}):x.jsxs("button",{ref:hu([S.setReference,w.ref,o]),tabIndex:s?m.activeIndex===w.index?0:-1:void 0,"data-open":a?"":void 0,"data-nested":s?"":void 0,role:s?"menuitem":void 0,"data-focus-inside":c?"":void 0,className:O,...F(m.getItemProps({...r,onFocus(M){var L;(L=r.onFocus)==null||L.call(r,M),u(!1),m.setHasFocusInside(!0)}})),children:[n,s&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Oc,{size:14})]})]})}),x.jsx(Od.Provider,{value:{activeIndex:d,setActiveIndex:f,getItemProps:C,setHasFocusInside:u,isOpen:a},children:x.jsx(LA,{elementsRef:h,labelsRef:p,children:a&&x.jsx(_i,{preserveTabOrder:!0,children:x.jsx(fa,{context:T,modal:!1,initialFocus:s?-1:0,returnFocus:!s,children:x.jsx("div",{ref:S.setFloating,style:y,className:"isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",...$(),children:e})})})})})]})}),FF=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(Od),a=Fy({label:r?null:typeof e=="string"?e:t}),l=cr(),c=a.index===s.activeIndex;return x.jsxs("button",{...o,ref:hu([a.ref,i]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:g0(o.className),...s.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),s.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),LF=b.forwardRef((e,t)=>lr()!==null?x.jsx(y0,{...e,isParent:!1,ref:t}):x.jsx(zA,{children:x.jsx(y0,{...e,isParent:!0,ref:t})}));var VF=String.prototype.replace,$F=/%20/g,Id={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ad={default:Id.RFC3986,formatters:{RFC1738:function(e){return VF.call(e,$F,"+")},RFC3986:function(e){return String(e)}},RFC1738:Id.RFC1738,RFC3986:Id.RFC3986},RF=Ad,_d=Object.prototype.hasOwnProperty,Br=Array.isArray,En=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),jF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Br(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},v0=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},BF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!_d.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 Br(t)&&!Br(n)&&(o=v0(t,r)),Br(t)&&Br(n)?(n.forEach(function(i,s){if(_d.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 _d.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},zF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},WF=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}},Dd=1024,HF=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(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=Dd){for(var c=s.length>=Dd?s.slice(l,l+Dd):s,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===RF.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=En[f];continue}if(f<2048){u[u.length]=En[192|f>>6]+En[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=En[224|f>>12]+En[128|f>>6&63]+En[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=En[240|f>>18]+En[128|f>>12&63]+En[128|f>>6&63]+En[128|f&63]}a+=u.join("")}return a},UF=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),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return jF(n),t},GF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},YF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},qF=function(t,n){return[].concat(t,n)},KF=function(t,n){if(Br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},b0={arrayToObject:v0,assign:zF,combine:qF,compact:UF,decode:WF,encode:HF,isBuffer:YF,isRegExp:GF,maybeMap:KF,merge:BF},w0=Ex,$a=b0,Zi=Ad,ZF=Object.prototype.hasOwnProperty,x0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Cn=Array.isArray,XF=Array.prototype.push,T0=function(e,t){XF.apply(e,Cn(t)?t:[t])},QF=Date.prototype.toISOString,S0=Zi.default,gt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:$a.encode,encodeValuesOnly:!1,format:S0,formatter:Zi.formatters[S0],indices:!1,serializeDate:function(t){return QF.call(t)},skipNulls:!1,strictNullHandling:!1},JF=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Md={},eL=function e(t,n,r,o,i,s,a,l,c,u,d,f,h,p,m,g,v,w){for(var y=t,S=w,T=0,E=!1;(S=S.get(Md))!==void 0&&!E;){var P=S.get(t);if(T+=1,typeof P<"u"){if(P===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Md)>"u"&&(T=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=h(y):r==="comma"&&Cn(y)&&(y=$a.maybeMap(y,function(k){return k instanceof Date?h(k):k})),y===null){if(s)return c&&!g?c(n,gt.encoder,v,"key",p):n;y=""}if(JF(y)||$a.isBuffer(y)){if(c){var D=g?n:c(n,gt.encoder,v,"key",p);return[m(D)+"="+m(c(y,gt.encoder,v,"value",p))]}return[m(n)+"="+m(String(y))]}var _=[];if(typeof y>"u")return _;var I;if(r==="comma"&&Cn(y))g&&c&&(y=$a.maybeMap(y,c)),I=[{value:y.length>0?y.join(",")||null:void 0}];else if(Cn(u))I=u;else{var V=Object.keys(y);I=d?V.sort(d):V}var F=l?n.replace(/\./g,"%2E"):n,$=o&&Cn(y)&&y.length===1?F+"[]":F;if(i&&Cn(y)&&y.length===0)return $+"[]";for(var C=0;C<I.length;++C){var O=I[C],M=typeof O=="object"&&typeof O.value<"u"?O.value:y[O];if(!(a&&M===null)){var L=f&&l?O.replace(/\./g,"%2E"):O,H=Cn(y)?typeof r=="function"?r($,L):$:$+(f?"."+L:"["+L+"]");w.set(t,T);var Y=w0();Y.set(Md,w),T0(_,e(M,H,r,o,i,s,a,l,r==="comma"&&g&&Cn(y)?null:c,u,d,f,h,p,m,g,v,Y))}}return _},tL=function(t){if(!t)return gt;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||gt.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=Zi.default;if(typeof t.format<"u"){if(!ZF.call(Zi.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Zi.formatters[r],i=gt.filter;(typeof t.filter=="function"||Cn(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in x0?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=gt.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:gt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:gt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:gt.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?gt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:gt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:gt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:gt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:gt.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:gt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:gt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gt.strictNullHandling}},nL=function(e,t){var n=e,r=tL(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Cn(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=x0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=w0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||T0(s,eL(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=s.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},Wo=b0,Nd=Object.prototype.hasOwnProperty,rL=Array.isArray,ft={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Wo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},oL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},E0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},iL="utf8=%26%2310003%3B",sL="utf8=%E2%9C%93",aL=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,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===sL?c="utf-8":s[l]===iL&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,ft.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),ft.decoder,c,"key"),p=Wo.maybeMap(E0(u.slice(f+1),n),function(g){return n.decoder(g,ft.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=oL(p)),u.indexOf("[]=")>-1&&(p=rL(p)?[p]:p);var m=Nd.call(r,h);m&&n.duplicates==="combine"?r[h]=Wo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},lL=function(e,t,n,r){for(var o=r?t:E0(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 l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},cL=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&Nd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(i))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&Nd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),lL(u,n,r,o)}},uL=function(t){if(!t)return ft;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"?ft.charset:t.charset,r=typeof t.duplicates>"u"?ft.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:ft.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ft.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ft.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ft.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ft.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ft.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ft.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ft.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ft.decoder,delimiter:typeof t.delimiter=="string"||Wo.isRegExp(t.delimiter)?t.delimiter:ft.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ft.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ft.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ft.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ft.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ft.strictNullHandling}},dL=function(e,t){var n=uL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?aL(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=cL(a,r[a],n,typeof e=="string");o=Wo.merge(o,l,n)}return n.allowSparse===!0?o:Wo.compact(o)},fL=nL,hL=dL,pL=Ad,mL={formats:pL,parse:hL,stringify:fL},ke;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(ke||(ke={}));var C0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(C0||(C0={}));const re=ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zr=e=>{switch(typeof e){case"undefined":return re.undefined;case"string":return re.string;case"number":return isNaN(e)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(e)?re.array:e===null?re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?re.promise:typeof Map<"u"&&e instanceof Map?re.map:typeof Set<"u"&&e instanceof Set?re.set:typeof Date<"u"&&e instanceof Date?re.date:re.object;default:return re.unknown}},K=ke.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class en extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof en))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ke.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}en.create=e=>new en(e);const Xi=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ke.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${ke.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ke.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${ke.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ke.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case K.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,ke.assertNever(e)}return{message:n}};let gL=Xi;function Fd(){return gL}const Ld=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function ne(e,t){const n=Fd(),r=Ld({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Xi?void 0:Xi].filter(o=>!!o)});e.common.issues.push(r)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return Lt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return me;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Qi=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),P0=e=>e.status==="aborted",k0=e=>e.status==="dirty",Ra=e=>e.status==="valid",ja=e=>typeof Promise<"u"&&e instanceof Promise;function Ba(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function O0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));var Ji,es;class Pn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const I0=(e,t)=>{if(Ra(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new en(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=e;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return zr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:zr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Lt,ctx:{common:t.parent.common,data:t.data,parsedType:zr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ja(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return I0(o,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(ja(o)?o:Promise.resolve(o));return I0(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:K.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new jn({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Bn.create(this,this._def)}nullable(){return Ur.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cn.create(this,this._def)}promise(){return rs.create(this,this._def)}or(t){return Ha.create([this,t],this._def)}and(t){return Ua.create(this,t,this._def)}transform(t){return new jn({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Za({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new M0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Xa({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Qa.create(this,t)}readonly(){return Ja.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const yL=/^c[^\s-]{8,}$/i,vL=/^[0-9a-z]+$/,bL=/^[0-9A-HJKMNP-TV-Z]{26}$/,wL=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,xL=/^[a-z0-9_-]{21}$/i,TL=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,SL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,EL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Vd;const CL=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,PL=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,kL=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,A0="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",OL=new RegExp(`^${A0}$`);function _0(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function IL(e){return new RegExp(`^${_0(e)}$`)}function AL(e){let t=`${A0}T${_0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _L(e,t){return!!((t==="v4"||!t)&&CL.test(e)||(t==="v6"||!t)&&PL.test(e))}class Vn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==re.string){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.string,received:i.parsedType}),me}const r=new Lt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?ne(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ne(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")SL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"email",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Vd||(Vd=new RegExp(EL,"u")),Vd.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"emoji",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")wL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"uuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")xL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"nanoid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")yL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"cuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")vL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"cuid2",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")bL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"ulid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ne(o,{validation:"url",code:K.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"regex",code:K.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?AL(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?OL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?IL(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?TL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"duration",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?_L(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"ip",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?kL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"base64",code:K.invalid_string,message:i.message}),r.dirty()):ke.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Vn.create=e=>{var t;return new Vn({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function DL(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class Wr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==re.number){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.number,received:i.parsedType}),me}let r;const o=new Lt;for(const i of this._def.checks)i.kind==="int"?ke.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:K.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?DL(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_finite,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Wr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Wr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ke.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Wr.create=e=>new Wr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ho extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==re.bigint){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.bigint,received:i.parsedType}),me}let r;const o=new Lt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Ho({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Ho({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ho.create=e=>{var t;return new Ho({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class $d extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==re.boolean){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.boolean,received:r.parsedType}),me}return zt(t.data)}}$d.create=e=>new $d({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class ts extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==re.date){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_date}),me}const r=new Lt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ke.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ts({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ts.create=e=>new ts({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Rd extends xe{_parse(t){if(this._getType(t)!==re.symbol){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.symbol,received:r.parsedType}),me}return zt(t.data)}}Rd.create=e=>new Rd({typeName:he.ZodSymbol,...ye(e)});class za extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.undefined,received:r.parsedType}),me}return zt(t.data)}}za.create=e=>new za({typeName:he.ZodUndefined,...ye(e)});class Wa extends xe{_parse(t){if(this._getType(t)!==re.null){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.null,received:r.parsedType}),me}return zt(t.data)}}Wa.create=e=>new Wa({typeName:he.ZodNull,...ye(e)});class jd extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}jd.create=e=>new jd({typeName:he.ZodAny,...ye(e)});class Uo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}Uo.create=e=>new Uo({typeName:he.ZodUnknown,...ye(e)});class gr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return ne(n,{code:K.invalid_type,expected:re.never,received:n.parsedType}),me}}gr.create=e=>new gr({typeName:he.ZodNever,...ye(e)});class Bd extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.void,received:r.parsedType}),me}return zt(t.data)}}Bd.create=e=>new Bd({typeName:he.ZodVoid,...ye(e)});class cn extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==re.array)return ne(n,{code:K.invalid_type,expected:re.array,received:n.parsedType}),me;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(ne(n,{code:s?K.too_big:K.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ne(n,{code:K.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ne(n,{code:K.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Pn(n,s,n.path,a)))).then(s=>Lt.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Pn(n,s,n.path,a)));return Lt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new cn({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new cn({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new cn({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}cn.create=(e,t)=>new cn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Go(e){if(e instanceof rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bn.create(Go(r))}return new rt({...e._def,shape:()=>t})}else return e instanceof cn?new cn({...e._def,type:Go(e.element)}):e instanceof Bn?Bn.create(Go(e.unwrap())):e instanceof Ur?Ur.create(Go(e.unwrap())):e instanceof Rn?Rn.create(e.items.map(t=>Go(t))):e}class rt extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ke.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==re.object){const c=this._getOrReturnCtx(t);return ne(c,{code:K.invalid_type,expected:re.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof gr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Pn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof gr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(ne(o,{code:K.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Pn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Lt.mergeObjectSync(r,c)):Lt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new rt({...this._def,unknownKeys:"strip"})}passthrough(){return new rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new rt({...this._def,catchall:t})}pick(t){const n={};return ke.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}omit(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}deepPartial(){return Go(this)}partial(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new rt({...this._def,shape:()=>n})}required(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Bn;)i=i._def.innerType;n[r]=i}}),new rt({...this._def,shape:()=>n})}keyof(){return D0(ke.objectKeys(this.shape))}}rt.create=(e,t)=>new rt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:he.ZodObject,...ye(t)}),rt.strictCreate=(e,t)=>new rt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:he.ZodObject,...ye(t)}),rt.lazycreate=(e,t)=>new rt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:he.ZodObject,...ye(t)});class Ha extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new en(a.ctx.common.issues));return ne(n,{code:K.invalid_union,unionErrors:s}),me}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new en(l));return ne(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Ha.create=(e,t)=>new Ha({options:e,typeName:he.ZodUnion,...ye(t)});const $n=e=>e instanceof Ya?$n(e.schema):e instanceof jn?$n(e.innerType()):e instanceof qa?[e.value]:e instanceof Hr?e.options:e instanceof Ka?ke.objectValues(e.enum):e instanceof Za?$n(e._def.innerType):e instanceof za?[void 0]:e instanceof Wa?[null]:e instanceof Bn?[void 0,...$n(e.unwrap())]:e instanceof Ur?[null,...$n(e.unwrap())]:e instanceof M0||e instanceof Ja?$n(e.unwrap()):e instanceof Xa?$n(e._def.innerType):[];class zd extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.object)return ne(n,{code:K.invalid_type,expected:re.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ne(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const s=$n(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new zd({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Wd(e,t){const n=zr(e),r=zr(t);if(e===t)return{valid:!0,data:e};if(n===re.object&&r===re.object){const o=ke.objectKeys(t),i=ke.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=Wd(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===re.array&&r===re.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=Wd(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===re.date&&r===re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ua extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(P0(i)||P0(s))return me;const a=Wd(i.value,s.value);return a.valid?((k0(i)||k0(s))&&n.dirty(),{status:n.value,value:a.data}):(ne(r,{code:K.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ua.create=(e,t,n)=>new Ua({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Rn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.array)return ne(r,{code:K.invalid_type,expected:re.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return ne(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(ne(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Pn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Lt.mergeArray(n,s)):Lt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Rn({...this._def,rest:t})}}Rn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class Ga extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.object)return ne(r,{code:K.invalid_type,expected:re.object,received:r.parsedType}),me;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new Pn(r,a,r.path,a)),value:s._parse(new Pn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Lt.mergeObjectAsync(n,o):Lt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Ga({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Ga({keyType:Vn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Hd extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.map)return ne(r,{code:K.invalid_type,expected:re.map,received:r.parsedType}),me;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Pn(r,a,r.path,[c,"key"])),value:i._parse(new Pn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Hd.create=(e,t,n)=>new Hd({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Yo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.set)return ne(r,{code:K.invalid_type,expected:re.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ne(r,{code:K.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ne(r,{code:K.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Pn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new Yo({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new Yo({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Yo.create=(e,t)=>new Yo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class ns extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.function)return ne(n,{code:K.invalid_type,expected:re.function,received:n.parsedType}),me;function r(a,l){return Ld({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),Xi].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return Ld({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),Xi].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof rs){const a=this;return zt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,i).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new en([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new en([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ns({...this._def,args:Rn.create(t).rest(Uo.create())})}returns(t){return new ns({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ns({args:t||Rn.create([]).rest(Uo.create()),returns:n||Uo.create(),typeName:he.ZodFunction,...ye(r)})}}class Ya extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ya.create=(e,t)=>new Ya({getter:e,typeName:he.ZodLazy,...ye(t)});class qa extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ne(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}qa.create=(e,t)=>new qa({value:e,typeName:he.ZodLiteral,...ye(t)});function D0(e,t){return new Hr({values:e,typeName:he.ZodEnum,...ye(t)})}class Hr extends xe{constructor(){super(...arguments),Ji.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{expected:ke.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(Ba(this,Ji)||O0(this,Ji,new Set(this._def.values)),!Ba(this,Ji).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{received:n.data,code:K.invalid_enum_value,options:r}),me}return zt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Hr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Hr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ji=new WeakMap,Hr.create=D0;class Ka extends xe{constructor(){super(...arguments),es.set(this,void 0)}_parse(t){const n=ke.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==re.string&&r.parsedType!==re.number){const o=ke.objectValues(n);return ne(r,{expected:ke.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(Ba(this,es)||O0(this,es,new Set(ke.getValidEnumValues(this._def.values))),!Ba(this,es).has(t.data)){const o=ke.objectValues(n);return ne(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return zt(t.data)}get enum(){return this._def.values}}es=new WeakMap,Ka.create=(e,t)=>new Ka({values:e,typeName:he.ZodNativeEnum,...ye(t)});class rs extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.promise&&n.common.async===!1)return ne(n,{code:K.invalid_type,expected:re.promise,received:n.parsedType}),me;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}rs.create=(e,t)=>new rs({type:e,typeName:he.ZodPromise,...ye(t)});class jn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{ne(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?Qi(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Qi(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ra(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Ra(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);ke.assertNever(o)}}jn.create=(e,t,n)=>new jn({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),jn.createWithPreprocess=(e,t,n)=>new jn({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class Bn extends xe{_parse(t){return this._getType(t)===re.undefined?zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bn.create=(e,t)=>new Bn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Ur extends xe{_parse(t){return this._getType(t)===re.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ur.create=(e,t)=>new Ur({innerType:e,typeName:he.ZodNullable,...ye(t)});class Za extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Za.create=(e,t)=>new Za({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class Xa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ja(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Xa.create=(e,t)=>new Xa({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Ud extends xe{_parse(t){if(this._getType(t)!==re.nan){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Ud.create=e=>new Ud({typeName:he.ZodNaN,...ye(e)});class M0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Qa extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?me:i.status==="dirty"?(n.dirty(),Qi(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Qa({in:t,out:n,typeName:he.ZodPipeline})}}class Ja extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ra(o)&&(o.value=Object.freeze(o.value)),o);return ja(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ja.create=(e,t)=>new Ja({innerType:e,typeName:he.ZodReadonly,...ye(t)}),rt.lazycreate;var he;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(he||(he={})),Vn.create,Wr.create,Ud.create,Ho.create,$d.create,ts.create,Rd.create,za.create,Wa.create,jd.create,Uo.create,gr.create,Bd.create,cn.create,rt.create,rt.strictCreate,Ha.create,zd.create,Ua.create,Rn.create,Ga.create,Hd.create,Yo.create,ns.create,Ya.create,qa.create,Hr.create,Ka.create,rs.create,jn.create,Bn.create,Ur.create,jn.createWithPreprocess,Qa.create;const ML={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},N0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return mL.parse(n.toString(),ML)},F0=e=>e.replace("[",".").replace("]","").split("."),os=(e,t)=>F0(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof cn?o.element:o},t),is=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,NL=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},i=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},s=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},a=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),type:kn.instance(f,Wr)?"number":(d==null?void 0:d.type)??"text",error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}};b.useEffect(()=>{const u=Object.values(r.current).map(f=>{const h=f.element.dataset.origin?document.querySelector(`[data-target=${f.element.name}]`):f.element,p=f.schema.safeParse(is(h)),m=g=>{const v=h.dataset.target||h.name;if(!v)return;console.log(g);const w=is(g.target)||(g.relatedTarget?is(g.relatedTarget):""),y=f.schema.safeParse(w);if(console.log({name:v,value:w,validation:y}),y.success)return h.setCustomValidity(""),n(S=>{const{[v]:T,...E}=S||{};return E===null||kn.empty(E)?null:E});if(h.required){const S=y.error.issues[0].message;h.setCustomValidity(S),n(T=>({...T,[v]:S}))}};return h.addEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m),{input:f,hasInitialError:h.required?!p.success:!1,unsubscribe:()=>{h.removeEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m)}}});return u.some(f=>f.hasInitialError)&&n(f=>f===null?{}:f),()=>u.forEach(f=>f.unsubscribe())});const l=b.useCallback(u=>d=>{const f=d.currentTarget,h=Object.values(r.current).reduce((m,g)=>{const v=g.element,w=g.schema.safeParse(is(v));if(v.dataset.ignore==="ignore"||w.success)return m;const y=w.error.issues[0].message;v.setAttribute("data-initialized","true");const S=v.dataset.name||v.name||"";return{...m,[S]:y}},{}),p=kn.empty(h)?null:h;n(p),u==null||u({form:f,errors:p||{}})},[]),c=b.useCallback(u=>d=>{d.preventDefault();const f=d.currentTarget;let h=N0(f);Array.from(f.elements).forEach(m=>{if(m.tagName==="SELECT"){const g=m;h=Zf(h,g.name,g.value)}if(m.tagName==="INPUT"){const g=m;h=Zf(h,g.name,is(g))}});const p=e.safeParse(h);return p.success?u({form:f,json:h,data:p.data,event:d,reset:()=>Gu(f),success:!0,errors:[]}):u({form:f,json:h,event:d,data:h,success:!1,reset:()=>Gu(f),errors:p.error.issues.map(m=>({message:m.message,path:m.path.map(g=>String(g))}))})},[]);return{input:a,datepicker:o,checkbox:s,select:i,onSubmit:c,errors:t,onInvalid:l,disabled:t!==null}},FL={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},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"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},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%)"}}},LL={name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 75%)",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%, 80%)",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(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 85%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},VL={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>)`},ss=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(ss(s,t,n,a))},[]),L0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:L0(s,t,n,a)}},{}),V0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Gd=(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)},$L={default:e=>Gd(e,{result:V0.default}),dark:e=>Gd(e,{result:V0.dark})},RL=(e,t)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=ss(e.colors,n),o=ss(e.spacing,n),i=ss(e.rounded,n);return Gd(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};ee.Alert=FP,ee.Autocomplete=F_,ee.Button=xr,ee.ButtonGroup=O1,ee.Calendar=ny,ee.Card=ry,ee.Checkbox=Sv,ee.ColType=zo,ee.Collapse=sg,ee.ComponentsProvider=__,ee.DatePicker=V_,ee.Dropdown=Do,ee.FileUpload=KD,ee.Form=XD,ee.Input=Li,ee.InputFeedback=xv,ee.InputField=ya,ee.Menu=LF,ee.MenuItem=FF,ee.Modal=mv,ee.Option=Tv,ee.Polymorph=no,ee.Radiobox=QD,ee.Select=Vr,ee.Stats=wI,ee.Switch=JD,ee.Tab=A_,ee.Table=NF,ee.Tabs=O_,ee.Tag=A1,ee.Tooltip=vv,ee.TransferList=NN,ee.convertPath=F0,ee.createColumns=oF,ee.createDesignTokens=L0,ee.createOptionCols=Ed,ee.createStyles=$L,ee.createTheme=RL,ee.css=Xe,ee.defaultDarkTheme=FL,ee.defaultLightTheme=LL,ee.dispatchInput=ys,ee.formReset=Gu,ee.formToJson=N0,ee.getSchemaShape=os,ee.initializeInputDataset=vs,ee.isReactComponent=C1,ee.isReactFC=P1,ee.isSsr=ma,ee.mergeRefs=Ol,ee.parsers=VL,ee.path=pv,ee.reduceTokens=ss,ee.safeRegex=Pu,ee.useForm=NL,ee.usePrevious=bv,ee.useReactive=oy,ee.useTablePreferences=sF,ee.useTranslations=Qt,ee.uuid=pa,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
195
|
+
*/var Du,Nv;function YA(){if(Nv)return Du;Nv=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 l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Du=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Du}var Nu,Fv;function Fu(){if(Fv)return Nu;Fv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Nu=e,Nu}var Lu,Lv;function Vv(){return Lv||(Lv=1,Lu=Function.call.bind(Object.prototype.hasOwnProperty)),Lu}var Vu,$v;function qA(){if($v)return Vu;$v=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fu(),n={},r=Vv();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"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 f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Vu=o,Vu}var $u,jv;function KA(){if(jv)return $u;jv=1;var e=Dv(),t=YA(),n=Fu(),r=Vv(),o=qA(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return $u=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(_){var R=_&&(c&&_[c]||_[u]);if(typeof R=="function")return R}var f="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:x(),arrayOf:g,element:S(),elementType:T(),instanceOf:E,node:C(),objectOf:I,oneOf:O,oneOfType:k,shape:D,exact:V};function p(_,R){return _===R?_!==0||1/_===1/R:_!==_&&R!==R}function m(_,R){this.message=_,this.data=R&&typeof R=="object"?R:{},this.stack=""}m.prototype=Error.prototype;function v(_){if(process.env.NODE_ENV!=="production")var R={},Z=0;function re(G,F,B,W,j,Y,se){if(W=W||f,Y=Y||B,se!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=W+":"+B;!R[Pe]&&Z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[Pe]=!0,Z++)}}return F[B]==null?G?F[B]===null?new m("The "+j+" `"+Y+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+j+" `"+Y+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:_(F,B,W,j,Y)}var Q=re.bind(null,!1);return Q.isRequired=re.bind(null,!0),Q}function y(_){function R(Z,re,Q,G,F,B){var W=Z[re],j=N(W);if(j!==_){var Y=$(W);return new m("Invalid "+G+" `"+F+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return v(R)}function x(){return v(s)}function g(_){function R(Z,re,Q,G,F){if(typeof _!="function")return new m("Property `"+F+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var B=Z[re];if(!Array.isArray(B)){var W=N(B);return new m("Invalid "+G+" `"+F+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var j=0;j<B.length;j++){var Y=_(B,j,Q,G,F+"["+j+"]",n);if(Y instanceof Error)return Y}return null}return v(R)}function S(){function _(R,Z,re,Q,G){var F=R[Z];if(!a(F)){var B=N(F);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return v(_)}function T(){function _(R,Z,re,Q,G){var F=R[Z];if(!e.isValidElementType(F)){var B=N(F);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return v(_)}function E(_){function R(Z,re,Q,G,F){if(!(Z[re]instanceof _)){var B=_.name||f,W=U(Z[re]);return new m("Invalid "+G+" `"+F+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+B+"`."))}return null}return v(R)}function O(_){if(!Array.isArray(_))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 R(Z,re,Q,G,F){for(var B=Z[re],W=0;W<_.length;W++)if(p(B,_[W]))return null;var j=JSON.stringify(_,function(se,H){var Pe=$(H);return Pe==="symbol"?String(H):H});return new m("Invalid "+G+" `"+F+"` of value `"+String(B)+"` "+("supplied to `"+Q+"`, expected one of "+j+"."))}return v(R)}function I(_){function R(Z,re,Q,G,F){if(typeof _!="function")return new m("Property `"+F+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var B=Z[re],W=N(B);if(W!=="object")return new m("Invalid "+G+" `"+F+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var j in B)if(r(B,j)){var Y=_(B,j,Q,G,F+"."+j,n);if(Y instanceof Error)return Y}return null}return v(R)}function k(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var R=0;R<_.length;R++){var Z=_[R];if(typeof Z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(Z)+" at index "+R+"."),s}function re(Q,G,F,B,W){for(var j=[],Y=0;Y<_.length;Y++){var se=_[Y],H=se(Q,G,F,B,W,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&j.push(H.data.expectedType)}var Pe=j.length>0?", expected one of type ["+j.join(", ")+"]":"";return new m("Invalid "+B+" `"+W+"` supplied to "+("`"+F+"`"+Pe+"."))}return v(re)}function C(){function _(R,Z,re,Q,G){return P(R[Z])?null:new m("Invalid "+Q+" `"+G+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return v(_)}function L(_,R,Z,re,Q){return new m((_||"React class")+": "+R+" type `"+Z+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function D(_){function R(Z,re,Q,G,F){var B=Z[re],W=N(B);if(W!=="object")return new m("Invalid "+G+" `"+F+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var j in _){var Y=_[j];if(typeof Y!="function")return L(Q,G,F,j,$(Y));var se=Y(B,j,Q,G,F+"."+j,n);if(se)return se}return null}return v(R)}function V(_){function R(Z,re,Q,G,F){var B=Z[re],W=N(B);if(W!=="object")return new m("Invalid "+G+" `"+F+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var j=t({},Z[re],_);for(var Y in j){var se=_[Y];if(r(_,Y)&&typeof se!="function")return L(Q,G,F,Y,$(se));if(!se)return new m("Invalid "+G+" `"+F+"` key `"+Y+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(Z[re],null," ")+`
|
|
196
|
+
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var H=se(B,Y,Q,G,F+"."+Y,n);if(H)return H}return null}return v(R)}function P(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(P);if(_===null||a(_))return!0;var R=d(_);if(R){var Z=R.call(_),re;if(R!==_.entries){for(;!(re=Z.next()).done;)if(!P(re.value))return!1}else for(;!(re=Z.next()).done;){var Q=re.value;if(Q&&!P(Q[1]))return!1}}else return!1;return!0;default:return!1}}function A(_,R){return _==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function N(_){var R=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":A(R,_)?"symbol":R}function $(_){if(typeof _>"u"||_===null)return""+_;var R=N(_);if(R==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return R}function z(_){var R=$(_);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function U(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},$u}var ju,Rv;function ZA(){if(Rv)return ju;Rv=1;var e=Fu();function t(){}function n(){}return n.resetWarningCache=t,ju=function(){function r(s,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var 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},ju}if(process.env.NODE_ENV!=="production"){var XA=Dv(),QA=!0;Mu.exports=KA()(XA.isElement,QA)}else Mu.exports=ZA()();var JA=Mu.exports;const We=z0(JA);function jo(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{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Ro(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(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Bv(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 zv(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))}typeof SuppressedError=="function"&&SuppressedError;var eM=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 Ri(e,t){var n=tM(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 tM(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=eM.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var nM=[".DS_Store","Thumbs.db"];function rM(e){return jo(this,void 0,void 0,function(){return Ro(this,function(t){return wa(e)&&oM(e.dataTransfer)?[2,lM(e.dataTransfer,e.type)]:iM(e)?[2,sM(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,aM(e)]:[2,[]]})})}function oM(e){return wa(e)}function iM(e){return wa(e)&&wa(e.target)}function wa(e){return typeof e=="object"&&e!==null}function sM(e){return Ru(e.target.files).map(function(t){return Ri(t)})}function aM(e){return jo(this,void 0,void 0,function(){var t;return Ro(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 Ri(r)})]}})})}function lM(e,t){return jo(this,void 0,void 0,function(){var n,r;return Ro(this,function(o){switch(o.label){case 0:return e.items?(n=Ru(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(cM))]):[3,2];case 1:return r=o.sent(),[2,Wv(Hv(r))];case 2:return[2,Wv(Ru(e.files).map(function(i){return Ri(i)}))]}})})}function Wv(e){return e.filter(function(t){return nM.indexOf(t.name)===-1})}function Ru(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function cM(e){if(typeof e.webkitGetAsEntry!="function")return Uv(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Gv(t):Uv(e)}function Hv(e){return e.reduce(function(t,n){return zv(zv([],Bv(t),!1),Bv(Array.isArray(n)?Hv(n):[n]),!1)},[])}function Uv(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Ri(t);return Promise.resolve(n)}function uM(e){return jo(this,void 0,void 0,function(){return Ro(this,function(t){return[2,e.isDirectory?Gv(e):dM(e)]})})}function Gv(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return jo(s,void 0,void 0,function(){var l,c,u;return Ro(this,function(d){switch(d.label){case 0:if(a.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(uM)),o.push(u),i(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function dM(e){return jo(this,void 0,void 0,function(){return Ro(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=Ri(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var fM=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 Yv(e){return mM(e)||pM(e)||Xv(e)||hM()}function hM(){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 pM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mM(e){if(Array.isArray(e))return Bu(e)}function qv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Kv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qv(Object(n),!0).forEach(function(r){Zv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bi(e,t){return vM(e)||yM(e,t)||Xv(e,t)||gM()}function gM(){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 Xv(e,t){if(e){if(typeof e=="string")return Bu(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 Bu(e,t)}}function Bu(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 yM(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function vM(e){if(Array.isArray(e))return e}var bM="file-invalid-type",wM="file-too-large",xM="file-too-small",TM="too-many-files",SM=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:bM,message:"File type must be ".concat(n)}},Qv=function(t){return{code:wM,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Jv=function(t){return{code:xM,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},EM={code:TM,message:"Too many files"};function eb(e,t){var n=e.type==="application/x-moz-file"||fM(e,t);return[n,n?null:SM(t)]}function tb(e,t,n){if(Fr(e.size))if(Fr(t)&&Fr(n)){if(e.size>n)return[!1,Qv(n)];if(e.size<t)return[!1,Jv(t)]}else{if(Fr(t)&&e.size<t)return[!1,Jv(t)];if(Fr(n)&&e.size>n)return[!1,Qv(n)]}return[!0,null]}function Fr(e){return e!=null}function CM(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=eb(l,n),u=Bi(c,1),d=u[0],f=tb(l,r,o),h=Bi(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function xa(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ta(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function nb(e){e.preventDefault()}function PM(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function kM(e){return e.indexOf("Edge/")!==-1}function IM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return PM(e)||kM(e)}function vn(){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!xa(r)&&a&&a.apply(void 0,[r].concat(i)),xa(r)})}}function OM(){return"showOpenFilePicker"in window}function _M(e){if(Fr(e)){var t=Object.entries(e).filter(function(n){var r=Bi(n,2),o=r[0],i=r[1],s=!0;return rb(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(ob))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Bi(r,2),i=o[0],s=o[1];return Kv(Kv({},n),{},Zv({},i,s))},{});return[{description:"Files",accept:t}]}return e}function AM(e){if(Fr(e))return Object.entries(e).reduce(function(t,n){var r=Bi(n,2),o=r[0],i=r[1];return[].concat(Yv(t),[o],Yv(i))},[]).filter(function(t){return rb(t)||ob(t)}).join(",")}function MM(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function DM(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function rb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function ob(e){return/^.*\.[\w]+$/.test(e)}var NM=["children"],FM=["open"],LM=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],VM=["refKey","onChange","onClick"];function $M(e){return BM(e)||RM(e)||ib(e)||jM()}function jM(){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 RM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BM(e){if(Array.isArray(e))return Wu(e)}function zu(e,t){return HM(e)||WM(e,t)||ib(e,t)||zM()}function zM(){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 ib(e,t){if(e){if(typeof e=="string")return Wu(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 Wu(e,t)}}function Wu(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 WM(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function HM(e){if(Array.isArray(e))return e}function sb(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 Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sb(Object(n),!0).forEach(function(r){Hu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sa(e,t){if(e==null)return{};var n=UM(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 UM(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 Uu=b.forwardRef(function(e,t){var n=e.children,r=Sa(e,NM),o=lb(r),i=o.open,s=Sa(o,FM);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(Je(Je({},s),{},{open:i})))});Uu.displayName="Dropzone";var ab={disabled:!1,getFilesFromEvent:rM,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};Uu.defaultProps=ab,Uu.propTypes={children:We.func,accept:We.objectOf(We.arrayOf(We.string)),multiple:We.bool,preventDropOnDocument:We.bool,noClick:We.bool,noKeyboard:We.bool,noDrag:We.bool,noDragEventsBubbling:We.bool,minSize:We.number,maxSize:We.number,maxFiles:We.number,disabled:We.bool,getFilesFromEvent:We.func,onFileDialogCancel:We.func,onFileDialogOpen:We.func,useFsAccessApi:We.bool,autoFocus:We.bool,onDragEnter:We.func,onDragLeave:We.func,onDragOver:We.func,onDrop:We.func,onDropAccepted:We.func,onDropRejected:We.func,onError:We.func,validator:We.func};var Gu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function lb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Je(Je({},ab),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.autoFocus,g=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,O=t.noDragEventsBubbling,I=t.onError,k=t.validator,C=b.useMemo(function(){return AM(n)},[n]),L=b.useMemo(function(){return _M(n)},[n]),D=b.useMemo(function(){return typeof v=="function"?v:cb},[v]),V=b.useMemo(function(){return typeof m=="function"?m:cb},[m]),P=b.useRef(null),A=b.useRef(null),N=b.useReducer(GM,Gu),$=zu(N,2),z=$[0],U=$[1],_=z.isFocused,R=z.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&y&&OM()),re=function(){!Z.current&&R&&setTimeout(function(){if(A.current){var ae=A.current.files;ae.length||(U({type:"closeDialog"}),V())}},300)};b.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[A,R,V,Z]);var Q=b.useRef([]),G=function(ae){P.current&&P.current.contains(ae.target)||(ae.preventDefault(),Q.current=[])};b.useEffect(function(){return g&&(document.addEventListener("dragover",nb,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",nb),document.removeEventListener("drop",G))}},[P,g]),b.useEffect(function(){return!r&&x&&P.current&&P.current.focus(),function(){}},[P,x,r]);var F=b.useCallback(function(J){I?I(J):console.error(J)},[I]),B=b.useCallback(function(J){J.preventDefault(),J.persist(),Ie(J),Q.current=[].concat($M(Q.current),[J.target]),Ta(J)&&Promise.resolve(o(J)).then(function(ae){if(!(xa(J)&&!O)){var Ae=ae.length,Ze=Ae>0&&CM({files:ae,accept:C,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:k}),It=Ae>0&&!Ze;U({isDragAccept:Ze,isDragReject:It,isDragActive:!0,type:"setDraggedFiles"}),c&&c(J)}}).catch(function(ae){return F(ae)})},[o,c,F,O,C,s,i,a,l,k]),W=b.useCallback(function(J){J.preventDefault(),J.persist(),Ie(J);var ae=Ta(J);if(ae&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(J),!1},[d,O]),j=b.useCallback(function(J){J.preventDefault(),J.persist(),Ie(J);var ae=Q.current.filter(function(Ze){return P.current&&P.current.contains(Ze)}),Ae=ae.indexOf(J.target);Ae!==-1&&ae.splice(Ae,1),Q.current=ae,!(ae.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ta(J)&&u&&u(J))},[P,u,O]),Y=b.useCallback(function(J,ae){var Ae=[],Ze=[];J.forEach(function(It){var Ft=eb(It,C),$t=zu(Ft,2),Ur=$t[0],Jo=$t[1],ei=tb(It,s,i),tl=zu(ei,2),qd=tl[0],Kd=tl[1],Zd=k?k(It):null;if(Ur&&qd&&!Zd)Ae.push(It);else{var Xd=[Jo,Kd];Zd&&(Xd=Xd.concat(Zd)),Ze.push({file:It,errors:Xd.filter(function(UL){return UL})})}}),(!a&&Ae.length>1||a&&l>=1&&Ae.length>l)&&(Ae.forEach(function(It){Ze.push({file:It,errors:[EM]})}),Ae.splice(0)),U({acceptedFiles:Ae,fileRejections:Ze,type:"setFiles"}),f&&f(Ae,Ze,ae),Ze.length>0&&p&&p(Ze,ae),Ae.length>0&&h&&h(Ae,ae)},[U,a,C,s,i,l,f,h,p,k]),se=b.useCallback(function(J){J.preventDefault(),J.persist(),Ie(J),Q.current=[],Ta(J)&&Promise.resolve(o(J)).then(function(ae){xa(J)&&!O||Y(ae,J)}).catch(function(ae){return F(ae)}),U({type:"reset"})},[o,Y,F,O]),H=b.useCallback(function(){if(Z.current){U({type:"openDialog"}),D();var J={multiple:a,types:L};window.showOpenFilePicker(J).then(function(ae){return o(ae)}).then(function(ae){Y(ae,null),U({type:"closeDialog"})}).catch(function(ae){MM(ae)?(V(ae),U({type:"closeDialog"})):DM(ae)?(Z.current=!1,A.current?(A.current.value=null,A.current.click()):F(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."))):F(ae)});return}A.current&&(U({type:"openDialog"}),D(),A.current.value=null,A.current.click())},[U,D,V,y,Y,F,L,a]),Pe=b.useCallback(function(J){!P.current||!P.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),H())},[P,H]),it=b.useCallback(function(){U({type:"focus"})},[]),Ue=b.useCallback(function(){U({type:"blur"})},[]),st=b.useCallback(function(){S||(IM()?setTimeout(H,0):H())},[S,H]),de=function(ae){return r?null:ae},Ee=function(ae){return T?null:de(ae)},ce=function(ae){return E?null:de(ae)},Ie=function(ae){O&&ae.stopPropagation()},ht=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=J.refKey,Ae=ae===void 0?"ref":ae,Ze=J.role,It=J.onKeyDown,Ft=J.onFocus,$t=J.onBlur,Ur=J.onClick,Jo=J.onDragEnter,ei=J.onDragOver,tl=J.onDragLeave,qd=J.onDrop,Kd=Sa(J,LM);return Je(Je(Hu({onKeyDown:Ee(vn(It,Pe)),onFocus:Ee(vn(Ft,it)),onBlur:Ee(vn($t,Ue)),onClick:de(vn(Ur,st)),onDragEnter:ce(vn(Jo,B)),onDragOver:ce(vn(ei,W)),onDragLeave:ce(vn(tl,j)),onDrop:ce(vn(qd,se)),role:typeof Ze=="string"&&Ze!==""?Ze:"presentation"},Ae,P),!r&&!T?{tabIndex:0}:{}),Kd)}},[P,Pe,it,Ue,st,B,W,j,se,T,E,r]),Oe=b.useCallback(function(J){J.stopPropagation()},[]),pt=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=J.refKey,Ae=ae===void 0?"ref":ae,Ze=J.onChange,It=J.onClick,Ft=Sa(J,VM),$t=Hu({accept:C,multiple:a,type:"file",style:{display:"none"},onChange:de(vn(Ze,se)),onClick:de(vn(It,Oe)),tabIndex:-1},Ae,A);return Je(Je({},$t),Ft)}},[A,n,a,se,r]);return Je(Je({},z),{},{isFocused:_&&!r,getRootProps:ht,getInputProps:pt,rootRef:P,inputRef:A,open:de(H)})}function GM(e,t){switch(t.type){case"focus":return Je(Je({},e),{},{isFocused:!0});case"blur":return Je(Je({},e),{},{isFocused:!1});case"openDialog":return Je(Je({},Gu),{},{isFileDialogActive:!0});case"closeDialog":return Je(Je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Je(Je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Je(Je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Je({},Gu);default:return e}}function cb(){}const YM={isImage:e=>e.type.includes("image")},qM=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(YM.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Ov(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Ov(e.file.size)})},[e.file]),t.type==="img"?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(Yn,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(po,{})})]}):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(_P,{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(Yn,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(po,{className:"text-danger"})})]})},KM=e=>w.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>w.jsx(qM,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),ZM=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(KM,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(b.Fragment,{children:e.idle}),XM=w.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[w.jsx(FP,{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"})]})]}),QM=({idle:e=XM,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=d=>{n==null||n(d),i(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=lb({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",{...l(r),name:r.name,id:r.name}),w.jsx(ZM,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},JM=["INPUT","SELECT"],Yu=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{JM.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},eD=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})},tD=({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:ze("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]}),Lr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const v=Ut(),y=b.useRef(null),x=p.id??p.name;b.useImperativeHandle(m,()=>y.current),b.useEffect(()=>{if(y.current===null)return;const S=y.current,T=ws(y.current),E=()=>S.setAttribute("data-selected","true");return S.addEventListener("change",E),()=>{T(),S.removeEventListener("change",E)}},[]);const g=()=>{var S;return(S=y.current)==null?void 0:S.focus()};return w.jsx(va,{container:ze("group inline-block w-full",c),error:h,feedback:o,hideLeft:u,left:f,info:n,optionalText:l,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:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(ng,{size:20}),w.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:x,name:x,value:p.value,required:e,ref:Ol(m,y),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:ze("input appearance-none select group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent 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}`))]})})}),qu=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},nD=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),l=s,c=b.useRef(null),u=qu(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=f=>{var m;const p=f.target.dataset.checked!=="true";a(p),(m=r==null?void 0:r.onCheck)==null||m.call(r,p),c.current!==null&&(bs(c.current,p.toString()),c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:ze("flex flex-wrap items-center",t),children:[w.jsx("input",{...r,id:r.id||i,ref:c,hidden:!0,type:"checkbox",checked:l,onChange:f=>a(f.target.checked)}),w.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,className:"duration-300 ease-in-out relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors 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":l,className:"duration-300 duration-300 ease-in-out inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition 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:"inline-block ml-3 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})]})}),Ea=0,fr=1,Bo=2,ub=4;function zi(e,t){return n=>e(t(n))}function rD(e,t){return t(e)}function db(e,t){return n=>e(t,n)}function fb(e,t){return()=>e(t)}function Ca(e,t){return t(e),e}function qe(...e){return e}function oD(e){e()}function hb(e){return()=>e}function iD(...e){return()=>{e.map(oD)}}function Ku(e){return e!==void 0}function Vr(){}function je(e,t){return e(fr,t)}function be(e,t){e(Ea,t)}function Zu(e){e(Bo)}function Dt(e){return e(ub)}function ue(e,t){return je(e,db(t,Ea))}function bn(e,t){const n=e(fr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Bo:e.splice(0,e.length);return;case fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Ea:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case fr:o(t);break;case Ea:t=o;break;case ub:return t}return n(r,o)}}function sD(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case fr:return i?n===i?void 0:(r(),n=i,t=je(e,i),t):(r(),Vr);case Bo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function qt(e){return Ca(Ce(),t=>ue(e,t))}function Nt(e,t){return Ca(X(t),n=>ue(e,n))}function aD(...e){return t=>e.reduceRight(rD,t)}function q(e,...t){const n=aD(...t);return(r,o)=>{switch(r){case fr:return je(e,n(o));case Bo:Zu(e);return}}}function pb(e,t){return e===t}function Ke(e=pb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function ie(e){return t=>zi(t,e)}function wn(e){return t=>()=>t(e)}function xn(e,t){return n=>r=>n(t=e(t,r))}function zo(e){return t=>n=>{e>0?e--:t(n)}}function hr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function mb(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...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);je(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function gb(...e){return function(t,n){switch(t){case fr:return iD(...e.map(r=>je(r,n)));case Bo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=pb){return q(e,Ke(t))}function bt(...e){const t=Ce(),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);je(i,l=>{n[s]=l,r=r|a,r===o&&be(t,n)})}),function(i,s){switch(i){case fr:return r===o&&s(n),je(t,s);case Bo:return Zu(t);default:throw new Error(`unrecognized action ${i}`)}}}function Fe(e,t=[],{singleton:n}={singleton:!0}){return{id:lD(),constructor:e,dependencies:t,singleton:n}}const lD=()=>Symbol();function cD(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(l=>n(l)));return s&&t.set(r,a),a};return n(e)}function uD(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 Pa=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Xu(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 l(y,x){y.propsReady&&be(y.propsReady,!1);for(const g of r){const S=y[t.required[g]];be(S,x[g])}for(const g of o)if(g in x){const S=y[t.optional[g]];be(S,x[g])}y.propsReady&&be(y.propsReady,!0)}function c(y){return i.reduce((x,g)=>(x[g]=S=>{const T=y[t.methods[g]];be(T,S)},x),{})}function u(y){return s.reduce((x,g)=>(x[g]=sD(y[t.events[g]]),x),{})}const d=b.forwardRef((y,x)=>{const{children:g,...S}=y,[T]=b.useState(()=>Ca(cD(e),O=>l(O,S))),[E]=b.useState(fb(u,T));return Pa(()=>{for(const O of s)O in S&&je(E[O],S[O]);return()=>{Object.values(E).map(Zu)}},[S,E,T]),Pa(()=>{l(T,S)}),b.useImperativeHandle(x,hb(c(T))),b.createElement(a.Provider,{value:T},n?b.createElement(n,uD([...r,...o,...s],S),g):g)}),f=y=>b.useCallback(db(be,b.useContext(a)[y]),[y]),h=y=>{const g=b.useContext(a)[y],S=b.useCallback(T=>je(g,T),[g]);return b.useSyncExternalStore(S,()=>Dt(g),()=>Dt(g))},p=y=>{const g=b.useContext(a)[y],[S,T]=b.useState(fb(Dt,g));return Pa(()=>je(g,E=>{E!==S&&T(hb(E))}),[g,S]),S},m=b.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(y,x)=>{const S=b.useContext(a)[y];Pa(()=>je(S,x),[x,S])}}}const dD=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Kt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Kt||{});const fD={0:"debug",1:"log",2:"warn",3:"error"},hD=()=>typeof globalThis>"u"?window:globalThis,pr=Fe(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var i;const s=(i=hD().VIRTUOSO_LOG_LEVEL)!=null?i:Dt(e);o>=s&&console[fD[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Qu(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 Tn(e,t=!0){return Qu(e,t).callbackRef}function yb(e,t,n,r,o,i,s){const a=b.useCallback(l=>{const c=pD(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=s?s.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),i==null||i(mD("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,i,s,r]);return Qu(a,n)}function pD(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 l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Kt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function mD(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Kt.WARN),t==="normal"?0:parseInt(t??"0",10)}function on(e,t){return Math.round(e.getBoundingClientRect()[t])}function vb(e,t){return Math.abs(e-t)<1.01}function bb(e,t,n,r=Vr,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,v=h?window.innerHeight:f.offsetHeight,y=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};d.suppressFlushSync?y():Jd.flushSync(y),s.current!==null&&(p===s.current||p<=0||p===m-v)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||i.current;return r(o||i.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(d){const f=i.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,v;f===window?(m=Math.max(on(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=f.scrollHeight,p=on(f,"height"),v=f.scrollTop);const y=m-p;if(d.top=Math.ceil(Math.max(Math.min(y,d.top),0)),vb(p,m)||d.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(s.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,f.scrollTo(d)}function u(d){i.current.scrollBy(d)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const Lt=Fe(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),i=Ce(),s=Ce(),a=X(0),l=X(0),c=X(0),u=X(0),d=Ce(),f=Ce(),h=X(!1);return ue(q(e,ie(({scrollTop:p})=>p)),t),ue(q(e,ie(({scrollHeight:p})=>p)),s),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Wi={lvl:0};function wb(e,t,n,r=Wi,o=Wi){return{k:e,v:t,lvl:n,l:r,r:o}}function He(e){return e===Wi}function Wo(){return Wi}function Ju(e,t){if(He(e))return Wi;const{k:n,l:r,r:o}=e;if(t===n){if(He(r))return o;if(He(o))return r;{const[i,s]=xb(r);return ka(mt(e,{k:i,v:s,l:Tb(r)}))}}else return t<n?ka(mt(e,{l:Ju(r,t)})):ka(mt(e,{r:Ju(o,t)}))}function Hi(e,t){if(!He(e))return t===e.k?e.v:t<e.k?Hi(e.l,t):Hi(e.r,t)}function sn(e,t,n="k"){if(He(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return sn(e.l,t,n)}function Zt(e,t,n){return He(e)?wb(t,n,1):t===e.k?mt(e,{k:t,v:n}):t<e.k?Sb(mt(e,{l:Zt(e.l,t,n)})):Sb(mt(e,{r:Zt(e.r,t,n)}))}function ed(e,t,n){if(He(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(ed(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(ed(s,t,n))),a}function $r(e){return He(e)?[]:[...$r(e.l),{k:e.k,v:e.v},...$r(e.r)]}function xb(e){return He(e.r)?[e.k,e.v]:xb(e.r)}function Tb(e){return He(e.r)?e.l:ka(mt(e,{r:Tb(e.r)}))}function mt(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 td(e){return He(e)||e.lvl>e.r.lvl}function Sb(e){return nd(Cb(e))}function ka(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(td(t))return Cb(mt(e,{lvl:r-1}));if(!He(t)&&!He(t.r))return mt(t.r,{l:mt(t,{r:t.r.l}),r:mt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(td(e))return nd(mt(e,{lvl:r-1}));if(!He(n)&&!He(n.l)){const o=n.l,i=td(o)?n.lvl-1:n.lvl;return mt(o,{l:mt(e,{r:o.l,lvl:r-1}),r:nd(mt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Ia(e,t,n){if(He(e))return[];const r=sn(e,t)[0];return gD(ed(e,r,n))}function Eb(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:l}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function gD(e){return Eb(e,({k:t,v:n})=>({index:t,value:n}))}function nd(e){const{r:t,lvl:n}=e;return!He(t)&&!He(t.r)&&t.lvl===n&&t.r.lvl===n?mt(t,{l:mt(e,{r:t.l}),lvl:n+1}):e}function Cb(e){const{l:t}=e;return!He(t)&&t.lvl===e.lvl?mt(t,{r:mt(e,{l:t.r})}):e}function Oa(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 Pb(e,t,n){return e[Oa(e,t,n)]}function yD(e,t,n,r){const o=Oa(e,t,r),i=Oa(e,n,r,o);return e.slice(o,i+1)}const rd=Fe(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function vD(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 kb(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function bD(e,t){let n=He(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),He(e)){e=Zt(e,0,o);continue}const a=Ia(e,i-1,s+1);if(a.some(vD(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(s>=u||o===f)&&(e=Ju(e,u)):(c=f!==o,l=!0),d>s&&s>=u&&f!==o&&(e=Zt(e,s+1,f));c&&(e=Zt(e,i,o))}return[e,n]}function wD(){return{offsetTree:[],sizeTree:Wo(),groupOffsetTree:Wo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function od({index:e},t){return t===e?0:t<e?-1:1}function xD({offset:e},t){return t===e?0:t<e?-1:1}function TD(e){return{index:e.index,value:e}}function SD(e,t,n,r=0){return r>0&&(t=Math.max(t,Pb(e,r,od).offset)),Eb(yD(e,t,n,xD),TD)}function id(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Oa(o,t-1,od),a=o[l].offset;const u=sn(n,t-1);i=u[0],s=u[1],o.length&&o[l].size===sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ia(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({offset:f,size:u,index:c}),i=c,a=f,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function ED(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Kt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&He(i)&&t.length===2){const f=t[0].size,h=t[1].size;s=n.reduce((p,m)=>Zt(Zt(p,m,f),m+1,h),s)}else[s,a]=bD(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=id(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Zt(f,h,Ui(h,l,o)),Wo()),groupIndices:n}}function Ui(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=Pb(t,e,od),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function CD(e){return typeof e.groupIndex<"u"}function Ib(e,t,n){if(CD(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Ob(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Ob(e,t){if(!_a(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _a(e){return!He(e.groupOffsetTree)}function PD(e){return $r(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 kD={offsetHeight:"height",offsetWidth:"width"},Sn=Fe(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Nt(r,0),i=Ce(),s=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((T,E)=>on(T,kD[E])),f=X(void 0),h=X(0),p=wD(),m=Nt(q(n,we(l,e,h),xn(ED,p),Ke()),p),v=Nt(q(l,Ke(),xn((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),ie(({prev:T})=>T)),[]);ue(q(l,pe(T=>T.length>0),we(m,h),ie(([T,E,O])=>{const I=T.reduce((k,C,L)=>Zt(k,C,Ui(C,E.offsetTree,O)||L),Wo());return{...E,groupIndices:T,groupOffsetTree:I}})),m),ue(q(r,we(m),pe(([T,{lastIndex:E}])=>T<E),ie(([T,{lastIndex:E,lastSize:O}])=>[{startIndex:T,endIndex:E,size:O}])),n),ue(c,u);const y=Nt(q(c,ie(T=>T===void 0)),!0);ue(q(u,pe(T=>T!==void 0&&He(Dt(m).sizeTree)),ie(T=>[{startIndex:0,endIndex:0,size:T}])),n);const x=qt(q(n,we(m),xn(({sizes:T},[E,O])=>({changed:O!==T,sizes:O}),{changed:!1,sizes:p}),ie(T=>T.changed)));je(q(a,xn((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),ie(T=>T.diff)),T=>{const{groupIndices:E}=Dt(m);if(T>0)be(t,!0),be(i,T+kb(T,E));else if(T<0){const O=Dt(v);O.length>0&&(T-=kb(-T,O)),be(s,T)}}),je(q(a,we(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},Kt.ERROR)});const g=qt(i);ue(q(i,we(m),ie(([T,E])=>{const O=E.groupIndices.length>0,I=[],k=E.lastSize;if(O){const C=Hi(E.sizeTree,0);let L=0,D=0;for(;L<T;){const A=E.groupIndices[D],N=E.groupIndices.length===D+1?1/0:E.groupIndices[D+1]-A-1;I.push({startIndex:A,endIndex:A,size:C}),I.push({startIndex:A+1,endIndex:A+1+N-1,size:k}),D++,L+=N+1}const V=$r(E.sizeTree);return L!==T&&V.shift(),V.reduce((A,{k:N,v:$})=>{let z=A.ranges;return A.prevSize!==0&&(z=[...A.ranges,{startIndex:A.prevIndex,endIndex:N+T-1,size:A.prevSize}]),{ranges:z,prevIndex:N+T,prevSize:$}},{ranges:I,prevIndex:T,prevSize:0}).ranges}return $r(E.sizeTree).reduce((C,{k:L,v:D})=>({ranges:[...C.ranges,{startIndex:C.prevIndex,endIndex:L+T-1,size:C.prevSize}],prevIndex:L+T,prevSize:D}),{ranges:[],prevIndex:0,prevSize:k}).ranges})),n);const S=qt(q(s,we(m,h),ie(([T,{offsetTree:E},O])=>{const I=-T;return Ui(I,E,O)})));return ue(q(s,we(m,h),ie(([T,E,O])=>{if(E.groupIndices.length>0){if(He(E.sizeTree))return E;let k=Wo();const C=Dt(v);let L=0,D=0,V=0;for(;L<-T;){V=C[D];const A=C[D+1]-V-1;D++,L+=A+1}if(k=$r(E.sizeTree).reduce((A,{k:N,v:$})=>Zt(A,Math.max(0,N+T),$),k),L!==-T){const A=Hi(E.sizeTree,V);k=Zt(k,0,A);const N=sn(E.sizeTree,-T+1)[1];k=Zt(k,1,N)}return{...E,sizeTree:k,...id(E.offsetTree,0,k,O)}}else{const k=$r(E.sizeTree).reduce((C,{k:L,v:D})=>Zt(C,Math.max(0,L+T),D),Wo());return{...E,sizeTree:k,...id(E.offsetTree,0,k,O)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:x,statefulTotalCount:o,trackItemSizes:y,itemSize:d}},qe(pr,rd),{singleton:!0}),ID=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function _b(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!ID)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Gi=Fe(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ce(),p=Ce(),m=X(0);let v=null,y=null,x=null;function g(){v&&(v(),v=null),x&&(x(),x=null),y&&(clearTimeout(y),y=null),be(o,!1)}return ue(q(h,we(e,i,t,m,l,c,f),we(r,u,d),ie(([[S,T,E,O,I,k,C,L],D,V,P])=>{const A=_b(S),{align:N,behavior:$,offset:z}=A,U=O-1,_=Ib(A,T,U);let R=Ui(_,T.offsetTree,D)+k;N==="end"?(R+=V+sn(T.sizeTree,_)[1]-E+P,_===U&&(R+=C)):N==="center"?R+=(V+sn(T.sizeTree,_)[1]-E+P)/2:R-=I,z&&(R+=z);const Z=re=>{g(),re?(L("retrying to scroll to",{location:S},Kt.DEBUG),be(h,S)):(be(p,!0),L("list did not change, scroll successful",{},Kt.DEBUG))};if(g(),$==="smooth"){let re=!1;x=je(n,Q=>{re=re||Q}),v=bn(a,()=>{Z(re)})}else v=bn(q(n,OD(150)),Z);return y=setTimeout(()=>{g()},1200),be(o,!0),L("scrolling from index to",{index:_,top:R,behavior:$},Kt.DEBUG),{top:R,behavior:$}})),s),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},qe(Sn,Lt,pr),{singleton:!0});function OD(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Yi="up",qi="down",_D="none",AD={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},MD=0,Ki=Fe(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(MD),f=Nt(q(gb(q(ge(t),zo(1),wn(!0)),q(ge(t),zo(1),wn(!1),mb(100))),Ke()),!1),h=Nt(q(gb(q(i,wn(!0)),q(i,wn(!1),mb(200))),Ke()),!1);ue(q(bt(ge(t),ge(d)),ie(([x,g])=>x<=g),Ke()),a),ue(q(a,hr(50)),c);const p=qt(q(bt(e,ge(n),ge(r),ge(o),ge(u)),xn((x,[{scrollTop:g,scrollHeight:S},T,E,O,I])=>{const k=g+T-S>-I,C={viewportHeight:T,scrollTop:g,scrollHeight:S};if(k){let D,V;return g>x.state.scrollTop?(D="SCROLLED_DOWN",V=x.state.scrollTop-g):(D="SIZE_DECREASED",V=x.state.scrollTop-g||x.scrollTopDelta),{atBottom:!0,state:C,atBottomBecause:D,scrollTopDelta:V}}let L;return C.scrollHeight>x.state.scrollHeight?L="SIZE_INCREASED":T<x.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<x.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:C}},AD),Ke((x,g)=>x&&x.atBottom===g.atBottom))),m=Nt(q(e,xn((x,{scrollTop:g,scrollHeight:S,viewportHeight:T})=>{if(vb(x.scrollHeight,S))return{scrollTop:g,scrollHeight:S,jump:0,changed:!1};{const E=S-(g+T)<1;return x.scrollTop!==g&&E?{scrollHeight:S,scrollTop:g,jump:x.scrollTop-g,changed:!0}:{scrollHeight:S,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(x=>x.changed),ie(x=>x.jump)),0);ue(q(p,ie(x=>x.atBottom)),s),ue(q(s,hr(50)),l);const v=X(qi);ue(q(e,ie(({scrollTop:x})=>x),Ke(),xn((x,g)=>Dt(h)?{direction:x.direction,prevScrollTop:g}:{direction:g<x.prevScrollTop?Yi:qi,prevScrollTop:g},{direction:qi,prevScrollTop:0}),ie(x=>x.direction)),v),ue(q(e,hr(50),wn(_D)),v);const y=X(0);return ue(q(f,pe(x=>!x),wn(0)),y),ue(q(t,hr(100),we(f),pe(([x,g])=>!!g),xn(([x,g],[S])=>[g,S],[0,0]),ie(([x,g])=>g-x)),y),{isScrolling:f,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:y,lastJumpDueToItemResize:m}},qe(Lt)),mr=Fe(([{log:e}])=>{const t=X(!1),n=qt(q(t,pe(r=>r),Ke()));return je(t,r=>{r&&Dt(e)("props updated",{},Kt.DEBUG)}),{propsReady:t,didMount:n}},qe(pr),{singleton:!0});function sd(e,t){e==0?t():requestAnimationFrame(()=>sd(e-1,t))}function ad(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Zi=Fe(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(s,we(l),pe(([u,d])=>!!d),wn(!1)),a),ue(q(s,we(l),pe(([u,d])=>!!d),wn(!1)),c),je(q(bt(t,s),we(a,e,n,c),pe(([[,u],d,{sizeTree:f},h,p])=>u&&(!He(f)||Ku(h))&&!d&&!p),we(l)),([,u])=>{bn(i,()=>{be(c,!0)}),sd(4,()=>{bn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},qe(Sn,Lt,Gi,mr),{singleton:!0});function Ab(e){return e?e==="smooth"?"smooth":"auto":!1}const DD=(e,t)=>typeof e=="function"?Ab(e(t)):t&&Ab(e),ND=Fe(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),d=Ce();let f=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}je(q(bt(q(ge(e),zo(1)),a),we(ge(u),n,i,c),ie(([[m,v],y,x,g,S])=>{let T=v&&g,E="auto";return T&&(E=DD(y,x||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{f&&(f(),f=null),f=bn(t,()=>{Dt(l)("following output to ",{totalCount:m},Kt.DEBUG),h(v),f=null})});function p(m){const v=bn(r,y=>{m&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Dt(l)("scrolling to bottom due to increased size",{},Kt.DEBUG),h("auto"))});setTimeout(v,100)}return je(q(bt(ge(u),e,s),pe(([m,,v])=>m&&v),xn(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(i)&&p(m!==!1)}),je(d,()=>{p(Dt(u)!==!1)}),je(bt(ge(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},qe(Sn,Ki,Gi,Zi,mr,pr,Lt));function FD(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Mb=Fe(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Ce(),s=Ce(),a=qt(q(i,ie(FD)));return ue(q(a,ie(l=>l.totalCount)),e),ue(q(a,ie(l=>l.groupIndices)),t),ue(q(bt(r,n,o),pe(([l,c])=>_a(c)),ie(([l,c,u])=>sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ke(),ie(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},qe(Sn,Lt));function Xi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Db(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Aa="top",Ma="bottom",Nb="none";function Fb(e,t,n){return typeof e=="number"?n===Yi&&t===Aa||n===qi&&t===Ma?e:0:n===Yi?t===Aa?e.main:e.reverse:t===Ma?e.main:e.reverse}function Lb(e,t){return typeof e=="number"?e:e[t]||0}const ld=Fe(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Ce(),s=X(0),a=X(0),l=X(0),c=Nt(q(bt(ge(e),ge(t),ge(r),ge(i,Xi),ge(l),ge(s),ge(o),ge(n),ge(a)),ie(([u,d,f,[h,p],m,v,y,x,g])=>{const S=u-x,T=v+y,E=Math.max(f-S,0);let O=Nb;const I=Lb(g,Aa),k=Lb(g,Ma);return h-=x,h+=f+y,p+=f+y,p-=x,h>u+T-I&&(O=Yi),p<u-E+d+k&&(O=qi),O!==Nb?[Math.max(S-f-Fb(m,Aa,O)-I,0),S-E-y+d+Fb(m,Ma,O)+k]:null}),pe(u=>u!=null),Ke(Xi)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},qe(Lt),{singleton:!0});function LD(e,t,n){if(_a(t)){const r=Ob(e,t);return[{index:sn(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 cd={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Vb(e,t,n){if(e.length===0)return[];if(!_a(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=Ia(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Da(e,t,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*s+(d-1)*r,h=c,p=f-u;return{items:Vb(e,o,i),topItems:Vb(t,o,i),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function $b(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,l=ad(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:i[d+l]}));return Da(c,[],a,o,n,r)}const jr=Fe(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=X([]),v=X(0),y=Ce();ue(i.topItemsIndexes,m);const x=Nt(q(bt(h,p,ge(s,Xi),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,O,,I,,,,,,,k])=>{const C=k&&k.length!==I;return E&&!O&&!C}),ie(([,,[E,O],I,k,C,L,D,V,P,A])=>{const N=k,{sizeTree:$,offsetTree:z}=N,U=Dt(v);if(I===0)return{...cd,totalCount:I};if(E===0&&O===0)return U===0?{...cd,totalCount:I}:$b(U,C,k,V,P,A||[]);if(He($))return U>0?null:Da(LD(ad(C,I),N,A),[],I,P,N,V);const _=[];if(D.length>0){const G=D[0],F=D[D.length-1];let B=0;for(const W of Ia($,G,F)){const j=W.value,Y=Math.max(W.start,G),se=Math.min(W.end,F);for(let H=Y;H<=se;H++)_.push({index:H,size:j,offset:B,data:A&&A[H]}),B+=j}}if(!L)return Da([],_,I,P,N,V);const R=D.length>0?D[D.length-1]+1:0,Z=SD(z,E,O,R);if(Z.length===0)return null;const re=I-1,Q=Ca([],G=>{for(const F of Z){const B=F.value;let W=B.offset,j=F.start;const Y=B.size;if(B.offset<E){j+=Math.floor((E-B.offset+P)/(Y+P));const H=j-F.start;W+=H*Y+H*P}j<R&&(W+=(R-j)*Y,j=R);const se=Math.min(F.end,re);for(let H=j;H<=se&&!(W>=O);H++)G.push({index:H,size:Y,offset:W,data:A&&A[H]}),W+=Y+P}});return Da(Q,_,I,P,N,V)}),pe(E=>E!==null),Ke()),cd);ue(q(n,pe(Ku),ie(E=>E==null?void 0:E.length)),t),ue(q(x,ie(E=>E.topListHeight)),d),ue(d,l),ue(q(x,ie(E=>[E.top,E.bottom])),a),ue(q(x,ie(E=>E.items)),y);const g=qt(q(x,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},O])=>E[E.length-1].originalIndex===O-1),ie(([,E,O])=>[E-1,O]),Ke(Xi),ie(([E])=>E))),S=qt(q(x,hr(200),pe(({items:E,topItems:O})=>E.length>0&&E[0].originalIndex===O.length),ie(({items:E})=>E[0].index),Ke())),T=qt(q(x,pe(({items:E})=>E.length>0),ie(({items:E})=>{let O=0,I=E.length-1;for(;E[O].type==="group"&&O<I;)O++;for(;E[I].type==="group"&&I>O;)I--;return{startIndex:E[O].index,endIndex:E[I].index}}),Ke(Db)));return{listState:x,topItemsIndexes:m,endReached:g,startReached:S,rangeChanged:T,itemsRendered:y,initialItemCount:v,...f}},qe(Sn,Mb,ld,Zi,Gi,Ki,mr,rd),{singleton:!0}),VD=Fe(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ue(q(a,we(i),pe(([,l])=>l!==0),we(o,e,t,r,n),ie(([[,l],c,u,d,f,h=[]])=>$b(l,c,u,d,f,h))),s),{}),qe(Sn,Zi,jr,mr),{singleton:!0}),jb=Fe(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,we(r,t,n),pe(([o,i])=>!!i),ie(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),Ke()),t),je(q(bt(t,e,n),we(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},qe(Ki),{singleton:!0}),$D=Fe(([{topItemsIndexes:e}])=>{const t=X(0);return ue(q(t,pe(n=>n>0),ie(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},qe(jr)),Rb=Fe(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Ce(),s=Nt(q(bt(e,r,t,n,o),ie(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ue(ge(s),i),{totalListHeight:s,totalListHeightChanged:i}},qe(Lt,jr),{singleton:!0});function Bb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const jD=Bb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),RD=Fe(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=qt(q(l,we(a),xn(([,y,x,g],[{items:S,totalCount:T,bottom:E,offsetBottom:O},I])=>{const k=E+O;let C=0;return x===T&&y.length>0&&S.length>0&&(S[0].originalIndex===0&&y[0].originalIndex===0||(C=k-g,C!==0&&(C+=I))),[C,S,T,k]},[0,[],0,0]),pe(([y])=>y!==0),we(t,s,r,i,h,p),pe(([,y,x,g,,,S])=>!S&&!g&&y!==0&&x===Yi),ie(([[y],,,,,x])=>(x("Upward scrolling compensation",{amount:y},Kt.DEBUG),y))));function v(y){y>0?(be(e,{top:-y,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-y,behavior:"auto"}))}return je(q(m,we(n,o)),([y,x,g])=>{g&&jD()?be(n,x-y):v(-y)}),je(q(bt(Nt(o,!1),n,p),pe(([y,x,g])=>!y&&!g&&x!==0),ie(([y,x])=>x),hr(1)),v),ue(q(u,ie(y=>({top:-y}))),e),je(q(c,we(d,f),ie(([y,{lastSize:x,groupIndices:g,sizeTree:S},T])=>{function E(O){return O*(x+T)}if(g.length===0)return E(y);{let O=0;const I=Hi(S,0);let k=0,C=0;for(;k<y;){k++,O+=I;let L=g.length===C+1?1/0:g[C+1]-g[C]-1;k+L>y&&(O-=I,L=y-k+1),k+=L,O+=E(L),C++}return O}})),y=>{be(n,y),requestAnimationFrame(()=>{be(e,{top:y}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},qe(Lt,Ki,jr,Sn,pr,rd)),BD=Fe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return je(q(e,we(r),pe(([,o])=>o!==0),ie(([,o])=>({top:o}))),o=>{bn(q(n,zo(1),pe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},qe(mr,Lt,jr),{singleton:!0}),zD=Fe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Nt(q(bt(n,e,t),pe(([o])=>o),ie(([,o,i])=>Math.max(0,o-i)),hr(0),Ke()),0);return{alignToBottom:n,paddingTopAddition:r}},qe(Lt,Rb),{singleton:!0}),ud=Fe(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),i=X(!1),s=X(void 0);return ue(q(bt(n,r),ie(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ue(q(e,we(r),ie(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},qe(Lt)),WD=({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,HD=Fe(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,we(e,o,t,i,s,a,r),we(n),ie(([[d,f,h,p,m,v,y,x],g])=>{const{done:S,behavior:T,align:E,calculateViewLocation:O=WD,...I}=d,k=Ib(d,f,p-1),C=Ui(k,f.offsetTree,g)+m+v,L=C+sn(f.sizeTree,k)[1],D=x+v,V=x+h-y,P=O({itemTop:C,itemBottom:L,viewportTop:D,viewportBottom:V,locationParams:{behavior:T,align:E,...I}});return P?S&&bn(q(l,pe(A=>A===!1),zo(Dt(l)?1:2)),S):S&&S(),P}),pe(d=>d!==null)),c),{scrollIntoView:u}},qe(Sn,Lt,Gi,jr,pr),{singleton:!0}),UD=Fe(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=X(void 0),d=X(null),f=X(null);return ue(a,d),ue(l,f),je(q(c,we(e,n,s,d,f,r)),([h,p,m,v,y,x,g])=>{const S=PD(p.sizeTree);v&&y!==null&&x!==null&&(m=y.scrollTop-x.offsetTop),m-=g,h({ranges:S,scrollTop:m})}),ue(q(u,pe(Ku),ie(GD)),o),ue(q(i,we(u),pe(([,h])=>h!==void 0),Ke(),ie(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},qe(Sn,Lt,Zi,mr,ud));function GD(e){return{offset:e.scrollTop,index:0,align:"start"}}const YD=Fe(([e,t,n,r,o,i,s,a,l,c])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c}),qe(ld,VD,mr,jb,Rb,BD,zD,ud,HD,pr)),zb=Fe(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,v,y,{listState:x,topItemsIndexes:g,...S},{scrollToIndex:T},E,{topItemCount:O},{groupCounts:I},k])=>(ue(S.rangeChanged,k.scrollSeekRangeChanged),ue(q(k.windowViewportRect,ie(C=>C.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:O,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...y,statefulTotalCount:c,listState:x,scrollToIndex:T,trackItemSizes:o,itemSize:i,groupIndices:l,...S,...k,...m,sizes:d,...v}),qe(Sn,Zi,Lt,UD,ND,jr,Gi,RD,$D,Mb,YD)),dd="-webkit-sticky",Wb="sticky",Hb=Bb(()=>{if(typeof document>"u")return Wb;const e=document.createElement("div");return e.style.position=dd,e.style.position===dd?dd:Wb});function fd(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:i}=Qu(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 Na=b.createContext(void 0),Ub=b.createContext(void 0);function hd(e){return e}const qD=Fe(([e,t])=>({...e,...t}),qe(zb,Fe(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(hd),i=X("div"),s=X(Vr),a=(l,c=null)=>Nt(q(r,ie(u=>u[l]),Ke()),c);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")}}))),KD=({height:e})=>b.createElement("div",{style:{height:e}}),ZD={position:Hb(),zIndex:1,overflowAnchor:"none"},XD={overflowAnchor:"none"},Gb=b.memo(function({showTopList:t=!1}){const n=Se("listState"),r=Jt("sizeRanges"),o=Se("useWindowScroll"),i=Se("customScrollParent"),s=Jt("windowScrollContainerState"),a=Jt("scrollContainerState"),l=i||o?s:a,c=Se("itemContent"),u=Se("context"),d=Se("groupContent"),f=Se("trackItemSizes"),h=Se("itemSize"),p=Se("log"),m=Jt("gap"),{callbackRef:v}=yb(r,h,f,t?Vr:l,p,m,i),[y,x]=b.useState(0);gd("deviation",P=>{y!==P&&x(P)});const g=Se("EmptyPlaceholder"),S=Se("ScrollSeekPlaceholder")||KD,T=Se("ListComponent"),E=Se("ItemComponent"),O=Se("GroupComponent"),I=Se("computeItemKey"),k=Se("isSeeking"),C=Se("groupIndices").length>0,L=Se("alignToBottom"),D=Se("initialItemFinalLocationReached"),V=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:y!==0?y:L?"auto":0,...D?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?b.createElement(g,rt(g,u)):b.createElement(T,{...rt(T,u),ref:v,style:V,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const A=P.originalIndex,N=I(A+n.firstItemIndex,P.data,u);return k?b.createElement(S,{...rt(S,u),key:N,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?b.createElement(O,{...rt(O,u),key:N,"data-index":A,"data-known-size":P.size,"data-item-index":P.index,style:ZD},d(P.index,u)):b.createElement(E,{...rt(E,u),...Yb(E,P.data),key:N,"data-index":A,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:XD},C?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),QD={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ho=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),JD={width:"100%",position:Hb(),top:0,zIndex:1};function rt(e,t){if(typeof e!="string")return{context:t}}function Yb(e,t){return{item:typeof e=="string"?void 0:t}}const eN=b.memo(function(){const t=Se("HeaderComponent"),n=Jt("headerHeight"),r=Se("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,rt(t,i))):null}),tN=b.memo(function(){const t=Se("FooterComponent"),n=Jt("footerHeight"),r=Se("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,rt(t,i))):null});function pd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=bb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...QD,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...rt(c,f)},s)})}function md({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:y}=bb(l,u,c,Vr,h);return dD(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",y),t("scrollBy",v),b.createElement(c,{style:{position:"relative",...i,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...rt(c,p)},s)})}const nN=({children:e})=>{const t=b.useContext(Na),n=Jt("viewportHeight"),r=Jt("fixedItemHeight"),o=Se("alignToBottom"),i=Tn(b.useMemo(()=>zi(n,s=>on(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ho(o),ref:i,"data-viewport-type":"element"},e)},rN=({children:e})=>{const t=b.useContext(Na),n=Jt("windowViewportRect"),r=Jt("fixedItemHeight"),o=Se("customScrollParent"),i=fd(n,o),s=Se("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:Ho(s),"data-viewport-type":"window"},e)},oN=({children:e})=>{const t=Se("TopItemListComponent")||"div",n=Se("headerHeight"),r={...JD,marginTop:`${n}px`},o=Se("context");return b.createElement(t,{style:r,...rt(t,o)},e)},iN=b.memo(function(t){const n=Se("useWindowScroll"),r=Se("topItemsIndexes").length>0,o=Se("customScrollParent"),i=o||n?lN:aN,s=o||n?rN:nN;return b.createElement(i,{...t},r&&b.createElement(oN,null,b.createElement(Gb,{showTopList:!0})),b.createElement(s,null,b.createElement(eN,null),b.createElement(Gb,null),b.createElement(tN,null)))}),{Component:sN,usePublisher:Jt,useEmitterValue:Se,useEmitter:gd}=Xu(qD,{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"}},iN),aN=pd({usePublisher:Jt,useEmitterValue:Se,useEmitter:gd}),lN=md({usePublisher:Jt,useEmitterValue:Se,useEmitter:gd}),cN=sN,qb={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},uN={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Kb,ceil:Zb,floor:Fa,min:yd,max:Qi}=Math;function dN(e){return{...uN,items:e}}function Xb(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 fN(e,t){return e&&e.column===t.column&&e.row===t.row}function La(e,t){return e&&e.width===t.width&&e.height===t.height}const hN=Fe(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:y,windowScrollContainerState:x,windowScrollTo:g},S])=>{const T=X(0),E=X(0),O=X(qb),I=X({height:0,width:0}),k=X({height:0,width:0}),C=Ce(),L=Ce(),D=X(0),V=X(null),P=X({row:0,column:0}),A=Ce(),N=Ce(),$=X(!1),z=X(0),U=X(!0),_=X(!1);je(q(p,we(z),pe(([F,B])=>!!B)),()=>{be(U,!1),be(E,0)}),je(q(bt(p,U,k,I,z,_),pe(([F,B,W,j,,Y])=>F&&!B&&W.height!==0&&j.height!==0&&!Y)),([,,,,F])=>{be(_,!0),sd(1,()=>{be(C,F)}),bn(q(r),()=>{be(n,[0,0]),be(U,!0)})}),ue(q(N,pe(F=>F!=null&&F.scrollTop>0),wn(0)),E),je(q(p,we(N),pe(([,F])=>F!=null)),([,F])=>{F&&(be(I,F.viewport),be(k,F==null?void 0:F.item),be(P,F.gap),F.scrollTop>0&&(be($,!0),bn(q(r,zo(1)),B=>{be($,!1)}),be(s,{top:F.scrollTop})))}),ue(q(I,ie(({height:F})=>F)),o),ue(q(bt(ge(I,La),ge(k,La),ge(P,(F,B)=>F&&F.column===B.column&&F.row===B.row),ge(r)),ie(([F,B,W,j])=>({viewport:F,item:B,gap:W,scrollTop:j}))),A),ue(q(bt(ge(T),t,ge(P,fN),ge(k,La),ge(I,La),ge(V),ge(E),ge($),ge(U),ge(z)),pe(([,,,,,,,F])=>!F),ie(([F,[B,W],j,Y,se,H,Pe,,it,Ue])=>{const{row:st,column:de}=j,{height:Ee,width:ce}=Y,{width:Ie}=se;if(Pe===0&&(F===0||Ie===0))return qb;if(ce===0){const $t=ad(Ue,F),Ur=$t===0?Math.max(Pe-1,0):$t;return dN(Xb($t,Ur,H))}const ht=Jb(Ie,ce,de);let Oe,pt;it?B===0&&W===0&&Pe>0?(Oe=0,pt=Pe-1):(Oe=ht*Fa((B+st)/(Ee+st)),pt=ht*Zb((W+st)/(Ee+st))-1,pt=yd(F-1,Qi(pt,ht-1)),Oe=yd(pt,Qi(0,Oe))):(Oe=0,pt=-1);const J=Xb(Oe,pt,H),{top:ae,bottom:Ae}=Qb(se,j,Y,J),Ze=Zb(F/ht),Ft=Ze*Ee+(Ze-1)*st-Ae;return{items:J,offsetTop:ae,offsetBottom:Ft,top:ae,bottom:Ae,itemHeight:Ee,itemWidth:ce}})),O),ue(q(V,pe(F=>F!==null),ie(F=>F.length)),T),ue(q(bt(I,k,O,P),pe(([F,B,{items:W}])=>W.length>0&&B.height!==0&&F.height!==0),ie(([F,B,{items:W},j])=>{const{top:Y,bottom:se}=Qb(F,j,B,W);return[Y,se]}),Ke(Xi)),n);const R=X(!1);ue(q(r,we(R),ie(([F,B])=>B||F!==0)),R);const Z=qt(q(ge(O),pe(({items:F})=>F.length>0),we(T,R),pe(([{items:F},B,W])=>W&&F[F.length-1].index===B-1),ie(([,F])=>F-1),Ke())),re=qt(q(ge(O),pe(({items:F})=>F.length>0&&F[0].index===0),wn(0),Ke())),Q=qt(q(ge(O),we($),pe(([{items:F},B])=>F.length>0&&!B),ie(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),Ke(Db),hr(0)));ue(Q,f.scrollSeekRangeChanged),ue(q(C,we(I,k,T,P),ie(([F,B,W,j,Y])=>{const se=_b(F),{align:H,behavior:Pe,offset:it}=se;let Ue=se.index;Ue==="LAST"&&(Ue=j-1),Ue=Qi(0,Ue,yd(j-1,Ue));let st=vd(B,Y,W,Ue);return H==="end"?st=Kb(st-B.height+W.height):H==="center"&&(st=Kb(st-B.height/2+W.height/2)),it&&(st+=it),{top:st,behavior:Pe}})),s);const G=Nt(q(O,ie(F=>F.offsetBottom+F.bottom)),0);return ue(q(m,ie(F=>({width:F.visibleWidth,height:F.visibleHeight}))),I),{data:V,totalCount:T,viewportDimensions:I,itemDimensions:k,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:C,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:v,customScrollParent:y,windowScrollContainerState:x,deviation:D,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:N,...f,initialTopMostItemIndex:z,gridState:O,totalListHeight:G,...d,startReached:re,endReached:Z,rangeChanged:Q,stateChanged:A,propsReady:h,stateRestoreInProgress:$,...S}},qe(ld,Lt,Ki,jb,mr,ud,pr));function Qb(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=vd(e,t,n,r[0].index),s=vd(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function vd(e,t,n,r){const o=Jb(e.width,n.width,t.column),i=Fa(r/o),s=i*n.height+Qi(0,i-1)*t.row;return s>0?s+t.row:s}function Jb(e,t,n){return Qi(1,Fa((e+n)/(Fa(t)+n)))}const pN=Fe(([e,t])=>({...e,...t}),qe(hN,Fe(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),i=X(hd),s=X("div"),a=X(Vr),l=(c,u=null)=>Nt(q(t,ie(d=>d[c]),Ke()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),mN=b.memo(function(){const t=et("gridState"),n=et("listClassName"),r=et("itemClassName"),o=et("itemContent"),i=et("computeItemKey"),s=et("isSeeking"),a=an("scrollHeight"),l=et("ItemComponent"),c=et("ListComponent"),u=et("ScrollSeekPlaceholder"),d=et("context"),f=an("itemDimensions"),h=an("gap"),p=et("log"),m=et("stateRestoreInProgress"),v=Tn(b.useMemo(()=>y=>{const x=y.parentElement.parentElement.scrollHeight;a(x);const g=y.firstChild;if(g){const{width:S,height:T}=g.getBoundingClientRect();f({width:S,height:T})}h({row:t0("row-gap",getComputedStyle(y).rowGap,p),column:t0("column-gap",getComputedStyle(y).columnGap,p)})},[a,f,h,p]));return m?null:b.createElement(c,{ref:v,className:n,...rt(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(y=>{const x=i(y.index,y.data,d);return s?b.createElement(u,{key:x,...rt(u,d),index:y.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...rt(l,d),className:r,"data-index":y.index,key:x},o(y.index,y.data,d))}))}),gN=b.memo(function(){const t=et("HeaderComponent"),n=an("headerHeight"),r=et("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,rt(t,i))):null}),yN=b.memo(function(){const t=et("FooterComponent"),n=an("footerHeight"),r=et("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,rt(t,i))):null}),vN=({children:e})=>{const t=b.useContext(Ub),n=an("itemDimensions"),r=an("viewportDimensions"),o=Tn(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:Ho(!1),ref:o},e)},bN=({children:e})=>{const t=b.useContext(Ub),n=an("windowViewportRect"),r=an("itemDimensions"),o=et("customScrollParent"),i=fd(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:Ho(!1)},e)},wN=b.memo(function({...t}){const n=et("useWindowScroll"),r=et("customScrollParent"),o=r||n?TN:xN,i=r||n?bN:vN;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(gN,null),b.createElement(mN,null),b.createElement(yN,null)))}),{Component:lV,usePublisher:an,useEmitterValue:et,useEmitter:e0}=Xu(pN,{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"}},wN),xN=pd({usePublisher:an,useEmitterValue:et,useEmitter:e0}),TN=md({usePublisher:an,useEmitterValue:et,useEmitter:e0});function t0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Kt.WARN),t==="normal"?0:parseInt(t??"0",10)}const SN=Fe(([e,t])=>({...e,...t}),qe(zb,Fe(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),i=X(hd),s=X(Vr),a=(l,c=null)=>Nt(q(o,ie(u=>u[l]),Ke()),c);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")}}))),EN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),CN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),PN={overflowAnchor:"none"},kN=b.memo(function(){const t=Re("listState"),n=ln("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),i=ln("windowScrollContainerState"),s=ln("scrollContainerState"),a=o||r?i:s,l=Re("itemContent"),c=Re("trackItemSizes"),u=Re("itemSize"),d=Re("log"),{callbackRef:f,ref:h}=yb(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);bd("deviation",N=>{p!==N&&(h.current.style.marginTop=`${N}px`,m(N))});const v=Re("EmptyPlaceholder"),y=Re("ScrollSeekPlaceholder")||EN,x=Re("FillerRow")||CN,g=Re("TableBodyComponent"),S=Re("TableRowComponent"),T=Re("computeItemKey"),E=Re("isSeeking"),O=Re("paddingTopAddition"),I=Re("firstItemIndex"),k=Re("statefulTotalCount"),C=Re("context");if(k===0&&v)return b.createElement(v,rt(v,C));const L=t.offsetTop+O+p,D=t.offsetBottom,V=L>0?b.createElement(x,{height:L,key:"padding-top",context:C}):null,P=D>0?b.createElement(x,{height:D,key:"padding-bottom",context:C}):null,A=t.items.map(N=>{const $=N.originalIndex,z=T($+I,N.data,C);return E?b.createElement(y,{...rt(y,C),key:z,index:N.index,height:N.size,type:N.type||"item"}):b.createElement(S,{...rt(S,C),...Yb(S,N.data),key:z,"data-index":$,"data-known-size":N.size,"data-item-index":N.index,style:PN},l(N.index,N.data,C))});return b.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...rt(g,C)},[V,...A,P])}),IN=({children:e})=>{const t=b.useContext(Na),n=ln("viewportHeight"),r=ln("fixedItemHeight"),o=Tn(b.useMemo(()=>zi(n,i=>on(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ho(!1),ref:o,"data-viewport-type":"element"},e)},ON=({children:e})=>{const t=b.useContext(Na),n=ln("windowViewportRect"),r=ln("fixedItemHeight"),o=Re("customScrollParent"),i=fd(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:Ho(!1),"data-viewport-type":"window"},e)},_N=b.memo(function(t){const n=Re("useWindowScroll"),r=Re("customScrollParent"),o=ln("fixedHeaderHeight"),i=ln("fixedFooterHeight"),s=Re("fixedHeaderContent"),a=Re("fixedFooterContent"),l=Re("context"),c=Tn(b.useMemo(()=>zi(o,x=>on(x,"height")),[o])),u=Tn(b.useMemo(()=>zi(i,x=>on(x,"height")),[i])),d=r||n?DN:MN,f=r||n?ON:IN,h=Re("TableComponent"),p=Re("TableHeadComponent"),m=Re("TableFooterComponent"),v=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...rt(p,l)},s()):null,y=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...rt(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(f,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...rt(h,l)},[v,b.createElement(kN,{key:"TableBody"}),y])))}),{Component:AN,usePublisher:ln,useEmitterValue:Re,useEmitter:bd}=Xu(SN,{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"}},_N),MN=pd({usePublisher:ln,useEmitterValue:Re,useEmitter:bd}),DN=md({usePublisher:ln,useEmitterValue:Re,useEmitter:bd}),NN=AN,FN=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},LN={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"})})},VN=e=>{const t=b.useRef(null),n=FN(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(ji,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(cN,{height:n,useWindowScroll:!0,data:e.source,components:LN,itemContent:(r,o)=>w.jsx(b.Fragment,{children:w.jsx(Cv,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(Yn,{children:w.jsx(Oc,{})})}),w.jsx("div",{})]})};var $N=Object.defineProperty,n0=Object.getOwnPropertySymbols,jN=Object.prototype.hasOwnProperty,RN=Object.prototype.propertyIsEnumerable,r0=(e,t,n)=>t in e?$N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BN=(e,t)=>{for(var n in t||(t={}))jN.call(t,n)&&r0(e,n,t[n]);if(n0)for(var n of n0(t))RN.call(t,n)&&r0(e,n,t[n]);return e},wd=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},zN=(e,t,n,r)=>$a(wd,e,t,n,r),Uo=e=>typeof e=="object",gr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Uo(e)&&!Uo(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=>gr(e[r],t[r]))},WN=(e,t)=>(Uo(e)||Array.isArray(e))&&t?e[t]:e,HN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Va=e=>/[0-9.]+/.test(e),o0=e=>["string","number"].includes(typeof e),i0=e=>e==null||(e==null?void 0:e.length)===0||e==="",s0={eq:gr,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:i0,notEmpty:e=>!i0(e),in:(e,t)=>wd(t,n=>gr(e,n)),notIn:(e,t)=>a0(t,n=>!gr(e,n))},UN=e=>{if(e in s0)return s0[e];throw new Error("Linq - Symbol not found")},Go=(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},$a=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=UN(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},GN=(e,t,n,r)=>$a(Go,e,t,n,r),a0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},YN=(e,t,n,r)=>$a(a0,e,t,n,r),l0=e=>{if(e===null)return null;const t=BN({},e);return Object.keys(t).forEach(n=>t[n]=Uo(e[n])?l0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},c0=(e,t)=>{if(Uo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1},qN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},KN=e=>Go(e,(t,n,r)=>Uo(t)?n===r.findIndex(o=>gr(o,t)):n===r.indexOf(t)),ZN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},u0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},XN=(e,t)=>u0(e,n=>n[t]),d0=(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},QN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},JN=(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 Va(e)&&Va(t)?r.map(s=>Number.parseInt(s)):r},xd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Va(e)&&Va(t)){const o=[],[i,s]=QN(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return JN(e,t,r)},eF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?xd(r,o,1):xd(r,i,Number.parseInt(o,10))}return o0(e)&&o0(t)?xd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Td=(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},f0=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},tF=(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)},nF=(e,t,n,r)=>$a(tF,e,t,n,r),h0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(HN(t))},p0=(e=>(e.Asc="asc",e.Desc="desc",e))(p0||{}),rF=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),oF=(e,t)=>e.sort(rF(t)),iF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Go(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},sF=class Qd{constructor(t=[]){this.array=t}static Range(...t){return eF(...t)}static New(t){return new Qd(t)}Where(t,n,r){return this.array=GN(this.array,t,n,r),this}Some(t,n,r){return zN(this.array,t,n,r)}All(t,n,r){return YN(this.array,t,n,r)}Reverse(){return this.array=f0(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=nF(this.array,t,n,r),this}Distinct(){return this.array=KN(this.array),this}First(t){return t===void 0?this.array[0]:ZN(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?Td((n,r)=>n+r,0,this.array):Td((n,r)=>n+WN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return XN(this.array,t)}GroupWith(t){return u0(this.array,t)}Except(t){return Go(this.array,n=>!c0(t,n))}Intersect(t){return Go(this.array,n=>c0(t,n))}OrderBy(t,n){let r;return r=t?h0(this.array,t):this.array.toSorted(),this.array=n==="desc"?f0(r):r,this}Includes(t){return wd(this.array,n=>gr(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 Td(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(d0(this.array,n=>[t,n]))}Zip(t,n){return d0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Go(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Qd(l0(this.array))}ToObject(t){return qN(this.array,t)}Sort(t){return Array.isArray(t)?oF(this.array,t):h0(this.array,t)}Unique(t){return iF(this.array,t)}},m0=sF,Sd={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,y)=>{try{Object.keys(v).forEach(y)}catch(x){window.console.log(x)}},n=v=>v==null,r=v=>{const y=typeof v;return y==="string"||y==="number"||y==="boolean"||n(v)},o=(v,y)=>{const x=y.getItem(v);try{return JSON.parse(x)}catch{return x??null}},i=v=>Object.keys(v).reduce((y,x)=>({...y,[x]:o(x,v)}),{}),s=v=>v instanceof Date?v:typeof v=="number"?new Date(new Date*1+v*864e5):v,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(v=>v.split("=")).reduce((v,y)=>(v[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(y=>y(v))},d=[{name:"expires",parse:v=>`expires=${s(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${s(v.expires??a)}`:""},{name:"path",parse:v=>`path=${v.path??"/"}`},{name:"sameSite",parse:v=>`samesite=${v.sameSite??"strict"}`},{name:"useSecure",parse:v=>`${v.useSecure??!0?"secure":""}`},{name:"domain",parse:v=>{const y=v.domain??"";return y===""?"":`domain=${v.multiDomain?".":""}${y}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],f={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(y=>y.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const y=f.json()[v];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,y,x={})=>{const g=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=d.reduce((T,E)=>{const O=E.parse(x);return O===""?T:T.concat(O)},[`${encodeURIComponent(v)}=${g}`]).join(";");document.cookie=S,u()}},h=v=>{const y=new Set,x=g=>{v().removeItem(g);const S=i(v());y.forEach(T=>T(S))};return{delete:x,listener:g=>(y.add(g),()=>y.delete(g)),clearListeners:()=>y.clear(),json:(g=!1)=>g?i(v()):v(),has:g=>{const S=v().getItem(g);return!n(S)},deleteAll:()=>{t(v(),x),y.forEach(g=>g(v()))},get:g=>o(g,v()),set:(g,S)=>{v().setItem(g,JSON.stringify(S)),y.forEach(T=>T(v()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Sd);const Ed=e=>e.headerLabel??e.thead??e.id,Cd=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Yo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Yo||{});const Pd=e=>e.type==="number"?e.valueAsNumber:e.value,aF=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},lF={},cF=(e,t=lF)=>{const n=Zs()?null:Sd.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Gc({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 l=i.state(),c={...l,...a};return Zs()||Sd.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:e}},kd=(e,t,n,r={})=>{var l;const o=e.id,i=e.type??Yo.Text,s=(l=t[i])==null?void 0:l[0].value,a=n[s];return{id:Ks(),operation:a,label:Ed(e),name:o,type:i,value:"",...r}},Id=()=>{const e=Ut(),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(()=>({[Yo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Yo.Boolean]:[t.is,t.isNot],[Yo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},uF=e=>{const t=Ut(),{operationOptions:n,operations:r}=Id(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,kd(c,n,r)])},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>{if(u!==h.id)return h;const p=e.cols.find(m=>d===m.id);return kd(p,n,r,{value:""})}))},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>h.id===u?{...h,operation:r[d]}:h))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(f=>f.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=Pd(c.target);e.set(f=>f.map(h=>h.id===u?{...h,value:d}:h))};return w.jsx(b.Fragment,{children:w.jsx(Vo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(MP,{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(c=>{const u=n[c.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(Lr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:i}),w.jsx(Lr,{"data-id":c.id,onChange:s,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(ji,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),w.jsx("div",{className:"flex items-center justify-center mt-5",children:w.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:w.jsx(po,{className:"text-danger",size:16})})})]},`filter-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(_c,{size:14})," ",t.tableFilterNewFilter]})})]})})})},dF=({filter:e,onDelete:t,set:n})=>{const r=Ut(),{operationOptions:o,operations:i}=Id(),s=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(f=>f.id===u?{...f,operation:i[c]}:f))},a=l=>{const c=l.target.dataset.id||"",u=Pd(l.target);n(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(Lr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),w.jsx(ji,{"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(po,{className:"text-danger",size:14})})]})},fF=({item:e,onPointerDown:t})=>{const n=ho(0);return w.jsxs(Ws.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(AP,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},hF=e=>{var a;const t=Cd(e.cols),n=bP(),[r,o]=b.useState(((a=e.groups[0])==null?void 0:a.thead)||""),i=l=>{var m;const c=l.target,u=c.value,d=c.options.selectedIndex,f=((m=c.options.item(d))==null?void 0:m.label)||"";o(f);const h=new m0(e.rows).GroupBy(u),p=e.cols.find(v=>v.id===u);e.setGroups(Yx(h).map((v,y)=>{const x=h[v];return{...p,groupId:Ks(),groupKey:u,index:y,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return w.jsx(b.Fragment,{children:w.jsxs(Vo,{arrow:!1,title:"Groups",trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(NP,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[w.jsxs("div",{className:"flex flex-nowrap items-center",children:[w.jsx(Lr,{value:r,title:"Tipo de agrupamento",onChange:i,options:t,placeholder:"Agrupar por..."}),w.jsx(Yn,{className:"mt-4",onClick:s,theme:"raw","data-id":r,children:w.jsx(po,{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(oP,{children:w.jsx(Ws.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>w.jsx(fF,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},pF=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),mF=(e,t)=>e.toSorted(pF(t)),g0=(e,t,n)=>({id:Ks(),type:n,value:e.id,label:t}),gF=e=>{const t=Ut(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,g0(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return w.jsx(b.Fragment,{children:w.jsx(Vo,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(tg,{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(l=>w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(Lr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(Lr,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),w.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:w.jsx(po,{className:"text-danger",size:14})})]},`sorter-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(_c,{size:14})," ",t.tableSortAddButton]})})]})})})},yF=e=>{const t=Ut(),[n,r]=b.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=g0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Ed(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(EP,{size:14}):null,n==="desc"?w.jsx(SP,{size:14}):null,n==="undefined"?w.jsx(tg,{size:14}):null]})},vF=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(uF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(gF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(hF,{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=Pd(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function bF(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 wF=e=>{const t=b.useId(),n=Ut(),r=e.asLink||"button",o=b.useMemo(()=>bF(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]})})]})},xF={opacity:1},TF={opacity:.75,backgroundColor:"var(--table-border)"},SF={opacity:0,transition:{duration:.4,type:"spring"}},EF=e=>{var d;const t=Ut(),n=e.filters.filter(f=>f.name===e.header.id),o=n.length>0?LP:DP,{operationOptions:i,operations:s}=Id(),a=f=>{const h=f.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==h))},l=e.sorters.find(f=>e.header.id===f.value),c=l!=null&&l.type?l.type===p0.Asc?"ascending":"descending":"none",u=Ed(e.header);return w.jsx(Ws.Item,{...e.header.thProps,as:"th",exit:SF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:TF,"aria-sort":c,"aria-busy":e.loading,animate:xF,className:`hidden font-medium px-2 py-4 first:table-cell md:table-cell ${((d=e.header.thProps)==null?void 0:d.className)??""}`,children:w.jsx("span",{className:"flex items-center justify-between",children:w.jsxs("span",{className:"flex items-center gap-1",children:[w.jsx(Vo,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),w.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:w.jsxs("span",{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(f=>w.jsx("li",{className:"my-1",children:w.jsx(dF,{onDelete:a,filter:f,set:e.setFilters})},`thead-filter-${f.id}`)),w.jsx("li",{children:w.jsxs("button",{onClick:()=>e.setFilters(f=>f.concat(kd(e.header,i,s))),type:"button",className:"text-primary flex items-center gap-1",children:[w.jsx(_c,{size:14})," ",t.tableFilterNewFilter]})})]})}),w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),w.jsx(yF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},CF=e=>w.jsx(Ws.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:w.jsx(Ci,{children:e.headers.map(t=>w.jsx(EF,{loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),PF=e=>Math.min(Math.max(e+e*(e%2===0?2:4)+10,50),90),kF=b.forwardRef((e,t)=>w.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:w.jsx(Ci,{children:e.children})})),IF=b.forwardRef((e,t)=>w.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),OF=b.forwardRef(({context:e,...t},n)=>w.jsx("thead",{...t,role:"rowgroup",className:"bg-card-background shadow-xs group:sticky top-0",ref:n})),_F=b.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${n.className??""}`})),AF=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:"px-2 h-14 bg-card-background",children:w.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),MF={TableHead:OF,Table:IF,TableBody:kF,TableRow:_F,TableFoot:AF},DF=[0,0,0,0,0,0,0,0,0,0],NF=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(b.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=ny(t,i.id),c=i.Element;return b.createElement("td",{...i.cellProps,"data-matrix":a,role:"cell",key:`accessor-${e}-${s}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?w.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded",style:{width:`${PF(e)}%`}}):c?w.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l}):w.jsx(b.Fragment,{children:kn.nil(l)?"":l}))})})},FF=()=>w.jsx(b.Fragment,{}),y0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[f,h]=b.useState(!1),p=qu(n),m=qu(u.loadingMore),v=b.useMemo(()=>{if(u.loading)return DF;if(r)return u.rows;const y=new m0(u.rows);return e.length>0&&e.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:y.Where(x.name,x.operation.symbol,x.value)),s.length===0?y.Select():mF(y.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,x=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return x.observe(y),()=>x.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[w.jsx(NN,{data:v,useWindowScroll:!0,components:MF,totalCount:v.length,itemContent:NF,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:f?FF:null,fixedHeaderContent:()=>w.jsx(CF,{headers:a,sorters:s,filters:e,setCols:o,setSorters:c,setFilters:i,loading:!!u.loading})}),w.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?w.jsx(wF,{...t}):null]})},LF=(e,t)=>typeof t=="function"?t(e):t,VF=e=>{const t=e.operations??!0,n=b.useMemo(()=>Cd(e.cols),[e.cols]),[r,o]=Gc({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const s=a=>l=>{const c=i.state();return{...c,[a]:LF(c[a],l)}};return{cols:s("cols"),filters:s("filters"),groups:s("groups"),sorters:s("sorters")}},{postMiddleware:[i=>{var s;return(s=e.set)==null||s.call(e,i),i}]});return w.jsxs("div",{className:"relative min-w-full",children:[t?w.jsx(vF,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?w.jsx(y0,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):w.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((i,s)=>w.jsx(St.div,{className:"min-w-full",children:w.jsx(y0,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:i,groups:r.groups,index:s,optionCols:n,options:n,rows:i.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${i.groupId}`))})]})},v0=(e="")=>ze("w-full min-w-36 outline-none px-2 py-1 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),Od=b.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),b0=b.forwardRef(({children:e,hover:t=!0,isParent:n,label:r,...o},i)=>{const s=cr(),a=s!==null,[l,c]=b.useState(!1),[u,d]=b.useState(!1),[f,h]=b.useState(null),p=b.useRef([]),m=b.useRef([]),v=b.useContext(Od),y=ur(),x=H_(),g=zy(),{floatingStyles:S,refs:T,context:E}=Do({nodeId:x,open:l,transform:!0,onOpenChange:c,whileElementsMounted:ia,placement:a?"right-start":"bottom-start",middleware:[la({mainAxis:a?0:4,alignmentAxis:a?-4:0}),mu(),pu()]}),O=Fo(E,{role:"menu",enabled:!0}),I=Mo(E,{bubbles:!0}),k=Zy(E,{enabled:t,delay:{open:xv},handleClose:gA({blockPointerEvents:!0})}),C=ma(E,{event:"mousedown",toggle:!a,ignoreMouse:a,keyboardHandlers:!0}),L=gv(E,{loop:!0,activeIndex:f,virtual:!0,nested:a,allowEscape:!0,listRef:p,scrollItemIntoView:!0,onNavigate:h}),D=pA(E,{activeIndex:f,listRef:m,onMatch:l?h:void 0}),{getReferenceProps:V,getFloatingProps:P,getItemProps:A}=No([k,C,O,I,L,D]);b.useEffect(()=>{if(!y)return;const $=()=>c(!1),z=U=>{U.nodeId!==x&&U.parentId===s&&c(!1)};return y.events.on("click",$),y.events.on("menuopen",z),()=>{y.events.off("click",$),y.events.off("menuopen",z)}},[y,x,s]),b.useEffect(()=>{l&&y&&y.events.emit("menuopen",{parentId:s,nodeId:x})},[y,l,x,s]);const N=n?o.className:v0(o.className);return w.jsxs(U_,{id:x,children:[w.jsx(b.Fragment,{children:o.asChild?w.jsx(Pu,{children:r,ref:gu([T.setReference,g.ref,i]),tabIndex:a?v.activeIndex===g.index?0:-1:void 0,"data-open":l?"":void 0,"data-nested":a?"":void 0,role:a?"menuitem":void 0,"data-focus-inside":u?"":void 0,className:N,...V(v.getItemProps({...o,onFocus($){var z;(z=o.onFocus)==null||z.call(o,$),d(!1),v.setHasFocusInside(!0)}}))}):w.jsxs("button",{ref:gu([T.setReference,g.ref,i]),tabIndex:a?v.activeIndex===g.index?0:-1:void 0,"data-open":l?"":void 0,"data-nested":a?"":void 0,role:a?"menuitem":void 0,"data-focus-inside":u?"":void 0,className:N,...V(v.getItemProps({...o,onFocus($){var z;(z=o.onFocus)==null||z.call(o,$),d(!1),v.setHasFocusInside(!0)}})),children:[r,a&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(Oc,{size:14})]})]})}),w.jsx(Od.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:A,setHasFocusInside:d,isOpen:l},children:w.jsx(R_,{elementsRef:p,labelsRef:m,children:l&&w.jsx(Ao,{preserveTabOrder:!0,children:w.jsx($i,{context:E,modal:!1,initialFocus:a?-1:0,returnFocus:!a,children:w.jsx("div",{ref:T.setFloating,style:S,className:"isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",...P(),children:e})})})})})]})}),$F=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(Od),a=zy({label:r?null:typeof e=="string"?e:t}),l=ur(),c=a.index===s.activeIndex;return w.jsxs("button",{...o,ref:gu([a.ref,i]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:v0(o.className),...s.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),s.setHasFocusInside(!0)}}),children:[e,n?w.jsx(n,{size:16}):null]})}),jF=b.forwardRef((e,t)=>cr()!==null?w.jsx(b0,{...e,isParent:!1,ref:t}):w.jsx(G_,{children:w.jsx(b0,{...e,isParent:!0,ref:t})})),RF=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=b.useState(!1),{context:a,refs:l}=Do({transform:!0,open:i!==null,onOpenChange:s,nodeId:n,strategy:"absolute"}),c=ma(a),u=Fo(a),d=Mo(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=No([c,u,d]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(Yn,{...h(e),as:St.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:w.jsx(St.span,{layoutId:o,children:e.trigger})}),w.jsx(Ci,{children:i?w.jsx(Ao,{root:t,children:w.jsx($i,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(St.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})};var BF=String.prototype.replace,zF=/%20/g,_d={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ad={default:_d.RFC3986,formatters:{RFC1738:function(e){return BF.call(e,zF,"+")},RFC3986:function(e){return String(e)}},RFC1738:_d.RFC1738,RFC3986:_d.RFC3986},WF=Ad,Md=Object.prototype.hasOwnProperty,Rr=Array.isArray,En=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),HF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Rr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},w0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},UF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Rr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Md.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 Rr(t)&&!Rr(n)&&(o=w0(t,r)),Rr(t)&&Rr(n)?(n.forEach(function(i,s){if(Md.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 Md.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},GF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},YF=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}},Dd=1024,qF=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(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=Dd){for(var c=s.length>=Dd?s.slice(l,l+Dd):s,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===WF.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=En[f];continue}if(f<2048){u[u.length]=En[192|f>>6]+En[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=En[224|f>>12]+En[128|f>>6&63]+En[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=En[240|f>>18]+En[128|f>>12&63]+En[128|f>>6&63]+En[128|f&63]}a+=u.join("")}return a},KF=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),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return HF(n),t},ZF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},XF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},QF=function(t,n){return[].concat(t,n)},JF=function(t,n){if(Rr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},x0={arrayToObject:w0,assign:GF,combine:QF,compact:KF,decode:YF,encode:qF,isBuffer:XF,isRegExp:ZF,maybeMap:JF,merge:UF},T0=Px,ja=x0,Ji=Ad,eL=Object.prototype.hasOwnProperty,S0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Cn=Array.isArray,tL=Array.prototype.push,E0=function(e,t){tL.apply(e,Cn(t)?t:[t])},nL=Date.prototype.toISOString,C0=Ji.default,gt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ja.encode,encodeValuesOnly:!1,format:C0,formatter:Ji.formatters[C0],indices:!1,serializeDate:function(t){return nL.call(t)},skipNulls:!1,strictNullHandling:!1},rL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Nd={},oL=function e(t,n,r,o,i,s,a,l,c,u,d,f,h,p,m,v,y,x){for(var g=t,S=x,T=0,E=!1;(S=S.get(Nd))!==void 0&&!E;){var O=S.get(t);if(T+=1,typeof O<"u"){if(O===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Nd)>"u"&&(T=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&Cn(g)&&(g=ja.maybeMap(g,function(_){return _ instanceof Date?h(_):_})),g===null){if(s)return c&&!v?c(n,gt.encoder,y,"key",p):n;g=""}if(rL(g)||ja.isBuffer(g)){if(c){var I=v?n:c(n,gt.encoder,y,"key",p);return[m(I)+"="+m(c(g,gt.encoder,y,"value",p))]}return[m(n)+"="+m(String(g))]}var k=[];if(typeof g>"u")return k;var C;if(r==="comma"&&Cn(g))v&&c&&(g=ja.maybeMap(g,c)),C=[{value:g.length>0?g.join(",")||null:void 0}];else if(Cn(u))C=u;else{var L=Object.keys(g);C=d?L.sort(d):L}var D=l?n.replace(/\./g,"%2E"):n,V=o&&Cn(g)&&g.length===1?D+"[]":D;if(i&&Cn(g)&&g.length===0)return V+"[]";for(var P=0;P<C.length;++P){var A=C[P],N=typeof A=="object"&&typeof A.value<"u"?A.value:g[A];if(!(a&&N===null)){var $=f&&l?A.replace(/\./g,"%2E"):A,z=Cn(g)?typeof r=="function"?r(V,$):V:V+(f?"."+$:"["+$+"]");x.set(t,T);var U=T0();U.set(Nd,x),E0(k,e(N,z,r,o,i,s,a,l,r==="comma"&&v&&Cn(g)?null:c,u,d,f,h,p,m,v,y,U))}}return k},iL=function(t){if(!t)return gt;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||gt.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=Ji.default;if(typeof t.format<"u"){if(!eL.call(Ji.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Ji.formatters[r],i=gt.filter;(typeof t.filter=="function"||Cn(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in S0?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=gt.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:gt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:gt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:gt.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?gt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:gt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:gt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:gt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:gt.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:gt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:gt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gt.strictNullHandling}},sL=function(e,t){var n=e,r=iL(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Cn(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=S0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=T0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||E0(s,oL(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=s.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},qo=x0,Fd=Object.prototype.hasOwnProperty,aL=Array.isArray,ft={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:qo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},lL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},P0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},cL="utf8=%26%2310003%3B",uL="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,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===uL?c="utf-8":s[l]===cL&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,ft.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),ft.decoder,c,"key"),p=qo.maybeMap(P0(u.slice(f+1),n),function(v){return n.decoder(v,ft.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=lL(p)),u.indexOf("[]=")>-1&&(p=aL(p)?[p]:p);var m=Fd.call(r,h);m&&n.duplicates==="combine"?r[h]=qo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},fL=function(e,t,n,r){for(var o=r?t:P0(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 l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},hL=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&Fd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(i))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&Fd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),fL(u,n,r,o)}},pL=function(t){if(!t)return ft;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"?ft.charset:t.charset,r=typeof t.duplicates>"u"?ft.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:ft.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ft.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ft.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ft.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ft.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ft.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ft.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ft.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ft.decoder,delimiter:typeof t.delimiter=="string"||qo.isRegExp(t.delimiter)?t.delimiter:ft.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ft.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ft.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ft.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ft.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ft.strictNullHandling}},mL=function(e,t){var n=pL(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],l=hL(a,r[a],n,typeof e=="string");o=qo.merge(o,l,n)}return n.allowSparse===!0?o:qo.compact(o)},gL=sL,yL=mL,vL=Ad,bL={formats:vL,parse:yL,stringify:gL},ke;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(ke||(ke={}));var k0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(k0||(k0={}));const ne=ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Br=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},K=ke.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class en extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof en))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ke.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}en.create=e=>new en(e);const es=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ke.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${ke.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ke.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${ke.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ke.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case K.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,ke.assertNever(e)}return{message:n}};let wL=es;function Ld(){return wL}const Vd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function te(e,t){const n=Ld(),r=Vd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===es?void 0:es].filter(o=>!!o)});e.common.issues.push(r)}class Vt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return Vt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return me;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),ts=e=>({status:"dirty",value:e}),Wt=e=>({status:"valid",value:e}),I0=e=>e.status==="aborted",O0=e=>e.status==="dirty",Ra=e=>e.status==="valid",Ba=e=>typeof Promise<"u"&&e instanceof Promise;function za(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function _0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));var ns,rs;class Pn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const A0=(e,t)=>{if(Ra(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new en(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=e;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Br(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Vt,ctx:{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ba(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Br(t)},i=this._parseSync({data:t,path:o.path,parent:o});return A0(o,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Br(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Ba(o)?o:Promise.resolve(o));return A0(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:K.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Rn({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Bn.create(this,this._def)}nullable(){return Hr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cn.create(this,this._def)}promise(){return ss.create(this,this._def)}or(t){return Ua.create([this,t],this._def)}and(t){return Ga.create(this,t,this._def)}transform(t){return new Rn({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Xa({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new F0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Qa({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ja.create(this,t)}readonly(){return el.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xL=/^c[^\s-]{8,}$/i,TL=/^[0-9a-z]+$/,SL=/^[0-9A-HJKMNP-TV-Z]{26}$/,EL=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,CL=/^[a-z0-9_-]{21}$/i,PL=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,kL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,IL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $d;const OL=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_L=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,AL=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,M0="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ML=new RegExp(`^${M0}$`);function D0(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function DL(e){return new RegExp(`^${D0(e)}$`)}function NL(e){let t=`${M0}T${D0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function FL(e,t){return!!((t==="v4"||!t)&&OL.test(e)||(t==="v6"||!t)&&_L.test(e))}class Vn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:ne.string,received:i.parsedType}),me}const r=new Vt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?te(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&te(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")kL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")$d||($d=new RegExp(IL,"u")),$d.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")EL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")CL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"nanoid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")xL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")TL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")SL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:K.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"regex",code:K.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?NL(i).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?ML.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?DL(i).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?PL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"duration",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?FL(t.data,i.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?AL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"base64",code:K.invalid_string,message:i.message}),r.dirty()):ke.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Vn.create=e=>{var t;return new Vn({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function LL(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class zr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:ne.number,received:i.parsedType}),me}let r;const o=new Vt;for(const i of this._def.checks)i.kind==="int"?ke.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?LL(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_finite,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new zr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new zr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ke.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}zr.create=e=>new zr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ko extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:ne.bigint,received:i.parsedType}),me}let r;const o=new Vt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Ko({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Ko({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ko.create=e=>{var t;return new Ko({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class jd extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.boolean,received:r.parsedType}),me}return Wt(t.data)}}jd.create=e=>new jd({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class os extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:ne.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_date}),me}const r=new Vt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ke.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new os({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}os.create=e=>new os({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Rd extends xe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.symbol,received:r.parsedType}),me}return Wt(t.data)}}Rd.create=e=>new Rd({typeName:he.ZodSymbol,...ye(e)});class Wa extends xe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.undefined,received:r.parsedType}),me}return Wt(t.data)}}Wa.create=e=>new Wa({typeName:he.ZodUndefined,...ye(e)});class Ha extends xe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.null,received:r.parsedType}),me}return Wt(t.data)}}Ha.create=e=>new Ha({typeName:he.ZodNull,...ye(e)});class Bd extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return Wt(t.data)}}Bd.create=e=>new Bd({typeName:he.ZodAny,...ye(e)});class Zo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Wt(t.data)}}Zo.create=e=>new Zo({typeName:he.ZodUnknown,...ye(e)});class yr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:K.invalid_type,expected:ne.never,received:n.parsedType}),me}}yr.create=e=>new yr({typeName:he.ZodNever,...ye(e)});class zd extends xe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.void,received:r.parsedType}),me}return Wt(t.data)}}zd.create=e=>new zd({typeName:he.ZodVoid,...ye(e)});class cn extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ne.array)return te(n,{code:K.invalid_type,expected:ne.array,received:n.parsedType}),me;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(te(n,{code:s?K.too_big:K.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(te(n,{code:K.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(te(n,{code:K.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Pn(n,s,n.path,a)))).then(s=>Vt.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Pn(n,s,n.path,a)));return Vt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new cn({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new cn({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new cn({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}cn.create=(e,t)=>new cn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Xo(e){if(e instanceof ot){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bn.create(Xo(r))}return new ot({...e._def,shape:()=>t})}else return e instanceof cn?new cn({...e._def,type:Xo(e.element)}):e instanceof Bn?Bn.create(Xo(e.unwrap())):e instanceof Hr?Hr.create(Xo(e.unwrap())):e instanceof jn?jn.create(e.items.map(t=>Xo(t))):e}class ot extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ke.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const c=this._getOrReturnCtx(t);return te(c,{code:K.invalid_type,expected:ne.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof yr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Pn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof yr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(te(o,{code:K.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Pn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Vt.mergeObjectSync(r,c)):Vt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new ot({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ot({...this._def,unknownKeys:"strip"})}passthrough(){return new ot({...this._def,unknownKeys:"passthrough"})}extend(t){return new ot({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ot({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ot({...this._def,catchall:t})}pick(t){const n={};return ke.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ot({...this._def,shape:()=>n})}omit(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ot({...this._def,shape:()=>n})}deepPartial(){return Xo(this)}partial(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ot({...this._def,shape:()=>n})}required(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Bn;)i=i._def.innerType;n[r]=i}}),new ot({...this._def,shape:()=>n})}keyof(){return N0(ke.objectKeys(this.shape))}}ot.create=(e,t)=>new ot({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),ot.strictCreate=(e,t)=>new ot({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),ot.lazycreate=(e,t)=>new ot({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)});class Ua extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new en(a.ctx.common.issues));return te(n,{code:K.invalid_union,unionErrors:s}),me}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new en(l));return te(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Ua.create=(e,t)=>new Ua({options:e,typeName:he.ZodUnion,...ye(t)});const $n=e=>e instanceof qa?$n(e.schema):e instanceof Rn?$n(e.innerType()):e instanceof Ka?[e.value]:e instanceof Wr?e.options:e instanceof Za?ke.objectValues(e.enum):e instanceof Xa?$n(e._def.innerType):e instanceof Wa?[void 0]:e instanceof Ha?[null]:e instanceof Bn?[void 0,...$n(e.unwrap())]:e instanceof Hr?[null,...$n(e.unwrap())]:e instanceof F0||e instanceof el?$n(e.unwrap()):e instanceof Qa?$n(e._def.innerType):[];class Wd extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return te(n,{code:K.invalid_type,expected:ne.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(te(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const s=$n(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new Wd({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Hd(e,t){const n=Br(e),r=Br(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=ke.objectKeys(t),i=ke.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=Hd(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=Hd(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ga extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(I0(i)||I0(s))return me;const a=Hd(i.value,s.value);return a.valid?((O0(i)||O0(s))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:K.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ga.create=(e,t,n)=>new Ga({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class jn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return te(r,{code:K.invalid_type,expected:ne.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return te(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Pn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Vt.mergeArray(n,s)):Vt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new jn({...this._def,rest:t})}}jn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new jn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class Ya extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return te(r,{code:K.invalid_type,expected:ne.object,received:r.parsedType}),me;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new Pn(r,a,r.path,a)),value:s._parse(new Pn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Vt.mergeObjectAsync(n,o):Vt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Ya({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Ya({keyType:Vn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Ud extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return te(r,{code:K.invalid_type,expected:ne.map,received:r.parsedType}),me;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Pn(r,a,r.path,[c,"key"])),value:i._parse(new Pn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Ud.create=(e,t,n)=>new Ud({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Qo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return te(r,{code:K.invalid_type,expected:ne.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:K.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(te(r,{code:K.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Pn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new Qo({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new Qo({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Qo.create=(e,t)=>new Qo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class is extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return te(n,{code:K.invalid_type,expected:ne.function,received:n.parsedType}),me;function r(a,l){return Vd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ld(),es].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return Vd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ld(),es].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ss){const a=this;return Wt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,i).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return Wt(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new en([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new en([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new is({...this._def,args:jn.create(t).rest(Zo.create())})}returns(t){return new is({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new is({args:t||jn.create([]).rest(Zo.create()),returns:n||Zo.create(),typeName:he.ZodFunction,...ye(r)})}}class qa extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}qa.create=(e,t)=>new qa({getter:e,typeName:he.ZodLazy,...ye(t)});class Ka extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ka.create=(e,t)=>new Ka({value:e,typeName:he.ZodLiteral,...ye(t)});function N0(e,t){return new Wr({values:e,typeName:he.ZodEnum,...ye(t)})}class Wr extends xe{constructor(){super(...arguments),ns.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:ke.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(za(this,ns)||_0(this,ns,new Set(this._def.values)),!za(this,ns).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:K.invalid_enum_value,options:r}),me}return Wt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Wr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Wr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ns=new WeakMap,Wr.create=N0;class Za extends xe{constructor(){super(...arguments),rs.set(this,void 0)}_parse(t){const n=ke.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=ke.objectValues(n);return te(r,{expected:ke.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(za(this,rs)||_0(this,rs,new Set(ke.getValidEnumValues(this._def.values))),!za(this,rs).has(t.data)){const o=ke.objectValues(n);return te(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return Wt(t.data)}get enum(){return this._def.values}}rs=new WeakMap,Za.create=(e,t)=>new Za({values:e,typeName:he.ZodNativeEnum,...ye(t)});class ss extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return te(n,{code:K.invalid_type,expected:ne.promise,received:n.parsedType}),me;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return Wt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ss.create=(e,t)=>new ss({type:e,typeName:he.ZodPromise,...ye(t)});class Rn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{te(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?ts(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?ts(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ra(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Ra(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);ke.assertNever(o)}}Rn.create=(e,t,n)=>new Rn({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),Rn.createWithPreprocess=(e,t,n)=>new Rn({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class Bn extends xe{_parse(t){return this._getType(t)===ne.undefined?Wt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bn.create=(e,t)=>new Bn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Hr extends xe{_parse(t){return this._getType(t)===ne.null?Wt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hr.create=(e,t)=>new Hr({innerType:e,typeName:he.ZodNullable,...ye(t)});class Xa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Xa.create=(e,t)=>new Xa({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class Qa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ba(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Qa.create=(e,t)=>new Qa({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Gd extends xe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Gd.create=e=>new Gd({typeName:he.ZodNaN,...ye(e)});class F0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ja extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?me:i.status==="dirty"?(n.dirty(),ts(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Ja({in:t,out:n,typeName:he.ZodPipeline})}}class el extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ra(o)&&(o.value=Object.freeze(o.value)),o);return Ba(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}el.create=(e,t)=>new el({innerType:e,typeName:he.ZodReadonly,...ye(t)}),ot.lazycreate;var he;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(he||(he={})),Vn.create,zr.create,Gd.create,Ko.create,jd.create,os.create,Rd.create,Wa.create,Ha.create,Bd.create,Zo.create,yr.create,zd.create,cn.create,ot.create,ot.strictCreate,Ua.create,Wd.create,Ga.create,jn.create,Ya.create,Ud.create,Qo.create,is.create,qa.create,Ka.create,Wr.create,Za.create,ss.create,Rn.create,Bn.create,Hr.create,Rn.createWithPreprocess,Ja.create;const VL={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},L0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return bL.parse(n.toString(),VL)},V0=e=>e.replace("[",".").replace("]","").split("."),as=(e,t)=>V0(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof cn?o.element:o},t),ls=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),$L=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(u,d)=>{const f=as(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},i=(u,d)=>{const f=as(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},s=(u,d)=>{const f=as(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},a=(u,d)=>{const f=as(u,e);return{...d,name:u,id:u,required:!f.isOptional(),type:kn.instance(f,zr)?"number":(d==null?void 0:d.type)??"text",error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}};b.useEffect(()=>{const u=Object.values(r.current).map(f=>{const h=f.element.dataset.origin?document.querySelector(`[data-target=${f.element.name}]`):f.element,p=f.schema.safeParse(ls(h)),m=v=>{const y=h.dataset.target||h.name;if(!y)return;const x=ls(v.target)||(v.relatedTarget?ls(v.relatedTarget):""),g=f.schema.safeParse(x);if(g.success)return h.setCustomValidity(""),n(S=>{const{[y]:T,...E}=S||{};return E===null||kn.empty(E)?null:E});if(h.required){const S=g.error.issues[0].message;h.setCustomValidity(S),n(T=>({...T,[y]:S}))}};return h.addEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m),{input:f,hasInitialError:h.required?!p.success:!1,unsubscribe:()=>{h.removeEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m)}}});return u.some(f=>f.hasInitialError)&&n(f=>f===null?{}:f),()=>u.forEach(f=>f.unsubscribe())});const l=b.useCallback(u=>d=>{const f=d.currentTarget,h=Object.values(r.current).reduce((m,v)=>{const y=v.element,x=v.schema.safeParse(ls(y));if(y.dataset.ignore==="ignore"||x.success)return m;const g=x.error.issues[0].message;y.setAttribute("data-initialized","true");const S=y.dataset.name||y.name||"";return{...m,[S]:g}},{}),p=kn.empty(h)?null:h;n(p),u==null||u({form:f,errors:p||{}})},[]),c=b.useCallback(u=>d=>{d.preventDefault();const f=d.currentTarget;let h=L0(f);Array.from(f.elements).forEach(m=>{if(m.tagName==="SELECT"){const v=m;h=Xf(h,v.name,v.value)}if(m.tagName==="INPUT"){const v=m;h=Xf(h,v.name,ls(v))}});const p=e.safeParse(h);return p.success?u({form:f,json:h,data:p.data,event:d,reset:()=>Yu(f),success:!0,errors:[]}):u({form:f,json:h,event:d,data:h,success:!1,reset:()=>Yu(f),errors:p.error.issues.map(m=>({message:m.message,path:m.path.map(v=>String(v))}))})},[]);return{input:a,datepicker:o,checkbox:s,select:i,onSubmit:c,errors:t,onInvalid:l,disabled:t!==null}},jL=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},RL={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},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"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},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%)"}}},BL={name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 75%)",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%, 80%)",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(0, 0%, 85%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},zL={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>)`},cs=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(cs(s,t,n,a))},[]),$0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:$0(s,t,n,a)}},{}),j0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Yd=(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)},WL={default:e=>Yd(e,{result:j0.default}),dark:e=>Yd(e,{result:j0.dark})},HL=(e,t)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=cs(e.colors,n),o=cs(e.spacing,n),i=cs(e.rounded,n);return Yd(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};ee.Alert=jP,ee.Autocomplete=$A,ee.Button=Yn,ee.ButtonGroup=_1,ee.Calendar=cy,ee.Card=uy,ee.Checkbox=Cv,ee.ColType=Yo,ee.Collapse=ag,ee.ComponentsProvider=bO,ee.DatePicker=RA,ee.Dropdown=Vo,ee.Expand=RF,ee.FileUpload=QM,ee.Form=eD,ee.Input=ji,ee.InputFeedback=Sv,ee.InputField=va,ee.Menu=jF,ee.MenuItem=$F,ee.Modal=bv,ee.Option=Ev,ee.Polymorph=to,ee.Radiobox=tD,ee.Select=Lr,ee.Stats=EO,ee.Switch=nD,ee.Tab=NA,ee.Table=VF,ee.Tabs=MA,ee.Tag=D1,ee.Tooltip=Tv,ee.TransferList=VN,ee.convertPath=V0,ee.createColumns=aF,ee.createDesignTokens=$0,ee.createOptionCols=Cd,ee.createStyles=WL,ee.createTheme=HL,ee.css=ze,ee.defaultDarkTheme=RL,ee.defaultLightTheme=BL,ee.dispatchInput=bs,ee.formReset=Yu,ee.formToJson=L0,ee.getSchemaShape=as,ee.initializeInputDataset=ws,ee.isReactComponent=k1,ee.isReactFC=I1,ee.isSsr=Zs,ee.mergeRefs=Ol,ee.parsers=zL,ee.path=ny,ee.reduceTokens=cs,ee.safeRegex=qc,ee.splitInto=ry,ee.useForm=$L,ee.usePrevious=jL,ee.useReactive=dy,ee.useTablePreferences=cF,ee.useTranslations=Ut,ee.uuid=Ks,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
196
201
|
//# sourceMappingURL=index.umd.js.map
|